summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2019-08-18 20:04:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-08-19 22:04:59 (GMT)
commitbe8e172e9f4f62c9e4cdbecb5cd667775f38d4f1 (patch)
tree411fac23344cd619dd87b8dbdfa9c8a832f28fc6
parent3f34d70d4029c420d0db82fc39e77da4470eb3cc (diff)
downloadgit-be8e172e9f4f62c9e4cdbecb5cd667775f38d4f1.zip
git-be8e172e9f4f62c9e4cdbecb5cd667775f38d4f1.tar.gz
git-be8e172e9f4f62c9e4cdbecb5cd667775f38d4f1.tar.bz2
builtin/show-index: replace sha1_to_hex
In this code path, we use sha1_to_hex to display the contents of a v1 pack index. While we plan to switch to v3 indices for SHA-256, the v1 pack indices still function, so to support both algorithms, switch sha1_to_hex to hash_to_hex. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/show-index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/show-index.c b/builtin/show-index.c
index e95b84e..0826f6a 100644
--- a/builtin/show-index.c
+++ b/builtin/show-index.c
@@ -42,7 +42,7 @@ int cmd_show_index(int argc, const char **argv, const char *prefix)
if (fread(entry, 4 + hashsz, 1, stdin) != 1)
die("unable to read entry %u/%u", i, nr);
offset = ntohl(entry[0]);
- printf("%u %s\n", offset, sha1_to_hex((void *)(entry+1)));
+ printf("%u %s\n", offset, hash_to_hex((void *)(entry+1)));
}
} else {
unsigned off64_nr = 0;