]> git.ipfire.org Git - thirdparty/git.git/commitdiff
builtin/index-pack: replace sha1_to_hex
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sun, 18 Aug 2019 20:04:23 +0000 (20:04 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 19 Aug 2019 22:04:59 +0000 (15:04 -0700)
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>
builtin/index-pack.c

index 0d55f73b0b443b60dccc31096675d40691b3eb56..2abd550ce2e5cdd90bb73c37230e5ae558e3d7ef 100644 (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);