diff options
Diffstat (limited to 'fast-import.c')
-rw-r--r-- | fast-import.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/fast-import.c b/fast-import.c index 05d1079d23..4d55910ab9 100644 --- a/fast-import.c +++ b/fast-import.c @@ -973,7 +973,7 @@ static void end_packfile(void) struct tag *t; close_pack_windows(pack_data); - hashclose(pack_file, cur_pack_oid.hash, 0); + finalize_hashfile(pack_file, cur_pack_oid.hash, 0); fixup_pack_header_footer(pack_data->pack_fd, pack_data->sha1, pack_data->pack_name, object_count, cur_pack_oid.hash, pack_size); @@ -1331,7 +1331,7 @@ static void *gfi_unpack_entry( */ p->pack_size = pack_size + the_hash_algo->rawsz; } - return unpack_entry(p, oe->idx.offset, &type, sizep); + return unpack_entry(the_repository, p, oe->idx.offset, &type, sizep); } static const char *get_mode(const char *str, uint16_t *modep) @@ -1817,7 +1817,7 @@ static void dump_marks_helper(FILE *f, static void dump_marks(void) { - static struct lock_file mark_lock; + struct lock_file mark_lock = LOCK_INIT; FILE *f; if (!export_marks_file || (import_marks_file && !import_marks_file_done)) @@ -1872,7 +1872,8 @@ static void read_marks(void) die("corrupt mark line: %s", line); e = find_object(&oid); if (!e) { - enum object_type type = oid_object_info(&oid, NULL); + enum object_type type = oid_object_info(the_repository, + &oid, NULL); if (type < 0) die("object not found: %s", oid_to_hex(&oid)); e = insert_object(&oid); @@ -2402,7 +2403,8 @@ static void file_change_m(const char *p, struct branch *b) enum object_type expected = S_ISDIR(mode) ? OBJ_TREE: OBJ_BLOB; enum object_type type = oe ? oe->type : - oid_object_info(&oid, NULL); + oid_object_info(the_repository, &oid, + NULL); if (type < 0) die("%s not found: %s", S_ISDIR(mode) ? "Tree" : "Blob", @@ -2563,7 +2565,8 @@ static void note_change_n(const char *p, struct branch *b, unsigned char *old_fa die("Not a blob (actually a %s): %s", type_name(oe->type), command_buf.buf); } else if (!is_null_oid(&oid)) { - enum object_type type = oid_object_info(&oid, NULL); + enum object_type type = oid_object_info(the_repository, &oid, + NULL); if (type < 0) die("Blob not found: %s", command_buf.buf); if (type != OBJ_BLOB) @@ -2850,7 +2853,7 @@ static void parse_new_tag(const char *arg) } else if (!get_oid(from, &oid)) { struct object_entry *oe = find_object(&oid); if (!oe) { - type = oid_object_info(&oid, NULL); + type = oid_object_info(the_repository, &oid, NULL); if (type < 0) die("Not a valid object: %s", from); } else @@ -3008,7 +3011,8 @@ static struct object_entry *dereference(struct object_entry *oe, unsigned long size; char *buf = NULL; if (!oe) { - enum object_type type = oid_object_info(oid, NULL); + enum object_type type = oid_object_info(the_repository, oid, + NULL); if (type < 0) die("object not found: %s", oid_to_hex(oid)); /* cache it! */ |