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>
maint
brian m. carlson 2019-08-18 20:04:22 +00:00 committed by Junio C Hamano
parent e0cb7cdb89
commit 3a4d7aa5ae
1 changed files with 2 additions and 2 deletions

View File

@ -19,12 +19,12 @@
#include "commit-graph.h" #include "commit-graph.h"


char *odb_pack_name(struct strbuf *buf, char *odb_pack_name(struct strbuf *buf,
const unsigned char *sha1, const unsigned char *hash,
const char *ext) const char *ext)
{ {
strbuf_reset(buf); strbuf_reset(buf);
strbuf_addf(buf, "%s/pack/pack-%s.%s", get_object_directory(), strbuf_addf(buf, "%s/pack/pack-%s.%s", get_object_directory(),
sha1_to_hex(sha1), ext); hash_to_hex(hash), ext);
return buf->buf; return buf->buf;
} }