diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2021-04-26 03:02:53 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-04-27 09:31:38 +0200 |
commit | 5951bf467ea92458c3bea3051c8413041f3b27d5 (patch) | |
tree | e26a68adea2c27c1fdc80c93ef0aff2cd71a494d /bulk-checkin.c | |
parent | hash: add a function to finalize object IDs (diff) | |
download | git-5951bf467ea92458c3bea3051c8413041f3b27d5.tar.xz git-5951bf467ea92458c3bea3051c8413041f3b27d5.zip |
Use the final_oid_fn to finalize hashing of object IDs
When we're hashing a value which is going to be an object ID, we want to
zero-pad that value if necessary. To do so, use the final_oid_fn
instead of the final_fn anytime we're going to create an object ID to
ensure we perform this operation.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bulk-checkin.c')
-rw-r--r-- | bulk-checkin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bulk-checkin.c b/bulk-checkin.c index 6f3c97cd34..127312acd1 100644 --- a/bulk-checkin.c +++ b/bulk-checkin.c @@ -238,7 +238,7 @@ static int deflate_to_pack(struct bulk_checkin_state *state, if (lseek(fd, seekback, SEEK_SET) == (off_t) -1) return error("cannot seek back"); } - the_hash_algo->final_fn(result_oid->hash, &ctx); + the_hash_algo->final_oid_fn(result_oid, &ctx); if (!idx) return 0; |