summaryrefslogtreecommitdiff
path: root/t/t3204-branch-name-interpretation.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-18 23:44:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-19 23:44:18 (GMT)
commitd6c6b10817409ed93d3c1f65b3d0d2b0875165d4 (patch)
tree5a9990c3ab13c2a91abc705199c79f1ec030690d /t/t3204-branch-name-interpretation.sh
parent883b98efade212bf1496a93dd8a691355a31daf0 (diff)
downloadgit-d6c6b10817409ed93d3c1f65b3d0d2b0875165d4.zip
git-d6c6b10817409ed93d3c1f65b3d0d2b0875165d4.tar.gz
git-d6c6b10817409ed93d3c1f65b3d0d2b0875165d4.tar.bz2
t3[0-3]*: adjust the references to the default branch name "main"
Carefully excluding t3040, which sees independent development elsewhere at the time of writing, we transition above-mentioned tests to the default branch name `main`. This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -- t3[0-3]*.sh t3206/* && git checkout HEAD -- t3040\*) This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for those tests. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3204-branch-name-interpretation.sh')
-rwxr-xr-xt/t3204-branch-name-interpretation.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t3204-branch-name-interpretation.sh b/t/t3204-branch-name-interpretation.sh
index dd315eb..993a6b5 100755
--- a/t/t3204-branch-name-interpretation.sh
+++ b/t/t3204-branch-name-interpretation.sh
@@ -6,7 +6,7 @@ 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=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -31,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
@@ -61,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
@@ -101,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 &&