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>
This commit is contained in:
brian m. carlson
2019-02-19 00:04:56 +00:00
committed by Junio C Hamano
parent 53636539d3
commit 0dd4924891
2 changed files with 7 additions and 7 deletions

View File

@ -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);