diff mbox series

[25/26] builtin/show-index: replace sha1_to_hex

Message ID 20190818200427.870753-26-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
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>
---
 builtin/show-index.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/builtin/show-index.c b/builtin/show-index.c
index e95b84e8eb..0826f6a5a2 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;