diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2020-11-18 23:44:21 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-19 15:44:18 -0800 |
commit | 06d531486e9078c88c324ad6f87376cfa897f058 (patch) | |
tree | c3ed8ffad4583e9bd1e717c782dc8b20784f2d91 /t/t1511-rev-parse-caret.sh | |
parent | c2fdc8820c306c257a8ff11af3d18e3269a81213 (diff) | |
download | git-06d531486e9078c88c324ad6f87376cfa897f058.tar.gz |
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/t1511-rev-parse-caret.sh')
-rwxr-xr-x | t/t1511-rev-parse-caret.sh | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/t/t1511-rev-parse-caret.sh b/t/t1511-rev-parse-caret.sh index cfb2ea5e04..6ecfed86bc 100755 --- a/t/t1511-rev-parse-caret.sh +++ b/t/t1511-rev-parse-caret.sh @@ -2,7 +2,7 @@ test_description='tests for ref^{stuff}' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -18,7 +18,7 @@ test_expect_success 'setup' ' git commit -m Initial && git tag -a -m commit commit-tag && git branch ref && - git checkout master && + git checkout main && echo modified >>a-blob && git add -u && git commit -m Modified && @@ -76,52 +76,52 @@ test_expect_success 'ref^{tag}' ' ' test_expect_success 'ref^{/.}' ' - git rev-parse master >expected && - git rev-parse master^{/.} >actual && + git rev-parse main >expected && + git rev-parse main^{/.} >actual && test_cmp expected actual ' test_expect_success 'ref^{/non-existent}' ' - test_must_fail git rev-parse master^{/non-existent} + test_must_fail git rev-parse main^{/non-existent} ' test_expect_success 'ref^{/Initial}' ' git rev-parse ref >expected && - git rev-parse master^{/Initial} >actual && + git rev-parse main^{/Initial} >actual && test_cmp expected actual ' test_expect_success 'ref^{/!Exp}' ' - test_must_fail git rev-parse master^{/!Exp} + test_must_fail git rev-parse main^{/!Exp} ' test_expect_success 'ref^{/!}' ' - test_must_fail git rev-parse master^{/!} + test_must_fail git rev-parse main^{/!} ' test_expect_success 'ref^{/!!Exp}' ' git rev-parse expref >expected && - git rev-parse master^{/!!Exp} >actual && + git rev-parse main^{/!!Exp} >actual && test_cmp expected actual ' test_expect_success 'ref^{/!-}' ' - test_must_fail git rev-parse master^{/!-} + test_must_fail git rev-parse main^{/!-} ' test_expect_success 'ref^{/!-.}' ' - test_must_fail git rev-parse master^{/!-.} + test_must_fail git rev-parse main^{/!-.} ' test_expect_success 'ref^{/!-non-existent}' ' - git rev-parse master >expected && - git rev-parse master^{/!-non-existent} >actual && + git rev-parse main >expected && + git rev-parse main^{/!-non-existent} >actual && test_cmp expected actual ' test_expect_success 'ref^{/!-Changed}' ' git rev-parse expref >expected && - git rev-parse master^{/!-Changed} >actual && + git rev-parse main^{/!-Changed} >actual && test_cmp expected actual ' |