]> git.ipfire.org Git - thirdparty/git.git/commitdiff
packfile: replace sha1_to_hex
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sun, 18 Aug 2019 20:04:22 +0000 (20:04 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 19 Aug 2019 22:04:59 +0000 (15:04 -0700)
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>
packfile.c

index fc43a6c52c75a32548c20bbc4a5aa7d0cc3ddd0d..52dea88997868a587be6887ad51d38f7194320ab 100644 (file)
 #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;
 }