Skip to content

Commit ecde49b

Browse files
bk2204gitster
authored andcommitted
t/oid-info: allow looking up hash algorithm name
The test_oid function provides a mechanism for looking up hash algorithm information, but it doesn't specify a way to discover the hash algorithm name. Knowing this information is useful if one wants to invoke the test-tool helper for the algorithm in use, such as in our pack generation library. While it's currently possible to inspect the global variable holding this value, in the future we'll allow specifying an algorithm for storage and an algorithm for display, so it's better to abstract this value away. To assist with this, provide a named entry in the algorithm-specific lookup table that prints the algorithm in use. Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bc12974 commit ecde49b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

t/oid-info/hash-info

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ hexsz sha256:64
66

77
zero sha1:0000000000000000000000000000000000000000
88
zero sha256:0000000000000000000000000000000000000000000000000000000000000000
9+
10+
algo sha1:sha1
11+
algo sha256:sha256

0 commit comments

Comments
 (0)