summaryrefslogtreecommitdiff
path: root/t/t1403-show-ref.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-18 23:44:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-19 23:44:18 (GMT)
commit06d531486e9078c88c324ad6f87376cfa897f058 (patch)
treec3ed8ffad4583e9bd1e717c782dc8b20784f2d91 /t/t1403-show-ref.sh
parentc2fdc8820c306c257a8ff11af3d18e3269a81213 (diff)
downloadgit-06d531486e9078c88c324ad6f87376cfa897f058.zip
git-06d531486e9078c88c324ad6f87376cfa897f058.tar.gz
git-06d531486e9078c88c324ad6f87376cfa897f058.tar.bz2
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/t1403-show-ref.sh')
-rwxr-xr-xt/t1403-show-ref.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/t/t1403-show-ref.sh b/t/t1403-show-ref.sh
index aaf32f3..6ce62f8 100755
--- a/t/t1403-show-ref.sh
+++ b/t/t1403-show-ref.sh
@@ -1,7 +1,7 @@
#!/bin/sh
test_description='show-ref'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -12,7 +12,7 @@ test_expect_success setup '
git checkout -b side &&
test_commit B &&
git tag -f -a -m "annotated B" B &&
- git checkout master &&
+ git checkout main &&
test_commit C &&
git branch B A^0
'
@@ -95,23 +95,23 @@ test_expect_success 'show-ref -d' '
git show-ref --verify -d refs/tags/A refs/tags/C >actual &&
test_cmp expect actual &&
- echo $(git rev-parse refs/heads/master) refs/heads/master >expect &&
- git show-ref -d master >actual &&
+ echo $(git rev-parse refs/heads/main) refs/heads/main >expect &&
+ git show-ref -d main >actual &&
test_cmp expect actual &&
- git show-ref -d heads/master >actual &&
+ git show-ref -d heads/main >actual &&
test_cmp expect actual &&
- git show-ref -d refs/heads/master >actual &&
+ git show-ref -d refs/heads/main >actual &&
test_cmp expect actual &&
- git show-ref -d --verify refs/heads/master >actual &&
+ git show-ref -d --verify refs/heads/main >actual &&
test_cmp expect actual &&
- test_must_fail git show-ref -d --verify master >actual &&
+ test_must_fail git show-ref -d --verify main >actual &&
test_must_be_empty actual &&
- test_must_fail git show-ref -d --verify heads/master >actual &&
+ test_must_fail git show-ref -d --verify heads/main >actual &&
test_must_be_empty actual &&
test_must_fail git show-ref --verify -d A C >actual &&
@@ -123,7 +123,7 @@ test_expect_success 'show-ref -d' '
'
test_expect_success 'show-ref --heads, --tags, --head, pattern' '
- for branch in B master side
+ for branch in B main side
do
echo $(git rev-parse refs/heads/$branch) refs/heads/$branch
done >expect.heads &&