Skip to content

Commit

Permalink
t/oid-info: allow looking up hash algorithm name
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
bk2204 authored and gitster committed Oct 6, 2019
1 parent bc12974 commit ecde49b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions t/oid-info/hash-info
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ hexsz sha256:64

zero sha1:0000000000000000000000000000000000000000
zero sha256:0000000000000000000000000000000000000000000000000000000000000000

algo sha1:sha1
algo sha256:sha256

0 comments on commit ecde49b

Please sign in to comment.