t/oid-info: allow looking up hash algorithm name
authorbrian m. carlson <redacted>
Sat, 5 Oct 2019 21:11:55 +0000 (21:11 +0000)
committerJunio C Hamano <redacted>
Sun, 6 Oct 2019 02:45:29 +0000 (11:45 +0900)
commitecde49bb8aa6e5d48e96988cf7f7d5a949893980
treed9e870020ba75e01445445f289ff2e3389cd3521
parentbc12974a897308fd3254cf0cc90319078fe45eea
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/oid-info/hash-info
git clone https://git.99rst.org/PROJECT