diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2019-02-19 03:04:56 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-01 05:57:37 +0300 |
commit | 0dd4924891664e9e9970e427e84f902491fcd3d3 (patch) | |
tree | cff4f9bc7b6f25a2fa2794359ec86b7a53bd50aa /pack-bitmap-write.c | |
parent | 53636539d37007099f14249a5dae4c05dc72ace4 (diff) |
pack-bitmap: replace sha1_to_hex
Replace the uses of sha1_to_hex in the pack bitmap code with hash_to_hex
to allow the use of SHA-256 as well. Rename a few variables since they
are no longer limited to SHA-1.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap-write.c')
-rw-r--r-- | pack-bitmap-write.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c index c82fb01fd7..802ed62677 100644 --- a/pack-bitmap-write.c +++ b/pack-bitmap-write.c @@ -142,13 +142,13 @@ static inline void reset_all_seen(void) seen_objects_nr = 0; } -static uint32_t find_object_pos(const unsigned char *sha1) +static uint32_t find_object_pos(const unsigned char *hash) { - struct object_entry *entry = packlist_find(writer.to_pack, sha1, NULL); + struct object_entry *entry = packlist_find(writer.to_pack, hash, NULL); if (!entry) { die("Failed to write bitmap index. Packfile doesn't have full closure " - "(object %s is missing)", sha1_to_hex(sha1)); + "(object %s is missing)", hash_to_hex(hash)); } return oe_in_pack_pos(writer.to_pack, entry); |