aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/unpack-objects.c
diff options
context:
space:
mode:
authorJensen Huang <hmz007@gmail.com>2025-03-18 19:16:10 +0800
committerJunio C Hamano <gitster@pobox.com>2025-03-18 12:27:33 -0700
commitd39f04b638f7f862efebb5bf028bad50f6aa9e28 (patch)
tree5d2e7a85d90d19ebb60b53ee1ea74cbe0f8c82d5 /builtin/unpack-objects.c
parent0578f1e66aa381356bfe2f53decf3864d88d23d3 (diff)
downloadgit-d39f04b638f7f862efebb5bf028bad50f6aa9e28.tar.gz
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>
Diffstat (limited to 'builtin/unpack-objects.c')
-rw-r--r--builtin/unpack-objects.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
index 8383bcf404..c5a6dca856 100644
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
@@ -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) {