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/t1413-reflog-detach.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/t1413-reflog-detach.sh')
-rwxr-xr-xt/t1413-reflog-detach.sh26
1 files changed, 13 insertions, 13 deletions
diff --git a/t/t1413-reflog-detach.sh b/t/t1413-reflog-detach.sh
index 140914aa29..bde05208ae 100755
--- a/t/t1413-reflog-detach.sh
+++ b/t/t1413-reflog-detach.sh
@@ -1,13 +1,13 @@
#!/bin/sh
test_description='Test reflog interaction with detached HEAD'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
reset_state () {
- git checkout master &&
+ git checkout main &&
cp saved_reflog .git/logs/HEAD
}
@@ -22,14 +22,14 @@ test_expect_success setup '
test_expect_success baseline '
reset_state &&
- git rev-parse master master^ >expect &&
+ git rev-parse main main^ >expect &&
git log -g --format=%H >actual &&
test_cmp expect actual
'
test_expect_success 'switch to branch' '
reset_state &&
- git rev-parse side master master^ >expect &&
+ git rev-parse side main main^ >expect &&
git checkout side &&
git log -g --format=%H >actual &&
test_cmp expect actual
@@ -37,34 +37,34 @@ test_expect_success 'switch to branch' '
test_expect_success 'detach to other' '
reset_state &&
- git rev-parse master side master master^ >expect &&
+ git rev-parse main side main main^ >expect &&
git checkout side &&
- git checkout master^0 &&
+ git checkout main^0 &&
git log -g --format=%H >actual &&
test_cmp expect actual
'
test_expect_success 'detach to self' '
reset_state &&
- git rev-parse master master master^ >expect &&
- git checkout master^0 &&
+ git rev-parse main main main^ >expect &&
+ git checkout main^0 &&
git log -g --format=%H >actual &&
test_cmp expect actual
'
test_expect_success 'attach to self' '
reset_state &&
- git rev-parse master master master master^ >expect &&
- git checkout master^0 &&
- git checkout master &&
+ git rev-parse main main main main^ >expect &&
+ git checkout main^0 &&
+ git checkout main &&
git log -g --format=%H >actual &&
test_cmp expect actual
'
test_expect_success 'attach to other' '
reset_state &&
- git rev-parse side master master master^ >expect &&
- git checkout master^0 &&
+ git rev-parse side main main main^ >expect &&
+ git checkout main^0 &&
git checkout side &&
git log -g --format=%H >actual &&
test_cmp expect actual