diff options
-rw-r--r-- | t/test-lib-functions.sh | 4 | ||||
-rw-r--r-- | t/test-lib.sh | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 2608e80f11..2e01bb2c2b 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -1417,9 +1417,7 @@ test_set_hash () { # Detect the hash algorithm in use. test_detect_hash () { - # Currently we only support SHA-1, but in the future this function will - # actually detect the algorithm in use. - test_hash_algo='sha1' + test_hash_algo="${GIT_TEST_DEFAULT_HASH:-sha1}" } # Load common hash metadata and common placeholder object IDs for use with diff --git a/t/test-lib.sh b/t/test-lib.sh index 618a7c8d5b..307bb2207e 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -452,6 +452,9 @@ export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME export EDITOR +GIT_DEFAULT_HASH="${GIT_TEST_DEFAULT_HASH:-sha1}" +export GIT_DEFAULT_HASH + # Tests using GIT_TRACE typically don't want <timestamp> <file>:<line> output GIT_TRACE_BARE=1 export GIT_TRACE_BARE |