summaryrefslogtreecommitdiff
path: root/pack-bitmap-write.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2019-02-19 00:04:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-01 02:57:37 (GMT)
commit0dd4924891664e9e9970e427e84f902491fcd3d3 (patch)
treecff4f9bc7b6f25a2fa2794359ec86b7a53bd50aa /pack-bitmap-write.c
parent53636539d37007099f14249a5dae4c05dc72ace4 (diff)
downloadgit-0dd4924891664e9e9970e427e84f902491fcd3d3.zip
git-0dd4924891664e9e9970e427e84f902491fcd3d3.tar.gz
git-0dd4924891664e9e9970e427e84f902491fcd3d3.tar.bz2
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index c82fb01..802ed62 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);