packfile: replace sha1_to_hex

Replace a use of sha1_to_hex with hash_to_hex so that this code works with a hash algorithm other than SHA-1. 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 3a4d7aa5aeeeb6c0b3d92cbaee0d32c2c956c72b
1 file changed +2 -2
packfile.c
+2 -2
@@ -19,12 +19,12 @@
19 #include "commit-graph.h"
20
21 char *odb_pack_name(struct strbuf *buf,
22 - const unsigned char *sha1,
22 + const unsigned char *hash,
23 const char *ext)
24 {
25 strbuf_reset(buf);
26 strbuf_addf(buf, "%s/pack/pack-%s.%s", get_object_directory(),
27 - sha1_to_hex(sha1), ext);
27 + hash_to_hex(hash), ext);
28 return buf->buf;
29 }
30