diff options
Diffstat (limited to 'pack-check.c')
| -rw-r--r-- | pack-check.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pack-check.c b/pack-check.c index 25104d5b14..e883dae3f2 100644 --- a/pack-check.c +++ b/pack-check.c @@ -1,3 +1,5 @@ +#define USE_THE_REPOSITORY_VARIABLE + #include "git-compat-util.h" #include "environment.h" #include "hex.h" @@ -78,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); |
