summaryrefslogtreecommitdiff
path: root/t/t3204-branch-name-interpretation.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3204-branch-name-interpretation.sh')
-rwxr-xr-xt/t3204-branch-name-interpretation.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/t/t3204-branch-name-interpretation.sh b/t/t3204-branch-name-interpretation.sh
index 698d9cc4f3..993a6b5eff 100755
--- a/t/t3204-branch-name-interpretation.sh
+++ b/t/t3204-branch-name-interpretation.sh
@@ -6,6 +6,9 @@ Branch name arguments are usually names which are taken to be inside of
refs/heads/, but we interpret some magic syntax like @{-1}, @{upstream}, etc.
This script aims to check the behavior of those corner cases.
'
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
. ./test-lib.sh
expect_branch() {
@@ -28,7 +31,7 @@ test_expect_success 'update branch via @{-1}' '
git branch previous one &&
git checkout previous &&
- git checkout master &&
+ git checkout main &&
git branch -f @{-1} two &&
expect_branch previous two
@@ -58,7 +61,7 @@ test_expect_success 'delete branch via @{-1}' '
git branch previous-del &&
git checkout previous-del &&
- git checkout master &&
+ git checkout main &&
git branch -D @{-1} &&
expect_deleted previous-del
@@ -98,7 +101,7 @@ test_expect_success 'disallow deleting remote branch via @{-1}' '
git update-ref refs/remotes/origin/previous one &&
git checkout -b origin/previous two &&
- git checkout master &&
+ git checkout main &&
test_must_fail git branch -r -D @{-1} &&
expect_branch refs/remotes/origin/previous one &&