t7[0-4]*: adjust the references to the default branch name "main"

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

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

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:39 +00:00
committed by Junio C Hamano
parent 5902f5f460
commit 01dc81336d
14 changed files with 169 additions and 169 deletions

View File

@ -9,7 +9,7 @@ This test verifies that "git submodule foreach" correctly visits all submodules
that are currently checked out.
'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@ -280,13 +280,13 @@ sub1sha1_short=$(cd clone3/sub1 && git rev-parse --short HEAD)
sub2sha1_short=$(cd clone3/sub2 && git rev-parse --short HEAD)
cat > expect <<EOF
$nested1sha1 nested1 (heads/master)
$nested2sha1 nested1/nested2 (heads/master)
$nested3sha1 nested1/nested2/nested3 (heads/master)
$submodulesha1 nested1/nested2/nested3/submodule (heads/master)
$nested1sha1 nested1 (heads/main)
$nested2sha1 nested1/nested2 (heads/main)
$nested3sha1 nested1/nested2/nested3 (heads/main)
$submodulesha1 nested1/nested2/nested3/submodule (heads/main)
$sub1sha1 sub1 ($sub1sha1_short)
$sub2sha1 sub2 ($sub2sha1_short)
$sub3sha1 sub3 (heads/master)
$sub3sha1 sub3 (heads/main)
EOF
test_expect_success 'test "status --recursive"' '
@ -298,10 +298,10 @@ test_expect_success 'test "status --recursive"' '
'
cat > expect <<EOF
$nested1sha1 nested1 (heads/master)
$nested1sha1 nested1 (heads/main)
+$nested2sha1 nested1/nested2 (file2~1)
$nested3sha1 nested1/nested2/nested3 (heads/master)
$submodulesha1 nested1/nested2/nested3/submodule (heads/master)
$nested3sha1 nested1/nested2/nested3 (heads/main)
$submodulesha1 nested1/nested2/nested3/submodule (heads/main)
EOF
test_expect_success 'ensure "status --cached --recursive" preserves the --cached flag' '
@ -319,13 +319,13 @@ test_expect_success 'ensure "status --cached --recursive" preserves the --cached
nested2sha1=$(git -C clone3/nested1/nested2 rev-parse HEAD)
cat > expect <<EOF
$nested1sha1 ../nested1 (heads/master)
$nested1sha1 ../nested1 (heads/main)
+$nested2sha1 ../nested1/nested2 (file2)
$nested3sha1 ../nested1/nested2/nested3 (heads/master)
$submodulesha1 ../nested1/nested2/nested3/submodule (heads/master)
$nested3sha1 ../nested1/nested2/nested3 (heads/main)
$submodulesha1 ../nested1/nested2/nested3/submodule (heads/main)
$sub1sha1 ../sub1 ($sub1sha1_short)
$sub2sha1 ../sub2 ($sub2sha1_short)
$sub3sha1 ../sub3 (heads/master)
$sub3sha1 ../sub3 (heads/main)
EOF
test_expect_success 'test "status --recursive" from sub directory' '