t: allow testing different hash algorithms via environment
commit02a32dbff7e13c8cf39339e0fb6b331cab02688a
authorbrian m. carlson <sandals@crustytoothpaste.net>
Wed, 29 Jul 2020 23:14:24 +0000 (29 23:14 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Jul 2020 16:16:49 +0000 (30 09:16 -0700)
tree6668286ef00b0a3610a4fd4ddf19a6e8642bfd00
parentceaa4b3ad7f1927fdfa8164e1bfecece4da48329
t: allow testing different hash algorithms via environment

To allow developers to run the testsuite with a different algorithm than
the default, provide an environment variable, GIT_TEST_DEFAULT_HASH, to
specify the algorithm to use. 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.

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