summaryrefslogtreecommitdiffstats
path: root/packfile.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2019-08-18 22:04:22 +0200
committerJunio C Hamano <gitster@pobox.com>2019-08-20 00:04:59 +0200
commit3a4d7aa5aeeeb6c0b3d92cbaee0d32c2c956c72b (patch)
treea41b0b30d8ed7919995732cb7970eca004455aed /packfile.c
parentwt-status: convert struct wt_status to object_id (diff)
downloadgit-3a4d7aa5aeeeb6c0b3d92cbaee0d32c2c956c72b.tar.xz
git-3a4d7aa5aeeeb6c0b3d92cbaee0d32c2c956c72b.zip
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>
Diffstat (limited to 'packfile.c')
-rw-r--r--packfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packfile.c b/packfile.c
index fc43a6c52c..52dea88997 100644
--- a/packfile.c
+++ b/packfile.c
@@ -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;
}