t2*: adjust the references to the default branch name "main"

Carefully excluding t2106, 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' -- t2*.sh &&
	   git checkout HEAD -- t2106\*)

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>
diff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh
index 35cef26..96dfca1 100755
--- a/t/t2400-worktree-add.sh
+++ b/t/t2400-worktree-add.sh
@@ -2,7 +2,7 @@
 
 test_description='test git worktree add'
 
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 . ./test-lib.sh
@@ -15,12 +15,12 @@
 
 test_expect_success '"add" an existing worktree' '
 	mkdir -p existing/subtree &&
-	test_must_fail git worktree add --detach existing master
+	test_must_fail git worktree add --detach existing main
 '
 
 test_expect_success '"add" an existing empty worktree' '
 	mkdir existing_empty &&
-	git worktree add --detach existing_empty master
+	git worktree add --detach existing_empty main
 '
 
 test_expect_success '"add" using shorthand - fails when no previous branch' '
@@ -32,7 +32,7 @@
 	echo hello >myworld &&
 	git add myworld &&
 	git commit -m myworld &&
-	git checkout master &&
+	git checkout main &&
 	git worktree add short-hand - &&
 	echo refs/heads/newbranch >expect &&
 	git -C short-hand rev-parse --symbolic-full-name HEAD >actual &&
@@ -40,7 +40,7 @@
 '
 
 test_expect_success '"add" refuses to checkout locked branch' '
-	test_must_fail git worktree add zere master &&
+	test_must_fail git worktree add zere main &&
 	! test -d zere &&
 	! test -d .git/worktrees/zere
 '
@@ -49,13 +49,13 @@
 	(
 	cd existing_empty &&
 	echo dirty >>init.t &&
-	git checkout master -- init.t
+	git checkout main -- init.t
 	)
 '
 
 test_expect_success '"add" worktree' '
 	git rev-parse HEAD >expect &&
