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>
brian m. carlson committed
Aug 18, 2019 at 20:04 UTC
69fa3370604e4410d845ff146ef86f8368e1ca79
1 file changed
+2
-2
builtin/index-pack.c
+2
-2
@@ -1490,11 +1490,11 @@ static void final(const char *final_pack_name, const char *curr_pack_name,
1490
}
1491
1492
if (!from_stdin) {
1493
- printf("%s\n", sha1_to_hex(hash));
1493
+ printf("%s\n", hash_to_hex(hash));
1494
} else {
1495
struct strbuf buf = STRBUF_INIT;
1496
1497
- strbuf_addf(&buf, "%s\t%s\n", report, sha1_to_hex(hash));
1497
+ strbuf_addf(&buf, "%s\t%s\n", report, hash_to_hex(hash));
1498
write_or_die(1, buf.buf, buf.len);
1499
strbuf_release(&buf);
1500