1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-25 20:36:09 +02:00

builtin/index-pack: replace sha1_to_hex

Since sha1_to_hex is limited to SHA-1, replace it with hash_to_hex so
this code works with other algorithms.

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-08-18 20:04:23 +00:00 committed by Junio C Hamano
parent 3a4d7aa5ae
commit 69fa337060

View File

@ -1490,11 +1490,11 @@ static void final(const char *final_pack_name, const char *curr_pack_name,
}
if (!from_stdin) {
printf("%s\n", sha1_to_hex(hash));
printf("%s\n", hash_to_hex(hash));
} else {
struct strbuf buf = STRBUF_INIT;
strbuf_addf(&buf, "%s\t%s\n", report, sha1_to_hex(hash));
strbuf_addf(&buf, "%s\t%s\n", report, hash_to_hex(hash));
write_or_die(1, buf.buf, buf.len);
strbuf_release(&buf);