index-pack, unpack-objects: restore missing ->init_fn
Commit 0578f1e66a ("global: adapt callers to use generic hash context helpers")
accidentally removed `->init_fn`, which is required for OpenSSL 3+ SHA1.
This fixes the following error on fetch:
fatal: fetch-pack: invalid index-pack output
Signed-off-by: Jensen Huang <hmz007@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
0578f1e66a
commit
d39f04b638
@@ -668,6 +668,7 @@ int cmd_unpack_objects(int argc,
|
||||
the_hash_algo->init_fn(&ctx);
|
||||
unpack_all();
|
||||
git_hash_update(&ctx, buffer, offset);
|
||||
the_hash_algo->init_fn(&tmp_ctx);
|
||||
git_hash_clone(&tmp_ctx, &ctx);
|
||||
git_hash_final_oid(&oid, &tmp_ctx);
|
||||
if (strict) {
|
||||
|
||||
Reference in New Issue
Block a user