diff options
Diffstat (limited to 'pack-write.c')
| -rw-r--r-- | pack-write.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pack-write.c b/pack-write.c index 80ecfa544c..27965672f1 100644 --- a/pack-write.c +++ b/pack-write.c @@ -1,3 +1,5 @@ +#define USE_THE_REPOSITORY_VARIABLE + #include "git-compat-util.h" #include "environment.h" #include "gettext.h" @@ -10,6 +12,7 @@ #include "pack-objects.h" #include "pack-revindex.h" #include "path.h" +#include "repository.h" #include "strbuf.h" void reset_pack_idx_option(struct pack_idx_option *opts) @@ -428,7 +431,8 @@ void fixup_pack_header_footer(int pack_fd, if (partial_pack_offset == 0) { unsigned char hash[GIT_MAX_RAWSZ]; the_hash_algo->final_fn(hash, &old_hash_ctx); - if (!hasheq(hash, partial_pack_hash)) + if (!hasheq(hash, partial_pack_hash, + the_repository->hash_algo)) die("Unexpected checksum for %s " "(disk corruption?)", pack_name); /* @@ -470,7 +474,7 @@ char *index_pack_lockfile(int ip_out, int *is_well_formed) packname[len-1] = 0; if (skip_prefix(packname, "keep\t", &name)) return xstrfmt("%s/pack/pack-%s.keep", - get_object_directory(), name); + repo_get_object_directory(the_repository), name); return NULL; } if (is_well_formed) |
