diff options
Diffstat (limited to 'pack-check.c')
| -rw-r--r-- | pack-check.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pack-check.c b/pack-check.c index 977f619618..e883dae3f2 100644 --- a/pack-check.c +++ b/pack-check.c @@ -1,9 +1,10 @@ +#define USE_THE_REPOSITORY_VARIABLE + #include "git-compat-util.h" #include "environment.h" #include "hex.h" #include "repository.h" #include "pack.h" -#include "pack-revindex.h" #include "progress.h" #include "packfile.h" #include "object-file.h" @@ -79,10 +80,11 @@ static int verify_packfile(struct repository *r, } while (offset < pack_sig_ofs); r->hash_algo->final_fn(hash, &ctx); pack_sig = use_pack(p, w_curs, pack_sig_ofs, NULL); - if (!hasheq(hash, pack_sig)) + if (!hasheq(hash, pack_sig, the_repository->hash_algo)) err = error("%s pack checksum mismatch", p->pack_name); - if (!hasheq(index_base + index_size - r->hash_algo->hexsz, pack_sig)) + if (!hasheq(index_base + index_size - r->hash_algo->hexsz, pack_sig, + the_repository->hash_algo)) err = error("%s pack checksum does not match its index", p->pack_name); unuse_pack(w_curs); |
