t5[6-9]*: adjust the references 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' -- t5[6-9]*.sh)

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:35 +00:00
committed by Junio C Hamano
parent 028cb644ec
commit 95cf2c0187
18 changed files with 186 additions and 186 deletions

View File

@ -8,7 +8,7 @@ TEST_NO_CREATE_REPO=1
GIT_TEST_PROTOCOL_VERSION=0
export GIT_TEST_PROTOCOL_VERSION
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,7 +44,7 @@ test_expect_success 'fetch with git:// using protocol v1' '
GIT_TRACE_PACKET=1 git -C daemon_child -c protocol.version=1 \
fetch 2>log &&
git -C daemon_child log -1 --format=%s origin/master >actual &&
git -C daemon_child log -1 --format=%s origin/main >actual &&
git -C "$daemon_parent" log -1 --format=%s >expect &&
test_cmp expect actual &&
@ -72,7 +72,7 @@ test_expect_success 'push with git:// using protocol v1' '
test_commit -C daemon_child three &&
# Push to another branch, as the target repository has the
# master branch checked out and we cannot push into it.
# main branch checked out and we cannot push into it.
GIT_TRACE_PACKET=1 git -C daemon_child -c protocol.version=1 \
push origin HEAD:client_branch 2>log &&
@ -113,7 +113,7 @@ test_expect_success 'fetch with file:// using protocol v1' '
GIT_TRACE_PACKET=1 git -C file_child -c protocol.version=1 \
fetch 2>log &&
git -C file_child log -1 --format=%s origin/master >actual &&
git -C file_child log -1 --format=%s origin/main >actual &&
git -C file_parent log -1 --format=%s >expect &&
test_cmp expect actual &&
@ -137,7 +137,7 @@ test_expect_success 'push with file:// using protocol v1' '
test_commit -C file_child three &&
# Push to another branch, as the target repository has the
# master branch checked out and we cannot push into it.
# main branch checked out and we cannot push into it.
GIT_TRACE_PACKET=1 git -C file_child -c protocol.version=1 \
push origin HEAD:client_branch 2>log &&
@ -191,7 +191,7 @@ test_expect_success 'fetch with ssh:// using protocol v1' '
fetch 2>log &&
expect_ssh git-upload-pack &&
git -C ssh_child log -1 --format=%s origin/master >actual &&
git -C ssh_child log -1 --format=%s origin/main >actual &&
git -C ssh_parent log -1 --format=%s >expect &&
test_cmp expect actual &&
@ -216,7 +216,7 @@ test_expect_success 'push with ssh:// using protocol v1' '
test_commit -C ssh_child three &&
# Push to another branch, as the target repository has the
# master branch checked out and we cannot push into it.
# main branch checked out and we cannot push into it.
GIT_TRACE_PACKET=1 git -C ssh_child -c protocol.version=1 \
push origin HEAD:client_branch 2>log &&
expect_ssh git-receive-pack &&
@ -260,7 +260,7 @@ test_expect_success 'fetch with http:// using protocol v1' '
GIT_TRACE_PACKET=1 git -C http_child -c protocol.version=1 \
fetch 2>log &&
git -C http_child log -1 --format=%s origin/master >actual &&
git -C http_child log -1 --format=%s origin/main >actual &&
git -C "$HTTPD_DOCUMENT_ROOT_PATH/http_parent" log -1 --format=%s >expect &&
test_cmp expect actual &&
@ -284,7 +284,7 @@ test_expect_success 'push with http:// using protocol v1' '
test_commit -C http_child three &&
# Push to another branch, as the target repository has the
# master branch checked out and we cannot push into it.
# main branch checked out and we cannot push into it.
GIT_TRACE_PACKET=1 git -C http_child -c protocol.version=1 \
push origin HEAD:client_branch && #2>log &&