diff options
Diffstat (limited to 'builtin/unpack-objects.c')
-rw-r--r-- | builtin/unpack-objects.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index 0b4fe803cc..fef7423448 100644 --- a/builtin/unpack-objects.c +++ b/builtin/unpack-objects.c @@ -1,18 +1,18 @@ #include "builtin.h" -#include "cache.h" #include "bulk-checkin.h" #include "config.h" #include "environment.h" #include "gettext.h" #include "git-zlib.h" #include "hex.h" -#include "object-store.h" +#include "object-store-ll.h" #include "object.h" #include "delta.h" #include "pack.h" #include "blob.h" #include "commit.h" #include "replace-object.h" +#include "strbuf.h" #include "tag.h" #include "tree.h" #include "tree-walk.h" @@ -215,7 +215,8 @@ static void write_cached_object(struct object *obj, struct obj_buffer *obj_buf) * Verify its reachability and validity recursively and write it out. */ static int check_object(struct object *obj, enum object_type type, - void *data, struct fsck_options *options) + void *data UNUSED, + struct fsck_options *options UNUSED) { struct obj_buffer *obj_buf; @@ -608,6 +609,7 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix UNUSED) { int i; struct object_id oid; + git_hash_ctx tmp_ctx; disable_replace_refs(); @@ -668,7 +670,9 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix UNUSED) the_hash_algo->init_fn(&ctx); unpack_all(); the_hash_algo->update_fn(&ctx, buffer, offset); - the_hash_algo->final_oid_fn(&oid, &ctx); + the_hash_algo->init_fn(&tmp_ctx); + the_hash_algo->clone_fn(&tmp_ctx, &ctx); + the_hash_algo->final_oid_fn(&oid, &tmp_ctx); if (strict) { write_rest(); if (fsck_finish(&fsck_options)) |