diff options
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r-- | t/test-lib-functions.sh | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index b5eaf7fdc1..2eccf100c0 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -1263,9 +1263,8 @@ test_cmp_bin () { cmp "$@" } -# Deprecated - do not use this in new code test_i18ngrep () { - test_grep "$@" + BUG "do not use test_i18ngrep---use test_grep instead" } test_grep () { @@ -1656,7 +1655,16 @@ test_set_hash () { # Detect the hash algorithm in use. test_detect_hash () { - test_hash_algo="${GIT_TEST_DEFAULT_HASH:-sha1}" + case "$GIT_TEST_DEFAULT_HASH" in + "sha256") + test_hash_algo=sha256 + test_compat_hash_algo=sha1 + ;; + *) + test_hash_algo=sha1 + test_compat_hash_algo=sha256 + ;; + esac } # Detect the hash algorithm in use. @@ -1713,6 +1721,12 @@ test_oid () { local algo="${test_hash_algo}" && case "$1" in + --hash=storage) + algo="$test_hash_algo" && + shift;; + --hash=compat) + algo="$test_compat_hash_algo" && + shift;; --hash=*) algo="${1#--hash=}" && shift;; |