diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-09-13 10:07:56 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-09-13 10:07:57 -0700 |
| commit | 331f20d52df2fd5eb4bea4a9e14a368472f32819 (patch) | |
| tree | 2aa5b04125bfde2d26ea07e9723f80251a8aea0f /builtin/unpack-objects.c | |
| parent | Merge branch 'jk/unused-post-2.42-part2' (diff) | |
| parent | treewide: fix various bugs w/ OpenSSL 3+ EVP API (diff) | |
| download | git-331f20d52df2fd5eb4bea4a9e14a368472f32819.tar.gz git-331f20d52df2fd5eb4bea4a9e14a368472f32819.zip | |
Merge branch 'ew/hash-with-openssl-evp'
Fix-up new-ish code to support OpenSSL EVP API.
* ew/hash-with-openssl-evp:
treewide: fix various bugs w/ OpenSSL 3+ EVP API
Diffstat (limited to 'builtin/unpack-objects.c')
| -rw-r--r-- | builtin/unpack-objects.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index 32505255a0..fef7423448 100644 --- a/builtin/unpack-objects.c +++ b/builtin/unpack-objects.c @@ -609,6 +609,7 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix UNUSED) { int i; struct object_id oid; + git_hash_ctx tmp_ctx; disable_replace_refs(); @@ -669,7 +670,9 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix UNUSED) the_hash_algo->init_fn(&ctx); unpack_all(); the_hash_algo->update_fn(&ctx, buffer, offset); - the_hash_algo->final_oid_fn(&oid, &ctx); + the_hash_algo->init_fn(&tmp_ctx); + the_hash_algo->clone_fn(&tmp_ctx, &ctx); + the_hash_algo->final_oid_fn(&oid, &tmp_ctx); if (strict) { write_rest(); if (fsck_finish(&fsck_options)) |
