File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1599,7 +1599,16 @@ test_set_hash () {
1599
1599
1600
1600
# Detect the hash algorithm in use.
1601
1601
test_detect_hash () {
1602
- test_hash_algo=" ${GIT_TEST_DEFAULT_HASH:- sha1} "
1602
+ case " $GIT_TEST_DEFAULT_HASH " in
1603
+ " sha256" )
1604
+ test_hash_algo=sha256
1605
+ test_compat_hash_algo=sha1
1606
+ ;;
1607
+ * )
1608
+ test_hash_algo=sha1
1609
+ test_compat_hash_algo=sha256
1610
+ ;;
1611
+ esac
1603
1612
}
1604
1613
1605
1614
# Load common hash metadata and common placeholder object IDs for use with
@@ -1651,6 +1660,12 @@ test_oid () {
1651
1660
local algo=" ${test_hash_algo} " &&
1652
1661
1653
1662
case " $1 " in
1663
+ --hash=storage)
1664
+ algo=" $test_hash_algo " &&
1665
+ shift ;;
1666
+ --hash=compat)
1667
+ algo=" $test_compat_hash_algo " &&
1668
+ shift ;;
1654
1669
--hash=* )
1655
1670
algo=" ${1# --hash=} " &&
1656
1671
shift ;;
You can’t perform that action at this time.
0 commit comments