Skip to content

Commit be8e172

Browse files
bk2204gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3f34d70 commit be8e172

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/show-index.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ int cmd_show_index(int argc, const char **argv, const char *prefix)
4242
if (fread(entry, 4 + hashsz, 1, stdin) != 1)
4343
die("unable to read entry %u/%u", i, nr);
4444
offset = ntohl(entry[0]);
45-
printf("%u %s\n", offset, sha1_to_hex((void *)(entry+1)));
45+
printf("%u %s\n", offset, hash_to_hex((void *)(entry+1)));
4646
}
4747
} else {
4848
unsigned off64_nr = 0;

0 commit comments

Comments
 (0)