summaryrefslogtreecommitdiff
path: root/t/oid-info
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2019-10-05 21:11:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-10-06 02:45:29 (GMT)
commitecde49bb8aa6e5d48e96988cf7f7d5a949893980 (patch)
treed9e870020ba75e01445445f289ff2e3389cd3521 /t/oid-info
parentbc12974a897308fd3254cf0cc90319078fe45eea (diff)
downloadgit-ecde49bb8aa6e5d48e96988cf7f7d5a949893980.zip
git-ecde49bb8aa6e5d48e96988cf7f7d5a949893980.tar.gz
git-ecde49bb8aa6e5d48e96988cf7f7d5a949893980.tar.bz2
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 <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/oid-info')
-rw-r--r--t/oid-info/hash-info3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/oid-info/hash-info b/t/oid-info/hash-info
index ccdbfdf..6b5ded0 100644
--- a/t/oid-info/hash-info
+++ b/t/oid-info/hash-info
@@ -6,3 +6,6 @@ hexsz sha256:64
zero sha1:0000000000000000000000000000000000000000
zero sha256:0000000000000000000000000000000000000000000000000000000000000000
+
+algo sha1:sha1
+algo sha256:sha256