]> git.ipfire.org Git - thirdparty/git.git/commit - t/test-lib.sh
t: use hash-specific lookup tables to define test constants
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sat, 22 Feb 2020 20:17:31 +0000 (20:17 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Feb 2020 17:33:24 +0000 (09:33 -0800)
commit192b517589fc927af6b01914c67cb6d1973a1c29
tree50211f084b6630c20c0d5ece7ce63582ee677be4
parent94127599252d85e85571ecde740ea97e59e4bede
t: use hash-specific lookup tables to define test constants

In the future, we'll allow developers to run the testsuite with a hash
algorithm of their choice.  To make this easier, compute the fixed
constants using test_oid. Move the constant initialization down below
the point where test-lib-functions.sh is loaded so the functions are
defined.

Note that we don't provide a value for the OID_REGEX value directly
because writing a large number of instances of "[0-9a-f]" in the
oid-info files is unwieldy and there isn't a way to compute it based on
those values. Instead, compute it based on ZERO_OID.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh