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>
This commit is contained in:
Johannes Schindelin
2020-11-18 23:44:21 +00:00
committed by Junio C Hamano
parent c2fdc8820c
commit 06d531486e
44 changed files with 394 additions and 394 deletions

View File

@ -2,7 +2,7 @@
test_description='Test commands behavior when given invalid argument value'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@ -44,8 +44,8 @@ test_expect_success 'tag usage error' '
'
test_expect_success 'branch --contains <existent_commit>' '
git branch --contains "master" >actual 2>actual.err &&
test_i18ngrep "master" actual &&
git branch --contains "main" >actual 2>actual.err &&
test_i18ngrep "main" actual &&
test_line_count = 0 actual.err
'
@ -57,7 +57,7 @@ test_expect_success 'branch --contains <inexistent_commit>' '
'
test_expect_success 'branch --no-contains <existent_commit>' '
git branch --no-contains "master" >actual 2>actual.err &&
git branch --no-contains "main" >actual 2>actual.err &&
test_line_count = 0 actual &&
test_line_count = 0 actual.err
'
@ -76,7 +76,7 @@ test_expect_success 'branch usage error' '
'
test_expect_success 'for-each-ref --contains <existent_object>' '
git for-each-ref --contains "master" >actual 2>actual.err &&
git for-each-ref --contains "main" >actual 2>actual.err &&
test_line_count = 2 actual &&
test_line_count = 0 actual.err
'
@ -89,7 +89,7 @@ test_expect_success 'for-each-ref --contains <inexistent_object>' '
'
test_expect_success 'for-each-ref --no-contains <existent_object>' '
git for-each-ref --no-contains "master" >actual 2>actual.err &&
git for-each-ref --no-contains "main" >actual 2>actual.err &&
test_line_count = 0 actual &&
test_line_count = 0 actual.err
'