Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-19 02:44:21 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-20 02:44:18 +0300
commit06d531486e9078c88c324ad6f87376cfa897f058 (patch)
treec3ed8ffad4583e9bd1e717c782dc8b20784f2d91 /t/t1514-rev-parse-push.sh
parentc2fdc8820c306c257a8ff11af3d18e3269a81213 (diff)
t[01]*: adjust the references to the default branch name "main"
Carefully excluding t1309, 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' -e 's/naster/nain/g' -- t[01]*.sh && git checkout HEAD -- t1309\*) Note that t5533 contains a variation of the name `master` (`naster`) that we rename here, too. This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for those tests. Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1514-rev-parse-push.sh')
-rwxr-xr-xt/t1514-rev-parse-push.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/t/t1514-rev-parse-push.sh b/t/t1514-rev-parse-push.sh
index 173ba2792b..d868a08110 100755
--- a/t/t1514-rev-parse-push.sh
+++ b/t/t1514-rev-parse-push.sh
@@ -1,7 +1,7 @@
#!/bin/sh
test_description='test <branch>@{push} syntax'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -19,24 +19,24 @@ test_expect_success 'setup' '
git remote add other other.git &&
test_commit base &&
git push origin HEAD &&
- git branch --set-upstream-to=origin/master master &&
- git branch --track topic origin/master &&
+ git branch --set-upstream-to=origin/main main &&
+ git branch --track topic origin/main &&
git push origin topic &&
git push other topic
'
test_expect_success '@{push} with default=nothing' '
test_config push.default nothing &&
- test_must_fail git rev-parse master@{push} &&
- test_must_fail git rev-parse master@{PUSH} &&
- test_must_fail git rev-parse master@{PuSH}
+ test_must_fail git rev-parse main@{push} &&
+ test_must_fail git rev-parse main@{PUSH} &&
+ test_must_fail git rev-parse main@{PuSH}
'
test_expect_success '@{push} with default=simple' '
test_config push.default simple &&
- resolve master@{push} refs/remotes/origin/master &&
- resolve master@{PUSH} refs/remotes/origin/master &&
- resolve master@{pUSh} refs/remotes/origin/master
+ resolve main@{push} refs/remotes/origin/main &&
+ resolve main@{PUSH} refs/remotes/origin/main &&
+ resolve main@{pUSh} refs/remotes/origin/main
'
test_expect_success 'triangular @{push} fails with default=simple' '