summaryrefslogtreecommitdiff
path: root/t/t2010-checkout-ambiguous.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t2010-checkout-ambiguous.sh')
-rwxr-xr-xt/t2010-checkout-ambiguous.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/t/t2010-checkout-ambiguous.sh b/t/t2010-checkout-ambiguous.sh
index 2e47fe0..82c3bfe 100755
--- a/t/t2010-checkout-ambiguous.sh
+++ b/t/t2010-checkout-ambiguous.sh
@@ -2,6 +2,10 @@
test_description='checkout and pathspecs/refspecs ambiguities'
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
test_expect_success 'setup' '
@@ -17,7 +21,7 @@ test_expect_success 'reference must be a tree' '
'
test_expect_success 'branch switching' '
- test "refs/heads/master" = "$(git symbolic-ref HEAD)" &&
+ test "refs/heads/main" = "$(git symbolic-ref HEAD)" &&
git checkout world -- &&
test "refs/heads/world" = "$(git symbolic-ref HEAD)"
'
@@ -57,9 +61,9 @@ test_expect_success 'disambiguate checking out from a tree-ish' '
'
test_expect_success 'accurate error message with more than one ref' '
- test_must_fail git checkout HEAD master -- 2>actual &&
- test_i18ngrep 2 actual &&
- test_i18ngrep "one reference expected, 2 given" actual
+ test_must_fail git checkout HEAD main -- 2>actual &&
+ test_grep 2 actual &&
+ test_grep "one reference expected, 2 given" actual
'
test_done