summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2020-11-18 23:44:26 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-11-19 15:44:18 -0800
commitcbc75a12f056c9e6eef30b92db2dc0ce99e97dbe (patch)
tree71ea1a1a5a1999a8e9c80b9e65a8d3f2c0cfbce1 /t
parentt34*: adjust the references to the default branch name "main" (diff)
downloadtgif-cbc75a12f056c9e6eef30b92db2dc0ce99e97dbe.tar.xz
t3[5-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' -- t3[5-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>
Diffstat (limited to 't')
-rwxr-xr-xt/t3500-cherry.sh14
-rwxr-xr-xt/t3501-revert-cherry-pick.sh6
-rwxr-xr-xt/t3502-cherry-pick-merge.sh4
-rwxr-xr-xt/t3503-cherry-pick-root.sh12
-rwxr-xr-xt/t3504-cherry-pick-rerere.sh26
-rwxr-xr-xt/t3505-cherry-pick-empty.sh26
-rwxr-xr-xt/t3506-cherry-pick-ff.sh10
-rwxr-xr-xt/t3507-cherry-pick-conflict.sh4
-rwxr-xr-xt/t3508-cherry-pick-many-commits.sh40
-rwxr-xr-xt/t3509-cherry-pick-merge-df.sh4
-rwxr-xr-xt/t3512-cherry-pick-submodule.sh4
-rwxr-xr-xt/t3600-rm.sh12
-rwxr-xr-xt/t3701-add-interactive.sh6
-rwxr-xr-xt/t3901-i18n-patch.sh42
-rwxr-xr-xt/t3903-stash.sh34
-rwxr-xr-xt/t3910-mac-os-precompose.sh8
16 files changed, 126 insertions, 126 deletions
diff --git a/t/t3500-cherry.sh b/t/t3500-cherry.sh
index 99905dd49a..0458a58b4b 100755
--- a/t/t3500-cherry.sh
+++ b/t/t3500-cherry.sh
@@ -5,10 +5,10 @@
test_description='git cherry should detect patches integrated upstream
-This test cherry-picks one local change of two into master branch, and
+This test cherry-picks one local change of two into main branch, and
checks that git cherry only returns the second patch in the local branch
'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -35,7 +35,7 @@ test_expect_success \
test_tick &&
git commit -m "Add C." &&
- git checkout -f master &&
+ git checkout -f main &&
rm -f B C &&
echo Third >> A &&
@@ -43,19 +43,19 @@ test_expect_success \
test_tick &&
git commit -m "Modify A." &&
- expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* + .*"
+ expr "$(echo $(git cherry main my-topic-branch) )" : "+ [^ ]* + .*"
'
test_expect_success \
'check that cherry with limit returns only the top patch'\
- 'expr "$(echo $(git cherry master my-topic-branch my-topic-branch^1) )" : "+ [^ ]*"
+ 'expr "$(echo $(git cherry main my-topic-branch my-topic-branch^1) )" : "+ [^ ]*"
'
test_expect_success \
'cherry-pick one of the 2 patches, and check cherry recognized one and only one as new' \
'git cherry-pick my-topic-branch^0 &&
- echo $(git cherry master my-topic-branch) &&
- expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* - .*"
+ echo $(git cherry main my-topic-branch) &&
+ expr "$(echo $(git cherry main my-topic-branch) )" : "+ [^ ]* - .*"
'
test_expect_success 'cherry ignores whitespace' '
diff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh
index 6a10714e22..9d100cd188 100755
--- a/t/t3501-revert-cherry-pick.sh
+++ b/t/t3501-revert-cherry-pick.sh
@@ -10,7 +10,7 @@ test_description='test cherry-pick and revert with renames
'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -115,7 +115,7 @@ test_expect_success 'cherry-pick on unborn branch' '
test_expect_success 'cherry-pick "-" to pick from previous branch' '
git checkout unborn &&
test_commit to-pick actual content &&
- git checkout master &&
+ git checkout main &&
git cherry-pick - &&
echo content >expect &&
test_cmp expect actual
@@ -135,7 +135,7 @@ test_expect_success 'cherry-pick "-" is meaningless without checkout' '
test_expect_success 'cherry-pick "-" works with arguments' '
git checkout -b side-branch &&
test_commit change actual change &&
- git checkout master &&
+ git checkout main &&
git cherry-pick -s - &&
echo "Signed-off-by: C O Mitter <committer@example.com>" >expect &&
git cat-file commit HEAD | grep ^Signed-off-by: >signoff &&
diff --git a/t/t3502-cherry-pick-merge.sh b/t/t3502-cherry-pick-merge.sh
index 774ad9ce14..5495eacfec 100755
--- a/t/t3502-cherry-pick-merge.sh
+++ b/t/t3502-cherry-pick-merge.sh
@@ -8,7 +8,7 @@ test_description='cherry picking and reverting a merge
'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -28,7 +28,7 @@ test_expect_success setup '
echo new line >B &&
git commit -m "add line to B" B &&
git tag b &&
- git checkout master &&
+ git checkout main &&
git merge side &&
git tag c
diff --git a/t/t3503-cherry-pick-root.sh b/t/t3503-cherry-pick-root.sh
index 00c622d5dc..95fe4feaee 100755
--- a/t/t3503-cherry-pick-root.sh
+++ b/t/t3503-cherry-pick-root.sh
@@ -2,7 +2,7 @@
test_description='test cherry-picking (and reverting) a root commit'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -33,7 +33,7 @@ test_expect_success setup '
test_expect_success 'cherry-pick a root commit' '
git checkout second^0 &&
- git cherry-pick master &&
+ git cherry-pick main &&
echo first >expect &&
test_cmp expect file1
@@ -41,14 +41,14 @@ test_expect_success 'cherry-pick a root commit' '
test_expect_success 'revert a root commit' '
- git revert master &&
+ git revert main &&
test_path_is_missing file1
'
test_expect_success 'cherry-pick a root commit with an external strategy' '
- git cherry-pick --strategy=resolve master &&
+ git cherry-pick --strategy=resolve main &&
echo first >expect &&
test_cmp expect file1
@@ -56,7 +56,7 @@ test_expect_success 'cherry-pick a root commit with an external strategy' '
test_expect_success 'revert a root commit with an external strategy' '
- git revert --strategy=resolve master &&
+ git revert --strategy=resolve main &&
test_path_is_missing file1
'
@@ -68,7 +68,7 @@ test_expect_success 'cherry-pick two root commits' '
echo third >expect.file3 &&
git checkout second^0 &&
- git cherry-pick master third &&
+ git cherry-pick main third &&
test_cmp expect.file1 file1 &&
test_cmp expect.file2 file2 &&
diff --git a/t/t3504-cherry-pick-rerere.sh b/t/t3504-cherry-pick-rerere.sh
index 860ba0b496..9198535874 100755
--- a/t/t3504-cherry-pick-rerere.sh
+++ b/t/t3504-cherry-pick-rerere.sh
@@ -2,15 +2,15 @@
test_description='cherry-pick should rerere for conflicts'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
test_expect_success setup '
test_commit foo &&
- test_commit foo-master foo &&
- test_commit bar-master bar &&
+ test_commit foo-main foo &&
+ test_commit bar-main bar &&
git checkout -b dev foo &&
test_commit foo-dev foo &&
@@ -19,7 +19,7 @@ test_expect_success setup '
'
test_expect_success 'conflicting merge' '
- test_must_fail git merge master
+ test_must_fail git merge main
'
test_expect_success 'fixup' '
@@ -32,7 +32,7 @@ test_expect_success 'fixup' '
'
test_expect_success 'cherry-pick conflict with --rerere-autoupdate' '
- test_must_fail git cherry-pick --rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --rerere-autoupdate foo..bar-main &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
test_must_fail git cherry-pick --continue &&
@@ -44,7 +44,7 @@ test_expect_success 'cherry-pick conflict with --rerere-autoupdate' '
test_expect_success 'cherry-pick conflict repsects rerere.autoUpdate' '
test_config rerere.autoUpdate true &&
- test_must_fail git cherry-pick foo..bar-master &&
+ test_must_fail git cherry-pick foo..bar-main &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
test_must_fail git cherry-pick --continue &&
@@ -56,7 +56,7 @@ test_expect_success 'cherry-pick conflict repsects rerere.autoUpdate' '
test_expect_success 'cherry-pick conflict with --no-rerere-autoupdate' '
test_config rerere.autoUpdate true &&
- test_must_fail git cherry-pick --no-rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --no-rerere-autoupdate foo..bar-main &&
test_cmp foo-expect foo &&
test_must_fail git diff-files --quiet &&
git add foo &&
@@ -69,7 +69,7 @@ test_expect_success 'cherry-pick conflict with --no-rerere-autoupdate' '
'
test_expect_success 'cherry-pick --continue rejects --rerere-autoupdate' '
- test_must_fail git cherry-pick --rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --rerere-autoupdate foo..bar-main &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
test_must_fail git cherry-pick --continue --rerere-autoupdate >actual 2>&1 &&
@@ -82,25 +82,25 @@ test_expect_success 'cherry-pick --continue rejects --rerere-autoupdate' '
'
test_expect_success 'cherry-pick --rerere-autoupdate more than once' '
- test_must_fail git cherry-pick --rerere-autoupdate --rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --rerere-autoupdate --rerere-autoupdate foo..bar-main &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
git cherry-pick --abort &&
- test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate foo..bar-main &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
git cherry-pick --abort &&
- test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate foo..bar-main &&
test_must_fail git diff-files --quiet &&
git cherry-pick --abort
'
test_expect_success 'cherry-pick conflict without rerere' '
test_config rerere.enabled false &&
- test_must_fail git cherry-pick foo-master &&
+ test_must_fail git cherry-pick foo-main &&
grep ===== foo &&
grep foo-dev foo &&
- grep foo-master foo
+ grep foo-main foo
'
test_done
diff --git a/t/t3505-cherry-pick-empty.sh b/t/t3505-cherry-pick-empty.sh
index 20cd4052d4..eba3c38d5a 100755
--- a/t/t3505-cherry-pick-empty.sh
+++ b/t/t3505-cherry-pick-empty.sh
@@ -2,7 +2,7 @@
test_description='test cherry-picking an empty commit'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -20,7 +20,7 @@ test_expect_success setup '
test_tick &&
git commit --allow-empty-message -m "" &&
- git checkout master &&
+ git checkout main &&
git checkout -b empty-change-branch &&
test_tick &&
git commit --allow-empty -m "empty"
@@ -28,7 +28,7 @@ test_expect_success setup '
'
test_expect_success 'cherry-pick an empty commit' '
- git checkout master &&
+ git checkout main &&
test_expect_code 1 git cherry-pick empty-change-branch
'
@@ -38,7 +38,7 @@ test_expect_success 'index lockfile was removed' '
test_expect_success 'cherry-pick a commit with an empty message' '
test_when_finished "git reset --hard empty-message-branch~1" &&
- git checkout master &&
+ git checkout main &&
git cherry-pick empty-message-branch
'
@@ -47,12 +47,12 @@ test_expect_success 'index lockfile was removed' '
'
test_expect_success 'cherry-pick a commit with an empty message with --allow-empty-message' '
- git checkout -f master &&
+ git checkout -f main &&
git cherry-pick --allow-empty-message empty-message-branch
'
test_expect_success 'cherry pick an empty non-ff commit without --allow-empty' '
- git checkout master &&
+ git checkout main &&
echo fourth >>file2 &&
git add file2 &&
git commit -m "fourth" &&
@@ -60,22 +60,22 @@ test_expect_success 'cherry pick an empty non-ff commit without --allow-empty' '
'
test_expect_success 'cherry pick an empty non-ff commit with --allow-empty' '
- git checkout master &&
+ git checkout main &&
git cherry-pick --allow-empty empty-change-branch
'
test_expect_success 'cherry pick with --keep-redundant-commits' '
- git checkout master &&
+ git checkout main &&
git cherry-pick --keep-redundant-commits HEAD^
'
test_expect_success 'cherry-pick a commit that becomes no-op (prep)' '
- git checkout master &&
+ git checkout main &&
git branch fork &&
echo foo >file2 &&
git add file2 &&
test_tick &&
- git commit -m "add file2 on master" &&
+ git commit -m "add file2 on main" &&
git checkout fork &&
echo foo >file2 &&
@@ -87,15 +87,15 @@ test_expect_success 'cherry-pick a commit that becomes no-op (prep)' '
test_expect_success 'cherry-pick a no-op without --keep-redundant' '
git reset --hard &&
git checkout fork^0 &&
- test_must_fail git cherry-pick master
+ test_must_fail git cherry-pick main
'
test_expect_success 'cherry-pick a no-op with --keep-redundant' '
git reset --hard &&
git checkout fork^0 &&
- git cherry-pick --keep-redundant-commits master &&
+ git cherry-pick --keep-redundant-commits main &&
git show -s --format=%s >actual &&
- echo "add file2 on master" >expect &&
+ echo "add file2 on main" >expect &&
test_cmp expect actual
'
diff --git a/t/t3506-cherry-pick-ff.sh b/t/t3506-cherry-pick-ff.sh
index a105a782f6..7e11bd4a4c 100755
--- a/t/t3506-cherry-pick-ff.sh
+++ b/t/t3506-cherry-pick-ff.sh
@@ -2,7 +2,7 @@
test_description='test cherry-picking with --ff option'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -27,7 +27,7 @@ test_expect_success setup '
'
test_expect_success 'cherry-pick using --ff fast forwards' '
- git checkout master &&
+ git checkout main &&
git reset --hard first &&
test_tick &&
git cherry-pick --ff second &&
@@ -35,7 +35,7 @@ test_expect_success 'cherry-pick using --ff fast forwards' '
'
test_expect_success 'cherry-pick not using --ff does not fast forwards' '
- git checkout master &&
+ git checkout main &&
git reset --hard first &&
test_tick &&
git cherry-pick second &&
@@ -52,7 +52,7 @@ test_expect_success 'cherry-pick not using --ff does not fast forwards' '
# (This has been taken from t3502-cherry-pick-merge.sh)
#
test_expect_success 'merge setup' '
- git checkout master &&
+ git checkout main &&
git reset --hard first &&
echo new line >A &&
git add A &&
@@ -65,7 +65,7 @@ test_expect_success 'merge setup' '
test_tick &&
git commit -m "add line to B" B &&
git tag B &&
- git checkout master &&
+ git checkout main &&
git merge side &&
git tag C &&
git checkout -b new A
diff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh
index e94264e578..5f4564c830 100755
--- a/t/t3507-cherry-pick-conflict.sh
+++ b/t/t3507-cherry-pick-conflict.sh
@@ -9,7 +9,7 @@ test_description='test cherry-pick and revert with conflicts
'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -32,7 +32,7 @@ test_expect_success setup '
test_commit redundant-pick foo c redundant &&
git commit --allow-empty --allow-empty-message &&
git tag empty &&
- git checkout master &&
+ git checkout main &&
git config advice.detachedhead false
'
diff --git a/t/t3508-cherry-pick-many-commits.sh b/t/t3508-cherry-pick-many-commits.sh
index b967bf0639..ec7a2c9fcf 100755
--- a/t/t3508-cherry-pick-many-commits.sh
+++ b/t/t3508-cherry-pick-many-commits.sh
@@ -2,7 +2,7 @@
test_description='test cherry-picking many commits'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -34,7 +34,7 @@ test_expect_success setup '
'
test_expect_success 'cherry-pick first..fourth works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git cherry-pick first..fourth &&
@@ -48,7 +48,7 @@ test_expect_success 'cherry-pick three one two works' '
test_commit one &&
test_commit two &&
test_commit three &&
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
git cherry-pick three one two &&
git diff --quiet three &&
@@ -59,28 +59,28 @@ two"
'
test_expect_success 'cherry-pick three one two: fails' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_must_fail git cherry-pick three one two:
'
test_expect_success 'output to keep user entertained during multi-pick' '
cat <<-\EOF >expected &&
- [master OBJID] second
+ [main OBJID] second
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+)
- [master OBJID] third
+ [main OBJID] third
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
- [master OBJID] fourth
+ [main OBJID] fourth
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
EOF
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git cherry-pick first..fourth >actual &&
@@ -90,7 +90,7 @@ test_expect_success 'output to keep user entertained during multi-pick' '
'
test_expect_success 'cherry-pick --strategy resolve first..fourth works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git cherry-pick --strategy resolve first..fourth &&
@@ -102,23 +102,23 @@ test_expect_success 'cherry-pick --strategy resolve first..fourth works' '
test_expect_success 'output during multi-pick indicates merge strategy' '
cat <<-\EOF >expected &&
Trying simple merge.
- [master OBJID] second
+ [main OBJID] second
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+)
Trying simple merge.
- [master OBJID] third
+ [main OBJID] third
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
Trying simple merge.
- [master OBJID] fourth
+ [main OBJID] fourth
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
EOF
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git cherry-pick --strategy resolve first..fourth >actual &&
@@ -127,7 +127,7 @@ test_expect_success 'output during multi-pick indicates merge strategy' '
'
test_expect_success 'cherry-pick --ff first..fourth works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git cherry-pick --ff first..fourth &&
@@ -137,7 +137,7 @@ test_expect_success 'cherry-pick --ff first..fourth works' '
'
test_expect_success 'cherry-pick -n first..fourth works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git cherry-pick -n first..fourth &&
@@ -147,7 +147,7 @@ test_expect_success 'cherry-pick -n first..fourth works' '
'
test_expect_success 'revert first..fourth works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard fourth &&
test_tick &&
git revert first..fourth &&
@@ -157,7 +157,7 @@ test_expect_success 'revert first..fourth works' '
'
test_expect_success 'revert ^first fourth works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard fourth &&
test_tick &&
git revert ^first fourth &&
@@ -167,7 +167,7 @@ test_expect_success 'revert ^first fourth works' '
'
test_expect_success 'revert fourth fourth~1 fourth~2 works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard fourth &&
test_tick &&
git revert fourth fourth~1 fourth~2 &&
@@ -177,7 +177,7 @@ test_expect_success 'revert fourth fourth~1 fourth~2 works' '
'
test_expect_success 'cherry-pick -3 fourth works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git cherry-pick -3 fourth &&
@@ -187,7 +187,7 @@ test_expect_success 'cherry-pick -3 fourth works' '
'
test_expect_success 'cherry-pick --stdin works' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard first &&
test_tick &&
git rev-list --reverse first..fourth | git cherry-pick --stdin &&
diff --git a/t/t3509-cherry-pick-merge-df.sh b/t/t3509-cherry-pick-merge-df.sh
index 83cab7b2ed..f4159246e1 100755
--- a/t/t3509-cherry-pick-merge-df.sh
+++ b/t/t3509-cherry-pick-merge-df.sh
@@ -1,7 +1,7 @@
#!/bin/sh
test_description='Test cherry-pick with directory/file conflicts'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -31,7 +31,7 @@ test_expect_success 'Setup rename across paths each below D/F conflicts' '
test_expect_success 'Cherry-pick succeeds with rename across D/F conflicts' '
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
git cherry-pick branch
'
diff --git a/t/t3512-cherry-pick-submodule.sh b/t/t3512-cherry-pick-submodule.sh
index ff33c6d5c9..822f2d4bfb 100755
--- a/t/t3512-cherry-pick-submodule.sh
+++ b/t/t3512-cherry-pick-submodule.sh
@@ -2,7 +2,7 @@
test_description='cherry-pick can handle submodules'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -38,7 +38,7 @@ test_expect_success 'unrelated submodule/file conflict is ignored' '
git add a_file &&
git commit -m "modify a file" &&
- git checkout master &&
+ git checkout main &&
git submodule add ../sub sub &&
git submodule update sub &&
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 3baa64bf99..dff1228669 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -5,7 +5,7 @@
test_description='Test of the various options to git rm.'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -486,16 +486,16 @@ test_expect_success 'setup submodule conflict' '
echo 1 >nitfol &&
git add nitfol &&
git commit -m "added nitfol 1" &&
- git checkout -b branch2 master &&
+ git checkout -b branch2 main &&
echo 2 >nitfol &&
git add nitfol &&
git commit -m "added nitfol 2" &&
- git checkout -b conflict1 master &&
+ git checkout -b conflict1 main &&
git -C submod fetch &&
git -C submod checkout branch1 &&
git add submod &&
git commit -m "submod 1" &&
- git checkout -b conflict2 master &&
+ git checkout -b conflict2 main &&
git -C submod checkout branch2 &&
git add submod &&
git commit -m "submod 2"
@@ -607,7 +607,7 @@ test_expect_success 'rm of a conflicted unpopulated submodule succeeds' '
'
test_expect_success 'rm of a populated submodule with a .git directory migrates git dir' '
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard &&
git submodule update &&
(
@@ -720,7 +720,7 @@ test_expect_success 'checking out a commit after submodule removal needs manual
git checkout HEAD^ &&
git submodule update &&
git checkout -q HEAD^ &&
- git checkout -q master 2>actual &&
+ git checkout -q main 2>actual &&
test_i18ngrep "^warning: unable to rmdir '\''submod'\'':" actual &&
git status -s submod >actual &&
echo "?? submod/" >expected &&
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index 9be7527531..8c7f23cc53 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -1,7 +1,7 @@
#!/bin/sh
test_description='add -i basic tests'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -552,8 +552,8 @@ test_expect_success 'patch mode ignores unmerged entries' '
test_commit non-conflict &&
git checkout -b side &&
test_commit side conflict.t &&
- git checkout master &&
- test_commit master conflict.t &&
+ git checkout main &&
+ test_commit main conflict.t &&
test_must_fail git merge side &&
echo changed >non-conflict.t &&
echo y | git add -p >output &&
diff --git a/t/t3901-i18n-patch.sh b/t/t3901-i18n-patch.sh
index bde27227b6..4f16a735d9 100755
--- a/t/t3901-i18n-patch.sh
+++ b/t/t3901-i18n-patch.sh
@@ -5,7 +5,7 @@
test_description='i18n settings and format-patch | am pipe'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -48,7 +48,7 @@ test_expect_success setup '
# the first commit on the side branch is UTF-8
test_tick &&
- git checkout -b side master^ &&
+ git checkout -b side main^ &&
echo Another file >yours &&
git add yours &&
git commit -s -m "Second on side" &&
@@ -72,7 +72,7 @@ test_expect_success setup '
test_expect_success 'format-patch output (ISO-8859-1)' '
git config i18n.logoutputencoding ISO8859-1 &&
- git format-patch --stdout master..HEAD^ >out-l1 &&
+ git format-patch --stdout main..HEAD^ >out-l1 &&
git format-patch --stdout HEAD^ >out-l2 &&
grep "^Content-Type: text/plain; charset=ISO8859-1" out-l1 &&
grep "^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l1 &&
@@ -83,7 +83,7 @@ test_expect_success 'format-patch output (ISO-8859-1)' '
test_expect_success 'format-patch output (UTF-8)' '
git config i18n.logoutputencoding UTF-8 &&
- git format-patch --stdout master..HEAD^ >out-u1 &&
+ git format-patch --stdout main..HEAD^ >out-u1 &&
git format-patch --stdout HEAD^ >out-u2 &&
grep "^Content-Type: text/plain; charset=UTF-8" out-u1 &&
grep "^From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?=" out-u1 &&
@@ -105,7 +105,7 @@ test_expect_success 'rebase (U/U)' '
# we want UTF-8 encoded name.
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git checkout -b test &&
- git rebase master &&
+ git rebase main &&
check_encoding 2
'
@@ -116,7 +116,7 @@ test_expect_success 'rebase (U/L)' '
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard side &&
- git rebase master &&
+ git rebase main &&
check_encoding 2
'
@@ -128,7 +128,7 @@ test_expect_success !MINGW 'rebase (L/L)' '
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
- git rebase master &&
+ git rebase main &&
check_encoding 2 8859
'
@@ -141,7 +141,7 @@ test_expect_success !MINGW 'rebase (L/U)' '
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
- git rebase master &&
+ git rebase main &&
check_encoding 2 8859
'
@@ -153,7 +153,7 @@ test_expect_success 'cherry-pick(U/U)' '
git config i18n.logoutputencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
@@ -168,7 +168,7 @@ test_expect_success !MINGW 'cherry-pick(L/L)' '
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
@@ -183,7 +183,7 @@ test_expect_success 'cherry-pick(U/L)' '
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
@@ -199,7 +199,7 @@ test_expect_success !MINGW 'cherry-pick(L/U)' '
git config i18n.logoutputencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
@@ -213,7 +213,7 @@ test_expect_success 'rebase --merge (U/U)' '
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard side &&
- git rebase --merge master &&
+ git rebase --merge main &&
check_encoding 2
'
@@ -224,7 +224,7 @@ test_expect_success 'rebase --merge (U/L)' '
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard side &&
- git rebase --merge master &&
+ git rebase --merge main &&
check_encoding 2
'
@@ -236,7 +236,7 @@ test_expect_success 'rebase --merge (L/L)' '
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
- git rebase --merge master &&
+ git rebase --merge main &&
check_encoding 2 8859
'
@@ -249,7 +249,7 @@ test_expect_success 'rebase --merge (L/U)' '
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
- git rebase --merge master &&
+ git rebase --merge main &&
check_encoding 2 8859
'
@@ -259,7 +259,7 @@ test_expect_success 'am (U/U)' '
git config i18n.commitencod