summaryrefslogtreecommitdiffstats
path: root/t/t2027-checkout-track.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-19 00:44:22 +0100
committerJunio C Hamano <gitster@pobox.com>2020-11-20 00:44:18 +0100
commit883b98efade212bf1496a93dd8a691355a31daf0 (patch)
tree5a9c67eb117e5840725328bbfae9714d3b8e5eb0 /t/t2027-checkout-track.sh
parentt[01]*: adjust the references to the default branch name "main" (diff)
downloadgit-883b98efade212bf1496a93dd8a691355a31daf0.tar.xz
git-883b98efade212bf1496a93dd8a691355a31daf0.zip
t2*: adjust the references to the default branch name "main"
Carefully excluding t2106, 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' -- t2*.sh && git checkout HEAD -- t2106\*) 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/t2027-checkout-track.sh')
-rwxr-xr-xt/t2027-checkout-track.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t2027-checkout-track.sh b/t/t2027-checkout-track.sh
index 4e1419ca98..4453741b96 100755
--- a/t/t2027-checkout-track.sh
+++ b/t/t2027-checkout-track.sh
@@ -2,7 +2,7 @@
test_description='tests for git branch --track'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -13,14 +13,14 @@ test_expect_success 'setup' '
'
test_expect_success 'checkout --track -b creates a new tracking branch' '
- git checkout --track -b branch1 master &&
+ git checkout --track -b branch1 main &&
test $(git rev-parse --abbrev-ref HEAD) = branch1 &&
test $(git config --get branch.branch1.remote) = . &&
- test $(git config --get branch.branch1.merge) = refs/heads/master
+ test $(git config --get branch.branch1.merge) = refs/heads/main
'
test_expect_success 'checkout --track -b rejects an extra path argument' '
- test_must_fail git checkout --track -b branch2 master one.t 2>err &&
+ test_must_fail git checkout --track -b branch2 main one.t 2>err &&
test_i18ngrep "cannot be used with updating paths" err
'