diff mbox series

[21/26] packfile: replace sha1_to_hex

Message ID 20190818200427.870753-22-sandals@crustytoothpaste.net (mailing list archive)
State New, archived
Headers show
Series object_id part 17 | expand

Commit Message

brian m. carlson Aug. 18, 2019, 8:04 p.m. UTC
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>
---
 packfile.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

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;
 }