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>
This commit is contained in:
parent
e0cb7cdb89
commit
3a4d7aa5ae
@ -19,12 +19,12 @@
|
||||
#include "commit-graph.h"
|
||||
|
||||
char *odb_pack_name(struct strbuf *buf,
|
||||
const unsigned char *sha1,
|
||||
const unsigned char *hash,
|
||||
const char *ext)
|
||||
{
|
||||
strbuf_reset(buf);
|
||||
strbuf_addf(buf, "%s/pack/pack-%s.%s", get_object_directory(),
|
||||
sha1_to_hex(sha1), ext);
|
||||
hash_to_hex(hash), ext);
|
||||
return buf->buf;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user