-	git worktree add --detach here master &&
+	git worktree add --detach here main &&
 	(
 		cd here &&
 		test_cmp ../init.t init.t &&
@@ -68,7 +68,7 @@
 
 test_expect_success '"add" worktree with lock' '
 	git rev-parse HEAD >expect &&
-	git worktree add --detach --lock here-with-lock master &&
+	git worktree add --detach --lock here-with-lock main &&
 	test -f .git/worktrees/here-with-lock/locked
 '
 
@@ -76,7 +76,7 @@
 	(
 		mkdir sub &&
 		cd sub &&
-		git worktree add --detach here master &&
+		git worktree add --detach here main &&
 		cd here &&
 		test_cmp ../../init.t init.t
 	)
@@ -85,19 +85,19 @@
 test_expect_success '"add" from a linked checkout' '
 	(
 		cd here &&
-		git worktree add --detach nested-here master &&
+		git worktree add --detach nested-here main &&
 		cd nested-here &&
 		git fsck
 	)
 '
 
 test_expect_success '"add" worktree creating new branch' '
-	git worktree add -b newmaster there master &&
+	git worktree add -b newmain there main &&
 	(
 		cd there &&
 		test_cmp ../init.t init.t &&
 		git symbolic-ref HEAD >actual &&
-		echo refs/heads/newmaster >expect &&
+		echo refs/heads/newmain >expect &&
 		test_cmp expect actual &&
 		git fsck
 	)
@@ -106,7 +106,7 @@
 test_expect_success 'die the same branch is already checked out' '
 	(
 		cd here &&
-		test_must_fail git checkout newmaster
+		test_must_fail git checkout newmain
 	)
 '
 
@@ -115,20 +115,20 @@
 	ref=$(git -C there symbolic-ref HEAD) &&
 	rm "$head" &&
 	ln -s "$ref" "$head" &&
-	test_must_fail git -C here checkout newmaster
+	test_must_fail git -C here checkout newmain
 '
 
 test_expect_success 'not die the same branch is already checked out' '
 	(
 		cd here &&
-		git worktree add --force anothernewmaster newmaster
+		git worktree add --force anothernewmain newmain
 	)
 '
 
 test_expect_success 'not die on re-checking out current branch' '
 	(
 		cd there &&
-		git checkout newmaster
+		git checkout newmain
 	)
 '
 
@@ -136,14 +136,14 @@
 	(
 		git clone --bare . bare &&
 		cd bare &&
-		git worktree add -b bare-master ../there2 master
+		git worktree add -b bare-main ../there2 main
 	)
 '
 
 test_expect_success 'checkout from a bare repo without "add"' '
 	(
 		cd bare &&
-		test_must_fail git checkout master
+		test_must_fail git checkout main
 	)
 '
 
@@ -151,7 +151,7 @@
 	(
 		git clone --bare . bare2 &&
 		cd bare2 &&
-		git worktree add ../there3 master
+		git worktree add ../there3 main
 	)
 '
 
@@ -168,7 +168,7 @@
 	EOF
 	git log --format=%s -2 >actual &&
 	test_cmp expected actual &&
-	git worktree add --detach grafted master &&
+	git worktree add --detach grafted main &&
 	git --git-dir=grafted/.git log --format=%s -2 >actual &&
 	test_cmp expected actual
 '
@@ -229,34 +229,34 @@
 '
 
 test_expect_success '"add" -b/-B mutually exclusive' '
-	test_must_fail git worktree add -b poodle -B poodle bamboo master
+	test_must_fail git worktree add -b poodle -B poodle bamboo main
 '
 
 test_expect_success '"add" -b/--detach mutually exclusive' '
-	test_must_fail git worktree add -b poodle --detach bamboo master
+	test_must_fail git worktree add -b poodle --detach bamboo main
 '
 
 test_expect_success '"add" -B/--detach mutually exclusive' '
-	test_must_fail git worktree add -B poodle --detach bamboo master
+	test_must_fail git worktree add -B poodle --detach bamboo main
 '
 
 test_expect_success '"add -B" fails if the branch is checked out' '
-	git rev-parse newmaster >before &&
-	test_must_fail git worktree add -B newmaster bamboo master &&
-	git rev-parse newmaster >after &&
+	git rev-parse newmain >before &&
+	test_must_fail git worktree add -B newmain bamboo main &&
+	git rev-parse newmain >after &&
 	test_cmp before after
 '
 
 test_expect_success 'add -B' '
-	git worktree add -B poodle bamboo2 master^ &&
+	git worktree add -B poodle bamboo2 main^ &&
 	git -C bamboo2 symbolic-ref HEAD >actual &&
 	echo refs/heads/poodle >expected &&
 	test_cmp expected actual &&
-	test_cmp_rev master^ poodle
+	test_cmp_rev main^ poodle
 '
 
 test_expect_success 'add --quiet' '
-	git worktree add --quiet another-worktree master 2>actual &&
+	git worktree add --quiet another-worktree main 2>actual &&
 	test_must_be_empty actual
 '
 
@@ -351,24 +351,24 @@
 
 test_expect_success '--track sets up tracking' '
 	test_when_finished rm -rf track &&
-	git worktree add --track -b track track master &&
-	test_branch_upstream track . master
+	git worktree add --track -b track track main &&
+	test_branch_upstream track . main
 '
 
 # setup remote repository $1 and repository $2 with $1 set up as
-# remote.  The remote has two branches, master and foo.
+# remote.  The remote has two branches, main and foo.
 setup_remote_repo () {
 	git init $1 &&
 	(
 		cd $1 &&
-		test_commit $1_master &&
+		test_commit $1_main &&
 		git checkout -b foo &&
 		test_commit upstream_foo
 	) &&
 	git init $2 &&
 	(
 		cd $2 &&
-		test_commit $2_master &&
+		test_commit $2_main &&
 		git remote add $1 ../$1 &&
 		git config remote.$1.fetch \
 			"refs/heads/*:refs/remotes/$1/*" &&