summaryrefslogtreecommitdiff
path: root/builtin/index-pack.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2019-08-18 20:04:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-08-19 22:04:59 (GMT)
commit69fa3370604e4410d845ff146ef86f8368e1ca79 (patch)
tree1d56f1a8ce07217a99d1843a1cb7a6c82b002f93 /builtin/index-pack.c
parent3a4d7aa5aeeeb6c0b3d92cbaee0d32c2c956c72b (diff)
downloadgit-69fa3370604e4410d845ff146ef86f8368e1ca79.zip
git-69fa3370604e4410d845ff146ef86f8368e1ca79.tar.gz
git-69fa3370604e4410d845ff146ef86f8368e1ca79.tar.bz2
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>
Diffstat (limited to 'builtin/index-pack.c')
-rw-r--r--builtin/index-pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 0d55f73..2abd550 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -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);