t6[0-3]*: adjust the references to the default branch name "main"

Carefully excluding t6300, which sees independent development elsewhere
at the time of writing, we use `main` as the default branch name in
t6[0-3]*. This trick was performed via

	$ (cd t &&
	   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \
		-e 's/Master/Main/g' -- t6[0-3]*.sh &&
	   git checkout HEAD -- t6300\*)

This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`
for those tests.

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:36 +00:00
committed by Junio C Hamano
parent 95cf2c0187
commit 1550bb6ed0
23 changed files with 194 additions and 194 deletions

View File

@ -2,7 +2,7 @@
test_description='rev-list/rev-parse --glob'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@ -23,22 +23,22 @@ compare () {
test_expect_success 'setup' '
commit master &&
git checkout -b subspace/one master &&
commit main &&
git checkout -b subspace/one main &&
commit one &&
git checkout -b subspace/two master &&
git checkout -b subspace/two main &&
commit two &&
git checkout -b subspace-x master &&
git checkout -b subspace-x main &&
commit subspace-x &&
git checkout -b other/three master &&
git checkout -b other/three main &&
commit three &&
git checkout -b someref master &&
git checkout -b someref main &&
commit some &&
git checkout master &&
git checkout main &&
commit topic_2 &&
git tag foo/bar master &&
git tag foo/bar main &&
commit topic_3 &&
git update-ref refs/remotes/foo/baz master &&
git update-ref refs/remotes/foo/baz main &&
commit topic_4 &&
git update-ref refs/remotes/upstream/one subspace/one &&
git update-ref refs/remotes/upstream/two subspace/two &&
@ -86,7 +86,7 @@ test_expect_failure 'rev-parse accepts --glob as detached option' '
test_expect_failure 'rev-parse is not confused by option-like glob' '
compare rev-parse "master" "--glob --symbolic master"
compare rev-parse "main" "--glob --symbolic main"
'
@ -114,15 +114,15 @@ test_expect_success 'rev-parse --glob=heads/subspace/* --glob=heads/other/*' '
'
test_expect_success 'rev-parse --glob=heads/someref/* master' '
test_expect_success 'rev-parse --glob=heads/someref/* main' '
compare rev-parse "master" "--glob=heads/someref/* master"
compare rev-parse "main" "--glob=heads/someref/* main"
'
test_expect_success 'rev-parse --glob=heads/*' '
compare rev-parse "master other/three someref subspace-x subspace/one subspace/two" "--glob=heads/*"
compare rev-parse "main other/three someref subspace-x subspace/one subspace/two" "--glob=heads/*"
'
@ -139,7 +139,7 @@ test_expect_success 'rev-parse --remotes=foo' '
'
test_expect_success 'rev-parse --exclude with --branches' '
compare rev-parse "--exclude=*/* --branches" "master someref subspace-x"
compare rev-parse "--exclude=*/* --branches" "main someref subspace-x"
'
test_expect_success 'rev-parse --exclude with --all' '
@ -224,7 +224,7 @@ test_expect_success 'rev-list --glob refs/heads/subspace/*' '
test_expect_success 'rev-list not confused by option-like --glob arg' '
compare rev-list "master" "--glob -0 master"
compare rev-list "main" "--glob -0 main"
'
@ -272,13 +272,13 @@ test_expect_success 'rev-list --branches=subspace' '
test_expect_success 'rev-list --branches' '
compare rev-list "master subspace-x someref other/three subspace/one subspace/two" "--branches"
compare rev-list "main subspace-x someref other/three subspace/one subspace/two" "--branches"
'
test_expect_success 'rev-list --glob=heads/someref/* master' '
test_expect_success 'rev-list --glob=heads/someref/* main' '
compare rev-list "master" "--glob=heads/someref/* master"
compare rev-list "main" "--glob=heads/someref/* main"
'
@ -290,7 +290,7 @@ test_expect_success 'rev-list --glob=heads/subspace/* --glob=heads/other/*' '
test_expect_success 'rev-list --glob=heads/*' '
compare rev-list "master other/three someref subspace-x subspace/one subspace/two" "--glob=heads/*"
compare rev-list "main other/three someref subspace-x subspace/one subspace/two" "--glob=heads/*"
'
@ -313,7 +313,7 @@ test_expect_success 'rev-list --remotes=foo' '
'
test_expect_success 'rev-list --exclude with --branches' '
compare rev-list "--exclude=*/* --branches" "master someref subspace-x"
compare rev-list "--exclude=*/* --branches" "main someref subspace-x"
'
test_expect_success 'rev-list --exclude with --all' '
@ -357,13 +357,13 @@ test_expect_success 'shortlog accepts --glob/--tags/--remotes' '
compare shortlog "subspace/one subspace/two" --branches=subspace &&
compare shortlog \
"master subspace-x someref other/three subspace/one subspace/two" \
"main subspace-x someref other/three subspace/one subspace/two" \
--branches &&
compare shortlog master "--glob=heads/someref/* master" &&
compare shortlog main "--glob=heads/someref/* main" &&
compare shortlog "subspace/one subspace/two other/three" \
"--glob=heads/subspace/* --glob=heads/other/*" &&
compare shortlog \
"master other/three someref subspace-x subspace/one subspace/two" \
"main other/three someref subspace-x subspace/one subspace/two" \
"--glob=heads/*" &&
compare shortlog foo/bar --tags=foo &&
compare shortlog "foo/bar qux/one qux/two qux/x" --tags &&
@ -374,14 +374,14 @@ test_expect_success 'shortlog accepts --glob/--tags/--remotes' '
test_expect_failure 'shortlog accepts --glob as detached option' '
compare shortlog \
"master other/three someref subspace-x subspace/one subspace/two" \
"main other/three someref subspace-x subspace/one subspace/two" \
"--glob heads/*"
'
test_expect_failure 'shortlog --glob is not confused by option-like argument' '
compare shortlog master "--glob -e master"
compare shortlog main "--glob -e main"
'