{"thread":{"id":"54633","subject":"[PATCH 05/28] t3416: preemptively adjust alignment in a comment","startedAt":"2020-11-12T22:44:08Z","lastAt":"2020-11-23T09:29:39Z","messageCount":163,"participants":["Johannes Schindelin via GitGitGadget","Don Goodman-Wilson via GitGitGadget","Felipe Contreras","Ævar Arnfjörð Bjarmason","Johannes Schindelin","Jeff King","Junio C Hamano","Eric W. Biederman","Jonathan Nieder","Philip Oakley","Peter Hadlaw","Sergey Organov"],"isPatch":true,"patchVersion":1,"patchTotal":28},"messages":[{"id":"409806","messageId":"e494152c3e72df871cbea44e1205162b2be162df.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 05/28] t3416: preemptively adjust alignment in a comment","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:35Z","receivedAt":"2020-11-12T22:44:08Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe are about to adjust t3416 for the new default branch name `main`.\nThis name is two characters shorter and therefore needs two spaces more\npadding to align correctly.\n\nAdjusting the alignment before the big search-and-replace makes it\neasier to verify that the final result does not leave any misaligned\nlines behind.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3416-rebase-onto-threedots.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t3416-rebase-onto-threedots.sh b/t/t3416-rebase-onto-threedots.sh\nindex 9c2548423b..1f37adf56b 100755\n--- a/t/t3416-rebase-onto-threedots.sh\n+++ b/t/t3416-rebase-onto-threedots.sh\n@@ -12,7 +12,7 @@ test_description='git rebase --onto A...B'\n #\n #\t    F---G topic                             G'\n #\t   /                                       /\n-# A---B---C---D---E master      -->       A---B---C---D---E\n+# A---B---C---D---E master        -->       A---B---C---D---E\n #      \\   \\ /\n #\t\\   x\n #\t \\ / \\\n-- \ngitgitgadget\n\n"},{"id":"409807","messageId":"830130fa9fff3bf39e9f5b0360160e9ff787deec.1605221038.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 02/28] t[01]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:32Z","receivedAt":"2020-11-12T22:44:09Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t[01]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t0002-gitfile.sh                   |  6 +--\n t/t0020-crlf.sh                      |  8 ++--\n t/t0021-conversion.sh                | 40 ++++++++--------\n t/t0027-auto-crlf.sh                 |  4 +-\n t/t0028-working-tree-encoding.sh     |  4 +-\n t/t0041-usage.sh                     | 10 ++--\n t/t0050-filesystem.sh                |  6 +--\n t/t0060-path-utils.sh                |  4 +-\n t/t0100-previous.sh                  | 18 ++++----\n t/t1004-read-tree-m-u-wf.sh          | 40 ++++++++--------\n t/t1008-read-tree-overlay.sh         |  2 +-\n t/t1009-read-tree-new-index.sh       |  4 +-\n t/t1011-read-tree-sparse-checkout.sh |  2 +-\n t/t1021-rerere-in-workdir.sh         |  2 +-\n t/t1090-sparse-checkout-scope.sh     | 10 ++--\n t/t1091-sparse-checkout-builtin.sh   |  2 +-\n t/t1300-config.sh                    |  8 ++--\n t/t1301-shared-repo.sh               |  4 +-\n t/t1305-config-include.sh            |  2 +-\n t/t1309-early-config.sh              |  4 +-\n t/t1400-update-ref.sh                | 68 ++++++++++++++--------------\n t/t1402-check-ref-format.sh          | 28 ++++++------\n t/t1403-show-ref.sh                  | 18 ++++----\n t/t1405-main-ref-store.sh            | 42 ++++++++---------\n t/t1406-submodule-ref-store.sh       | 30 ++++++------\n t/t1407-worktree-ref-store.sh        | 32 ++++++-------\n t/t1408-packed-refs.sh               | 12 ++---\n t/t1410-reflog.sh                    | 56 +++++++++++------------\n t/t1411-reflog-show.sh               |  2 +-\n t/t1413-reflog-detach.sh             | 24 +++++-----\n t/t1414-reflog-walk.sh               | 12 ++---\n t/t1416-ref-transaction-hooks.sh     | 10 ++--\n t/t1430-bad-ref-name.sh              | 52 ++++++++++-----------\n t/t1450-fsck.sh                      |  2 +-\n t/t1500-rev-parse.sh                 |  4 +-\n t/t1503-rev-parse-verify.sh          | 28 ++++++------\n t/t1505-rev-parse-last.sh            |  8 ++--\n t/t1506-rev-parse-diagnosis.sh       |  4 +-\n t/t1507-rev-parse-upstream.sh        | 40 ++++++++--------\n t/t1508-at-combinations.sh           | 10 ++--\n t/t1511-rev-parse-caret.sh           | 26 +++++------\n t/t1512-rev-parse-disambiguation.sh  |  2 +-\n t/t1513-rev-parse-prefix.sh          |  4 +-\n t/t1514-rev-parse-push.sh            | 16 +++----\n t/t1700-split-index.sh               |  2 +-\n t/test-lib.sh                        |  7 +++\n 46 files changed, 363 insertions(+), 356 deletions(-)\n\ndiff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh\nindex 960ed150cb..bbcfc8a0b5 100755\n--- a/t/t0002-gitfile.sh\n+++ b/t/t0002-gitfile.sh\n@@ -96,7 +96,7 @@ test_expect_success 'enter_repo non-strict mode' '\n \tgit ls-remote enter_repo >actual &&\n \tcat >expected <<-EOF &&\n \t$head\tHEAD\n-\t$head\trefs/heads/master\n+\t$head\trefs/heads/main\n \t$head\trefs/tags/foo\n \tEOF\n \ttest_cmp expected actual\n@@ -111,7 +111,7 @@ test_expect_success 'enter_repo linked checkout' '\n \tgit ls-remote foo >actual &&\n \tcat >expected <<-EOF &&\n \t$head\tHEAD\n-\t$head\trefs/heads/master\n+\t$head\trefs/heads/main\n \t$head\trefs/tags/foo\n \tEOF\n \ttest_cmp expected actual\n@@ -122,7 +122,7 @@ test_expect_success 'enter_repo strict mode' '\n \tgit ls-remote --upload-pack=\"git upload-pack --strict\" foo/.git >actual &&\n \tcat >expected <<-EOF &&\n \t$head\tHEAD\n-\t$head\trefs/heads/master\n+\t$head\trefs/heads/main\n \t$head\trefs/tags/foo\n \tEOF\n \ttest_cmp expected actual\ndiff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh\nindex b63ba62e5d..04bf4b1e82 100755\n--- a/t/t0020-crlf.sh\n+++ b/t/t0020-crlf.sh\n@@ -318,8 +318,8 @@ test_expect_success 'checkout with existing .gitattributes' '\n \tgit add .gitattributes .file &&\n \tgit commit -m second &&\n \n-\tgit checkout master~1 &&\n-\tgit checkout master &&\n+\tgit checkout main~1 &&\n+\tgit checkout main &&\n \ttest \"$(git diff-files --raw)\" = \"\"\n \n '\n@@ -331,8 +331,8 @@ test_expect_success 'checkout when deleting .gitattributes' '\n \tgit add .file2 &&\n \tgit commit -m third &&\n \n-\tgit checkout master~1 &&\n-\tgit checkout master &&\n+\tgit checkout main~1 &&\n+\tgit checkout main &&\n \thas_cr .file2\n \n '\ndiff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh\nindex f6deaf498b..d0eeca4556 100755\n--- a/t/t0021-conversion.sh\n+++ b/t/t0021-conversion.sh\n@@ -378,8 +378,8 @@ test_expect_success PERL 'required process filter should filter data' '\n \t\ttest_cmp_count expected.log debug.log &&\n \n \t\tgit commit -m \"test commit 2\" &&\n-\t\tMASTER=$(git rev-parse --verify master) &&\n-\t\tMETA=\"ref=refs/heads/master treeish=$MASTER\" &&\n+\t\tMAIN=$(git rev-parse --verify main) &&\n+\t\tMETA=\"ref=refs/heads/main treeish=$MAIN\" &&\n \t\trm -f test2.r \"testsubdir/test3 '\\''sq'\\'',\\$x=.r\" &&\n \n \t\tfilter_git checkout --quiet --no-progress . &&\n@@ -404,7 +404,7 @@ test_expect_success PERL 'required process filter should filter data' '\n \t\tEOF\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n-\t\tfilter_git checkout --quiet --no-progress master &&\n+\t\tfilter_git checkout --quiet --no-progress main &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -436,15 +436,15 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\tM3=$(git hash-object \"testsubdir/test3 '\\''sq'\\'',\\$x=.r\") &&\n \t\tEMPTY=$(git hash-object /dev/null) &&\n \n-\t\tMASTER=$(git rev-parse --verify master) &&\n+\t\tMAIN=$(git rev-parse --verify main) &&\n \n \t\tcp \"$TEST_ROOT/test.o\" test5.r &&\n \t\tgit add test5.r &&\n \t\tgit commit -m \"test commit 3\" &&\n \t\tgit checkout empty-branch &&\n-\t\tfilter_git rebase --onto empty-branch master^^ master &&\n-\t\tMASTER2=$(git rev-parse --verify master) &&\n-\t\tMETA=\"ref=refs/heads/master treeish=$MASTER2\" &&\n+\t\tfilter_git rebase --onto empty-branch main^^ main &&\n+\t\tMAIN2=$(git rev-parse --verify main) &&\n+\t\tMETA=\"ref=refs/heads/main treeish=$MAIN2\" &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -458,8 +458,8 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n \t\tgit reset --hard empty-branch &&\n-\t\tfilter_git reset --hard $MASTER &&\n-\t\tMETA=\"treeish=$MASTER\" &&\n+\t\tfilter_git reset --hard $MAIN &&\n+\t\tMETA=\"treeish=$MAIN\" &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -471,10 +471,10 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\tEOF\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n-\t\tgit branch old-master $MASTER &&\n+\t\tgit branch old-main $MAIN &&\n \t\tgit reset --hard empty-branch &&\n-\t\tfilter_git reset --hard old-master &&\n-\t\tMETA=\"ref=refs/heads/old-master treeish=$MASTER\" &&\n+\t\tfilter_git reset --hard old-main &&\n+\t\tMETA=\"ref=refs/heads/old-main treeish=$MAIN\" &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -487,9 +487,9 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n \t\tgit checkout -b merge empty-branch &&\n-\t\tgit branch -f master $MASTER2 &&\n-\t\tfilter_git merge master &&\n-\t\tMETA=\"treeish=$MASTER2\" &&\n+\t\tgit branch -f main $MAIN2 &&\n+\t\tfilter_git merge main &&\n+\t\tMETA=\"treeish=$MAIN2\" &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -502,8 +502,8 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\tEOF\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n-\t\tfilter_git archive master >/dev/null &&\n-\t\tMETA=\"ref=refs/heads/master treeish=$MASTER2\" &&\n+\t\tfilter_git archive main >/dev/null &&\n+\t\tMETA=\"ref=refs/heads/main treeish=$MAIN2\" &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -516,7 +516,7 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\tEOF\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n-\t\tTREE=\"$(git rev-parse $MASTER2^{tree})\" &&\n+\t\tTREE=\"$(git rev-parse $MAIN2^{tree})\" &&\n \t\tfilter_git archive $TREE >/dev/null &&\n \t\tMETA=\"treeish=$TREE\" &&\n \t\tcat >expected.log <<-EOF &&\n@@ -856,8 +856,8 @@ test_expect_success PERL 'delayed checkout in process filter' '\n \t) &&\n \n \tS=$(test_file_size \"$TEST_ROOT/test.o\") &&\n-\tPM=\"ref=refs/heads/master treeish=$(git -C repo rev-parse --verify master) \" &&\n-\tM=\"${PM}blob=$(git -C repo rev-parse --verify master:test.a)\" &&\n+\tPM=\"ref=refs/heads/main treeish=$(git -C repo rev-parse --verify main) \" &&\n+\tM=\"${PM}blob=$(git -C repo rev-parse --verify main:test.a)\" &&\n \tcat >a.exp <<-EOF &&\n \t\tSTART\n \t\tinit handshake complete\ndiff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh\nindex 9fcd56fab3..51f74a3ddf 100755\n--- a/t/t0027-auto-crlf.sh\n+++ b/t/t0027-auto-crlf.sh\n@@ -368,9 +368,9 @@ test_expect_success 'ls-files --eol -o Text/Binary' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'setup master' '\n+test_expect_success 'setup main' '\n \techo >.gitattributes &&\n-\tgit checkout -b master &&\n+\tgit checkout -b main &&\n \tgit add .gitattributes &&\n \tgit commit -m \"add .gitattributes\" . &&\n \tprintf \"\\$Id: 0000000000000000000000000000000000000000 \\$\\nLINEONE\\nLINETWO\\nLINETHREE\"     >LF &&\ndiff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh\nindex bfc4fb9af5..9c48037884 100755\n--- a/t/t0028-working-tree-encoding.sh\n+++ b/t/t0028-working-tree-encoding.sh\n@@ -215,7 +215,7 @@ test_expect_success 'error if encoding round trip is not the same during refresh\n \tTEST_HASH=$(git hash-object --no-filters -w nonsense.utf16le) &&\n \tgit update-index --add --cacheinfo 100644 $TEST_HASH nonsense.utf16le &&\n \tCOMMIT=$(git commit-tree -p $(git rev-parse HEAD) -m \"plain commit\" $(git write-tree)) &&\n-\tgit update-ref refs/heads/master $COMMIT &&\n+\tgit update-ref refs/heads/main $COMMIT &&\n \n \ttest_must_fail git checkout HEAD^ 2>err.out &&\n \ttest_i18ngrep \"error: .* overwritten by checkout:\" err.out\n@@ -231,7 +231,7 @@ test_expect_success 'error if encoding garbage is already in Git' '\n \tTEST_HASH=$(git hash-object --no-filters -w nonsense.utf16) &&\n \tgit update-index --add --cacheinfo 100644 $TEST_HASH nonsense.utf16 &&\n \tCOMMIT=$(git commit-tree -p $(git rev-parse HEAD) -m \"plain commit\" $(git write-tree)) &&\n-\tgit update-ref refs/heads/master $COMMIT &&\n+\tgit update-ref refs/heads/main $COMMIT &&\n \n \tgit diff 2>err.out &&\n \ttest_i18ngrep \"error: BOM is required\" err.out\ndiff --git a/t/t0041-usage.sh b/t/t0041-usage.sh\nindex 5b927b76fe..6f93450597 100755\n--- a/t/t0041-usage.sh\n+++ b/t/t0041-usage.sh\n@@ -41,8 +41,8 @@ test_expect_success 'tag usage error' '\n '\n \n test_expect_success 'branch --contains <existent_commit>' '\n-\tgit branch --contains \"master\" >actual 2>actual.err &&\n-\ttest_i18ngrep \"master\" actual &&\n+\tgit branch --contains \"main\" >actual 2>actual.err &&\n+\ttest_i18ngrep \"main\" actual &&\n \ttest_line_count = 0 actual.err\n '\n \n@@ -54,7 +54,7 @@ test_expect_success 'branch --contains <inexistent_commit>' '\n '\n \n test_expect_success 'branch --no-contains <existent_commit>' '\n-\tgit branch --no-contains \"master\" >actual 2>actual.err &&\n+\tgit branch --no-contains \"main\" >actual 2>actual.err &&\n \ttest_line_count = 0 actual &&\n \ttest_line_count = 0 actual.err\n '\n@@ -73,7 +73,7 @@ test_expect_success 'branch usage error' '\n '\n \n test_expect_success 'for-each-ref --contains <existent_object>' '\n-\tgit for-each-ref --contains \"master\" >actual 2>actual.err &&\n+\tgit for-each-ref --contains \"main\" >actual 2>actual.err &&\n \ttest_line_count = 2 actual &&\n \ttest_line_count = 0 actual.err\n '\n@@ -86,7 +86,7 @@ test_expect_success 'for-each-ref --contains <inexistent_object>' '\n '\n \n test_expect_success 'for-each-ref --no-contains <existent_object>' '\n-\tgit for-each-ref --no-contains \"master\" >actual 2>actual.err &&\n+\tgit for-each-ref --no-contains \"main\" >actual 2>actual.err &&\n \ttest_line_count = 0 actual &&\n \ttest_line_count = 0 actual.err\n '\ndiff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh\nindex 608673fb77..e3412b896b 100755\n--- a/t/t0050-filesystem.sh\n+++ b/t/t0050-filesystem.sh\n@@ -65,7 +65,7 @@ test_expect_success \"setup case tests\" '\n \tgit mv camelcase tmp &&\n \tgit mv tmp CamelCase &&\n \tgit commit -m \"rename\" &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'rename (case change)' '\n@@ -118,7 +118,7 @@ test_expect_success \"setup unicode normalization tests\" '\n \tgit mv $aumlcdiar tmp &&\n \tgit mv tmp \"$auml\" &&\n \tgit commit -m rename &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n $test_unicode 'rename (silent unicode normalization)' '\n@@ -147,7 +147,7 @@ test_expect_success CASE_INSENSITIVE_FS 'checkout with no pathspec and a case in\n \t\tgit add gitweb &&\n \t\tgit commit -m \"add gitweb/subdir/file\" &&\n \n-\t\tgit checkout master\n+\t\tgit checkout main\n \t)\n '\n \ndiff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh\nindex 928eebbdc0..fab077b6f7 100755\n--- a/t/t0060-path-utils.sh\n+++ b/t/t0060-path-utils.sh\n@@ -312,8 +312,8 @@ test_git_path GIT_COMMON_DIR=bar info/sparse-checkout     .git/info/sparse-check\n test_git_path GIT_COMMON_DIR=bar info//sparse-checkout    .git/info//sparse-checkout\n test_git_path GIT_COMMON_DIR=bar remotes/bar              bar/remotes/bar\n test_git_path GIT_COMMON_DIR=bar branches/bar             bar/branches/bar\n-test_git_path GIT_COMMON_DIR=bar logs/refs/heads/master     bar/logs/refs/heads/master\n-test_git_path GIT_COMMON_DIR=bar refs/heads/master          bar/refs/heads/master\n+test_git_path GIT_COMMON_DIR=bar logs/refs/heads/main     bar/logs/refs/heads/main\n+test_git_path GIT_COMMON_DIR=bar refs/heads/main          bar/refs/heads/main\n test_git_path GIT_COMMON_DIR=bar refs/bisect/foo          .git/refs/bisect/foo\n test_git_path GIT_COMMON_DIR=bar hooks/me                 bar/hooks/me\n test_git_path GIT_COMMON_DIR=bar config                   bar/config\ndiff --git a/t/t0100-previous.sh b/t/t0100-previous.sh\nindex 58c0b7e9b6..dfb367b720 100755\n--- a/t/t0100-previous.sh\n+++ b/t/t0100-previous.sh\n@@ -8,7 +8,7 @@ test_expect_success 'branch -d @{-1}' '\n \ttest_commit A &&\n \tgit checkout -b junk &&\n \tgit checkout - &&\n-\ttest \"$(git symbolic-ref HEAD)\" = refs/heads/master &&\n+\ttest \"$(git symbolic-ref HEAD)\" = refs/heads/main &&\n \tgit branch -d @{-1} &&\n \ttest_must_fail git rev-parse --verify refs/heads/junk\n '\n@@ -17,9 +17,9 @@ test_expect_success 'branch -d @{-12} when there is not enough switches yet' '\n \tgit reflog expire --expire=now &&\n \tgit checkout -b junk2 &&\n \tgit checkout - &&\n-\ttest \"$(git symbolic-ref HEAD)\" = refs/heads/master &&\n+\ttest \"$(git symbolic-ref HEAD)\" = refs/heads/main &&\n \ttest_must_fail git branch -d @{-12} &&\n-\tgit rev-parse --verify refs/heads/master\n+\tgit rev-parse --verify refs/heads/main\n '\n \n test_expect_success 'merge @{-1}' '\n@@ -28,19 +28,19 @@ test_expect_success 'merge @{-1}' '\n \tgit checkout A &&\n \ttest_commit C &&\n \ttest_commit D &&\n-\tgit branch -f master B &&\n+\tgit branch -f main B &&\n \tgit branch -f other &&\n \tgit checkout other &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge @{-1} &&\n \tgit cat-file commit HEAD | grep \"Merge branch '\\''other'\\''\"\n '\n \n test_expect_success 'merge @{-1}~1' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard B &&\n \tgit checkout other &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge @{-1}~1 &&\n \tgit cat-file commit HEAD >actual &&\n \tgrep \"Merge branch '\\''other'\\''\" actual\n@@ -48,11 +48,11 @@ test_expect_success 'merge @{-1}~1' '\n \n test_expect_success 'merge @{-100} before checking out that many branches yet' '\n \tgit reflog expire --expire=now &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard B &&\n \tgit branch -f other C &&\n \tgit checkout other &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git merge @{-100}\n '\n \ndiff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh\nindex 181956b241..c8a81f180f 100755\n--- a/t/t1004-read-tree-m-u-wf.sh\n+++ b/t/t1004-read-tree-m-u-wf.sh\n@@ -20,17 +20,17 @@ test_expect_success 'two-way setup' '\n \tgit branch side &&\n \tgit tag -f branch-point &&\n \n-\techo file2 is not tracked on the master branch anymore &&\n+\techo file2 is not tracked on the main branch anymore &&\n \trm -f file2 subdir/file2 &&\n \tgit update-index --remove file2 subdir/file2 &&\n-\tgit commit -a -m \"master removes file2 and subdir/file2\"\n+\tgit commit -a -m \"main removes file2 and subdir/file2\"\n '\n \n test_expect_success 'two-way not clobbering' '\n \n-\techo >file2 master creates untracked file2 &&\n-\techo >subdir/file2 master creates untracked subdir/file2 &&\n-\tif err=$(read_tree_u_must_succeed -m -u master side 2>&1)\n+\techo >file2 main creates untracked file2 &&\n+\techo >subdir/file2 main creates untracked subdir/file2 &&\n+\tif err=$(read_tree_u_must_succeed -m -u main side 2>&1)\n \tthen\n \t\techo should have complained\n \t\tfalse\n@@ -43,7 +43,7 @@ echo file2 >.gitignore\n \n test_expect_success 'two-way with incorrect --exclude-per-directory (1)' '\n \n-\tif err=$(read_tree_u_must_succeed -m --exclude-per-directory=.gitignore master side 2>&1)\n+\tif err=$(read_tree_u_must_succeed -m --exclude-per-directory=.gitignore main side 2>&1)\n \tthen\n \t\techo should have complained\n \t\tfalse\n@@ -54,7 +54,7 @@ test_expect_success 'two-way with incorrect --exclude-per-directory (1)' '\n \n test_expect_success 'two-way with incorrect --exclude-per-directory (2)' '\n \n-\tif err=$(read_tree_u_must_succeed -m -u --exclude-per-directory=foo --exclude-per-directory=.gitignore master side 2>&1)\n+\tif err=$(read_tree_u_must_succeed -m -u --exclude-per-directory=foo --exclude-per-directory=.gitignore main side 2>&1)\n \tthen\n \t\techo should have complained\n \t\tfalse\n@@ -65,7 +65,7 @@ test_expect_success 'two-way with incorrect --exclude-per-directory (2)' '\n \n test_expect_success 'two-way clobbering a ignored file' '\n \n-\tread_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore master side\n+\tread_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore main side\n '\n \n rm -f .gitignore\n@@ -81,21 +81,21 @@ test_expect_success 'three-way not complaining on an untracked path in both' '\n \tgit update-index --add file3 subdir/file3 &&\n \tgit commit -a -m \"side adds file3 and removes file2\" &&\n \n-\tgit checkout master &&\n-\techo >file2 file two is untracked on the master side &&\n-\techo >subdir/file2 file two is untracked on the master side &&\n+\tgit checkout main &&\n+\techo >file2 file two is untracked on the main side &&\n+\techo >subdir/file2 file two is untracked on the main side &&\n \n-\tread_tree_u_must_succeed -m -u branch-point master side\n+\tread_tree_u_must_succeed -m -u branch-point main side\n '\n \n test_expect_success 'three-way not clobbering a working tree file' '\n \n \tgit reset --hard &&\n \trm -f file2 subdir/file2 file3 subdir/file3 &&\n-\tgit checkout master &&\n-\techo >file3 file three created in master, untracked &&\n-\techo >subdir/file3 file three created in master, untracked &&\n-\tif err=$(read_tree_u_must_succeed -m -u branch-point master side 2>&1)\n+\tgit checkout main &&\n+\techo >file3 file three created in main, untracked &&\n+\techo >subdir/file3 file three created in main, untracked &&\n+\tif err=$(read_tree_u_must_succeed -m -u branch-point main side 2>&1)\n \tthen\n \t\techo should have complained\n \t\tfalse\n@@ -110,11 +110,11 @@ test_expect_success 'three-way not complaining on an untracked file' '\n \n \tgit reset --hard &&\n \trm -f file2 subdir/file2 file3 subdir/file3 &&\n-\tgit checkout master &&\n-\techo >file3 file three created in master, untracked &&\n-\techo >subdir/file3 file three created in master, untracked &&\n+\tgit checkout main &&\n+\techo >file3 file three created in main, untracked &&\n+\techo >subdir/file3 file three created in main, untracked &&\n \n-\tread_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore branch-point master side\n+\tread_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore branch-point main side\n '\n \n test_expect_success '3-way not overwriting local changes (setup)' '\ndiff --git a/t/t1008-read-tree-overlay.sh b/t/t1008-read-tree-overlay.sh\nindex cf96016844..2a757bd6d5 100755\n--- a/t/t1008-read-tree-overlay.sh\n+++ b/t/t1008-read-tree-overlay.sh\n@@ -22,7 +22,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'multi-read' '\n-\tread_tree_must_succeed initial master side &&\n+\tread_tree_must_succeed initial main side &&\n \ttest_write_lines a b/c >expect &&\n \tgit ls-files >actual &&\n \ttest_cmp expect actual\ndiff --git a/t/t1009-read-tree-new-index.sh b/t/t1009-read-tree-new-index.sh\nindex 59b3aa4bc4..7302adfb20 100755\n--- a/t/t1009-read-tree-new-index.sh\n+++ b/t/t1009-read-tree-new-index.sh\n@@ -12,13 +12,13 @@ test_expect_success setup '\n \n test_expect_success 'non-existent index file' '\n \trm -f new-index &&\n-\tGIT_INDEX_FILE=new-index git read-tree master\n+\tGIT_INDEX_FILE=new-index git read-tree main\n '\n \n test_expect_success 'empty index file' '\n \trm -f new-index &&\n \t> new-index &&\n-\tGIT_INDEX_FILE=new-index git read-tree master\n+\tGIT_INDEX_FILE=new-index git read-tree main\n '\n \n test_done\ndiff --git a/t/t1011-read-tree-sparse-checkout.sh b/t/t1011-read-tree-sparse-checkout.sh\nindex 140f459977..dfe9794a74 100755\n--- a/t/t1011-read-tree-sparse-checkout.sh\n+++ b/t/t1011-read-tree-sparse-checkout.sh\n@@ -2,7 +2,7 @@\n \n test_description='sparse checkout tests\n \n-* (tag: removed, master) removed\n+* (tag: removed, main) removed\n | D\tsub/added\n * (HEAD, tag: top) modified and added\n | M\tinit.t\ndiff --git a/t/t1021-rerere-in-workdir.sh b/t/t1021-rerere-in-workdir.sh\nindex 301e071ff7..a32b4a50e0 100755\n--- a/t/t1021-rerere-in-workdir.sh\n+++ b/t/t1021-rerere-in-workdir.sh\n@@ -19,7 +19,7 @@ test_expect_success SYMLINKS setup '\n \ttest_tick &&\n \tgit commit -a -m goodbye &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success SYMLINKS 'rerere in workdir' '\ndiff --git a/t/t1090-sparse-checkout-scope.sh b/t/t1090-sparse-checkout-scope.sh\nindex f35a73dd20..6c253fd526 100755\n--- a/t/t1090-sparse-checkout-scope.sh\n+++ b/t/t1090-sparse-checkout-scope.sh\n@@ -20,18 +20,18 @@ test_expect_success 'create feature branch' '\n \tgit commit -m \"modification\"\n '\n \n-test_expect_success 'perform sparse checkout of master' '\n+test_expect_success 'perform sparse checkout of main' '\n \tgit config --local --bool core.sparsecheckout true &&\n \techo \"!/*\" >.git/info/sparse-checkout &&\n \techo \"/a\" >>.git/info/sparse-checkout &&\n \techo \"/c\" >>.git/info/sparse-checkout &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_path_is_file a &&\n \ttest_path_is_missing b &&\n \ttest_path_is_file c\n '\n \n-test_expect_success 'merge feature branch into sparse checkout of master' '\n+test_expect_success 'merge feature branch into sparse checkout of main' '\n \tgit merge feature &&\n \ttest_path_is_file a &&\n \ttest_path_is_missing b &&\n@@ -39,10 +39,10 @@ test_expect_success 'merge feature branch into sparse checkout of master' '\n \ttest \"$(cat c)\" = \"modified\"\n '\n \n-test_expect_success 'return to full checkout of master' '\n+test_expect_success 'return to full checkout of main' '\n \tgit checkout feature &&\n \techo \"/*\" >.git/info/sparse-checkout &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_path_is_file a &&\n \ttest_path_is_file b &&\n \ttest_path_is_file c &&\ndiff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh\nindex 84acfc48b6..4ee16805bb 100755\n--- a/t/t1091-sparse-checkout-builtin.sh\n+++ b/t/t1091-sparse-checkout-builtin.sh\n@@ -117,7 +117,7 @@ test_expect_success 'interaction with clone --no-checkout (unborn index)' '\n \ttest_path_is_missing clone_no_checkout/.git/index &&\n \n \t# No branch is checked out until we manually switch to one\n-\tgit -C clone_no_checkout switch master &&\n+\tgit -C clone_no_checkout switch main &&\n \ttest_path_is_file clone_no_checkout/.git/index &&\n \tcheck_files clone_no_checkout a folder1\n '\ndiff --git a/t/t1300-config.sh b/t/t1300-config.sh\nindex 825d9a184f..11a8e641da 100755\n--- a/t/t1300-config.sh\n+++ b/t/t1300-config.sh\n@@ -1054,8 +1054,8 @@ test_expect_success 'check split_cmdline return' \"\n \techo foo > foo &&\n \tgit add foo &&\n \tgit commit -m 'initial commit' &&\n-\tgit config branch.master.mergeoptions 'echo \\\"' &&\n-\ttest_must_fail git merge master\n+\tgit config branch.main.mergeoptions 'echo \\\"' &&\n+\ttest_must_fail git merge main\n \"\n \n test_expect_success 'git -c \"key=value\" support' '\n@@ -1769,11 +1769,11 @@ test_expect_success '--show-origin blob' '\n \n test_expect_success '--show-origin blob ref' '\n \tcat >expect <<-\\EOF &&\n-\tblob:master:custom.conf\tuser.custom=true\n+\tblob:main:custom.conf\tuser.custom=true\n \tEOF\n \tgit add \"$CUSTOM_CONFIG_FILE\" &&\n \tgit commit -m \"new config file\" &&\n-\tgit config --blob=master:\"$CUSTOM_CONFIG_FILE\" --show-origin --list >output &&\n+\tgit config --blob=main:\"$CUSTOM_CONFIG_FILE\" --show-origin --list >output &&\n \ttest_cmp expect output\n '\n \ndiff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh\nindex 2dc853d1be..b0236ffe4a 100755\n--- a/t/t1301-shared-repo.sh\n+++ b/t/t1301-shared-repo.sh\n@@ -115,13 +115,13 @@ test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '\n \tumask 077 &&\n \tgit config core.sharedRepository group &&\n \tgit reflog expire --all &&\n-\tactual=\"$(ls -l .git/logs/refs/heads/master)\" &&\n+\tactual=\"$(ls -l .git/logs/refs/heads/main)\" &&\n \tcase \"$actual\" in\n \t-rw-rw-*)\n \t\t: happy\n \t\t;;\n \t*)\n-\t\techo Ooops, .git/logs/refs/heads/master is not 0662 [$actual]\n+\t\techo Ooops, .git/logs/refs/heads/main is not 0662 [$actual]\n \t\tfalse\n \t\t;;\n \tesac\ndiff --git a/t/t1305-config-include.sh b/t/t1305-config-include.sh\nindex f1e1b289f9..938ca17d78 100755\n--- a/t/t1305-config-include.sh\n+++ b/t/t1305-config-include.sh\n@@ -312,7 +312,7 @@ test_expect_success SYMLINKS 'conditional include, gitdir matching symlink, icas\n test_expect_success 'conditional include, onbranch' '\n \techo \"[includeIf \\\"onbranch:foo-branch\\\"]path=bar9\" >>.git/config &&\n \techo \"[test]nine=9\" >.git/bar9 &&\n-\tgit checkout -b master &&\n+\tgit checkout -b main &&\n \ttest_must_fail git config test.nine &&\n \tgit checkout -b foo-branch &&\n \techo 9 >expect &&\ndiff --git a/t/t1309-early-config.sh b/t/t1309-early-config.sh\nindex ebb8e1aecb..598e62eb4c 100755\n--- a/t/t1309-early-config.sh\n+++ b/t/t1309-early-config.sh\n@@ -91,11 +91,11 @@ test_expect_failure 'ignore .git/ with invalid config' '\n \n test_expect_success 'early config and onbranch' '\n \techo \"[broken\" >broken &&\n-\ttest_with_config \"[includeif \\\"onbranch:master\\\"]path=../broken\"\n+\ttest_with_config \"[includeif \\\"onbranch:main\\\"]path=../broken\"\n '\n \n test_expect_success 'onbranch config outside of git repo' '\n-\ttest_config_global includeIf.onbranch:master.path non-existent &&\n+\ttest_config_global includeIf.onbranch:main.path non-existent &&\n \tnongit git help\n '\n \ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex 4c01e08551..3265a8c58e 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -8,7 +8,7 @@ test_description='Test git update-ref and basic ref logging'\n \n Z=$ZERO_OID\n \n-m=refs/heads/master\n+m=refs/heads/main\n n_dir=refs/heads/gu\n n=$n_dir/fixes\n outside=refs/foo\n@@ -258,7 +258,7 @@ test_expect_success \"(not) changed .git/$m\" '\n \t! test $B = $(git show-ref -s --verify $m)\n '\n \n-rm -f .git/logs/refs/heads/master\n+rm -f .git/logs/refs/heads/main\n test_expect_success \"create $m (logged by touch)\" '\n \ttest_config core.logAllRefUpdates false &&\n \tGIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n@@ -294,7 +294,7 @@ test_expect_success 'symref empty directory removal' '\n \tgit branch e1/e2/r1 HEAD &&\n \tgit branch e1/r2 HEAD &&\n \tgit checkout e1/e2/r1 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_path_is_file .git/refs/heads/e1/e2/r1 &&\n \ttest_path_is_file .git/logs/refs/heads/e1/e2/r1 &&\n \tgit update-ref -d HEAD &&\n@@ -358,68 +358,68 @@ test_expect_success 'set up for querying the reflog' '\n ed=\"Thu, 26 May 2005 18:32:00 -0500\"\n gd=\"Thu, 26 May 2005 18:33:00 -0500\"\n ld=\"Thu, 26 May 2005 18:43:00 -0500\"\n-test_expect_success 'Query \"master@{May 25 2005}\" (before history)' '\n+test_expect_success 'Query \"main@{May 25 2005}\" (before history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{May 25 2005}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{May 25 2005}\" >o 2>e &&\n \techo \"$C\" >expect &&\n \ttest_cmp expect o &&\n-\techo \"warning: log for '\\''master'\\'' only goes back to $ed\" >expect &&\n+\techo \"warning: log for '\\''main'\\'' only goes back to $ed\" >expect &&\n \ttest_i18ncmp expect e\n '\n-test_expect_success 'Query master@{2005-05-25} (before history)' '\n+test_expect_success 'Query main@{2005-05-25} (before history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify master@{2005-05-25} >o 2>e &&\n+\tgit rev-parse --verify main@{2005-05-25} >o 2>e &&\n \techo \"$C\" >expect &&\n \ttest_cmp expect o &&\n-\techo \"warning: log for '\\''master'\\'' only goes back to $ed\" >expect &&\n+\techo \"warning: log for '\\''main'\\'' only goes back to $ed\" >expect &&\n \ttest_i18ncmp expect e\n '\n-test_expect_success 'Query \"master@{May 26 2005 23:31:59}\" (1 second before history)' '\n+test_expect_success 'Query \"main@{May 26 2005 23:31:59}\" (1 second before history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{May 26 2005 23:31:59}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{May 26 2005 23:31:59}\" >o 2>e &&\n \techo \"$C\" >expect &&\n \ttest_cmp expect o &&\n-\techo \"warning: log for '\\''master'\\'' only goes back to $ed\" >expect &&\n+\techo \"warning: log for '\\''main'\\'' only goes back to $ed\" >expect &&\n \ttest_i18ncmp expect e\n '\n-test_expect_success 'Query \"master@{May 26 2005 23:32:00}\" (exactly history start)' '\n+test_expect_success 'Query \"main@{May 26 2005 23:32:00}\" (exactly history start)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{May 26 2005 23:32:00}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{May 26 2005 23:32:00}\" >o 2>e &&\n \techo \"$C\" >expect &&\n \ttest_cmp expect o &&\n \ttest_must_be_empty e\n '\n-test_expect_success 'Query \"master@{May 26 2005 23:32:30}\" (first non-creation change)' '\n+test_expect_success 'Query \"main@{May 26 2005 23:32:30}\" (first non-creation change)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{May 26 2005 23:32:30}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{May 26 2005 23:32:30}\" >o 2>e &&\n \techo \"$A\" >expect &&\n \ttest_cmp expect o &&\n \ttest_must_be_empty e\n '\n-test_expect_success 'Query \"master@{2005-05-26 23:33:01}\" (middle of history with gap)' '\n+test_expect_success 'Query \"main@{2005-05-26 23:33:01}\" (middle of history with gap)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{2005-05-26 23:33:01}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{2005-05-26 23:33:01}\" >o 2>e &&\n \techo \"$B\" >expect &&\n \ttest_cmp expect o &&\n \ttest_i18ngrep -F \"warning: log for ref $m has gap after $gd\" e\n '\n-test_expect_success 'Query \"master@{2005-05-26 23:38:00}\" (middle of history)' '\n+test_expect_success 'Query \"main@{2005-05-26 23:38:00}\" (middle of history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{2005-05-26 23:38:00}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{2005-05-26 23:38:00}\" >o 2>e &&\n \techo \"$Z\" >expect &&\n \ttest_cmp expect o &&\n \ttest_must_be_empty e\n '\n-test_expect_success 'Query \"master@{2005-05-26 23:43:00}\" (exact end of history)' '\n+test_expect_success 'Query \"main@{2005-05-26 23:43:00}\" (exact end of history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{2005-05-26 23:43:00}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{2005-05-26 23:43:00}\" >o 2>e &&\n \techo \"$E\" >expect &&\n \ttest_cmp expect o &&\n \ttest_must_be_empty e\n '\n-test_expect_success 'Query \"master@{2005-05-28}\" (past end of history)' '\n+test_expect_success 'Query \"main@{2005-05-28}\" (past end of history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{2005-05-28}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{2005-05-28}\" >o 2>e &&\n \techo \"$D\" >expect &&\n \ttest_cmp expect o &&\n \ttest_i18ngrep -F \"warning: log for ref $m unexpectedly ended on $ld\" e\n@@ -461,14 +461,14 @@ test_expect_success 'git commit logged updates' '\n '\n unset h_TEST h_OTHER h_FIXED h_MERGED\n \n-test_expect_success 'git cat-file blob master:F (expect OTHER)' '\n-\ttest OTHER = $(git cat-file blob master:F)\n+test_expect_success 'git cat-file blob main:F (expect OTHER)' '\n+\ttest OTHER = $(git cat-file blob main:F)\n '\n-test_expect_success 'git cat-file blob master@{2005-05-26 23:30}:F (expect TEST)' '\n-\ttest TEST = $(git cat-file blob \"master@{2005-05-26 23:30}:F\")\n+test_expect_success 'git cat-file blob main@{2005-05-26 23:30}:F (expect TEST)' '\n+\ttest TEST = $(git cat-file blob \"main@{2005-05-26 23:30}:F\")\n '\n-test_expect_success 'git cat-file blob master@{2005-05-26 23:42}:F (expect OTHER)' '\n-\ttest OTHER = $(git cat-file blob \"master@{2005-05-26 23:42}:F\")\n+test_expect_success 'git cat-file blob main@{2005-05-26 23:42}:F (expect OTHER)' '\n+\ttest OTHER = $(git cat-file blob \"main@{2005-05-26 23:42}:F\")\n '\n \n # Test adding and deleting pseudorefs\n@@ -580,9 +580,9 @@ test_expect_success 'stdin fails on unknown command' '\n '\n \n test_expect_success 'stdin fails on unbalanced quotes' '\n-\techo \"create $a \\\"master\" >stdin &&\n+\techo \"create $a \\\"main\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n-\tgrep \"fatal: badly quoted argument: \\\\\\\"master\" err\n+\tgrep \"fatal: badly quoted argument: \\\\\\\"main\" err\n '\n \n test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin fails on invalid escape' '\n@@ -592,9 +592,9 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin fails on invalid escape' '\n '\n \n test_expect_success 'stdin fails on junk after quoted argument' '\n-\techo \"create \\\"$a\\\"master\" >stdin &&\n+\techo \"create \\\"$a\\\"main\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n-\tgrep \"fatal: unexpected character after quoted argument: \\\\\\\"$a\\\\\\\"master\" err\n+\tgrep \"fatal: unexpected character after quoted argument: \\\\\\\"$a\\\\\\\"main\" err\n '\n \n test_expect_success 'stdin fails create with no ref' '\ndiff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh\nindex 98e4a8613b..c19fa344d1 100755\n--- a/t/t1402-check-ref-format.sh\n+++ b/t/t1402-check-ref-format.sh\n@@ -134,15 +134,15 @@ valid_ref !MINGW \"$ref\" '--refspec-pattern --allow-onelevel --normalize'\n test_expect_success \"check-ref-format --branch @{-1}\" '\n \tT=$(git write-tree) &&\n \tsha1=$(echo A | git commit-tree $T) &&\n-\tgit update-ref refs/heads/master $sha1 &&\n-\tgit update-ref refs/remotes/origin/master $sha1 &&\n-\tgit checkout master &&\n-\tgit checkout origin/master &&\n-\tgit checkout master &&\n+\tgit update-ref refs/heads/main $sha1 &&\n+\tgit update-ref refs/remotes/origin/main $sha1 &&\n+\tgit checkout main &&\n+\tgit checkout origin/main &&\n+\tgit checkout main &&\n \trefname=$(git check-ref-format --branch @{-1}) &&\n \ttest \"$refname\" = \"$sha1\" &&\n \trefname2=$(git check-ref-format --branch @{-2}) &&\n-\ttest \"$refname2\" = master'\n+\ttest \"$refname2\" = main'\n \n test_expect_success 'check-ref-format --branch -naster' '\n \ttest_must_fail git check-ref-format --branch -naster >actual &&\n@@ -154,11 +154,11 @@ test_expect_success 'check-ref-format --branch from subdir' '\n \n \tT=$(git write-tree) &&\n \tsha1=$(echo A | git commit-tree $T) &&\n-\tgit update-ref refs/heads/master $sha1 &&\n-\tgit update-ref refs/remotes/origin/master $sha1 &&\n-\tgit checkout master &&\n-\tgit checkout origin/master &&\n-\tgit checkout master &&\n+\tgit update-ref refs/heads/main $sha1 &&\n+\tgit update-ref refs/remotes/origin/main $sha1 &&\n+\tgit checkout main &&\n+\tgit checkout origin/main &&\n+\tgit checkout main &&\n \trefname=$(\n \t\tcd subdir &&\n \t\tgit check-ref-format --branch @{-1}\n@@ -171,9 +171,9 @@ test_expect_success 'check-ref-format --branch @{-1} from non-repo' '\n \ttest_must_be_empty actual\n '\n \n-test_expect_success 'check-ref-format --branch master from non-repo' '\n-\techo master >expect &&\n-\tnongit git check-ref-format --branch master >actual &&\n+test_expect_success 'check-ref-format --branch main from non-repo' '\n+\techo main >expect &&\n+\tnongit git check-ref-format --branch main >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t1403-show-ref.sh b/t/t1403-show-ref.sh\nindex 5d955c3bff..681b7022c3 100755\n--- a/t/t1403-show-ref.sh\n+++ b/t/t1403-show-ref.sh\n@@ -9,7 +9,7 @@ test_expect_success setup '\n \tgit checkout -b side &&\n \ttest_commit B &&\n \tgit tag -f -a -m \"annotated B\" B &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit C &&\n \tgit branch B A^0\n '\n@@ -92,23 +92,23 @@ test_expect_success 'show-ref -d' '\n \tgit show-ref --verify -d refs/tags/A refs/tags/C >actual &&\n \ttest_cmp expect actual &&\n \n-\techo $(git rev-parse refs/heads/master) refs/heads/master >expect &&\n-\tgit show-ref -d master >actual &&\n+\techo $(git rev-parse refs/heads/main) refs/heads/main >expect &&\n+\tgit show-ref -d main >actual &&\n \ttest_cmp expect actual &&\n \n-\tgit show-ref -d heads/master >actual &&\n+\tgit show-ref -d heads/main >actual &&\n \ttest_cmp expect actual &&\n \n-\tgit show-ref -d refs/heads/master >actual &&\n+\tgit show-ref -d refs/heads/main >actual &&\n \ttest_cmp expect actual &&\n \n-\tgit show-ref -d --verify refs/heads/master >actual &&\n+\tgit show-ref -d --verify refs/heads/main >actual &&\n \ttest_cmp expect actual &&\n \n-\ttest_must_fail git show-ref -d --verify master >actual &&\n+\ttest_must_fail git show-ref -d --verify main >actual &&\n \ttest_must_be_empty actual &&\n \n-\ttest_must_fail git show-ref -d --verify heads/master >actual &&\n+\ttest_must_fail git show-ref -d --verify heads/main >actual &&\n \ttest_must_be_empty actual &&\n \n \ttest_must_fail git show-ref --verify -d A C >actual &&\n@@ -120,7 +120,7 @@ test_expect_success 'show-ref -d' '\n '\n \n test_expect_success 'show-ref --heads, --tags, --head, pattern' '\n-\tfor branch in B master side\n+\tfor branch in B main side\n \tdo\n \t\techo $(git rev-parse refs/heads/$branch) refs/heads/$branch\n \tdone >expect.heads &&\ndiff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh\nindex 74af927fba..5661df799b 100755\n--- a/t/t1405-main-ref-store.sh\n+++ b/t/t1405-main-ref-store.sh\n@@ -21,9 +21,9 @@ test_expect_success 'peel_ref(new-tag)' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'create_symref(FOO, refs/heads/master)' '\n-\t$RUN create-symref FOO refs/heads/master nothing &&\n-\techo refs/heads/master >expected &&\n+test_expect_success 'create_symref(FOO, refs/heads/main)' '\n+\t$RUN create-symref FOO refs/heads/main nothing &&\n+\techo refs/heads/main >expected &&\n \tgit symbolic-ref FOO >actual &&\n \ttest_cmp expected actual\n '\n@@ -31,7 +31,7 @@ test_expect_success 'create_symref(FOO, refs/heads/master)' '\n test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' '\n \tgit rev-parse FOO -- &&\n \tgit rev-parse refs/tags/new-tag -- &&\n-\tm=$(git rev-parse master) &&\n+\tm=$(git rev-parse main) &&\n \tREF_NO_DEREF=1 &&\n \t$RUN delete-refs $REF_NO_DEREF nothing FOO refs/tags/new-tag &&\n \ttest_must_fail git rev-parse --symbolic-full-name FOO &&\n@@ -39,19 +39,19 @@ test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' '\n \ttest_must_fail git rev-parse refs/tags/new-tag --\n '\n \n-test_expect_success 'rename_refs(master, new-master)' '\n-\tgit rev-parse master >expected &&\n-\t$RUN rename-ref refs/heads/master refs/heads/new-master &&\n-\tgit rev-parse new-master >actual &&\n+test_expect_success 'rename_refs(main, new-main)' '\n+\tgit rev-parse main >expected &&\n+\t$RUN rename-ref refs/heads/main refs/heads/new-main &&\n+\tgit rev-parse new-main >actual &&\n \ttest_cmp expected actual &&\n-\ttest_commit recreate-master\n+\ttest_commit recreate-main\n '\n \n test_expect_success 'for_each_ref(refs/heads/)' '\n \t$RUN for-each-ref refs/heads/ | cut -d\" \" -f 2- >actual &&\n \tcat >expected <<-\\EOF &&\n-\tmaster 0x0\n-\tnew-master 0x0\n+\tmain 0x0\n+\tnew-main 0x0\n \tEOF\n \ttest_cmp expected actual\n '\n@@ -62,23 +62,23 @@ test_expect_success 'for_each_ref() is sorted' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'resolve_ref(new-master)' '\n-\tSHA1=`git rev-parse new-master` &&\n-\techo \"$SHA1 refs/heads/new-master 0x0\" >expected &&\n-\t$RUN resolve-ref refs/heads/new-master 0 >actual &&\n+test_expect_success 'resolve_ref(new-main)' '\n+\tSHA1=`git rev-parse new-main` &&\n+\techo \"$SHA1 refs/heads/new-main 0x0\" >expected &&\n+\t$RUN resolve-ref refs/heads/new-main 0 >actual &&\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'verify_ref(new-master)' '\n-\t$RUN verify-ref refs/heads/new-master\n+test_expect_success 'verify_ref(new-main)' '\n+\t$RUN verify-ref refs/heads/new-main\n '\n \n test_expect_success 'for_each_reflog()' '\n \t$RUN for-each-reflog | sort -k2 | cut -d\" \" -f 2- >actual &&\n \tcat >expected <<-\\EOF &&\n \tHEAD 0x1\n-\trefs/heads/master 0x0\n-\trefs/heads/new-master 0x0\n+\trefs/heads/main 0x0\n+\trefs/heads/new-main 0x0\n \tEOF\n \ttest_cmp expected actual\n '\n@@ -86,12 +86,12 @@ test_expect_success 'for_each_reflog()' '\n test_expect_success 'for_each_reflog_ent()' '\n \t$RUN for-each-reflog-ent HEAD >actual &&\n \thead -n1 actual | grep one &&\n-\ttail -n2 actual | head -n1 | grep recreate-master\n+\ttail -n2 actual | head -n1 | grep recreate-main\n '\n \n test_expect_success 'for_each_reflog_ent_reverse()' '\n \t$RUN for-each-reflog-ent-reverse HEAD >actual &&\n-\thead -n1 actual | grep recreate-master &&\n+\thead -n1 actual | grep recreate-main &&\n \ttail -n2 actual | head -n1 | grep one\n '\n \ndiff --git a/t/t1406-submodule-ref-store.sh b/t/t1406-submodule-ref-store.sh\nindex 36b7ef5046..e3e3b9c84c 100755\n--- a/t/t1406-submodule-ref-store.sh\n+++ b/t/t1406-submodule-ref-store.sh\n@@ -11,7 +11,7 @@ test_expect_success 'setup' '\n \t(\n \t\tcd sub &&\n \t\ttest_commit first &&\n-\t\tgit checkout -b new-master\n+\t\tgit checkout -b new-main\n \t)\n '\n \n@@ -27,7 +27,7 @@ test_expect_success 'peel_ref(new-tag)' '\n '\n \n test_expect_success 'create_symref() not allowed' '\n-\ttest_must_fail $RUN create-symref FOO refs/heads/master nothing\n+\ttest_must_fail $RUN create-symref FOO refs/heads/main nothing\n '\n \n test_expect_success 'delete_refs() not allowed' '\n@@ -35,14 +35,14 @@ test_expect_success 'delete_refs() not allowed' '\n '\n \n test_expect_success 'rename_refs() not allowed' '\n-\ttest_must_fail $RUN rename-ref refs/heads/master refs/heads/new-master\n+\ttest_must_fail $RUN rename-ref refs/heads/main refs/heads/new-main\n '\n \n test_expect_success 'for_each_ref(refs/heads/)' '\n \t$RUN for-each-ref refs/heads/ | cut -d\" \" -f 2- >actual &&\n \tcat >expected <<-\\EOF &&\n-\tmaster 0x0\n-\tnew-master 0x0\n+\tmain 0x0\n+\tnew-main 0x0\n \tEOF\n \ttest_cmp expected actual\n '\n@@ -53,23 +53,23 @@ test_expect_success 'for_each_ref() is sorted' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'resolve_ref(master)' '\n-\tSHA1=`git -C sub rev-parse master` &&\n-\techo \"$SHA1 refs/heads/master 0x0\" >expected &&\n-\t$RUN resolve-ref refs/heads/master 0 >actual &&\n+test_expect_success 'resolve_ref(main)' '\n+\tSHA1=`git -C sub rev-parse main` &&\n+\techo \"$SHA1 refs/heads/main 0x0\" >expected &&\n+\t$RUN resolve-ref refs/heads/main 0 >actual &&\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'verify_ref(new-master)' '\n-\t$RUN verify-ref refs/heads/new-master\n+test_expect_success 'verify_ref(new-main)' '\n+\t$RUN verify-ref refs/heads/new-main\n '\n \n test_expect_success 'for_each_reflog()' '\n \t$RUN for-each-reflog | sort | cut -d\" \" -f 2- >actual &&\n \tcat >expected <<-\\EOF &&\n \tHEAD 0x1\n-\trefs/heads/master 0x0\n-\trefs/heads/new-master 0x0\n+\trefs/heads/main 0x0\n+\trefs/heads/new-main 0x0\n \tEOF\n \ttest_cmp expected actual\n '\n@@ -77,12 +77,12 @@ test_expect_success 'for_each_reflog()' '\n test_expect_success 'for_each_reflog_ent()' '\n \t$RUN for-each-reflog-ent HEAD >actual &&\n \thead -n1 actual | grep first &&\n-\ttail -n2 actual | head -n1 | grep master.to.new\n+\ttail -n2 actual | head -n1 | grep main.to.new\n '\n \n test_expect_success 'for_each_reflog_ent_reverse()' '\n \t$RUN for-each-reflog-ent-reverse HEAD >actual &&\n-\thead -n1 actual | grep master.to.new &&\n+\thead -n1 actual | grep main.to.new &&\n \ttail -n2 actual | head -n1 | grep first\n '\n \ndiff --git a/t/t1407-worktree-ref-store.sh b/t/t1407-worktree-ref-store.sh\nindex 9a84858118..71059cb254 100755\n--- a/t/t1407-worktree-ref-store.sh\n+++ b/t/t1407-worktree-ref-store.sh\n@@ -9,7 +9,7 @@ RMAIN=\"test-tool ref-store worktree:main\"\n \n test_expect_success 'setup' '\n \ttest_commit first &&\n-\tgit worktree add -b wt-master wt &&\n+\tgit worktree add -b wt-main wt &&\n \t(\n \t\tcd wt &&\n \t\ttest_commit second\n@@ -17,34 +17,34 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'resolve_ref(<shared-ref>)' '\n-\tSHA1=`git rev-parse master` &&\n-\techo \"$SHA1 refs/heads/master 0x0\" >expected &&\n-\t$RWT resolve-ref refs/heads/master 0 >actual &&\n+\tSHA1=`git rev-parse main` &&\n+\techo \"$SHA1 refs/heads/main 0x0\" >expected &&\n+\t$RWT resolve-ref refs/heads/main 0 >actual &&\n \ttest_cmp expected actual &&\n-\t$RMAIN resolve-ref refs/heads/master 0 >actual &&\n+\t$RMAIN resolve-ref refs/heads/main 0 >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'resolve_ref(<per-worktree-ref>)' '\n \tSHA1=`git -C wt rev-parse HEAD` &&\n-\techo \"$SHA1 refs/heads/wt-master 0x1\" >expected &&\n+\techo \"$SHA1 refs/heads/wt-main 0x1\" >expected &&\n \t$RWT resolve-ref HEAD 0 >actual &&\n \ttest_cmp expected actual &&\n \n \tSHA1=`git rev-parse HEAD` &&\n-\techo \"$SHA1 refs/heads/master 0x1\" >expected &&\n+\techo \"$SHA1 refs/heads/main 0x1\" >expected &&\n \t$RMAIN resolve-ref HEAD 0 >actual &&\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'create_symref(FOO, refs/heads/master)' '\n-\t$RWT create-symref FOO refs/heads/master nothing &&\n-\techo refs/heads/master >expected &&\n+test_expect_success 'create_symref(FOO, refs/heads/main)' '\n+\t$RWT create-symref FOO refs/heads/main nothing &&\n+\techo refs/heads/main >expected &&\n \tgit -C wt symbolic-ref FOO >actual &&\n \ttest_cmp expected actual &&\n \n-\t$RMAIN create-symref FOO refs/heads/wt-master nothing &&\n-\techo refs/heads/wt-master >expected &&\n+\t$RMAIN create-symref FOO refs/heads/wt-main nothing &&\n+\techo refs/heads/wt-main >expected &&\n \tgit symbolic-ref FOO >actual &&\n \ttest_cmp expected actual\n '\n@@ -63,8 +63,8 @@ test_expect_success 'for_each_reflog()' '\n \tHEAD 0x1\n \tPSEUDO-WT 0x0\n \trefs/bisect/wt-random 0x0\n-\trefs/heads/master 0x0\n-\trefs/heads/wt-master 0x0\n+\trefs/heads/main 0x0\n+\trefs/heads/wt-main 0x0\n \tEOF\n \ttest_cmp expected actual &&\n \n@@ -73,8 +73,8 @@ test_expect_success 'for_each_reflog()' '\n \tHEAD 0x1\n \tPSEUDO-MAIN 0x0\n \trefs/bisect/random 0x0\n-\trefs/heads/master 0x0\n-\trefs/heads/wt-master 0x0\n+\trefs/heads/main 0x0\n+\trefs/heads/wt-main 0x0\n \tEOF\n \ttest_cmp expected actual\n '\ndiff --git a/t/t1408-packed-refs.sh b/t/t1408-packed-refs.sh\nindex 1e44a17eea..f40e7af8ce 100755\n--- a/t/t1408-packed-refs.sh\n+++ b/t/t1408-packed-refs.sh\n@@ -9,32 +9,32 @@ test_expect_success setup '\n \tgit commit --allow-empty -m one &&\n \tone=$(git rev-parse HEAD) &&\n \tgit for-each-ref >actual &&\n-\techo \"$one commit\trefs/heads/master\" >expect &&\n+\techo \"$one commit\trefs/heads/main\" >expect &&\n \ttest_cmp expect actual &&\n \n \tgit pack-refs --all &&\n \tgit for-each-ref >actual &&\n-\techo \"$one commit\trefs/heads/master\" >expect &&\n+\techo \"$one commit\trefs/heads/main\" >expect &&\n \ttest_cmp expect actual &&\n \n \tgit checkout --orphan another &&\n \ttest_tick &&\n \tgit commit --allow-empty -m two &&\n \ttwo=$(git rev-parse HEAD) &&\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tgit branch -D another &&\n \n \tgit for-each-ref >actual &&\n-\techo \"$two commit\trefs/heads/master\" >expect &&\n+\techo \"$two commit\trefs/heads/main\" >expect &&\n \ttest_cmp expect actual &&\n \n \tgit reflog expire --expire=now --all &&\n \tgit prune &&\n-\tgit tag -m v1.0 v1.0 master\n+\tgit tag -m v1.0 v1.0 main\n '\n \n test_expect_success 'no error from stale entry in packed-refs' '\n-\tgit describe master >actual 2>&1 &&\n+\tgit describe main >actual 2>&1 &&\n \techo \"v1.0\" >expect &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh\nindex 730a43d9dd..8553141434 100755\n--- a/t/t1410-reflog.sh\n+++ b/t/t1410-reflog.sh\n@@ -99,7 +99,7 @@ test_expect_success setup '\n \n \tcheck_fsck &&\n \n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 4 output\n '\n \n@@ -116,7 +116,7 @@ test_expect_success rewind '\n \n \tcheck_have A B C D E F G H I J K L &&\n \n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 5 output\n '\n \n@@ -135,7 +135,7 @@ test_expect_success 'reflog expire --dry-run should not touch reflog' '\n \t\t--stale-fix \\\n \t\t--all &&\n \n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 5 output &&\n \n \tcheck_fsck \"missing blob $F\"\n@@ -149,7 +149,7 @@ test_expect_success 'reflog expire' '\n \t\t--stale-fix \\\n \t\t--all &&\n \n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 2 output &&\n \n \tcheck_fsck \"dangling commit $K\"\n@@ -186,29 +186,29 @@ test_expect_success 'delete' '\n \tgit commit -m tiger C &&\n \n \tHEAD_entry_count=$(git reflog | wc -l) &&\n-\tmaster_entry_count=$(git reflog show master | wc -l) &&\n+\tmain_entry_count=$(git reflog show main | wc -l) &&\n \n \ttest $HEAD_entry_count = 5 &&\n-\ttest $master_entry_count = 5 &&\n+\ttest $main_entry_count = 5 &&\n \n \n-\tgit reflog delete master@{1} &&\n-\tgit reflog show master > output &&\n-\ttest_line_count = $(($master_entry_count - 1)) output &&\n+\tgit reflog delete main@{1} &&\n+\tgit reflog show main > output &&\n+\ttest_line_count = $(($main_entry_count - 1)) output &&\n \ttest $HEAD_entry_count = $(git reflog | wc -l) &&\n \t! grep ox < output &&\n \n-\tmaster_entry_count=$(wc -l < output) &&\n+\tmain_entry_count=$(wc -l < output) &&\n \n \tgit reflog delete HEAD@{1} &&\n \ttest $(($HEAD_entry_count -1)) = $(git reflog | wc -l) &&\n-\ttest $master_entry_count = $(git reflog show master | wc -l) &&\n+\ttest $main_entry_count = $(git reflog show main | wc -l) &&\n \n \tHEAD_entry_count=$(git reflog | wc -l) &&\n \n-\tgit reflog delete master@{07.04.2005.15:15:00.-0700} &&\n-\tgit reflog show master > output &&\n-\ttest_line_count = $(($master_entry_count - 1)) output &&\n+\tgit reflog delete main@{07.04.2005.15:15:00.-0700} &&\n+\tgit reflog show main > output &&\n+\ttest_line_count = $(($main_entry_count - 1)) output &&\n \t! grep dragon < output\n \n '\n@@ -216,7 +216,7 @@ test_expect_success 'delete' '\n test_expect_success 'rewind2' '\n \n \ttest_tick && git reset --hard HEAD~2 &&\n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 4 output\n '\n \n@@ -226,7 +226,7 @@ test_expect_success '--expire=never' '\n \t\t--expire=never \\\n \t\t--expire-unreachable=never \\\n \t\t--all &&\n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 4 output\n '\n \n@@ -237,7 +237,7 @@ test_expect_success 'gc.reflogexpire=never' '\n \tgit reflog expire --verbose --all >output &&\n \ttest_line_count = 9 output &&\n \n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 4 output\n '\n \n@@ -246,7 +246,7 @@ test_expect_success 'gc.reflogexpire=false' '\n \ttest_config gc.reflogexpireunreachable false &&\n \n \tgit reflog expire --verbose --all &&\n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 4 output\n \n '\n@@ -255,33 +255,33 @@ test_expect_success 'git reflog expire unknown reference' '\n \ttest_config gc.reflogexpire never &&\n \ttest_config gc.reflogexpireunreachable never &&\n \n-\ttest_must_fail git reflog expire master@{123} 2>stderr &&\n+\ttest_must_fail git reflog expire main@{123} 2>stderr &&\n \ttest_i18ngrep \"points nowhere\" stderr &&\n \ttest_must_fail git reflog expire does-not-exist 2>stderr &&\n \ttest_i18ngrep \"points nowhere\" stderr\n '\n \n test_expect_success 'checkout should not delete log for packed ref' '\n-\ttest $(git reflog master | wc -l) = 4 &&\n+\ttest $(git reflog main | wc -l) = 4 &&\n \tgit branch foo &&\n \tgit pack-refs --all &&\n \tgit checkout foo &&\n-\ttest $(git reflog master | wc -l) = 4\n+\ttest $(git reflog main | wc -l) = 4\n '\n \n test_expect_success 'stale dirs do not cause d/f conflicts (reflogs on)' '\n \ttest_when_finished \"git branch -d one || git branch -d one/two\" &&\n \n-\tgit branch one/two master &&\n-\techo \"one/two@{0} branch: Created from master\" >expect &&\n+\tgit branch one/two main &&\n+\techo \"one/two@{0} branch: Created from main\" >expect &&\n \tgit log -g --format=\"%gd %gs\" one/two >actual &&\n \ttest_cmp expect actual &&\n \tgit branch -d one/two &&\n \n \t# now logs/refs/heads/one is a stale directory, but\n \t# we should move it out of the way to create \"one\" reflog\n-\tgit branch one master &&\n-\techo \"one@{0} branch: Created from master\" >expect &&\n+\tgit branch one main &&\n+\techo \"one@{0} branch: Created from main\" >expect &&\n \tgit log -g --format=\"%gd %gs\" one >actual &&\n \ttest_cmp expect actual\n '\n@@ -289,15 +289,15 @@ test_expect_success 'stale dirs do not cause d/f conflicts (reflogs on)' '\n test_expect_success 'stale dirs do not cause d/f conflicts (reflogs off)' '\n \ttest_when_finished \"git branch -d one || git branch -d one/two\" &&\n \n-\tgit branch one/two master &&\n-\techo \"one/two@{0} branch: Created from master\" >expect &&\n+\tgit branch one/two main &&\n+\techo \"one/two@{0} branch: Created from main\" >expect &&\n \tgit log -g --format=\"%gd %gs\" one/two >actual &&\n \ttest_cmp expect actual &&\n \tgit branch -d one/two &&\n \n \t# same as before, but we only create a reflog for \"one\" if\n \t# it already exists, which it does not\n-\tgit -c core.logallrefupdates=false branch one master &&\n+\tgit -c core.logallrefupdates=false branch one main &&\n \tgit log -g --format=\"%gd %gs\" one >actual &&\n \ttest_must_be_empty actual\n '\ndiff --git a/t/t1411-reflog-show.sh b/t/t1411-reflog-show.sh\nindex 985daf1def..333b35aebc 100755\n--- a/t/t1411-reflog-show.sh\n+++ b/t/t1411-reflog-show.sh\n@@ -167,7 +167,7 @@ test_expect_success 'git log -g -p shows diffs vs. parents' '\n '\n \n test_expect_success 'reflog exists works' '\n-\tgit reflog exists refs/heads/master &&\n+\tgit reflog exists refs/heads/main &&\n \t! git reflog exists refs/heads/nonexistent\n '\n \ndiff --git a/t/t1413-reflog-detach.sh b/t/t1413-reflog-detach.sh\nindex c730600d8a..b1f7f35fe9 100755\n--- a/t/t1413-reflog-detach.sh\n+++ b/t/t1413-reflog-detach.sh\n@@ -4,7 +4,7 @@ test_description='Test reflog interaction with detached HEAD'\n . ./test-lib.sh\n \n reset_state () {\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcp saved_reflog .git/logs/HEAD\n }\n \n@@ -19,14 +19,14 @@ test_expect_success setup '\n \n test_expect_success baseline '\n \treset_state &&\n-\tgit rev-parse master master^ >expect &&\n+\tgit rev-parse main main^ >expect &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'switch to branch' '\n \treset_state &&\n-\tgit rev-parse side master master^ >expect &&\n+\tgit rev-parse side main main^ >expect &&\n \tgit checkout side &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\n@@ -34,34 +34,34 @@ test_expect_success 'switch to branch' '\n \n test_expect_success 'detach to other' '\n \treset_state &&\n-\tgit rev-parse master side master master^ >expect &&\n+\tgit rev-parse main side main main^ >expect &&\n \tgit checkout side &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'detach to self' '\n \treset_state &&\n-\tgit rev-parse master master master^ >expect &&\n-\tgit checkout master^0 &&\n+\tgit rev-parse main main main^ >expect &&\n+\tgit checkout main^0 &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'attach to self' '\n \treset_state &&\n-\tgit rev-parse master master master master^ >expect &&\n-\tgit checkout master^0 &&\n-\tgit checkout master &&\n+\tgit rev-parse main main main main^ >expect &&\n+\tgit checkout main^0 &&\n+\tgit checkout main &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'attach to other' '\n \treset_state &&\n-\tgit rev-parse side master master master^ >expect &&\n-\tgit checkout master^0 &&\n+\tgit rev-parse side main main main^ >expect &&\n+\tgit checkout main^0 &&\n \tgit checkout side &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\ndiff --git a/t/t1414-reflog-walk.sh b/t/t1414-reflog-walk.sh\nindex 1181a9fb28..89458b7158 100755\n--- a/t/t1414-reflog-walk.sh\n+++ b/t/t1414-reflog-walk.sh\n@@ -8,7 +8,7 @@ test_expect_success 'set up some reflog entries' '\n \ttest_commit two &&\n \tgit checkout -b side HEAD^ &&\n \ttest_commit three &&\n-\tgit merge --no-commit master &&\n+\tgit merge --no-commit main &&\n \techo evil-merge-content >>one.t &&\n \ttest_tick &&\n \tgit commit --no-edit -a\n@@ -20,9 +20,9 @@ do_walk () {\n \n test_expect_success 'set up expected reflog' '\n \tcat >expect.all <<-EOF\n-\tHEAD@{0} commit (merge): Merge branch ${SQ}master${SQ} into side\n+\tHEAD@{0} commit (merge): Merge branch ${SQ}main${SQ} into side\n \tHEAD@{1} commit: three\n-\tHEAD@{2} checkout: moving from master to side\n+\tHEAD@{2} checkout: moving from main to side\n \tHEAD@{3} commit: two\n \tHEAD@{4} commit (initial): one\n \tEOF\n@@ -73,15 +73,15 @@ test_expect_success 'walking multiple reflogs shows all' '\n \t#      sort ignores the bits after the timestamp.\n \t#\n \t#   2. POSIX leaves undefined whether this is a stable sort or not. So\n-\t#      we use \"-k 1\" to ensure that we see HEAD before master before\n+\t#      we use \"-k 1\" to ensure that we see HEAD before main before\n \t#      side when breaking ties.\n \t{\n \t\tdo_walk --date=unix HEAD &&\n \t\tdo_walk --date=unix side &&\n-\t\tdo_walk --date=unix master\n+\t\tdo_walk --date=unix main\n \t} >expect.raw &&\n \tsort -t \"{\" -k 2nr -k 1 <expect.raw >expect &&\n-\tdo_walk --date=unix HEAD master side >actual &&\n+\tdo_walk --date=unix HEAD main side >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t1416-ref-transaction-hooks.sh b/t/t1416-ref-transaction-hooks.sh\nindex f6e741c6c0..4cabc07c86 100755\n--- a/t/t1416-ref-transaction-hooks.sh\n+++ b/t/t1416-ref-transaction-hooks.sh\n@@ -53,11 +53,11 @@ test_expect_success 'hook gets all queued updates in prepared state' '\n \tEOF\n \tcat >expect <<-EOF &&\n \t\t$ZERO_OID $POST_OID HEAD\n-\t\t$ZERO_OID $POST_OID refs/heads/master\n+\t\t$ZERO_OID $POST_OID refs/heads/main\n \tEOF\n \tgit update-ref HEAD POST <<-EOF &&\n \t\tupdate HEAD $ZERO_OID $POST_OID\n-\t\tupdate refs/heads/master $ZERO_OID $POST_OID\n+\t\tupdate refs/heads/main $ZERO_OID $POST_OID\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -76,7 +76,7 @@ test_expect_success 'hook gets all queued updates in committed state' '\n \tEOF\n \tcat >expect <<-EOF &&\n \t\t$ZERO_OID $POST_OID HEAD\n-\t\t$ZERO_OID $POST_OID refs/heads/master\n+\t\t$ZERO_OID $POST_OID refs/heads/main\n \tEOF\n \tgit update-ref HEAD POST &&\n \ttest_cmp expect actual\n@@ -96,12 +96,12 @@ test_expect_success 'hook gets all queued updates in aborted state' '\n \tEOF\n \tcat >expect <<-EOF &&\n \t\t$ZERO_OID $POST_OID HEAD\n-\t\t$ZERO_OID $POST_OID refs/heads/master\n+\t\t$ZERO_OID $POST_OID refs/heads/main\n \tEOF\n \tgit update-ref --stdin <<-EOF &&\n \t\tstart\n \t\tupdate HEAD POST $ZERO_OID\n-\t\tupdate refs/heads/master POST $ZERO_OID\n+\t\tupdate refs/heads/main POST $ZERO_OID\n \t\tabort\n \tEOF\n \ttest_cmp expect actual\ndiff --git a/t/t1430-bad-ref-name.sh b/t/t1430-bad-ref-name.sh\nindex c7878a60ed..fcc0194d7e 100755\n--- a/t/t1430-bad-ref-name.sh\n+++ b/t/t1430-bad-ref-name.sh\n@@ -17,7 +17,7 @@ test_expect_success 'fast-import: fail on invalid branch name \".badbranchname\"'\n \t\tcorrupt\n \t\tCOMMIT\n \n-\t\tfrom refs/heads/master\n+\t\tfrom refs/heads/main\n \n \tINPUT_END\n \ttest_must_fail git fast-import <input\n@@ -32,14 +32,14 @@ test_expect_success 'fast-import: fail on invalid branch name \"bad[branch]name\"'\n \t\tcorrupt\n \t\tCOMMIT\n \n-\t\tfrom refs/heads/master\n+\t\tfrom refs/heads/main\n \n \tINPUT_END\n \ttest_must_fail git fast-import <input\n '\n \n test_expect_success 'git branch shows badly named ref as warning' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch >output 2>error &&\n \ttest_i18ngrep -e \"ignoring ref with broken name refs/heads/broken\\.\\.\\.ref\" error &&\n@@ -47,7 +47,7 @@ test_expect_success 'git branch shows badly named ref as warning' '\n '\n \n test_expect_success 'branch -d can delete badly named ref' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch -d broken...ref &&\n \tgit branch >output 2>error &&\n@@ -56,7 +56,7 @@ test_expect_success 'branch -d can delete badly named ref' '\n '\n \n test_expect_success 'branch -D can delete badly named ref' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch -D broken...ref &&\n \tgit branch >output 2>error &&\n@@ -98,17 +98,17 @@ test_expect_success 'branch -m cannot rename to a bad ref name' '\n \ttest_might_fail git branch -D goodref &&\n \tgit branch goodref &&\n \ttest_must_fail git branch -m goodref broken...ref &&\n-\ttest_cmp_rev master goodref &&\n+\ttest_cmp_rev main goodref &&\n \tgit branch >output 2>error &&\n \t! grep -e \"broken\\.\\.\\.ref\" error &&\n \t! grep -e \"broken\\.\\.\\.ref\" output\n '\n \n test_expect_failure 'branch -m can rename from a bad ref name' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch -m broken...ref renamed &&\n-\ttest_cmp_rev master renamed &&\n+\ttest_cmp_rev main renamed &&\n \tgit branch >output 2>error &&\n \t! grep -e \"broken\\.\\.\\.ref\" error &&\n \t! grep -e \"broken\\.\\.\\.ref\" output\n@@ -135,7 +135,7 @@ test_expect_failure C_LOCALE_OUTPUT 'push --mirror can delete badly named ref' '\n \t\tcd dest &&\n \t\ttest_commit two &&\n \t\tgit checkout --detach &&\n-\t\tcp .git/refs/heads/master .git/refs/heads/broken...ref\n+\t\tcp .git/refs/heads/main .git/refs/heads/broken...ref\n \t) &&\n \tgit -C src push --mirror \"file://$top/dest\" &&\n \tgit -C dest branch >output 2>error &&\n@@ -146,7 +146,7 @@ test_expect_failure C_LOCALE_OUTPUT 'push --mirror can delete badly named ref' '\n test_expect_success 'rev-parse skips symref pointing to broken name' '\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch shadow one &&\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \tprintf \"ref: refs/heads/broken...ref\\n\" >.git/refs/tags/shadow &&\n \ttest_when_finished \"rm -f .git/refs/tags/shadow\" &&\n \tgit rev-parse --verify one >expect &&\n@@ -156,11 +156,11 @@ test_expect_success 'rev-parse skips symref pointing to broken name' '\n '\n \n test_expect_success 'for-each-ref emits warnings for broken names' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tprintf \"ref: refs/heads/broken...ref\\n\" >.git/refs/heads/badname &&\n \ttest_when_finished \"rm -f .git/refs/heads/badname\" &&\n-\tprintf \"ref: refs/heads/master\\n\" >.git/refs/heads/broken...symref &&\n+\tprintf \"ref: refs/heads/main\\n\" >.git/refs/heads/broken...symref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...symref\" &&\n \tgit for-each-ref >output 2>error &&\n \t! grep -e \"broken\\.\\.\\.ref\" output &&\n@@ -172,7 +172,7 @@ test_expect_success 'for-each-ref emits warnings for broken names' '\n '\n \n test_expect_success 'update-ref -d can delete broken name' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit update-ref -d refs/heads/broken...ref >output 2>error &&\n \ttest_must_be_empty output &&\n@@ -183,7 +183,7 @@ test_expect_success 'update-ref -d can delete broken name' '\n '\n \n test_expect_success 'branch -d can delete broken name' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch -d broken...ref >output 2>error &&\n \ttest_i18ngrep \"Deleted branch broken...ref (was broken)\" output &&\n@@ -194,7 +194,7 @@ test_expect_success 'branch -d can delete broken name' '\n '\n \n test_expect_success 'update-ref --no-deref -d can delete symref to broken name' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tprintf \"ref: refs/heads/broken...ref\\n\" >.git/refs/heads/badname &&\n \ttest_when_finished \"rm -f .git/refs/heads/badname\" &&\n@@ -205,7 +205,7 @@ test_expect_success 'update-ref --no-deref -d can delete symref to broken name'\n '\n \n test_expect_success 'branch -d can delete symref to broken name' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tprintf \"ref: refs/heads/broken...ref\\n\" >.git/refs/heads/badname &&\n \ttest_when_finished \"rm -f .git/refs/heads/badname\" &&\n@@ -234,7 +234,7 @@ test_expect_success 'branch -d can delete dangling symref to broken name' '\n '\n \n test_expect_success 'update-ref -d can delete broken name through symref' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tprintf \"ref: refs/heads/broken...ref\\n\" >.git/refs/heads/badname &&\n \ttest_when_finished \"rm -f .git/refs/heads/badname\" &&\n@@ -245,7 +245,7 @@ test_expect_success 'update-ref -d can delete broken name through symref' '\n '\n \n test_expect_success 'update-ref --no-deref -d can delete symref with broken name' '\n-\tprintf \"ref: refs/heads/master\\n\" >.git/refs/heads/broken...symref &&\n+\tprintf \"ref: refs/heads/main\\n\" >.git/refs/heads/broken...symref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...symref\" &&\n \tgit update-ref --no-deref -d refs/heads/broken...symref >output 2>error &&\n \ttest_path_is_missing .git/refs/heads/broken...symref &&\n@@ -254,11 +254,11 @@ test_expect_success 'update-ref --no-deref -d can delete symref with broken name\n '\n \n test_expect_success 'branch -d can delete symref with broken name' '\n-\tprintf \"ref: refs/heads/master\\n\" >.git/refs/heads/broken...symref &&\n+\tprintf \"ref: refs/heads/main\\n\" >.git/refs/heads/broken...symref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...symref\" &&\n \tgit branch -d broken...symref >output 2>error &&\n \ttest_path_is_missing .git/refs/heads/broken...symref &&\n-\ttest_i18ngrep \"Deleted branch broken...symref (was refs/heads/master)\" output &&\n+\ttest_i18ngrep \"Deleted branch broken...symref (was refs/heads/main)\" output &&\n \ttest_must_be_empty error\n '\n \n@@ -296,37 +296,37 @@ test_expect_success 'update-ref -d cannot delete absolute path' '\n '\n \n test_expect_success 'update-ref --stdin fails create with bad ref name' '\n-\techo \"create ~a refs/heads/master\" >stdin &&\n+\techo \"create ~a refs/heads/main\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a\" err\n '\n \n test_expect_success 'update-ref --stdin fails update with bad ref name' '\n-\techo \"update ~a refs/heads/master\" >stdin &&\n+\techo \"update ~a refs/heads/main\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a\" err\n '\n \n test_expect_success 'update-ref --stdin fails delete with bad ref name' '\n-\techo \"delete ~a refs/heads/master\" >stdin &&\n+\techo \"delete ~a refs/heads/main\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a\" err\n '\n \n test_expect_success 'update-ref --stdin -z fails create with bad ref name' '\n-\tprintf \"%s\\0\" \"create ~a \" refs/heads/master >stdin &&\n+\tprintf \"%s\\0\" \"create ~a \" refs/heads/main >stdin &&\n \ttest_must_fail git update-ref -z --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a \" err\n '\n \n test_expect_success 'update-ref --stdin -z fails update with bad ref name' '\n-\tprintf \"%s\\0\" \"update ~a\" refs/heads/master \"\" >stdin &&\n+\tprintf \"%s\\0\" \"update ~a\" refs/heads/main \"\" >stdin &&\n \ttest_must_fail git update-ref -z --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a\" err\n '\n \n test_expect_success 'update-ref --stdin -z fails delete with bad ref name' '\n-\tprintf \"%s\\0\" \"delete ~a\" refs/heads/master >stdin &&\n+\tprintf \"%s\\0\" \"delete ~a\" refs/heads/main >stdin &&\n \ttest_must_fail git update-ref -z --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a\" err\n '\ndiff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh\nindex b17f5c21fb..a30fc5f74a 100755\n--- a/t/t1450-fsck.sh\n+++ b/t/t1450-fsck.sh\n@@ -3,7 +3,7 @@\n test_description='git fsck random collection of tests\n \n * (HEAD) B\n-* (master) A\n+* (main) A\n '\n \n . ./test-lib.sh\ndiff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh\nindex 408b97d5af..a85692ffff 100755\n--- a/t/t1500-rev-parse.sh\n+++ b/t/t1500-rev-parse.sh\n@@ -174,8 +174,8 @@ test_expect_success 'showing the superproject correctly' '\n \ttest_commit -C super/dir/sub branch1_commit &&\n \tgit -C super add dir/sub &&\n \ttest_commit -C super branch1_commit &&\n-\tgit -C super checkout -b branch2 master &&\n-\tgit -C super/dir/sub checkout -b branch2 master &&\n+\tgit -C super checkout -b branch2 main &&\n+\tgit -C super/dir/sub checkout -b branch2 main &&\n \ttest_commit -C super/dir/sub branch2_commit &&\n \tgit -C super add dir/sub &&\n \ttest_commit -C super branch2_commit &&\ndiff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh\nindex dc9fe3cbf1..de63186587 100755\n--- a/t/t1503-rev-parse-verify.sh\n+++ b/t/t1503-rev-parse-verify.sh\n@@ -51,8 +51,8 @@ test_expect_success 'works with one good rev' '\n \ttest \"$rev_hash3\" = \"$HASH3\" &&\n \trev_hash4=$(git rev-parse --verify $HASH4) &&\n \ttest \"$rev_hash4\" = \"$HASH4\" &&\n-\trev_master=$(git rev-parse --verify master) &&\n-\ttest \"$rev_master\" = \"$HASH4\" &&\n+\trev_main=$(git rev-parse --verify main) &&\n+\ttest \"$rev_main\" = \"$HASH4\" &&\n \trev_head=$(git rev-parse --verify HEAD) &&\n \ttest \"$rev_head\" = \"$HASH4\"\n '\n@@ -116,27 +116,27 @@ test_expect_success 'no stdout output on error' '\n '\n \n test_expect_success 'use --default' '\n-\tgit rev-parse --verify --default master &&\n-\tgit rev-parse --verify --default master HEAD &&\n-\tgit rev-parse --default master --verify &&\n-\tgit rev-parse --default master --verify HEAD &&\n-\tgit rev-parse --verify HEAD --default master &&\n-\ttest_must_fail git rev-parse --verify foo --default master &&\n+\tgit rev-parse --verify --default main &&\n+\tgit rev-parse --verify --default main HEAD &&\n+\tgit rev-parse --default main --verify &&\n+\tgit rev-parse --default main --verify HEAD &&\n+\tgit rev-parse --verify HEAD --default main &&\n+\ttest_must_fail git rev-parse --verify foo --default main &&\n \ttest_must_fail git rev-parse --default HEAD --verify bar &&\n \ttest_must_fail git rev-parse --verify --default HEAD baz &&\n \ttest_must_fail git rev-parse --default foo --verify &&\n \ttest_must_fail git rev-parse --verify --default bar\n '\n \n-test_expect_success 'master@{n} for various n' '\n+test_expect_success 'main@{n} for various n' '\n \tN=$(git reflog | wc -l) &&\n \tNm1=$(($N-1)) &&\n \tNp1=$(($N+1)) &&\n-\tgit rev-parse --verify master@{0} &&\n-\tgit rev-parse --verify master@{1} &&\n-\tgit rev-parse --verify master@{$Nm1} &&\n-\ttest_must_fail git rev-parse --verify master@{$N} &&\n-\ttest_must_fail git rev-parse --verify master@{$Np1}\n+\tgit rev-parse --verify main@{0} &&\n+\tgit rev-parse --verify main@{1} &&\n+\tgit rev-parse --verify main@{$Nm1} &&\n+\ttest_must_fail git rev-parse --verify main@{$N} &&\n+\ttest_must_fail git rev-parse --verify main@{$Np1}\n '\n \n test_expect_success SYMLINKS 'ref resolution not confused by broken symlinks' '\ndiff --git a/t/t1505-rev-parse-last.sh b/t/t1505-rev-parse-last.sh\nindex 4969edb314..a64cd4ce14 100755\n--- a/t/t1505-rev-parse-last.sh\n+++ b/t/t1505-rev-parse-last.sh\n@@ -20,12 +20,12 @@ test_expect_success 'setup' '\n \tmake_commit 3 &&\n \tgit checkout side &&\n \tmake_commit 4 &&\n-\tgit merge master &&\n-\tgit checkout master\n+\tgit merge main &&\n+\tgit checkout main\n \n '\n \n-# 1 -- 2 -- 3 master\n+# 1 -- 2 -- 3 main\n #  \\         \\\n #   \\         \\\n #    --- 4 --- 5 side\n@@ -49,7 +49,7 @@ test_expect_success '@{-1}@{1} works' '\n '\n \n test_expect_success '@{-2} works' '\n-\ttest_cmp_rev master @{-2}\n+\ttest_cmp_rev main @{-2}\n '\n \n test_expect_success '@{-3} fails' '\ndiff --git a/t/t1506-rev-parse-diagnosis.sh b/t/t1506-rev-parse-diagnosis.sh\nindex e2ae15a2cf..8b183f1de1 100755\n--- a/t/t1506-rev-parse-diagnosis.sh\n+++ b/t/t1506-rev-parse-diagnosis.sh\n@@ -137,10 +137,10 @@ test_expect_success 'incorrect file in :path and :N:path' '\n '\n \n test_expect_success 'invalid @{n} reference' '\n-\ttest_must_fail git rev-parse master@{99999} >output 2>error &&\n+\ttest_must_fail git rev-parse main@{99999} >output 2>error &&\n \ttest_must_be_empty output &&\n \ttest_i18ngrep \"log for [^ ]* only has [0-9][0-9]* entries\" error  &&\n-\ttest_must_fail git rev-parse --verify master@{99999} >output 2>error &&\n+\ttest_must_fail git rev-parse --verify main@{99999} >output 2>error &&\n \ttest_must_be_empty output &&\n \ttest_i18ngrep \"log for [^ ]* only has [0-9][0-9]* entries\" error\n '\ndiff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh\nindex dfc0d96d8a..d49998ceb6 100755\n--- a/t/t1507-rev-parse-upstream.sh\n+++ b/t/t1507-rev-parse-upstream.sh\n@@ -10,20 +10,20 @@ test_expect_success 'setup' '\n \ttest_commit 1 &&\n \tgit checkout -b side &&\n \ttest_commit 2 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit clone . clone &&\n \ttest_commit 3 &&\n \t(cd clone &&\n \t test_commit 4 &&\n \t git branch --track my-side origin/side &&\n-\t git branch --track local-master master &&\n+\t git branch --track local-main main &&\n \t git branch --track fun@ny origin/side &&\n \t git branch --track @funny origin/side &&\n \t git branch --track funny@ origin/side &&\n-\t git remote add -t master master-only .. &&\n-\t git fetch master-only &&\n+\t git remote add -t main main-only .. &&\n+\t git fetch main-only &&\n \t git branch bad-upstream &&\n-\t git config branch.bad-upstream.remote master-only &&\n+\t git config branch.bad-upstream.remote main-only &&\n \t git config branch.bad-upstream.merge refs/heads/side\n \t)\n '\n@@ -39,7 +39,7 @@ error_message () {\n }\n \n test_expect_success '@{upstream} resolves to correct full name' '\n-\techo refs/remotes/origin/master >expect &&\n+\techo refs/remotes/origin/main >expect &&\n \tgit -C clone rev-parse --symbolic-full-name @{upstream} >actual &&\n \ttest_cmp expect actual &&\n \tgit -C clone rev-parse --symbolic-full-name @{UPSTREAM} >actual &&\n@@ -49,7 +49,7 @@ test_expect_success '@{upstream} resolves to correct full name' '\n '\n \n test_expect_success '@{u} resolves to correct full name' '\n-\techo refs/remotes/origin/master >expect &&\n+\techo refs/remotes/origin/main >expect &&\n \tgit -C clone rev-parse --symbolic-full-name @{u} >actual &&\n \ttest_cmp expect actual &&\n \tgit -C clone rev-parse --symbolic-full-name @{U} >actual &&\n@@ -132,7 +132,7 @@ test_expect_success 'checkout -b new my-side@{u} forks from the same' '\n test_expect_success 'merge my-side@{u} records the correct name' '\n (\n \tcd clone &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_might_fail git branch -D new &&\n \tgit branch -t new my-side@{u} &&\n \tgit merge -s ours new@{u} &&\n@@ -143,24 +143,24 @@ test_expect_success 'merge my-side@{u} records the correct name' '\n '\n \n test_expect_success 'branch -d other@{u}' '\n-\tgit checkout -t -b other master &&\n+\tgit checkout -t -b other main &&\n \tgit branch -d @{u} &&\n-\tgit for-each-ref refs/heads/master >actual &&\n+\tgit for-each-ref refs/heads/main >actual &&\n \ttest_must_be_empty actual\n '\n \n test_expect_success 'checkout other@{u}' '\n-\tgit branch -f master HEAD &&\n-\tgit checkout -t -b another master &&\n+\tgit branch -f main HEAD &&\n+\tgit checkout -t -b another main &&\n \tgit checkout @{u} &&\n \tgit symbolic-ref HEAD >actual &&\n-\techo refs/heads/master >expect &&\n+\techo refs/heads/main >expect &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'branch@{u} works when tracking a local branch' '\n-\techo refs/heads/master >expect &&\n-\tgit -C clone rev-parse --symbolic-full-name local-master@{u} >actual &&\n+\techo refs/heads/main >expect &&\n+\tgit -C clone rev-parse --symbolic-full-name local-main@{u} >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -174,7 +174,7 @@ test_expect_success 'branch@{u} error message when no upstream' '\n \n test_expect_success '@{u} error message when no upstream' '\n \tcat >expect <<-EOF &&\n-\tfatal: no upstream configured for branch ${SQ}master${SQ}\n+\tfatal: no upstream configured for branch ${SQ}main${SQ}\n \tEOF\n \ttest_must_fail git rev-parse --verify @{u} 2>actual &&\n \ttest_i18ncmp expect actual\n@@ -208,14 +208,14 @@ test_expect_success 'branch@{u} error message if upstream branch not fetched' '\n test_expect_success 'pull works when tracking a local branch' '\n (\n \tcd clone &&\n-\tgit checkout local-master &&\n+\tgit checkout local-main &&\n \tgit pull\n )\n '\n \n # makes sense if the previous one succeeded\n test_expect_success '@{u} works when tracking a local branch' '\n-\techo refs/heads/master >expect &&\n+\techo refs/heads/main >expect &&\n \tgit -C clone rev-parse --symbolic-full-name @{u} >actual &&\n \ttest_cmp expect actual\n '\n@@ -224,7 +224,7 @@ test_expect_success 'log -g other@{u}' '\n \tcommit=$(git rev-parse HEAD) &&\n \tcat >expect <<-EOF &&\n \tcommit $commit\n-\tReflog: master@{0} (C O Mitter <committer@example.com>)\n+\tReflog: main@{0} (C O Mitter <committer@example.com>)\n \tReflog message: branch: Created from HEAD\n \tAuthor: A U Thor <author@example.com>\n \tDate:   Thu Apr 7 15:15:13 2005 -0700\n@@ -239,7 +239,7 @@ test_expect_success 'log -g other@{u}@{now}' '\n \tcommit=$(git rev-parse HEAD) &&\n \tcat >expect <<-EOF &&\n \tcommit $commit\n-\tReflog: master@{Thu Apr 7 15:17:13 2005 -0700} (C O Mitter <committer@example.com>)\n+\tReflog: main@{Thu Apr 7 15:17:13 2005 -0700} (C O Mitter <committer@example.com>)\n \tReflog message: branch: Created from HEAD\n \tAuthor: A U Thor <author@example.com>\n \tDate:   Thu Apr 7 15:15:13 2005 -0700\ndiff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh\nindex 4a9964e9dc..bda6e7900c 100755\n--- a/t/t1508-at-combinations.sh\n+++ b/t/t1508-at-combinations.sh\n@@ -30,8 +30,8 @@ fail() {\n }\n \n test_expect_success 'setup' '\n-\ttest_commit master-one &&\n-\ttest_commit master-two &&\n+\ttest_commit main-one &&\n+\ttest_commit main-two &&\n \tgit checkout -b upstream-branch &&\n \ttest_commit upstream-one &&\n \ttest_commit upstream-two &&\n@@ -47,7 +47,7 @@ test_expect_success 'setup' '\n \tgit checkout -b new-branch &&\n \ttest_commit new-one &&\n \ttest_commit new-two &&\n-\tgit branch -u master old-branch &&\n+\tgit branch -u main old-branch &&\n \tgit branch -u upstream-branch new-branch\n '\n \n@@ -62,8 +62,8 @@ check \"@{-1}@{1}\" commit old-one\n check \"@{u}\" ref refs/heads/upstream-branch\n check \"HEAD@{u}\" ref refs/heads/upstream-branch\n check \"@{u}@{1}\" commit upstream-one\n-check \"@{-1}@{u}\" ref refs/heads/master\n-check \"@{-1}@{u}@{1}\" commit master-one\n+check \"@{-1}@{u}\" ref refs/heads/main\n+check \"@{-1}@{u}@{1}\" commit main-one\n check \"@\" commit new-two\n check \"@@{u}\" ref refs/heads/upstream-branch\n check \"@@/at-test\" ref refs/heads/@@/at-test\ndiff --git a/t/t1511-rev-parse-caret.sh b/t/t1511-rev-parse-caret.sh\nindex e0a49a651f..cc324bea52 100755\n--- a/t/t1511-rev-parse-caret.sh\n+++ b/t/t1511-rev-parse-caret.sh\n@@ -15,7 +15,7 @@ test_expect_success 'setup' '\n \tgit commit -m Initial &&\n \tgit tag -a -m commit commit-tag &&\n \tgit branch ref &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo modified >>a-blob &&\n \tgit add -u &&\n \tgit commit -m Modified &&\n@@ -73,52 +73,52 @@ test_expect_success 'ref^{tag}' '\n '\n \n test_expect_success 'ref^{/.}' '\n-\tgit rev-parse master >expected &&\n-\tgit rev-parse master^{/.} >actual &&\n+\tgit rev-parse main >expected &&\n+\tgit rev-parse main^{/.} >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'ref^{/non-existent}' '\n-\ttest_must_fail git rev-parse master^{/non-existent}\n+\ttest_must_fail git rev-parse main^{/non-existent}\n '\n \n test_expect_success 'ref^{/Initial}' '\n \tgit rev-parse ref >expected &&\n-\tgit rev-parse master^{/Initial} >actual &&\n+\tgit rev-parse main^{/Initial} >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'ref^{/!Exp}' '\n-\ttest_must_fail git rev-parse master^{/!Exp}\n+\ttest_must_fail git rev-parse main^{/!Exp}\n '\n \n test_expect_success 'ref^{/!}' '\n-\ttest_must_fail git rev-parse master^{/!}\n+\ttest_must_fail git rev-parse main^{/!}\n '\n \n test_expect_success 'ref^{/!!Exp}' '\n \tgit rev-parse expref >expected &&\n-\tgit rev-parse master^{/!!Exp} >actual &&\n+\tgit rev-parse main^{/!!Exp} >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'ref^{/!-}' '\n-\ttest_must_fail git rev-parse master^{/!-}\n+\ttest_must_fail git rev-parse main^{/!-}\n '\n \n test_expect_success 'ref^{/!-.}' '\n-\ttest_must_fail git rev-parse master^{/!-.}\n+\ttest_must_fail git rev-parse main^{/!-.}\n '\n \n test_expect_success 'ref^{/!-non-existent}' '\n-\tgit rev-parse master >expected &&\n-\tgit rev-parse master^{/!-non-existent} >actual &&\n+\tgit rev-parse main >expected &&\n+\tgit rev-parse main^{/!-non-existent} >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'ref^{/!-Changed}' '\n \tgit rev-parse expref >expected &&\n-\tgit rev-parse master^{/!-Changed} >actual &&\n+\tgit rev-parse main^{/!-Changed} >actual &&\n \ttest_cmp expected actual\n '\n \ndiff --git a/t/t1512-rev-parse-disambiguation.sh b/t/t1512-rev-parse-disambiguation.sh\nindex 18fa6cf40d..6b4481d36b 100755\n--- a/t/t1512-rev-parse-disambiguation.sh\n+++ b/t/t1512-rev-parse-disambiguation.sh\n@@ -212,7 +212,7 @@ test_expect_success 'more history' '\n \tside=$(git rev-parse HEAD) &&\n \n \t# commit 000000000066\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \t# If you use recursive, merge will fail and you will need to\n \t# clean up a0blgqsjc as well.  If you use resolve, merge will\ndiff --git a/t/t1513-rev-parse-prefix.sh b/t/t1513-rev-parse-prefix.sh\nindex 87ec3ae714..f77e59121c 100755\n--- a/t/t1513-rev-parse-prefix.sh\n+++ b/t/t1513-rev-parse-prefix.sh\n@@ -76,9 +76,9 @@ test_expect_success 'disambiguate path with valid prefix' '\n '\n \n test_expect_success 'file and refs with prefix' '\n-\tgit rev-parse --prefix sub1/ master file1 >actual &&\n+\tgit rev-parse --prefix sub1/ main file1 >actual &&\n \tcat <<-EOF >expected &&\n-\t$(git rev-parse master)\n+\t$(git rev-parse main)\n \tsub1/file1\n \tEOF\n \ttest_cmp expected actual\ndiff --git a/t/t1514-rev-parse-push.sh b/t/t1514-rev-parse-push.sh\nindex 788cc91e45..e85b222e99 100755\n--- a/t/t1514-rev-parse-push.sh\n+++ b/t/t1514-rev-parse-push.sh\n@@ -16,24 +16,24 @@ test_expect_success 'setup' '\n \tgit remote add other other.git &&\n \ttest_commit base &&\n \tgit push origin HEAD &&\n-\tgit branch --set-upstream-to=origin/master master &&\n-\tgit branch --track topic origin/master &&\n+\tgit branch --set-upstream-to=origin/main main &&\n+\tgit branch --track topic origin/main &&\n \tgit push origin topic &&\n \tgit push other topic\n '\n \n test_expect_success '@{push} with default=nothing' '\n \ttest_config push.default nothing &&\n-\ttest_must_fail git rev-parse master@{push} &&\n-\ttest_must_fail git rev-parse master@{PUSH} &&\n-\ttest_must_fail git rev-parse master@{PuSH}\n+\ttest_must_fail git rev-parse main@{push} &&\n+\ttest_must_fail git rev-parse main@{PUSH} &&\n+\ttest_must_fail git rev-parse main@{PuSH}\n '\n \n test_expect_success '@{push} with default=simple' '\n \ttest_config push.default simple &&\n-\tresolve master@{push} refs/remotes/origin/master &&\n-\tresolve master@{PUSH} refs/remotes/origin/master &&\n-\tresolve master@{pUSh} refs/remotes/origin/master\n+\tresolve main@{push} refs/remotes/origin/main &&\n+\tresolve main@{PUSH} refs/remotes/origin/main &&\n+\tresolve main@{pUSh} refs/remotes/origin/main\n '\n \n test_expect_success 'triangular @{push} fails with default=simple' '\ndiff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh\nindex 12a5568844..f3309045fe 100755\n--- a/t/t1700-split-index.sh\n+++ b/t/t1700-split-index.sh\n@@ -496,7 +496,7 @@ test_expect_success 'do not refresh null base index' '\n \t\ttest_commit initial &&\n \t\tgit checkout -b side-branch &&\n \t\ttest_commit extra &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit update-index --split-index &&\n \t\ttest_commit more &&\n \t\t# must not write a new shareindex, or we wont catch the problem\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex a863ccee7e..126004e342 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -256,6 +256,13 @@ case \"$TRASH_DIRECTORY\" in\n  *) TRASH_DIRECTORY=\"$TEST_OUTPUT_DIRECTORY/$TRASH_DIRECTORY\" ;;\n esac\n \n+case \"$TEST_NUMBER\" in\n+[01]*)\n+\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n+\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\t;;\n+esac\n+\n # If --stress was passed, run this test repeatedly in several parallel loops.\n if test \"$GIT_TEST_STRESS_STARTED\" = \"done\"\n then\n-- \ngitgitgadget\n\n"},{"id":"409808","messageId":"0697ef9742af1ab15bd886990bbc0080bad6f41c.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 04/28] t3[0-3]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:34Z","receivedAt":"2020-11-12T22:44:10Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t3[0-3]*.sh t3206/*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3040-subprojects-basic.sh          |   2 +-\n t/t3200-branch.sh                     | 242 +++++++++++++-------------\n t/t3201-branch-contains.sh            |  80 ++++-----\n t/t3202-show-branch-octopus.sh        |   2 +-\n t/t3203-branch-output.sh              |  38 ++--\n t/t3204-branch-name-interpretation.sh |   6 +-\n t/t3205-branch-color.sh               |   6 +-\n t/t3206-range-diff.sh                 |  40 ++---\n t/t3206/history.export                |   2 +-\n t/t3210-pack-refs.sh                  |   4 +-\n t/t3211-peel-ref.sh                   |   4 +-\n t/t3301-notes.sh                      |   6 +-\n t/t3302-notes-index-expensive.sh      |   2 +-\n t/t3303-notes-subtrees.sh             |   8 +-\n t/t3304-notes-mixed.sh                |   8 +-\n t/t3308-notes-merge.sh                |   2 +-\n t/t3320-notes-merge-worktrees.sh      |   4 +-\n t/test-lib.sh                         |   2 +-\n 18 files changed, 229 insertions(+), 229 deletions(-)\n\ndiff --git a/t/t3040-subprojects-basic.sh b/t/t3040-subprojects-basic.sh\nindex b81eb5fd6f..f3ea8dcf58 100755\n--- a/t/t3040-subprojects-basic.sh\n+++ b/t/t3040-subprojects-basic.sh\n@@ -80,6 +80,6 @@ test_expect_success 'checkout in superproject' '\n '\n \n # just interesting what happened...\n-# git diff --name-status -M save master\n+# git diff --name-status -M save main\n \n test_done\ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex a0b832d59e..63036e0369 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -28,7 +28,7 @@ test_expect_success 'branch -h in broken repository' '\n \t(\n \t\tcd broken &&\n \t\tgit init &&\n-\t\t>.git/refs/heads/master &&\n+\t\t>.git/refs/heads/main &&\n \t\ttest_expect_code 129 git branch -h >usage 2>&1\n \t) &&\n \ttest_i18ngrep \"[Uu]sage\" broken/usage\n@@ -42,8 +42,8 @@ test_expect_success 'git branch a/b/c should create a branch' '\n \tgit branch a/b/c && test_path_is_file .git/refs/heads/a/b/c\n '\n \n-test_expect_success 'git branch mb master... should create a branch' '\n-\tgit branch mb master... && test_path_is_file .git/refs/heads/mb\n+test_expect_success 'git branch mb main... should create a branch' '\n+\tgit branch mb main... && test_path_is_file .git/refs/heads/mb\n '\n \n test_expect_success 'git branch HEAD should fail' '\n@@ -51,7 +51,7 @@ test_expect_success 'git branch HEAD should fail' '\n '\n \n cat >expect <<EOF\n-$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tbranch: Created from master\n+$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tbranch: Created from main\n EOF\n test_expect_success 'git branch --create-reflog d/e/f should create a branch and a log' '\n \tGIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n@@ -110,7 +110,7 @@ test_expect_success 'git branch -m n/n n should work' '\n \n test_expect_success 'git branch -m bbb should rename checked out branch' '\n \ttest_when_finished git branch -D bbb &&\n-\ttest_when_finished git checkout master &&\n+\ttest_when_finished git checkout main &&\n \tgit checkout -b aaa &&\n \tgit commit --allow-empty -m \"a new commit\" &&\n \tgit rev-parse aaa@{0} >expect &&\n@@ -124,7 +124,7 @@ test_expect_success 'git branch -m bbb should rename checked out branch' '\n \n test_expect_success 'renaming checked out branch works with d/f conflict' '\n \ttest_when_finished \"git branch -D foo/bar || git branch -D foo\" &&\n-\ttest_when_finished git checkout master &&\n+\ttest_when_finished git checkout main &&\n \tgit checkout -b foo &&\n \tgit branch -m foo/bar &&\n \tgit symbolic-ref HEAD >actual &&\n@@ -185,7 +185,7 @@ test_expect_success 'git branch -M should leave orphaned HEAD alone' '\n \t\tgit checkout --orphan lonely &&\n \t\tgrep lonely .git/HEAD &&\n \t\ttest_path_is_missing .git/refs/head/lonely &&\n-\t\tgit branch -M master mistress &&\n+\t\tgit branch -M main mistress &&\n \t\tgrep lonely .git/HEAD\n \t)\n '\n@@ -201,7 +201,7 @@ test_expect_success 'resulting reflog can be shown by log -g' '\n '\n \n test_expect_success 'git branch -M baz bam should succeed when baz is checked out as linked working tree' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit worktree add -b baz bazdir &&\n \tgit worktree add -f bazdir2 baz &&\n \tgit branch -M baz bam &&\n@@ -224,18 +224,18 @@ test_expect_success 'git branch -M baz bam should succeed within a worktree in w\n \tgit worktree prune\n '\n \n-test_expect_success 'git branch -M master should work when master is checked out' '\n-\tgit checkout master &&\n-\tgit branch -M master\n+test_expect_success 'git branch -M main should work when main is checked out' '\n+\tgit checkout main &&\n+\tgit branch -M main\n '\n \n-test_expect_success 'git branch -M master master should work when master is checked out' '\n-\tgit checkout master &&\n-\tgit branch -M master master\n+test_expect_success 'git branch -M main main should work when main is checked out' '\n+\tgit checkout main &&\n+\tgit branch -M main main\n '\n \n-test_expect_success 'git branch -M topic topic should work when master is checked out' '\n-\tgit checkout master &&\n+test_expect_success 'git branch -M topic topic should work when main is checked out' '\n+\tgit checkout main &&\n \tgit branch topic &&\n \tgit branch -M topic topic\n '\n@@ -292,8 +292,8 @@ test_expect_success 'bare main worktree has HEAD at branch deleted by secondary\n \tgit init nonbare &&\n \ttest_commit -C nonbare x &&\n \tgit clone --bare nonbare bare &&\n-\tgit -C bare worktree add --detach ../secondary master &&\n-\tgit -C secondary branch -D master\n+\tgit -C bare worktree add --detach ../secondary main &&\n+\tgit -C secondary branch -D main\n '\n \n test_expect_success 'git branch --list -v with --abbrev' '\n@@ -345,7 +345,7 @@ test_expect_success 'git branch --column with an extremely long branch name' '\n   j/k\n   l\n   m/m\n-* master\n+* main\n   mb\n   n\n   o/o\n@@ -388,7 +388,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch -v with column.ui ignore\n   j/k\n   l\n   m/m\n-* master\n+* main\n   mb\n   n\n   o/o\n@@ -427,8 +427,8 @@ test_expect_success 'config information was renamed, too' '\n '\n \n test_expect_success 'git branch -m correctly renames multiple config sections' '\n-\ttest_when_finished \"git checkout master\" &&\n-\tgit checkout -b source master &&\n+\ttest_when_finished \"git checkout main\" &&\n+\tgit checkout -b source main &&\n \n \t# Assert that a config file with multiple config sections has\n \t# those sections preserved...\n@@ -587,18 +587,18 @@ test_expect_success 'git branch -C c1 c2 should never touch HEAD' '\n \t! grep \"$msg$\" .git/logs/HEAD\n '\n \n-test_expect_success 'git branch -C master should work when master is checked out' '\n-\tgit checkout master &&\n-\tgit branch -C master\n+test_expect_success 'git branch -C main should work when main is checked out' '\n+\tgit checkout main &&\n+\tgit branch -C main\n '\n \n-test_expect_success 'git branch -C master master should work when master is checked out' '\n-\tgit checkout master &&\n-\tgit branch -C master master\n+test_expect_success 'git branch -C main main should work when main is checked out' '\n+\tgit checkout main &&\n+\tgit branch -C main main\n '\n \n-test_expect_success 'git branch -C main5 main5 should work when master is checked out' '\n-\tgit checkout master &&\n+test_expect_success 'git branch -C main5 main5 should work when main is checked out' '\n+\tgit checkout main &&\n \tgit branch main5 &&\n \tgit branch -C main5 main5\n '\n@@ -620,8 +620,8 @@ test_expect_success 'git branch -C ab cd should overwrite existing config for cd\n test_expect_success 'git branch -c correctly copies multiple config sections' '\n \tFOO=1 &&\n \texport FOO &&\n-\ttest_when_finished \"git checkout master\" &&\n-\tgit checkout -b source2 master &&\n+\ttest_when_finished \"git checkout main\" &&\n+\tgit checkout -b source2 main &&\n \n \t# Assert that a config file with multiple config sections has\n \t# those sections preserved...\n@@ -711,10 +711,10 @@ test_expect_success 'deleting a self-referential symref' '\n '\n \n test_expect_success 'renaming a symref is not allowed' '\n-\tgit symbolic-ref refs/heads/topic refs/heads/master &&\n+\tgit symbolic-ref refs/heads/topic refs/heads/main &&\n \ttest_must_fail git branch -m topic new-topic &&\n \tgit symbolic-ref refs/heads/topic &&\n-\ttest_path_is_file .git/refs/heads/master &&\n+\ttest_path_is_file .git/refs/heads/main &&\n \ttest_path_is_missing .git/refs/heads/new-topic\n '\n \n@@ -728,27 +728,27 @@ test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for\n test_expect_success 'test tracking setup via --track' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track my1 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track my1 local/main &&\n \ttest $(git config branch.my1.remote) = local &&\n-\ttest $(git config branch.my1.merge) = refs/heads/master\n+\ttest $(git config branch.my1.merge) = refs/heads/main\n '\n \n test_expect_success 'test tracking setup (non-wildcard, matching)' '\n \tgit config remote.local.url . &&\n-\tgit config remote.local.fetch refs/heads/master:refs/remotes/local/master &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track my4 local/master &&\n+\tgit config remote.local.fetch refs/heads/main:refs/remotes/local/main &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track my4 local/main &&\n \ttest $(git config branch.my4.remote) = local &&\n-\ttest $(git config branch.my4.merge) = refs/heads/master\n+\ttest $(git config branch.my4.merge) = refs/heads/main\n '\n \n test_expect_success 'tracking setup fails on non-matching refspec' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit config remote.local.fetch refs/heads/s:refs/remotes/local/s &&\n-\ttest_must_fail git branch --track my5 local/master &&\n+\ttest_must_fail git branch --track my5 local/main &&\n \ttest_must_fail git config branch.my5.remote &&\n \ttest_must_fail git config branch.my5.merge\n '\n@@ -757,21 +757,21 @@ test_expect_success 'test tracking setup via config' '\n \tgit config branch.autosetupmerge true &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch my3 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch my3 local/main &&\n \ttest $(git config branch.my3.remote) = local &&\n-\ttest $(git config branch.my3.merge) = refs/heads/master\n+\ttest $(git config branch.my3.merge) = refs/heads/main\n '\n \n test_expect_success 'test overriding tracking setup via --no-track' '\n \tgit config branch.autosetupmerge true &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track my2 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track my2 local/main &&\n \tgit config branch.autosetupmerge false &&\n \t! test \"$(git config branch.my2.remote)\" = local &&\n-\t! test \"$(git config branch.my2.merge)\" = refs/heads/master\n+\t! test \"$(git config branch.my2.merge)\" = refs/heads/main\n '\n \n test_expect_success 'no tracking without .fetch entries' '\n@@ -836,26 +836,26 @@ test_expect_success 'branch from tag w/--track causes failure' '\n \n test_expect_success '--set-upstream-to fails on multiple branches' '\n \techo \"fatal: too many arguments to set new upstream\" >expect &&\n-\ttest_must_fail git branch --set-upstream-to master a b c 2>err &&\n+\ttest_must_fail git branch --set-upstream-to main a b c 2>err &&\n \ttest_i18ncmp expect err\n '\n \n test_expect_success '--set-upstream-to fails on detached HEAD' '\n \tgit checkout HEAD^{} &&\n \ttest_when_finished git checkout - &&\n-\techo \"fatal: could not set upstream of HEAD to master when it does not point to any branch.\" >expect &&\n-\ttest_must_fail git branch --set-upstream-to master 2>err &&\n+\techo \"fatal: could not set upstream of HEAD to main when it does not point to any branch.\" >expect &&\n+\ttest_must_fail git branch --set-upstream-to main 2>err &&\n \ttest_i18ncmp expect err\n '\n \n test_expect_success '--set-upstream-to fails on a missing dst branch' '\n \techo \"fatal: branch '\"'\"'does-not-exist'\"'\"' does not exist\" >expect &&\n-\ttest_must_fail git branch --set-upstream-to master does-not-exist 2>err &&\n+\ttest_must_fail git branch --set-upstream-to main does-not-exist 2>err &&\n \ttest_i18ncmp expect err\n '\n \n test_expect_success '--set-upstream-to fails on a missing src branch' '\n-\ttest_must_fail git branch --set-upstream-to does-not-exist master 2>err &&\n+\ttest_must_fail git branch --set-upstream-to does-not-exist main 2>err &&\n \ttest_i18ngrep \"the requested upstream branch '\"'\"'does-not-exist'\"'\"' does not exist\" err\n '\n \n@@ -874,20 +874,20 @@ test_expect_success '--set-upstream-to fails on locked config' '\n '\n \n test_expect_success 'use --set-upstream-to modify HEAD' '\n-\ttest_config branch.master.remote foo &&\n-\ttest_config branch.master.merge foo &&\n+\ttest_config branch.main.remote foo &&\n+\ttest_config branch.main.merge foo &&\n \tgit branch my12 &&\n \tgit branch --set-upstream-to my12 &&\n-\ttest \"$(git config branch.master.remote)\" = \".\" &&\n-\ttest \"$(git config branch.master.merge)\" = \"refs/heads/my12\"\n+\ttest \"$(git config branch.main.remote)\" = \".\" &&\n+\ttest \"$(git config branch.main.merge)\" = \"refs/heads/my12\"\n '\n \n test_expect_success 'use --set-upstream-to modify a particular branch' '\n \tgit branch my13 &&\n-\tgit branch --set-upstream-to master my13 &&\n+\tgit branch --set-upstream-to main my13 &&\n \ttest_when_finished \"git branch --unset-upstream my13\" &&\n \ttest \"$(git config branch.my13.remote)\" = \".\" &&\n-\ttest \"$(git config branch.my13.merge)\" = \"refs/heads/master\"\n+\ttest \"$(git config branch.my13.merge)\" = \"refs/heads/main\"\n '\n \n test_expect_success '--unset-upstream should fail if given a non-existent branch' '\n@@ -906,14 +906,14 @@ test_expect_success '--unset-upstream should fail if config is locked' '\n \n test_expect_success 'test --unset-upstream on HEAD' '\n \tgit branch my14 &&\n-\ttest_config branch.master.remote foo &&\n-\ttest_config branch.master.merge foo &&\n+\ttest_config branch.main.remote foo &&\n+\ttest_config branch.main.merge foo &&\n \tgit branch --set-upstream-to my14 &&\n \tgit branch --unset-upstream &&\n-\ttest_must_fail git config branch.master.remote &&\n-\ttest_must_fail git config branch.master.merge &&\n+\ttest_must_fail git config branch.main.remote &&\n+\ttest_must_fail git config branch.main.merge &&\n \t# fail for a branch without upstream set\n-\techo \"fatal: Branch '\"'\"'master'\"'\"' has no upstream information\" >expect &&\n+\techo \"fatal: Branch '\"'\"'main'\"'\"' has no upstream information\" >expect &&\n \ttest_must_fail git branch --unset-upstream 2>err &&\n \ttest_i18ncmp expect err\n '\n@@ -934,14 +934,14 @@ test_expect_success '--unset-upstream should fail on detached HEAD' '\n \n test_expect_success 'test --unset-upstream on a particular branch' '\n \tgit branch my15 &&\n-\tgit branch --set-upstream-to master my14 &&\n+\tgit branch --set-upstream-to main my14 &&\n \tgit branch --unset-upstream my14 &&\n \ttest_must_fail git config branch.my14.remote &&\n \ttest_must_fail git config branch.my14.merge\n '\n \n test_expect_success 'disabled option --set-upstream fails' '\n-\ttest_must_fail git branch --set-upstream origin/master\n+\ttest_must_fail git branch --set-upstream origin/main\n '\n \n test_expect_success '--set-upstream-to notices an error to set branch as own upstream' '\n@@ -956,32 +956,32 @@ test_expect_success '--set-upstream-to notices an error to set branch as own ups\n \n # Keep this test last, as it changes the current branch\n cat >expect <<EOF\n-$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tbranch: Created from master\n+$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tbranch: Created from main\n EOF\n test_expect_success 'git checkout -b g/h/i -l should create a branch and a log' '\n \tGIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n-\tgit checkout -b g/h/i -l master &&\n+\tgit checkout -b g/h/i -l main &&\n \ttest_path_is_file .git/refs/heads/g/h/i &&\n \ttest_path_is_file .git/logs/refs/heads/g/h/i &&\n \ttest_cmp expect .git/logs/refs/heads/g/h/i\n '\n \n test_expect_success 'checkout -b makes reflog by default' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config --unset core.logAllRefUpdates &&\n \tgit checkout -b alpha &&\n \tgit rev-parse --verify alpha@{0}\n '\n \n test_expect_success 'checkout -b does not make reflog when core.logAllRefUpdates = false' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config core.logAllRefUpdates false &&\n \tgit checkout -b beta &&\n \ttest_must_fail git rev-parse --verify beta@{0}\n '\n \n test_expect_success 'checkout -b with -l makes reflog when core.logAllRefUpdates = false' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -lb gamma &&\n \tgit config --unset core.logAllRefUpdates &&\n \tgit rev-parse --verify gamma@{0}\n@@ -990,10 +990,10 @@ test_expect_success 'checkout -b with -l makes reflog when core.logAllRefUpdates\n test_expect_success 'avoid ambiguous track' '\n \tgit config branch.autosetupmerge true &&\n \tgit config remote.ambi1.url lalala &&\n-\tgit config remote.ambi1.fetch refs/heads/lalala:refs/heads/master &&\n+\tgit config remote.ambi1.fetch refs/heads/lalala:refs/heads/main &&\n \tgit config remote.ambi2.url lilili &&\n-\tgit config remote.ambi2.fetch refs/heads/lilili:refs/heads/master &&\n-\ttest_must_fail git branch all1 master &&\n+\tgit config remote.ambi2.fetch refs/heads/lilili:refs/heads/main &&\n+\ttest_must_fail git branch all1 main &&\n \ttest -z \"$(git config branch.all1.merge)\"\n '\n \n@@ -1049,10 +1049,10 @@ test_expect_success 'autosetuprebase local on a tracked remote branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n \tgit config branch.autosetuprebase local &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track myr5 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track myr5 local/main &&\n \ttest \"$(git config branch.myr5.remote)\" = local &&\n-\ttest \"$(git config branch.myr5.merge)\" = refs/heads/master &&\n+\ttest \"$(git config branch.myr5.merge)\" = refs/heads/main &&\n \t! test \"$(git config branch.myr5.rebase)\" = true\n '\n \n@@ -1060,10 +1060,10 @@ test_expect_success 'autosetuprebase never on a tracked remote branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n \tgit config branch.autosetuprebase never &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track myr6 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track myr6 local/main &&\n \ttest \"$(git config branch.myr6.remote)\" = local &&\n-\ttest \"$(git config branch.myr6.merge)\" = refs/heads/master &&\n+\ttest \"$(git config branch.myr6.merge)\" = refs/heads/main &&\n \t! test \"$(git config branch.myr6.rebase)\" = true\n '\n \n@@ -1071,10 +1071,10 @@ test_expect_success 'autosetuprebase remote on a tracked remote branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n \tgit config branch.autosetuprebase remote &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track myr7 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track myr7 local/main &&\n \ttest \"$(git config branch.myr7.remote)\" = local &&\n-\ttest \"$(git config branch.myr7.merge)\" = refs/heads/master &&\n+\ttest \"$(git config branch.myr7.merge)\" = refs/heads/main &&\n \ttest \"$(git config branch.myr7.rebase)\" = true\n '\n \n@@ -1082,10 +1082,10 @@ test_expect_success 'autosetuprebase always on a tracked remote branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n \tgit config branch.autosetuprebase remote &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track myr8 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track myr8 local/main &&\n \ttest \"$(git config branch.myr8.remote)\" = local &&\n-\ttest \"$(git config branch.myr8.merge)\" = refs/heads/master &&\n+\ttest \"$(git config branch.myr8.merge)\" = refs/heads/main &&\n \ttest \"$(git config branch.myr8.rebase)\" = true\n '\n \n@@ -1093,10 +1093,10 @@ test_expect_success 'autosetuprebase unconfigured on a tracked remote branch' '\n \tgit config --unset branch.autosetuprebase &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track myr9 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track myr9 local/main &&\n \ttest \"$(git config branch.myr9.remote)\" = local &&\n-\ttest \"$(git config branch.myr9.merge)\" = refs/heads/master &&\n+\ttest \"$(git config branch.myr9.merge)\" = refs/heads/main &&\n \ttest \"z$(git config branch.myr9.rebase)\" = z\n '\n \n@@ -1114,7 +1114,7 @@ test_expect_success 'autosetuprebase unconfigured on a tracked local branch' '\n test_expect_success 'autosetuprebase unconfigured on untracked local branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit branch --no-track myr11 mybase2 &&\n \ttest \"z$(git config branch.myr11.remote)\" = z &&\n \ttest \"z$(git config branch.myr11.merge)\" = z &&\n@@ -1124,8 +1124,8 @@ test_expect_success 'autosetuprebase unconfigured on untracked local branch' '\n test_expect_success 'autosetuprebase unconfigured on untracked remote branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track myr12 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track myr12 local/main &&\n \ttest \"z$(git config branch.myr12.remote)\" = z &&\n \ttest \"z$(git config branch.myr12.merge)\" = z &&\n \ttest \"z$(git config branch.myr12.rebase)\" = z\n@@ -1135,7 +1135,7 @@ test_expect_success 'autosetuprebase never on an untracked local branch' '\n \tgit config branch.autosetuprebase never &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit branch --no-track myr13 mybase2 &&\n \ttest \"z$(git config branch.myr13.remote)\" = z &&\n \ttest \"z$(git config branch.myr13.merge)\" = z &&\n@@ -1146,7 +1146,7 @@ test_expect_success 'autosetuprebase local on an untracked local branch' '\n \tgit config branch.autosetuprebase local &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit branch --no-track myr14 mybase2 &&\n \ttest \"z$(git config branch.myr14.remote)\" = z &&\n \ttest \"z$(git config branch.myr14.merge)\" = z &&\n@@ -1157,7 +1157,7 @@ test_expect_success 'autosetuprebase remote on an untracked local branch' '\n \tgit config branch.autosetuprebase remote &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit branch --no-track myr15 mybase2 &&\n \ttest \"z$(git config branch.myr15.remote)\" = z &&\n \ttest \"z$(git config branch.myr15.merge)\" = z &&\n@@ -1168,7 +1168,7 @@ test_expect_success 'autosetuprebase always on an untracked local branch' '\n \tgit config branch.autosetuprebase always &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit branch --no-track myr16 mybase2 &&\n \ttest \"z$(git config branch.myr16.remote)\" = z &&\n \ttest \"z$(git config branch.myr16.merge)\" = z &&\n@@ -1179,8 +1179,8 @@ test_expect_success 'autosetuprebase never on an untracked remote branch' '\n \tgit config branch.autosetuprebase never &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track myr17 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track myr17 local/main &&\n \ttest \"z$(git config branch.myr17.remote)\" = z &&\n \ttest \"z$(git config branch.myr17.merge)\" = z &&\n \ttest \"z$(git config branch.myr17.rebase)\" = z\n@@ -1190,8 +1190,8 @@ test_expect_success 'autosetuprebase local on an untracked remote branch' '\n \tgit config branch.autosetuprebase local &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track myr18 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track myr18 local/main &&\n \ttest \"z$(git config branch.myr18.remote)\" = z &&\n \ttest \"z$(git config branch.myr18.merge)\" = z &&\n \ttest \"z$(git config branch.myr18.rebase)\" = z\n@@ -1201,8 +1201,8 @@ test_expect_success 'autosetuprebase remote on an untracked remote branch' '\n \tgit config branch.autosetuprebase remote &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track myr19 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track myr19 local/main &&\n \ttest \"z$(git config branch.myr19.remote)\" = z &&\n \ttest \"z$(git config branch.myr19.merge)\" = z &&\n \ttest \"z$(git config branch.myr19.rebase)\" = z\n@@ -1212,8 +1212,8 @@ test_expect_success 'autosetuprebase always on an untracked remote branch' '\n \tgit config branch.autosetuprebase always &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track myr20 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track myr20 local/main &&\n \ttest \"z$(git config branch.myr20.remote)\" = z &&\n \ttest \"z$(git config branch.myr20.merge)\" = z &&\n \ttest \"z$(git config branch.myr20.rebase)\" = z\n@@ -1221,7 +1221,7 @@ test_expect_success 'autosetuprebase always on an untracked remote branch' '\n \n test_expect_success 'autosetuprebase always on detached HEAD' '\n \tgit config branch.autosetupmerge always &&\n-\ttest_when_finished git checkout master &&\n+\ttest_when_finished git checkout main &&\n \tgit checkout HEAD^0 &&\n \tgit branch my11 &&\n \ttest -z \"$(git config branch.my11.remote)\" &&\n@@ -1249,18 +1249,18 @@ test_expect_success 'attempt to delete a branch without base and unmerged to HEA\n test_expect_success 'attempt to delete a branch merged to its base' '\n \t# we are on my9 which is the initial commit; traditionally\n \t# we would not have allowed deleting my8 that is not merged\n-\t# to my9, but it is set to track master that already has my8\n-\tgit config branch.my8.merge refs/heads/master &&\n+\t# to my9, but it is set to track main that already has my8\n+\tgit config branch.my8.merge refs/heads/main &&\n \tgit branch -d my8\n '\n \n test_expect_success 'attempt to delete a branch merged to its base' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo Third >>A &&\n \tgit commit -m \"Third commit\" A &&\n \tgit branch -t my10 my9 &&\n \tgit branch -f my10 HEAD^ &&\n-\t# we are on master which is at the third commit, and my10\n+\t# we are on main which is at the third commit, and my10\n \t# is behind us, so traditionally we would have allowed deleting\n \t# it; but my10 is set to track my9 that is further behind.\n \ttest_must_fail git branch -d my10\n@@ -1287,7 +1287,7 @@ test_expect_success 'detect typo in branch name when using --edit-description' '\n '\n \n test_expect_success 'refuse --edit-description on unborn branch for now' '\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \twrite_script editor <<-\\EOF &&\n \t\techo \"New contents\" >\"$1\"\n \tEOF\n@@ -1301,18 +1301,18 @@ test_expect_success '--merged catches invalid object names' '\n \n test_expect_success '--list during rebase' '\n \ttest_when_finished \"reset_rebase\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tFAKE_LINES=\"1 edit 2\" &&\n \texport FAKE_LINES &&\n \tset_fake_editor &&\n \tgit rebase -i HEAD~2 &&\n \tgit branch --list >actual &&\n-\ttest_i18ngrep \"rebasing master\" actual\n+\ttest_i18ngrep \"rebasing main\" actual\n '\n \n test_expect_success '--list during rebase from detached HEAD' '\n-\ttest_when_finished \"reset_rebase && git checkout master\" &&\n-\tgit checkout master^0 &&\n+\ttest_when_finished \"reset_rebase && git checkout main\" &&\n+\tgit checkout main^0 &&\n \toid=$(git rev-parse --short HEAD) &&\n \tFAKE_LINES=\"1 edit 2\" &&\n \texport FAKE_LINES &&\n@@ -1348,11 +1348,11 @@ test_expect_success 'tracking with unexpected .fetch refspec' '\n \t\tgit remote add c ../c &&\n \t\tgit config remote.c.fetch \"+refs/remotes/*:refs/remotes/*\" &&\n \t\tgit fetch c &&\n-\t\tgit branch --track local/a/master remotes/a/master &&\n-\t\ttest \"$(git config branch.local/a/master.remote)\" = \"c\" &&\n-\t\ttest \"$(git config branch.local/a/master.merge)\" = \"refs/remotes/a/master\" &&\n+\t\tgit branch --track local/a/main remotes/a/main &&\n+\t\ttest \"$(git config branch.local/a/main.remote)\" = \"c\" &&\n+\t\ttest \"$(git config branch.local/a/main.merge)\" = \"refs/remotes/a/main\" &&\n \t\tgit rev-parse --verify a >expect &&\n-\t\tgit rev-parse --verify local/a/master >actual &&\n+\t\tgit rev-parse --verify local/a/main >actual &&\n \t\ttest_cmp expect actual\n \t)\n '\n@@ -1371,7 +1371,7 @@ test_expect_success 'configured committerdate sort' '\n \t\ttest_commit b &&\n \t\tgit branch >actual &&\n \t\tcat >expect <<-\\EOF &&\n-\t\t  master\n+\t\t  main\n \t\t  a\n \t\t  c\n \t\t* b\n@@ -1389,7 +1389,7 @@ test_expect_success 'option override configured sort' '\n \t\t  a\n \t\t* b\n \t\t  c\n-\t\t  master\n+\t\t  main\n \t\tEOF\n \t\ttest_cmp expect actual\n \t)\ndiff --git a/t/t3201-branch-contains.sh b/t/t3201-branch-contains.sh\nindex 3733cd0091..110cfef820 100755\n--- a/t/t3201-branch-contains.sh\n+++ b/t/t3201-branch-contains.sh\n@@ -14,47 +14,47 @@ test_expect_success setup '\n \n \techo 1 >file &&\n \ttest_tick &&\n-\tgit commit -a -m \"second on master\" &&\n+\tgit commit -a -m \"second on main\" &&\n \n \tgit checkout side &&\n \techo 1 >file &&\n \ttest_tick &&\n \tgit commit -a -m \"second on side\" &&\n \n-\tgit merge master\n+\tgit merge main\n \n '\n \n-test_expect_success 'branch --contains=master' '\n+test_expect_success 'branch --contains=main' '\n \n-\tgit branch --contains=master >actual &&\n+\tgit branch --contains=main >actual &&\n \t{\n-\t\techo \"  master\" && echo \"* side\"\n+\t\techo \"  main\" && echo \"* side\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n '\n \n-test_expect_success 'branch --contains master' '\n+test_expect_success 'branch --contains main' '\n \n-\tgit branch --contains master >actual &&\n+\tgit branch --contains main >actual &&\n \t{\n-\t\techo \"  master\" && echo \"* side\"\n+\t\techo \"  main\" && echo \"* side\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n '\n \n-test_expect_success 'branch --no-contains=master' '\n+test_expect_success 'branch --no-contains=main' '\n \n-\tgit branch --no-contains=master >actual &&\n+\tgit branch --no-contains=main >actual &&\n \ttest_must_be_empty actual\n \n '\n \n-test_expect_success 'branch --no-contains master' '\n+test_expect_success 'branch --no-contains main' '\n \n-\tgit branch --no-contains master >actual &&\n+\tgit branch --no-contains main >actual &&\n \ttest_must_be_empty actual\n \n '\n@@ -73,7 +73,7 @@ test_expect_success 'branch --no-contains=side' '\n \n \tgit branch --no-contains=side >actual &&\n \t{\n-\t\techo \"  master\"\n+\t\techo \"  main\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n@@ -81,9 +81,9 @@ test_expect_success 'branch --no-contains=side' '\n \n test_expect_success 'branch --contains with pattern implies --list' '\n \n-\tgit branch --contains=master master >actual &&\n+\tgit branch --contains=main main >actual &&\n \t{\n-\t\techo \"  master\"\n+\t\techo \"  main\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n@@ -91,7 +91,7 @@ test_expect_success 'branch --contains with pattern implies --list' '\n \n test_expect_success 'branch --no-contains with pattern implies --list' '\n \n-\tgit branch --no-contains=master master >actual &&\n+\tgit branch --no-contains=main main >actual &&\n \ttest_must_be_empty actual\n \n '\n@@ -100,7 +100,7 @@ test_expect_success 'side: branch --merged' '\n \n \tgit branch --merged >actual &&\n \t{\n-\t\techo \"  master\" &&\n+\t\techo \"  main\" &&\n \t\techo \"* side\"\n \t} >expect &&\n \ttest_cmp expect actual\n@@ -109,9 +109,9 @@ test_expect_success 'side: branch --merged' '\n \n test_expect_success 'branch --merged with pattern implies --list' '\n \n-\tgit branch --merged=side master >actual &&\n+\tgit branch --merged=side main >actual &&\n \t{\n-\t\techo \"  master\"\n+\t\techo \"  main\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n@@ -124,18 +124,18 @@ test_expect_success 'side: branch --no-merged' '\n \n '\n \n-test_expect_success 'master: branch --merged' '\n+test_expect_success 'main: branch --merged' '\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch --merged >actual &&\n \t{\n-\t\techo \"* master\"\n+\t\techo \"* main\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n '\n \n-test_expect_success 'master: branch --no-merged' '\n+test_expect_success 'main: branch --no-merged' '\n \n \tgit branch --no-merged >actual &&\n \t{\n@@ -147,22 +147,22 @@ test_expect_success 'master: branch --no-merged' '\n \n test_expect_success 'branch --no-merged with pattern implies --list' '\n \n-\tgit branch --no-merged=master master >actual &&\n+\tgit branch --no-merged=main main >actual &&\n \ttest_must_be_empty actual\n \n '\n \n test_expect_success 'implicit --list conflicts with modification options' '\n \n-\ttest_must_fail git branch --contains=master -d &&\n-\ttest_must_fail git branch --contains=master -m foo &&\n-\ttest_must_fail git branch --no-contains=master -d &&\n-\ttest_must_fail git branch --no-contains=master -m foo\n+\ttest_must_fail git branch --contains=main -d &&\n+\ttest_must_fail git branch --contains=main -m foo &&\n+\ttest_must_fail git branch --no-contains=main -d &&\n+\ttest_must_fail git branch --no-contains=main -m foo\n \n '\n \n test_expect_success 'Assert that --contains only works on commits, not trees & blobs' '\n-\ttest_must_fail git branch --contains master^{tree} &&\n+\ttest_must_fail git branch --contains main^{tree} &&\n \tblob=$(git hash-object -w --stdin <<-\\EOF\n \tSome blob\n \tEOF\n@@ -172,11 +172,11 @@ test_expect_success 'Assert that --contains only works on commits, not trees & b\n '\n \n test_expect_success 'multiple branch --contains' '\n-\tgit checkout -b side2 master &&\n+\tgit checkout -b side2 main &&\n \t>feature &&\n \tgit add feature &&\n \tgit commit -m \"add feature\" &&\n-\tgit checkout -b next master &&\n+\tgit checkout -b next main &&\n \tgit merge side &&\n \tgit branch --contains side --contains side2 >actual &&\n \tcat >expect <<-\\EOF &&\n@@ -188,9 +188,9 @@ test_expect_success 'multiple branch --contains' '\n '\n \n test_expect_success 'multiple branch --merged' '\n-\tgit branch --merged next --merged master >actual &&\n+\tgit branch --merged next --merged main >actual &&\n \tcat >expect <<-\\EOF &&\n-\t  master\n+\t  main\n \t* next\n \t  side\n \tEOF\n@@ -200,13 +200,13 @@ test_expect_success 'multiple branch --merged' '\n test_expect_success 'multiple branch --no-contains' '\n \tgit branch --no-contains side --no-contains side2 >actual &&\n \tcat >expect <<-\\EOF &&\n-\t  master\n+\t  main\n \tEOF\n \ttest_cmp expect actual\n '\n \n test_expect_success 'multiple branch --no-merged' '\n-\tgit branch --no-merged next --no-merged master >actual &&\n+\tgit branch --no-merged next --no-merged main >actual &&\n \tcat >expect <<-\\EOF &&\n \t  side2\n \tEOF\n@@ -214,7 +214,7 @@ test_expect_success 'multiple branch --no-merged' '\n '\n \n test_expect_success 'branch --contains combined with --no-contains' '\n-\tgit checkout -b seen master &&\n+\tgit checkout -b seen main &&\n \tgit merge side &&\n \tgit merge side2 &&\n \tgit branch --contains side --no-contains side2 >actual &&\n@@ -239,17 +239,17 @@ test_expect_success 'branch --merged combined with --no-merged' '\n # that the latter walk does not mess up our flag to see if it was\n # merged).\n #\n-# Here \"topic\" tracks \"master\" with one extra commit, and \"zzz\" points to the\n-# same tip as master The name \"zzz\" must come alphabetically after \"topic\"\n+# Here \"topic\" tracks \"main\" with one extra commit, and \"zzz\" points to the\n+# same tip as main The name \"zzz\" must come alphabetically after \"topic\"\n # as we process them in that order.\n test_expect_success PREPARE_FOR_MAIN_BRANCH 'branch --merged with --verbose' '\n-\tgit branch --track topic master &&\n+\tgit branch --track topic main &&\n \tgit branch zzz topic &&\n \tgit checkout topic &&\n \ttest_commit foo &&\n \tgit branch --merged topic >actual &&\n \tcat >expect <<-\\EOF &&\n-\t  master\n+\t  main\n \t* topic\n \t  zzz\n \tEOF\ndiff --git a/t/t3202-show-branch-octopus.sh b/t/t3202-show-branch-octopus.sh\nindex 6adf47869c..97551016ad 100755\n--- a/t/t3202-show-branch-octopus.sh\n+++ b/t/t3202-show-branch-octopus.sh\n@@ -15,7 +15,7 @@ test_expect_success 'setup' '\n \n \tfor i in $numbers\n \tdo\n-\t\tgit checkout -b branch$i master &&\n+\t\tgit checkout -b branch$i main &&\n \t\t> file$i &&\n \t\tgit add file$i &&\n \t\ttest_tick &&\ndiff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh\nindex d65586541d..727c9d9caa 100755\n--- a/t/t3203-branch-output.sh\n+++ b/t/t3203-branch-output.sh\n@@ -26,7 +26,7 @@ test_expect_success 'make remote branches' '\n cat >expect <<'EOF'\n   branch-one\n   branch-two\n-* master\n+* main\n EOF\n test_expect_success 'git branch shows local branches' '\n \tgit branch >actual &&\n@@ -60,7 +60,7 @@ test_expect_success 'git branch -r shows remote branches' '\n cat >expect <<'EOF'\n   branch-one\n   branch-two\n-* master\n+* main\n   remotes/origin/HEAD -> origin/branch-one\n   remotes/origin/branch-one\n   remotes/origin/branch-two\n@@ -152,7 +152,7 @@ test_expect_success 'git branch shows detached HEAD properly' '\n * (HEAD detached at $(git rev-parse --short HEAD^0))\n   branch-one\n   branch-two\n-  master\n+  main\n EOF\n \tgit checkout HEAD^0 &&\n \tgit branch >actual &&\n@@ -160,12 +160,12 @@ EOF\n '\n \n test_expect_success 'git branch shows detached HEAD properly after checkout --detach' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcat >expect <<EOF &&\n * (HEAD detached at $(git rev-parse --short HEAD^0))\n   branch-one\n   branch-two\n-  master\n+  main\n EOF\n \tgit checkout --detach &&\n \tgit branch >actual &&\n@@ -177,7 +177,7 @@ test_expect_success 'git branch shows detached HEAD properly after moving' '\n * (HEAD detached from $(git rev-parse --short HEAD))\n   branch-one\n   branch-two\n-  master\n+  main\n EOF\n \tgit reset --hard HEAD^1 &&\n \tgit branch >actual &&\n@@ -189,9 +189,9 @@ test_expect_success 'git branch shows detached HEAD properly from tag' '\n * (HEAD detached at fromtag)\n   branch-one\n   branch-two\n-  master\n+  main\n EOF\n-\tgit tag fromtag master &&\n+\tgit tag fromtag main &&\n \tgit checkout fromtag &&\n \tgit branch >actual &&\n \ttest_i18ncmp expect actual\n@@ -202,7 +202,7 @@ test_expect_success 'git branch shows detached HEAD properly after moving from t\n * (HEAD detached from fromtag)\n   branch-one\n   branch-two\n-  master\n+  main\n EOF\n \tgit reset --hard HEAD^1 &&\n \tgit branch >actual &&\n@@ -214,7 +214,7 @@ test_expect_success 'git branch `--sort` option' '\n \t* (HEAD detached from fromtag)\n \t  branch-two\n \t  branch-one\n-\t  master\n+\t  main\n \tEOF\n \tgit branch --sort=objectsize >actual &&\n \ttest_i18ncmp expect actual\n@@ -223,7 +223,7 @@ test_expect_success 'git branch `--sort` option' '\n test_expect_success 'git branch --points-at option' '\n \tcat >expect <<-\\EOF &&\n \t  branch-one\n-\t  master\n+\t  main\n \tEOF\n \tgit branch --points-at=branch-one >actual &&\n \ttest_cmp expect actual\n@@ -260,14 +260,14 @@ test_expect_success 'sort branches, ignore case' '\n \t\tcat >expected <<-\\EOF &&\n \t\tBRANCH-two\n \t\tbranch-one\n-\t\tmaster\n+\t\tmain\n \t\tEOF\n \t\ttest_cmp expected actual &&\n \t\tgit branch --list -i | awk \"{print \\$NF}\" >actual &&\n \t\tcat >expected <<-\\EOF &&\n \t\tbranch-one\n \t\tBRANCH-two\n-\t\tmaster\n+\t\tmain\n \t\tEOF\n \t\ttest_cmp expected actual\n \t)\n@@ -279,7 +279,7 @@ test_expect_success 'git branch --format option' '\n \tRefname is refs/heads/ambiguous\n \tRefname is refs/heads/branch-one\n \tRefname is refs/heads/branch-two\n-\tRefname is refs/heads/master\n+\tRefname is refs/heads/main\n \tRefname is refs/heads/ref-to-branch\n \tRefname is refs/heads/ref-to-remote\n \tEOF\n@@ -293,7 +293,7 @@ test_expect_success 'worktree colors correct' '\n \t  ambiguous<RESET>\n \t  branch-one<RESET>\n \t+ <CYAN>branch-two<RESET>\n-\t  master<RESET>\n+\t  main<RESET>\n \t  ref-to-branch<RESET> -> branch-one\n \t  ref-to-remote<RESET> -> origin/branch-one\n \tEOF\n@@ -306,9 +306,9 @@ test_expect_success 'worktree colors correct' '\n '\n \n test_expect_success \"set up color tests\" '\n-\techo \"<RED>master<RESET>\" >expect.color &&\n-\techo \"master\" >expect.bare &&\n-\tcolor_args=\"--format=%(color:red)%(refname:short) --list master\"\n+\techo \"<RED>main<RESET>\" >expect.color &&\n+\techo \"main\" >expect.bare &&\n+\tcolor_args=\"--format=%(color:red)%(refname:short) --list main\"\n '\n \n test_expect_success '%(color) omitted without tty' '\n@@ -331,7 +331,7 @@ test_expect_success '--color overrides auto-color' '\n \n test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output lists worktree path' '\n \tone=$(git rev-parse --short HEAD) &&\n-\ttwo=$(git rev-parse --short master) &&\n+\ttwo=$(git rev-parse --short main) &&\n \tcat >expect <<-EOF &&\n \t* (HEAD detached from fromtag) $one one\n \t  ambiguous                    $one one\ndiff --git a/t/t3204-branch-name-interpretation.sh b/t/t3204-branch-name-interpretation.sh\nindex 698d9cc4f3..e527e0b0c9 100755\n--- a/t/t3204-branch-name-interpretation.sh\n+++ b/t/t3204-branch-name-interpretation.sh\n@@ -28,7 +28,7 @@ test_expect_success 'update branch via @{-1}' '\n \tgit branch previous one &&\n \n \tgit checkout previous &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit branch -f @{-1} two &&\n \texpect_branch previous two\n@@ -58,7 +58,7 @@ test_expect_success 'delete branch via @{-1}' '\n \tgit branch previous-del &&\n \n \tgit checkout previous-del &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit branch -D @{-1} &&\n \texpect_deleted previous-del\n@@ -98,7 +98,7 @@ test_expect_success 'disallow deleting remote branch via @{-1}' '\n \tgit update-ref refs/remotes/origin/previous one &&\n \n \tgit checkout -b origin/previous two &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \ttest_must_fail git branch -r -D @{-1} &&\n \texpect_branch refs/remotes/origin/previous one &&\ndiff --git a/t/t3205-branch-color.sh b/t/t3205-branch-color.sh\nindex 289625c464..9f2fb785d2 100755\n--- a/t/t3205-branch-color.sh\n+++ b/t/t3205-branch-color.sh\n@@ -5,7 +5,7 @@ test_description='basic branch output coloring'\n \n test_expect_success 'set up some sample branches' '\n \ttest_commit foo &&\n-\tgit update-ref refs/remotes/origin/master HEAD &&\n+\tgit update-ref refs/remotes/origin/main HEAD &&\n \tgit update-ref refs/heads/other HEAD\n '\n \n@@ -19,9 +19,9 @@ test_expect_success 'set up some color config' '\n \n test_expect_success 'regular output shows colors' '\n \tcat >expect <<-\\EOF &&\n-\t* <CYAN>master<RESET>\n+\t* <CYAN>main<RESET>\n \t  <BLUE>other<RESET>\n-\t  <YELLOW>remotes/origin/master<RESET>\n+\t  <YELLOW>remotes/origin/main<RESET>\n \tEOF\n \tgit branch --color -a >actual.raw &&\n \ttest_decode_color <actual.raw >actual &&\ndiff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh\nindex 6eb344be03..2813a362c7 100755\n--- a/t/t3206-range-diff.sh\n+++ b/t/t3206-range-diff.sh\n@@ -127,7 +127,7 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'simple A..B A..C (unmodified)' '\n-\tgit range-diff --no-color master..topic master..unmodified \\\n+\tgit range-diff --no-color main..topic main..unmodified \\\n \t\t>actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid u1) s/5/A/\n@@ -145,13 +145,13 @@ test_expect_success 'simple B...C (unmodified)' '\n '\n \n test_expect_success 'simple A B C (unmodified)' '\n-\tgit range-diff --no-color master topic unmodified >actual &&\n+\tgit range-diff --no-color main topic unmodified >actual &&\n \t# same \"expect\" as above\n \ttest_cmp expect actual\n '\n \n test_expect_success 'trivial reordering' '\n-\tgit range-diff --no-color master topic reordered >actual &&\n+\tgit range-diff --no-color main topic reordered >actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid r1) s/5/A/\n \t3:  $(test_oid t3) = 2:  $(test_oid r2) s/11/B/\n@@ -162,7 +162,7 @@ test_expect_success 'trivial reordering' '\n '\n \n test_expect_success 'removed a commit' '\n-\tgit range-diff --no-color master topic removed >actual &&\n+\tgit range-diff --no-color main topic removed >actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid d1) s/5/A/\n \t2:  $(test_oid t2) < -:  $(test_oid __) s/4/A/\n@@ -173,7 +173,7 @@ test_expect_success 'removed a commit' '\n '\n \n test_expect_success 'added a commit' '\n-\tgit range-diff --no-color master topic added >actual &&\n+\tgit range-diff --no-color main topic added >actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid a1) s/5/A/\n \t2:  $(test_oid t2) = 2:  $(test_oid a2) s/4/A/\n@@ -185,7 +185,7 @@ test_expect_success 'added a commit' '\n '\n \n test_expect_success 'new base, A B C' '\n-\tgit range-diff --no-color master topic rebased >actual &&\n+\tgit range-diff --no-color main topic rebased >actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid b1) s/5/A/\n \t2:  $(test_oid t2) = 2:  $(test_oid b2) s/4/A/\n@@ -196,7 +196,7 @@ test_expect_success 'new base, A B C' '\n '\n \n test_expect_success 'new base, B...C' '\n-\t# this syntax includes the commits from master!\n+\t# this syntax includes the commits from main!\n \tgit range-diff --no-color topic...rebased >actual &&\n \tcat >expect <<-EOF &&\n \t-:  $(test_oid __) > 1:  $(test_oid b5) unrelated\n@@ -420,7 +420,7 @@ test_expect_success 'file added and later removed' '\n \n test_expect_success 'no commits on one side' '\n \tgit commit --amend -m \"new message\" &&\n-\tgit range-diff master HEAD@{1} HEAD\n+\tgit range-diff main HEAD@{1} HEAD\n '\n \n test_expect_success 'changed message' '\n@@ -482,11 +482,11 @@ test_expect_success 'dual-coloring' '\n \ttest_cmp expect actual\n '\n \n-for prev in topic master..topic\n+for prev in topic main..topic\n do\n \ttest_expect_success \"format-patch --range-diff=$prev\" '\n \t\tgit format-patch --cover-letter --range-diff=$prev \\\n-\t\t\tmaster..unmodified >actual &&\n+\t\t\tmain..unmodified >actual &&\n \t\ttest_when_finished \"rm 000?-*\" &&\n \t\ttest_line_count = 5 actual &&\n \t\ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\n@@ -511,19 +511,19 @@ test_expect_success 'range-diff overrides diff.noprefix internally' '\n \n test_expect_success 'basic with modified format.pretty with suffix' '\n \tgit -c format.pretty=\"format:commit %H%d%n\" range-diff \\\n-\t\tmaster..topic master..unmodified\n+\t\tmain..topic main..unmodified\n '\n \n test_expect_success 'basic with modified format.pretty without \"commit \"' '\n \tgit -c format.pretty=\"format:%H%n\" range-diff \\\n-\t\tmaster..topic master..unmodified\n+\t\tmain..topic main..unmodified\n '\n \n test_expect_success 'range-diff compares notes by default' '\n \tgit notes add -m \"topic note\" topic &&\n \tgit notes add -m \"unmodified note\" unmodified &&\n \ttest_when_finished git notes remove topic unmodified &&\n-\tgit range-diff --no-color master..topic master..unmodified \\\n+\tgit range-diff --no-color main..topic main..unmodified \\\n \t\t>actual &&\n \tsed s/Z/\\ /g >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid u1) s/5/A/\n@@ -547,7 +547,7 @@ test_expect_success 'range-diff with --no-notes' '\n \tgit notes add -m \"topic note\" topic &&\n \tgit notes add -m \"unmodified note\" unmodified &&\n \ttest_when_finished git notes remove topic unmodified &&\n-\tgit range-diff --no-color --no-notes master..topic master..unmodified \\\n+\tgit range-diff --no-color --no-notes main..topic main..unmodified \\\n \t\t>actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid u1) s/5/A/\n@@ -565,7 +565,7 @@ test_expect_success 'range-diff with multiple --notes' '\n \tgit notes --ref=note2 add -m \"topic note2\" topic &&\n \tgit notes --ref=note2 add -m \"unmodified note2\" unmodified &&\n \ttest_when_finished git notes --ref=note2 remove topic unmodified &&\n-\tgit range-diff --no-color --notes=note1 --notes=note2 master..topic master..unmodified \\\n+\tgit range-diff --no-color --notes=note1 --notes=note2 main..topic main..unmodified \\\n \t\t>actual &&\n \tsed s/Z/\\ /g >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid u1) s/5/A/\n@@ -595,7 +595,7 @@ test_expect_success 'format-patch --range-diff does not compare notes by default\n \tgit notes add -m \"unmodified note\" unmodified &&\n \ttest_when_finished git notes remove topic unmodified &&\n \tgit format-patch --cover-letter --range-diff=$prev \\\n-\t\tmaster..unmodified >actual &&\n+\t\tmain..unmodified >actual &&\n \ttest_when_finished \"rm 000?-*\" &&\n \ttest_line_count = 5 actual &&\n \ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\n@@ -612,7 +612,7 @@ test_expect_success 'format-patch --range-diff with --no-notes' '\n \tgit notes add -m \"unmodified note\" unmodified &&\n \ttest_when_finished git notes remove topic unmodified &&\n \tgit format-patch --no-notes --cover-letter --range-diff=$prev \\\n-\t\tmaster..unmodified >actual &&\n+\t\tmain..unmodified >actual &&\n \ttest_when_finished \"rm 000?-*\" &&\n \ttest_line_count = 5 actual &&\n \ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\n@@ -629,7 +629,7 @@ test_expect_success 'format-patch --range-diff with --notes' '\n \tgit notes add -m \"unmodified note\" unmodified &&\n \ttest_when_finished git notes remove topic unmodified &&\n \tgit format-patch --notes --cover-letter --range-diff=$prev \\\n-\t\tmaster..unmodified >actual &&\n+\t\tmain..unmodified >actual &&\n \ttest_when_finished \"rm 000?-*\" &&\n \ttest_line_count = 5 actual &&\n \ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\n@@ -658,7 +658,7 @@ test_expect_success 'format-patch --range-diff with format.notes config' '\n \ttest_when_finished git notes remove topic unmodified &&\n \ttest_config format.notes true &&\n \tgit format-patch --cover-letter --range-diff=$prev \\\n-\t\tmaster..unmodified >actual &&\n+\t\tmain..unmodified >actual &&\n \ttest_when_finished \"rm 000?-*\" &&\n \ttest_line_count = 5 actual &&\n \ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\n@@ -689,7 +689,7 @@ test_expect_success 'format-patch --range-diff with multiple notes' '\n \tgit notes --ref=note2 add -m \"unmodified note2\" unmodified &&\n \ttest_when_finished git notes --ref=note2 remove topic unmodified &&\n \tgit format-patch --notes=note1 --notes=note2 --cover-letter --range-diff=$prev \\\n-\t\tmaster..unmodified >actual &&\n+\t\tmain..unmodified >actual &&\n \ttest_when_finished \"rm 000?-*\" &&\n \ttest_line_count = 5 actual &&\n \ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\ndiff --git a/t/t3206/history.export b/t/t3206/history.export\nindex 4c808e5b3b..4485adc37b 100644\n--- a/t/t3206/history.export\n+++ b/t/t3206/history.export\n@@ -168,7 +168,7 @@ mark :11\n data 10\n unrelated\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :12\n author Thomas Rast <trast@inf.ethz.ch> 1374485127 +0200\n committer Thomas Rast <trast@inf.ethz.ch> 1374485127 +0200\ndiff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh\nindex f41b2afb99..a0b188fa4d 100755\n--- a/t/t3210-pack-refs.sh\n+++ b/t/t3210-pack-refs.sh\n@@ -135,7 +135,7 @@ test_expect_success 'delete ref with dangling packed version' '\n \tgit commit --allow-empty -m \"future garbage\" &&\n \tgit pack-refs --all &&\n \tgit reset --hard HEAD^ &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reflog expire --expire=all --all &&\n \tgit prune --expire=all &&\n \tgit branch -d lamb 2>result &&\n@@ -240,7 +240,7 @@ test_expect_success 'retry acquiring packed-refs.lock' '\n \n test_expect_success SYMLINKS 'pack symlinked packed-refs' '\n \t# First make sure that symlinking works when reading:\n-\tgit update-ref refs/heads/lossy refs/heads/master &&\n+\tgit update-ref refs/heads/lossy refs/heads/main &&\n \tgit for-each-ref >all-refs-before &&\n \tmv .git/packed-refs .git/my-deviant-packed-refs &&\n \tln -s my-deviant-packed-refs .git/packed-refs &&\ndiff --git a/t/t3211-peel-ref.sh b/t/t3211-peel-ref.sh\nindex 3b7caca421..73a914d194 100755\n--- a/t/t3211-peel-ref.sh\n+++ b/t/t3211-peel-ref.sh\n@@ -19,7 +19,7 @@ print_ref() {\n \n test_expect_success 'set up expected show-ref output' '\n \t{\n-\t\tprint_ref \"refs/heads/master\" &&\n+\t\tprint_ref \"refs/heads/main\" &&\n \t\tprint_ref \"refs/outside/foo\" &&\n \t\tprint_ref \"refs/outside/foo^{}\" &&\n \t\tprint_ref \"refs/tags/base\" &&\n@@ -47,7 +47,7 @@ test_expect_success 'create old-style pack-refs without fully-peeled' '\n \t# know we are emulating exactly what an older git would have written.\n \t{\n \t\techo \"# pack-refs with: peeled \" &&\n-\t\tprint_ref \"refs/heads/master\" &&\n+\t\tprint_ref \"refs/heads/main\" &&\n \t\tprint_ref \"refs/outside/foo\" &&\n \t\tprint_ref \"refs/tags/base\" &&\n \t\tprint_ref \"refs/tags/foo\" &&\ndiff --git a/t/t3301-notes.sh b/t/t3301-notes.sh\nindex 8f43303007..2b685580b6 100755\n--- a/t/t3301-notes.sh\n+++ b/t/t3301-notes.sh\n@@ -1295,11 +1295,11 @@ test_expect_success 'git notes copy diagnoses too many or too few parameters' '\n \ttest_i18ngrep \"too many parameters\" error\n '\n \n-test_expect_success 'git notes get-ref expands refs/heads/master to refs/notes/refs/heads/master' '\n+test_expect_success 'git notes get-ref expands refs/heads/main to refs/notes/refs/heads/main' '\n \ttest_unconfig core.notesRef &&\n \tsane_unset GIT_NOTES_REF &&\n-\techo refs/notes/refs/heads/master >expect &&\n-\tgit notes --ref=refs/heads/master get-ref >actual &&\n+\techo refs/notes/refs/heads/main >expect &&\n+\tgit notes --ref=refs/heads/main get-ref >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t3302-notes-index-expensive.sh b/t/t3302-notes-index-expensive.sh\nindex 7217c5e222..1c1490ca68 100755\n--- a/t/t3302-notes-index-expensive.sh\n+++ b/t/t3302-notes-index-expensive.sh\n@@ -20,7 +20,7 @@ create_repo () {\n \t\t\tnotemark=$(($mark+1))\n \t\t\ttest_tick &&\n \t\t\tcat <<-INPUT_END &&\n-\t\t\tcommit refs/heads/master\n+\t\t\tcommit refs/heads/main\n \t\t\tmark :$mark\n \t\t\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \t\t\tdata <<COMMIT\ndiff --git a/t/t3303-notes-subtrees.sh b/t/t3303-notes-subtrees.sh\nindex 704aee81ef..d994492469 100755\n--- a/t/t3303-notes-subtrees.sh\n+++ b/t/t3303-notes-subtrees.sh\n@@ -40,7 +40,7 @@ test_expect_success \"setup: create $number_of_commits commits\" '\n \t\t\tnr=$(($nr+1)) &&\n \t\t\ttest_tick &&\n \t\t\tcat <<INPUT_END\n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n commit #$nr\n@@ -75,7 +75,7 @@ test_sha1_based () {\n \t(\n \t\tstart_note_commit &&\n \t\tnr=$number_of_commits &&\n-\t\tgit rev-list refs/heads/master |\n+\t\tgit rev-list refs/heads/main |\n \t\twhile read sha1; do\n \t\t\tnote_path=$(echo \"$sha1\" | sed \"$1\")\n \t\t\tcat <<INPUT_END &&\n@@ -105,7 +105,7 @@ test_same_notes () {\n \t(\n \t\tstart_note_commit &&\n \t\tnr=$number_of_commits &&\n-\t\tgit rev-list refs/heads/master |\n+\t\tgit rev-list refs/heads/main |\n \t\twhile read sha1; do\n \t\t\tfirst_note_path=$(echo \"$sha1\" | sed \"$1\")\n \t\t\tsecond_note_path=$(echo \"$sha1\" | sed \"$2\")\n@@ -144,7 +144,7 @@ test_concatenated_notes () {\n \t(\n \t\tstart_note_commit &&\n \t\tnr=$number_of_commits &&\n-\t\tgit rev-list refs/heads/master |\n+\t\tgit rev-list refs/heads/main |\n \t\twhile read sha1; do\n \t\t\tfirst_note_path=$(echo \"$sha1\" | sed \"$1\")\n \t\t\tsecond_note_path=$(echo \"$sha1\" | sed \"$2\")\ndiff --git a/t/t3304-notes-mixed.sh b/t/t3304-notes-mixed.sh\nindex 1709e8c00b..802e004016 100755\n--- a/t/t3304-notes-mixed.sh\n+++ b/t/t3304-notes-mixed.sh\n@@ -36,7 +36,7 @@ test_expect_success \"setup: create a couple of commits\" '\n \n \ttest_tick &&\n \tcat <<INPUT_END >input &&\n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n commit #1\n@@ -51,7 +51,7 @@ INPUT_END\n \n \ttest_tick &&\n \tcat <<INPUT_END >>input &&\n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n commit #2\n@@ -68,8 +68,8 @@ INPUT_END\n \n test_expect_success \"create a notes tree with both notes and non-notes\" '\n \n-\tcommit1=$(git rev-parse refs/heads/master^) &&\n-\tcommit2=$(git rev-parse refs/heads/master) &&\n+\tcommit1=$(git rev-parse refs/heads/main^) &&\n+\tcommit2=$(git rev-parse refs/heads/main) &&\n \ttest_tick &&\n \tcat <<INPUT_END >input &&\n commit refs/notes/commits\ndiff --git a/t/t3308-notes-merge.sh b/t/t3308-notes-merge.sh\nindex d69c84c640..202702be1a 100755\n--- a/t/t3308-notes-merge.sh\n+++ b/t/t3308-notes-merge.sh\n@@ -108,7 +108,7 @@ test_expect_success 'fail to merge into various non-notes refs' '\n \tgit update-ref refs/notes/dir/foo HEAD &&\n \ttest_must_fail git -c \"core.notesRef=refs/notes/dir\" notes merge x &&\n \ttest_must_fail git -c \"core.notesRef=refs/notes/dir/\" notes merge x &&\n-\ttest_must_fail git -c \"core.notesRef=refs/heads/master\" notes merge x &&\n+\ttest_must_fail git -c \"core.notesRef=refs/heads/main\" notes merge x &&\n \ttest_must_fail git -c \"core.notesRef=refs/notes/y:\" notes merge x &&\n \ttest_must_fail git -c \"core.notesRef=refs/notes/y:foo\" notes merge x &&\n \ttest_must_fail git -c \"core.notesRef=refs/notes/foo^{bar\" notes merge x\ndiff --git a/t/t3320-notes-merge-worktrees.sh b/t/t3320-notes-merge-worktrees.sh\nindex 823fdbda1f..465145c487 100755\n--- a/t/t3320-notes-merge-worktrees.sh\n+++ b/t/t3320-notes-merge-worktrees.sh\n@@ -36,8 +36,8 @@ test_expect_success 'modify notes ref ourselves (x)' '\n '\n \n test_expect_success 'create some new worktrees' '\n-\tgit worktree add -b newbranch worktree master &&\n-\tgit worktree add -b newbranch2 worktree2 master\n+\tgit worktree add -b newbranch worktree main &&\n+\tgit worktree add -b newbranch2 worktree2 main\n '\n \n test_expect_success 'merge z into y fails and sets NOTES_MERGE_REF' '\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 3bb6675390..c464f8dcc8 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,7 +257,7 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-[0-2]*)\n+[0-2]*|3[0-3]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409809","messageId":"9b368b1ce1c5462b1a6fda6755837806bf4edfa8.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 03/28] t2*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:33Z","receivedAt":"2020-11-12T22:44:13Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t2*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t2007-checkout-symlink.sh              | 10 ++--\n t/t2009-checkout-statinfo.sh             |  8 +--\n t/t2010-checkout-ambiguous.sh            |  4 +-\n t/t2011-checkout-invalid-head.sh         | 16 +++---\n t/t2012-checkout-last.sh                 | 48 ++++++++--------\n t/t2015-checkout-unborn.sh               |  2 +-\n t/t2017-checkout-orphan.sh               | 44 +++++++--------\n t/t2020-checkout-detach.sh               | 28 +++++-----\n t/t2022-checkout-paths.sh                | 22 ++++----\n t/t2023-checkout-m.sh                    | 10 ++--\n t/t2024-checkout-dwim.sh                 | 70 ++++++++++++------------\n t/t2027-checkout-track.sh                |  6 +-\n t/t2030-unresolve-info.sh                |  6 +-\n t/t2060-switch.sh                        | 30 +++++-----\n t/t2070-restore.sh                       |  4 +-\n t/t2106-update-index-assume-unchanged.sh |  2 +-\n t/t2400-worktree-add.sh                  | 66 +++++++++++-----------\n t/t2401-worktree-prune.sh                |  2 +-\n t/t2402-worktree-list.sh                 | 20 +++----\n t/t2405-worktree-submodule.sh            |  6 +-\n t/test-lib.sh                            |  2 +-\n 21 files changed, 203 insertions(+), 203 deletions(-)\n\ndiff --git a/t/t2007-checkout-symlink.sh b/t/t2007-checkout-symlink.sh\nindex fc9aad530e..d6468ad8f3 100755\n--- a/t/t2007-checkout-symlink.sh\n+++ b/t/t2007-checkout-symlink.sh\n@@ -12,14 +12,14 @@ test_expect_success setup '\n \techo hello >frotz/filfre &&\n \tgit add frotz/filfre &&\n \ttest_tick &&\n-\tgit commit -m \"master has file frotz/filfre\" &&\n+\tgit commit -m \"main has file frotz/filfre\" &&\n \n \tgit branch side &&\n \n \techo goodbye >nitfol &&\n \tgit add nitfol &&\n \ttest_tick &&\n-\tgit commit -m \"master adds file nitfol\" &&\n+\tgit commit -m \"main adds file nitfol\" &&\n \n \tgit checkout side &&\n \n@@ -34,13 +34,13 @@ test_expect_success setup '\n \n test_expect_success 'switch from symlink to dir' '\n \n-\tgit checkout master\n+\tgit checkout main\n \n '\n \n-test_expect_success 'Remove temporary directories & switch to master' '\n+test_expect_success 'Remove temporary directories & switch to main' '\n \trm -fr frotz xyzzy nitfol &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'switch from dir to symlink' '\ndiff --git a/t/t2009-checkout-statinfo.sh b/t/t2009-checkout-statinfo.sh\nindex f3c2152087..91940f3c60 100755\n--- a/t/t2009-checkout-statinfo.sh\n+++ b/t/t2009-checkout-statinfo.sh\n@@ -21,13 +21,13 @@ test_expect_success 'branch switching' '\n \tgit reset --hard &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n \tgit checkout side &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest \"$(git diff-files --raw)\" = \"\"\n \n '\n@@ -37,13 +37,13 @@ test_expect_success 'path checkout' '\n \tgit reset --hard &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n-\tgit checkout master world &&\n+\tgit checkout main world &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n \tgit checkout side world &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n-\tgit checkout master world &&\n+\tgit checkout main world &&\n \ttest \"$(git diff-files --raw)\" = \"\"\n \n '\ndiff --git a/t/t2010-checkout-ambiguous.sh b/t/t2010-checkout-ambiguous.sh\nindex 2e47fe01cf..64395479e8 100755\n--- a/t/t2010-checkout-ambiguous.sh\n+++ b/t/t2010-checkout-ambiguous.sh\n@@ -17,7 +17,7 @@ test_expect_success 'reference must be a tree' '\n '\n \n test_expect_success 'branch switching' '\n-\ttest \"refs/heads/master\" = \"$(git symbolic-ref HEAD)\" &&\n+\ttest \"refs/heads/main\" = \"$(git symbolic-ref HEAD)\" &&\n \tgit checkout world -- &&\n \ttest \"refs/heads/world\" = \"$(git symbolic-ref HEAD)\"\n '\n@@ -57,7 +57,7 @@ test_expect_success 'disambiguate checking out from a tree-ish' '\n '\n \n test_expect_success 'accurate error message with more than one ref' '\n-\ttest_must_fail git checkout HEAD master -- 2>actual &&\n+\ttest_must_fail git checkout HEAD main -- 2>actual &&\n \ttest_i18ngrep 2 actual &&\n \ttest_i18ngrep \"one reference expected, 2 given\" actual\n '\ndiff --git a/t/t2011-checkout-invalid-head.sh b/t/t2011-checkout-invalid-head.sh\nindex 0e8d56aa76..d92f8582ea 100755\n--- a/t/t2011-checkout-invalid-head.sh\n+++ b/t/t2011-checkout-invalid-head.sh\n@@ -11,12 +11,12 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'checkout should not start branch from a tree' '\n-\ttest_must_fail git checkout -b newbranch master^{tree}\n+\ttest_must_fail git checkout -b newbranch main^{tree}\n '\n \n-test_expect_success 'checkout master from invalid HEAD' '\n+test_expect_success 'checkout main from invalid HEAD' '\n \techo $ZERO_OID >.git/HEAD &&\n-\tgit checkout master --\n+\tgit checkout main --\n '\n \n test_expect_success 'checkout notices failure to lock HEAD' '\n@@ -26,7 +26,7 @@ test_expect_success 'checkout notices failure to lock HEAD' '\n '\n \n test_expect_success 'create ref directory/file conflict scenario' '\n-\tgit update-ref refs/heads/outer/inner master &&\n+\tgit update-ref refs/heads/outer/inner main &&\n \n \t# do not rely on symbolic-ref to get a known state,\n \t# as it may use the same code we are testing\n@@ -37,12 +37,12 @@ test_expect_success 'create ref directory/file conflict scenario' '\n \n test_expect_success 'checkout away from d/f HEAD (unpacked, to branch)' '\n \treset_to_df &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'checkout away from d/f HEAD (unpacked, to detached)' '\n \treset_to_df &&\n-\tgit checkout --detach master\n+\tgit checkout --detach main\n '\n \n test_expect_success 'pack refs' '\n@@ -51,11 +51,11 @@ test_expect_success 'pack refs' '\n \n test_expect_success 'checkout away from d/f HEAD (packed, to branch)' '\n \treset_to_df &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'checkout away from d/f HEAD (packed, to detached)' '\n \treset_to_df &&\n-\tgit checkout --detach master\n+\tgit checkout --detach main\n '\n test_done\ndiff --git a/t/t2012-checkout-last.sh b/t/t2012-checkout-last.sh\nindex e7ba8c505f..7a126337ca 100755\n--- a/t/t2012-checkout-last.sh\n+++ b/t/t2012-checkout-last.sh\n@@ -24,7 +24,7 @@ test_expect_success 'first branch switch' '\n \n test_expect_success '\"checkout -\" switches back' '\n \tgit checkout - &&\n-\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/master\"\n+\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/main\"\n '\n \n test_expect_success '\"checkout -\" switches forth' '\n@@ -98,56 +98,56 @@ test_expect_success 'merge base test setup' '\n \tgit commit -m third\n '\n \n-test_expect_success 'another...master' '\n+test_expect_success 'another...main' '\n \tgit checkout another &&\n-\tgit checkout another...master &&\n-\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify master^)\"\n+\tgit checkout another...main &&\n+\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify main^)\"\n '\n \n-test_expect_success '...master' '\n+test_expect_success '...main' '\n \tgit checkout another &&\n-\tgit checkout ...master &&\n-\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify master^)\"\n+\tgit checkout ...main &&\n+\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify main^)\"\n '\n \n-test_expect_success 'master...' '\n+test_expect_success 'main...' '\n \tgit checkout another &&\n-\tgit checkout master... &&\n-\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify master^)\"\n+\tgit checkout main... &&\n+\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify main^)\"\n '\n \n test_expect_success '\"checkout -\" works after a rebase A' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout other &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \tgit checkout - &&\n-\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/master\"\n+\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/main\"\n '\n \n test_expect_success '\"checkout -\" works after a rebase A B' '\n-\tgit branch moodle master~1 &&\n-\tgit checkout master &&\n+\tgit branch moodle main~1 &&\n+\tgit checkout main &&\n \tgit checkout other &&\n-\tgit rebase master moodle &&\n+\tgit rebase main moodle &&\n \tgit checkout - &&\n-\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/master\"\n+\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/main\"\n '\n \n test_expect_success '\"checkout -\" works after a rebase -i A' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout other &&\n-\tgit rebase -i master &&\n+\tgit rebase -i main &&\n \tgit checkout - &&\n-\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/master\"\n+\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/main\"\n '\n \n test_expect_success '\"checkout -\" works after a rebase -i A B' '\n-\tgit branch foodle master~1 &&\n-\tgit checkout master &&\n+\tgit branch foodle main~1 &&\n+\tgit checkout main &&\n \tgit checkout other &&\n-\tgit rebase master foodle &&\n+\tgit rebase main foodle &&\n \tgit checkout - &&\n-\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/master\"\n+\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/main\"\n '\n \n test_done\ndiff --git a/t/t2015-checkout-unborn.sh b/t/t2015-checkout-unborn.sh\nindex 37bdcedcc9..2b3e6dc27e 100755\n--- a/t/t2015-checkout-unborn.sh\n+++ b/t/t2015-checkout-unborn.sh\n@@ -11,7 +11,7 @@ test_expect_success 'setup' '\n \t git add file &&\n \t git commit -m base\n \t) &&\n-\tgit fetch parent master:origin\n+\tgit fetch parent main:origin\n '\n \n test_expect_success 'checkout from unborn preserves untracked files' '\ndiff --git a/t/t2017-checkout-orphan.sh b/t/t2017-checkout-orphan.sh\nindex 655f278c5f..e2ce29c8e7 100755\n--- a/t/t2017-checkout-orphan.sh\n+++ b/t/t2017-checkout-orphan.sh\n@@ -29,34 +29,34 @@ test_expect_success '--orphan creates a new orphan branch from HEAD' '\n \ttest_tick &&\n \tgit commit -m \"Third Commit\" &&\n \ttest_must_fail git rev-parse --verify HEAD^ &&\n-\tgit diff-tree --quiet master alpha\n+\tgit diff-tree --quiet main alpha\n '\n \n test_expect_success '--orphan creates a new orphan branch from <start_point>' '\n-\tgit checkout master &&\n-\tgit checkout --orphan beta master^ &&\n+\tgit checkout main &&\n+\tgit checkout --orphan beta main^ &&\n \ttest_must_fail git rev-parse --verify HEAD &&\n \ttest \"refs/heads/beta\" = \"$(git symbolic-ref HEAD)\" &&\n \ttest_tick &&\n \tgit commit -m \"Fourth Commit\" &&\n \ttest_must_fail git rev-parse --verify HEAD^ &&\n-\tgit diff-tree --quiet master^ beta\n+\tgit diff-tree --quiet main^ beta\n '\n \n test_expect_success '--orphan must be rejected with -b' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git checkout --orphan new -b newer &&\n-\ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n+\ttest refs/heads/main = \"$(git symbolic-ref HEAD)\"\n '\n \n test_expect_success '--orphan must be rejected with -t' '\n-\tgit checkout master &&\n-\ttest_must_fail git checkout --orphan new -t master &&\n-\ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n+\tgit checkout main &&\n+\ttest_must_fail git checkout --orphan new -t main &&\n+\ttest refs/heads/main = \"$(git symbolic-ref HEAD)\"\n '\n \n test_expect_success '--orphan ignores branch.autosetupmerge' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config branch.autosetupmerge always &&\n \tgit checkout --orphan gamma &&\n \ttest -z \"$(git config branch.gamma.merge)\" &&\n@@ -65,7 +65,7 @@ test_expect_success '--orphan ignores branch.autosetupmerge' '\n '\n \n test_expect_success '--orphan makes reflog by default' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config --unset core.logAllRefUpdates &&\n \tgit checkout --orphan delta &&\n \ttest_must_fail git rev-parse --verify delta@{0} &&\n@@ -74,7 +74,7 @@ test_expect_success '--orphan makes reflog by default' '\n '\n \n test_expect_success '--orphan does not make reflog when core.logAllRefUpdates = false' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config core.logAllRefUpdates false &&\n \tgit checkout --orphan epsilon &&\n \ttest_must_fail git rev-parse --verify epsilon@{0} &&\n@@ -83,7 +83,7 @@ test_expect_success '--orphan does not make reflog when core.logAllRefUpdates =\n '\n \n test_expect_success '--orphan with -l makes reflog when core.logAllRefUpdates = false' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -l --orphan zeta &&\n \ttest_must_fail git rev-parse --verify zeta@{0} &&\n \tgit commit -m Zeta &&\n@@ -91,33 +91,33 @@ test_expect_success '--orphan with -l makes reflog when core.logAllRefUpdates =\n '\n \n test_expect_success 'giving up --orphan not committed when -l and core.logAllRefUpdates = false deletes reflog' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -l --orphan eta &&\n \ttest_must_fail git rev-parse --verify eta@{0} &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git rev-parse --verify eta@{0}\n '\n \n test_expect_success '--orphan is rejected with an existing name' '\n-\tgit checkout master &&\n-\ttest_must_fail git checkout --orphan master &&\n-\ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n+\tgit checkout main &&\n+\ttest_must_fail git checkout --orphan main &&\n+\ttest refs/heads/main = \"$(git symbolic-ref HEAD)\"\n '\n \n test_expect_success '--orphan refuses to switch if a merge is needed' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard &&\n \techo local >>\"$TEST_FILE\" &&\n \tcat \"$TEST_FILE\" >\"$TEST_FILE.saved\" &&\n-\ttest_must_fail git checkout --orphan new master^ &&\n-\ttest refs/heads/master = \"$(git symbolic-ref HEAD)\" &&\n+\ttest_must_fail git checkout --orphan new main^ &&\n+\ttest refs/heads/main = \"$(git symbolic-ref HEAD)\" &&\n \ttest_cmp \"$TEST_FILE\" \"$TEST_FILE.saved\" &&\n \tgit diff-index --quiet --cached HEAD &&\n \tgit reset --hard\n '\n \n test_expect_success 'cannot --detach on an unborn branch' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout --orphan new &&\n \ttest_must_fail git checkout --detach\n '\ndiff --git a/t/t2020-checkout-detach.sh b/t/t2020-checkout-detach.sh\nindex b748db9946..25885c3065 100755\n--- a/t/t2020-checkout-detach.sh\n+++ b/t/t2020-checkout-detach.sh\n@@ -22,7 +22,7 @@ check_no_orphan_warning() {\n }\n \n reset () {\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcheck_not_detached\n }\n \n@@ -85,7 +85,7 @@ test_expect_success 'checkout --detach errors out for non-commit' '\n \n test_expect_success 'checkout --detach errors out for extra argument' '\n \treset &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git checkout --detach tag one.t &&\n \tcheck_not_detached\n '\n@@ -113,7 +113,7 @@ test_expect_success 'checkout warns on orphan commits' '\n \techo new content >orphan &&\n \tgit commit -a -m orphan2 &&\n \torphan2=$(git rev-parse HEAD) &&\n-\tgit checkout master 2>stderr\n+\tgit checkout main 2>stderr\n '\n \n test_expect_success 'checkout warns on orphan commits: output' '\n@@ -132,7 +132,7 @@ test_expect_success 'checkout warns orphaning 1 of 2 commits: output' '\n test_expect_success 'checkout does not warn leaving ref tip' '\n \treset &&\n \tgit checkout --detach two &&\n-\tgit checkout master 2>stderr\n+\tgit checkout main 2>stderr\n '\n \n test_expect_success 'checkout does not warn leaving ref tip' '\n@@ -142,7 +142,7 @@ test_expect_success 'checkout does not warn leaving ref tip' '\n test_expect_success 'checkout does not warn leaving reachable commit' '\n \treset &&\n \tgit checkout --detach HEAD^ &&\n-\tgit checkout master 2>stderr\n+\tgit checkout main 2>stderr\n '\n \n test_expect_success 'checkout does not warn leaving reachable commit' '\n@@ -150,14 +150,14 @@ test_expect_success 'checkout does not warn leaving reachable commit' '\n '\n \n cat >expect <<'EOF'\n-Your branch is behind 'master' by 1 commit, and can be fast-forwarded.\n+Your branch is behind 'main' by 1 commit, and can be fast-forwarded.\n   (use \"git pull\" to update your local branch)\n EOF\n test_expect_success 'tracking count is accurate after orphan check' '\n \treset &&\n-\tgit branch child master^ &&\n+\tgit branch child main^ &&\n \tgit config branch.child.remote . &&\n-\tgit config branch.child.merge refs/heads/master &&\n+\tgit config branch.child.merge refs/heads/main &&\n \tgit checkout child^ &&\n \tgit checkout child >stdout &&\n \ttest_i18ncmp expect stdout\n@@ -189,9 +189,9 @@ test_expect_success 'no advice given for explicit detached head state' '\n # Detached HEAD tests for GIT_PRINT_SHA1_ELLIPSIS (new format)\n test_expect_success 'describe_detached_head prints no SHA-1 ellipsis when not asked to' \"\n \n-\tcommit=$(git rev-parse --short=12 master^) &&\n-\tcommit2=$(git rev-parse --short=12 master~2) &&\n-\tcommit3=$(git rev-parse --short=12 master~3) &&\n+\tcommit=$(git rev-parse --short=12 main^) &&\n+\tcommit2=$(git rev-parse --short=12 main~2) &&\n+\tcommit3=$(git rev-parse --short=12 main~3) &&\n \n \t# The first detach operation is more chatty than the following ones.\n \tcat >1st_detach <<-EOF &&\n@@ -271,9 +271,9 @@ test_expect_success 'describe_detached_head prints no SHA-1 ellipsis when not as\n # Detached HEAD tests for GIT_PRINT_SHA1_ELLIPSIS (old format)\n test_expect_success 'describe_detached_head does print SHA-1 ellipsis when asked to' \"\n \n-\tcommit=$(git rev-parse --short=12 master^) &&\n-\tcommit2=$(git rev-parse --short=12 master~2) &&\n-\tcommit3=$(git rev-parse --short=12 master~3) &&\n+\tcommit=$(git rev-parse --short=12 main^) &&\n+\tcommit2=$(git rev-parse --short=12 main~2) &&\n+\tcommit3=$(git rev-parse --short=12 main~3) &&\n \n \t# The first detach operation is more chatty than the following ones.\n \tcat >1st_detach <<-EOF &&\ndiff --git a/t/t2022-checkout-paths.sh b/t/t2022-checkout-paths.sh\nindex 6844afafc0..4174620cf4 100755\n--- a/t/t2022-checkout-paths.sh\n+++ b/t/t2022-checkout-paths.sh\n@@ -5,15 +5,15 @@ test_description='checkout $tree -- $paths'\n \n test_expect_success setup '\n \tmkdir dir &&\n-\t>dir/master &&\n+\t>dir/main &&\n \techo common >dir/common &&\n-\tgit add dir/master dir/common &&\n-\ttest_tick && git commit -m \"master has dir/master\" &&\n+\tgit add dir/main dir/common &&\n+\ttest_tick && git commit -m \"main has dir/main\" &&\n \tgit checkout -b next &&\n-\tgit mv dir/master dir/next0 &&\n+\tgit mv dir/main dir/next0 &&\n \techo next >dir/next1 &&\n \tgit add dir &&\n-\ttest_tick && git commit -m \"next has dir/next but not dir/master\"\n+\ttest_tick && git commit -m \"next has dir/next but not dir/main\"\n '\n \n test_expect_success 'checking out paths out of a tree does not clobber unrelated paths' '\n@@ -26,11 +26,11 @@ test_expect_success 'checking out paths out of a tree does not clobber unrelated\n \techo untracked >expect.next2 &&\n \tcat expect.next2 >dir/next2 &&\n \n-\tgit checkout master dir &&\n+\tgit checkout main dir &&\n \n \ttest_cmp expect.common dir/common &&\n-\ttest_path_is_file dir/master &&\n-\tgit diff --exit-code master dir/master &&\n+\ttest_path_is_file dir/main &&\n+\tgit diff --exit-code main dir/main &&\n \n \ttest_path_is_missing dir/next0 &&\n \ttest_cmp expect.next1 dir/next1 &&\n@@ -52,11 +52,11 @@ test_expect_success 'do not touch unmerged entries matching $path but not in $tr\n \tEOF\n \tgit update-index --index-info <expect.next0 &&\n \n-\tgit checkout master dir &&\n+\tgit checkout main dir &&\n \n \ttest_cmp expect.common dir/common &&\n-\ttest_path_is_file dir/master &&\n-\tgit diff --exit-code master dir/master &&\n+\ttest_path_is_file dir/main &&\n+\tgit diff --exit-code main dir/main &&\n \tgit ls-files -s dir/next0 >actual.next0 &&\n \ttest_cmp expect.next0 actual.next0\n '\ndiff --git a/t/t2023-checkout-m.sh b/t/t2023-checkout-m.sh\nindex fca3f85824..ddcfcc3e9b 100755\n--- a/t/t2023-checkout-m.sh\n+++ b/t/t2023-checkout-m.sh\n@@ -10,15 +10,15 @@ test_expect_success setup '\n \ttest_tick &&\n \ttest_commit both.txt both.txt initial &&\n \tgit branch topic &&\n-\ttest_commit modified_in_master both.txt in_master &&\n-\ttest_commit added_in_master each.txt in_master &&\n+\ttest_commit modified_in_main both.txt in_main &&\n+\ttest_commit added_in_main each.txt in_main &&\n \tgit checkout topic &&\n \ttest_commit modified_in_topic both.txt in_topic &&\n \ttest_commit added_in_topic each.txt in_topic\n '\n \n-test_expect_success 'git merge master' '\n-    test_must_fail git merge master\n+test_expect_success 'git merge main' '\n+    test_must_fail git merge main\n '\n \n clean_branchnames () {\n@@ -61,7 +61,7 @@ test_expect_success 'force checkout a conflict file creates stage zero entry' '\n \t\tgit checkout topic &&\n \t\techo c >a &&\n \t\tC_OBJ=$(git hash-object a) &&\n-\t\tgit checkout -m master &&\n+\t\tgit checkout -m main &&\n \t\ttest_cmp_rev :1:a $A_OBJ &&\n \t\ttest_cmp_rev :2:a $B_OBJ &&\n \t\ttest_cmp_rev :3:a $C_OBJ &&\ndiff --git a/t/t2024-checkout-dwim.sh b/t/t2024-checkout-dwim.sh\nindex a4f8d3a67e..4a1c901456 100755\n--- a/t/t2024-checkout-dwim.sh\n+++ b/t/t2024-checkout-dwim.sh\n@@ -29,11 +29,11 @@ status_uno_is_clean () {\n }\n \n test_expect_success 'setup' '\n-\ttest_commit my_master &&\n+\ttest_commit my_main &&\n \tgit init repo_a &&\n \t(\n \t\tcd repo_a &&\n-\t\ttest_commit a_master &&\n+\t\ttest_commit a_main &&\n \t\tgit checkout -b foo &&\n \t\ttest_commit a_foo &&\n \t\tgit checkout -b bar &&\n@@ -44,7 +44,7 @@ test_expect_success 'setup' '\n \tgit init repo_b &&\n \t(\n \t\tcd repo_b &&\n-\t\ttest_commit b_master &&\n+\t\ttest_commit b_main &&\n \t\tgit checkout -b foo &&\n \t\ttest_commit b_foo &&\n \t\tgit checkout -b baz &&\n@@ -60,23 +60,23 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'checkout of non-existing branch fails' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D xyzzy &&\n \n \ttest_must_fail git checkout xyzzy &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/xyzzy &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout of branch from multiple remotes fails #1' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D foo &&\n \n \ttest_must_fail git checkout foo &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/foo &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'when arg matches multiple remotes, do not fallback to interpreting as pathspec' '\n@@ -100,21 +100,21 @@ test_expect_success 'when arg matches multiple remotes, do not fallback to inter\n '\n \n test_expect_success 'checkout of branch from multiple remotes fails with advice' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D foo &&\n \ttest_must_fail git checkout foo 2>stderr &&\n-\ttest_branch master &&\n+\ttest_branch main &&\n \tstatus_uno_is_clean &&\n \ttest_i18ngrep \"^hint: \" stderr &&\n \ttest_must_fail git -c advice.checkoutAmbiguousRemoteBranchName=false \\\n \t\tcheckout foo 2>stderr &&\n-\ttest_branch master &&\n+\ttest_branch main &&\n \tstatus_uno_is_clean &&\n \ttest_i18ngrep ! \"^hint: \" stderr\n '\n \n test_expect_success PERL 'checkout -p with multiple remotes does not print advice' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D foo &&\n \n \tgit checkout -p foo 2>stderr &&\n@@ -123,7 +123,7 @@ test_expect_success PERL 'checkout -p with multiple remotes does not print advic\n '\n \n test_expect_success 'checkout of branch from multiple remotes succeeds with checkout.defaultRemote #1' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D foo &&\n \n@@ -135,7 +135,7 @@ test_expect_success 'checkout of branch from multiple remotes succeeds with chec\n '\n \n test_expect_success 'checkout of branch from a single remote succeeds #1' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D bar &&\n \n \tgit checkout bar &&\n@@ -146,7 +146,7 @@ test_expect_success 'checkout of branch from a single remote succeeds #1' '\n '\n \n test_expect_success 'checkout of branch from a single remote succeeds #2' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D baz &&\n \n \tgit checkout baz &&\n@@ -157,33 +157,33 @@ test_expect_success 'checkout of branch from a single remote succeeds #2' '\n '\n \n test_expect_success '--no-guess suppresses branch auto-vivification' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D bar &&\n \n \ttest_must_fail git checkout --no-guess bar &&\n \ttest_must_fail git rev-parse --verify refs/heads/bar &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout.guess = false suppresses branch auto-vivification' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D bar &&\n \n \ttest_config checkout.guess false &&\n \ttest_must_fail git checkout bar &&\n \ttest_must_fail git rev-parse --verify refs/heads/bar &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'setup more remotes with unconventional refspecs' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \tgit init repo_c &&\n \t(\n \t\tcd repo_c &&\n-\t\ttest_commit c_master &&\n+\t\ttest_commit c_main &&\n \t\tgit checkout -b bar &&\n \t\ttest_commit c_bar &&\n \t\tgit checkout -b spam &&\n@@ -192,7 +192,7 @@ test_expect_success 'setup more remotes with unconventional refspecs' '\n \tgit init repo_d &&\n \t(\n \t\tcd repo_d &&\n-\t\ttest_commit d_master &&\n+\t\ttest_commit d_main &&\n \t\tgit checkout -b baz &&\n \t\ttest_commit d_baz &&\n \t\tgit checkout -b eggs &&\n@@ -208,29 +208,29 @@ test_expect_success 'setup more remotes with unconventional refspecs' '\n '\n \n test_expect_success 'checkout of branch from multiple remotes fails #2' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D bar &&\n \n \ttest_must_fail git checkout bar &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/bar &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout of branch from multiple remotes fails #3' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D baz &&\n \n \ttest_must_fail git checkout baz &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/baz &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout of branch from a single remote succeeds #3' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D spam &&\n \n@@ -242,7 +242,7 @@ test_expect_success 'checkout of branch from a single remote succeeds #3' '\n '\n \n test_expect_success 'checkout of branch from a single remote succeeds #4' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D eggs &&\n \n@@ -254,7 +254,7 @@ test_expect_success 'checkout of branch from a single remote succeeds #4' '\n '\n \n test_expect_success 'checkout of branch with a file having the same name fails' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D spam &&\n \n@@ -262,11 +262,11 @@ test_expect_success 'checkout of branch with a file having the same name fails'\n \ttest_must_fail git checkout spam &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/spam &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout of branch with a file in subdir having the same name fails' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D spam &&\n \n@@ -276,11 +276,11 @@ test_expect_success 'checkout of branch with a file in subdir having the same na\n \ttest_must_fail git -C sub checkout spam &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/spam &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout <branch> -- succeeds, even if a file with the same name exists' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D spam &&\n \n@@ -294,7 +294,7 @@ test_expect_success 'checkout <branch> -- succeeds, even if a file with the same\n \n test_expect_success 'loosely defined local base branch is reported correctly' '\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tstatus_uno_is_clean &&\n \tgit branch strict &&\n \tgit branch loose &&\n@@ -302,8 +302,8 @@ test_expect_success 'loosely defined local base branch is reported correctly' '\n \n \ttest_config branch.strict.remote . &&\n \ttest_config branch.loose.remote . &&\n-\ttest_config branch.strict.merge refs/heads/master &&\n-\ttest_config branch.loose.merge master &&\n+\ttest_config branch.strict.merge refs/heads/main &&\n+\ttest_config branch.loose.merge main &&\n \n \tgit checkout strict | sed -e \"s/strict/BRANCHNAME/g\" >expect &&\n \tstatus_uno_is_clean &&\ndiff --git a/t/t2027-checkout-track.sh b/t/t2027-checkout-track.sh\nindex bcba1bf90c..bc46c5a68e 100755\n--- a/t/t2027-checkout-track.sh\n+++ b/t/t2027-checkout-track.sh\n@@ -10,14 +10,14 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'checkout --track -b creates a new tracking branch' '\n-\tgit checkout --track -b branch1 master &&\n+\tgit checkout --track -b branch1 main &&\n \ttest $(git rev-parse --abbrev-ref HEAD) = branch1 &&\n \ttest $(git config --get branch.branch1.remote) = . &&\n-\ttest $(git config --get branch.branch1.merge) = refs/heads/master\n+\ttest $(git config --get branch.branch1.merge) = refs/heads/main\n '\n \n test_expect_success 'checkout --track -b rejects an extra path argument' '\n-\ttest_must_fail git checkout --track -b branch2 master one.t 2>err &&\n+\ttest_must_fail git checkout --track -b branch2 main one.t 2>err &&\n \ttest_i18ngrep \"cannot be used with updating paths\" err\n '\n \ndiff --git a/t/t2030-unresolve-info.sh b/t/t2030-unresolve-info.sh\nindex 309199bca2..3cdd73c172 100755\n--- a/t/t2030-unresolve-info.sh\n+++ b/t/t2030-unresolve-info.sh\n@@ -59,7 +59,7 @@ test_expect_success setup '\n \ttest_commit fourth fi/le fourth &&\n \tgit checkout add-add &&\n \ttest_commit fifth add-differently &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'add records switch clears' '\n@@ -183,8 +183,8 @@ test_expect_success 'rerere forget (binary)' '\n '\n \n test_expect_success 'rerere forget (add-add conflict)' '\n-\tgit checkout -f master &&\n-\techo master >add-differently &&\n+\tgit checkout -f main &&\n+\techo main >add-differently &&\n \tgit add add-differently &&\n \tgit commit -m \"add differently\" &&\n \ttest_must_fail git merge fifth &&\ndiff --git a/t/t2060-switch.sh b/t/t2060-switch.sh\nindex 68c9101b02..11f85f8861 100755\n--- a/t/t2060-switch.sh\n+++ b/t/t2060-switch.sh\n@@ -23,41 +23,41 @@ test_expect_success 'switch branch' '\n '\n \n test_expect_success 'switch and detach' '\n-\ttest_when_finished git switch master &&\n-\ttest_must_fail git switch master^{commit} &&\n-\tgit switch --detach master^{commit} &&\n+\ttest_when_finished git switch main &&\n+\ttest_must_fail git switch main^{commit} &&\n+\tgit switch --detach main^{commit} &&\n \ttest_must_fail git symbolic-ref HEAD\n '\n \n test_expect_success 'switch and detach current branch' '\n-\ttest_when_finished git switch master &&\n-\tgit switch master &&\n+\ttest_when_finished git switch main &&\n+\tgit switch main &&\n \tgit switch --detach &&\n \ttest_must_fail git symbolic-ref HEAD\n '\n \n test_expect_success 'switch and create branch' '\n-\ttest_when_finished git switch master &&\n-\tgit switch -c temp master^ &&\n-\ttest_cmp_rev master^ refs/heads/temp &&\n+\ttest_when_finished git switch main &&\n+\tgit switch -c temp main^ &&\n+\ttest_cmp_rev main^ refs/heads/temp &&\n \techo refs/heads/temp >expected-branch &&\n \tgit symbolic-ref HEAD >actual-branch &&\n \ttest_cmp expected-branch actual-branch\n '\n \n test_expect_success 'force create branch from HEAD' '\n-\ttest_when_finished git switch master &&\n-\tgit switch --detach master &&\n+\ttest_when_finished git switch main &&\n+\tgit switch --detach main &&\n \ttest_must_fail git switch -c temp &&\n \tgit switch -C temp &&\n-\ttest_cmp_rev master refs/heads/temp &&\n+\ttest_cmp_rev main refs/heads/temp &&\n \techo refs/heads/temp >expected-branch &&\n \tgit symbolic-ref HEAD >actual-branch &&\n \ttest_cmp expected-branch actual-branch\n '\n \n test_expect_success 'new orphan branch from empty' '\n-\ttest_when_finished git switch master &&\n+\ttest_when_finished git switch main &&\n \ttest_must_fail git switch --orphan new-orphan HEAD &&\n \tgit switch --orphan new-orphan &&\n \ttest_commit orphan &&\n@@ -69,7 +69,7 @@ test_expect_success 'new orphan branch from empty' '\n '\n \n test_expect_success 'orphan branch works with --discard-changes' '\n-\ttest_when_finished git switch master &&\n+\ttest_when_finished git switch main &&\n \techo foo >foo.txt &&\n \tgit switch --discard-changes --orphan new-orphan2 &&\n \tgit ls-files >tracked-files &&\n@@ -77,7 +77,7 @@ test_expect_success 'orphan branch works with --discard-changes' '\n '\n \n test_expect_success 'switching ignores file of same branch name' '\n-\ttest_when_finished git switch master &&\n+\ttest_when_finished git switch main &&\n \t: >first-branch &&\n \tgit switch first-branch &&\n \techo refs/heads/first-branch >expected &&\n@@ -86,7 +86,7 @@ test_expect_success 'switching ignores file of same branch name' '\n '\n \n test_expect_success 'guess and create branch' '\n-\ttest_when_finished git switch master &&\n+\ttest_when_finished git switch main &&\n \ttest_must_fail git switch --no-guess foo &&\n \ttest_config checkout.guess false &&\n \ttest_must_fail git switch foo &&\ndiff --git a/t/t2070-restore.sh b/t/t2070-restore.sh\nindex 89e5a142c9..46e27212d6 100755\n--- a/t/t2070-restore.sh\n+++ b/t/t2070-restore.sh\n@@ -15,7 +15,7 @@ test_expect_success 'setup' '\n \techo ignored >ignored &&\n \techo /ignored >.gitignore &&\n \tgit add one two .gitignore &&\n-\tgit update-ref refs/heads/one master\n+\tgit update-ref refs/heads/one main\n '\n \n test_expect_success 'restore without pathspec is not ok' '\n@@ -91,7 +91,7 @@ test_expect_success 'restore --ignore-unmerged ignores unmerged entries' '\n \t\tgit switch -c first &&\n \t\techo first >unmerged &&\n \t\tgit commit -am first &&\n-\t\tgit switch -c second master &&\n+\t\tgit switch -c second main &&\n \t\techo second >unmerged &&\n \t\tgit commit -am second &&\n \t\ttest_must_fail git merge first &&\ndiff --git a/t/t2106-update-index-assume-unchanged.sh b/t/t2106-update-index-assume-unchanged.sh\nindex 99d858c6b7..2b923824c9 100755\n--- a/t/t2106-update-index-assume-unchanged.sh\n+++ b/t/t2106-update-index-assume-unchanged.sh\n@@ -19,6 +19,6 @@ test_expect_success 'do not switch branches with dirty file' \\\n \t git checkout other &&\n \t echo dirt >file &&\n \t git update-index --assume-unchanged file &&\n-\t test_must_fail git checkout master'\n+\t test_must_fail git checkout main'\n \n test_done\ndiff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh\nindex 5a7495474a..deca7b0271 100755\n--- a/t/t2400-worktree-add.sh\n+++ b/t/t2400-worktree-add.sh\n@@ -12,12 +12,12 @@ test_expect_success 'setup' '\n \n test_expect_success '\"add\" an existing worktree' '\n \tmkdir -p existing/subtree &&\n-\ttest_must_fail git worktree add --detach existing master\n+\ttest_must_fail git worktree add --detach existing main\n '\n \n test_expect_success '\"add\" an existing empty worktree' '\n \tmkdir existing_empty &&\n-\tgit worktree add --detach existing_empty master\n+\tgit worktree add --detach existing_empty main\n '\n \n test_expect_success '\"add\" using shorthand - fails when no previous branch' '\n@@ -29,7 +29,7 @@ test_expect_success '\"add\" using - shorthand' '\n \techo hello >myworld &&\n \tgit add myworld &&\n \tgit commit -m myworld &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit worktree add short-hand - &&\n \techo refs/heads/newbranch >expect &&\n \tgit -C short-hand rev-parse --symbolic-full-name HEAD >actual &&\n@@ -37,7 +37,7 @@ test_expect_success '\"add\" using - shorthand' '\n '\n \n test_expect_success '\"add\" refuses to checkout locked branch' '\n-\ttest_must_fail git worktree add zere master &&\n+\ttest_must_fail git worktree add zere main &&\n \t! test -d zere &&\n \t! test -d .git/worktrees/zere\n '\n@@ -46,13 +46,13 @@ test_expect_success 'checking out paths not complaining about linked checkouts'\n \t(\n \tcd existing_empty &&\n \techo dirty >>init.t &&\n-\tgit checkout master -- init.t\n+\tgit checkout main -- init.t\n \t)\n '\n \n test_expect_success '\"add\" worktree' '\n \tgit rev-parse HEAD >expect &&\n-\tgit worktree add --detach here master &&\n+\tgit worktree add --detach here main &&\n \t(\n \t\tcd here &&\n \t\ttest_cmp ../init.t init.t &&\n@@ -65,7 +65,7 @@ test_expect_success '\"add\" worktree' '\n \n test_expect_success '\"add\" worktree with lock' '\n \tgit rev-parse HEAD >expect &&\n-\tgit worktree add --detach --lock here-with-lock master &&\n+\tgit worktree add --detach --lock here-with-lock main &&\n \ttest -f .git/worktrees/here-with-lock/locked\n '\n \n@@ -73,7 +73,7 @@ test_expect_success '\"add\" worktree from a subdir' '\n \t(\n \t\tmkdir sub &&\n \t\tcd sub &&\n-\t\tgit worktree add --detach here master &&\n+\t\tgit worktree add --detach here main &&\n \t\tcd here &&\n \t\ttest_cmp ../../init.t init.t\n \t)\n@@ -82,19 +82,19 @@ test_expect_success '\"add\" worktree from a subdir' '\n test_expect_success '\"add\" from a linked checkout' '\n \t(\n \t\tcd here &&\n-\t\tgit worktree add --detach nested-here master &&\n+\t\tgit worktree add --detach nested-here main &&\n \t\tcd nested-here &&\n \t\tgit fsck\n \t)\n '\n \n test_expect_success '\"add\" worktree creating new branch' '\n-\tgit worktree add -b newmaster there master &&\n+\tgit worktree add -b newmain there main &&\n \t(\n \t\tcd there &&\n \t\ttest_cmp ../init.t init.t &&\n \t\tgit symbolic-ref HEAD >actual &&\n-\t\techo refs/heads/newmaster >expect &&\n+\t\techo refs/heads/newmain >expect &&\n \t\ttest_cmp expect actual &&\n \t\tgit fsck\n \t)\n@@ -103,7 +103,7 @@ test_expect_success '\"add\" worktree creating new branch' '\n test_expect_success 'die the same branch is already checked out' '\n \t(\n \t\tcd here &&\n-\t\ttest_must_fail git checkout newmaster\n+\t\ttest_must_fail git checkout newmain\n \t)\n '\n \n@@ -112,20 +112,20 @@ test_expect_success SYMLINKS 'die the same branch is already checked out (symlin\n \tref=$(git -C there symbolic-ref HEAD) &&\n \trm \"$head\" &&\n \tln -s \"$ref\" \"$head\" &&\n-\ttest_must_fail git -C here checkout newmaster\n+\ttest_must_fail git -C here checkout newmain\n '\n \n test_expect_success 'not die the same branch is already checked out' '\n \t(\n \t\tcd here &&\n-\t\tgit worktree add --force anothernewmaster newmaster\n+\t\tgit worktree add --force anothernewmain newmain\n \t)\n '\n \n test_expect_success 'not die on re-checking out current branch' '\n \t(\n \t\tcd there &&\n-\t\tgit checkout newmaster\n+\t\tgit checkout newmain\n \t)\n '\n \n@@ -133,14 +133,14 @@ test_expect_success '\"add\" from a bare repo' '\n \t(\n \t\tgit clone --bare . bare &&\n \t\tcd bare &&\n-\t\tgit worktree add -b bare-master ../there2 master\n+\t\tgit worktree add -b bare-main ../there2 main\n \t)\n '\n \n test_expect_success 'checkout from a bare repo without \"add\"' '\n \t(\n \t\tcd bare &&\n-\t\ttest_must_fail git checkout master\n+\t\ttest_must_fail git checkout main\n \t)\n '\n \n@@ -148,7 +148,7 @@ test_expect_success '\"add\" default branch of a bare repo' '\n \t(\n \t\tgit clone --bare . bare2 &&\n \t\tcd bare2 &&\n-\t\tgit worktree add ../there3 master\n+\t\tgit worktree add ../there3 main\n \t)\n '\n \n@@ -165,7 +165,7 @@ test_expect_success 'checkout with grafts' '\n \tEOF\n \tgit log --format=%s -2 >actual &&\n \ttest_cmp expected actual &&\n-\tgit worktree add --detach grafted master &&\n+\tgit worktree add --detach grafted main &&\n \tgit --git-dir=grafted/.git log --format=%s -2 >actual &&\n \ttest_cmp expected actual\n '\n@@ -226,34 +226,34 @@ test_expect_success '\"add\" no auto-vivify with --detach and <branch> omitted' '\n '\n \n test_expect_success '\"add\" -b/-B mutually exclusive' '\n-\ttest_must_fail git worktree add -b poodle -B poodle bamboo master\n+\ttest_must_fail git worktree add -b poodle -B poodle bamboo main\n '\n \n test_expect_success '\"add\" -b/--detach mutually exclusive' '\n-\ttest_must_fail git worktree add -b poodle --detach bamboo master\n+\ttest_must_fail git worktree add -b poodle --detach bamboo main\n '\n \n test_expect_success '\"add\" -B/--detach mutually exclusive' '\n-\ttest_must_fail git worktree add -B poodle --detach bamboo master\n+\ttest_must_fail git worktree add -B poodle --detach bamboo main\n '\n \n test_expect_success '\"add -B\" fails if the branch is checked out' '\n-\tgit rev-parse newmaster >before &&\n-\ttest_must_fail git worktree add -B newmaster bamboo master &&\n-\tgit rev-parse newmaster >after &&\n+\tgit rev-parse newmain >before &&\n+\ttest_must_fail git worktree add -B newmain bamboo main &&\n+\tgit rev-parse newmain >after &&\n \ttest_cmp before after\n '\n \n test_expect_success 'add -B' '\n-\tgit worktree add -B poodle bamboo2 master^ &&\n+\tgit worktree add -B poodle bamboo2 main^ &&\n \tgit -C bamboo2 symbolic-ref HEAD >actual &&\n \techo refs/heads/poodle >expected &&\n \ttest_cmp expected actual &&\n-\ttest_cmp_rev master^ poodle\n+\ttest_cmp_rev main^ poodle\n '\n \n test_expect_success 'add --quiet' '\n-\tgit worktree add --quiet another-worktree master 2>actual &&\n+\tgit worktree add --quiet another-worktree main 2>actual &&\n \ttest_must_be_empty actual\n '\n \n@@ -348,24 +348,24 @@ test_branch_upstream () {\n \n test_expect_success '--track sets up tracking' '\n \ttest_when_finished rm -rf track &&\n-\tgit worktree add --track -b track track master &&\n-\ttest_branch_upstream track . master\n+\tgit worktree add --track -b track track main &&\n+\ttest_branch_upstream track . main\n '\n \n # setup remote repository $1 and repository $2 with $1 set up as\n-# remote.  The remote has two branches, master and foo.\n+# remote.  The remote has two branches, main and foo.\n setup_remote_repo () {\n \tgit init $1 &&\n \t(\n \t\tcd $1 &&\n-\t\ttest_commit $1_master &&\n+\t\ttest_commit $1_main &&\n \t\tgit checkout -b foo &&\n \t\ttest_commit upstream_foo\n \t) &&\n \tgit init $2 &&\n \t(\n \t\tcd $2 &&\n-\t\ttest_commit $2_master &&\n+\t\ttest_commit $2_main &&\n \t\tgit remote add $1 ../$1 &&\n \t\tgit config remote.$1.fetch \\\n \t\t\t\"refs/heads/*:refs/remotes/$1/*\" &&\ndiff --git a/t/t2401-worktree-prune.sh b/t/t2401-worktree-prune.sh\nindex a6ce7f590b..7a2ff04f44 100755\n--- a/t/t2401-worktree-prune.sh\n+++ b/t/t2401-worktree-prune.sh\n@@ -87,7 +87,7 @@ test_expect_success 'not prune recent checkouts' '\n \n test_expect_success 'not prune proper checkouts' '\n \ttest_when_finished rm -r .git/worktrees &&\n-\tgit worktree add --detach \"$PWD/nop\" master &&\n+\tgit worktree add --detach \"$PWD/nop\" main &&\n \tgit worktree prune &&\n \ttest -d .git/worktrees/nop\n '\ndiff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh\nindex 795ddca2e4..03603d0dd0 100755\n--- a/t/t2402-worktree-list.sh\n+++ b/t/t2402-worktree-list.sh\n@@ -21,7 +21,7 @@ test_expect_success 'rev-parse --git-common-dir on main worktree' '\n test_expect_success 'rev-parse --git-path objects linked worktree' '\n \techo \"$(git rev-parse --show-toplevel)/.git/objects\" >expect &&\n \ttest_when_finished \"rm -rf linked-tree actual expect && git worktree prune\" &&\n-\tgit worktree add --detach linked-tree master &&\n+\tgit worktree add --detach linked-tree main &&\n \tgit -C linked-tree rev-parse --git-path objects >actual &&\n \ttest_cmp expect actual\n '\n@@ -29,7 +29,7 @@ test_expect_success 'rev-parse --git-path objects linked worktree' '\n test_expect_success '\"list\" all worktrees from main' '\n \techo \"$(git rev-parse --show-toplevel) $(git rev-parse --short HEAD) [$(git symbolic-ref --short HEAD)]\" >expect &&\n \ttest_when_finished \"rm -rf here out actual expect && git worktree prune\" &&\n-\tgit worktree add --detach here master &&\n+\tgit worktree add --detach here main &&\n \techo \"$(git -C here rev-parse --show-toplevel) $(git rev-parse --short HEAD) (detached HEAD)\" >>expect &&\n \tgit worktree list >out &&\n \tsed \"s/  */ /g\" <out >actual &&\n@@ -39,7 +39,7 @@ test_expect_success '\"list\" all worktrees from main' '\n test_expect_success '\"list\" all worktrees from linked' '\n \techo \"$(git rev-parse --show-toplevel) $(git rev-parse --short HEAD) [$(git symbolic-ref --short HEAD)]\" >expect &&\n \ttest_when_finished \"rm -rf here out actual expect && git worktree prune\" &&\n-\tgit worktree add --detach here master &&\n+\tgit worktree add --detach here main &&\n \techo \"$(git -C here rev-parse --show-toplevel) $(git rev-parse --short HEAD) (detached HEAD)\" >>expect &&\n \tgit -C here worktree list >out &&\n \tsed \"s/  */ /g\" <out >actual &&\n@@ -52,7 +52,7 @@ test_expect_success '\"list\" all worktrees --porcelain' '\n \techo \"branch $(git symbolic-ref HEAD)\" >>expect &&\n \techo >>expect &&\n \ttest_when_finished \"rm -rf here actual expect && git worktree prune\" &&\n-\tgit worktree add --detach here master &&\n+\tgit worktree add --detach here main &&\n \techo \"worktree $(git -C here rev-parse --show-toplevel)\" >>expect &&\n \techo \"HEAD $(git rev-parse HEAD)\" >>expect &&\n \techo \"detached\" >>expect &&\n@@ -63,8 +63,8 @@ test_expect_success '\"list\" all worktrees --porcelain' '\n \n test_expect_success '\"list\" all worktrees with locked annotation' '\n \ttest_when_finished \"rm -rf locked unlocked out && git worktree prune\" &&\n-\tgit worktree add --detach locked master &&\n-\tgit worktree add --detach unlocked master &&\n+\tgit worktree add --detach locked main &&\n+\tgit worktree add --detach unlocked main &&\n \tgit worktree lock locked &&\n \tgit worktree list >out &&\n \tgrep \"/locked  *[0-9a-f].* locked$\" out &&\n@@ -76,13 +76,13 @@ test_expect_success 'bare repo setup' '\n \techo \"data\" >file1 &&\n \tgit add file1 &&\n \tgit commit -m\"File1: add data\" &&\n-\tgit push bare1 master &&\n+\tgit push bare1 main &&\n \tgit reset --hard HEAD^\n '\n \n test_expect_success '\"list\" all worktrees from bare main' '\n \ttest_when_finished \"rm -rf there out actual expect && git -C bare1 worktree prune\" &&\n-\tgit -C bare1 worktree add --detach ../there master &&\n+\tgit -C bare1 worktree add --detach ../there main &&\n \techo \"$(pwd)/bare1 (bare)\" >expect &&\n \techo \"$(git -C there rev-parse --show-toplevel) $(git -C there rev-parse --short HEAD) (detached HEAD)\" >>expect &&\n \tgit -C bare1 worktree list >out &&\n@@ -92,7 +92,7 @@ test_expect_success '\"list\" all worktrees from bare main' '\n \n test_expect_success '\"list\" all worktrees --porcelain from bare main' '\n \ttest_when_finished \"rm -rf there actual expect && git -C bare1 worktree prune\" &&\n-\tgit -C bare1 worktree add --detach ../there master &&\n+\tgit -C bare1 worktree add --detach ../there main &&\n \techo \"worktree $(pwd)/bare1\" >expect &&\n \techo \"bare\" >>expect &&\n \techo >>expect &&\n@@ -106,7 +106,7 @@ test_expect_success '\"list\" all worktrees --porcelain from bare main' '\n \n test_expect_success '\"list\" all worktrees from linked with a bare main' '\n \ttest_when_finished \"rm -rf there out actual expect && git -C bare1 worktree prune\" &&\n-\tgit -C bare1 worktree add --detach ../there master &&\n+\tgit -C bare1 worktree add --detach ../there main &&\n \techo \"$(pwd)/bare1 (bare)\" >expect &&\n \techo \"$(git -C there rev-parse --show-toplevel) $(git -C there rev-parse --short HEAD) (detached HEAD)\" >>expect &&\n \tgit -C there worktree list >out &&\ndiff --git a/t/t2405-worktree-submodule.sh b/t/t2405-worktree-submodule.sh\nindex e1b2bfd87e..ccc47fae97 100755\n--- a/t/t2405-worktree-submodule.sh\n+++ b/t/t2405-worktree-submodule.sh\n@@ -31,7 +31,7 @@ test_expect_success 'add superproject worktree' '\n '\n \n test_expect_failure 'submodule is checked out just after worktree add' '\n-\tgit -C worktree diff --submodule master\"^!\" >out &&\n+\tgit -C worktree diff --submodule main\"^!\" >out &&\n \tgrep \"file1 updated\" out\n '\n \n@@ -41,7 +41,7 @@ test_expect_success 'add superproject worktree and initialize submodules' '\n '\n \n test_expect_success 'submodule is checked out just after submodule update in linked worktree' '\n-\tgit -C worktree-submodule-update diff --submodule master\"^!\" >out &&\n+\tgit -C worktree-submodule-update diff --submodule main\"^!\" >out &&\n \tgrep \"file1 updated\" out\n '\n \n@@ -51,7 +51,7 @@ test_expect_success 'add superproject worktree and manually add submodule worktr\n '\n \n test_expect_success 'submodule is checked out after manually adding submodule worktree' '\n-\tgit -C linked_submodule diff --submodule master\"^!\" >out &&\n+\tgit -C linked_submodule diff --submodule main\"^!\" >out &&\n \tgrep \"file1 updated\" out\n '\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 126004e342..3bb6675390 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,7 +257,7 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-[01]*)\n+[0-2]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409822","messageId":"ec7102156e055dfb3659821ebc9fa1b616f74100.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 06/28] t34*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:36Z","receivedAt":"2020-11-12T22:44:14Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t3404, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in\nt34*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t34*.sh &&\n\t   git checkout HEAD -- t34\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3400-rebase.sh                 | 60 +++++++++++++++----------------\n t/t3402-rebase-merge.sh           | 44 +++++++++++------------\n t/t3403-rebase-skip.sh            |  6 ++--\n t/t3405-rebase-malformed.sh       |  8 ++---\n t/t3406-rebase-message.sh         | 24 ++++++-------\n t/t3407-rebase-abort.sh           | 18 +++++-----\n t/t3408-rebase-multi-line.sh      |  2 +-\n t/t3409-rebase-preserve-merges.sh | 10 +++---\n t/t3412-rebase-root.sh            | 28 +++++++--------\n t/t3413-rebase-hook.sh            | 42 +++++++++++-----------\n t/t3415-rebase-autosquash.sh      |  2 +-\n t/t3416-rebase-onto-threedots.sh  | 54 ++++++++++++++--------------\n t/t3418-rebase-continue.sh        | 24 ++++++-------\n t/t3419-rebase-patch-id.sh        | 12 +++----\n t/t3420-rebase-autostash.sh       |  8 ++---\n t/t3423-rebase-reword.sh          |  6 ++--\n t/t3427-rebase-subtree.sh         | 20 +++++------\n t/t3430-rebase-merges.sh          | 16 ++++-----\n t/t3431-rebase-fork-point.sh      | 32 ++++++++---------\n t/t3432-rebase-fast-forward.sh    | 34 +++++++++---------\n t/t3434-rebase-i18n.sh            |  8 ++---\n t/t3435-rebase-gpg-sign.sh        |  4 +--\n t/t3436-rebase-more-options.sh    |  2 +-\n t/test-lib.sh                     |  8 ++++-\n 24 files changed, 239 insertions(+), 233 deletions(-)\n\ndiff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\nindex 40d2975995..cdfc7e083a 100755\n--- a/t/t3400-rebase.sh\n+++ b/t/t3400-rebase.sh\n@@ -24,15 +24,15 @@ test_expect_success 'prepare repository with topic branches' '\n \tgit update-index --add Y &&\n \tgit commit -m \"Add Y.\" &&\n \tgit checkout -b filemove &&\n-\tgit reset --soft master &&\n+\tgit reset --soft main &&\n \tmkdir D &&\n \tgit mv A D/A &&\n \tgit commit -m \"Move A.\" &&\n-\tgit checkout -b my-topic-branch master &&\n+\tgit checkout -b my-topic-branch main &&\n \techo Second >B &&\n \tgit update-index --add B &&\n \tgit commit -m \"Add B.\" &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \techo Third >>A &&\n \tgit update-index A &&\n \tgit commit -m \"Modify A.\" &&\n@@ -46,23 +46,23 @@ test_expect_success 'prepare repository with topic branches' '\n \n test_expect_success 'rebase on dirty worktree' '\n \techo dirty >>A &&\n-\ttest_must_fail git rebase master\n+\ttest_must_fail git rebase main\n '\n \n test_expect_success 'rebase on dirty cache' '\n \tgit add A &&\n-\ttest_must_fail git rebase master\n+\ttest_must_fail git rebase main\n '\n \n-test_expect_success 'rebase against master' '\n+test_expect_success 'rebase against main' '\n \tgit reset --hard HEAD &&\n-\tgit rebase master\n+\tgit rebase main\n '\n \n test_expect_success 'rebase sets ORIG_HEAD to pre-rebase state' '\n \tgit checkout -b orig-head topic &&\n \tpre=\"$(git rev-parse --verify HEAD)\" &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \ttest_cmp_rev \"$pre\" ORIG_HEAD &&\n \ttest_cmp_rev ! \"$pre\" HEAD\n '\n@@ -93,19 +93,19 @@ test_expect_success 'HEAD was detached during rebase' '\n \n test_expect_success 'rebase from ambiguous branch name' '\n \tgit checkout -b topic side &&\n-\tgit rebase master\n+\tgit rebase main\n '\n \n test_expect_success 'rebase off of the previous branch using \"-\"' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout HEAD^ &&\n \tgit rebase @{-1} >expect.messages &&\n-\tgit merge-base master HEAD >expect.forkpoint &&\n+\tgit merge-base main HEAD >expect.forkpoint &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout HEAD^ &&\n \tgit rebase - >actual.messages &&\n-\tgit merge-base master HEAD >actual.forkpoint &&\n+\tgit merge-base main HEAD >actual.forkpoint &&\n \n \ttest_cmp expect.forkpoint actual.forkpoint &&\n \t# the next one is dubious---we may want to say \"-\",\n@@ -114,7 +114,7 @@ test_expect_success 'rebase off of the previous branch using \"-\"' '\n '\n \n test_expect_success 'rebase a single mode change' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -D topic &&\n \techo 1 >X &&\n \tgit add X &&\n@@ -126,7 +126,7 @@ test_expect_success 'rebase a single mode change' '\n \ttest_chmod +x A &&\n \ttest_tick &&\n \tgit commit -m modechange &&\n-\tGIT_TRACE=1 git rebase master\n+\tGIT_TRACE=1 git rebase main\n '\n \n test_expect_success 'rebase is not broken by diff.renames' '\n@@ -162,11 +162,11 @@ test_expect_success 'fail when upstream arg is missing and not configured' '\n test_expect_success 'rebase works with format.useAutoBase' '\n \ttest_config format.useAutoBase true &&\n \tgit checkout topic &&\n-\tgit rebase master\n+\tgit rebase main\n '\n \n test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg (--merge)' '\n-\tgit checkout -b default-base master &&\n+\tgit checkout -b default-base main &&\n \tgit checkout -b default topic &&\n \tgit config branch.default.remote . &&\n \tgit config branch.default.merge refs/heads/default-base &&\n@@ -184,7 +184,7 @@ test_expect_success 'default to common base in @{upstream}s reflog if no upstrea\n '\n \n test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg (--apply)' '\n-\tgit checkout -B default-base master &&\n+\tgit checkout -B default-base main &&\n \tgit checkout -B default topic &&\n \tgit config branch.default.remote . &&\n \tgit config branch.default.merge refs/heads/default-base &&\n@@ -226,13 +226,13 @@ test_expect_success 'cherry-picked commits and fork-point work together' '\n \n test_expect_success 'rebase --apply -q is quiet' '\n \tgit checkout -b quiet topic &&\n-\tgit rebase --apply -q master >output.out 2>&1 &&\n+\tgit rebase --apply -q main >output.out 2>&1 &&\n \ttest_must_be_empty output.out\n '\n \n test_expect_success 'rebase --merge -q is quiet' '\n \tgit checkout -B quiet topic &&\n-\tgit rebase --merge -q master >output.out 2>&1 &&\n+\tgit rebase --merge -q main >output.out 2>&1 &&\n \ttest_must_be_empty output.out\n '\n \n@@ -294,7 +294,7 @@ test_expect_success 'rebase commit with an ancient timestamp' '\n '\n \n test_expect_success 'rebase with \"From \" line in commit message' '\n-\tgit checkout -b preserve-from master~1 &&\n+\tgit checkout -b preserve-from main~1 &&\n \tcat >From_.msg <<EOF &&\n Somebody embedded an mbox in a commit message\n \n@@ -310,7 +310,7 @@ EOF\n \t>From_ &&\n \tgit add From_ &&\n \tgit commit -F From_.msg &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \tgit log -1 --pretty=format:%B >out &&\n \ttest_cmp From_.msg out\n '\n@@ -357,12 +357,12 @@ test_expect_success 'rebase --apply and .gitattributes' '\n \t\tgit cherry-pick test &&\n \n \t\tgit checkout test &&\n-\t\tgit rebase master &&\n+\t\tgit rebase main &&\n \t\tgrep \"smudged\" a.txt &&\n \n \t\tgit checkout removal &&\n \t\tgit reset --hard &&\n-\t\tgit rebase master &&\n+\t\tgit rebase main &&\n \t\tgrep \"clean\" a.txt\n \t)\n '\n@@ -402,20 +402,20 @@ test_expect_success 'rebase -c rebase.useBuiltin=false warning' '\n '\n \n test_expect_success 'switch to branch checked out here' '\n-\tgit checkout master &&\n-\tgit rebase master master\n+\tgit checkout main &&\n+\tgit rebase main main\n '\n \n test_expect_success 'switch to branch not checked out' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch other &&\n-\tgit rebase master other\n+\tgit rebase main other\n '\n \n test_expect_success 'refuse to switch to branch checked out elsewhere' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit worktree add wt &&\n-\ttest_must_fail git -C wt rebase master master 2>err &&\n+\ttest_must_fail git -C wt rebase main main 2>err &&\n \ttest_i18ngrep \"already checked out\" err\n '\n \ndiff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh\nindex 6e032716a6..ed7fcb5a6c 100755\n--- a/t/t3402-rebase-merge.sh\n+++ b/t/t3402-rebase-merge.sh\n@@ -19,10 +19,10 @@ test_expect_success setup '\n \tgit commit -m\"initial\" &&\n \tgit branch side &&\n \techo \"11 $T\" >>original &&\n-\tgit commit -a -m\"master updates a bit.\" &&\n+\tgit commit -a -m\"main updates a bit.\" &&\n \n \techo \"12 $T\" >>original &&\n-\tgit commit -a -m\"master updates a bit more.\" &&\n+\tgit commit -a -m\"main updates a bit more.\" &&\n \n \tgit checkout side &&\n \t(echo \"0 $T\" && cat original) >renamed &&\n@@ -47,13 +47,13 @@ test_expect_success setup '\n '\n \n test_expect_success 'reference merge' '\n-\tgit merge -s recursive -m \"reference merge\" master\n+\tgit merge -s recursive -m \"reference merge\" main\n '\n \n PRE_REBASE=$(git rev-parse test-rebase)\n test_expect_success rebase '\n \tgit checkout test-rebase &&\n-\tGIT_TRACE=1 git rebase --merge master\n+\tGIT_TRACE=1 git rebase --merge main\n '\n \n test_expect_success 'test-rebase@{1} is pre rebase' '\n@@ -72,24 +72,24 @@ test_expect_success 'merge and rebase should match' '\n '\n \n test_expect_success 'rebase the other way' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit rebase --merge side\n '\n \n test_expect_success 'rebase -Xtheirs' '\n-\tgit checkout -b conflicting master~2 &&\n+\tgit checkout -b conflicting main~2 &&\n \techo \"AB $T\" >> original &&\n \tgit commit -mconflicting original &&\n-\tgit rebase -Xtheirs master &&\n+\tgit rebase -Xtheirs main &&\n \tgrep AB original &&\n \t! grep 11 original\n '\n \n test_expect_success 'rebase -Xtheirs from orphan' '\n-\tgit checkout --orphan orphan-conflicting master~2 &&\n+\tgit checkout --orphan orphan-conflicting main~2 &&\n \techo \"AB $T\" >> original &&\n \tgit commit -morphan-conflicting original &&\n-\tgit rebase -Xtheirs master &&\n+\tgit rebase -Xtheirs main &&\n \tgrep AB original &&\n \t! grep 11 original\n '\n@@ -107,9 +107,9 @@ test_expect_success 'merge and rebase should match' '\n \n test_expect_success 'picking rebase' '\n \tgit reset --hard side &&\n-\tgit rebase --merge --onto master side^^ &&\n-\tmb=$(git merge-base master HEAD) &&\n-\tif test \"$mb\" = \"$(git rev-parse master)\"\n+\tgit rebase --merge --onto main side^^ &&\n+\tmb=$(git merge-base main HEAD) &&\n+\tif test \"$mb\" = \"$(git rev-parse main)\"\n \tthen\n \t\techo happy\n \telse\n@@ -140,11 +140,11 @@ test_expect_success 'rebase -s funny -Xopt' '\n \tEOF\n \tchmod +x test-bin/git-merge-funny &&\n \tgit reset --hard &&\n-\tgit checkout -b test-funny master^ &&\n+\tgit checkout -b test-funny main^ &&\n \ttest_commit funny &&\n \t(\n \t\tPATH=./test-bin:$PATH &&\n-\t\tgit rebase -s funny -Xopt master\n+\t\tgit rebase -s funny -Xopt main\n \t) &&\n \ttest -f funny.was.run\n '\n@@ -165,7 +165,7 @@ test_expect_success 'rebase --skip works with two conflicts in a row' '\n test_expect_success '--reapply-cherry-picks' '\n \tgit init repo &&\n \n-\t# O(1-10) -- O(1-11) -- O(0-10) master\n+\t# O(1-10) -- O(1-11) -- O(0-10) main\n \t#        \\\n \t#         -- O(1-11) -- O(1-12) otherbranch\n \n@@ -187,18 +187,18 @@ test_expect_success '--reapply-cherry-picks' '\n \tgit -C repo commit -a -m \"add 12 in another branch\" &&\n \n \t# Regular rebase fails, because the 1-11 commit is deduplicated\n-\ttest_must_fail git -C repo rebase --merge master 2> err &&\n+\ttest_must_fail git -C repo rebase --merge main 2> err &&\n \ttest_i18ngrep \"error: could not apply.*add 12 in another branch\" err &&\n \tgit -C repo rebase --abort &&\n \n \t# With --reapply-cherry-picks, it works\n-\tgit -C repo rebase --merge --reapply-cherry-picks master\n+\tgit -C repo rebase --merge --reapply-cherry-picks main\n '\n \n test_expect_success '--reapply-cherry-picks refrains from reading unneeded blobs' '\n \tgit init server &&\n \n-\t# O(1-10) -- O(1-11) -- O(1-12) master\n+\t# O(1-10) -- O(1-11) -- O(1-12) main\n \t#        \\\n \t#         -- O(0-10) otherbranch\n \n@@ -220,18 +220,18 @@ test_expect_success '--reapply-cherry-picks refrains from reading unneeded blobs\n \ttest_config -C server uploadpack.allowanysha1inwant 1 &&\n \n \tgit clone --filter=blob:none \"file://$(pwd)/server\" client &&\n-\tgit -C client checkout origin/master &&\n+\tgit -C client checkout origin/main &&\n \tgit -C client checkout origin/otherbranch &&\n \n \t# Sanity check to ensure that the blobs from the merge base and \"add\n \t# 11\" are missing\n \tgit -C client rev-list --objects --all --missing=print >missing_list &&\n-\tMERGE_BASE_BLOB=$(git -C server rev-parse master^^:file.txt) &&\n-\tADD_11_BLOB=$(git -C server rev-parse master^:file.txt) &&\n+\tMERGE_BASE_BLOB=$(git -C server rev-parse main^^:file.txt) &&\n+\tADD_11_BLOB=$(git -C server rev-parse main^:file.txt) &&\n \tgrep \"[?]$MERGE_BASE_BLOB\" missing_list &&\n \tgrep \"[?]$ADD_11_BLOB\" missing_list &&\n \n-\tgit -C client rebase --merge --reapply-cherry-picks origin/master &&\n+\tgit -C client rebase --merge --reapply-cherry-picks origin/main &&\n \n \t# The blob from the merge base had to be fetched, but not \"add 11\"\n \tgit -C client rev-list --objects --all --missing=print >missing_list &&\ndiff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh\nindex a927774910..360b46adef 100755\n--- a/t/t3403-rebase-skip.sh\n+++ b/t/t3403-rebase-skip.sh\n@@ -48,7 +48,7 @@ test_expect_success setup '\n \t'\n \n test_expect_success 'rebase with git am -3 (default)' '\n-\ttest_must_fail git rebase master\n+\ttest_must_fail git rebase main\n '\n \n test_expect_success 'rebase --skip can not be used with other options' '\n@@ -64,7 +64,7 @@ test_expect_success 'rebase moves back to skip-reference' '\n \ttest refs/heads/skip-reference = $(git symbolic-ref HEAD) &&\n \tgit branch post-rebase &&\n \tgit reset --hard pre-rebase &&\n-\ttest_must_fail git rebase master &&\n+\ttest_must_fail git rebase main &&\n \techo \"hello\" > hello &&\n \tgit add hello &&\n \tgit rebase --continue &&\n@@ -75,7 +75,7 @@ test_expect_success 'rebase moves back to skip-reference' '\n test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge'\n \n test_expect_success 'rebase with --merge' '\n-\ttest_must_fail git rebase --merge master\n+\ttest_must_fail git rebase --merge main\n '\n \n test_expect_success 'rebase --skip with --merge' '\ndiff --git a/t/t3405-rebase-malformed.sh b/t/t3405-rebase-malformed.sh\nindex 860e63e444..7ef8bfa0ac 100755\n--- a/t/t3405-rebase-malformed.sh\n+++ b/t/t3405-rebase-malformed.sh\n@@ -52,7 +52,7 @@ test_expect_success setup '\n \tgit add file3 &&\n \tgit commit --allow-empty-message -m \"\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \techo One >file1 &&\n \ttest_tick &&\n@@ -62,7 +62,7 @@ test_expect_success setup '\n \n test_expect_success 'rebase commit with multi-line subject' '\n \n-\tgit rebase master multi-line-subject &&\n+\tgit rebase main multi-line-subject &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >F1 &&\n \n \ttest_cmp F0 F1 &&\n@@ -70,14 +70,14 @@ test_expect_success 'rebase commit with multi-line subject' '\n '\n \n test_expect_success 'rebase commit with diff in message' '\n-\tgit rebase master diff-in-message &&\n+\tgit rebase main diff-in-message &&\n \tgit cat-file commit HEAD | sed -e \"1,/^$/d\" >G1 &&\n \ttest_cmp G0 G1 &&\n \ttest_cmp G G0\n '\n \n test_expect_success 'rebase -m commit with empty message' '\n-\tgit rebase -m master empty-message-merge\n+\tgit rebase -m main empty-message-merge\n '\n \n test_expect_success 'rebase -i commit with empty message' '\ndiff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh\nindex 4afc528165..00e271fb36 100755\n--- a/t/t3406-rebase-message.sh\n+++ b/t/t3406-rebase-message.sh\n@@ -18,27 +18,27 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'rebase -m' '\n-\tgit rebase -m master >actual &&\n+\tgit rebase -m main >actual &&\n \ttest_must_be_empty actual\n '\n \n-test_expect_success 'rebase against master twice' '\n-\tgit rebase --apply master >out &&\n+test_expect_success 'rebase against main twice' '\n+\tgit rebase --apply main >out &&\n \ttest_i18ngrep \"Current branch topic is up to date\" out\n '\n \n-test_expect_success 'rebase against master twice with --force' '\n-\tgit rebase --force-rebase --apply master >out &&\n+test_expect_success 'rebase against main twice with --force' '\n+\tgit rebase --force-rebase --apply main >out &&\n \ttest_i18ngrep \"Current branch topic is up to date, rebase forced\" out\n '\n \n-test_expect_success 'rebase against master twice from another branch' '\n+test_expect_success 'rebase against main twice from another branch' '\n \tgit checkout topic^ &&\n-\tgit rebase --apply master topic >out &&\n+\tgit rebase --apply main topic >out &&\n \ttest_i18ngrep \"Current branch topic is up to date\" out\n '\n \n-test_expect_success 'rebase fast-forward to master' '\n+test_expect_success 'rebase fast-forward to main' '\n \tgit checkout topic^ &&\n \tgit rebase --apply topic >out &&\n \ttest_i18ngrep \"Fast-forwarded HEAD to topic\" out\n@@ -46,21 +46,21 @@ test_expect_success 'rebase fast-forward to master' '\n \n test_expect_success 'rebase --stat' '\n \tgit reset --hard start &&\n-\tgit rebase --stat master >diffstat.txt &&\n+\tgit rebase --stat main >diffstat.txt &&\n \tgrep \"^ fileX |  *1 +$\" diffstat.txt\n '\n \n test_expect_success 'rebase w/config rebase.stat' '\n \tgit reset --hard start &&\n \tgit config rebase.stat true &&\n-\tgit rebase master >diffstat.txt &&\n+\tgit rebase main >diffstat.txt &&\n \tgrep \"^ fileX |  *1 +$\" diffstat.txt\n '\n \n test_expect_success 'rebase -n overrides config rebase.stat config' '\n \tgit reset --hard start &&\n \tgit config rebase.stat true &&\n-\tgit rebase -n master >diffstat.txt &&\n+\tgit rebase -n main >diffstat.txt &&\n \t! grep \"^ fileX |  *1 +$\" diffstat.txt\n '\n \n@@ -113,7 +113,7 @@ test_expect_success 'rebase -i onto unrelated history' '\n \tgit init unrelated &&\n \ttest_commit -C unrelated 1 &&\n \tgit -C unrelated remote add -f origin \"$PWD\" &&\n-\tgit -C unrelated branch --set-upstream-to=origin/master &&\n+\tgit -C unrelated branch --set-upstream-to=origin/main &&\n \tgit -C unrelated -c core.editor=true rebase -i -v --stat >actual &&\n \ttest_i18ngrep \"Changes to \" actual &&\n \ttest_i18ngrep \"5 files changed\" actual\ndiff --git a/t/t3407-rebase-abort.sh b/t/t3407-rebase-abort.sh\nindex 97efea0f56..2c2a5b9c10 100755\n--- a/t/t3407-rebase-abort.sh\n+++ b/t/t3407-rebase-abort.sh\n@@ -37,7 +37,7 @@ testrebase() {\n \t\tcd \"$work_dir\" &&\n \t\t# Clean up the state from the previous one\n \t\tgit reset --hard pre-rebase &&\n-\t\ttest_must_fail git rebase$type master &&\n+\t\ttest_must_fail git rebase$type main &&\n \t\ttest_path_is_dir \"$dotest\" &&\n \t\tgit rebase --abort &&\n \t\ttest $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&\n@@ -48,10 +48,10 @@ testrebase() {\n \t\tcd \"$work_dir\" &&\n \t\t# Clean up the state from the previous one\n \t\tgit reset --hard pre-rebase &&\n-\t\ttest_must_fail git rebase$type master &&\n+\t\ttest_must_fail git rebase$type main &&\n \t\ttest_path_is_dir \"$dotest\" &&\n \t\ttest_must_fail git rebase --skip &&\n-\t\ttest $(git rev-parse HEAD) = $(git rev-parse master) &&\n+\t\ttest $(git rev-parse HEAD) = $(git rev-parse main) &&\n \t\tgit rebase --abort &&\n \t\ttest $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&\n \t\ttest ! -d \"$dotest\"\n@@ -61,13 +61,13 @@ testrebase() {\n \t\tcd \"$work_dir\" &&\n \t\t# Clean up the state from the previous one\n \t\tgit reset --hard pre-rebase &&\n-\t\ttest_must_fail git rebase$type master &&\n+\t\ttest_must_fail git rebase$type main &&\n \t\ttest_path_is_dir \"$dotest\" &&\n \t\techo c > a &&\n \t\techo d >> a &&\n \t\tgit add a &&\n \t\ttest_must_fail git rebase --continue &&\n-\t\ttest $(git rev-parse HEAD) != $(git rev-parse master) &&\n+\t\ttest $(git rev-parse HEAD) != $(git rev-parse main) &&\n \t\tgit rebase --abort &&\n \t\ttest $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&\n \t\ttest ! -d \"$dotest\"\n@@ -78,7 +78,7 @@ testrebase() {\n \t\t# Clean up the state from the previous one\n \t\tgit reset --hard pre-rebase &&\n \t\tgit reflog show to-rebase > reflog_before &&\n-\t\ttest_must_fail git rebase$type master &&\n+\t\ttest_must_fail git rebase$type main &&\n \t\tgit rebase --abort &&\n \t\tgit reflog show to-rebase > reflog_after &&\n \t\ttest_cmp reflog_before reflog_after &&\n@@ -89,7 +89,7 @@ testrebase() {\n \t\tcd \"$work_dir\" &&\n \t\t# Clean up the state from the previous one\n \t\tgit reset --hard pre-rebase &&\n-\t\ttest_must_fail git rebase$type master &&\n+\t\ttest_must_fail git rebase$type main &&\n \t\ttest_must_fail git rebase -v --abort &&\n \t\ttest_must_fail git rebase --abort -v &&\n \t\tgit rebase --abort\n@@ -103,7 +103,7 @@ test_expect_success 'rebase --apply --quit' '\n \tcd \"$work_dir\" &&\n \t# Clean up the state from the previous one\n \tgit reset --hard pre-rebase &&\n-\ttest_must_fail git rebase --apply master &&\n+\ttest_must_fail git rebase --apply main &&\n \ttest_path_is_dir .git/rebase-apply &&\n \thead_before=$(git rev-parse HEAD) &&\n \tgit rebase --quit &&\n@@ -115,7 +115,7 @@ test_expect_success 'rebase --merge --quit' '\n \tcd \"$work_dir\" &&\n \t# Clean up the state from the previous one\n \tgit reset --hard pre-rebase &&\n-\ttest_must_fail git rebase --merge master &&\n+\ttest_must_fail git rebase --merge main &&\n \ttest_path_is_dir .git/rebase-merge &&\n \thead_before=$(git rev-parse HEAD) &&\n \tgit rebase --quit &&\ndiff --git a/t/t3408-rebase-multi-line.sh b/t/t3408-rebase-multi-line.sh\nindex d2bd7c17b0..1cba82f001 100755\n--- a/t/t3408-rebase-multi-line.sh\n+++ b/t/t3408-rebase-multi-line.sh\n@@ -46,7 +46,7 @@ But otherwise with a sane description.\" side2 &&\n test_expect_success rebase '\n \n \tgit checkout side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n \tgit cat-file commit side@{1} | sed -e \"1,/^\\$/d\" >expect &&\n \ttest_cmp expect actual\ndiff --git a/t/t3409-rebase-preserve-merges.sh b/t/t3409-rebase-preserve-merges.sh\nindex 3b340f1ece..b078985b95 100755\n--- a/t/t3409-rebase-preserve-merges.sh\n+++ b/t/t3409-rebase-preserve-merges.sh\n@@ -18,7 +18,7 @@ export GIT_AUTHOR_EMAIL\n \n # Clone 2 (conflicting merge):\n #\n-# A1--A2--B3   <-- origin/master\n+# A1--A2--B3   <-- origin/main\n #  \\       \\\n #   B1------M  <-- topic\n #    \\\n@@ -26,7 +26,7 @@ export GIT_AUTHOR_EMAIL\n #\n # Clone 3 (no-ff merge):\n #\n-# A1--A2--B3   <-- origin/master\n+# A1--A2--B3   <-- origin/main\n #  \\\n #   B1------M  <-- topic\n #    \\     /\n@@ -44,7 +44,7 @@ test_expect_success 'setup for merge-preserving rebase' \\\n \techo Second > B &&\n \tgit add B &&\n \tgit commit -m \"Add B1\" &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \techo Third >> A &&\n \tgit commit -a -m \"Modify A2\" &&\n \techo Fifth > B &&\n@@ -55,10 +55,10 @@ test_expect_success 'setup for merge-preserving rebase' \\\n \t(\n \t\tcd clone2 &&\n \t\tgit checkout -b topic origin/topic &&\n-\t\ttest_must_fail git merge origin/master &&\n+\t\ttest_must_fail git merge origin/main &&\n \t\techo Resolved >B &&\n \t\tgit add B &&\n-\t\tgit commit -m \"Merge origin/master into topic\"\n+\t\tgit commit -m \"Merge origin/main into topic\"\n \t) &&\n \n \tgit clone ./. clone3 &&\ndiff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh\nindex 21632a984e..120315ac0e 100755\n--- a/t/t3412-rebase-root.sh\n+++ b/t/t3412-rebase-root.sh\n@@ -24,7 +24,7 @@ test_expect_success 'prepare repository' '\n \n test_expect_success 'rebase --root fails with too many args' '\n \tgit checkout -B fail other &&\n-\ttest_must_fail git rebase --onto master --root fail fail\n+\ttest_must_fail git rebase --onto main --root fail fail\n '\n \n test_expect_success 'setup pre-rebase hook' '\n@@ -44,7 +44,7 @@ EOF\n \n test_expect_success 'rebase --root --onto <newbase>' '\n \tgit checkout -b work other &&\n-\tgit rebase --root --onto master &&\n+\tgit rebase --root --onto main &&\n \tgit log --pretty=tformat:\"%s\" > rebased &&\n \ttest_cmp expect rebased\n '\n@@ -55,7 +55,7 @@ test_expect_success 'pre-rebase got correct input (1)' '\n \n test_expect_success 'rebase --root --onto <newbase> <branch>' '\n \tgit branch work2 other &&\n-\tgit rebase --root --onto master work2 &&\n+\tgit rebase --root --onto main work2 &&\n \tgit log --pretty=tformat:\"%s\" > rebased2 &&\n \ttest_cmp expect rebased2\n '\n@@ -66,7 +66,7 @@ test_expect_success 'pre-rebase got correct input (2)' '\n \n test_expect_success 'rebase -i --root --onto <newbase>' '\n \tgit checkout -b work3 other &&\n-\tgit rebase -i --root --onto master &&\n+\tgit rebase -i --root --onto main &&\n \tgit log --pretty=tformat:\"%s\" > rebased3 &&\n \ttest_cmp expect rebased3\n '\n@@ -77,7 +77,7 @@ test_expect_success 'pre-rebase got correct input (3)' '\n \n test_expect_success 'rebase -i --root --onto <newbase> <branch>' '\n \tgit branch work4 other &&\n-\tgit rebase -i --root --onto master work4 &&\n+\tgit rebase -i --root --onto main work4 &&\n \tgit log --pretty=tformat:\"%s\" > rebased4 &&\n \ttest_cmp expect rebased4\n '\n@@ -88,7 +88,7 @@ test_expect_success 'pre-rebase got correct input (4)' '\n \n test_expect_success REBASE_P 'rebase -i -p with linear history' '\n \tgit checkout -b work5 other &&\n-\tgit rebase -i -p --root --onto master &&\n+\tgit rebase -i -p --root --onto main &&\n \tgit log --pretty=tformat:\"%s\" > rebased5 &&\n \ttest_cmp expect rebased5\n '\n@@ -122,7 +122,7 @@ EOF\n \n test_expect_success REBASE_P 'rebase -i -p with merge' '\n \tgit checkout -b work6 other &&\n-\tgit rebase -i -p --root --onto master &&\n+\tgit rebase -i -p --root --onto main &&\n \tlog_with_names work6 > rebased6 &&\n \ttest_cmp expect-side rebased6\n '\n@@ -157,7 +157,7 @@ EOF\n \n test_expect_success REBASE_P 'rebase -i -p with two roots' '\n \tgit checkout -b work7 other &&\n-\tgit rebase -i -p --root --onto master &&\n+\tgit rebase -i -p --root --onto main &&\n \tlog_with_names work7 > rebased7 &&\n \ttest_cmp expect-third rebased7\n '\n@@ -173,14 +173,14 @@ EOF\n \n test_expect_success 'pre-rebase hook stops rebase' '\n \tgit checkout -b stops1 other &&\n-\ttest_must_fail git rebase --root --onto master &&\n+\ttest_must_fail git rebase --root --onto main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/stops1 &&\n \ttest 0 = $(git rev-list other...stops1 | wc -l)\n '\n \n test_expect_success 'pre-rebase hook stops rebase -i' '\n \tgit checkout -b stops2 other &&\n-\ttest_must_fail git rebase --root --onto master &&\n+\ttest_must_fail git rebase --root --onto main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/stops2 &&\n \ttest 0 = $(git rev-list other...stops2 | wc -l)\n '\n@@ -190,7 +190,7 @@ test_expect_success 'remove pre-rebase hook' '\n '\n \n test_expect_success 'set up a conflict' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo conflict > B &&\n \tgit add B &&\n \tgit commit -m conflict\n@@ -198,7 +198,7 @@ test_expect_success 'set up a conflict' '\n \n test_expect_success 'rebase --root with conflict (first part)' '\n \tgit checkout -b conflict1 other &&\n-\ttest_must_fail git rebase --root --onto master &&\n+\ttest_must_fail git rebase --root --onto main &&\n \tgit ls-files -u | grep \"B$\"\n '\n \n@@ -225,7 +225,7 @@ test_expect_success 'rebase --root with conflict (second part)' '\n \n test_expect_success 'rebase -i --root with conflict (first part)' '\n \tgit checkout -b conflict2 other &&\n-\ttest_must_fail git rebase -i --root --onto master &&\n+\ttest_must_fail git rebase -i --root --onto main &&\n \tgit ls-files -u | grep \"B$\"\n '\n \n@@ -263,7 +263,7 @@ EOF\n \n test_expect_success REBASE_P 'rebase -i -p --root with conflict (first part)' '\n \tgit checkout -b conflict3 other &&\n-\ttest_must_fail git rebase -i -p --root --onto master &&\n+\ttest_must_fail git rebase -i -p --root --onto main &&\n \tgit ls-files -u | grep \"B$\"\n '\n \ndiff --git a/t/t3413-rebase-hook.sh b/t/t3413-rebase-hook.sh\nindex b6833e9a5f..b5b8d3556e 100755\n--- a/t/t3413-rebase-hook.sh\n+++ b/t/t3413-rebase-hook.sh\n@@ -18,7 +18,7 @@ test_expect_success setup '\n \tgit add git &&\n \ttest_tick &&\n \tgit commit -m side &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit log --pretty=oneline --abbrev-commit --graph --all &&\n \tgit branch test side\n '\n@@ -26,14 +26,14 @@ test_expect_success setup '\n test_expect_success 'rebase' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \ttest \"z$(cat git)\" = zworld\n '\n \n test_expect_success 'rebase -i' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tEDITOR=true git rebase -i master &&\n+\tEDITOR=true git rebase -i main &&\n \ttest \"z$(cat git)\" = zworld\n '\n \n@@ -49,53 +49,53 @@ EOF\n test_expect_success 'pre-rebase hook gets correct input (1)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,\n \n '\n \n test_expect_success 'pre-rebase hook gets correct input (2)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit rebase master test &&\n+\tgit rebase main test &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,test\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,test\n '\n \n test_expect_success 'pre-rebase hook gets correct input (3)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit checkout master &&\n-\tgit rebase master test &&\n+\tgit checkout main &&\n+\tgit rebase main test &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,test\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,test\n '\n \n test_expect_success 'pre-rebase hook gets correct input (4)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tEDITOR=true git rebase -i master &&\n+\tEDITOR=true git rebase -i main &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,\n \n '\n \n test_expect_success 'pre-rebase hook gets correct input (5)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tEDITOR=true git rebase -i master test &&\n+\tEDITOR=true git rebase -i main test &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,test\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,test\n '\n \n test_expect_success 'pre-rebase hook gets correct input (6)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit checkout master &&\n-\tEDITOR=true git rebase -i master test &&\n+\tgit checkout main &&\n+\tEDITOR=true git rebase -i main test &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,test\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,test\n '\n \n test_expect_success 'setup pre-rebase hook that fails' '\n@@ -110,7 +110,7 @@ EOF\n test_expect_success 'pre-rebase hook stops rebase (1)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\ttest_must_fail git rebase master &&\n+\ttest_must_fail git rebase main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/test &&\n \ttest 0 = $(git rev-list HEAD...side | wc -l)\n '\n@@ -118,7 +118,7 @@ test_expect_success 'pre-rebase hook stops rebase (1)' '\n test_expect_success 'pre-rebase hook stops rebase (2)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\ttest_must_fail env EDITOR=: git rebase -i master &&\n+\ttest_must_fail env EDITOR=: git rebase -i main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/test &&\n \ttest 0 = $(git rev-list HEAD...side | wc -l)\n '\n@@ -126,7 +126,7 @@ test_expect_success 'pre-rebase hook stops rebase (2)' '\n test_expect_success 'rebase --no-verify overrides pre-rebase (1)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit rebase --no-verify master &&\n+\tgit rebase --no-verify main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/test &&\n \ttest \"z$(cat git)\" = zworld\n '\n@@ -134,7 +134,7 @@ test_expect_success 'rebase --no-verify overrides pre-rebase (1)' '\n test_expect_success 'rebase --no-verify overrides pre-rebase (2)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tEDITOR=true git rebase --no-verify -i master &&\n+\tEDITOR=true git rebase --no-verify -i main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/test &&\n \ttest \"z$(cat git)\" = zworld\n '\ndiff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh\nindex 7bab6000dc..40bb7ac649 100755\n--- a/t/t3415-rebase-autosquash.sh\n+++ b/t/t3415-rebase-autosquash.sh\n@@ -407,7 +407,7 @@ test_expect_success 'wrapped original subject' '\n \n test_expect_success 'abort last squash' '\n \ttest_when_finished \"test_might_fail git rebase --abort\" &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \n \tgit checkout -b some-squashes &&\n \tgit commit --allow-empty -m first &&\ndiff --git a/t/t3416-rebase-onto-threedots.sh b/t/t3416-rebase-onto-threedots.sh\nindex 1f37adf56b..2360a1e37a 100755\n--- a/t/t3416-rebase-onto-threedots.sh\n+++ b/t/t3416-rebase-onto-threedots.sh\n@@ -5,14 +5,14 @@ test_description='git rebase --onto A...B'\n . ./test-lib.sh\n . \"$TEST_DIRECTORY/lib-rebase.sh\"\n \n-# Rebase only the tip commit of \"topic\" on merge base between \"master\"\n-# and \"topic\".  Cannot do this for \"side\" with \"master\" because there\n+# Rebase only the tip commit of \"topic\" on merge base between \"main\"\n+# and \"topic\".  Cannot do this for \"side\" with \"main\" because there\n # is no single merge base.\n #\n #\n #\t    F---G topic                             G'\n #\t   /                                       /\n-# A---B---C---D---E master        -->       A---B---C---D---E\n+# A---B---C---D---E main        -->       A---B---C---D---E\n #      \\   \\ /\n #\t\\   x\n #\t \\ / \\\n@@ -26,7 +26,7 @@ test_expect_success setup '\n \tgit branch topic &&\n \tgit checkout side &&\n \ttest_commit H &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit merge H &&\n \tgit tag D &&\n@@ -42,83 +42,83 @@ test_expect_success setup '\n \ttest_commit K\n '\n \n-test_expect_success 'rebase --onto master...topic' '\n+test_expect_success 'rebase --onto main...topic' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \n-\tgit rebase --onto master...topic F &&\n+\tgit rebase --onto main...topic F &&\n \tgit rev-parse HEAD^1 >actual &&\n \tgit rev-parse C^0 >expect &&\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase --onto master...' '\n+test_expect_success 'rebase --onto main...' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \n-\tgit rebase --onto master... F &&\n+\tgit rebase --onto main... F &&\n \tgit rev-parse HEAD^1 >actual &&\n \tgit rev-parse C^0 >expect &&\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase --onto master...side' '\n+test_expect_success 'rebase --onto main...side' '\n \tgit reset --hard &&\n \tgit checkout side &&\n \tgit reset --hard K &&\n \n-\ttest_must_fail git rebase --onto master...side J\n+\ttest_must_fail git rebase --onto main...side J\n '\n \n-test_expect_success 'rebase -i --onto master...topic' '\n+test_expect_success 'rebase -i --onto main...topic' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \tset_fake_editor &&\n-\tEXPECT_COUNT=1 git rebase -i --onto master...topic F &&\n+\tEXPECT_COUNT=1 git rebase -i --onto main...topic F &&\n \tgit rev-parse HEAD^1 >actual &&\n \tgit rev-parse C^0 >expect &&\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase -i --onto master...' '\n+test_expect_success 'rebase -i --onto main...' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \tset_fake_editor &&\n-\tEXPECT_COUNT=1 git rebase -i --onto master... F &&\n+\tEXPECT_COUNT=1 git rebase -i --onto main... F &&\n \tgit rev-parse HEAD^1 >actual &&\n \tgit rev-parse C^0 >expect &&\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase -i --onto master...side' '\n+test_expect_success 'rebase -i --onto main...side' '\n \tgit reset --hard &&\n \tgit checkout side &&\n \tgit reset --hard K &&\n \n \tset_fake_editor &&\n-\ttest_must_fail git rebase -i --onto master...side J\n+\ttest_must_fail git rebase -i --onto main...side J\n '\n \n test_expect_success 'rebase --keep-base --onto incompatible' '\n-\ttest_must_fail git rebase --keep-base --onto master...\n+\ttest_must_fail git rebase --keep-base --onto main...\n '\n \n test_expect_success 'rebase --keep-base --root incompatible' '\n \ttest_must_fail git rebase --keep-base --root\n '\n \n-test_expect_success 'rebase --keep-base master from topic' '\n+test_expect_success 'rebase --keep-base main from topic' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \n-\tgit rebase --keep-base master &&\n+\tgit rebase --keep-base main &&\n \tgit rev-parse C >base.expect &&\n-\tgit merge-base master HEAD >base.actual &&\n+\tgit merge-base main HEAD >base.actual &&\n \ttest_cmp base.expect base.actual &&\n \n \tgit rev-parse HEAD~2 >actual &&\n@@ -126,23 +126,23 @@ test_expect_success 'rebase --keep-base master from topic' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase --keep-base master from side' '\n+test_expect_success 'rebase --keep-base main from side' '\n \tgit reset --hard &&\n \tgit checkout side &&\n \tgit reset --hard K &&\n \n-\ttest_must_fail git rebase --keep-base master\n+\ttest_must_fail git rebase --keep-base main\n '\n \n-test_expect_success 'rebase -i --keep-base master from topic' '\n+test_expect_success 'rebase -i --keep-base main from topic' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \n \tset_fake_editor &&\n-\tEXPECT_COUNT=2 git rebase -i --keep-base master &&\n+\tEXPECT_COUNT=2 git rebase -i --keep-base main &&\n \tgit rev-parse C >base.expect &&\n-\tgit merge-base master HEAD >base.actual &&\n+\tgit merge-base main HEAD >base.actual &&\n \ttest_cmp base.expect base.actual &&\n \n \tgit rev-parse HEAD~2 >actual &&\n@@ -150,13 +150,13 @@ test_expect_success 'rebase -i --keep-base master from topic' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase -i --keep-base master from side' '\n+test_expect_success 'rebase -i --keep-base main from side' '\n \tgit reset --hard &&\n \tgit checkout side &&\n \tgit reset --hard K &&\n \n \tset_fake_editor &&\n-\ttest_must_fail git rebase -i --keep-base master\n+\ttest_must_fail git rebase -i --keep-base main\n '\n \n test_done\ndiff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh\nindex 7a2da972fd..b9e059e168 100755\n--- a/t/t3418-rebase-continue.sh\n+++ b/t/t3418-rebase-continue.sh\n@@ -15,13 +15,13 @@ test_expect_success 'setup' '\n \tgit checkout -b topic HEAD^ &&\n \ttest_commit \"commit-new-file-F2-on-topic-branch\" F2 22 &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'interactive rebase --continue works with touched file' '\n \trm -fr .git/rebase-* &&\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tFAKE_LINES=\"edit 1\" git rebase -i HEAD^ &&\n \ttest-tool chmtime =-60 F1 &&\n@@ -31,9 +31,9 @@ test_expect_success 'interactive rebase --continue works with touched file' '\n test_expect_success 'non-interactive rebase --continue works with touched file' '\n \trm -fr .git/rebase-* &&\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n-\ttest_must_fail git rebase --onto master master topic &&\n+\ttest_must_fail git rebase --onto main main topic &&\n \techo \"Resolved\" >F2 &&\n \tgit add F2 &&\n \ttest-tool chmtime =-60 F1 &&\n@@ -61,7 +61,7 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '\n \tchmod +x test-bin/git-merge-funny &&\n \t(\n \t\tPATH=./test-bin:$PATH &&\n-\t\ttest_must_fail git rebase -s funny -Xopt master topic\n+\t\ttest_must_fail git rebase -s funny -Xopt main topic\n \t) &&\n \ttest -f funny.was.run &&\n \trm funny.was.run &&\n@@ -93,7 +93,7 @@ test_expect_success 'rebase -i --continue handles merge strategy and options' '\n \tchmod +x test-bin/git-merge-funny &&\n \t(\n \t\tPATH=./test-bin:$PATH &&\n-\t\ttest_must_fail git rebase -i -s funny -Xopt -Xfoo master topic\n+\t\ttest_must_fail git rebase -i -s funny -Xopt -Xfoo main topic\n \t) &&\n \ttest -f funny.was.run &&\n \trm funny.was.run &&\n@@ -188,11 +188,11 @@ test_expect_success '--skip after failed fixup cleans commit message' '\n test_expect_success 'setup rerere database' '\n \trm -fr .git/rebase-* &&\n \tgit reset --hard commit-new-file-F3-on-topic-branch &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit \"commit-new-file-F3\" F3 3 &&\n \ttest_config rerere.enabled true &&\n \tgit update-ref refs/heads/topic commit-new-file-F3-on-topic-branch &&\n-\ttest_must_fail git rebase -m master topic &&\n+\ttest_must_fail git rebase -m main topic &&\n \techo \"Resolved\" >F2 &&\n \tcp F2 expected-F2 &&\n \tgit add F2 &&\n@@ -207,7 +207,7 @@ test_expect_success 'setup rerere database' '\n prepare () {\n \trm -fr .git/rebase-* &&\n \tgit reset --hard commit-new-file-F3-on-topic-branch &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_config rerere.enabled true\n }\n \n@@ -215,7 +215,7 @@ test_rerere_autoupdate () {\n \taction=$1 &&\n \ttest_expect_success \"rebase $action --continue remembers --rerere-autoupdate\" '\n \t\tprepare &&\n-\t\ttest_must_fail git rebase $action --rerere-autoupdate master topic &&\n+\t\ttest_must_fail git rebase $action --rerere-autoupdate main topic &&\n \t\ttest_cmp expected-F2 F2 &&\n \t\tgit diff-files --quiet &&\n \t\ttest_must_fail git rebase --continue &&\n@@ -227,7 +227,7 @@ test_rerere_autoupdate () {\n \ttest_expect_success \"rebase $action --continue honors rerere.autoUpdate\" '\n \t\tprepare &&\n \t\ttest_config rerere.autoupdate true &&\n-\t\ttest_must_fail git rebase $action master topic &&\n+\t\ttest_must_fail git rebase $action main topic &&\n \t\ttest_cmp expected-F2 F2 &&\n \t\tgit diff-files --quiet &&\n \t\ttest_must_fail git rebase --continue &&\n@@ -239,7 +239,7 @@ test_rerere_autoupdate () {\n \ttest_expect_success \"rebase $action --continue remembers --no-rerere-autoupdate\" '\n \t\tprepare &&\n \t\ttest_config rerere.autoupdate true &&\n-\t\ttest_must_fail git rebase $action --no-rerere-autoupdate master topic &&\n+\t\ttest_must_fail git rebase $action --no-rerere-autoupdate main topic &&\n \t\ttest_cmp expected-F2 F2 &&\n \t\ttest_must_fail git diff-files --quiet &&\n \t\tgit add F2 &&\ndiff --git a/t/t3419-rebase-patch-id.sh b/t/t3419-rebase-patch-id.sh\nindex 1f32faa4a4..29fa76be4d 100755\n--- a/t/t3419-rebase-patch-id.sh\n+++ b/t/t3419-rebase-patch-id.sh\n@@ -24,7 +24,7 @@ test_expect_success 'setup' '\n \n test_expect_success 'setup: 500 lines' '\n \trm -f .gitattributes &&\n-\tgit checkout -q -f master &&\n+\tgit checkout -q -f main &&\n \tgit reset --hard root &&\n \ttest_seq 500 >file &&\n \tgit add file &&\n@@ -40,7 +40,7 @@ test_expect_success 'setup: 500 lines' '\n \tgit add newfile &&\n \tgit commit -q -m \"add small file\" &&\n \n-\tgit cherry-pick master >/dev/null 2>&1\n+\tgit cherry-pick main >/dev/null 2>&1\n '\n \n test_expect_success 'setup attributes' '\n@@ -48,18 +48,18 @@ test_expect_success 'setup attributes' '\n '\n \n test_expect_success 'detect upstream patch' '\n-\tgit checkout -q master &&\n+\tgit checkout -q main &&\n \tscramble file &&\n \tgit add file &&\n \tgit commit -q -m \"change big file again\" &&\n \tgit checkout -q other^{} &&\n-\tgit rebase master &&\n-\tgit rev-list master...HEAD~ >revs &&\n+\tgit rebase main &&\n+\tgit rev-list main...HEAD~ >revs &&\n \ttest_must_be_empty revs\n '\n \n test_expect_success 'do not drop patch' '\n-\tgit branch -f squashed master &&\n+\tgit branch -f squashed main &&\n \tgit checkout -q -f squashed &&\n \tgit reset -q --soft HEAD~2 &&\n \tgit commit -q -m squashed &&\ndiff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh\nindex ca331733fb..b1263e5a47 100755\n--- a/t/t3420-rebase-autostash.sh\n+++ b/t/t3420-rebase-autostash.sh\n@@ -21,12 +21,12 @@ test_expect_success setup '\n \tgit add . &&\n \ttest_tick &&\n \tgit commit -m \"third commit\" &&\n-\tgit checkout -b unrelated-onto-branch master &&\n+\tgit checkout -b unrelated-onto-branch main &&\n \techo unrelated >file4 &&\n \tgit add . &&\n \ttest_tick &&\n \tgit commit -m \"unrelated commit\" &&\n-\tgit checkout -b related-onto-branch master &&\n+\tgit checkout -b related-onto-branch main &&\n \techo conflicting-change >file2 &&\n \tgit add . &&\n \ttest_tick &&\n@@ -305,7 +305,7 @@ test_expect_success 'autostash is saved on editor failure with conflict' '\n '\n \n test_expect_success 'autostash with dirty submodules' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \tgit checkout -b with-submodule &&\n \tgit submodule add ./ sub &&\n \ttest_tick &&\n@@ -324,7 +324,7 @@ test_expect_success 'branch is left alone when possible' '\n \n test_expect_success 'never change active branch' '\n \tgit checkout -b not-the-feature-branch unrelated-onto-branch &&\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \techo changed >file0 &&\n \tgit rebase --autostash not-the-feature-branch feature-branch &&\n \ttest_cmp_rev not-the-feature-branch unrelated-onto-branch\ndiff --git a/t/t3423-rebase-reword.sh b/t/t3423-rebase-reword.sh\nindex 6963750794..4859bb8f72 100755\n--- a/t/t3423-rebase-reword.sh\n+++ b/t/t3423-rebase-reword.sh\n@@ -7,7 +7,7 @@ test_description='git rebase interactive with rewording'\n . \"$TEST_DIRECTORY\"/lib-rebase.sh\n \n test_expect_success 'setup' '\n-\ttest_commit master file-1 test &&\n+\ttest_commit main file-1 test &&\n \n \tgit checkout -b stuff &&\n \n@@ -22,7 +22,7 @@ test_expect_success 'reword without issues functions as intended' '\n \n \tset_fake_editor &&\n \tFAKE_LINES=\"pick 1 reword 2\" FAKE_COMMIT_MESSAGE=\"feature_b_reworded\" \\\n-\t\tgit rebase -i -v master &&\n+\t\tgit rebase -i -v main &&\n \n \ttest \"$(git log -1 --format=%B)\" = \"feature_b_reworded\" &&\n \ttest $(git rev-list --count HEAD) = 3\n@@ -35,7 +35,7 @@ test_expect_success 'reword after a conflict preserves commit' '\n \n \tset_fake_editor &&\n \ttest_must_fail env FAKE_LINES=\"reword 2\" \\\n-\t\tgit rebase -i -v master &&\n+\t\tgit rebase -i -v main &&\n \n \tgit checkout --theirs file-2 &&\n \tgit add file-2 &&\ndiff --git a/t/t3427-rebase-subtree.sh b/t/t3427-rebase-subtree.sh\nindex 5839719ba1..265856ece6 100755\n--- a/t/t3427-rebase-subtree.sh\n+++ b/t/t3427-rebase-subtree.sh\n@@ -17,7 +17,7 @@ commit_message() {\n #\n # topic_1 - topic_2 - topic_3\n #                             \\\n-# README ---------------------- Add subproject master - topic_4 - files_subtree/topic_5\n+# README ---------------------- Add subproject main - topic_4 - files_subtree/topic_5\n #\n # Where the merge moves the files topic_[123].t into the subdirectory\n # files_subtree/ and topic_4 as well as files_subtree/topic_5 add files to that\n@@ -28,7 +28,7 @@ commit_message() {\n # an empty commit is added on top. The pre-rebase commit history looks like\n # this:\n #\n-# Add subproject master - topic_4 - files_subtree/topic_5 - Empty commit\n+# Add subproject main - topic_4 - files_subtree/topic_5 - Empty commit\n #\n # where the root commit adds three files: topic_1.t, topic_2.t and topic_3.t.\n #\n@@ -48,11 +48,11 @@ test_expect_success 'setup' '\n \ttest_commit -C files topic_3 &&\n \n \t: perform subtree merge into files_subtree/ &&\n-\tgit fetch files refs/heads/master:refs/heads/files-master &&\n+\tgit fetch files refs/heads/main:refs/heads/files-main &&\n \tgit merge -s ours --no-commit --allow-unrelated-histories \\\n-\t\tfiles-master &&\n-\tgit read-tree --prefix=files_subtree -u files-master &&\n-\tgit commit -m \"Add subproject master\" &&\n+\t\tfiles-main &&\n+\tgit read-tree --prefix=files_subtree -u files-main &&\n+\tgit commit -m \"Add subproject main\" &&\n \n \t: add two extra commits to rebase &&\n \ttest_commit -C files_subtree topic_4 &&\n@@ -70,7 +70,7 @@ test_expect_success 'setup' '\n test_expect_failure REBASE_P 'Rebase -Xsubtree --preserve-merges --onto commit' '\n \treset_rebase &&\n \tgit checkout -b rebase-preserve-merges to-rebase &&\n-\tgit rebase -Xsubtree=files_subtree --preserve-merges --onto files-master master &&\n+\tgit rebase -Xsubtree=files_subtree --preserve-merges --onto files-main main &&\n \tverbose test \"$(commit_message HEAD~)\" = \"topic_4\" &&\n \tverbose test \"$(commit_message HEAD)\" = \"files_subtree/topic_5\"\n '\n@@ -79,7 +79,7 @@ test_expect_failure REBASE_P 'Rebase -Xsubtree --preserve-merges --onto commit'\n test_expect_failure REBASE_P 'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit' '\n \treset_rebase &&\n \tgit checkout -b rebase-keep-empty to-rebase &&\n-\tgit rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-master master &&\n+\tgit rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-main main &&\n \tverbose test \"$(commit_message HEAD~2)\" = \"topic_4\" &&\n \tverbose test \"$(commit_message HEAD~)\" = \"files_subtree/topic_5\" &&\n \tverbose test \"$(commit_message HEAD)\" = \"Empty commit\"\n@@ -88,7 +88,7 @@ test_expect_failure REBASE_P 'Rebase -Xsubtree --keep-empty --preserve-merges --\n test_expect_success 'Rebase -Xsubtree --empty=ask --onto commit' '\n \treset_rebase &&\n \tgit checkout -b rebase-onto to-rebase &&\n-\ttest_must_fail git rebase -Xsubtree=files_subtree --empty=ask --onto files-master master &&\n+\ttest_must_fail git rebase -Xsubtree=files_subtree --empty=ask --onto files-main main &&\n \t: first pick results in no changes &&\n \tgit rebase --skip &&\n \tverbose test \"$(commit_message HEAD~2)\" = \"topic_4\" &&\n@@ -99,7 +99,7 @@ test_expect_success 'Rebase -Xsubtree --empty=ask --onto commit' '\n test_expect_success 'Rebase -Xsubtree --empty=ask --rebase-merges --onto commit' '\n \treset_rebase &&\n \tgit checkout -b rebase-merges-onto to-rebase &&\n-\ttest_must_fail git rebase -Xsubtree=files_subtree --empty=ask --rebase-merges --onto files-master --root &&\n+\ttest_must_fail git rebase -Xsubtree=files_subtree --empty=ask --rebase-merges --onto files-main --root &&\n \t: first pick results in no changes &&\n \tgit rebase --skip &&\n \tverbose test \"$(commit_message HEAD~2)\" = \"topic_4\" &&\ndiff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh\nindex b454f400eb..3cc99693af 100755\n--- a/t/t3430-rebase-merges.sh\n+++ b/t/t3430-rebase-merges.sh\n@@ -12,7 +12,7 @@ Initial setup:\n \n     -- B --                   (first)\n    /       \\\n- A - C - D - E - H            (master)\n+ A - C - D - E - H            (main)\n    \\    \\       /\n     \\    F - G                (second)\n      \\\n@@ -37,7 +37,7 @@ test_expect_success 'setup' '\n \tgit checkout -b first &&\n \ttest_commit B &&\n \tb=$(git rev-parse --short HEAD) &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit C &&\n \tc=$(git rev-parse --short HEAD) &&\n \ttest_commit D &&\n@@ -52,7 +52,7 @@ test_expect_success 'setup' '\n \tf=$(git rev-parse --short HEAD) &&\n \ttest_commit G &&\n \tg=$(git rev-parse --short HEAD) &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge --no-commit G &&\n \ttest_tick &&\n \tgit commit -m H &&\n@@ -82,7 +82,7 @@ test_expect_success 'create completely different structure' '\n \tEOF\n \ttest_config sequence.editor \\\"\"$PWD\"/replace-editor.sh\\\" &&\n \ttest_tick &&\n-\tgit rebase -i -r A master &&\n+\tgit rebase -i -r A main &&\n \ttest_cmp_graph <<-\\EOF\n \t*   Merge the topic branch '\\''onebranch'\\''\n \t|\\\n@@ -183,7 +183,7 @@ test_expect_success 'fast-forward merge -c still rewords' '\n '\n \n test_expect_success 'with a branch tip that was cherry-picked already' '\n-\tgit checkout -b already-upstream master &&\n+\tgit checkout -b already-upstream main &&\n \tbase=\"$(git rev-parse --verify HEAD)\" &&\n \n \ttest_commit A1 &&\n@@ -211,7 +211,7 @@ test_expect_success 'with a branch tip that was cherry-picked already' '\n '\n \n test_expect_success 'do not rebase cousins unless asked for' '\n-\tgit checkout -b cousins master &&\n+\tgit checkout -b cousins main &&\n \tbefore=\"$(git rev-parse --verify HEAD)\" &&\n \ttest_tick &&\n \tgit rebase -r HEAD^ &&\n@@ -340,7 +340,7 @@ test_expect_success 'a \"merge\" into a root commit is a fast-forward' '\n test_expect_success 'A root commit can be a cousin, treat it that way' '\n \tgit checkout --orphan khnum &&\n \ttest_commit yama &&\n-\tgit checkout -b asherah master &&\n+\tgit checkout -b asherah main &&\n \ttest_commit shamkat &&\n \tgit merge --allow-unrelated-histories khnum &&\n \ttest_tick &&\n@@ -367,7 +367,7 @@ test_expect_success 'labels that are object IDs are rewritten' '\n \tgit checkout -b third B &&\n \ttest_commit I &&\n \tthird=$(git rev-parse HEAD) &&\n-\tgit checkout -b labels master &&\n+\tgit checkout -b labels main &&\n \tgit merge --no-commit third &&\n \ttest_tick &&\n \tgit commit -m \"Merge commit '\\''$third'\\'' into labels\" &&\ndiff --git a/t/t3431-rebase-fork-point.sh b/t/t3431-rebase-fork-point.sh\nindex 172562789e..d5d9b2304d 100755\n--- a/t/t3431-rebase-fork-point.sh\n+++ b/t/t3431-rebase-fork-point.sh\n@@ -7,11 +7,11 @@ test_description='git rebase --fork-point test'\n \n . ./test-lib.sh\n \n-# A---B---D---E    (master)\n+# A---B---D---E    (main)\n #      \\\n #       C*---F---G (side)\n #\n-# C was formerly part of master but master was rewound to remove C\n+# C was formerly part of main but main was rewound to remove C\n #\n test_expect_success setup '\n \ttest_commit A &&\n@@ -30,7 +30,7 @@ test_rebase () {\n \texpected=\"$1\" &&\n \tshift &&\n \ttest_expect_success \"git rebase $*\" \"\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit reset --hard E &&\n \t\tgit checkout side &&\n \t\tgit reset --hard G &&\n@@ -48,26 +48,26 @@ test_rebase 'G F C E D B A' --no-fork-point\n test_rebase 'G F C D B A' --no-fork-point --onto D\n test_rebase 'G F C B A' --no-fork-point --keep-base\n \n-test_rebase 'G F E D B A' --fork-point refs/heads/master\n-test_rebase 'G F E D B A' --fork-point master\n+test_rebase 'G F E D B A' --fork-point refs/heads/main\n+test_rebase 'G F E D B A' --fork-point main\n \n-test_rebase 'G F D B A' --fork-point --onto D refs/heads/master\n-test_rebase 'G F D B A' --fork-point --onto D master\n+test_rebase 'G F D B A' --fork-point --onto D refs/heads/main\n+test_rebase 'G F D B A' --fork-point --onto D main\n \n-test_rebase 'G F B A' --fork-point --keep-base refs/heads/master\n-test_rebase 'G F B A' --fork-point --keep-base master\n+test_rebase 'G F B A' --fork-point --keep-base refs/heads/main\n+test_rebase 'G F B A' --fork-point --keep-base main\n \n-test_rebase 'G F C E D B A' refs/heads/master\n-test_rebase 'G F C E D B A' master\n+test_rebase 'G F C E D B A' refs/heads/main\n+test_rebase 'G F C E D B A' main\n \n-test_rebase 'G F C D B A' --onto D refs/heads/master\n-test_rebase 'G F C D B A' --onto D master\n+test_rebase 'G F C D B A' --onto D refs/heads/main\n+test_rebase 'G F C D B A' --onto D main\n \n-test_rebase 'G F C B A' --keep-base refs/heads/master\n-test_rebase 'G F C B A' --keep-base master\n+test_rebase 'G F C B A' --keep-base refs/heads/main\n+test_rebase 'G F C B A' --keep-base main\n \n test_expect_success 'git rebase --fork-point with ambigous refname' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -b one &&\n \tgit checkout side &&\n \tgit tag one &&\ndiff --git a/t/t3432-rebase-fast-forward.sh b/t/t3432-rebase-fast-forward.sh\nindex a29eda87e9..b87537ca7d 100755\n--- a/t/t3432-rebase-fast-forward.sh\n+++ b/t/t3432-rebase-fast-forward.sh\n@@ -84,19 +84,19 @@ test_rebase_same_head_ () {\n \n changes='no changes'\n test_rebase_same_head success noop same success work same\n-test_rebase_same_head success noop same success work same master\n+test_rebase_same_head success noop same success work same main\n test_rebase_same_head success noop same success work diff --onto B B\n test_rebase_same_head success noop same success work diff --onto B... B\n-test_rebase_same_head success noop same success work same --onto master... master\n-test_rebase_same_head success noop same success work same --keep-base master\n+test_rebase_same_head success noop same success work same --onto main... main\n+test_rebase_same_head success noop same success work same --keep-base main\n test_rebase_same_head success noop same success work same --keep-base\n test_rebase_same_head success noop same success work same --no-fork-point\n test_rebase_same_head success noop same success work same --keep-base --no-fork-point\n-test_rebase_same_head success noop same success work same --fork-point master\n+test_rebase_same_head success noop same success work same --fork-point main\n test_rebase_same_head success noop same success work diff --fork-point --onto B B\n test_rebase_same_head success noop same success work diff --fork-point --onto B... B\n-test_rebase_same_head success noop same success work same --fork-point --onto master... master\n-test_rebase_same_head success noop same success work same --keep-base --keep-base master\n+test_rebase_same_head success noop same success work same --fork-point --onto main... main\n+test_rebase_same_head success noop same success work same --keep-base --keep-base main\n \n test_expect_success 'add work same to side' '\n \ttest_commit E\n@@ -104,22 +104,22 @@ test_expect_success 'add work same to side' '\n \n changes='our changes'\n test_rebase_same_head success noop same success work same\n-test_rebase_same_head success noop same success work same master\n+test_rebase_same_head success noop same success work same main\n test_rebase_same_head success noop same success work diff --onto B B\n test_rebase_same_head success noop same success work diff --onto B... B\n-test_rebase_same_head success noop same success work same --onto master... master\n-test_rebase_same_head success noop same success work same --keep-base master\n+test_rebase_same_head success noop same success work same --onto main... main\n+test_rebase_same_head success noop same success work same --keep-base main\n test_rebase_same_head success noop same success work same --keep-base\n test_rebase_same_head success noop same success work same --no-fork-point\n test_rebase_same_head success noop same success work same --keep-base --no-fork-point\n-test_rebase_same_head success noop same success work same --fork-point master\n+test_rebase_same_head success noop same success work same --fork-point main\n test_rebase_same_head success noop same success work diff --fork-point --onto B B\n test_rebase_same_head success noop same success work diff --fork-point --onto B... B\n-test_rebase_same_head success noop same success work same --fork-point --onto master... master\n-test_rebase_same_head success noop same success work same --fork-point --keep-base master\n+test_rebase_same_head success noop same success work same --fork-point --onto main... main\n+test_rebase_same_head success noop same success work same --fork-point --keep-base main\n \n test_expect_success 'add work same to upstream' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit F &&\n \tgit checkout side\n '\n@@ -127,12 +127,12 @@ test_expect_success 'add work same to upstream' '\n changes='our and their changes'\n test_rebase_same_head success noop same success work diff --onto B B\n test_rebase_same_head success noop same success work diff --onto B... B\n-test_rebase_same_head success noop same success work diff --onto master... master\n-test_rebase_same_head success noop same success work diff --keep-base master\n+test_rebase_same_head success noop same success work diff --onto main... main\n+test_rebase_same_head success noop same success work diff --keep-base main\n test_rebase_same_head success noop same success work diff --keep-base\n test_rebase_same_head failure work same success work diff --fork-point --onto B B\n test_rebase_same_head failure work same success work diff --fork-point --onto B... B\n-test_rebase_same_head success noop same success work diff --fork-point --onto master... master\n-test_rebase_same_head success noop same success work diff --fork-point --keep-base master\n+test_rebase_same_head success noop same success work diff --fork-point --onto main... main\n+test_rebase_same_head success noop same success work diff --fork-point --keep-base main\n \n test_done\ndiff --git a/t/t3434-rebase-i18n.sh b/t/t3434-rebase-i18n.sh\nindex c7c835cde9..a252908d02 100755\n--- a/t/t3434-rebase-i18n.sh\n+++ b/t/t3434-rebase-i18n.sh\n@@ -7,7 +7,7 @@ test_description='rebase with changing encoding\n \n Initial setup:\n \n-1 - 2              master\n+1 - 2              main\n  \\\n   3 - 4            first\n    \\\n@@ -41,7 +41,7 @@ test_expect_success 'rebase --rebase-merges update encoding eucJP to UTF-8' '\n \tgit config i18n.commitencoding eucJP &&\n \tgit merge -F \"$TEST_DIRECTORY/t3434/eucJP.txt\" second &&\n \tgit config i18n.commitencoding UTF-8 &&\n-\tgit rebase --rebase-merges master &&\n+\tgit rebase --rebase-merges main &&\n \tcompare_msg eucJP.txt eucJP UTF-8\n '\n \n@@ -50,7 +50,7 @@ test_expect_success 'rebase --rebase-merges update encoding eucJP to ISO-2022-JP\n \tgit config i18n.commitencoding eucJP &&\n \tgit merge -F \"$TEST_DIRECTORY/t3434/eucJP.txt\" second &&\n \tgit config i18n.commitencoding ISO-2022-JP &&\n-\tgit rebase --rebase-merges master &&\n+\tgit rebase --rebase-merges main &&\n \tcompare_msg eucJP.txt eucJP ISO-2022-JP\n '\n \n@@ -66,7 +66,7 @@ test_rebase_continue_update_encode () {\n \t\tgit config i18n.commitencoding $old &&\n \t\tgit commit -F \"$TEST_DIRECTORY/t3434/$msgfile\" &&\n \t\tgit config i18n.commitencoding $new &&\n-\t\ttest_must_fail git rebase -m master &&\n+\t\ttest_must_fail git rebase -m main &&\n \t\ttest -f .git/rebase-merge/message &&\n \t\tgit stripspace <.git/rebase-merge/message >two.t &&\n \t\tgit add two.t &&\ndiff --git a/t/t3435-rebase-gpg-sign.sh b/t/t3435-rebase-gpg-sign.sh\nindex 54120b09d6..aab2b3aab8 100755\n--- a/t/t3435-rebase-gpg-sign.sh\n+++ b/t/t3435-rebase-gpg-sign.sh\n@@ -46,7 +46,7 @@ test_expect_success 'setup: merge commit' '\n \ttest_commit fork-point &&\n \tgit switch -c side &&\n \ttest_commit three &&\n-\tgit switch master &&\n+\tgit switch main &&\n \tgit merge --no-ff side &&\n \tgit tag merged\n '\n@@ -64,7 +64,7 @@ test_rebase_gpg_sign   false -i --no-gpg-sign --gpg-sign\n test_expect_failure 'rebase -p --no-gpg-sign override commit.gpgsign' '\n \tgit reset --hard merged &&\n \tgit config commit.gpgsign true &&\n-\tgit rebase -p --no-gpg-sign --onto=one fork-point master &&\n+\tgit rebase -p --no-gpg-sign --onto=one fork-point main &&\n \ttest_must_fail git verify-commit HEAD\n '\n \ndiff --git a/t/t3436-rebase-more-options.sh b/t/t3436-rebase-more-options.sh\nindex eaaf4c8d1d..4d106642ba 100755\n--- a/t/t3436-rebase-more-options.sh\n+++ b/t/t3436-rebase-more-options.sh\n@@ -28,7 +28,7 @@ test_expect_success 'setup' '\n \ttest_commit commit2 foo foo2 &&\n \ttest_commit commit3 foo foo3 &&\n \n-\tgit checkout --orphan master &&\n+\tgit checkout --orphan main &&\n \trm foo &&\n \ttest_write_lines \"line 1\" \"        line 2\" \"line 3\" >file &&\n \tgit commit -am \"add file\" &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex c464f8dcc8..4ae87a5c4e 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,7 +257,13 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-[0-2]*|3[0-3]*)\n+3404)\n+\t# Avoid conflicts with patch series that are cooking at the same time\n+\t# as the patch series changing the default of `init.defaultBranch`.\n+\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\t;;\n+[0-2]*|3[0-4]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409810","messageId":"86c85666d558dfc51ff04fc525ed38db692cd802.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 09/28] t5323: prepare centered comment for `master` -> `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:39Z","receivedAt":"2020-11-12T22:44:15Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe are about to search-and-replace all mentions of `master` in t5323 by\n`main`, which is two characters shorter. To prepare for that, let's add\npadding to centered lines that will make them briefly uncentered, but\nwill be re-centered in the commit that performs that rename.\n\nDoing it this way (instead of padding after replacing) makes it easier\nto verify the validity of the patch that replaces `master` by `main`.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5323-pack-redundant.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh\nindex 6b4d1ca353..3903148926 100755\n--- a/t/t5323-pack-redundant.sh\n+++ b/t/t5323-pack-redundant.sh\n@@ -312,7 +312,7 @@ test_expect_success 'shared: all packs are redundant, but no output without --al\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================ master.git ===============\n+#     ================= master.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------+\n #     ----+--------------------------------------             |\n #     P1  | x x x x x x x                       x             |\n@@ -394,7 +394,7 @@ test_expect_success 'shared: no redundant without --alt-odb' '\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================ master.git ===============\n+#     ================= master.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------------+\n #     ----+--------------------------------------                   |\n #     P1  | x x x x x x x                       x                   |\n@@ -426,7 +426,7 @@ test_expect_success 'shared: one pack is redundant with --alt-odb' '\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================ master.git ===============\n+#     ================= master.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------------+\n #     ----+--------------------------------------                   |\n #     P1  | x x x x x x x                       x                   |\n-- \ngitgitgadget\n\n"},{"id":"409812","messageId":"0a05d319c0fc2e88b94ebe488af8d02a0ef63821.1605221038.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 01/28] t0060: preemptively adjust alignment","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:31Z","receivedAt":"2020-11-12T22:44:15Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe are about to adjust t0060 for the new default branch name `main`.\nThis name is two characters shorter and therefore needs two spaces more\npadding to align correctly.\n\nAdjusting the alignment before the big search-and-replace makes it\neasier to verify that the final result does not leave any misaligned\nlines behind.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t0060-path-utils.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh\nindex b2e3cf3f4c..928eebbdc0 100755\n--- a/t/t0060-path-utils.sh\n+++ b/t/t0060-path-utils.sh\n@@ -312,8 +312,8 @@ test_git_path GIT_COMMON_DIR=bar info/sparse-checkout     .git/info/sparse-check\n test_git_path GIT_COMMON_DIR=bar info//sparse-checkout    .git/info//sparse-checkout\n test_git_path GIT_COMMON_DIR=bar remotes/bar              bar/remotes/bar\n test_git_path GIT_COMMON_DIR=bar branches/bar             bar/branches/bar\n-test_git_path GIT_COMMON_DIR=bar logs/refs/heads/master   bar/logs/refs/heads/master\n-test_git_path GIT_COMMON_DIR=bar refs/heads/master        bar/refs/heads/master\n+test_git_path GIT_COMMON_DIR=bar logs/refs/heads/master     bar/logs/refs/heads/master\n+test_git_path GIT_COMMON_DIR=bar refs/heads/master          bar/refs/heads/master\n test_git_path GIT_COMMON_DIR=bar refs/bisect/foo          .git/refs/bisect/foo\n test_git_path GIT_COMMON_DIR=bar hooks/me                 bar/hooks/me\n test_git_path GIT_COMMON_DIR=bar config                   bar/config\n-- \ngitgitgadget\n\n"},{"id":"409811","messageId":"727de6fdf5f2eb0765d26c18a7960c5770a51a1d.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 13/28] t551*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:43Z","receivedAt":"2020-11-12T22:44:16Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t551*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5510-fetch.sh             | 158 +++++------\n t/t5511-refspec.sh           |  12 +-\n t/t5512-ls-remote.sh         |  26 +-\n t/t5514-fetch-multiple.sh    |  30 +--\n t/t5516-fetch-push.sh        | 500 +++++++++++++++++------------------\n t/t5517-push-mirror.sh       | 124 ++++-----\n t/t5518-fetch-exit-status.sh |   6 +-\n t/t5519-push-alternates.sh   |  12 +-\n t/test-lib.sh                |   2 +-\n 9 files changed, 435 insertions(+), 435 deletions(-)\n\ndiff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh\nindex 5d673358f9..206e3be695 100755\n--- a/t/t5510-fetch.sh\n+++ b/t/t5510-fetch.sh\n@@ -37,19 +37,19 @@ test_expect_success \"clone and setup child repos\" '\n \tgit clone . two &&\n \t(\n \t\tcd two &&\n-\t\tgit config branch.master.remote one &&\n+\t\tgit config branch.main.remote one &&\n \t\tgit config remote.one.url ../one/.git/ &&\n-\t\tgit config remote.one.fetch refs/heads/master:refs/heads/one\n+\t\tgit config remote.one.fetch refs/heads/main:refs/heads/one\n \t) &&\n \tgit clone . three &&\n \t(\n \t\tcd three &&\n-\t\tgit config branch.master.remote two &&\n-\t\tgit config branch.master.merge refs/heads/one &&\n+\t\tgit config branch.main.remote two &&\n+\t\tgit config branch.main.merge refs/heads/one &&\n \t\tmkdir -p .git/remotes &&\n \t\t{\n \t\t\techo \"URL: ../two/.git/\"\n-\t\t\techo \"Pull: refs/heads/master:refs/heads/two\"\n+\t\t\techo \"Pull: refs/heads/main:refs/heads/two\"\n \t\t\techo \"Pull: refs/heads/one:refs/heads/one\"\n \t\t} >.git/remotes/two\n \t) &&\n@@ -65,7 +65,7 @@ test_expect_success \"fetch test\" '\n \tgit fetch &&\n \tgit rev-parse --verify refs/heads/one &&\n \tmine=$(git rev-parse refs/heads/one) &&\n-\this=$(cd ../one && git rev-parse refs/heads/master) &&\n+\this=$(cd ../one && git rev-parse refs/heads/main) &&\n \ttest \"z$mine\" = \"z$his\"\n '\n \n@@ -75,11 +75,11 @@ test_expect_success \"fetch test for-merge\" '\n \tgit fetch &&\n \tgit rev-parse --verify refs/heads/two &&\n \tgit rev-parse --verify refs/heads/one &&\n-\tmaster_in_two=$(cd ../two && git rev-parse master) &&\n+\tmain_in_two=$(cd ../two && git rev-parse main) &&\n \tone_in_two=$(cd ../two && git rev-parse one) &&\n \t{\n \t\techo \"$one_in_two\t\"\n-\t\techo \"$master_in_two\tnot-for-merge\"\n+\t\techo \"$main_in_two\tnot-for-merge\"\n \t} >expected &&\n \tcut -f -2 .git/FETCH_HEAD >actual &&\n \ttest_cmp expected actual'\n@@ -88,7 +88,7 @@ test_expect_success 'fetch --prune on its own works as expected' '\n \tcd \"$D\" &&\n \tgit clone . prune &&\n \tcd prune &&\n-\tgit update-ref refs/remotes/origin/extrabranch master &&\n+\tgit update-ref refs/remotes/origin/extrabranch main &&\n \n \tgit fetch --prune origin &&\n \ttest_must_fail git rev-parse origin/extrabranch\n@@ -98,9 +98,9 @@ test_expect_success 'fetch --prune with a branch name keeps branches' '\n \tcd \"$D\" &&\n \tgit clone . prune-branch &&\n \tcd prune-branch &&\n-\tgit update-ref refs/remotes/origin/extrabranch master &&\n+\tgit update-ref refs/remotes/origin/extrabranch main &&\n \n-\tgit fetch --prune origin master &&\n+\tgit fetch --prune origin main &&\n \tgit rev-parse origin/extrabranch\n '\n \n@@ -110,18 +110,18 @@ test_expect_success 'fetch --prune with a namespace keeps other namespaces' '\n \tcd prune-namespace &&\n \n \tgit fetch --prune origin refs/heads/a/*:refs/remotes/origin/a/* &&\n-\tgit rev-parse origin/master\n+\tgit rev-parse origin/main\n '\n \n test_expect_success 'fetch --prune handles overlapping refspecs' '\n \tcd \"$D\" &&\n-\tgit update-ref refs/pull/42/head master &&\n+\tgit update-ref refs/pull/42/head main &&\n \tgit clone . prune-overlapping &&\n \tcd prune-overlapping &&\n \tgit config --add remote.origin.fetch refs/pull/*/head:refs/remotes/origin/pr/* &&\n \n \tgit fetch --prune origin &&\n-\tgit rev-parse origin/master &&\n+\tgit rev-parse origin/main &&\n \tgit rev-parse origin/pr/42 &&\n \n \tgit config --unset-all remote.origin.fetch &&\n@@ -129,7 +129,7 @@ test_expect_success 'fetch --prune handles overlapping refspecs' '\n \tgit config --add remote.origin.fetch refs/heads/*:refs/remotes/origin/* &&\n \n \tgit fetch --prune origin &&\n-\tgit rev-parse origin/master &&\n+\tgit rev-parse origin/main &&\n \tgit rev-parse origin/pr/42\n '\n \n@@ -137,13 +137,13 @@ test_expect_success 'fetch --prune --tags prunes branches but not tags' '\n \tcd \"$D\" &&\n \tgit clone . prune-tags &&\n \tcd prune-tags &&\n-\tgit tag sometag master &&\n+\tgit tag sometag main &&\n \t# Create what looks like a remote-tracking branch from an earlier\n \t# fetch that has since been deleted from the remote:\n-\tgit update-ref refs/remotes/origin/fake-remote master &&\n+\tgit update-ref refs/remotes/origin/fake-remote main &&\n \n \tgit fetch --prune --tags origin &&\n-\tgit rev-parse origin/master &&\n+\tgit rev-parse origin/main &&\n \ttest_must_fail git rev-parse origin/fake-remote &&\n \tgit rev-parse sometag\n '\n@@ -152,10 +152,10 @@ test_expect_success 'fetch --prune --tags with branch does not prune other thing\n \tcd \"$D\" &&\n \tgit clone . prune-tags-branch &&\n \tcd prune-tags-branch &&\n-\tgit tag sometag master &&\n-\tgit update-ref refs/remotes/origin/extrabranch master &&\n+\tgit tag sometag main &&\n+\tgit update-ref refs/remotes/origin/extrabranch main &&\n \n-\tgit fetch --prune --tags origin master &&\n+\tgit fetch --prune --tags origin main &&\n \tgit rev-parse origin/extrabranch &&\n \tgit rev-parse sometag\n '\n@@ -164,9 +164,9 @@ test_expect_success 'fetch --prune --tags with refspec prunes based on refspec'\n \tcd \"$D\" &&\n \tgit clone . prune-tags-refspec &&\n \tcd prune-tags-refspec &&\n-\tgit tag sometag master &&\n-\tgit update-ref refs/remotes/origin/foo/otherbranch master &&\n-\tgit update-ref refs/remotes/origin/extrabranch master &&\n+\tgit tag sometag main &&\n+\tgit update-ref refs/remotes/origin/foo/otherbranch main &&\n+\tgit update-ref refs/remotes/origin/extrabranch main &&\n \n \tgit fetch --prune --tags origin refs/heads/foo/*:refs/remotes/origin/foo/* &&\n \ttest_must_fail git rev-parse refs/remotes/origin/foo/otherbranch &&\n@@ -177,20 +177,20 @@ test_expect_success 'fetch --prune --tags with refspec prunes based on refspec'\n test_expect_success '--refmap=\"\" ignores configured refspec' '\n \tcd \"$TRASH_DIRECTORY\" &&\n \tgit clone \"$D\" remote-refs &&\n-\tgit -C remote-refs rev-parse remotes/origin/master >old &&\n-\tgit -C remote-refs update-ref refs/remotes/origin/master master~1 &&\n-\tgit -C remote-refs rev-parse remotes/origin/master >new &&\n+\tgit -C remote-refs rev-parse remotes/origin/main >old &&\n+\tgit -C remote-refs update-ref refs/remotes/origin/main main~1 &&\n+\tgit -C remote-refs rev-parse remotes/origin/main >new &&\n \tgit -C remote-refs fetch --refmap= origin \"+refs/heads/*:refs/hidden/origin/*\" &&\n-\tgit -C remote-refs rev-parse remotes/origin/master >actual &&\n+\tgit -C remote-refs rev-parse remotes/origin/main >actual &&\n \ttest_cmp new actual &&\n \tgit -C remote-refs fetch origin &&\n-\tgit -C remote-refs rev-parse remotes/origin/master >actual &&\n+\tgit -C remote-refs rev-parse remotes/origin/main >actual &&\n \ttest_cmp old actual\n '\n \n test_expect_success '--refmap=\"\" and --prune' '\n-\tgit -C remote-refs update-ref refs/remotes/origin/foo/otherbranch master &&\n-\tgit -C remote-refs update-ref refs/hidden/foo/otherbranch master &&\n+\tgit -C remote-refs update-ref refs/remotes/origin/foo/otherbranch main &&\n+\tgit -C remote-refs update-ref refs/hidden/foo/otherbranch main &&\n \tgit -C remote-refs fetch --prune --refmap=\"\" origin +refs/heads/*:refs/hidden/* &&\n \tgit -C remote-refs rev-parse remotes/origin/foo/otherbranch &&\n \ttest_must_fail git -C remote-refs rev-parse refs/hidden/foo/otherbranch &&\n@@ -250,7 +250,7 @@ test_expect_success 'fetch uses remote ref names to describe new refs' '\n \t\ttest_i18ngrep \"new tag.* -> descriptive-tag$\" actual &&\n \t\ttest_i18ngrep \"new ref.* -> crazy$\" actual\n \t) &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'fetch must not resolve short tag name' '\n@@ -281,7 +281,7 @@ test_expect_success 'create bundle 1' '\n \tcd \"$D\" &&\n \techo >file updated again by origin &&\n \tgit commit -a -m \"tip\" &&\n-\tgit bundle create --version=3 bundle1 master^..master\n+\tgit bundle create --version=3 bundle1 main^..main\n '\n \n test_expect_success 'header of bundle looks right' '\n@@ -289,7 +289,7 @@ test_expect_success 'header of bundle looks right' '\n \t# v3 git bundle\n \t@object-format=$(test_oid algo)\n \t-OID updated by origin\n-\tOID refs/heads/master\n+\tOID refs/heads/main\n \n \tEOF\n \tsed -e \"s/$OID_REGEX/OID/g\" -e \"5q\" \"$D\"/bundle1 >actual &&\n@@ -298,13 +298,13 @@ test_expect_success 'header of bundle looks right' '\n \n test_expect_success 'create bundle 2' '\n \tcd \"$D\" &&\n-\tgit bundle create bundle2 master~2..master\n+\tgit bundle create bundle2 main~2..main\n '\n \n test_expect_success 'unbundle 1' '\n \tcd \"$D/bundle\" &&\n \tgit checkout -b some-branch &&\n-\ttest_must_fail git fetch \"$D/bundle1\" master:master\n+\ttest_must_fail git fetch \"$D/bundle1\" main:main\n '\n \n \n@@ -317,8 +317,8 @@ test_expect_success 'bundle 1 has only 3 files ' '\n \n test_expect_success 'unbundle 2' '\n \tcd \"$D/bundle\" &&\n-\tgit fetch ../bundle2 master:master &&\n-\ttest \"tip\" = \"$(git log -1 --pretty=oneline master | cut -d\" \" -f2)\"\n+\tgit fetch ../bundle2 main:main &&\n+\ttest \"tip\" = \"$(git log -1 --pretty=oneline main | cut -d\" \" -f2)\"\n '\n \n test_expect_success 'bundle does not prerequisite objects' '\n@@ -335,14 +335,14 @@ test_expect_success 'bundle does not prerequisite objects' '\n test_expect_success 'bundle should be able to create a full history' '\n \n \tcd \"$D\" &&\n-\tgit tag -a -m \"1.0\" v1.0 master &&\n+\tgit tag -a -m \"1.0\" v1.0 main &&\n \tgit bundle create bundle4 v1.0\n \n '\n \n test_expect_success 'fetch with a non-applying branch.<name>.merge' '\n-\tgit config branch.master.remote yeti &&\n-\tgit config branch.master.merge refs/heads/bigfoot &&\n+\tgit config branch.main.remote yeti &&\n+\tgit config branch.main.merge refs/heads/bigfoot &&\n \tgit config remote.blub.url one &&\n \tgit config remote.blub.fetch \"refs/heads/*:refs/remotes/one/*\" &&\n \tgit fetch blub\n@@ -362,8 +362,8 @@ test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge\n # the merge spec matches the branch the remote HEAD points to\n test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge [2]' '\n \tone_ref=$(cd one && git symbolic-ref HEAD) &&\n-\tgit config branch.master.remote blub &&\n-\tgit config branch.master.merge \"$one_ref\" &&\n+\tgit config branch.main.remote blub &&\n+\tgit config branch.main.merge \"$one_ref\" &&\n \tgit update-ref -d FETCH_HEAD &&\n \tgit fetch one &&\n \ttest $one_head = \"$(git rev-parse --verify FETCH_HEAD)\" &&\n@@ -373,7 +373,7 @@ test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge\n # URL supplied to fetch matches the url of the configured branch's remote, but\n # the merge spec does not match the branch the remote HEAD points to\n test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge [3]' '\n-\tgit config branch.master.merge \"${one_ref}_not\" &&\n+\tgit config branch.main.merge \"${one_ref}_not\" &&\n \tgit update-ref -d FETCH_HEAD &&\n \tgit fetch one &&\n \ttest $one_head = \"$(git rev-parse --verify FETCH_HEAD)\" &&\n@@ -389,9 +389,9 @@ test_expect_success 'quoting of a strangely named repo' '\n test_expect_success 'bundle should record HEAD correctly' '\n \n \tcd \"$D\" &&\n-\tgit bundle create bundle5 HEAD master &&\n+\tgit bundle create bundle5 HEAD main &&\n \tgit bundle list-heads bundle5 >actual &&\n-\tfor h in HEAD refs/heads/master\n+\tfor h in HEAD refs/heads/main\n \tdo\n \t\techo \"$(git rev-parse --verify $h) $h\"\n \tdone >expect &&\n@@ -399,10 +399,10 @@ test_expect_success 'bundle should record HEAD correctly' '\n \n '\n \n-test_expect_success 'mark initial state of origin/master' '\n+test_expect_success 'mark initial state of origin/main' '\n \t(\n \t\tcd three &&\n-\t\tgit tag base-origin-master refs/remotes/origin/master\n+\t\tgit tag base-origin-main refs/remotes/origin/main\n \t)\n '\n \n@@ -412,10 +412,10 @@ test_expect_success 'explicit fetch should update tracking' '\n \tgit branch -f side &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n-\t\tgit fetch origin master &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n+\t\tgit fetch origin main &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" != \"$n\" &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/origin/side\n \t)\n@@ -427,10 +427,10 @@ test_expect_success 'explicit pull should update tracking' '\n \tgit branch -f side &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n-\t\tgit pull origin master &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n+\t\tgit pull origin main &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" != \"$n\" &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/origin/side\n \t)\n@@ -449,13 +449,13 @@ test_expect_success 'explicit --refmap option overrides remote.*.fetch' '\n \tgit branch -f side &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n-\t\tgit fetch --refmap=\"refs/heads/*:refs/remotes/other/*\" origin master &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n+\t\tgit fetch --refmap=\"refs/heads/*:refs/remotes/other/*\" origin main &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" = \"$n\" &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/origin/side &&\n-\t\tgit rev-parse --verify refs/remotes/other/master\n+\t\tgit rev-parse --verify refs/remotes/other/main\n \t)\n '\n \n@@ -464,10 +464,10 @@ test_expect_success 'explicitly empty --refmap option disables remote.*.fetch' '\n \tgit branch -f side &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n-\t\tgit fetch --refmap=\"\" origin master &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n+\t\tgit fetch --refmap=\"\" origin main &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" = \"$n\" &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/origin/side\n \t)\n@@ -479,10 +479,10 @@ test_expect_success 'configured fetch updates tracking' '\n \tgit branch -f side &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\tgit fetch origin &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" != \"$n\" &&\n \t\tgit rev-parse --verify refs/remotes/origin/side\n \t)\n@@ -493,12 +493,12 @@ test_expect_success 'non-matching refspecs do not confuse tracking update' '\n \tgit update-ref refs/odd/location HEAD &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n \t\tgit config --add remote.origin.fetch \\\n \t\t\trefs/odd/location:refs/remotes/origin/odd &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n-\t\tgit fetch origin master &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n+\t\tgit fetch origin main &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" != \"$n\" &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/origin/odd\n \t)\n@@ -524,7 +524,7 @@ test_expect_success 'auto tag following fetches minimum' '\n \t\t\tgit tag -a -m $i excess-$i || exit 1\n \t\tdone\n \t) &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \t(\n \t\tcd follow &&\n \t\tgit fetch\n@@ -533,13 +533,13 @@ test_expect_success 'auto tag following fetches minimum' '\n \n test_expect_success 'refuse to fetch into the current branch' '\n \n-\ttest_must_fail git fetch . side:master\n+\ttest_must_fail git fetch . side:main\n \n '\n \n test_expect_success 'fetch into the current branch with --update-head-ok' '\n \n-\tgit fetch --update-head-ok . side:master\n+\tgit fetch --update-head-ok . side:main\n \n '\n \n@@ -568,7 +568,7 @@ test_expect_success \"should be able to fetch with duplicate refspecs\" '\n \t(\n \t\tcd dups &&\n \t\tgit init &&\n-\t\tgit config branch.master.remote three &&\n+\t\tgit config branch.main.remote three &&\n \t\tgit config remote.three.url ../three/.git &&\n \t\tgit config remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&\n \t\tgit config --add remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&\n@@ -877,11 +877,11 @@ test_expect_success 'all boundary commits are excluded' '\n \ttest_commit oneside &&\n \tgit checkout HEAD^ &&\n \ttest_commit otherside &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit merge otherside &&\n \tad=$(git log --no-walk --format=%ad HEAD) &&\n-\tgit bundle create twoside-boundary.bdl master --since=\"$ad\" &&\n+\tgit bundle create twoside-boundary.bdl main --since=\"$ad\" &&\n \tconvert_bundle_to_pack <twoside-boundary.bdl >twoside-boundary.pack &&\n \tpack=$(git index-pack --fix-thin --stdin <twoside-boundary.pack) &&\n \ttest_bundle_object_count .git/objects/pack/pack-${pack##pack\t}.pack 3\n@@ -1017,7 +1017,7 @@ setup_negotiation_tip () {\n \tfi &&\n \n \ttest_commit -C \"$SERVER\" beta_s &&\n-\tgit -C \"$SERVER\" checkout master &&\n+\tgit -C \"$SERVER\" checkout main &&\n \ttest_commit -C \"$SERVER\" alpha_s &&\n \tgit -C \"$SERVER\" tag -d alpha_1 alpha_2 beta_1 beta_2\n }\ndiff --git a/t/t5511-refspec.sh b/t/t5511-refspec.sh\nindex f541f30bc2..847a9d4c27 100755\n--- a/t/t5511-refspec.sh\n+++ b/t/t5511-refspec.sh\n@@ -33,7 +33,7 @@ test_refspec fetch '::'\t\t\t\t\t\tinvalid\n test_refspec push 'refs/heads/*:refs/remotes/frotz/*'\n test_refspec push 'refs/heads/*:refs/remotes/frotz'\t\tinvalid\n test_refspec push 'refs/heads:refs/remotes/frotz/*'\t\tinvalid\n-test_refspec push 'refs/heads/master:refs/remotes/frotz/xyzzy'\n+test_refspec push 'refs/heads/main:refs/remotes/frotz/xyzzy'\n \n \n # These have invalid LHS, but we do not have a formal \"valid sha-1\n@@ -41,18 +41,18 @@ test_refspec push 'refs/heads/master:refs/remotes/frotz/xyzzy'\n # code.  They will be caught downstream anyway, but we may want to\n # have tighter check later...\n \n-: test_refspec push 'refs/heads/master::refs/remotes/frotz/xyzzy'\tinvalid\n+: test_refspec push 'refs/heads/main::refs/remotes/frotz/xyzzy'\tinvalid\n : test_refspec push 'refs/heads/maste :refs/remotes/frotz/xyzzy'\tinvalid\n \n test_refspec fetch 'refs/heads/*:refs/remotes/frotz/*'\n test_refspec fetch 'refs/heads/*:refs/remotes/frotz'\t\tinvalid\n test_refspec fetch 'refs/heads:refs/remotes/frotz/*'\t\tinvalid\n-test_refspec fetch 'refs/heads/master:refs/remotes/frotz/xyzzy'\n-test_refspec fetch 'refs/heads/master::refs/remotes/frotz/xyzzy'\tinvalid\n+test_refspec fetch 'refs/heads/main:refs/remotes/frotz/xyzzy'\n+test_refspec fetch 'refs/heads/main::refs/remotes/frotz/xyzzy'\tinvalid\n test_refspec fetch 'refs/heads/maste :refs/remotes/frotz/xyzzy'\tinvalid\n \n-test_refspec push 'master~1:refs/remotes/frotz/backup'\n-test_refspec fetch 'master~1:refs/remotes/frotz/backup'\t\tinvalid\n+test_refspec push 'main~1:refs/remotes/frotz/backup'\n+test_refspec fetch 'main~1:refs/remotes/frotz/backup'\t\tinvalid\n test_refspec push 'HEAD~4:refs/remotes/frotz/new'\n test_refspec fetch 'HEAD~4:refs/remotes/frotz/new'\t\tinvalid\n \ndiff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh\nindex e98c3a0174..fb122fb7b8 100755\n--- a/t/t5512-ls-remote.sh\n+++ b/t/t5512-ls-remote.sh\n@@ -118,7 +118,7 @@ test_expect_success 'use branch.<name>.remote if possible' '\n \techo \"From $URL\" >exp_err &&\n \n \tgit remote add other $URL &&\n-\tgit config branch.master.remote other &&\n+\tgit config branch.main.remote other &&\n \n \tgit ls-remote 2>actual_err >actual &&\n \ttest_cmp exp_err actual_err &&\n@@ -129,9 +129,9 @@ test_expect_success 'confuses pattern as remote when no remote specified' '\n \tif test_have_prereq MINGW\n \tthen\n \t\t# Windows does not like asterisks in pathname\n-\t\tdoes_not_exist=master\n+\t\tdoes_not_exist=main\n \telse\n-\t\tdoes_not_exist=\"refs*master\"\n+\t\tdoes_not_exist=\"refs*main\"\n \tfi &&\n \tcat >exp <<-EOF &&\n \tfatal: '\\''$does_not_exist'\\'' does not appear to be a git repository\n@@ -144,7 +144,7 @@ test_expect_success 'confuses pattern as remote when no remote specified' '\n \t# Do not expect \"git ls-remote <pattern>\" to work; ls-remote needs\n \t# <remote> if you want to feed <pattern>, just like you cannot say\n \t# fetch <branch>.\n-\t# We could just as easily have used \"master\"; the \"*\" emphasizes its\n+\t# We could just as easily have used \"main\"; the \"*\" emphasizes its\n \t# role as a pattern.\n \ttest_must_fail git ls-remote \"$does_not_exist\" >actual 2>&1 &&\n \ttest_i18ncmp exp actual\n@@ -217,14 +217,14 @@ test_expect_success 'protocol v2 supports hiderefs' '\n \n test_expect_success 'ls-remote --symref' '\n \tgit fetch origin &&\n-\techo \"ref: refs/heads/master\tHEAD\" >expect &&\n+\techo \"ref: refs/heads/main\tHEAD\" >expect &&\n \tgenerate_references \\\n \t\tHEAD \\\n-\t\trefs/heads/master >>expect &&\n+\t\trefs/heads/main >>expect &&\n \toid=$(git rev-parse HEAD) &&\n \techo \"$oid\trefs/remotes/origin/HEAD\" >>expect &&\n \tgenerate_references \\\n-\t\trefs/remotes/origin/master \\\n+\t\trefs/remotes/origin/main \\\n \t\trefs/tags/mark \\\n \t\trefs/tags/mark1.1 \\\n \t\trefs/tags/mark1.10 \\\n@@ -238,7 +238,7 @@ test_expect_success 'ls-remote --symref' '\n test_expect_success 'ls-remote with filtered symref (refname)' '\n \trev=$(git rev-parse HEAD) &&\n \tcat >expect <<-EOF &&\n-\tref: refs/heads/master\tHEAD\n+\tref: refs/heads/main\tHEAD\n \t$rev\tHEAD\n \tEOF\n \t# Protocol v2 supports sending symrefs for refs other than HEAD, so use\n@@ -252,7 +252,7 @@ test_expect_failure 'ls-remote with filtered symref (--heads)' '\n \tcat >expect <<-EOF &&\n \tref: refs/tags/mark\trefs/heads/foo\n \t$rev\trefs/heads/foo\n-\t$rev\trefs/heads/master\n+\t$rev\trefs/heads/main\n \tEOF\n \t# Protocol v2 supports sending symrefs for refs other than HEAD, so use\n \t# protocol v0 here.\n@@ -263,7 +263,7 @@ test_expect_failure 'ls-remote with filtered symref (--heads)' '\n test_expect_success 'ls-remote --symref omits filtered-out matches' '\n \tcat >expect <<-EOF &&\n \t$rev\trefs/heads/foo\n-\t$rev\trefs/heads/master\n+\t$rev\trefs/heads/main\n \tEOF\n \t# Protocol v2 supports sending symrefs for refs other than HEAD, so use\n \t# protocol v0 here.\n@@ -330,10 +330,10 @@ test_expect_success 'ls-remote --sort fails gracefully outside repository' '\n \n test_expect_success 'ls-remote patterns work with all protocol versions' '\n \tgit for-each-ref --format=\"%(objectname)\t%(refname)\" \\\n-\t\trefs/heads/master refs/remotes/origin/master >expect &&\n-\tgit -c protocol.version=1 ls-remote . master >actual.v1 &&\n+\t\trefs/heads/main refs/remotes/origin/main >expect &&\n+\tgit -c protocol.version=1 ls-remote . main >actual.v1 &&\n \ttest_cmp expect actual.v1 &&\n-\tgit -c protocol.version=2 ls-remote . master >actual.v2 &&\n+\tgit -c protocol.version=2 ls-remote . main >actual.v2 &&\n \ttest_cmp expect actual.v2\n '\n \ndiff --git a/t/t5514-fetch-multiple.sh b/t/t5514-fetch-multiple.sh\nindex bd202ec6f3..1b0560f901 100755\n--- a/t/t5514-fetch-multiple.sh\n+++ b/t/t5514-fetch-multiple.sh\n@@ -17,7 +17,7 @@ setup_repository () {\n \tgit add elif &&\n \ttest_tick &&\n \tgit commit -m \"Second\" &&\n-\tgit checkout master\n+\tgit checkout main\n \t)\n }\n \n@@ -32,16 +32,16 @@ test_expect_success setup '\n '\n \n cat > test/expect << EOF\n-  one/master\n+  one/main\n   one/side\n-  origin/HEAD -> origin/master\n-  origin/master\n+  origin/HEAD -> origin/main\n+  origin/main\n   origin/side\n   three/another\n-  three/master\n+  three/main\n   three/side\n   two/another\n-  two/master\n+  two/main\n   two/side\n EOF\n \n@@ -70,15 +70,15 @@ test_expect_success 'git fetch --all should continue if a remote has errors' '\n test_expect_success 'git fetch --all does not allow non-option arguments' '\n \t(cd test &&\n \t test_must_fail git fetch --all origin &&\n-\t test_must_fail git fetch --all origin master)\n+\t test_must_fail git fetch --all origin main)\n '\n \n cat > expect << EOF\n-  origin/HEAD -> origin/master\n-  origin/master\n+  origin/HEAD -> origin/main\n+  origin/main\n   origin/side\n   three/another\n-  three/master\n+  three/main\n   three/side\n EOF\n \n@@ -92,10 +92,10 @@ test_expect_success 'git fetch --multiple (but only one remote)' '\n '\n \n cat > expect << EOF\n-  one/master\n+  one/main\n   one/side\n   two/another\n-  two/master\n+  two/main\n   two/side\n EOF\n \n@@ -133,13 +133,13 @@ test_expect_success 'git fetch --all (skipFetchAll)' '\n '\n \n cat > expect << EOF\n-  one/master\n+  one/main\n   one/side\n   three/another\n-  three/master\n+  three/main\n   three/side\n   two/another\n-  two/master\n+  two/main\n   two/side\n EOF\n \ndiff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh\nindex d11382f769..522cee7aa6 100755\n--- a/t/t5516-fetch-push.sh\n+++ b/t/t5516-fetch-push.sh\n@@ -120,13 +120,13 @@ test_expect_success setup '\n \tgit add path1 &&\n \ttest_tick &&\n \tgit commit -a -m repo &&\n-\tthe_first_commit=$(git show-ref -s --verify refs/heads/master) &&\n+\tthe_first_commit=$(git show-ref -s --verify refs/heads/main) &&\n \n \t>path2 &&\n \tgit add path2 &&\n \ttest_tick &&\n \tgit commit -a -m second &&\n-\tthe_commit=$(git show-ref -s --verify refs/heads/master)\n+\tthe_commit=$(git show-ref -s --verify refs/heads/main)\n \n '\n \n@@ -134,9 +134,9 @@ test_expect_success 'fetch without wildcard' '\n \tmk_empty testrepo &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit fetch .. refs/heads/master:refs/remotes/origin/master &&\n+\t\tgit fetch .. refs/heads/main:refs/remotes/origin/main &&\n \n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -150,7 +150,7 @@ test_expect_success 'fetch with wildcard' '\n \t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n \t\tgit fetch up &&\n \n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -166,7 +166,7 @@ test_expect_success 'fetch with insteadOf' '\n \t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n \t\tgit fetch up &&\n \n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -182,7 +182,7 @@ test_expect_success 'fetch with pushInsteadOf (should not rewrite)' '\n \t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n \t\tgit fetch up &&\n \n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -191,10 +191,10 @@ test_expect_success 'fetch with pushInsteadOf (should not rewrite)' '\n test_expect_success 'push without wildcard' '\n \tmk_empty testrepo &&\n \n-\tgit push testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -206,7 +206,7 @@ test_expect_success 'push with wildcard' '\n \tgit push testrepo \"refs/heads/*:refs/remotes/origin/*\" &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -216,10 +216,10 @@ test_expect_success 'push with insteadOf' '\n \tmk_empty testrepo &&\n \tTRASH=\"$(pwd)/\" &&\n \ttest_config \"url.$TRASH.insteadOf\" trash/ &&\n-\tgit push trash/testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push trash/testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -229,10 +229,10 @@ test_expect_success 'push with pushInsteadOf' '\n \tmk_empty testrepo &&\n \tTRASH=\"$(pwd)/\" &&\n \ttest_config \"url.$TRASH.pushInsteadOf\" trash/ &&\n-\tgit push trash/testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push trash/testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -244,10 +244,10 @@ test_expect_success 'push with pushInsteadOf and explicit pushurl (pushInsteadOf\n \ttest_config \"url.trash3/.pushInsteadOf\" trash/wrong &&\n \ttest_config remote.r.url trash/wrong &&\n \ttest_config remote.r.pushurl \"testrepo/\" &&\n-\tgit push r refs/heads/master:refs/remotes/origin/master &&\n+\tgit push r refs/heads/main:refs/remotes/origin/main &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -255,101 +255,101 @@ test_expect_success 'push with pushInsteadOf and explicit pushurl (pushInsteadOf\n \n test_expect_success 'push with matching heads' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tgit push testrepo : &&\n-\tcheck_push_result testrepo $the_commit heads/master\n+\tcheck_push_result testrepo $the_commit heads/main\n \n '\n \n test_expect_success 'push with matching heads on the command line' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tgit push testrepo : &&\n-\tcheck_push_result testrepo $the_commit heads/master\n+\tcheck_push_result testrepo $the_commit heads/main\n \n '\n \n test_expect_success 'failed (non-fast-forward) push with matching heads' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tgit push testrepo : &&\n \tgit commit --amend -massaged &&\n \ttest_must_fail git push testrepo &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n \tgit reset --hard $the_commit\n \n '\n \n test_expect_success 'push --force with matching heads' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tgit push testrepo : &&\n \tgit commit --amend -massaged &&\n \tgit push --force testrepo : &&\n-\t! check_push_result testrepo $the_commit heads/master &&\n+\t! check_push_result testrepo $the_commit heads/main &&\n \tgit reset --hard $the_commit\n \n '\n \n test_expect_success 'push with matching heads and forced update' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tgit push testrepo : &&\n \tgit commit --amend -massaged &&\n \tgit push testrepo +: &&\n-\t! check_push_result testrepo $the_commit heads/master &&\n+\t! check_push_result testrepo $the_commit heads/main &&\n \tgit reset --hard $the_commit\n \n '\n \n test_expect_success 'push with no ambiguity (1)' '\n \n-\tmk_test testrepo heads/master &&\n-\tgit push testrepo master:master &&\n-\tcheck_push_result testrepo $the_commit heads/master\n+\tmk_test testrepo heads/main &&\n+\tgit push testrepo main:main &&\n+\tcheck_push_result testrepo $the_commit heads/main\n \n '\n \n test_expect_success 'push with no ambiguity (2)' '\n \n-\tmk_test testrepo remotes/origin/master &&\n-\tgit push testrepo master:origin/master &&\n-\tcheck_push_result testrepo $the_commit remotes/origin/master\n+\tmk_test testrepo remotes/origin/main &&\n+\tgit push testrepo main:origin/main &&\n+\tcheck_push_result testrepo $the_commit remotes/origin/main\n \n '\n \n test_expect_success 'push with colon-less refspec, no ambiguity' '\n \n-\tmk_test testrepo heads/master heads/t/master &&\n-\tgit branch -f t/master master &&\n-\tgit push testrepo master &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n-\tcheck_push_result testrepo $the_first_commit heads/t/master\n+\tmk_test testrepo heads/main heads/t/main &&\n+\tgit branch -f t/main main &&\n+\tgit push testrepo main &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n+\tcheck_push_result testrepo $the_first_commit heads/t/main\n \n '\n \n test_expect_success 'push with weak ambiguity (1)' '\n \n-\tmk_test testrepo heads/master remotes/origin/master &&\n-\tgit push testrepo master:master &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n-\tcheck_push_result testrepo $the_first_commit remotes/origin/master\n+\tmk_test testrepo heads/main remotes/origin/main &&\n+\tgit push testrepo main:main &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n+\tcheck_push_result testrepo $the_first_commit remotes/origin/main\n \n '\n \n test_expect_success 'push with weak ambiguity (2)' '\n \n-\tmk_test testrepo heads/master remotes/origin/master remotes/another/master &&\n-\tgit push testrepo master:master &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n-\tcheck_push_result testrepo $the_first_commit remotes/origin/master remotes/another/master\n+\tmk_test testrepo heads/main remotes/origin/main remotes/another/main &&\n+\tgit push testrepo main:main &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n+\tcheck_push_result testrepo $the_first_commit remotes/origin/main remotes/another/main\n \n '\n \n test_expect_success 'push with ambiguity' '\n \n \tmk_test testrepo heads/frotz tags/frotz &&\n-\ttest_must_fail git push testrepo master:frotz &&\n+\ttest_must_fail git push testrepo main:frotz &&\n \tcheck_push_result testrepo $the_first_commit heads/frotz tags/frotz\n \n '\n@@ -357,7 +357,7 @@ test_expect_success 'push with ambiguity' '\n test_expect_success 'push with colon-less refspec (1)' '\n \n \tmk_test testrepo heads/frotz tags/frotz &&\n-\tgit branch -f frotz master &&\n+\tgit branch -f frotz main &&\n \tgit push testrepo frotz &&\n \tcheck_push_result testrepo $the_commit heads/frotz &&\n \tcheck_push_result testrepo $the_first_commit tags/frotz\n@@ -385,7 +385,7 @@ test_expect_success 'push with colon-less refspec (3)' '\n \tthen\n \t\tgit tag -d frotz\n \tfi &&\n-\tgit branch -f frotz master &&\n+\tgit branch -f frotz main &&\n \tgit push testrepo frotz &&\n \tcheck_push_result testrepo $the_commit heads/frotz &&\n \ttest 1 = $( cd testrepo && git show-ref | wc -l )\n@@ -408,7 +408,7 @@ test_expect_success 'push with colon-less refspec (4)' '\n test_expect_success 'push head with non-existent, incomplete dest' '\n \n \tmk_test testrepo &&\n-\tgit push testrepo master:branch &&\n+\tgit push testrepo main:branch &&\n \tcheck_push_result testrepo $the_commit heads/branch\n \n '\n@@ -425,42 +425,42 @@ test_expect_success 'push tag with non-existent, incomplete dest' '\n test_expect_success 'push sha1 with non-existent, incomplete dest' '\n \n \tmk_test testrepo &&\n-\ttest_must_fail git push testrepo $(git rev-parse master):foo\n+\ttest_must_fail git push testrepo $(git rev-parse main):foo\n \n '\n \n test_expect_success 'push ref expression with non-existent, incomplete dest' '\n \n \tmk_test testrepo &&\n-\ttest_must_fail git push testrepo master^:branch\n+\ttest_must_fail git push testrepo main^:branch\n \n '\n \n test_expect_success 'push with HEAD' '\n \n-\tmk_test testrepo heads/master &&\n-\tgit checkout master &&\n+\tmk_test testrepo heads/main &&\n+\tgit checkout main &&\n \tgit push testrepo HEAD &&\n-\tcheck_push_result testrepo $the_commit heads/master\n+\tcheck_push_result testrepo $the_commit heads/main\n \n '\n \n test_expect_success 'push with HEAD nonexisting at remote' '\n \n-\tmk_test testrepo heads/master &&\n-\tgit checkout -b local master &&\n+\tmk_test testrepo heads/main &&\n+\tgit checkout -b local main &&\n \tgit push testrepo HEAD &&\n \tcheck_push_result testrepo $the_commit heads/local\n '\n \n test_expect_success 'push with +HEAD' '\n \n-\tmk_test testrepo heads/master &&\n-\tgit checkout master &&\n+\tmk_test testrepo heads/main &&\n+\tgit checkout main &&\n \tgit branch -D local &&\n \tgit checkout -b local &&\n-\tgit push testrepo master local &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n+\tgit push testrepo main local &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n \tcheck_push_result testrepo $the_commit heads/local &&\n \n \t# Without force rewinding should fail\n@@ -477,7 +477,7 @@ test_expect_success 'push with +HEAD' '\n test_expect_success 'push HEAD with non-existent, incomplete dest' '\n \n \tmk_test testrepo &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit push testrepo HEAD:branch &&\n \tcheck_push_result testrepo $the_commit heads/branch\n \n@@ -486,7 +486,7 @@ test_expect_success 'push HEAD with non-existent, incomplete dest' '\n test_expect_success 'push with config remote.*.push = HEAD' '\n \n \tmk_test testrepo heads/local &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -f local $the_commit &&\n \t(\n \t\tcd testrepo &&\n@@ -495,166 +495,166 @@ test_expect_success 'push with config remote.*.push = HEAD' '\n \t) &&\n \ttest_config remote.there.url testrepo &&\n \ttest_config remote.there.push HEAD &&\n-\ttest_config branch.master.remote there &&\n+\ttest_config branch.main.remote there &&\n \tgit push &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n \tcheck_push_result testrepo $the_first_commit heads/local\n '\n \n test_expect_success 'push with remote.pushdefault' '\n-\tmk_test up_repo heads/master &&\n-\tmk_test down_repo heads/master &&\n+\tmk_test up_repo heads/main &&\n+\tmk_test down_repo heads/main &&\n \ttest_config remote.up.url up_repo &&\n \ttest_config remote.down.url down_repo &&\n-\ttest_config branch.master.remote up &&\n+\ttest_config branch.main.remote up &&\n \ttest_config remote.pushdefault down &&\n \ttest_config push.default matching &&\n \tgit push &&\n-\tcheck_push_result up_repo $the_first_commit heads/master &&\n-\tcheck_push_result down_repo $the_commit heads/master\n+\tcheck_push_result up_repo $the_first_commit heads/main &&\n+\tcheck_push_result down_repo $the_commit heads/main\n '\n \n test_expect_success 'push with config remote.*.pushurl' '\n \n-\tmk_test testrepo heads/master &&\n-\tgit checkout master &&\n+\tmk_test testrepo heads/main &&\n+\tgit checkout main &&\n \ttest_config remote.there.url test2repo &&\n \ttest_config remote.there.pushurl testrepo &&\n \tgit push there : &&\n-\tcheck_push_result testrepo $the_commit heads/master\n+\tcheck_push_result testrepo $the_commit heads/main\n '\n \n test_expect_success 'push with config branch.*.pushremote' '\n-\tmk_test up_repo heads/master &&\n-\tmk_test side_repo heads/master &&\n-\tmk_test down_repo heads/master &&\n+\tmk_test up_repo heads/main &&\n+\tmk_test side_repo heads/main &&\n+\tmk_test down_repo heads/main &&\n \ttest_config remote.up.url up_repo &&\n \ttest_config remote.pushdefault side_repo &&\n \ttest_config remote.down.url down_repo &&\n-\ttest_config branch.master.remote up &&\n-\ttest_config branch.master.pushremote down &&\n+\ttest_config branch.main.remote up &&\n+\ttest_config branch.main.pushremote down &&\n \ttest_config push.default matching &&\n \tgit push &&\n-\tcheck_push_result up_repo $the_first_commit heads/master &&\n-\tcheck_push_result side_repo $the_first_commit heads/master &&\n-\tcheck_push_result down_repo $the_commit heads/master\n+\tcheck_push_result up_repo $the_first_commit heads/main &&\n+\tcheck_push_result side_repo $the_first_commit heads/main &&\n+\tcheck_push_result down_repo $the_commit heads/main\n '\n \n test_expect_success 'branch.*.pushremote config order is irrelevant' '\n-\tmk_test one_repo heads/master &&\n-\tmk_test two_repo heads/master &&\n+\tmk_test one_repo heads/main &&\n+\tmk_test two_repo heads/main &&\n \ttest_config remote.one.url one_repo &&\n \ttest_config remote.two.url two_repo &&\n-\ttest_config branch.master.pushremote two_repo &&\n+\ttest_config branch.main.pushremote two_repo &&\n \ttest_config remote.pushdefault one_repo &&\n \ttest_config push.default matching &&\n \tgit push &&\n-\tcheck_push_result one_repo $the_first_commit heads/master &&\n-\tcheck_push_result two_repo $the_commit heads/master\n+\tcheck_push_result one_repo $the_first_commit heads/main &&\n+\tcheck_push_result two_repo $the_commit heads/main\n '\n \n test_expect_success 'push with dry-run' '\n \n-\tmk_test testrepo heads/master &&\n-\told_commit=$(git -C testrepo show-ref -s --verify refs/heads/master) &&\n+\tmk_test testrepo heads/main &&\n+\told_commit=$(git -C testrepo show-ref -s --verify refs/heads/main) &&\n \tgit push --dry-run testrepo : &&\n-\tcheck_push_result testrepo $old_commit heads/master\n+\tcheck_push_result testrepo $old_commit heads/main\n '\n \n test_expect_success 'push updates local refs' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child &&\n \t(\n \t\tcd child &&\n-\t\tgit pull .. master &&\n+\t\tgit pull .. main &&\n \t\tgit push &&\n-\t\ttest $(git rev-parse master) = \\\n-\t\t\t$(git rev-parse remotes/origin/master)\n+\t\ttest $(git rev-parse main) = \\\n+\t\t\t$(git rev-parse remotes/origin/main)\n \t)\n \n '\n \n test_expect_success 'push updates up-to-date local refs' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child1 &&\n \tmk_child testrepo child2 &&\n-\t(cd child1 && git pull .. master && git push) &&\n+\t(cd child1 && git pull .. main && git push) &&\n \t(\n \t\tcd child2 &&\n-\t\tgit pull ../child1 master &&\n+\t\tgit pull ../child1 main &&\n \t\tgit push &&\n-\t\ttest $(git rev-parse master) = \\\n-\t\t\t$(git rev-parse remotes/origin/master)\n+\t\ttest $(git rev-parse main) = \\\n+\t\t\t$(git rev-parse remotes/origin/main)\n \t)\n \n '\n \n test_expect_success 'push preserves up-to-date packed refs' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child &&\n \t(\n \t\tcd child &&\n \t\tgit push &&\n-\t\t! test -f .git/refs/remotes/origin/master\n+\t\t! test -f .git/refs/remotes/origin/main\n \t)\n \n '\n \n test_expect_success 'push does not update local refs on failure' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child &&\n \tmkdir testrepo/.git/hooks &&\n \techo \"#!/no/frobnication/today\" >testrepo/.git/hooks/pre-receive &&\n \tchmod +x testrepo/.git/hooks/pre-receive &&\n \t(\n \t\tcd child &&\n-\t\tgit pull .. master &&\n+\t\tgit pull .. main &&\n \t\ttest_must_fail git push &&\n-\t\ttest $(git rev-parse master) != \\\n-\t\t\t$(git rev-parse remotes/origin/master)\n+\t\ttest $(git rev-parse main) != \\\n+\t\t\t$(git rev-parse remotes/origin/main)\n \t)\n \n '\n \n test_expect_success 'allow deleting an invalid remote ref' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -f testrepo/.git/objects/??/* &&\n-\tgit push testrepo :refs/heads/master &&\n-\t(cd testrepo && test_must_fail git rev-parse --verify refs/heads/master)\n+\tgit push testrepo :refs/heads/main &&\n+\t(cd testrepo && test_must_fail git rev-parse --verify refs/heads/main)\n \n '\n \n test_expect_success 'pushing valid refs triggers post-receive and post-update hooks' '\n-\tmk_test_with_hooks testrepo heads/master heads/next &&\n-\torgmaster=$(cd testrepo && git show-ref -s --verify refs/heads/master) &&\n-\tnewmaster=$(git show-ref -s --verify refs/heads/master) &&\n+\tmk_test_with_hooks testrepo heads/main heads/next &&\n+\torgmain=$(cd testrepo && git show-ref -s --verify refs/heads/main) &&\n+\tnewmain=$(git show-ref -s --verify refs/heads/main) &&\n \torgnext=$(cd testrepo && git show-ref -s --verify refs/heads/next) &&\n \tnewnext=$ZERO_OID &&\n-\tgit push testrepo refs/heads/master:refs/heads/master :refs/heads/next &&\n+\tgit push testrepo refs/heads/main:refs/heads/main :refs/heads/next &&\n \t(\n \t\tcd testrepo/.git &&\n \t\tcat >pre-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\t$orgnext $newnext refs/heads/next\n \t\tEOF\n \n \t\tcat >update.expect <<-EOF &&\n-\t\trefs/heads/master $orgmaster $newmaster\n+\t\trefs/heads/main $orgmain $newmain\n \t\trefs/heads/next $orgnext $newnext\n \t\tEOF\n \n \t\tcat >post-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\t$orgnext $newnext refs/heads/next\n \t\tEOF\n \n \t\tcat >post-update.expect <<-EOF &&\n-\t\trefs/heads/master\n+\t\trefs/heads/main\n \t\trefs/heads/next\n \t\tEOF\n \n@@ -666,25 +666,25 @@ test_expect_success 'pushing valid refs triggers post-receive and post-update ho\n '\n \n test_expect_success 'deleting dangling ref triggers hooks with correct args' '\n-\tmk_test_with_hooks testrepo heads/master &&\n+\tmk_test_with_hooks testrepo heads/main &&\n \trm -f testrepo/.git/objects/??/* &&\n-\tgit push testrepo :refs/heads/master &&\n+\tgit push testrepo :refs/heads/main &&\n \t(\n \t\tcd testrepo/.git &&\n \t\tcat >pre-receive.expect <<-EOF &&\n-\t\t$ZERO_OID $ZERO_OID refs/heads/master\n+\t\t$ZERO_OID $ZERO_OID refs/heads/main\n \t\tEOF\n \n \t\tcat >update.expect <<-EOF &&\n-\t\trefs/heads/master $ZERO_OID $ZERO_OID\n+\t\trefs/heads/main $ZERO_OID $ZERO_OID\n \t\tEOF\n \n \t\tcat >post-receive.expect <<-EOF &&\n-\t\t$ZERO_OID $ZERO_OID refs/heads/master\n+\t\t$ZERO_OID $ZERO_OID refs/heads/main\n \t\tEOF\n \n \t\tcat >post-update.expect <<-EOF &&\n-\t\trefs/heads/master\n+\t\trefs/heads/main\n \t\tEOF\n \n \t\ttest_cmp pre-receive.expect pre-receive.actual &&\n@@ -695,28 +695,28 @@ test_expect_success 'deleting dangling ref triggers hooks with correct args' '\n '\n \n test_expect_success 'deletion of a non-existent ref is not fed to post-receive and post-update hooks' '\n-\tmk_test_with_hooks testrepo heads/master &&\n-\torgmaster=$(cd testrepo && git show-ref -s --verify refs/heads/master) &&\n-\tnewmaster=$(git show-ref -s --verify refs/heads/master) &&\n-\tgit push testrepo master :refs/heads/nonexistent &&\n+\tmk_test_with_hooks testrepo heads/main &&\n+\torgmain=$(cd testrepo && git show-ref -s --verify refs/heads/main) &&\n+\tnewmain=$(git show-ref -s --verify refs/heads/main) &&\n+\tgit push testrepo main :refs/heads/nonexistent &&\n \t(\n \t\tcd testrepo/.git &&\n \t\tcat >pre-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\t$ZERO_OID $ZERO_OID refs/heads/nonexistent\n \t\tEOF\n \n \t\tcat >update.expect <<-EOF &&\n-\t\trefs/heads/master $orgmaster $newmaster\n+\t\trefs/heads/main $orgmain $newmain\n \t\trefs/heads/nonexistent $ZERO_OID $ZERO_OID\n \t\tEOF\n \n \t\tcat >post-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\tEOF\n \n \t\tcat >post-update.expect <<-EOF &&\n-\t\trefs/heads/master\n+\t\trefs/heads/main\n \t\tEOF\n \n \t\ttest_cmp pre-receive.expect pre-receive.actual &&\n@@ -727,7 +727,7 @@ test_expect_success 'deletion of a non-existent ref is not fed to post-receive a\n '\n \n test_expect_success 'deletion of a non-existent ref alone does trigger post-receive and post-update hooks' '\n-\tmk_test_with_hooks testrepo heads/master &&\n+\tmk_test_with_hooks testrepo heads/main &&\n \tgit push testrepo :refs/heads/nonexistent &&\n \t(\n \t\tcd testrepo/.git &&\n@@ -747,40 +747,40 @@ test_expect_success 'deletion of a non-existent ref alone does trigger post-rece\n '\n \n test_expect_success 'mixed ref updates, deletes, invalid deletes trigger hooks with correct input' '\n-\tmk_test_with_hooks testrepo heads/master heads/next heads/seen &&\n-\torgmaster=$(cd testrepo && git show-ref -s --verify refs/heads/master) &&\n-\tnewmaster=$(git show-ref -s --verify refs/heads/master) &&\n+\tmk_test_with_hooks testrepo heads/main heads/next heads/seen &&\n+\torgmain=$(cd testrepo && git show-ref -s --verify refs/heads/main) &&\n+\tnewmain=$(git show-ref -s --verify refs/heads/main) &&\n \torgnext=$(cd testrepo && git show-ref -s --verify refs/heads/next) &&\n \tnewnext=$ZERO_OID &&\n \torgseen=$(cd testrepo && git show-ref -s --verify refs/heads/seen) &&\n-\tnewseen=$(git show-ref -s --verify refs/heads/master) &&\n-\tgit push testrepo refs/heads/master:refs/heads/master \\\n-\t    refs/heads/master:refs/heads/seen :refs/heads/next \\\n+\tnewseen=$(git show-ref -s --verify refs/heads/main) &&\n+\tgit push testrepo refs/heads/main:refs/heads/main \\\n+\t    refs/heads/main:refs/heads/seen :refs/heads/next \\\n \t    :refs/heads/nonexistent &&\n \t(\n \t\tcd testrepo/.git &&\n \t\tcat >pre-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\t$orgnext $newnext refs/heads/next\n \t\t$orgseen $newseen refs/heads/seen\n \t\t$ZERO_OID $ZERO_OID refs/heads/nonexistent\n \t\tEOF\n \n \t\tcat >update.expect <<-EOF &&\n-\t\trefs/heads/master $orgmaster $newmaster\n+\t\trefs/heads/main $orgmain $newmain\n \t\trefs/heads/next $orgnext $newnext\n \t\trefs/heads/seen $orgseen $newseen\n \t\trefs/heads/nonexistent $ZERO_OID $ZERO_OID\n \t\tEOF\n \n \t\tcat >post-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\t$orgnext $newnext refs/heads/next\n \t\t$orgseen $newseen refs/heads/seen\n \t\tEOF\n \n \t\tcat >post-update.expect <<-EOF &&\n-\t\trefs/heads/master\n+\t\trefs/heads/main\n \t\trefs/heads/next\n \t\trefs/heads/seen\n \t\tEOF\n@@ -793,15 +793,15 @@ test_expect_success 'mixed ref updates, deletes, invalid deletes trigger hooks w\n '\n \n test_expect_success 'allow deleting a ref using --delete' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \t(cd testrepo && git config receive.denyDeleteCurrent warn) &&\n-\tgit push testrepo --delete master &&\n-\t(cd testrepo && test_must_fail git rev-parse --verify refs/heads/master)\n+\tgit push testrepo --delete main &&\n+\t(cd testrepo && test_must_fail git rev-parse --verify refs/heads/main)\n '\n \n test_expect_success 'allow deleting a tag using --delete' '\n-\tmk_test testrepo heads/master &&\n-\tgit tag -a -m dummy_message deltag heads/master &&\n+\tmk_test testrepo heads/main &&\n+\tgit tag -a -m dummy_message deltag heads/main &&\n \tgit push testrepo --tags &&\n \t(cd testrepo && git rev-parse --verify -q refs/tags/deltag) &&\n \tgit push testrepo --delete tag deltag &&\n@@ -809,56 +809,56 @@ test_expect_success 'allow deleting a tag using --delete' '\n '\n \n test_expect_success 'push --delete without args aborts' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \ttest_must_fail git push testrepo --delete\n '\n \n test_expect_success 'push --delete refuses src:dest refspecs' '\n-\tmk_test testrepo heads/master &&\n-\ttest_must_fail git push testrepo --delete master:foo\n+\tmk_test testrepo heads/main &&\n+\ttest_must_fail git push testrepo --delete main:foo\n '\n \n test_expect_success 'warn on push to HEAD of non-bare repository' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit config receive.denyCurrentBranch warn\n \t) &&\n-\tgit push testrepo master 2>stderr &&\n+\tgit push testrepo main 2>stderr &&\n \tgrep \"warning: updating the current branch\" stderr\n '\n \n test_expect_success 'deny push to HEAD of non-bare repository' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit config receive.denyCurrentBranch true\n \t) &&\n-\ttest_must_fail git push testrepo master\n+\ttest_must_fail git push testrepo main\n '\n \n test_expect_success 'allow push to HEAD of bare repository (bare)' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit config receive.denyCurrentBranch true &&\n \t\tgit config core.bare true\n \t) &&\n-\tgit push testrepo master 2>stderr &&\n+\tgit push testrepo main 2>stderr &&\n \t! grep \"warning: updating the current branch\" stderr\n '\n \n test_expect_success 'allow push to HEAD of non-bare repository (config)' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit config receive.denyCurrentBranch false\n \t) &&\n-\tgit push testrepo master 2>stderr &&\n+\tgit push testrepo main 2>stderr &&\n \t! grep \"warning: updating the current branch\" stderr\n '\n \n@@ -874,7 +874,7 @@ test_expect_success 'fetch with branches' '\n \t\tgit for-each-ref refs/heads >actual &&\n \t\ttest_cmp expect actual\n \t) &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'fetch with branches containing #' '\n@@ -887,7 +887,7 @@ test_expect_success 'fetch with branches containing #' '\n \t\tgit for-each-ref refs/heads >actual &&\n \t\ttest_cmp expect actual\n \t) &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'push with branches' '\n@@ -897,7 +897,7 @@ test_expect_success 'push with branches' '\n \tgit push branch1 &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_first_commit commit\trefs/heads/master\" >expect &&\n+\t\techo \"$the_first_commit commit\trefs/heads/main\" >expect &&\n \t\tgit for-each-ref refs/heads >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -913,11 +913,11 @@ test_expect_success 'push with branches containing #' '\n \t\tgit for-each-ref refs/heads >actual &&\n \t\ttest_cmp expect actual\n \t) &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'push into aliased refs (consistent)' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child1 &&\n \tmk_child testrepo child2 &&\n \t(\n@@ -939,7 +939,7 @@ test_expect_success 'push into aliased refs (consistent)' '\n '\n \n test_expect_success 'push into aliased refs (inconsistent)' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child1 &&\n \tmk_child testrepo child2 &&\n \t(\n@@ -970,7 +970,7 @@ test_force_push_tag () {\n \ttag_args=$2\n \n \ttest_expect_success \"force pushing required to update $tag_type_description\" \"\n-\t\tmk_test testrepo heads/master &&\n+\t\tmk_test testrepo heads/main &&\n \t\tmk_child testrepo child1 &&\n \t\tmk_child testrepo child2 &&\n \t\t(\n@@ -1016,7 +1016,7 @@ test_force_fetch_tag () {\n \ttag_args=$2\n \n \ttest_expect_success \"fetch will not clobber an existing $tag_type_description without --force\" \"\n-\t\tmk_test testrepo heads/master &&\n+\t\tmk_test testrepo heads/main &&\n \t\tmk_child testrepo child1 &&\n \t\tmk_child testrepo child2 &&\n \t\t(\n@@ -1039,12 +1039,12 @@ test_force_fetch_tag \"annotated tag\" \"-f -a -m'tag message'\"\n test_expect_success 'push --porcelain' '\n \tmk_empty testrepo &&\n \techo >.git/foo  \"To testrepo\" &&\n-\techo >>.git/foo \"*\trefs/heads/master:refs/remotes/origin/master\t[new reference]\"  &&\n+\techo >>.git/foo \"*\trefs/heads/main:refs/remotes/origin/main\t[new reference]\"  &&\n \techo >>.git/foo \"Done\" &&\n-\tgit push >.git/bar --porcelain  testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push >.git/bar --porcelain  testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t) &&\n@@ -1053,52 +1053,52 @@ test_expect_success 'push --porcelain' '\n \n test_expect_success 'push --porcelain bad url' '\n \tmk_empty testrepo &&\n-\ttest_must_fail git push >.git/bar --porcelain asdfasdfasd refs/heads/master:refs/remotes/origin/master &&\n+\ttest_must_fail git push >.git/bar --porcelain asdfasdfasd refs/heads/main:refs/remotes/origin/main &&\n \t! grep -q Done .git/bar\n '\n \n test_expect_success 'push --porcelain rejected' '\n \tmk_empty testrepo &&\n-\tgit push testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(cd testrepo &&\n-\t\tgit reset --hard origin/master^ &&\n+\t\tgit reset --hard origin/main^ &&\n \t\tgit config receive.denyCurrentBranch true) &&\n \n \techo >.git/foo  \"To testrepo\"  &&\n-\techo >>.git/foo \"!\trefs/heads/master:refs/heads/master\t[remote rejected] (branch is currently checked out)\" &&\n+\techo >>.git/foo \"!\trefs/heads/main:refs/heads/main\t[remote rejected] (branch is currently checked out)\" &&\n \techo >>.git/foo \"Done\" &&\n \n-\ttest_must_fail git push >.git/bar --porcelain  testrepo refs/heads/master:refs/heads/master &&\n+\ttest_must_fail git push >.git/bar --porcelain  testrepo refs/heads/main:refs/heads/main &&\n \ttest_cmp .git/foo .git/bar\n '\n \n test_expect_success 'push --porcelain --dry-run rejected' '\n \tmk_empty testrepo &&\n-\tgit push testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(cd testrepo &&\n-\t\tgit reset --hard origin/master &&\n+\t\tgit reset --hard origin/main &&\n \t\tgit config receive.denyCurrentBranch true) &&\n \n \techo >.git/foo  \"To testrepo\"  &&\n-\techo >>.git/foo \"!\trefs/heads/master^:refs/heads/master\t[rejected] (non-fast-forward)\" &&\n+\techo >>.git/foo \"!\trefs/heads/main^:refs/heads/main\t[rejected] (non-fast-forward)\" &&\n \techo >>.git/foo \"Done\" &&\n \n-\ttest_must_fail git push >.git/bar --porcelain  --dry-run testrepo refs/heads/master^:refs/heads/master &&\n+\ttest_must_fail git push >.git/bar --porcelain  --dry-run testrepo refs/heads/main^:refs/heads/main &&\n \ttest_cmp .git/foo .git/bar\n '\n \n test_expect_success 'push --prune' '\n-\tmk_test testrepo heads/master heads/second heads/foo heads/bar &&\n+\tmk_test testrepo heads/main heads/second heads/foo heads/bar &&\n \tgit push --prune testrepo : &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n \tcheck_push_result testrepo $the_first_commit heads/second &&\n \t! check_push_result testrepo $the_first_commit heads/foo heads/bar\n '\n \n test_expect_success 'push --prune refspec' '\n-\tmk_test testrepo tmp/master tmp/second tmp/foo tmp/bar &&\n+\tmk_test testrepo tmp/main tmp/second tmp/foo tmp/bar &&\n \tgit push --prune testrepo \"refs/heads/*:refs/tmp/*\" &&\n-\tcheck_push_result testrepo $the_commit tmp/master &&\n+\tcheck_push_result testrepo $the_commit tmp/main &&\n \tcheck_push_result testrepo $the_first_commit tmp/second &&\n \t! check_push_result testrepo $the_first_commit tmp/foo tmp/bar\n '\n@@ -1106,18 +1106,18 @@ test_expect_success 'push --prune refspec' '\n for configsection in transfer receive\n do\n \ttest_expect_success \"push to update a ref hidden by $configsection.hiderefs\" '\n-\t\tmk_test testrepo heads/master hidden/one hidden/two hidden/three &&\n+\t\tmk_test testrepo heads/main hidden/one hidden/two hidden/three &&\n \t\t(\n \t\t\tcd testrepo &&\n \t\t\tgit config $configsection.hiderefs refs/hidden\n \t\t) &&\n \n \t\t# push to unhidden ref succeeds normally\n-\t\tgit push testrepo master:refs/heads/master &&\n-\t\tcheck_push_result testrepo $the_commit heads/master &&\n+\t\tgit push testrepo main:refs/heads/main &&\n+\t\tcheck_push_result testrepo $the_commit heads/main &&\n \n \t\t# push to update a hidden ref should fail\n-\t\ttest_must_fail git push testrepo master:refs/hidden/one &&\n+\t\ttest_must_fail git push testrepo main:refs/hidden/one &&\n \t\tcheck_push_result testrepo $the_first_commit hidden/one &&\n \n \t\t# push to delete a hidden ref should fail\n@@ -1131,8 +1131,8 @@ do\n done\n \n test_expect_success 'fetch exact SHA1' '\n-\tmk_test testrepo heads/master hidden/one &&\n-\tgit push testrepo master:refs/hidden/one &&\n+\tmk_test testrepo heads/main hidden/one &&\n+\tgit push testrepo main:refs/hidden/one &&\n \t(\n \t\tcd testrepo &&\n \t\tgit config transfer.hiderefs refs/hidden\n@@ -1163,7 +1163,7 @@ test_expect_success 'fetch exact SHA1' '\n \t\t\tgit config uploadpack.allowtipsha1inwant true\n \t\t) &&\n \n-\t\tgit fetch -v ../testrepo $the_commit:refs/heads/copy master:refs/heads/extra &&\n+\t\tgit fetch -v ../testrepo $the_commit:refs/heads/copy main:refs/heads/extra &&\n \t\tcat >expect <<-EOF &&\n \t\t$the_commit\n \t\t$the_first_commit\n@@ -1177,8 +1177,8 @@ test_expect_success 'fetch exact SHA1' '\n '\n \n test_expect_success 'fetch exact SHA1 in protocol v2' '\n-\tmk_test testrepo heads/master hidden/one &&\n-\tgit push testrepo master:refs/hidden/one &&\n+\tmk_test testrepo heads/main hidden/one &&\n+\tgit push testrepo main:refs/hidden/one &&\n \tgit -C testrepo config transfer.hiderefs refs/hidden &&\n \tcheck_push_result testrepo $the_commit hidden/one &&\n \n@@ -1260,17 +1260,17 @@ do\n done\n \n test_expect_success 'fetch follows tags by default' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit tag -m \"annotated\" tag &&\n \t\tgit for-each-ref >tmp1 &&\n \t\t(\n \t\t\tcat tmp1\n-\t\t\tsed -n \"s|refs/heads/master$|refs/remotes/origin/master|p\" tmp1\n+\t\t\tsed -n \"s|refs/heads/main$|refs/remotes/origin/main|p\" tmp1\n \t\t) |\n \t\tsort -k 3 >../expect\n \t) &&\n@@ -1278,8 +1278,8 @@ test_expect_success 'fetch follows tags by default' '\n \t(\n \t\tcd dst &&\n \t\tgit remote add origin ../src &&\n-\t\tgit config branch.master.remote origin &&\n-\t\tgit config branch.master.merge refs/heads/master &&\n+\t\tgit config branch.main.remote origin &&\n+\t\tgit config branch.main.merge refs/heads/main &&\n \t\tgit pull &&\n \t\tgit for-each-ref >../actual\n \t) &&\n@@ -1298,74 +1298,74 @@ test_expect_success 'peeled advertisements are not considered ref tips' '\n '\n \n test_expect_success 'pushing a specific ref applies remote.$name.push as refmap' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \tgit init --bare dst &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit branch next &&\n \t\tgit config remote.dst.url ../dst &&\n \t\tgit config remote.dst.push \"+refs/heads/*:refs/remotes/src/*\" &&\n-\t\tgit push dst master &&\n-\t\tgit show-ref refs/heads/master |\n+\t\tgit push dst main &&\n+\t\tgit show-ref refs/heads/main |\n \t\tsed -e \"s|refs/heads/|refs/remotes/src/|\" >../dst/expect\n \t) &&\n \t(\n \t\tcd dst &&\n \t\ttest_must_fail git show-ref refs/heads/next &&\n-\t\ttest_must_fail git show-ref refs/heads/master &&\n-\t\tgit show-ref refs/remotes/src/master >actual\n+\t\ttest_must_fail git show-ref refs/heads/main &&\n+\t\tgit show-ref refs/remotes/src/main >actual\n \t) &&\n \ttest_cmp dst/expect dst/actual\n '\n \n test_expect_success 'with no remote.$name.push, it is not used as refmap' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \tgit init --bare dst &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit branch next &&\n \t\tgit config remote.dst.url ../dst &&\n \t\tgit config push.default matching &&\n-\t\tgit push dst master &&\n-\t\tgit show-ref refs/heads/master >../dst/expect\n+\t\tgit push dst main &&\n+\t\tgit show-ref refs/heads/main >../dst/expect\n \t) &&\n \t(\n \t\tcd dst &&\n \t\ttest_must_fail git show-ref refs/heads/next &&\n-\t\tgit show-ref refs/heads/master >actual\n+\t\tgit show-ref refs/heads/main >actual\n \t) &&\n \ttest_cmp dst/expect dst/actual\n '\n \n test_expect_success 'with no remote.$name.push, upstream mapping is used' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \tgit init --bare dst &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit branch next &&\n \t\tgit config remote.dst.url ../dst &&\n \t\tgit config remote.dst.fetch \"+refs/heads/*:refs/remotes/dst/*\" &&\n \t\tgit config push.default upstream &&\n \n-\t\tgit config branch.master.merge refs/heads/trunk &&\n-\t\tgit config branch.master.remote dst &&\n+\t\tgit config branch.main.merge refs/heads/trunk &&\n+\t\tgit config branch.main.remote dst &&\n \n-\t\tgit push dst master &&\n-\t\tgit show-ref refs/heads/master |\n-\t\tsed -e \"s|refs/heads/master|refs/heads/trunk|\" >../dst/expect\n+\t\tgit push dst main &&\n+\t\tgit show-ref refs/heads/main |\n+\t\tsed -e \"s|refs/heads/main|refs/heads/trunk|\" >../dst/expect\n \t) &&\n \t(\n \t\tcd dst &&\n-\t\ttest_must_fail git show-ref refs/heads/master &&\n+\t\ttest_must_fail git show-ref refs/heads/main &&\n \t\ttest_must_fail git show-ref refs/heads/next &&\n \t\tgit show-ref refs/heads/trunk >actual\n \t) &&\n@@ -1373,20 +1373,20 @@ test_expect_success 'with no remote.$name.push, upstream mapping is used' '\n '\n \n test_expect_success 'push does not follow tags by default' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \tgit init --bare dst &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit tag -m \"annotated\" tag &&\n \t\tgit checkout -b another &&\n \t\tgit commit --allow-empty -m \"future commit\" &&\n \t\tgit tag -m \"future\" future &&\n-\t\tgit checkout master &&\n-\t\tgit for-each-ref refs/heads/master >../expect &&\n-\t\tgit push ../dst master\n+\t\tgit checkout main &&\n+\t\tgit for-each-ref refs/heads/main >../expect &&\n+\t\tgit push ../dst main\n \t) &&\n \t(\n \t\tcd dst &&\n@@ -1396,20 +1396,20 @@ test_expect_success 'push does not follow tags by default' '\n '\n \n test_expect_success 'push --follow-tags only pushes relevant tags' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \tgit init --bare dst &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit tag -m \"annotated\" tag &&\n \t\tgit checkout -b another &&\n \t\tgit commit --allow-empty -m \"future commit\" &&\n \t\tgit tag -m \"future\" future &&\n-\t\tgit checkout master &&\n-\t\tgit for-each-ref refs/heads/master refs/tags/tag >../expect &&\n-\t\tgit push --follow-tags ../dst master\n+\t\tgit checkout main &&\n+\t\tgit for-each-ref refs/heads/main refs/tags/tag >../expect &&\n+\t\tgit push --follow-tags ../dst main\n \t) &&\n \t(\n \t\tcd dst &&\n@@ -1427,12 +1427,12 @@ EOF\n \tgit commit -am initial &&\n \tgit init no-thin &&\n \tgit --git-dir=no-thin/.git config receive.unpacklimit 0 &&\n-\tgit push no-thin/.git refs/heads/master:refs/heads/foo &&\n+\tgit push no-thin/.git refs/heads/main:refs/heads/foo &&\n \techo modified >> path1 &&\n \tgit commit -am modified &&\n \tgit repack -adf &&\n \trcvpck=\"git receive-pack --reject-thin-pack-for-testing\" &&\n-\tgit push --no-thin --receive-pack=\"$rcvpck\" no-thin/.git refs/heads/master:refs/heads/foo\n+\tgit push --no-thin --receive-pack=\"$rcvpck\" no-thin/.git refs/heads/main:refs/heads/foo\n '\n \n test_expect_success 'pushing a tag pushes the tagged object' '\n@@ -1455,12 +1455,12 @@ test_expect_success 'push into bare respects core.logallrefupdates' '\n \n \t# double push to test both with and without\n \t# the actual pack transfer\n-\tgit push dst.git master:one &&\n+\tgit push dst.git main:one &&\n \techo \"one@{0} push\" >expect &&\n \tgit -C dst.git log -g --format=\"%gd %gs\" one >actual &&\n \ttest_cmp expect actual &&\n \n-\tgit push dst.git master:two &&\n+\tgit push dst.git main:two &&\n \techo \"two@{0} push\" >expect &&\n \tgit -C dst.git log -g --format=\"%gd %gs\" two >actual &&\n \ttest_cmp expect actual\n@@ -1475,20 +1475,20 @@ test_expect_success 'fetch into bare respects core.logallrefupdates' '\n \n \t\t# as above, we double-fetch to test both\n \t\t# with and without pack transfer\n-\t\tgit fetch .. master:one &&\n-\t\techo \"one@{0} fetch .. master:one: storing head\" >expect &&\n+\t\tgit fetch .. main:one &&\n+\t\techo \"one@{0} fetch .. main:one: storing head\" >expect &&\n \t\tgit log -g --format=\"%gd %gs\" one >actual &&\n \t\ttest_cmp expect actual &&\n \n-\t\tgit fetch .. master:two &&\n-\t\techo \"two@{0} fetch .. master:two: storing head\" >expect &&\n+\t\tgit fetch .. main:two &&\n+\t\techo \"two@{0} fetch .. main:two: storing head\" >expect &&\n \t\tgit log -g --format=\"%gd %gs\" two >actual &&\n \t\ttest_cmp expect actual\n \t)\n '\n \n test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n-\tgit push testrepo master &&\n+\tgit push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\tgit reset --hard &&\n@@ -1497,7 +1497,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \ttest_commit third path2 &&\n \n \t# Try pushing into a repository with pristine working tree\n-\tgit push testrepo master &&\n+\tgit push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\tgit update-index -q --refresh &&\n@@ -1514,7 +1514,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\ttest $(git -C .. rev-parse HEAD^) = $(git rev-parse HEAD) &&\n \t\ttest-tool chmtime +100 path1\n \t) &&\n-\tgit push testrepo master &&\n+\tgit push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\tgit update-index -q --refresh &&\n@@ -1534,7 +1534,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\tcd testrepo &&\n \t\techo changed >path1\n \t) &&\n-\ttest_must_fail git push testrepo master &&\n+\ttest_must_fail git push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest $(git -C .. rev-parse HEAD^) = $(git rev-parse HEAD) &&\n@@ -1548,7 +1548,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\techo changed >path1 &&\n \t\tgit add path1\n \t) &&\n-\ttest_must_fail git push testrepo master &&\n+\ttest_must_fail git push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest $(git -C .. rev-parse HEAD^) = $(git rev-parse HEAD) &&\n@@ -1565,7 +1565,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\tgit reset --hard &&\n \t\techo changed >path3\n \t) &&\n-\ttest_must_fail git push testrepo master &&\n+\ttest_must_fail git push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest $(git -C .. rev-parse HEAD^^) = $(git rev-parse HEAD) &&\n@@ -1581,7 +1581,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\techo fifth >path3 &&\n \t\tgit add path3\n \t) &&\n-\ttest_must_fail git push testrepo master &&\n+\ttest_must_fail git push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest $(git -C .. rev-parse HEAD^^) = $(git rev-parse HEAD) &&\n@@ -1596,17 +1596,17 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\tcd void &&\n \t\tgit config receive.denyCurrentBranch updateInstead\n \t) &&\n-\tgit push void master &&\n+\tgit push void main &&\n \t(\n \t\tcd void &&\n-\t\ttest $(git -C .. rev-parse master) = $(git rev-parse HEAD) &&\n+\t\ttest $(git -C .. rev-parse main) = $(git rev-parse HEAD) &&\n \t\tgit diff --quiet &&\n \t\tgit diff --cached --quiet\n \t) &&\n \n \t# (6) updateInstead intervened by fast-forward check\n-\ttest_must_fail git push void master^:master &&\n-\ttest $(git -C void rev-parse HEAD) = $(git rev-parse master) &&\n+\ttest_must_fail git push void main^:main &&\n+\ttest $(git -C void rev-parse HEAD) = $(git rev-parse main) &&\n \tgit -C void diff --quiet &&\n \tgit -C void diff --cached --quiet\n '\n@@ -1616,7 +1616,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '\n \tgit init testrepo &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit pull .. master &&\n+\t\tgit pull .. main &&\n \t\tgit reset --hard HEAD^^ &&\n \t\tgit tag initial &&\n \t\tgit config receive.denyCurrentBranch updateInstead &&\n@@ -1634,7 +1634,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '\n \t) &&\n \n \t# Try pushing into a pristine\n-\tgit push testrepo master &&\n+\tgit push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\tgit diff --quiet &&\n@@ -1648,7 +1648,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '\n \t\tgit reset --hard initial &&\n \t\techo conflicting >path2\n \t) &&\n-\ttest_must_fail git push testrepo master &&\n+\ttest_must_fail git push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest $(git rev-parse initial) = $(git rev-parse HEAD) &&\n@@ -1664,7 +1664,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '\n \t\techo irrelevant >path5 &&\n \t\tgit add path5\n \t) &&\n-\tgit push testrepo master &&\n+\tgit push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest \"$(cat path1)\" = unrelated &&\n@@ -1704,7 +1704,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '\n \t\tEOF\n \t) &&\n \n-\tgit push void master &&\n+\tgit push void main &&\n \t(\n \t\tcd void &&\n \t\tgit diff --quiet &&\ndiff --git a/t/t5517-push-mirror.sh b/t/t5517-push-mirror.sh\nindex e4edd56404..a4b11495c6 100755\n--- a/t/t5517-push-mirror.sh\n+++ b/t/t5517-push-mirror.sh\n@@ -15,16 +15,16 @@ invert () {\n }\n \n mk_repo_pair () {\n-\trm -rf master mirror &&\n+\trm -rf main mirror &&\n \tmkdir mirror &&\n \t(\n \t\tcd mirror &&\n \t\tgit init &&\n \t\tgit config receive.denyCurrentBranch warn\n \t) &&\n-\tmkdir master &&\n+\tmkdir main &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\tgit init &&\n \t\tgit remote add $1 up ../mirror\n \t)\n@@ -36,13 +36,13 @@ test_expect_success 'push mirror creates new branches' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/heads/master) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/heads/main) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/heads/main) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -50,15 +50,15 @@ test_expect_success 'push mirror updates existing branches' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit push --mirror up &&\n \t\techo two >foo && git add foo && git commit -m two &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/heads/master) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/heads/main) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/heads/main) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -66,7 +66,7 @@ test_expect_success 'push mirror force updates existing branches' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit push --mirror up &&\n \t\techo two >foo && git add foo && git commit -m two &&\n@@ -74,9 +74,9 @@ test_expect_success 'push mirror force updates existing branches' '\n \t\tgit reset --hard HEAD^ &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/heads/master) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/heads/main) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/heads/main) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -84,9 +84,9 @@ test_expect_success 'push mirror removes branches' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit branch remove master &&\n+\t\tgit branch remove main &&\n \t\tgit push --mirror up &&\n \t\tgit branch -D remove &&\n \t\tgit push --mirror up\n@@ -102,21 +102,21 @@ test_expect_success 'push mirror adds, updates and removes branches together' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit branch remove master &&\n+\t\tgit branch remove main &&\n \t\tgit push --mirror up &&\n \t\tgit branch -D remove &&\n-\t\tgit branch add master &&\n+\t\tgit branch add main &&\n \t\techo two >foo && git add foo && git commit -m two &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/heads/master) &&\n-\tmaster_add=$(cd master && git show-ref -s --verify refs/heads/add) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&\n+\tmain_main=$(cd main && git show-ref -s --verify refs/heads/main) &&\n+\tmain_add=$(cd main && git show-ref -s --verify refs/heads/add) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/heads/main) &&\n \tmirror_add=$(cd mirror && git show-ref -s --verify refs/heads/add) &&\n-\ttest \"$master_master\" = \"$mirror_master\" &&\n-\ttest \"$master_add\" = \"$mirror_add\" &&\n+\ttest \"$main_main\" = \"$mirror_main\" &&\n+\ttest \"$main_add\" = \"$mirror_add\" &&\n \t(\n \t\tcd mirror &&\n \t\tinvert git show-ref -s --verify refs/heads/remove\n@@ -130,14 +130,14 @@ test_expect_success 'push mirror creates new tags' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/tags/tmain) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/tags/tmain) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -145,17 +145,17 @@ test_expect_success 'push mirror updates existing tags' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up &&\n \t\techo two >foo && git add foo && git commit -m two &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/tags/tmain) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/tags/tmain) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -163,20 +163,20 @@ test_expect_success 'push mirror force updates existing tags' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up &&\n \t\techo two >foo && git add foo && git commit -m two &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up &&\n \t\tgit reset --hard HEAD^ &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/tags/tmain) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/tags/tmain) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -184,9 +184,9 @@ test_expect_success 'push mirror removes tags' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit tag -f tremove master &&\n+\t\tgit tag -f tremove main &&\n \t\tgit push --mirror up &&\n \t\tgit tag -d tremove &&\n \t\tgit push --mirror up\n@@ -202,23 +202,23 @@ test_expect_success 'push mirror adds, updates and removes tags together' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit tag -f tmaster master &&\n-\t\tgit tag -f tremove master &&\n+\t\tgit tag -f tmain main &&\n+\t\tgit tag -f tremove main &&\n \t\tgit push --mirror up &&\n \t\tgit tag -d tremove &&\n-\t\tgit tag tadd master &&\n+\t\tgit tag tadd main &&\n \t\techo two >foo && git add foo && git commit -m two &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&\n-\tmaster_add=$(cd master && git show-ref -s --verify refs/tags/tadd) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&\n+\tmain_main=$(cd main && git show-ref -s --verify refs/tags/tmain) &&\n+\tmain_add=$(cd main && git show-ref -s --verify refs/tags/tadd) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/tags/tmain) &&\n \tmirror_add=$(cd mirror && git show-ref -s --verify refs/tags/tadd) &&\n-\ttest \"$master_master\" = \"$mirror_master\" &&\n-\ttest \"$master_add\" = \"$mirror_add\" &&\n+\ttest \"$main_main\" = \"$mirror_main\" &&\n+\ttest \"$main_add\" = \"$mirror_add\" &&\n \t(\n \t\tcd mirror &&\n \t\tinvert git show-ref -s --verify refs/tags/tremove\n@@ -230,10 +230,10 @@ test_expect_success 'remote.foo.mirror adds and removes branches' '\n \n \tmk_repo_pair --mirror &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit branch keep master &&\n-\t\tgit branch remove master &&\n+\t\tgit branch keep main &&\n+\t\tgit branch remove main &&\n \t\tgit push up &&\n \t\tgit branch -D remove &&\n \t\tgit push up\n@@ -250,10 +250,10 @@ test_expect_success 'remote.foo.mirror=no has no effect' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit config --add remote.up.mirror no &&\n-\t\tgit branch keep master &&\n+\t\tgit branch keep main &&\n \t\tgit push --mirror up &&\n \t\tgit branch -D keep &&\n \t\tgit push up :\n@@ -268,10 +268,10 @@ test_expect_success 'remote.foo.mirror=no has no effect' '\n test_expect_success 'push to mirrored repository with refspec fails' '\n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit config --add remote.up.mirror true &&\n-\t\ttest_must_fail git push up master\n+\t\ttest_must_fail git push up main\n \t)\n '\n \ndiff --git a/t/t5518-fetch-exit-status.sh b/t/t5518-fetch-exit-status.sh\nindex c2060bb870..78ba5c290a 100755\n--- a/t/t5518-fetch-exit-status.sh\n+++ b/t/t5518-fetch-exit-status.sh\n@@ -17,20 +17,20 @@ test_expect_success setup '\n \techo side >file &&\n \tgit commit -a -m side &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo next >file &&\n \tgit commit -a -m next\n '\n \n test_expect_success 'non-fast-forward fetch' '\n \n-\ttest_must_fail git fetch . master:side\n+\ttest_must_fail git fetch . main:side\n \n '\n \n test_expect_success 'forced update' '\n \n-\tgit fetch . +master:side\n+\tgit fetch . +main:side\n \n '\n \ndiff --git a/t/t5519-push-alternates.sh b/t/t5519-push-alternates.sh\nindex 11fcd37700..1696eb5125 100755\n--- a/t/t5519-push-alternates.sh\n+++ b/t/t5519-push-alternates.sh\n@@ -17,7 +17,7 @@ test_expect_success setup '\n \t\t>file &&\n \t\tgit add . &&\n \t\tgit commit -m initial &&\n-\t\tgit push ../alice-pub master\n+\t\tgit push ../alice-pub main\n \t) &&\n \n \t# Project Bob is a fork of project Alice\n@@ -31,7 +31,7 @@ test_expect_success setup '\n \tgit clone alice-pub bob-work &&\n \t(\n \t\tcd bob-work &&\n-\t\tgit push ../bob-pub master\n+\t\tgit push ../bob-pub main\n \t)\n '\n \n@@ -54,7 +54,7 @@ test_expect_success 'bob fetches from alice, works and pushes' '\n \t\t# has at her public repository are available to it\n \t\t# via its alternates.\n \t\tcd bob-work &&\n-\t\tgit pull ../alice-pub master &&\n+\t\tgit pull ../alice-pub main &&\n \t\techo more bob >file &&\n \t\tgit commit -a -m third &&\n \t\tgit push ../bob-pub :\n@@ -93,7 +93,7 @@ test_expect_success 'alice works and pushes again' '\n test_expect_success 'bob works and pushes' '\n \t(\n \t\t# This time Bob does not pull from Alice, and\n-\t\t# the master branch at her public repository points\n+\t\t# the main branch at her public repository points\n \t\t# at a commit Bob does not know about.  This should\n \t\t# not prevent the push by Bob from succeeding.\n \t\tcd bob-work &&\n@@ -122,11 +122,11 @@ test_expect_success 'alice works and pushes yet again' '\n test_expect_success 'bob works and pushes again' '\n \t(\n \t\tcd alice-pub &&\n-\t\tgit cat-file commit master >../bob-work/commit\n+\t\tgit cat-file commit main >../bob-work/commit\n \t) &&\n \t(\n \t\t# This time Bob does not pull from Alice, and\n-\t\t# the master branch at her public repository points\n+\t\t# the main branch at her public repository points\n \t\t# at a commit Bob does not fully know about, but\n \t\t# he happens to have the commit object (but not the\n \t\t# necessary tree) in his repository from Alice.\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex ca86f666e6..a12a1993d0 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-4]*|5[0-4]*|550*)\n+[0-4]*|5[0-4]*|55[01]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409814","messageId":"8a2511b38e4938f02e99f65d42552899bd6e792c.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 15/28] t55[4-9]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:45Z","receivedAt":"2020-11-12T22:44:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -e 's/retsam/niam/g' \\\n\t\t-- t55[4-9]*.sh t556x*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nNote that t5541 uses the reversed `master` name: `retsam`. We replace it\nby the equivalent for `main`: `niam`.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5540-http-push-webdav.sh          |  8 +--\n t/t5541-http-push-smart.sh           | 40 +++++++-------\n t/t5542-push-http-shallow.sh         |  8 +--\n t/t5543-atomic-push.sh               | 80 +++++++++++++--------------\n t/t5545-push-options.sh              | 62 ++++++++++-----------\n t/t5548-push-porcelain.sh            | 64 +++++++++++-----------\n t/t5550-http-fetch-dumb.sh           | 20 +++----\n t/t5551-http-fetch-smart.sh          | 20 +++----\n t/t5552-skipping-fetch-negotiator.sh |  2 +-\n t/t5553-set-upstream.sh              | 82 ++++++++++++++--------------\n t/t5561-http-backend.sh              |  4 +-\n t/t556x_common                       |  8 +--\n t/t5570-git-daemon.sh                | 16 +++---\n t/t5571-pre-push-hook.sh             |  4 +-\n t/t5572-pull-submodule.sh            |  4 +-\n t/t5580-unc-paths.sh                 |  2 +-\n t/t5581-http-curl-verbose.sh         |  2 +-\n t/t5582-fetch-negative-refspec.sh    | 22 ++++----\n t/test-lib.sh                        |  2 +-\n 19 files changed, 225 insertions(+), 225 deletions(-)\n\ndiff --git a/t/t5540-http-push-webdav.sh b/t/t5540-http-push-webdav.sh\nindex 450321fddb..1973d8bb32 100755\n--- a/t/t5540-http-push-webdav.sh\n+++ b/t/t5540-http-push-webdav.sh\n@@ -71,7 +71,7 @@ test_expect_success 'push already up-to-date' '\n test_expect_success 'push to remote repository with unpacked refs' '\n \t(cd \"$HTTPD_DOCUMENT_ROOT_PATH\"/test_repo.git &&\n \t rm packed-refs &&\n-\t git update-ref refs/heads/master $ORIG_HEAD &&\n+\t git update-ref refs/heads/main $ORIG_HEAD &&\n \t git --bare update-server-info) &&\n \tgit push &&\n \t(cd \"$HTTPD_DOCUMENT_ROOT_PATH\"/test_repo.git &&\n@@ -91,7 +91,7 @@ test_expect_success 'http-push fetches unpacked objects' '\n \t git remote rm origin &&\n \t git reflog expire --expire=0 --all &&\n \t git prune &&\n-\t git push -f -v $HTTPD_URL/dumb/test_repo_unpacked.git master)\n+\t git push -f -v $HTTPD_URL/dumb/test_repo_unpacked.git main)\n '\n \n test_expect_success 'http-push fetches packed objects' '\n@@ -111,7 +111,7 @@ test_expect_success 'http-push fetches packed objects' '\n \t git remote remove origin &&\n \t git reflog expire --expire=0 --all &&\n \t git prune &&\n-\t git push -f -v $HTTPD_URL/dumb/test_repo_packed.git master)\n+\t git push -f -v $HTTPD_URL/dumb/test_repo_packed.git main)\n '\n \n test_expect_success 'create and delete remote branch' '\n@@ -163,7 +163,7 @@ test_expect_success 'PUT and MOVE sends object to URLs with SHA-1 hash suffix' '\n '\n \n test_http_push_nonff \"$HTTPD_DOCUMENT_ROOT_PATH\"/test_repo.git \\\n-\t\"$ROOT_PATH\"/test_repo_clone master\n+\t\"$ROOT_PATH\"/test_repo_clone main\n \n test_expect_success 'push to password-protected repository (user in URL)' '\n \ttest_commit pw-user &&\ndiff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh\nindex 187454f5dd..ae90ed230b 100755\n--- a/t/t5541-http-push-smart.sh\n+++ b/t/t5541-http-push-smart.sh\n@@ -142,23 +142,23 @@ test_expect_success 'used receive-pack service' '\n '\n \n test_http_push_nonff \"$HTTPD_DOCUMENT_ROOT_PATH\"/test_repo.git \\\n-\t\"$ROOT_PATH\"/test_repo_clone master \t\tsuccess\n+\t\"$ROOT_PATH\"/test_repo_clone main \t\tsuccess\n \n test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper' '\n \t# create a dissimilarly-named remote ref so that git is unable to match the\n \t# two refs (viz. local, remote) unless an explicit refspec is provided.\n-\tgit push origin master:retsam &&\n+\tgit push origin main:niam &&\n \n \techo \"change changed\" > path2 &&\n \tgit commit -a -m path2 --amend &&\n \n-\t# push master too; this ensures there is at least one '\"'push'\"' command to\n+\t# push main too; this ensures there is at least one '\"'push'\"' command to\n \t# the remote helper and triggers interaction with the helper.\n-\ttest_must_fail git push -v origin +master master:retsam >output 2>&1'\n+\ttest_must_fail git push -v origin +main main:niam >output 2>&1'\n \n test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper: remote output' '\n-\tgrep \"^ + [a-f0-9]*\\.\\.\\.[a-f0-9]* *master -> master (forced update)$\" output &&\n-\tgrep \"^ ! \\[rejected\\] *master -> retsam (non-fast-forward)$\" output\n+\tgrep \"^ + [a-f0-9]*\\.\\.\\.[a-f0-9]* *main -> main (forced update)$\" output &&\n+\tgrep \"^ ! \\[rejected\\] *main -> niam (non-fast-forward)$\" output\n '\n \n test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper: our output' '\n@@ -167,7 +167,7 @@ test_expect_success 'push fails for non-fast-forward refs unmatched by remote he\n '\n \n test_expect_success 'push (chunked)' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit commit path3 &&\n \tHEAD=$(git rev-parse --verify HEAD) &&\n \ttest_config http.postbuffer 4 &&\n@@ -177,9 +177,9 @@ test_expect_success 'push (chunked)' '\n \t test $HEAD = $(git rev-parse --verify HEAD))\n '\n \n-## References of remote: atomic1(1)            master(2) collateral(2) other(2)\n-## References of local :            atomic2(2) master(1) collateral(3) other(2) collateral1(3) atomic(1)\n-## Atomic push         :                       master(1) collateral(3)                         atomic(1)\n+## References of remote: atomic1(1)            main(2) collateral(2) other(2)\n+## References of local :            atomic2(2) main(1) collateral(3) other(2) collateral1(3) atomic(1)\n+## Atomic push         :                       main(1) collateral(3)                         atomic(1)\n test_expect_success 'push --atomic also prevents branch creation, reports collateral' '\n \t# Setup upstream repo - empty for now\n \td=$HTTPD_DOCUMENT_ROOT_PATH/atomic-branches.git &&\n@@ -192,15 +192,15 @@ test_expect_success 'push --atomic also prevents branch creation, reports collat\n \ttest_commit atomic2 &&\n \tgit branch collateral &&\n \tgit branch other &&\n-\tgit push \"$up\" atomic1 master collateral other &&\n+\tgit push \"$up\" atomic1 main collateral other &&\n \tgit tag -d atomic1 &&\n \n \t# collateral is a valid push, but should be failed by atomic push\n \tgit checkout collateral &&\n \ttest_commit collateral1 &&\n \n-\t# Make master incompatible with upstream to provoke atomic\n-\tgit checkout master &&\n+\t# Make main incompatible with upstream to provoke atomic\n+\tgit checkout main &&\n \tgit reset --hard HEAD^ &&\n \n \t# Add a new branch which should be failed by atomic push. This is a\n@@ -208,7 +208,7 @@ test_expect_success 'push --atomic also prevents branch creation, reports collat\n \tgit branch atomic &&\n \n \t# --atomic should cause entire push to be rejected\n-\ttest_must_fail git push --atomic \"$up\" master atomic collateral 2>output &&\n+\ttest_must_fail git push --atomic \"$up\" main atomic collateral 2>output &&\n \n \t# the new branch should not have been created upstream\n \ttest_must_fail git -C \"$d\" show-ref --verify refs/heads/atomic &&\n@@ -216,15 +216,15 @@ test_expect_success 'push --atomic also prevents branch creation, reports collat\n \t# upstream should still reflect atomic2, the last thing we pushed\n \t# successfully\n \tgit rev-parse atomic2 >expected &&\n-\t# on master...\n-\tgit -C \"$d\" rev-parse refs/heads/master >actual &&\n+\t# on main...\n+\tgit -C \"$d\" rev-parse refs/heads/main >actual &&\n \ttest_cmp expected actual &&\n \t# ...and collateral.\n \tgit -C \"$d\" rev-parse refs/heads/collateral >actual &&\n \ttest_cmp expected actual &&\n \n \t# the failed refs should be indicated to the user\n-\tgrep \"^ ! .*rejected.* master -> master\" output &&\n+\tgrep \"^ ! .*rejected.* main -> main\" output &&\n \n \t# the collateral failure refs should be indicated to the user\n \tgrep \"^ ! .*rejected.* atomic -> atomic .*atomic push failed\" output &&\n@@ -472,9 +472,9 @@ test_expect_success 'clone/fetch scrubs password from reflogs' '\n \ttest_commit prepare-for-force-fetch &&\n \tgit switch -c away &&\n \tgit fetch \"$HTTPD_URL_USER_PASS/smart/test_repo.git\" \\\n-\t\t+master:master &&\n+\t\t+main:main &&\n \t# should have been scrubbed down to vanilla URL\n-\tgit log -g master >reflog &&\n+\tgit log -g main >reflog &&\n \tgrep \"$HTTPD_URL\" reflog &&\n \t! grep \"$HTTPD_URL_USER_PASS\" reflog\n '\n@@ -498,7 +498,7 @@ test_expect_success 'colorize errors/hints' '\n \tcd \"$ROOT_PATH\"/test_repo_clone &&\n \ttest_must_fail git -c color.transport=always -c color.advice=always \\\n \t\t-c color.push=always \\\n-\t\tpush origin origin/master^:master 2>act &&\n+\t\tpush origin origin/main^:main 2>act &&\n \ttest_decode_color <act >decoded &&\n \ttest_i18ngrep \"<RED>.*rejected.*<RESET>\" decoded &&\n \ttest_i18ngrep \"<RED>error: failed to push some refs\" decoded &&\ndiff --git a/t/t5542-push-http-shallow.sh b/t/t5542-push-http-shallow.sh\nindex ddc1db722d..0d8f5219da 100755\n--- a/t/t5542-push-http-shallow.sh\n+++ b/t/t5542-push-http-shallow.sh\n@@ -51,12 +51,12 @@ test_expect_success 'push to shallow repo via http' '\n \t(\n \tcd full &&\n \tcommit 9 &&\n-\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master\n+\tgit push $HTTPD_URL/smart/repo.git +main:refs/remotes/top/main\n \t) &&\n \t(\n \tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n \tgit fsck &&\n-\tgit log --format=%s top/master >actual &&\n+\tgit log --format=%s top/main >actual &&\n \tcat <<EOF >expect &&\n 9\n 4\n@@ -74,11 +74,11 @@ test_expect_success 'push from shallow repo via http' '\n \tgit config http.receivepack true\n \t) &&\n \tcommit 10 &&\n-\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master &&\n+\tgit push $HTTPD_URL/smart/repo.git +main:refs/remotes/top/main &&\n \t(\n \tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n \tgit fsck &&\n-\tgit log --format=%s top/master >actual &&\n+\tgit log --format=%s top/main >actual &&\n \tcat <<EOF >expect &&\n 10\n 4\ndiff --git a/t/t5543-atomic-push.sh b/t/t5543-atomic-push.sh\nindex 620c30d58f..01a9a6e9e0 100755\n--- a/t/t5543-atomic-push.sh\n+++ b/t/t5543-atomic-push.sh\n@@ -40,9 +40,9 @@ test_expect_success 'atomic push works for a single branch' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit push --atomic up master\n+\t\tgit push --atomic up main\n \t) &&\n-\ttest_refs master master\n+\ttest_refs main main\n '\n \n test_expect_success 'atomic push works for two branches' '\n@@ -55,9 +55,9 @@ test_expect_success 'atomic push works for two branches' '\n \t\ttest_commit two &&\n \t\tgit checkout second &&\n \t\ttest_commit three &&\n-\t\tgit push --atomic up master second\n+\t\tgit push --atomic up main second\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \ttest_refs second second\n '\n \n@@ -70,7 +70,7 @@ test_expect_success 'atomic push works in combination with --mirror' '\n \t\ttest_commit two &&\n \t\tgit push --atomic --mirror up\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \ttest_refs second second\n '\n \n@@ -79,7 +79,7 @@ test_expect_success 'atomic push works in combination with --force' '\n \t(\n \t\tcd workbench &&\n \t\ttest_commit one &&\n-\t\tgit branch second master &&\n+\t\tgit branch second main &&\n \t\ttest_commit two_a &&\n \t\tgit checkout second &&\n \t\ttest_commit two_b &&\n@@ -87,36 +87,36 @@ test_expect_success 'atomic push works in combination with --force' '\n \t\ttest_commit four &&\n \t\tgit push --mirror up &&\n \t\t# The actual test is below\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit three_a &&\n \t\tgit checkout second &&\n \t\tgit reset --hard HEAD^ &&\n-\t\tgit push --force --atomic up master second\n+\t\tgit push --force --atomic up main second\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \ttest_refs second second\n '\n \n-# set up two branches where master can be pushed but second can not\n+# set up two branches where main can be pushed but second can not\n # (non-fast-forward). Since second can not be pushed the whole operation\n-# will fail and leave master untouched.\n+# will fail and leave main untouched.\n test_expect_success 'atomic push fails if one branch fails' '\n \tmk_repo_pair &&\n \t(\n \t\tcd workbench &&\n \t\ttest_commit one &&\n-\t\tgit checkout -b second master &&\n+\t\tgit checkout -b second main &&\n \t\ttest_commit two &&\n \t\ttest_commit three &&\n \t\ttest_commit four &&\n \t\tgit push --mirror up &&\n \t\tgit reset --hard HEAD~2 &&\n \t\ttest_commit five &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit six &&\n \t\ttest_must_fail git push --atomic --all up\n \t) &&\n-\ttest_refs master HEAD@{7} &&\n+\ttest_refs main HEAD@{7} &&\n \ttest_refs second HEAD@{4}\n '\n \n@@ -126,7 +126,7 @@ test_expect_success 'atomic push fails if one tag fails remotely' '\n \t(\n \t\tcd workbench &&\n \t\ttest_commit one &&\n-\t\tgit checkout -b second master &&\n+\t\tgit checkout -b second main &&\n \t\ttest_commit two &&\n \t\tgit push --mirror up\n \t) &&\n@@ -139,14 +139,14 @@ test_expect_success 'atomic push fails if one tag fails remotely' '\n \t# see if we can now push both branches.\n \t(\n \t\tcd workbench &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit three &&\n \t\tgit checkout second &&\n \t\ttest_commit four &&\n \t\tgit tag test_tag &&\n-\t\ttest_must_fail git push --tags --atomic up master second\n+\t\ttest_must_fail git push --tags --atomic up main second\n \t) &&\n-\ttest_refs master HEAD@{3} &&\n+\ttest_refs main HEAD@{3} &&\n \ttest_refs second HEAD@{1}\n '\n \n@@ -155,7 +155,7 @@ test_expect_success 'atomic push obeys update hook preventing a branch to be pus\n \t(\n \t\tcd workbench &&\n \t\ttest_commit one &&\n-\t\tgit checkout -b second master &&\n+\t\tgit checkout -b second main &&\n \t\ttest_commit two &&\n \t\tgit push --mirror up\n \t) &&\n@@ -165,19 +165,19 @@ test_expect_success 'atomic push obeys update hook preventing a branch to be pus\n \t\tHOOK=\"$HOOKDIR/update\" &&\n \t\tmkdir -p \"$HOOKDIR\" &&\n \t\twrite_script \"$HOOK\" <<-\\EOF\n-\t\t\t# only allow update to master from now on\n-\t\t\ttest \"$1\" = \"refs/heads/master\"\n+\t\t\t# only allow update to main from now on\n+\t\t\ttest \"$1\" = \"refs/heads/main\"\n \t\tEOF\n \t) &&\n \t(\n \t\tcd workbench &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit three &&\n \t\tgit checkout second &&\n \t\ttest_commit four &&\n-\t\ttest_must_fail git push --atomic up master second\n+\t\ttest_must_fail git push --atomic up main second\n \t) &&\n-\ttest_refs master HEAD@{3} &&\n+\ttest_refs main HEAD@{3} &&\n \ttest_refs second HEAD@{1}\n '\n \n@@ -192,21 +192,21 @@ test_expect_success 'atomic push is not advertised if configured' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\ttest_must_fail git push --atomic up master\n+\t\ttest_must_fail git push --atomic up main\n \t) &&\n-\ttest_refs master HEAD@{1}\n+\ttest_refs main HEAD@{1}\n '\n \n-# References in upstream : master(1) one(1) foo(1)\n-# References in workbench: master(2)        foo(1) two(2) bar(2)\n-# Atomic push            : master(2)               two(2) bar(2)\n+# References in upstream : main(1) one(1) foo(1)\n+# References in workbench: main(2)        foo(1) two(2) bar(2)\n+# Atomic push            : main(2)               two(2) bar(2)\n test_expect_success 'atomic push reports (reject by update hook)' '\n \tmk_repo_pair &&\n \t(\n \t\tcd workbench &&\n \t\ttest_commit one &&\n \t\tgit branch foo &&\n-\t\tgit push up master one foo &&\n+\t\tgit push up main one foo &&\n \t\tgit tag -d one\n \t) &&\n \t(\n@@ -228,19 +228,19 @@ test_expect_success 'atomic push reports (reject by update hook)' '\n \t\tgit branch bar\n \t) &&\n \ttest_must_fail git -C workbench \\\n-\t\tpush --atomic up master two bar >out 2>&1 &&\n+\t\tpush --atomic up main two bar >out 2>&1 &&\n \tfmt_status_report <out >actual &&\n \tcat >expect <<-EOF &&\n \tTo ../upstream\n-\t ! [remote rejected] master -> master (atomic push failure)\n+\t ! [remote rejected] main -> main (atomic push failure)\n \t ! [remote rejected] two -> two (atomic push failure)\n \t ! [remote rejected] bar -> bar (hook declined)\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# References in upstream : master(1) one(1) foo(1)\n-# References in workbench: master(2)        foo(1) two(2) bar(2)\n+# References in upstream : main(1) one(1) foo(1)\n+# References in workbench: main(2)        foo(1) two(2) bar(2)\n test_expect_success 'atomic push reports (mirror, but reject by update hook)' '\n \t(\n \t\tcd workbench &&\n@@ -252,7 +252,7 @@ test_expect_success 'atomic push reports (mirror, but reject by update hook)' '\n \tfmt_status_report <out >actual &&\n \tcat >expect <<-EOF &&\n \tTo ../upstream\n-\t ! [remote rejected] master -> master (atomic push failure)\n+\t ! [remote rejected] main -> main (atomic push failure)\n \t ! [remote rejected] one (atomic push failure)\n \t ! [remote rejected] bar -> bar (hook declined)\n \t ! [remote rejected] two -> two (atomic push failure)\n@@ -260,21 +260,21 @@ test_expect_success 'atomic push reports (mirror, but reject by update hook)' '\n \ttest_cmp expect actual\n '\n \n-# References in upstream : master(2) one(1) foo(1)\n-# References in workbench: master(1)        foo(1) two(2) bar(2)\n+# References in upstream : main(2) one(1) foo(1)\n+# References in workbench: main(1)        foo(1) two(2) bar(2)\n test_expect_success 'atomic push reports (reject by non-ff)' '\n \trm upstream/.git/hooks/update &&\n \t(\n \t\tcd workbench &&\n-\t\tgit push up master &&\n+\t\tgit push up main &&\n \t\tgit reset --hard HEAD^\n \t) &&\n \ttest_must_fail git -C workbench \\\n-\t\tpush --atomic up master foo bar >out 2>&1 &&\n+\t\tpush --atomic up main foo bar >out 2>&1 &&\n \tfmt_status_report <out >actual &&\n \tcat >expect <<-EOF &&\n \tTo ../upstream\n-\t ! [rejected] master -> master (non-fast-forward)\n+\t ! [rejected] main -> main (non-fast-forward)\n \t ! [rejected] bar -> bar (atomic push failed)\n \tEOF\n \ttest_cmp expect actual\ndiff --git a/t/t5545-push-options.sh b/t/t5545-push-options.sh\nindex 38e6f7340e..a1276bbc33 100755\n--- a/t/t5545-push-options.sh\n+++ b/t/t5545-push-options.sh\n@@ -63,9 +63,9 @@ test_expect_success 'one push option works for a single branch' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit push --push-option=asdf up master\n+\t\tgit push --push-option=asdf up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \techo \"asdf\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -79,9 +79,9 @@ test_expect_success 'push option denied by remote' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\ttest_must_fail git push --push-option=asdf up master\n+\t\ttest_must_fail git push --push-option=asdf up main\n \t) &&\n-\ttest_refs master HEAD@{1}\n+\ttest_refs main HEAD@{1}\n '\n \n test_expect_success 'two push options work' '\n@@ -92,9 +92,9 @@ test_expect_success 'two push options work' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit push --push-option=asdf --push-option=\"more structured text\" up master\n+\t\tgit push --push-option=asdf --push-option=\"more structured text\" up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \tprintf \"asdf\\nmore structured text\\n\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -123,14 +123,14 @@ test_expect_success 'push options and submodules' '\n \n \tgit -C parent push \\\n \t\t--push-option=asdf --push-option=\"more structured text\" \\\n-\t\t--recurse-submodules=on-demand up master &&\n+\t\t--recurse-submodules=on-demand up main &&\n \n-\tgit -C upstream rev-parse --verify master >expect &&\n-\tgit -C parent/workbench rev-parse --verify master >actual &&\n+\tgit -C upstream rev-parse --verify main >expect &&\n+\tgit -C parent/workbench rev-parse --verify main >actual &&\n \ttest_cmp expect actual &&\n \n-\tgit -C parent_upstream rev-parse --verify master >expect &&\n-\tgit -C parent rev-parse --verify master >actual &&\n+\tgit -C parent_upstream rev-parse --verify main >expect &&\n+\tgit -C parent rev-parse --verify main >actual &&\n \ttest_cmp expect actual &&\n \n \tprintf \"asdf\\nmore structured text\\n\" >expect &&\n@@ -148,9 +148,9 @@ test_expect_success 'default push option' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit -c push.pushOption=default push up master\n+\t\tgit -c push.pushOption=default push up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \techo \"default\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -164,9 +164,9 @@ test_expect_success 'two default push options' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit -c push.pushOption=default1 -c push.pushOption=default2 push up master\n+\t\tgit -c push.pushOption=default1 -c push.pushOption=default2 push up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \tprintf \"default1\\ndefault2\\n\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -180,9 +180,9 @@ test_expect_success 'push option from command line overrides from-config push op\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit -c push.pushOption=default push --push-option=manual up master\n+\t\tgit -c push.pushOption=default push --push-option=manual up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \techo \"manual\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -196,9 +196,9 @@ test_expect_success 'empty value of push.pushOption in config clears the list' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit -c push.pushOption=default1 -c push.pushOption= -c push.pushOption=default2 push up master\n+\t\tgit -c push.pushOption=default1 -c push.pushOption= -c push.pushOption=default2 push up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \techo \"default2\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -212,16 +212,16 @@ test_expect_success 'invalid push option in config' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\ttest_must_fail git -c push.pushOption push up master\n+\t\ttest_must_fail git -c push.pushOption push up main\n \t) &&\n-\ttest_refs master HEAD@{1}\n+\ttest_refs main HEAD@{1}\n '\n \n test_expect_success 'push options keep quoted characters intact (direct)' '\n \tmk_repo_pair &&\n \tgit -C upstream config receive.advertisePushOptions true &&\n \ttest_commit -C workbench one &&\n-\tgit -C workbench push --push-option=\"\\\"embedded quotes\\\"\" up master &&\n+\tgit -C workbench push --push-option=\"\\\"embedded quotes\\\"\" up main &&\n \techo \"\\\"embedded quotes\\\"\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options\n '\n@@ -244,28 +244,28 @@ mk_http_pair () {\n test_expect_success 'push option denied properly by http server' '\n \tmk_http_pair false &&\n \ttest_commit -C test_http_clone one &&\n-\ttest_must_fail git -C test_http_clone push --push-option=asdf origin master 2>actual &&\n+\ttest_must_fail git -C test_http_clone push --push-option=asdf origin main 2>actual &&\n \ttest_i18ngrep \"the receiving end does not support push options\" actual &&\n-\tgit -C test_http_clone push origin master\n+\tgit -C test_http_clone push origin main\n '\n \n test_expect_success 'push options work properly across http' '\n \tmk_http_pair true &&\n \n \ttest_commit -C test_http_clone one &&\n-\tgit -C test_http_clone push origin master &&\n-\tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git rev-parse --verify master >expect &&\n-\tgit -C test_http_clone rev-parse --verify master >actual &&\n+\tgit -C test_http_clone push origin main &&\n+\tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git rev-parse --verify main >expect &&\n+\tgit -C test_http_clone rev-parse --verify main >actual &&\n \ttest_cmp expect actual &&\n \n \ttest_commit -C test_http_clone two &&\n-\tgit -C test_http_clone push --push-option=asdf --push-option=\"more structured text\" origin master &&\n+\tgit -C test_http_clone push --push-option=asdf --push-option=\"more structured text\" origin main &&\n \tprintf \"asdf\\nmore structured text\\n\" >expect &&\n \ttest_cmp expect \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git/hooks/post-receive.push_options &&\n \n-\tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git rev-parse --verify master >expect &&\n-\tgit -C test_http_clone rev-parse --verify master >actual &&\n+\tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git rev-parse --verify main >expect &&\n+\tgit -C test_http_clone rev-parse --verify main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -273,7 +273,7 @@ test_expect_success 'push options keep quoted characters intact (http)' '\n \tmk_http_pair true &&\n \n \ttest_commit -C test_http_clone one &&\n-\tgit -C test_http_clone push --push-option=\"\\\"embedded quotes\\\"\" origin master &&\n+\tgit -C test_http_clone push --push-option=\"\\\"embedded quotes\\\"\" origin main &&\n \techo \"\\\"embedded quotes\\\"\" >expect &&\n \ttest_cmp expect \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git/hooks/pre-receive.push_options\n '\ndiff --git a/t/t5548-push-porcelain.sh b/t/t5548-push-porcelain.sh\nindex 1b19b3ef55..5a761f3642 100755\n--- a/t/t5548-push-porcelain.sh\n+++ b/t/t5548-push-porcelain.sh\n@@ -36,7 +36,7 @@ create_commits_in () {\n \t\tshift ||\n \t\treturn 1\n \tdone &&\n-\tgit -C \"$repo\" update-ref refs/heads/master $oid\n+\tgit -C \"$repo\" update-ref refs/heads/main $oid\n }\n \n # Format the output of git-push, git-show-ref and other commands to make a\n@@ -57,8 +57,8 @@ make_user_friendly_and_stable_output () {\n }\n \n setup_upstream_and_workbench () {\n-\t# Upstream  after setup : master(B)  foo(A)  bar(A)  baz(A)\n-\t# Workbench after setup : master(A)\n+\t# Upstream  after setup : main(B)  foo(A)  bar(A)  baz(A)\n+\t# Workbench after setup : main(A)\n \ttest_expect_success \"setup upstream repository and workbench\" '\n \t\trm -rf upstream.git workbench &&\n \t\tgit init --bare upstream.git &&\n@@ -70,9 +70,9 @@ setup_upstream_and_workbench () {\n \t\t\t# this fixed-width oid will be replaced with \"<OID>\".\n \t\t\tgit config core.abbrev 7 &&\n \t\t\tgit remote add origin ../upstream.git &&\n-\t\t\tgit update-ref refs/heads/master $A &&\n+\t\t\tgit update-ref refs/heads/main $A &&\n \t\t\tgit push origin \\\n-\t\t\t\t$B:refs/heads/master \\\n+\t\t\t\t$B:refs/heads/main \\\n \t\t\t\t$A:refs/heads/foo \\\n \t\t\t\t$A:refs/heads/bar \\\n \t\t\t\t$A:refs/heads/baz\n@@ -94,17 +94,17 @@ run_git_push_porcelain_output_test() {\n \t\t;;\n \tesac\n \n-\t# Refs of upstream : master(B)  foo(A)  bar(A)  baz(A)\n-\t# Refs of workbench: master(A)                  baz(A)  next(A)\n-\t# git-push         : master(A)  NULL    (B)     baz(A)  next(A)\n+\t# Refs of upstream : main(B)  foo(A)  bar(A)  baz(A)\n+\t# Refs of workbench: main(A)                  baz(A)  next(A)\n+\t# git-push         : main(A)  NULL    (B)     baz(A)  next(A)\n \ttest_expect_success \"porcelain output of successful git-push ($PROTOCOL)\" '\n \t\t(\n \t\t\tcd workbench &&\n-\t\t\tgit update-ref refs/heads/master $A &&\n+\t\t\tgit update-ref refs/heads/main $A &&\n \t\t\tgit update-ref refs/heads/baz $A &&\n \t\t\tgit update-ref refs/heads/next $A &&\n \t\t\tgit push --porcelain --force origin \\\n-\t\t\t\tmaster \\\n+\t\t\t\tmain \\\n \t\t\t\t:refs/heads/foo \\\n \t\t\t\t$B:bar \\\n \t\t\t\tbaz \\\n@@ -116,7 +116,7 @@ run_git_push_porcelain_output_test() {\n \t\t=    refs/heads/baz:refs/heads/baz    [up to date]\n \t\t     <COMMIT-B>:refs/heads/bar    <OID-A>..<OID-B>\n \t\t-    :refs/heads/foo    [deleted]\n-\t\t+    refs/heads/master:refs/heads/master    <OID-B>...<OID-A> (forced update)\n+\t\t+    refs/heads/main:refs/heads/main    <OID-B>...<OID-A> (forced update)\n \t\t*    refs/heads/next:refs/heads/next    [new branch]\n \t\tDone\n \t\tEOF\n@@ -127,22 +127,22 @@ run_git_push_porcelain_output_test() {\n \t\tcat >expect <<-EOF &&\n \t\t<COMMIT-B> refs/heads/bar\n \t\t<COMMIT-A> refs/heads/baz\n-\t\t<COMMIT-A> refs/heads/master\n+\t\t<COMMIT-A> refs/heads/main\n \t\t<COMMIT-A> refs/heads/next\n \t\tEOF\n \t\ttest_cmp expect actual\n \t'\n \n-\t# Refs of upstream : master(A)  bar(B)  baz(A)  next(A)\n-\t# Refs of workbench: master(B)  bar(A)  baz(A)  next(A)\n-\t# git-push         : master(B)  bar(A)  NULL    next(A)\n+\t# Refs of upstream : main(A)  bar(B)  baz(A)  next(A)\n+\t# Refs of workbench: main(B)  bar(A)  baz(A)  next(A)\n+\t# git-push         : main(B)  bar(A)  NULL    next(A)\n \ttest_expect_success \"atomic push failed ($PROTOCOL)\" '\n \t\t(\n \t\t\tcd workbench &&\n-\t\t\tgit update-ref refs/heads/master $B &&\n+\t\t\tgit update-ref refs/heads/main $B &&\n \t\t\tgit update-ref refs/heads/bar $A &&\n \t\t\ttest_must_fail git push --atomic --porcelain origin \\\n-\t\t\t\tmaster \\\n+\t\t\t\tmain \\\n \t\t\t\tbar \\\n \t\t\t\t:baz \\\n \t\t\t\tnext\n@@ -153,7 +153,7 @@ run_git_push_porcelain_output_test() {\n \t\t=    refs/heads/next:refs/heads/next    [up to date]\n \t\t!    refs/heads/bar:refs/heads/bar    [rejected] (non-fast-forward)\n \t\t!    (delete):refs/heads/baz    [rejected] (atomic push failed)\n-\t\t!    refs/heads/master:refs/heads/master    [rejected] (atomic push failed)\n+\t\t!    refs/heads/main:refs/heads/main    [rejected] (atomic push failed)\n \t\tDone\n \t\tEOF\n \t\ttest_cmp expect actual &&\n@@ -163,7 +163,7 @@ run_git_push_porcelain_output_test() {\n \t\tcat >expect <<-EOF &&\n \t\t<COMMIT-B> refs/heads/bar\n \t\t<COMMIT-A> refs/heads/baz\n-\t\t<COMMIT-A> refs/heads/master\n+\t\t<COMMIT-A> refs/heads/main\n \t\t<COMMIT-A> refs/heads/next\n \t\tEOF\n \t\ttest_cmp expect actual\n@@ -174,16 +174,16 @@ run_git_push_porcelain_output_test() {\n \t\tEOF\n \t'\n \n-\t# Refs of upstream : master(A)  bar(B)  baz(A)  next(A)\n-\t# Refs of workbench: master(B)  bar(A)  baz(A)  next(A)\n-\t# git-push         : master(B)  bar(A)  NULL    next(A)\n+\t# Refs of upstream : main(A)  bar(B)  baz(A)  next(A)\n+\t# Refs of workbench: main(B)  bar(A)  baz(A)  next(A)\n+\t# git-push         : main(B)  bar(A)  NULL    next(A)\n \ttest_expect_success \"pre-receive hook declined ($PROTOCOL)\" '\n \t\t(\n \t\t\tcd workbench &&\n-\t\t\tgit update-ref refs/heads/master $B &&\n+\t\t\tgit update-ref refs/heads/main $B &&\n \t\t\tgit update-ref refs/heads/bar $A &&\n \t\t\ttest_must_fail git push --porcelain --force origin \\\n-\t\t\t\tmaster \\\n+\t\t\t\tmain \\\n \t\t\t\tbar \\\n \t\t\t\t:baz \\\n \t\t\t\tnext\n@@ -194,7 +194,7 @@ run_git_push_porcelain_output_test() {\n \t\t=    refs/heads/next:refs/heads/next    [up to date]\n \t\t!    refs/heads/bar:refs/heads/bar    [remote rejected] (pre-receive hook declined)\n \t\t!    :refs/heads/baz    [remote rejected] (pre-receive hook declined)\n-\t\t!    refs/heads/master:refs/heads/master    [remote rejected] (pre-receive hook declined)\n+\t\t!    refs/heads/main:refs/heads/main    [remote rejected] (pre-receive hook declined)\n \t\tDone\n \t\tEOF\n \t\ttest_cmp expect actual &&\n@@ -204,7 +204,7 @@ run_git_push_porcelain_output_test() {\n \t\tcat >expect <<-EOF &&\n \t\t<COMMIT-B> refs/heads/bar\n \t\t<COMMIT-A> refs/heads/baz\n-\t\t<COMMIT-A> refs/heads/master\n+\t\t<COMMIT-A> refs/heads/main\n \t\t<COMMIT-A> refs/heads/next\n \t\tEOF\n \t\ttest_cmp expect actual\n@@ -214,14 +214,14 @@ run_git_push_porcelain_output_test() {\n \t\trm \"$upstream/hooks/pre-receive\"\n \t'\n \n-\t# Refs of upstream : master(A)  bar(B)  baz(A)  next(A)\n-\t# Refs of workbench: master(B)  bar(A)  baz(A)  next(A)\n-\t# git-push         : master(B)  bar(A)  NULL    next(A)\n+\t# Refs of upstream : main(A)  bar(B)  baz(A)  next(A)\n+\t# Refs of workbench: main(B)  bar(A)  baz(A)  next(A)\n+\t# git-push         : main(B)  bar(A)  NULL    next(A)\n \ttest_expect_success \"non-fastforward push ($PROTOCOL)\" '\n \t\t(\n \t\t\tcd workbench &&\n \t\t\ttest_must_fail git push --porcelain origin \\\n-\t\t\t\tmaster \\\n+\t\t\t\tmain \\\n \t\t\t\tbar \\\n \t\t\t\t:baz \\\n \t\t\t\tnext\n@@ -231,7 +231,7 @@ run_git_push_porcelain_output_test() {\n \t\tTo <URL/of/upstream.git>\n \t\t=    refs/heads/next:refs/heads/next    [up to date]\n \t\t-    :refs/heads/baz    [deleted]\n-\t\t     refs/heads/master:refs/heads/master    <OID-A>..<OID-B>\n+\t\t     refs/heads/main:refs/heads/main    <OID-A>..<OID-B>\n \t\t!    refs/heads/bar:refs/heads/bar    [rejected] (non-fast-forward)\n \t\tDone\n \t\tEOF\n@@ -241,7 +241,7 @@ run_git_push_porcelain_output_test() {\n \t\tmake_user_friendly_and_stable_output <out >actual &&\n \t\tcat >expect <<-EOF &&\n \t\t<COMMIT-B> refs/heads/bar\n-\t\t<COMMIT-B> refs/heads/master\n+\t\t<COMMIT-B> refs/heads/main\n \t\t<COMMIT-A> refs/heads/next\n \t\tEOF\n \t\ttest_cmp expect actual\ndiff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh\nindex 483578b2d7..6fdcd0c036 100755\n--- a/t/t5550-http-fetch-dumb.sh\n+++ b/t/t5550-http-fetch-dumb.sh\n@@ -26,7 +26,7 @@ test_expect_success 'create http-accessible bare repository with loose objects'\n \t hooks/post-update\n \t) &&\n \tgit remote add public \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit push public master:master\n+\tgit push public main:main\n '\n \n test_expect_success 'clone http repository' '\n@@ -37,8 +37,8 @@ test_expect_success 'clone http repository' '\n \n test_expect_success 'list refs from outside any repository' '\n \tcat >expect <<-EOF &&\n-\t$(git rev-parse master)\tHEAD\n-\t$(git rev-parse master)\trefs/heads/master\n+\t$(git rev-parse main)\tHEAD\n+\t$(git rev-parse main)\trefs/heads/main\n \tEOF\n \tnongit git ls-remote \"$HTTPD_URL/dumb/repo.git\" >actual &&\n \ttest_cmp expect actual\n@@ -181,8 +181,8 @@ test_expect_success 'fetch changes via manual http-fetch' '\n \n \tHEAD=$(git rev-parse --verify HEAD) &&\n \t(cd clone2 &&\n-\t git http-fetch -a -w heads/master-new $HEAD $(git config remote.origin.url) &&\n-\t git checkout master-new &&\n+\t git http-fetch -a -w heads/main-new $HEAD $(git config remote.origin.url) &&\n+\t git checkout main-new &&\n \t test $HEAD = $(git rev-parse --verify HEAD)) &&\n \ttest_cmp file clone2/file\n '\n@@ -192,19 +192,19 @@ test_expect_success 'manual http-fetch without -a works just as well' '\n \n \tHEAD=$(git rev-parse --verify HEAD) &&\n \t(cd clone3 &&\n-\t git http-fetch -w heads/master-new $HEAD $(git config remote.origin.url) &&\n-\t git checkout master-new &&\n+\t git http-fetch -w heads/main-new $HEAD $(git config remote.origin.url) &&\n+\t git checkout main-new &&\n \t test $HEAD = $(git rev-parse --verify HEAD)) &&\n \ttest_cmp file clone3/file\n '\n \n test_expect_success 'http remote detects correct HEAD' '\n-\tgit push public master:other &&\n+\tgit push public main:other &&\n \t(cd clone &&\n \t git remote set-head origin -d &&\n \t git remote set-head origin -a &&\n \t git symbolic-ref refs/remotes/origin/HEAD > output &&\n-\t echo refs/remotes/origin/master > expect &&\n+\t echo refs/remotes/origin/main > expect &&\n \t test_cmp expect output\n \t)\n '\n@@ -416,7 +416,7 @@ test_expect_success 'set up evil alternates scheme' '\n \tevil=$HTTPD_DOCUMENT_ROOT_PATH/evil.git &&\n \tgit init --bare \"$evil\" &&\n \t# do this by hand to avoid object existence check\n-\tprintf \"%s\\\\t%s\\\\n\" $sha1 refs/heads/master >\"$evil/info/refs\"\n+\tprintf \"%s\\\\t%s\\\\n\" $sha1 refs/heads/main >\"$evil/info/refs\"\n '\n \n # Here we'll just redirect via HTTP. In a real-world attack these would be on\ndiff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh\nindex e40e9ed52f..2215bbcce7 100755\n--- a/t/t5551-http-fetch-smart.sh\n+++ b/t/t5551-http-fetch-smart.sh\n@@ -18,7 +18,7 @@ test_expect_success 'create http-accessible bare repository' '\n \t git --bare init\n \t) &&\n \tgit remote add public \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit push public master:master\n+\tgit push public main:main\n '\n \n setup_askpass_helper\n@@ -238,9 +238,9 @@ test_expect_success 'invalid Content-Type rejected' '\n \n test_expect_success 'create namespaced refs' '\n \ttest_commit namespaced &&\n-\tgit push public HEAD:refs/namespaces/ns/refs/heads/master &&\n+\tgit push public HEAD:refs/namespaces/ns/refs/heads/main &&\n \tgit --git-dir=\"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" \\\n-\t\tsymbolic-ref refs/namespaces/ns/HEAD refs/namespaces/ns/refs/heads/master\n+\t\tsymbolic-ref refs/namespaces/ns/HEAD refs/namespaces/ns/refs/heads/main\n '\n \n test_expect_success 'smart clone respects namespace' '\n@@ -271,7 +271,7 @@ test_expect_success 'cookies stored in http.cookiefile when http.savecookies set\n \tEOF\n \tgit config http.cookiefile cookies.txt &&\n \tgit config http.savecookies true &&\n-\tgit ls-remote $HTTPD_URL/smart_cookies/repo.git master &&\n+\tgit ls-remote $HTTPD_URL/smart_cookies/repo.git main &&\n \n \t# NEEDSWORK: If the overspecification of the expected result is reduced, we\n \t# might be able to run this test in all protocol versions.\n@@ -344,12 +344,12 @@ test_expect_success 'large fetch-pack requests can be sent using chunked encodin\n test_expect_success 'test allowreachablesha1inwant' '\n \ttest_when_finished \"rm -rf test_reachable.git\" &&\n \tserver=\"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tmaster_sha=$(git -C \"$server\" rev-parse refs/heads/master) &&\n+\tmain_sha=$(git -C \"$server\" rev-parse refs/heads/main) &&\n \tgit -C \"$server\" config uploadpack.allowreachablesha1inwant 1 &&\n \n \tgit init --bare test_reachable.git &&\n \tgit -C test_reachable.git remote add origin \"$HTTPD_URL/smart/repo.git\" &&\n-\tgit -C test_reachable.git fetch origin \"$master_sha\"\n+\tgit -C test_reachable.git fetch origin \"$main_sha\"\n '\n \n test_expect_success 'test allowreachablesha1inwant with unreachable' '\n@@ -363,7 +363,7 @@ test_expect_success 'test allowreachablesha1inwant with unreachable' '\n \tgit push public :refs/heads/doomed &&\n \n \tserver=\"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tmaster_sha=$(git -C \"$server\" rev-parse refs/heads/master) &&\n+\tmain_sha=$(git -C \"$server\" rev-parse refs/heads/main) &&\n \tgit -C \"$server\" config uploadpack.allowreachablesha1inwant 1 &&\n \n \tgit init --bare test_reachable.git &&\n@@ -385,7 +385,7 @@ test_expect_success 'test allowanysha1inwant with unreachable' '\n \tgit push public :refs/heads/doomed &&\n \n \tserver=\"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tmaster_sha=$(git -C \"$server\" rev-parse refs/heads/master) &&\n+\tmain_sha=$(git -C \"$server\" rev-parse refs/heads/main) &&\n \tgit -C \"$server\" config uploadpack.allowreachablesha1inwant 1 &&\n \n \tgit init --bare test_reachable.git &&\n@@ -444,8 +444,8 @@ test_expect_success 'using fetch command in remote-curl updates refs' '\n \ttest_commit -C \"$SERVER\" bar &&\n \tgit -C client -c protocol.version=0 fetch &&\n \n-\tgit -C \"$SERVER\" rev-parse master >expect &&\n-\tgit -C client rev-parse origin/master >actual &&\n+\tgit -C \"$SERVER\" rev-parse main >expect &&\n+\tgit -C client rev-parse origin/main >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t5552-skipping-fetch-negotiator.sh b/t/t5552-skipping-fetch-negotiator.sh\nindex 156c704040..7b9fb4ff02 100755\n--- a/t/t5552-skipping-fetch-negotiator.sh\n+++ b/t/t5552-skipping-fetch-negotiator.sh\n@@ -100,7 +100,7 @@ test_expect_success 'use ref advertisement to filter out commits' '\n \tgit -C server checkout --orphan anotherbranch &&\n \ttest_commit -C server to_fetch &&\n \n-\t# The server advertising \"c3\" (as \"refs/heads/master\") means that we do\n+\t# The server advertising \"c3\" (as \"refs/heads/main\") means that we do\n \t# not need to send any ancestors of \"c3\", but we still need to send \"c3\"\n \t# itself.\n \ttest_config -C client fetch.negotiationalgorithm skipping &&\ndiff --git a/t/t5553-set-upstream.sh b/t/t5553-set-upstream.sh\nindex 7622981cbf..0e6574f526 100755\n--- a/t/t5553-set-upstream.sh\n+++ b/t/t5553-set-upstream.sh\n@@ -32,9 +32,9 @@ test_expect_success 'setup bare parent fetch' '\n \tgit remote add upstream parent\n '\n \n-test_expect_success 'setup commit on master and other fetch' '\n+test_expect_success 'setup commit on main and other fetch' '\n \ttest_commit one &&\n-\tgit push upstream master &&\n+\tgit push upstream main &&\n \tgit checkout -b other &&\n \ttest_commit two &&\n \tgit push upstream other\n@@ -43,38 +43,38 @@ test_expect_success 'setup commit on master and other fetch' '\n # tests for fetch --set-upstream\n \n test_expect_success 'fetch --set-upstream does not set upstream w/o branch' '\n-\tclear_config master other &&\n-\tgit checkout master &&\n+\tclear_config main other &&\n+\tgit checkout main &&\n \tgit fetch --set-upstream upstream &&\n-\tcheck_config_missing master &&\n+\tcheck_config_missing main &&\n \tcheck_config_missing other\n '\n \n-test_expect_success 'fetch --set-upstream upstream master sets branch master but not other' '\n-\tclear_config master other &&\n-\tgit fetch --set-upstream upstream master &&\n-\tcheck_config master upstream refs/heads/master &&\n+test_expect_success 'fetch --set-upstream upstream main sets branch main but not other' '\n+\tclear_config main other &&\n+\tgit fetch --set-upstream upstream main &&\n+\tcheck_config main upstream refs/heads/main &&\n \tcheck_config_missing other\n '\n \n test_expect_success 'fetch --set-upstream upstream other sets branch other' '\n-\tclear_config master other &&\n+\tclear_config main other &&\n \tgit fetch --set-upstream upstream other &&\n-\tcheck_config master upstream refs/heads/other &&\n+\tcheck_config main upstream refs/heads/other &&\n \tcheck_config_missing other\n '\n \n-test_expect_success 'fetch --set-upstream master:other does not set the branch other2' '\n+test_expect_success 'fetch --set-upstream main:other does not set the branch other2' '\n \tclear_config other2 &&\n-\tgit fetch --set-upstream upstream master:other2 &&\n+\tgit fetch --set-upstream upstream main:other2 &&\n \tcheck_config_missing other2\n '\n \n test_expect_success 'fetch --set-upstream http://nosuchdomain.example.com fails with invalid url' '\n-\t# master explicitly not cleared, we check that it is not touched from previous value\n+\t# main explicitly not cleared, we check that it is not touched from previous value\n \tclear_config other other2 &&\n \ttest_must_fail git fetch --set-upstream http://nosuchdomain.example.com &&\n-\tcheck_config master upstream refs/heads/other &&\n+\tcheck_config main upstream refs/heads/other &&\n \tcheck_config_missing other &&\n \tcheck_config_missing other2\n '\n@@ -83,7 +83,7 @@ test_expect_success 'fetch --set-upstream with valid URL sets upstream to URL' '\n \tclear_config other other2 &&\n \turl=\"file://$PWD\" &&\n \tgit fetch --set-upstream \"$url\" &&\n-\tcheck_config master \"$url\" HEAD &&\n+\tcheck_config main \"$url\" HEAD &&\n \tcheck_config_missing other &&\n \tcheck_config_missing other2\n '\n@@ -96,30 +96,30 @@ test_expect_success 'setup bare parent pull' '\n \tgit remote add upstream parent\n '\n \n-test_expect_success 'setup commit on master and other pull' '\n+test_expect_success 'setup commit on main and other pull' '\n \ttest_commit three &&\n-\tgit push --tags upstream master &&\n+\tgit push --tags upstream main &&\n \ttest_commit four &&\n \tgit push upstream other\n '\n \n-test_expect_success 'pull --set-upstream upstream master sets branch master but not other' '\n-\tclear_config master other &&\n-\tgit pull --set-upstream upstream master &&\n-\tcheck_config master upstream refs/heads/master &&\n+test_expect_success 'pull --set-upstream upstream main sets branch main but not other' '\n+\tclear_config main other &&\n+\tgit pull --set-upstream upstream main &&\n+\tcheck_config main upstream refs/heads/main &&\n \tcheck_config_missing other\n '\n \n-test_expect_success 'pull --set-upstream master:other2 does not set the branch other2' '\n+test_expect_success 'pull --set-upstream main:other2 does not set the branch other2' '\n \tclear_config other2 &&\n-\tgit pull --set-upstream upstream master:other2 &&\n+\tgit pull --set-upstream upstream main:other2 &&\n \tcheck_config_missing other2\n '\n \n-test_expect_success 'pull --set-upstream upstream other sets branch master' '\n-\tclear_config master other &&\n+test_expect_success 'pull --set-upstream upstream other sets branch main' '\n+\tclear_config main other &&\n \tgit pull --set-upstream upstream other &&\n-\tcheck_config master upstream refs/heads/other &&\n+\tcheck_config main upstream refs/heads/other &&\n \tcheck_config_missing other\n '\n \n@@ -130,47 +130,47 @@ test_expect_success 'pull --set-upstream upstream tag does not set the tag' '\n '\n \n test_expect_success 'pull --set-upstream http://nosuchdomain.example.com fails with invalid url' '\n-\t# master explicitly not cleared, we check that it is not touched from previous value\n+\t# main explicitly not cleared, we check that it is not touched from previous value\n \tclear_config other other2 three &&\n \ttest_must_fail git pull --set-upstream http://nosuchdomain.example.com &&\n-\tcheck_config master upstream refs/heads/other &&\n+\tcheck_config main upstream refs/heads/other &&\n \tcheck_config_missing other &&\n \tcheck_config_missing other2 &&\n \tcheck_config_missing three\n '\n \n test_expect_success 'pull --set-upstream upstream HEAD sets branch HEAD' '\n-\tclear_config master other &&\n+\tclear_config main other &&\n \tgit pull --set-upstream upstream HEAD &&\n-\tcheck_config master upstream HEAD &&\n+\tcheck_config main upstream HEAD &&\n \tgit checkout other &&\n \tgit pull --set-upstream upstream HEAD &&\n \tcheck_config other upstream HEAD\n '\n \n test_expect_success 'pull --set-upstream upstream with more than one branch does nothing' '\n-\tclear_config master three &&\n-\tgit pull --set-upstream upstream master three &&\n-\tcheck_config_missing master &&\n+\tclear_config main three &&\n+\tgit pull --set-upstream upstream main three &&\n+\tcheck_config_missing main &&\n \tcheck_config_missing three\n '\n \n test_expect_success 'pull --set-upstream with valid URL sets upstream to URL' '\n-\tclear_config master other other2 &&\n-\tgit checkout master &&\n+\tclear_config main other other2 &&\n+\tgit checkout main &&\n \turl=\"file://$PWD\" &&\n \tgit pull --set-upstream \"$url\" &&\n-\tcheck_config master \"$url\" HEAD &&\n+\tcheck_config main \"$url\" HEAD &&\n \tcheck_config_missing other &&\n \tcheck_config_missing other2\n '\n \n test_expect_success 'pull --set-upstream with valid URL and branch sets branch' '\n-\tclear_config master other other2 &&\n-\tgit checkout master &&\n+\tclear_config main other other2 &&\n+\tgit checkout main &&\n \turl=\"file://$PWD\" &&\n-\tgit pull --set-upstream \"$url\" master &&\n-\tcheck_config master \"$url\" refs/heads/master &&\n+\tgit pull --set-upstream \"$url\" main &&\n+\tcheck_config main \"$url\" refs/heads/main &&\n \tcheck_config_missing other &&\n \tcheck_config_missing other2\n '\ndiff --git a/t/t5561-http-backend.sh b/t/t5561-http-backend.sh\nindex 6eb0294978..c8a9f7f9bb 100755\n--- a/t/t5561-http-backend.sh\n+++ b/t/t5561-http-backend.sh\n@@ -39,9 +39,9 @@ POST() {\n \n grep '^[^#]' >exp <<EOF\n \n-###  refs/heads/master\n+###  refs/heads/main\n ###\n-GET  /smart/repo.git/refs/heads/master HTTP/1.1 404 -\n+GET  /smart/repo.git/refs/heads/main HTTP/1.1 404 -\n \n ###  getanyfile default\n ###\ndiff --git a/t/t556x_common b/t/t556x_common\nindex 359fcfe32b..670fb89477 100755\n--- a/t/t556x_common\n+++ b/t/t556x_common\n@@ -22,7 +22,7 @@ test_expect_success 'setup repository' '\n \t : >objects/info/http-alternates\n \t) &&\n \tgit remote add public \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit push public master:master &&\n+\tgit push public main:main &&\n \n \t(cd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n \t git repack -a -d\n@@ -31,7 +31,7 @@ test_expect_success 'setup repository' '\n \techo other >file &&\n \tgit add file &&\n \tgit commit -m two &&\n-\tgit push public master:master &&\n+\tgit push public main:main &&\n \n \tLOOSE_URL=$(find_file objects/??) &&\n \tPACK_URL=$(find_file objects/pack/*.pack) &&\n@@ -51,8 +51,8 @@ get_static_files() {\n \n SMART=smart\n GIT_HTTP_EXPORT_ALL=1 && export GIT_HTTP_EXPORT_ALL\n-test_expect_success 'direct refs/heads/master not found' '\n-\tGET refs/heads/master \"404 Not Found\"\n+test_expect_success 'direct refs/heads/main not found' '\n+\tGET refs/heads/main \"404 Not Found\"\n '\n test_expect_success 'static file is ok' '\n \tget_static_files \"200 OK\"\ndiff --git a/t/t5570-git-daemon.sh b/t/t5570-git-daemon.sh\nindex 8f69a7854f..864d5c985c 100755\n--- a/t/t5570-git-daemon.sh\n+++ b/t/t5570-git-daemon.sh\n@@ -26,7 +26,7 @@ test_expect_success 'create git-accessible bare repository' '\n \t : >git-daemon-export-ok\n \t) &&\n \tgit remote add public \"$GIT_DAEMON_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit push public master:master\n+\tgit push public main:main\n '\n \n test_expect_success 'clone git repository' '\n@@ -55,12 +55,12 @@ test_expect_success 'no-op fetch without \"-v\" is quiet' '\n '\n \n test_expect_success 'remote detects correct HEAD' '\n-\tgit push public master:other &&\n+\tgit push public main:other &&\n \t(cd clone &&\n \t git remote set-head -d origin &&\n \t git remote set-head -a origin &&\n \t git symbolic-ref refs/remotes/origin/HEAD > output &&\n-\t echo refs/remotes/origin/master > expect &&\n+\t echo refs/remotes/origin/main > expect &&\n \t test_cmp expect output\n \t)\n '\n@@ -148,7 +148,7 @@ test_remote_error()\n \n msg=\"access denied or repository not exported\"\n test_expect_success 'clone non-existent' \"test_remote_error    '$msg' clone nowhere.git\"\n-test_expect_success 'push disabled'      \"test_remote_error    '$msg' push  repo.git master\"\n+test_expect_success 'push disabled'      \"test_remote_error    '$msg' push  repo.git main\"\n test_expect_success 'read access denied' \"test_remote_error -x '$msg' fetch repo.git\"\n test_expect_success 'not exported'       \"test_remote_error -n '$msg' fetch repo.git\"\n \n@@ -156,7 +156,7 @@ stop_git_daemon\n start_git_daemon --informative-errors\n \n test_expect_success 'clone non-existent' \"test_remote_error    'no such repository'      clone nowhere.git\"\n-test_expect_success 'push disabled'      \"test_remote_error    'service not enabled'     push  repo.git master\"\n+test_expect_success 'push disabled'      \"test_remote_error    'service not enabled'     push  repo.git main\"\n test_expect_success 'read access denied' \"test_remote_error -x 'no such repository'      fetch repo.git\"\n test_expect_success 'not exported'       \"test_remote_error -n 'repository not exported' fetch repo.git\"\n \n@@ -192,10 +192,10 @@ test_expect_success FAKENC 'hostname interpolation works after LF-stripping' '\n \tfake_nc \"$GIT_DAEMON_HOST_PORT\" <input >output &&\n \tdepacketize <output >output.raw &&\n \n-\t# just pick out the value of master, which avoids any protocol\n+\t# just pick out the value of main, which avoids any protocol\n \t# particulars\n-\tperl -lne \"print \\$1 if m{^(\\\\S+) refs/heads/master}\" <output.raw >actual &&\n-\tgit -C \"$repo\" rev-parse master >expect &&\n+\tperl -lne \"print \\$1 if m{^(\\\\S+) refs/heads/main}\" <output.raw >actual &&\n+\tgit -C \"$repo\" rev-parse main >expect &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t5571-pre-push-hook.sh b/t/t5571-pre-push-hook.sh\nindex ac53d63869..891f03cd59 100755\n--- a/t/t5571-pre-push-hook.sh\n+++ b/t/t5571-pre-push-hook.sh\n@@ -48,11 +48,11 @@ EOF\n cat >expected <<EOF\n parent1\n repo1\n-refs/heads/master $COMMIT2 refs/heads/foreign $COMMIT1\n+refs/heads/main $COMMIT2 refs/heads/foreign $COMMIT1\n EOF\n \n test_expect_success 'push with hook' '\n-\tgit push parent1 master:foreign &&\n+\tgit push parent1 main:foreign &&\n \tdiff expected actual\n '\n \ndiff --git a/t/t5572-pull-submodule.sh b/t/t5572-pull-submodule.sh\nindex 1d75e3b12b..d6a75964d8 100755\n--- a/t/t5572-pull-submodule.sh\n+++ b/t/t5572-pull-submodule.sh\n@@ -148,8 +148,8 @@ test_expect_success 'branch has no merge base with remote-tracking counterpart'\n \n \tgit clone parent child &&\n \n-\t# Reset master so that it has no merge base with\n-\t# refs/remotes/origin/master.\n+\t# Reset main so that it has no merge base with\n+\t# refs/remotes/origin/main.\n \tOTHER=$(git -C child commit-tree -m bar \\\n \t\t$(git -C child rev-parse HEAD^{tree})) &&\n \tgit -C child reset --hard \"$OTHER\" &&\ndiff --git a/t/t5580-unc-paths.sh b/t/t5580-unc-paths.sh\nindex cf768b3a27..511c1ba51d 100755\n--- a/t/t5580-unc-paths.sh\n+++ b/t/t5580-unc-paths.sh\n@@ -53,7 +53,7 @@ test_expect_success fetch '\n \tgit init to-fetch &&\n \t(\n \t\tcd to-fetch &&\n-\t\tgit fetch \"$UNCPATH\" master\n+\t\tgit fetch \"$UNCPATH\" main\n \t)\n '\n \ndiff --git a/t/t5581-http-curl-verbose.sh b/t/t5581-http-curl-verbose.sh\nindex 927aad0820..0c6e3b7665 100755\n--- a/t/t5581-http-curl-verbose.sh\n+++ b/t/t5581-http-curl-verbose.sh\n@@ -13,7 +13,7 @@ test_expect_success 'setup repository' '\n \tgit add file &&\n \tgit commit -m one &&\n \tgit remote add public \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit push public master:master\n+\tgit push public main:main\n '\n \n test_expect_success 'failure in git-upload-pack is shown' '\ndiff --git a/t/t5582-fetch-negative-refspec.sh b/t/t5582-fetch-negative-refspec.sh\nindex 8c61e28fec..9c2b19cae2 100755\n--- a/t/t5582-fetch-negative-refspec.sh\n+++ b/t/t5582-fetch-negative-refspec.sh\n@@ -22,12 +22,12 @@ test_expect_success \"clone and setup child repos\" '\n \t\tgit switch -c alternate &&\n \t\techo >file updated again by one &&\n \t\tgit commit -a -m \"updated by one again\" &&\n-\t\tgit switch master\n+\t\tgit switch main\n \t) &&\n \tgit clone . two &&\n \t(\n \t\tcd two &&\n-\t\tgit config branch.master.remote one &&\n+\t\tgit config branch.main.remote one &&\n \t\tgit config remote.one.url ../one/.git/ &&\n \t\tgit config remote.one.fetch +refs/heads/*:refs/remotes/one/* &&\n \t\tgit config --add remote.one.fetch ^refs/heads/alternate\n@@ -43,9 +43,9 @@ test_expect_success \"fetch one\" '\n \t\ttest_must_fail git rev-parse --verify refs/remotes/one/alternate &&\n \t\tgit fetch one &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/one/alternate &&\n-\t\tgit rev-parse --verify refs/remotes/one/master &&\n-\t\tmine=$(git rev-parse refs/remotes/one/master) &&\n-\t\this=$(cd ../one && git rev-parse refs/heads/master) &&\n+\t\tgit rev-parse --verify refs/remotes/one/main &&\n+\t\tmine=$(git rev-parse refs/remotes/one/main) &&\n+\t\this=$(cd ../one && git rev-parse refs/heads/main) &&\n \t\ttest \"z$mine\" = \"z$his\"\n \t)\n '\n@@ -57,7 +57,7 @@ test_expect_success \"fetch with negative refspec on commandline\" '\n \t\tcd three &&\n \t\talternate_in_one=$(cd ../one && git rev-parse refs/heads/alternate) &&\n \t\techo $alternate_in_one >expect &&\n-\t\tgit fetch ../one/.git refs/heads/*:refs/remotes/one/* ^refs/heads/master &&\n+\t\tgit fetch ../one/.git refs/heads/*:refs/remotes/one/* ^refs/heads/main &&\n \t\tcut -f -1 .git/FETCH_HEAD >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -68,8 +68,8 @@ test_expect_success \"fetch with negative sha1 refspec fails\" '\n \tgit commit -a -m \"updated by origin yet again\" &&\n \t(\n \t\tcd three &&\n-\t\tmaster_in_one=$(cd ../one && git rev-parse refs/heads/master) &&\n-\t\ttest_must_fail git fetch ../one/.git refs/heads/*:refs/remotes/one/* ^$master_in_one\n+\t\tmain_in_one=$(cd ../one && git rev-parse refs/heads/main) &&\n+\t\ttest_must_fail git fetch ../one/.git refs/heads/*:refs/remotes/one/* ^$main_in_one\n \t)\n '\n \n@@ -92,10 +92,10 @@ test_expect_success \"fetch with negative pattern refspec does not expand prefix\"\n \t(\n \t\tcd three &&\n \t\talternate_in_one=$(cd ../one && git rev-parse refs/heads/alternate) &&\n-\t\tmaster_in_one=$(cd ../one && git rev-parse refs/heads/master) &&\n+\t\tmain_in_one=$(cd ../one && git rev-parse refs/heads/main) &&\n \t\techo $alternate_in_one >expect &&\n-\t\techo $master_in_one >>expect &&\n-\t\tgit fetch ../one/.git refs/heads/*:refs/remotes/one/* ^master &&\n+\t\techo $main_in_one >>expect &&\n+\t\tgit fetch ../one/.git refs/heads/*:refs/remotes/one/* ^main &&\n \t\tcut -f -1 .git/FETCH_HEAD >actual &&\n \t\ttest_cmp expect actual\n \t)\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex ecaa0f36f3..f919021063 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-4]*|5[0-4]*|55[0-3]*)\n+[0-4]*|5[0-5]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409816","messageId":"7a9349653dda0723b11484a9923e58fba11f254c.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 07/28] t3[5-9]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:37Z","receivedAt":"2020-11-12T22:44:19Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t3[5-9]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3500-cherry.sh                   | 12 ++++-----\n t/t3501-revert-cherry-pick.sh       |  4 +--\n t/t3502-cherry-pick-merge.sh        |  2 +-\n t/t3503-cherry-pick-root.sh         | 10 ++++----\n t/t3504-cherry-pick-rerere.sh       | 24 ++++++++---------\n t/t3505-cherry-pick-empty.sh        | 24 ++++++++---------\n t/t3506-cherry-pick-ff.sh           |  8 +++---\n t/t3507-cherry-pick-conflict.sh     |  2 +-\n t/t3508-cherry-pick-many-commits.sh | 38 +++++++++++++--------------\n t/t3509-cherry-pick-merge-df.sh     |  2 +-\n t/t3512-cherry-pick-submodule.sh    |  2 +-\n t/t3600-rm.sh                       | 10 ++++----\n t/t3701-add-interactive.sh          |  4 +--\n t/t3901-i18n-patch.sh               | 40 ++++++++++++++---------------\n t/t3903-stash.sh                    | 32 +++++++++++------------\n t/t3910-mac-os-precompose.sh        |  6 ++---\n t/test-lib.sh                       |  2 +-\n 17 files changed, 111 insertions(+), 111 deletions(-)\n\ndiff --git a/t/t3500-cherry.sh b/t/t3500-cherry.sh\nindex 2b8d9cb38e..2528e773a6 100755\n--- a/t/t3500-cherry.sh\n+++ b/t/t3500-cherry.sh\n@@ -5,7 +5,7 @@\n \n test_description='git cherry should detect patches integrated upstream\n \n-This test cherry-picks one local change of two into master branch, and\n+This test cherry-picks one local change of two into main branch, and\n checks that git cherry only returns the second patch in the local branch\n '\n . ./test-lib.sh\n@@ -32,7 +32,7 @@ test_expect_success \\\n      test_tick &&\n      git commit -m \"Add C.\" &&\n \n-     git checkout -f master &&\n+     git checkout -f main &&\n      rm -f B C &&\n \n      echo Third >> A &&\n@@ -40,19 +40,19 @@ test_expect_success \\\n      test_tick &&\n      git commit -m \"Modify A.\" &&\n \n-     expr \"$(echo $(git cherry master my-topic-branch) )\" : \"+ [^ ]* + .*\"\n+     expr \"$(echo $(git cherry main my-topic-branch) )\" : \"+ [^ ]* + .*\"\n '\n \n test_expect_success \\\n     'check that cherry with limit returns only the top patch'\\\n-    'expr \"$(echo $(git cherry master my-topic-branch my-topic-branch^1) )\" : \"+ [^ ]*\"\n+    'expr \"$(echo $(git cherry main my-topic-branch my-topic-branch^1) )\" : \"+ [^ ]*\"\n '\n \n test_expect_success \\\n     'cherry-pick one of the 2 patches, and check cherry recognized one and only one as new' \\\n     'git cherry-pick my-topic-branch^0 &&\n-     echo $(git cherry master my-topic-branch) &&\n-     expr \"$(echo $(git cherry master my-topic-branch) )\" : \"+ [^ ]* - .*\"\n+     echo $(git cherry main my-topic-branch) &&\n+     expr \"$(echo $(git cherry main my-topic-branch) )\" : \"+ [^ ]* - .*\"\n '\n \n test_expect_success 'cherry ignores whitespace' '\ndiff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh\nindex 3669dfb1be..0adfdb4b6c 100755\n--- a/t/t3501-revert-cherry-pick.sh\n+++ b/t/t3501-revert-cherry-pick.sh\n@@ -112,7 +112,7 @@ test_expect_success 'cherry-pick on unborn branch' '\n test_expect_success 'cherry-pick \"-\" to pick from previous branch' '\n \tgit checkout unborn &&\n \ttest_commit to-pick actual content &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit cherry-pick - &&\n \techo content >expect &&\n \ttest_cmp expect actual\n@@ -132,7 +132,7 @@ test_expect_success 'cherry-pick \"-\" is meaningless without checkout' '\n test_expect_success 'cherry-pick \"-\" works with arguments' '\n \tgit checkout -b side-branch &&\n \ttest_commit change actual change &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit cherry-pick -s - &&\n \techo \"Signed-off-by: C O Mitter <committer@example.com>\" >expect &&\n \tgit cat-file commit HEAD | grep ^Signed-off-by: >signoff &&\ndiff --git a/t/t3502-cherry-pick-merge.sh b/t/t3502-cherry-pick-merge.sh\nindex 8b635a196d..4d6ff14eb6 100755\n--- a/t/t3502-cherry-pick-merge.sh\n+++ b/t/t3502-cherry-pick-merge.sh\n@@ -25,7 +25,7 @@ test_expect_success setup '\n \techo new line >B &&\n \tgit commit -m \"add line to B\" B &&\n \tgit tag b &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge side &&\n \tgit tag c\n \ndiff --git a/t/t3503-cherry-pick-root.sh b/t/t3503-cherry-pick-root.sh\nindex e27f39d1e5..59496a56b7 100755\n--- a/t/t3503-cherry-pick-root.sh\n+++ b/t/t3503-cherry-pick-root.sh\n@@ -30,7 +30,7 @@ test_expect_success setup '\n test_expect_success 'cherry-pick a root commit' '\n \n \tgit checkout second^0 &&\n-\tgit cherry-pick master &&\n+\tgit cherry-pick main &&\n \techo first >expect &&\n \ttest_cmp expect file1\n \n@@ -38,14 +38,14 @@ test_expect_success 'cherry-pick a root commit' '\n \n test_expect_success 'revert a root commit' '\n \n-\tgit revert master &&\n+\tgit revert main &&\n \ttest_path_is_missing file1\n \n '\n \n test_expect_success 'cherry-pick a root commit with an external strategy' '\n \n-\tgit cherry-pick --strategy=resolve master &&\n+\tgit cherry-pick --strategy=resolve main &&\n \techo first >expect &&\n \ttest_cmp expect file1\n \n@@ -53,7 +53,7 @@ test_expect_success 'cherry-pick a root commit with an external strategy' '\n \n test_expect_success 'revert a root commit with an external strategy' '\n \n-\tgit revert --strategy=resolve master &&\n+\tgit revert --strategy=resolve main &&\n \ttest_path_is_missing file1\n \n '\n@@ -65,7 +65,7 @@ test_expect_success 'cherry-pick two root commits' '\n \techo third >expect.file3 &&\n \n \tgit checkout second^0 &&\n-\tgit cherry-pick master third &&\n+\tgit cherry-pick main third &&\n \n \ttest_cmp expect.file1 file1 &&\n \ttest_cmp expect.file2 file2 &&\ndiff --git a/t/t3504-cherry-pick-rerere.sh b/t/t3504-cherry-pick-rerere.sh\nindex 80a0d08706..3804527e2e 100755\n--- a/t/t3504-cherry-pick-rerere.sh\n+++ b/t/t3504-cherry-pick-rerere.sh\n@@ -6,8 +6,8 @@ test_description='cherry-pick should rerere for conflicts'\n \n test_expect_success setup '\n \ttest_commit foo &&\n-\ttest_commit foo-master foo &&\n-\ttest_commit bar-master bar &&\n+\ttest_commit foo-main foo &&\n+\ttest_commit bar-main bar &&\n \n \tgit checkout -b dev foo &&\n \ttest_commit foo-dev foo &&\n@@ -16,7 +16,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'conflicting merge' '\n-\ttest_must_fail git merge master\n+\ttest_must_fail git merge main\n '\n \n test_expect_success 'fixup' '\n@@ -29,7 +29,7 @@ test_expect_success 'fixup' '\n '\n \n test_expect_success 'cherry-pick conflict with --rerere-autoupdate' '\n-\ttest_must_fail git cherry-pick --rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --rerere-autoupdate foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \tgit diff-files --quiet &&\n \ttest_must_fail git cherry-pick --continue &&\n@@ -41,7 +41,7 @@ test_expect_success 'cherry-pick conflict with --rerere-autoupdate' '\n \n test_expect_success 'cherry-pick conflict repsects rerere.autoUpdate' '\n \ttest_config rerere.autoUpdate true &&\n-\ttest_must_fail git cherry-pick foo..bar-master &&\n+\ttest_must_fail git cherry-pick foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \tgit diff-files --quiet &&\n \ttest_must_fail git cherry-pick --continue &&\n@@ -53,7 +53,7 @@ test_expect_success 'cherry-pick conflict repsects rerere.autoUpdate' '\n \n test_expect_success 'cherry-pick conflict with --no-rerere-autoupdate' '\n \ttest_config rerere.autoUpdate true &&\n-\ttest_must_fail git cherry-pick --no-rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --no-rerere-autoupdate foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \ttest_must_fail git diff-files --quiet &&\n \tgit add foo &&\n@@ -66,7 +66,7 @@ test_expect_success 'cherry-pick conflict with --no-rerere-autoupdate' '\n '\n \n test_expect_success 'cherry-pick --continue rejects --rerere-autoupdate' '\n-\ttest_must_fail git cherry-pick --rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --rerere-autoupdate foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \tgit diff-files --quiet &&\n \ttest_must_fail git cherry-pick --continue --rerere-autoupdate >actual 2>&1 &&\n@@ -79,25 +79,25 @@ test_expect_success 'cherry-pick --continue rejects --rerere-autoupdate' '\n '\n \n test_expect_success 'cherry-pick --rerere-autoupdate more than once' '\n-\ttest_must_fail git cherry-pick --rerere-autoupdate --rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --rerere-autoupdate --rerere-autoupdate foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \tgit diff-files --quiet &&\n \tgit cherry-pick --abort &&\n-\ttest_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \tgit diff-files --quiet &&\n \tgit cherry-pick --abort &&\n-\ttest_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate foo..bar-main &&\n \ttest_must_fail git diff-files --quiet &&\n \tgit cherry-pick --abort\n '\n \n test_expect_success 'cherry-pick conflict without rerere' '\n \ttest_config rerere.enabled false &&\n-\ttest_must_fail git cherry-pick foo-master &&\n+\ttest_must_fail git cherry-pick foo-main &&\n \tgrep ===== foo &&\n \tgrep foo-dev foo &&\n-\tgrep foo-master foo\n+\tgrep foo-main foo\n '\n \n test_done\ndiff --git a/t/t3505-cherry-pick-empty.sh b/t/t3505-cherry-pick-empty.sh\nindex 5f911bb529..07419a4e4a 100755\n--- a/t/t3505-cherry-pick-empty.sh\n+++ b/t/t3505-cherry-pick-empty.sh\n@@ -17,7 +17,7 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit --allow-empty-message -m \"\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -b empty-change-branch &&\n \ttest_tick &&\n \tgit commit --allow-empty -m \"empty\"\n@@ -25,7 +25,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'cherry-pick an empty commit' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_expect_code 1 git cherry-pick empty-change-branch\n '\n \n@@ -35,7 +35,7 @@ test_expect_success 'index lockfile was removed' '\n \n test_expect_success 'cherry-pick a commit with an empty message' '\n \ttest_when_finished \"git reset --hard empty-message-branch~1\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit cherry-pick empty-message-branch\n '\n \n@@ -44,12 +44,12 @@ test_expect_success 'index lockfile was removed' '\n '\n \n test_expect_success 'cherry-pick a commit with an empty message with --allow-empty-message' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit cherry-pick --allow-empty-message empty-message-branch\n '\n \n test_expect_success 'cherry pick an empty non-ff commit without --allow-empty' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo fourth >>file2 &&\n \tgit add file2 &&\n \tgit commit -m \"fourth\" &&\n@@ -57,22 +57,22 @@ test_expect_success 'cherry pick an empty non-ff commit without --allow-empty' '\n '\n \n test_expect_success 'cherry pick an empty non-ff commit with --allow-empty' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit cherry-pick --allow-empty empty-change-branch\n '\n \n test_expect_success 'cherry pick with --keep-redundant-commits' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit cherry-pick --keep-redundant-commits HEAD^\n '\n \n test_expect_success 'cherry-pick a commit that becomes no-op (prep)' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch fork &&\n \techo foo >file2 &&\n \tgit add file2 &&\n \ttest_tick &&\n-\tgit commit -m \"add file2 on master\" &&\n+\tgit commit -m \"add file2 on main\" &&\n \n \tgit checkout fork &&\n \techo foo >file2 &&\n@@ -84,15 +84,15 @@ test_expect_success 'cherry-pick a commit that becomes no-op (prep)' '\n test_expect_success 'cherry-pick a no-op without --keep-redundant' '\n \tgit reset --hard &&\n \tgit checkout fork^0 &&\n-\ttest_must_fail git cherry-pick master\n+\ttest_must_fail git cherry-pick main\n '\n \n test_expect_success 'cherry-pick a no-op with --keep-redundant' '\n \tgit reset --hard &&\n \tgit checkout fork^0 &&\n-\tgit cherry-pick --keep-redundant-commits master &&\n+\tgit cherry-pick --keep-redundant-commits main &&\n \tgit show -s --format=%s >actual &&\n-\techo \"add file2 on master\" >expect &&\n+\techo \"add file2 on main\" >expect &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t3506-cherry-pick-ff.sh b/t/t3506-cherry-pick-ff.sh\nindex 9d5adbc130..08b461dfcf 100755\n--- a/t/t3506-cherry-pick-ff.sh\n+++ b/t/t3506-cherry-pick-ff.sh\n@@ -24,7 +24,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'cherry-pick using --ff fast forwards' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick --ff second &&\n@@ -32,7 +32,7 @@ test_expect_success 'cherry-pick using --ff fast forwards' '\n '\n \n test_expect_success 'cherry-pick not using --ff does not fast forwards' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick second &&\n@@ -49,7 +49,7 @@ test_expect_success 'cherry-pick not using --ff does not fast forwards' '\n # (This has been taken from t3502-cherry-pick-merge.sh)\n #\n test_expect_success 'merge setup' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard first &&\n \techo new line >A &&\n \tgit add A &&\n@@ -62,7 +62,7 @@ test_expect_success 'merge setup' '\n \ttest_tick &&\n \tgit commit -m \"add line to B\" B &&\n \tgit tag B &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge side &&\n \tgit tag C &&\n \tgit checkout -b new A\ndiff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh\nindex a21adcf0e4..e0f77ba6ad 100755\n--- a/t/t3507-cherry-pick-conflict.sh\n+++ b/t/t3507-cherry-pick-conflict.sh\n@@ -29,7 +29,7 @@ test_expect_success setup '\n \ttest_commit redundant-pick foo c redundant &&\n \tgit commit --allow-empty --allow-empty-message &&\n \tgit tag empty &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config advice.detachedhead false\n \n '\ndiff --git a/t/t3508-cherry-pick-many-commits.sh b/t/t3508-cherry-pick-many-commits.sh\nindex 23070a7b73..bdb995235f 100755\n--- a/t/t3508-cherry-pick-many-commits.sh\n+++ b/t/t3508-cherry-pick-many-commits.sh\n@@ -31,7 +31,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'cherry-pick first..fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick first..fourth &&\n@@ -45,7 +45,7 @@ test_expect_success 'cherry-pick three one two works' '\n \ttest_commit one &&\n \ttest_commit two &&\n \ttest_commit three &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \tgit cherry-pick three one two &&\n \tgit diff --quiet three &&\n@@ -56,28 +56,28 @@ two\"\n '\n \n test_expect_success 'cherry-pick three one two: fails' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_must_fail git cherry-pick three one two:\n '\n \n test_expect_success 'output to keep user entertained during multi-pick' '\n \tcat <<-\\EOF >expected &&\n-\t[master OBJID] second\n+\t[main OBJID] second\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:14:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n-\t[master OBJID] third\n+\t[main OBJID] third\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:15:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n-\t[master OBJID] fourth\n+\t[main OBJID] fourth\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:16:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n \tEOF\n \n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick first..fourth >actual &&\n@@ -87,7 +87,7 @@ test_expect_success 'output to keep user entertained during multi-pick' '\n '\n \n test_expect_success 'cherry-pick --strategy resolve first..fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick --strategy resolve first..fourth &&\n@@ -99,23 +99,23 @@ test_expect_success 'cherry-pick --strategy resolve first..fourth works' '\n test_expect_success 'output during multi-pick indicates merge strategy' '\n \tcat <<-\\EOF >expected &&\n \tTrying simple merge.\n-\t[master OBJID] second\n+\t[main OBJID] second\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:14:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n \tTrying simple merge.\n-\t[master OBJID] third\n+\t[main OBJID] third\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:15:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n \tTrying simple merge.\n-\t[master OBJID] fourth\n+\t[main OBJID] fourth\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:16:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n \tEOF\n \n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick --strategy resolve first..fourth >actual &&\n@@ -124,7 +124,7 @@ test_expect_success 'output during multi-pick indicates merge strategy' '\n '\n \n test_expect_success 'cherry-pick --ff first..fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick --ff first..fourth &&\n@@ -134,7 +134,7 @@ test_expect_success 'cherry-pick --ff first..fourth works' '\n '\n \n test_expect_success 'cherry-pick -n first..fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick -n first..fourth &&\n@@ -144,7 +144,7 @@ test_expect_success 'cherry-pick -n first..fourth works' '\n '\n \n test_expect_success 'revert first..fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard fourth &&\n \ttest_tick &&\n \tgit revert first..fourth &&\n@@ -154,7 +154,7 @@ test_expect_success 'revert first..fourth works' '\n '\n \n test_expect_success 'revert ^first fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard fourth &&\n \ttest_tick &&\n \tgit revert ^first fourth &&\n@@ -164,7 +164,7 @@ test_expect_success 'revert ^first fourth works' '\n '\n \n test_expect_success 'revert fourth fourth~1 fourth~2 works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard fourth &&\n \ttest_tick &&\n \tgit revert fourth fourth~1 fourth~2 &&\n@@ -174,7 +174,7 @@ test_expect_success 'revert fourth fourth~1 fourth~2 works' '\n '\n \n test_expect_success 'cherry-pick -3 fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick -3 fourth &&\n@@ -184,7 +184,7 @@ test_expect_success 'cherry-pick -3 fourth works' '\n '\n \n test_expect_success 'cherry-pick --stdin works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit rev-list --reverse first..fourth | git cherry-pick --stdin &&\ndiff --git a/t/t3509-cherry-pick-merge-df.sh b/t/t3509-cherry-pick-merge-df.sh\nindex 1e5b3948df..dfc5e9f914 100755\n--- a/t/t3509-cherry-pick-merge-df.sh\n+++ b/t/t3509-cherry-pick-merge-df.sh\n@@ -28,7 +28,7 @@ test_expect_success 'Setup rename across paths each below D/F conflicts' '\n \n test_expect_success 'Cherry-pick succeeds with rename across D/F conflicts' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit cherry-pick branch\n '\n \ndiff --git a/t/t3512-cherry-pick-submodule.sh b/t/t3512-cherry-pick-submodule.sh\nindex 6ece1d8573..ec09d7d8a8 100755\n--- a/t/t3512-cherry-pick-submodule.sh\n+++ b/t/t3512-cherry-pick-submodule.sh\n@@ -35,7 +35,7 @@ test_expect_success 'unrelated submodule/file conflict is ignored' '\n \t\tgit add a_file &&\n \t\tgit commit -m \"modify a file\" &&\n \n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \n \t\tgit submodule add ../sub sub &&\n \t\tgit submodule update sub &&\ndiff --git a/t/t3600-rm.sh b/t/t3600-rm.sh\nindex efec8d13b6..243087d9c6 100755\n--- a/t/t3600-rm.sh\n+++ b/t/t3600-rm.sh\n@@ -483,16 +483,16 @@ test_expect_success 'setup submodule conflict' '\n \techo 1 >nitfol &&\n \tgit add nitfol &&\n \tgit commit -m \"added nitfol 1\" &&\n-\tgit checkout -b branch2 master &&\n+\tgit checkout -b branch2 main &&\n \techo 2 >nitfol &&\n \tgit add nitfol &&\n \tgit commit -m \"added nitfol 2\" &&\n-\tgit checkout -b conflict1 master &&\n+\tgit checkout -b conflict1 main &&\n \tgit -C submod fetch &&\n \tgit -C submod checkout branch1 &&\n \tgit add submod &&\n \tgit commit -m \"submod 1\" &&\n-\tgit checkout -b conflict2 master &&\n+\tgit checkout -b conflict2 main &&\n \tgit -C submod checkout branch2 &&\n \tgit add submod &&\n \tgit commit -m \"submod 2\"\n@@ -604,7 +604,7 @@ test_expect_success 'rm of a conflicted unpopulated submodule succeeds' '\n '\n \n test_expect_success 'rm of a populated submodule with a .git directory migrates git dir' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard &&\n \tgit submodule update &&\n \t(\n@@ -717,7 +717,7 @@ test_expect_success 'checking out a commit after submodule removal needs manual\n \tgit checkout HEAD^ &&\n \tgit submodule update &&\n \tgit checkout -q HEAD^ &&\n-\tgit checkout -q master 2>actual &&\n+\tgit checkout -q main 2>actual &&\n \ttest_i18ngrep \"^warning: unable to rmdir '\\''submod'\\'':\" actual &&\n \tgit status -s submod >actual &&\n \techo \"?? submod/\" >expected &&\ndiff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh\nindex ca04fac417..4abaa9be02 100755\n--- a/t/t3701-add-interactive.sh\n+++ b/t/t3701-add-interactive.sh\n@@ -549,8 +549,8 @@ test_expect_success 'patch mode ignores unmerged entries' '\n \ttest_commit non-conflict &&\n \tgit checkout -b side &&\n \ttest_commit side conflict.t &&\n-\tgit checkout master &&\n-\ttest_commit master conflict.t &&\n+\tgit checkout main &&\n+\ttest_commit main conflict.t &&\n \ttest_must_fail git merge side &&\n \techo changed >non-conflict.t &&\n \techo y | git add -p >output &&\ndiff --git a/t/t3901-i18n-patch.sh b/t/t3901-i18n-patch.sh\nindex 923eb01f0e..6a96959e06 100755\n--- a/t/t3901-i18n-patch.sh\n+++ b/t/t3901-i18n-patch.sh\n@@ -45,7 +45,7 @@ test_expect_success setup '\n \n \t# the first commit on the side branch is UTF-8\n \ttest_tick &&\n-\tgit checkout -b side master^ &&\n+\tgit checkout -b side main^ &&\n \techo Another file >yours &&\n \tgit add yours &&\n \tgit commit -s -m \"Second on side\" &&\n@@ -69,7 +69,7 @@ test_expect_success setup '\n test_expect_success 'format-patch output (ISO-8859-1)' '\n \tgit config i18n.logoutputencoding ISO8859-1 &&\n \n-\tgit format-patch --stdout master..HEAD^ >out-l1 &&\n+\tgit format-patch --stdout main..HEAD^ >out-l1 &&\n \tgit format-patch --stdout HEAD^ >out-l2 &&\n \tgrep \"^Content-Type: text/plain; charset=ISO8859-1\" out-l1 &&\n \tgrep \"^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=\" out-l1 &&\n@@ -80,7 +80,7 @@ test_expect_success 'format-patch output (ISO-8859-1)' '\n test_expect_success 'format-patch output (UTF-8)' '\n \tgit config i18n.logoutputencoding UTF-8 &&\n \n-\tgit format-patch --stdout master..HEAD^ >out-u1 &&\n+\tgit format-patch --stdout main..HEAD^ >out-u1 &&\n \tgit format-patch --stdout HEAD^ >out-u2 &&\n \tgrep \"^Content-Type: text/plain; charset=UTF-8\" out-u1 &&\n \tgrep \"^From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?=\" out-u1 &&\n@@ -102,7 +102,7 @@ test_expect_success 'rebase (U/U)' '\n \t# we want UTF-8 encoded name.\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \tgit checkout -b test &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \n \tcheck_encoding 2\n '\n@@ -113,7 +113,7 @@ test_expect_success 'rebase (U/L)' '\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \n \tcheck_encoding 2\n '\n@@ -125,7 +125,7 @@ test_expect_success !MINGW 'rebase (L/L)' '\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \n \tcheck_encoding 2 8859\n '\n@@ -138,7 +138,7 @@ test_expect_success !MINGW 'rebase (L/U)' '\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \n \tcheck_encoding 2 8859\n '\n@@ -150,7 +150,7 @@ test_expect_success 'cherry-pick(U/U)' '\n \tgit config i18n.logoutputencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit cherry-pick side^ &&\n \tgit cherry-pick side &&\n \tgit revert HEAD &&\n@@ -165,7 +165,7 @@ test_expect_success !MINGW 'cherry-pick(L/L)' '\n \tgit config i18n.logoutputencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit cherry-pick side^ &&\n \tgit cherry-pick side &&\n \tgit revert HEAD &&\n@@ -180,7 +180,7 @@ test_expect_success 'cherry-pick(U/L)' '\n \tgit config i18n.logoutputencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit cherry-pick side^ &&\n \tgit cherry-pick side &&\n \tgit revert HEAD &&\n@@ -196,7 +196,7 @@ test_expect_success !MINGW 'cherry-pick(L/U)' '\n \tgit config i18n.logoutputencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit cherry-pick side^ &&\n \tgit cherry-pick side &&\n \tgit revert HEAD &&\n@@ -210,7 +210,7 @@ test_expect_success 'rebase --merge (U/U)' '\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase --merge master &&\n+\tgit rebase --merge main &&\n \n \tcheck_encoding 2\n '\n@@ -221,7 +221,7 @@ test_expect_success 'rebase --merge (U/L)' '\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase --merge master &&\n+\tgit rebase --merge main &&\n \n \tcheck_encoding 2\n '\n@@ -233,7 +233,7 @@ test_expect_success 'rebase --merge (L/L)' '\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase --merge master &&\n+\tgit rebase --merge main &&\n \n \tcheck_encoding 2 8859\n '\n@@ -246,7 +246,7 @@ test_expect_success 'rebase --merge (L/U)' '\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase --merge master &&\n+\tgit rebase --merge main &&\n \n \tcheck_encoding 2 8859\n '\n@@ -256,7 +256,7 @@ test_expect_success 'am (U/U)' '\n \tgit config i18n.commitencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit am out-u1 out-u2 &&\n \n \tcheck_encoding 2\n@@ -267,7 +267,7 @@ test_expect_success !MINGW 'am (L/L)' '\n \tgit config i18n.commitencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit am out-l1 out-l2 &&\n \n \tcheck_encoding 2 8859\n@@ -277,7 +277,7 @@ test_expect_success 'am (U/L)' '\n \t# Apply ISO-8859-1 patches with UTF-8 commitencoding\n \tgit config i18n.commitencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \n \t# am specifies --utf8 by default.\n \tgit am out-l1 out-l2 &&\n@@ -290,7 +290,7 @@ test_expect_success 'am --no-utf8 (U/L)' '\n \tgit config i18n.commitencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit am --no-utf8 out-l1 out-l2 2>err &&\n \n \t# commit-tree will warn that the commit message does not contain valid UTF-8\n@@ -305,7 +305,7 @@ test_expect_success !MINGW 'am (L/U)' '\n \tgit config i18n.commitencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \t# mailinfo will re-code the commit message to the charset specified by\n \t# i18n.commitencoding\n \tgit am out-u1 out-u2 &&\ndiff --git a/t/t3903-stash.sh b/t/t3903-stash.sh\nindex 9f7ca98967..97374f393a 100755\n--- a/t/t3903-stash.sh\n+++ b/t/t3903-stash.sh\n@@ -220,14 +220,14 @@ test_expect_success 'stash branch' '\n \tgit commit file -m second &&\n \tgit stash branch stashbranch &&\n \ttest refs/heads/stashbranch = $(git symbolic-ref HEAD) &&\n-\ttest $(git rev-parse HEAD) = $(git rev-parse master^) &&\n+\ttest $(git rev-parse HEAD) = $(git rev-parse main^) &&\n \tgit diff --cached >output &&\n \tdiff_cmp expect output &&\n \tgit diff >output &&\n \tdiff_cmp expect1 output &&\n \tgit add file &&\n \tgit commit -m alternate\\ second &&\n-\tgit diff master..stashbranch >output &&\n+\tgit diff main..stashbranch >output &&\n \tdiff_cmp output expect2 &&\n \ttest 0 = $(git stash list | wc -l)\n '\n@@ -520,7 +520,7 @@ test_expect_success 'stash branch - no stashes on stack, stash-like argument' '\n \tSTASH_ID=$(git stash create) &&\n \tgit reset --hard &&\n \tgit stash branch stash-branch ${STASH_ID} &&\n-\ttest_when_finished \"git reset --hard HEAD && git checkout master &&\n+\ttest_when_finished \"git reset --hard HEAD && git checkout main &&\n \tgit branch -D stash-branch\" &&\n \ttest $(git ls-files --modified | wc -l) -eq 1\n '\n@@ -536,7 +536,7 @@ test_expect_success 'stash branch - stashes on stack, stash-like argument' '\n \tSTASH_ID=$(git stash create) &&\n \tgit reset --hard &&\n \tgit stash branch stash-branch ${STASH_ID} &&\n-\ttest_when_finished \"git reset --hard HEAD && git checkout master &&\n+\ttest_when_finished \"git reset --hard HEAD && git checkout main &&\n \tgit branch -D stash-branch\" &&\n \ttest $(git ls-files --modified | wc -l) -eq 1\n '\n@@ -738,7 +738,7 @@ test_expect_success 'valid ref of the form \"n\", n < N' '\n \tgit stash &&\n \tgit stash show 0 &&\n \tgit stash branch tmp 0 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit stash &&\n \tgit stash apply 0 &&\n \tgit reset --hard &&\n@@ -755,7 +755,7 @@ test_expect_success 'branch: do not drop the stash if the branch exists' '\n \tgit commit -m initial &&\n \techo bar >file &&\n \tgit stash &&\n-\ttest_must_fail git stash branch master stash@{0} &&\n+\ttest_must_fail git stash branch main stash@{0} &&\n \tgit rev-parse stash@{0} --\n '\n \n@@ -768,7 +768,7 @@ test_expect_success 'branch: should not drop the stash if the apply fails' '\n \techo bar >file &&\n \tgit stash &&\n \techo baz >file &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_must_fail git stash branch new_branch stash@{0} &&\n \tgit rev-parse stash@{0} --\n '\n@@ -902,7 +902,7 @@ test_expect_success 'push -m shows right message' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push -m \"test message\" &&\n-\techo \"stash@{0}: On master: test message\" >expect &&\n+\techo \"stash@{0}: On main: test message\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -911,7 +911,7 @@ test_expect_success 'push -m also works without space' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push -m\"unspaced test message\" &&\n-\techo \"stash@{0}: On master: unspaced test message\" >expect &&\n+\techo \"stash@{0}: On main: unspaced test message\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -968,7 +968,7 @@ test_expect_success 'push -mfoo uses right message' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push -m\"test mfoo\" &&\n-\techo \"stash@{0}: On master: test mfoo\" >expect &&\n+\techo \"stash@{0}: On main: test mfoo\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -977,7 +977,7 @@ test_expect_success 'push --message foo is synonym for -mfoo' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push --message \"test message foo\" &&\n-\techo \"stash@{0}: On master: test message foo\" >expect &&\n+\techo \"stash@{0}: On main: test message foo\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -986,7 +986,7 @@ test_expect_success 'push --message=foo is synonym for -mfoo' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push --message=\"test message=foo\" &&\n-\techo \"stash@{0}: On master: test message=foo\" >expect &&\n+\techo \"stash@{0}: On main: test message=foo\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -995,7 +995,7 @@ test_expect_success 'push -m shows right message' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push -m \"test m foo\" &&\n-\techo \"stash@{0}: On master: test m foo\" >expect &&\n+\techo \"stash@{0}: On main: test m foo\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -1004,7 +1004,7 @@ test_expect_success 'create stores correct message' '\n \t>foo &&\n \tgit add foo &&\n \tSTASH_ID=$(git stash create \"create test message\") &&\n-\techo \"On master: create test message\" >expect &&\n+\techo \"On main: create test message\" >expect &&\n \tgit show --pretty=%s -s ${STASH_ID} >actual &&\n \ttest_cmp expect actual\n '\n@@ -1013,13 +1013,13 @@ test_expect_success 'create with multiple arguments for the message' '\n \t>foo &&\n \tgit add foo &&\n \tSTASH_ID=$(git stash create test untracked) &&\n-\techo \"On master: test untracked\" >expect &&\n+\techo \"On main: test untracked\" >expect &&\n \tgit show --pretty=%s -s ${STASH_ID} >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'create in a detached state' '\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit checkout HEAD~1 &&\n \t>foo &&\n \tgit add foo &&\ndiff --git a/t/t3910-mac-os-precompose.sh b/t/t3910-mac-os-precompose.sh\nindex 54ce19e353..7e03823537 100755\n--- a/t/t3910-mac-os-precompose.sh\n+++ b/t/t3910-mac-os-precompose.sh\n@@ -151,7 +151,7 @@ test_expect_success \"git checkout link nfd\" '\n \tgit checkout l.$Odiarnfd\n '\n test_expect_success \"setup case mac2\" '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard &&\n \tgit checkout -b mac_os_2\n '\n@@ -163,7 +163,7 @@ test_expect_success \"commit file d2.Adiarnfd/f.Adiarnfd\" '\n \tgit commit -m \"add d2.$Adiarnfd/f.$Adiarnfd\" -- d2.$Adiarnfd/f.$Adiarnfd\n '\n test_expect_success \"setup for long decomposed filename\" '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard &&\n \tgit checkout -b mac_os_long_nfd_fn\n '\n@@ -173,7 +173,7 @@ test_expect_success \"Add long decomposed filename\" '\n \tgit commit -m \"Long filename\"\n '\n test_expect_success \"setup for long precomposed filename\" '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard &&\n \tgit checkout -b mac_os_long_nfc_fn\n '\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 4ae87a5c4e..76ab747b53 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-2]*|3[0-4]*)\n+[0-3]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409824","messageId":"af24b6d69de0241e16bbc074b7eba55c1e478ace.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 16/28] t5[6-9]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:46Z","receivedAt":"2020-11-12T22:44:19Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t5[6-9]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5601-clone.sh                    |  4 +-\n t/t5604-clone-reference.sh          | 12 +++---\n t/t5605-clone-local.sh              | 10 ++---\n t/t5606-clone-options.sh            |  8 ++--\n t/t5607-clone-bundle.sh             | 14 +++----\n t/t5608-clone-2gb.sh                |  2 +-\n t/t5609-clone-branch.sh             |  6 +--\n t/t5610-clone-detached.sh           |  4 +-\n t/t5611-clone-config.sh             | 16 ++++----\n t/t5612-clone-refspec.sh            | 42 ++++++++++-----------\n t/t5614-clone-submodules-shallow.sh |  2 +-\n t/t5616-partial-clone.sh            | 50 ++++++++++++-------------\n t/t5617-clone-submodules-remote.sh  |  6 +--\n t/t5700-protocol-v1.sh              | 16 ++++----\n t/t5701-git-serve.sh                | 16 ++++----\n t/t5702-protocol-v2.sh              | 50 ++++++++++++-------------\n t/t5703-upload-pack-ref-in-want.sh  | 58 ++++++++++++++---------------\n t/t5801-remote-helpers.sh           | 24 ++++++------\n t/test-lib.sh                       |  2 +-\n 19 files changed, 171 insertions(+), 171 deletions(-)\n\ndiff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\nindex 7df3c5373a..f5058be718 100755\n--- a/t/t5601-clone.sh\n+++ b/t/t5601-clone.sh\n@@ -217,7 +217,7 @@ test_expect_success 'clone respects global branch.autosetuprebase' '\n \t\trm -fr dst &&\n \t\tgit clone src dst &&\n \t\tcd dst &&\n-\t\tactual=\"z$(git config branch.master.rebase)\" &&\n+\t\tactual=\"z$(git config branch.main.rebase)\" &&\n \t\ttest ztrue = $actual\n \t)\n '\n@@ -591,7 +591,7 @@ test_expect_success 'clone from a repository with two identical branches' '\n \n \t(\n \t\tcd src &&\n-\t\tgit checkout -b another master\n+\t\tgit checkout -b another main\n \t) &&\n \tgit clone src target-11 &&\n \ttest \"z$( cd target-11 && git symbolic-ref HEAD )\" = zrefs/heads/another\ndiff --git a/t/t5604-clone-reference.sh b/t/t5604-clone-reference.sh\nindex 2f7be23044..db86a84af9 100755\n--- a/t/t5604-clone-reference.sh\n+++ b/t/t5604-clone-reference.sh\n@@ -49,7 +49,7 @@ test_expect_success 'existence of info/alternates' '\n '\n \n test_expect_success 'pulling from reference' '\n-\tgit -C C pull ../B master\n+\tgit -C C pull ../B main\n '\n \n test_expect_success 'that reference gets used' '\n@@ -70,7 +70,7 @@ test_expect_success 'existence of info/alternates' '\n '\n \n test_expect_success 'pulling from reference' '\n-\tgit -C D pull ../B master\n+\tgit -C D pull ../B main\n '\n \n test_expect_success 'that reference gets used' '\n@@ -136,11 +136,11 @@ test_expect_success 'prepare branched repository' '\n \tgit clone A J &&\n \t(\n \t\tcd J &&\n-\t\tgit checkout -b other master^ &&\n+\t\tgit checkout -b other main^ &&\n \t\techo other >otherfile &&\n \t\tgit add otherfile &&\n \t\tgit commit -m other &&\n-\t\tgit checkout master\n+\t\tgit checkout main\n \t)\n '\n \n@@ -152,9 +152,9 @@ test_expect_success 'fetch with incomplete alternates' '\n \t\tgit remote add J \"file://$base_dir/J\" &&\n \t\tGIT_TRACE_PACKET=$U.K git fetch J\n \t) &&\n-\tmaster_object=$(cd A && git for-each-ref --format=\"%(objectname)\" refs/heads/master) &&\n+\tmain_object=$(cd A && git for-each-ref --format=\"%(objectname)\" refs/heads/main) &&\n \ttest -s \"$U.K\" &&\n-\t! grep \" want $master_object\" \"$U.K\" &&\n+\t! grep \" want $main_object\" \"$U.K\" &&\n \ttag_object=$(cd A && git for-each-ref --format=\"%(objectname)\" refs/tags/HEAD) &&\n \t! grep \" want $tag_object\" \"$U.K\"\n '\ndiff --git a/t/t5605-clone-local.sh b/t/t5605-clone-local.sh\nindex af23419ebf..a7756e9622 100755\n--- a/t/t5605-clone-local.sh\n+++ b/t/t5605-clone-local.sh\n@@ -15,7 +15,7 @@ test_expect_success 'preparing origin repository' '\n \ttest \"$(cd a.git && git config --bool core.bare)\" = true &&\n \ttest \"$(cd x && git config --bool core.bare)\" = true &&\n \tgit bundle create b1.bundle --all &&\n-\tgit bundle create b2.bundle master &&\n+\tgit bundle create b2.bundle main &&\n \tmkdir dir &&\n \tcp b1.bundle dir/b3 &&\n \tcp b1.bundle b4\n@@ -84,7 +84,7 @@ test_expect_success 'bundle clone with nonexistent HEAD' '\n \tgit clone b2.bundle b2 &&\n \t(cd b2 &&\n \tgit fetch &&\n-\ttest_must_fail git rev-parse --verify refs/heads/master)\n+\ttest_must_fail git rev-parse --verify refs/heads/main)\n '\n \n test_expect_success 'clone empty repository' '\n@@ -98,9 +98,9 @@ test_expect_success 'clone empty repository' '\n \t echo \"content\" >> foo &&\n \t git add foo &&\n \t git commit -m \"Initial commit\" &&\n-\t git push origin master &&\n-\t expected=$(git rev-parse master) &&\n-\t actual=$(git --git-dir=../empty/.git rev-parse master) &&\n+\t git push origin main &&\n+\t expected=$(git rev-parse main) &&\n+\t actual=$(git --git-dir=../empty/.git rev-parse main) &&\n \t test $actual = $expected)\n '\n \ndiff --git a/t/t5606-clone-options.sh b/t/t5606-clone-options.sh\nindex 7f082fb23b..80caff9266 100755\n--- a/t/t5606-clone-options.sh\n+++ b/t/t5606-clone-options.sh\n@@ -15,7 +15,7 @@ test_expect_success 'setup' '\n test_expect_success 'clone -o' '\n \n \tgit clone -o foo parent clone-o &&\n-\tgit -C clone-o rev-parse --verify refs/remotes/foo/master\n+\tgit -C clone-o rev-parse --verify refs/remotes/foo/main\n \n '\n \n@@ -45,7 +45,7 @@ test_expect_success 'disallows --bare with --separate-git-dir' '\n test_expect_success 'uses \"origin\" for default remote name' '\n \n \tgit clone parent clone-default-origin &&\n-\tgit -C clone-default-origin rev-parse --verify refs/remotes/origin/master\n+\tgit -C clone-default-origin rev-parse --verify refs/remotes/origin/main\n \n '\n \n@@ -74,14 +74,14 @@ test_expect_success 'prefers config \"clone.defaultRemoteName\" over default' '\n \n \ttest_config_global clone.defaultRemoteName from_config &&\n \tgit clone parent clone-config-origin &&\n-\tgit -C clone-config-origin rev-parse --verify refs/remotes/from_config/master\n+\tgit -C clone-config-origin rev-parse --verify refs/remotes/from_config/main\n \n '\n \n test_expect_success 'prefers --origin over -c config' '\n \n \tgit clone -c clone.defaultRemoteName=inline --origin from_option parent clone-o-and-inline-config &&\n-\tgit -C clone-o-and-inline-config rev-parse --verify refs/remotes/from_option/master\n+\tgit -C clone-o-and-inline-config rev-parse --verify refs/remotes/from_option/main\n \n '\n \ndiff --git a/t/t5607-clone-bundle.sh b/t/t5607-clone-bundle.sh\nindex 26985f4b44..4f2db37981 100755\n--- a/t/t5607-clone-bundle.sh\n+++ b/t/t5607-clone-bundle.sh\n@@ -19,7 +19,7 @@ test_expect_success 'setup' '\n '\n \n test_expect_success '\"verify\" needs a worktree' '\n-\tgit bundle create tip.bundle -1 master &&\n+\tgit bundle create tip.bundle -1 main &&\n \tnongit test_must_fail git bundle verify ../tip.bundle 2>err &&\n \ttest_i18ngrep \"need a repository\" err\n '\n@@ -39,15 +39,15 @@ test_expect_success 'die if bundle file cannot be created' '\n '\n \n test_expect_failure 'bundle --stdin' '\n-\techo master | git bundle create stdin-bundle.bdl --stdin &&\n+\techo main | git bundle create stdin-bundle.bdl --stdin &&\n \tgit ls-remote stdin-bundle.bdl >output &&\n-\tgrep master output\n+\tgrep main output\n '\n \n test_expect_failure 'bundle --stdin <rev-list options>' '\n-\techo master | git bundle create hybrid-bundle.bdl --stdin tag &&\n+\techo main | git bundle create hybrid-bundle.bdl --stdin tag &&\n \tgit ls-remote hybrid-bundle.bdl >output &&\n-\tgrep master output\n+\tgrep main output\n '\n \n test_expect_success 'empty bundle file is rejected' '\n@@ -83,14 +83,14 @@ test_expect_success 'prerequisites with an empty commit message' '\n \n test_expect_success 'failed bundle creation does not leave cruft' '\n \t# This fails because the bundle would be empty.\n-\ttest_must_fail git bundle create fail.bundle master..master &&\n+\ttest_must_fail git bundle create fail.bundle main..main &&\n \ttest_path_is_missing fail.bundle.lock\n '\n \n test_expect_success 'fetch SHA-1 from bundle' '\n \ttest_create_repo foo &&\n \ttest_commit -C foo x &&\n-\tgit -C foo bundle create tip.bundle -1 master &&\n+\tgit -C foo bundle create tip.bundle -1 main &&\n \tgit -C foo rev-parse HEAD >hash &&\n \n \t# Exercise to ensure that fetching a SHA-1 from a bundle works with no\ndiff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\nindex 4c476d2fa1..87a8cd9f98 100755\n--- a/t/t5608-clone-2gb.sh\n+++ b/t/t5608-clone-2gb.sh\n@@ -26,7 +26,7 @@ test_expect_success 'setup' '\n \t\ti=$(($i+1)) ||\n \t\techo $? > exit-status\n \t done &&\n-\t echo \"commit refs/heads/master\" &&\n+\t echo \"commit refs/heads/main\" &&\n \t echo \"author A U Thor <author@email.com> 123456789 +0000\" &&\n \t echo \"committer C O Mitter <committer@email.com> 123456789 +0000\" &&\n \t echo \"data 5\" &&\ndiff --git a/t/t5609-clone-branch.sh b/t/t5609-clone-branch.sh\nindex 6e7a7be052..2652dbe4e4 100755\n--- a/t/t5609-clone-branch.sh\n+++ b/t/t5609-clone-branch.sh\n@@ -20,7 +20,7 @@ test_expect_success 'setup' '\n \t echo one >file && git add file && git commit -m one &&\n \t git checkout -b two &&\n \t echo two >file && git add file && git commit -m two &&\n-\t git checkout master) &&\n+\t git checkout main) &&\n \tmkdir empty &&\n \t(cd empty && git init)\n '\n@@ -28,7 +28,7 @@ test_expect_success 'setup' '\n test_expect_success 'vanilla clone chooses HEAD' '\n \tgit clone parent clone &&\n \t(cd clone &&\n-\t check_HEAD master &&\n+\t check_HEAD main &&\n \t check_file one\n \t)\n '\n@@ -53,7 +53,7 @@ test_expect_success 'clone -b sets up tracking' '\n \n test_expect_success 'clone -b does not munge remotes/origin/HEAD' '\n \t(cd clone-two &&\n-\t echo refs/remotes/origin/master >expect &&\n+\t echo refs/remotes/origin/main >expect &&\n \t git symbolic-ref refs/remotes/origin/HEAD >actual &&\n \t test_cmp expect actual\n \t)\ndiff --git a/t/t5610-clone-detached.sh b/t/t5610-clone-detached.sh\nindex 8b0d607df1..985f0d7303 100755\n--- a/t/t5610-clone-detached.sh\n+++ b/t/t5610-clone-detached.sh\n@@ -20,7 +20,7 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'clone repo (detached HEAD points to branch)' '\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit clone \"file://$PWD\" detached-branch\n '\n test_expect_success 'cloned HEAD matches' '\n@@ -59,7 +59,7 @@ test_expect_success 'cloned HEAD is detached' '\n '\n \n test_expect_success 'clone repo (orphan detached HEAD)' '\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \techo four >file &&\n \tgit commit -a -m four &&\n \tgit clone \"file://$PWD\" detached-orphan\ndiff --git a/t/t5611-clone-config.sh b/t/t5611-clone-config.sh\nindex 8e0fd39823..6e10ac9a9f 100755\n--- a/t/t5611-clone-config.sh\n+++ b/t/t5611-clone-config.sh\n@@ -47,16 +47,16 @@ test_expect_success 'clone -c config is available during clone' '\n \n test_expect_success 'clone -c remote.origin.fetch=<refspec> works' '\n \trm -rf child &&\n-\tgit update-ref refs/grab/it refs/heads/master &&\n-\tgit update-ref refs/leave/out refs/heads/master &&\n+\tgit update-ref refs/grab/it refs/heads/main &&\n+\tgit update-ref refs/leave/out refs/heads/main &&\n \tgit clone -c \"remote.origin.fetch=+refs/grab/*:refs/grab/*\" . child &&\n \tgit -C child for-each-ref --format=\"%(refname)\" >actual &&\n \n \tcat >expect <<-\\EOF &&\n \trefs/grab/it\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/remotes/origin/HEAD\n-\trefs/remotes/origin/master\n+\trefs/remotes/origin/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -68,9 +68,9 @@ test_expect_success 'git -c remote.origin.fetch=<refspec> clone works' '\n \n \tcat >expect <<-\\EOF &&\n \trefs/grab/it\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/remotes/origin/HEAD\n-\trefs/remotes/origin/master\n+\trefs/remotes/origin/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -85,9 +85,9 @@ test_expect_success 'clone -c remote.<remote>.fetch=<refspec> --origin=<name>' '\n \n \tcat >expect <<-\\EOF &&\n \trefs/grab/it\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/remotes/upstream/HEAD\n-\trefs/remotes/upstream/master\n+\trefs/remotes/upstream/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5612-clone-refspec.sh b/t/t5612-clone-refspec.sh\nindex e3b436d8ae..c045aba0fd 100755\n--- a/t/t5612-clone-refspec.sh\n+++ b/t/t5612-clone-refspec.sh\n@@ -4,7 +4,7 @@ test_description='test refspec written by clone-command'\n . ./test-lib.sh\n \n test_expect_success 'setup' '\n-\t# Make two branches, \"master\" and \"side\"\n+\t# Make two branches, \"main\" and \"side\"\n \techo one >file &&\n \tgit add file &&\n \tgit commit -m one &&\n@@ -16,7 +16,7 @@ test_expect_success 'setup' '\n \tgit checkout -b side &&\n \techo four >file &&\n \tgit commit -a -m four &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag five &&\n \n \t# default clone\n@@ -25,18 +25,18 @@ test_expect_success 'setup' '\n \t# default clone --no-tags\n \tgit clone --no-tags . dir_all_no_tags &&\n \n-\t# default --single that follows HEAD=master\n-\tgit clone --single-branch . dir_master &&\n+\t# default --single that follows HEAD=main\n+\tgit clone --single-branch . dir_main &&\n \n-\t# default --single that follows HEAD=master with no tags\n-\tgit clone --single-branch --no-tags . dir_master_no_tags &&\n+\t# default --single that follows HEAD=main with no tags\n+\tgit clone --single-branch --no-tags . dir_main_no_tags &&\n \n \t# default --single that follows HEAD=side\n \tgit checkout side &&\n \tgit clone --single-branch . dir_side &&\n \n \t# explicit --single that follows side\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit clone --single-branch --branch side . dir_side2 &&\n \n \t# default --single with --mirror\n@@ -55,11 +55,11 @@ test_expect_success 'setup' '\n \t# explicit --single with tag and --no-tags\n \tgit clone --single-branch --no-tags --branch two . dir_tag_no_tags &&\n \n-\t# advance both \"master\" and \"side\" branches\n+\t# advance both \"main\" and \"side\" branches\n \tgit checkout side &&\n \techo five >file &&\n \tgit commit -a -m five &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo six >file &&\n \tgit commit -a -m six &&\n \n@@ -75,7 +75,7 @@ test_expect_success 'by default all branches will be kept updated' '\n \t\tsed -e \"/HEAD$/d\" \\\n \t\t    -e \"s|/remotes/origin/|/heads/|\" refs >../actual\n \t) &&\n-\t# follow both master and side\n+\t# follow both main and side\n \tgit for-each-ref refs/heads >expect &&\n \ttest_cmp expect actual\n '\n@@ -100,20 +100,20 @@ test_expect_success 'clone with --no-tags' '\n \ttest_must_be_empty actual\n '\n \n-test_expect_success '--single-branch while HEAD pointing at master' '\n+test_expect_success '--single-branch while HEAD pointing at main' '\n \t(\n-\t\tcd dir_master &&\n+\t\tcd dir_main &&\n \t\tgit fetch --force &&\n \t\tgit for-each-ref refs/remotes/origin >refs &&\n \t\tsed -e \"/HEAD$/d\" \\\n \t\t    -e \"s|/remotes/origin/|/heads/|\" refs >../actual\n \t) &&\n-\t# only follow master\n-\tgit for-each-ref refs/heads/master >expect &&\n+\t# only follow main\n+\tgit for-each-ref refs/heads/main >expect &&\n \t# get & check latest tags\n \ttest_cmp expect actual &&\n \t(\n-\t\tcd dir_master &&\n+\t\tcd dir_main &&\n \t\tgit fetch --tags --force &&\n \t\tgit for-each-ref refs/tags >../actual\n \t) &&\n@@ -122,20 +122,20 @@ test_expect_success '--single-branch while HEAD pointing at master' '\n \ttest_line_count = 2 actual\n '\n \n-test_expect_success '--single-branch while HEAD pointing at master and --no-tags' '\n+test_expect_success '--single-branch while HEAD pointing at main and --no-tags' '\n \t(\n-\t\tcd dir_master_no_tags &&\n+\t\tcd dir_main_no_tags &&\n \t\tgit fetch &&\n \t\tgit for-each-ref refs/remotes/origin >refs &&\n \t\tsed -e \"/HEAD$/d\" \\\n \t\t    -e \"s|/remotes/origin/|/heads/|\" refs >../actual\n \t) &&\n-\t# only follow master\n-\tgit for-each-ref refs/heads/master >expect &&\n+\t# only follow main\n+\tgit for-each-ref refs/heads/main >expect &&\n \ttest_cmp expect actual &&\n \t# get tags (noop)\n \t(\n-\t\tcd dir_master_no_tags &&\n+\t\tcd dir_main_no_tags &&\n \t\tgit fetch &&\n \t\tgit for-each-ref refs/tags >../actual\n \t) &&\n@@ -143,7 +143,7 @@ test_expect_success '--single-branch while HEAD pointing at master and --no-tags\n \ttest_line_count = 0 actual &&\n \t# get tags with --tags overrides tagOpt\n \t(\n-\t\tcd dir_master_no_tags &&\n+\t\tcd dir_main_no_tags &&\n \t\tgit fetch --tags &&\n \t\tgit for-each-ref refs/tags >../actual\n \t) &&\ndiff --git a/t/t5614-clone-submodules-shallow.sh b/t/t5614-clone-submodules-shallow.sh\nindex e4e6ea4d52..5504b519c7 100755\n--- a/t/t5614-clone-submodules-shallow.sh\n+++ b/t/t5614-clone-submodules-shallow.sh\n@@ -7,7 +7,7 @@ test_description='Test shallow cloning of repos with submodules'\n pwd=$(pwd)\n \n test_expect_success 'setup' '\n-\tgit checkout -b master &&\n+\tgit checkout -b main &&\n \ttest_commit commit1 &&\n \ttest_commit commit2 &&\n \tmkdir sub &&\ndiff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh\nindex f4d49d8335..273c0183e2 100755\n--- a/t/t5616-partial-clone.sh\n+++ b/t/t5616-partial-clone.sh\n@@ -51,14 +51,14 @@ test_expect_success 'verify that .promisor file contains refs fetched' '\n \ttest_line_count = 1 promisorlist &&\n \tgit -C srv.bare rev-parse --verify HEAD >headhash &&\n \tgrep \"$(cat headhash) HEAD\" $(cat promisorlist) &&\n-\tgrep \"$(cat headhash) refs/heads/master\" $(cat promisorlist)\n+\tgrep \"$(cat headhash) refs/heads/main\" $(cat promisorlist)\n '\n \n-# checkout master to force dynamic object fetch of blobs at HEAD.\n+# checkout main to force dynamic object fetch of blobs at HEAD.\n test_expect_success 'verify checkout with dynamic object fetch' '\n \tgit -C pc1 rev-list --quiet --objects --missing=print HEAD >observed &&\n \ttest_line_count = 4 observed &&\n-\tgit -C pc1 checkout master &&\n+\tgit -C pc1 checkout main &&\n \tgit -C pc1 rev-list --quiet --objects --missing=print HEAD >observed &&\n \ttest_line_count = 0 observed\n '\n@@ -73,8 +73,8 @@ test_expect_success 'push new commits to server' '\n \t\tgit -C src add file.1.txt\n \t\tgit -C src commit -m \"mod $x\"\n \tdone &&\n-\tgit -C src blame master -- file.1.txt >expect.blame &&\n-\tgit -C src push -u srv master\n+\tgit -C src blame main -- file.1.txt >expect.blame &&\n+\tgit -C src push -u srv main\n '\n \n # (partial) fetch in the partial clone repo from the promisor remote.\n@@ -83,26 +83,26 @@ test_expect_success 'push new commits to server' '\n test_expect_success 'partial fetch inherits filter settings' '\n \tgit -C pc1 fetch origin &&\n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\tmaster..origin/master >observed &&\n+\t\tmain..origin/main >observed &&\n \ttest_line_count = 5 observed\n '\n \n # force dynamic object fetch using diff.\n-# we should only get 1 new blob (for the file in origin/master).\n+# we should only get 1 new blob (for the file in origin/main).\n test_expect_success 'verify diff causes dynamic object fetch' '\n-\tgit -C pc1 diff master..origin/master -- file.1.txt &&\n+\tgit -C pc1 diff main..origin/main -- file.1.txt &&\n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\t master..origin/master >observed &&\n+\t\t main..origin/main >observed &&\n \ttest_line_count = 4 observed\n '\n \n # force full dynamic object fetch of the file's history using blame.\n # we should get the intermediate blobs for the file.\n test_expect_success 'verify blame causes dynamic object fetch' '\n-\tgit -C pc1 blame origin/master -- file.1.txt >observed.blame &&\n+\tgit -C pc1 blame origin/main -- file.1.txt >observed.blame &&\n \ttest_cmp expect.blame observed.blame &&\n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\tmaster..origin/master >observed &&\n+\t\tmain..origin/main >observed &&\n \ttest_line_count = 0 observed\n '\n \n@@ -115,7 +115,7 @@ test_expect_success 'push new commits to server for file.2.txt' '\n \t\tgit -C src add file.2.txt\n \t\tgit -C src commit -m \"mod $x\"\n \tdone &&\n-\tgit -C src push -u srv master\n+\tgit -C src push -u srv main\n '\n \n # Do FULL fetch by disabling inherited filter-spec using --no-filter.\n@@ -123,7 +123,7 @@ test_expect_success 'push new commits to server for file.2.txt' '\n test_expect_success 'override inherited filter-spec using --no-filter' '\n \tgit -C pc1 fetch --no-filter origin &&\n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\tmaster..origin/master >observed &&\n+\t\tmain..origin/main >observed &&\n \ttest_line_count = 0 observed\n '\n \n@@ -136,7 +136,7 @@ test_expect_success 'push new commits to server for file.3.txt' '\n \t\tgit -C src add file.3.txt\n \t\tgit -C src commit -m \"mod $x\"\n \tdone &&\n-\tgit -C src push -u srv master\n+\tgit -C src push -u srv main\n '\n \n # Do a partial fetch and then try to manually fetch the missing objects.\n@@ -146,7 +146,7 @@ test_expect_success 'manual prefetch of missing objects' '\n \tgit -C pc1 fetch --filter=blob:none origin &&\n \n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\t master..origin/master >revs &&\n+\t\t main..origin/main >revs &&\n \tawk -f print_1.awk revs |\n \tsed \"s/?//\" |\n \tsort >observed.oids &&\n@@ -155,7 +155,7 @@ test_expect_success 'manual prefetch of missing objects' '\n \tgit -C pc1 fetch-pack --stdin \"file://$(pwd)/srv.bare\" <observed.oids &&\n \n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\tmaster..origin/master >revs &&\n+\t\tmain..origin/main >revs &&\n \tawk -f print_1.awk revs |\n \tsed \"s/?//\" |\n \tsort >observed.oids &&\n@@ -196,7 +196,7 @@ test_expect_success 'use fsck before and after manually fetching a missing subtr\n \techo \"in dir\" >src/dir/file.txt &&\n \tgit -C src add dir/file.txt &&\n \tgit -C src commit -m \"file in dir\" &&\n-\tgit -C src push -u srv master &&\n+\tgit -C src push -u srv main &&\n \tSUBTREE=$(git -C src rev-parse HEAD:dir) &&\n \n \trm -rf dst &&\n@@ -204,7 +204,7 @@ test_expect_success 'use fsck before and after manually fetching a missing subtr\n \tgit -C dst fsck &&\n \n \t# Make sure we only have commits, and all trees and blobs are missing.\n-\tgit -C dst rev-list --missing=allow-any --objects master \\\n+\tgit -C dst rev-list --missing=allow-any --objects main \\\n \t\t>fetched_objects &&\n \tawk -f print_1.awk fetched_objects |\n \txargs -n1 git -C dst cat-file -t >fetched_types &&\n@@ -221,7 +221,7 @@ test_expect_success 'use fsck before and after manually fetching a missing subtr\n \tgit -C dst fsck &&\n \n \t# Auto-fetch all remaining trees and blobs with --missing=error\n-\tgit -C dst rev-list --missing=error --objects master >fetched_objects &&\n+\tgit -C dst rev-list --missing=error --objects main >fetched_objects &&\n \ttest_line_count = 70 fetched_objects &&\n \n \tawk -f print_1.awk fetched_objects |\n@@ -331,7 +331,7 @@ test_expect_success 'setup src repo for sparse filter' '\n test_expect_success 'partial clone with sparse filter succeeds' '\n \trm -rf dst.git &&\n \tgit clone --no-local --bare \\\n-\t\t  --filter=sparse:oid=master:only-one \\\n+\t\t  --filter=sparse:oid=main:only-one \\\n \t\t  sparse-src dst.git &&\n \t(\n \t\tcd dst.git &&\n@@ -344,11 +344,11 @@ test_expect_success 'partial clone with sparse filter succeeds' '\n test_expect_success 'partial clone with unresolvable sparse filter fails cleanly' '\n \trm -rf dst.git &&\n \ttest_must_fail git clone --no-local --bare \\\n-\t\t\t\t --filter=sparse:oid=master:no-such-name \\\n+\t\t\t\t --filter=sparse:oid=main:no-such-name \\\n \t\t\t\t sparse-src dst.git 2>err &&\n-\ttest_i18ngrep \"unable to access sparse blob in .master:no-such-name\" err &&\n+\ttest_i18ngrep \"unable to access sparse blob in .main:no-such-name\" err &&\n \ttest_must_fail git clone --no-local --bare \\\n-\t\t\t\t --filter=sparse:oid=master \\\n+\t\t\t\t --filter=sparse:oid=main \\\n \t\t\t\t sparse-src dst.git 2>err &&\n \ttest_i18ngrep \"unable to parse sparse filter data in\" err\n '\n@@ -403,7 +403,7 @@ test_expect_success 'fetch lazy-fetches only to resolve deltas' '\n \t# promisor remote other than for the big tree (because it needs to\n \t# resolve the delta).\n \tGIT_TRACE_PACKET=\"$(pwd)/trace\" git -C client \\\n-\t\tfetch \"file://$(pwd)/server\" master &&\n+\t\tfetch \"file://$(pwd)/server\" main &&\n \n \t# Verify the assumption that the client needed to fetch the delta base\n \t# to resolve the delta.\n@@ -422,7 +422,7 @@ test_expect_success 'fetch lazy-fetches only to resolve deltas, protocol v2' '\n \t# promisor remote other than for the big blob (because it needs to\n \t# resolve the delta).\n \tGIT_TRACE_PACKET=\"$(pwd)/trace\" git -C client \\\n-\t\tfetch \"file://$(pwd)/server\" master &&\n+\t\tfetch \"file://$(pwd)/server\" main &&\n \n \t# Verify that protocol version 2 was used.\n \tgrep \"fetch< version 2\" trace &&\ndiff --git a/t/t5617-clone-submodules-remote.sh b/t/t5617-clone-submodules-remote.sh\nindex 1a041df10b..abab358119 100755\n--- a/t/t5617-clone-submodules-remote.sh\n+++ b/t/t5617-clone-submodules-remote.sh\n@@ -7,7 +7,7 @@ test_description='Test cloning repos with submodules using remote-tracking branc\n pwd=$(pwd)\n \n test_expect_success 'setup' '\n-\tgit checkout -b master &&\n+\tgit checkout -b main &&\n \ttest_commit commit1 &&\n \tmkdir sub &&\n \t(\n@@ -39,7 +39,7 @@ test_expect_success 'clone with --remote-submodules' '\n \tgit clone --recurse-submodules --remote-submodules \"file://$pwd/.\" super_clone &&\n \t(\n \t\tcd super_clone/sub &&\n-\t\tgit diff --exit-code remotes/origin/master\n+\t\tgit diff --exit-code remotes/origin/main\n \t)\n '\n \n@@ -57,7 +57,7 @@ test_expect_success 'clone with --single-branch' '\n \tgit clone --recurse-submodules --single-branch \"file://$pwd/.\" super_clone &&\n \t(\n \t\tcd super_clone/sub &&\n-\t\tgit rev-parse --verify origin/master &&\n+\t\tgit rev-parse --verify origin/main &&\n \t\ttest_must_fail git rev-parse --verify origin/other\n \t)\n '\ndiff --git a/t/t5700-protocol-v1.sh b/t/t5700-protocol-v1.sh\nindex 022901b9eb..bfa7e3379a 100755\n--- a/t/t5700-protocol-v1.sh\n+++ b/t/t5700-protocol-v1.sh\n@@ -41,7 +41,7 @@ test_expect_success 'fetch with git:// using protocol v1' '\n \tGIT_TRACE_PACKET=1 git -C daemon_child -c protocol.version=1 \\\n \t\tfetch 2>log &&\n \n-\tgit -C daemon_child log -1 --format=%s origin/master >actual &&\n+\tgit -C daemon_child log -1 --format=%s origin/main >actual &&\n \tgit -C \"$daemon_parent\" log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -69,7 +69,7 @@ test_expect_success 'push with git:// using protocol v1' '\n \ttest_commit -C daemon_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=1 git -C daemon_child -c protocol.version=1 \\\n \t\tpush origin HEAD:client_branch 2>log &&\n \n@@ -110,7 +110,7 @@ test_expect_success 'fetch with file:// using protocol v1' '\n \tGIT_TRACE_PACKET=1 git -C file_child -c protocol.version=1 \\\n \t\tfetch 2>log &&\n \n-\tgit -C file_child log -1 --format=%s origin/master >actual &&\n+\tgit -C file_child log -1 --format=%s origin/main >actual &&\n \tgit -C file_parent log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -134,7 +134,7 @@ test_expect_success 'push with file:// using protocol v1' '\n \ttest_commit -C file_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=1 git -C file_child -c protocol.version=1 \\\n \t\tpush origin HEAD:client_branch 2>log &&\n \n@@ -188,7 +188,7 @@ test_expect_success 'fetch with ssh:// using protocol v1' '\n \t\tfetch 2>log &&\n \texpect_ssh git-upload-pack &&\n \n-\tgit -C ssh_child log -1 --format=%s origin/master >actual &&\n+\tgit -C ssh_child log -1 --format=%s origin/main >actual &&\n \tgit -C ssh_parent log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -213,7 +213,7 @@ test_expect_success 'push with ssh:// using protocol v1' '\n \ttest_commit -C ssh_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=1 git -C ssh_child -c protocol.version=1 \\\n \t\tpush origin HEAD:client_branch 2>log &&\n \texpect_ssh git-receive-pack &&\n@@ -257,7 +257,7 @@ test_expect_success 'fetch with http:// using protocol v1' '\n \tGIT_TRACE_PACKET=1 git -C http_child -c protocol.version=1 \\\n \t\tfetch 2>log &&\n \n-\tgit -C http_child log -1 --format=%s origin/master >actual &&\n+\tgit -C http_child log -1 --format=%s origin/main >actual &&\n \tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH/http_parent\" log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -281,7 +281,7 @@ test_expect_success 'push with http:// using protocol v1' '\n \ttest_commit -C http_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=1 git -C http_child -c protocol.version=1 \\\n \t\tpush origin HEAD:client_branch && #2>log &&\n \ndiff --git a/t/t5701-git-serve.sh b/t/t5701-git-serve.sh\nindex a1f5fdc9fd..3a04a56c2c 100755\n--- a/t/t5701-git-serve.sh\n+++ b/t/t5701-git-serve.sh\n@@ -83,9 +83,9 @@ test_expect_success 'wrong object-format' '\n #\n test_expect_success 'setup some refs and tags' '\n \ttest_commit one &&\n-\tgit branch dev master &&\n+\tgit branch dev main &&\n \ttest_commit two &&\n-\tgit symbolic-ref refs/heads/release refs/heads/master &&\n+\tgit symbolic-ref refs/heads/release refs/heads/main &&\n \tgit tag -a -m \"annotated tag\" annotated-tag\n '\n \n@@ -99,7 +99,7 @@ test_expect_success 'basics of ls-refs' '\n \tcat >expect <<-EOF &&\n \t$(git rev-parse HEAD) HEAD\n \t$(git rev-parse refs/heads/dev) refs/heads/dev\n-\t$(git rev-parse refs/heads/master) refs/heads/master\n+\t$(git rev-parse refs/heads/main) refs/heads/main\n \t$(git rev-parse refs/heads/release) refs/heads/release\n \t$(git rev-parse refs/tags/annotated-tag) refs/tags/annotated-tag\n \t$(git rev-parse refs/tags/one) refs/tags/one\n@@ -117,13 +117,13 @@ test_expect_success 'basic ref-prefixes' '\n \tcommand=ls-refs\n \tobject-format=$(test_oid algo)\n \t0001\n-\tref-prefix refs/heads/master\n+\tref-prefix refs/heads/main\n \tref-prefix refs/tags/one\n \t0000\n \tEOF\n \n \tcat >expect <<-EOF &&\n-\t$(git rev-parse refs/heads/master) refs/heads/master\n+\t$(git rev-parse refs/heads/main) refs/heads/main\n \t$(git rev-parse refs/tags/one) refs/tags/one\n \t0000\n \tEOF\n@@ -144,7 +144,7 @@ test_expect_success 'refs/heads prefix' '\n \n \tcat >expect <<-EOF &&\n \t$(git rev-parse refs/heads/dev) refs/heads/dev\n-\t$(git rev-parse refs/heads/master) refs/heads/master\n+\t$(git rev-parse refs/heads/main) refs/heads/main\n \t$(git rev-parse refs/heads/release) refs/heads/release\n \t0000\n \tEOF\n@@ -188,8 +188,8 @@ test_expect_success 'symrefs parameter' '\n \n \tcat >expect <<-EOF &&\n \t$(git rev-parse refs/heads/dev) refs/heads/dev\n-\t$(git rev-parse refs/heads/master) refs/heads/master\n-\t$(git rev-parse refs/heads/release) refs/heads/release symref-target:refs/heads/master\n+\t$(git rev-parse refs/heads/main) refs/heads/main\n+\t$(git rev-parse refs/heads/release) refs/heads/release symref-target:refs/heads/main\n \t0000\n \tEOF\n \ndiff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh\nindex 7d5b17909b..1aeb6b6dd7 100755\n--- a/t/t5702-protocol-v2.sh\n+++ b/t/t5702-protocol-v2.sh\n@@ -36,10 +36,10 @@ test_expect_success 'ref advertisement is filtered with ls-remote using protocol\n \ttest_when_finished \"rm -f log\" &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -c protocol.version=2 \\\n-\t\tls-remote \"$GIT_DAEMON_URL/parent\" master >actual &&\n+\t\tls-remote \"$GIT_DAEMON_URL/parent\" main >actual &&\n \n \tcat >expect <<-EOF &&\n-\t$(git -C \"$daemon_parent\" rev-parse refs/heads/master)$(printf \"\\t\")refs/heads/master\n+\t$(git -C \"$daemon_parent\" rev-parse refs/heads/main)$(printf \"\\t\")refs/heads/main\n \tEOF\n \n \ttest_cmp expect actual\n@@ -69,7 +69,7 @@ test_expect_success 'fetch with git:// using protocol v2' '\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C daemon_child -c protocol.version=2 \\\n \t\tfetch &&\n \n-\tgit -C daemon_child log -1 --format=%s origin/master >actual &&\n+\tgit -C daemon_child log -1 --format=%s origin/main >actual &&\n \tgit -C \"$daemon_parent\" log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -118,7 +118,7 @@ test_expect_success 'push with git:// and a config of v2 does not request v2' '\n \ttest_commit -C daemon_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C daemon_child -c protocol.version=2 \\\n \t\tpush origin HEAD:client_branch &&\n \n@@ -158,10 +158,10 @@ test_expect_success 'ref advertisement is filtered with ls-remote using protocol\n \ttest_when_finished \"rm -f log\" &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -c protocol.version=2 \\\n-\t\tls-remote \"file://$(pwd)/file_parent\" master >actual &&\n+\t\tls-remote \"file://$(pwd)/file_parent\" main >actual &&\n \n \tcat >expect <<-EOF &&\n-\t$(git -C file_parent rev-parse refs/heads/master)$(printf \"\\t\")refs/heads/master\n+\t$(git -C file_parent rev-parse refs/heads/main)$(printf \"\\t\")refs/heads/main\n \tEOF\n \n \ttest_cmp expect actual\n@@ -171,10 +171,10 @@ test_expect_success 'server-options are sent when using ls-remote' '\n \ttest_when_finished \"rm -f log\" &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -c protocol.version=2 \\\n-\t\tls-remote -o hello -o world \"file://$(pwd)/file_parent\" master >actual &&\n+\t\tls-remote -o hello -o world \"file://$(pwd)/file_parent\" main >actual &&\n \n \tcat >expect <<-EOF &&\n-\t$(git -C file_parent rev-parse refs/heads/master)$(printf \"\\t\")refs/heads/master\n+\t$(git -C file_parent rev-parse refs/heads/main)$(printf \"\\t\")refs/heads/main\n \tEOF\n \n \ttest_cmp expect actual &&\n@@ -184,7 +184,7 @@ test_expect_success 'server-options are sent when using ls-remote' '\n \n test_expect_success 'warn if using server-option with ls-remote with legacy protocol' '\n \ttest_must_fail env GIT_TEST_PROTOCOL_VERSION=0 git -c protocol.version=0 \\\n-\t\tls-remote -o hello -o world \"file://$(pwd)/file_parent\" master 2>err &&\n+\t\tls-remote -o hello -o world \"file://$(pwd)/file_parent\" main 2>err &&\n \n \ttest_i18ngrep \"see protocol.version in\" err &&\n \ttest_i18ngrep \"server options require protocol version 2 or later\" err\n@@ -217,7 +217,7 @@ test_expect_success 'fetch with file:// using protocol v2' '\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C file_child -c protocol.version=2 \\\n \t\tfetch origin &&\n \n-\tgit -C file_child log -1 --format=%s origin/master >actual &&\n+\tgit -C file_child log -1 --format=%s origin/main >actual &&\n \tgit -C file_parent log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -232,13 +232,13 @@ test_expect_success 'ref advertisement is filtered during fetch using protocol v\n \tgit -C file_parent branch unwanted-branch three &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C file_child -c protocol.version=2 \\\n-\t\tfetch origin master &&\n+\t\tfetch origin main &&\n \n-\tgit -C file_child log -1 --format=%s origin/master >actual &&\n+\tgit -C file_child log -1 --format=%s origin/main >actual &&\n \tgit -C file_parent log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n-\tgrep \"refs/heads/master\" log &&\n+\tgrep \"refs/heads/main\" log &&\n \t! grep \"refs/heads/unwanted-branch\" log\n '\n \n@@ -248,9 +248,9 @@ test_expect_success 'server-options are sent when fetching' '\n \ttest_commit -C file_parent four &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C file_child -c protocol.version=2 \\\n-\t\tfetch -o hello -o world origin master &&\n+\t\tfetch -o hello -o world origin main &&\n \n-\tgit -C file_child log -1 --format=%s origin/master >actual &&\n+\tgit -C file_child log -1 --format=%s origin/main >actual &&\n \tgit -C file_parent log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -264,7 +264,7 @@ test_expect_success 'warn if using server-option with fetch with legacy protocol\n \tgit init temp_child &&\n \n \ttest_must_fail env GIT_TEST_PROTOCOL_VERSION=0 git -C temp_child -c protocol.version=0 \\\n-\t\tfetch -o hello -o world \"file://$(pwd)/file_parent\" master 2>err &&\n+\t\tfetch -o hello -o world \"file://$(pwd)/file_parent\" main 2>err &&\n \n \ttest_i18ngrep \"see protocol.version in\" err &&\n \ttest_i18ngrep \"server options require protocol version 2 or later\" err\n@@ -325,7 +325,7 @@ test_expect_success 'partial clone' '\n \tgrep \"version 2\" trace &&\n \n \t# Ensure that the old version of the file is missing\n-\tgit -C client rev-list --quiet --objects --missing=print master \\\n+\tgit -C client rev-list --quiet --objects --missing=print main \\\n \t\t>observed.oids &&\n \tgrep \"$(git -C server rev-parse message1:a.txt)\" observed.oids &&\n \n@@ -350,7 +350,7 @@ test_expect_success 'partial fetch' '\n \tSERVER=\"file://$(pwd)/server\" &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/trace\" git -C client -c protocol.version=2 \\\n-\t\tfetch --filter=blob:none \"$SERVER\" master:refs/heads/other &&\n+\t\tfetch --filter=blob:none \"$SERVER\" main:refs/heads/other &&\n \tgrep \"version 2\" trace &&\n \n \t# Ensure that the old version of the file is missing\n@@ -395,7 +395,7 @@ test_expect_success 'even with handcrafted request, filter does not work if not\n \tcommand=fetch\n \tobject-format=$(test_oid algo)\n \t0001\n-\twant $(git -C server rev-parse master)\n+\twant $(git -C server rev-parse main)\n \tfilter blob:none\n \t0000\n \tEOF\n@@ -539,7 +539,7 @@ test_expect_success 'deepen-relative' '\n \ttest_commit -C server four &&\n \n \t# Sanity check that only \"three\" is downloaded\n-\tgit -C client log --pretty=tformat:%s master >actual &&\n+\tgit -C client log --pretty=tformat:%s main >actual &&\n \techo three >expected &&\n \ttest_cmp expected actual &&\n \n@@ -548,7 +548,7 @@ test_expect_success 'deepen-relative' '\n \t# Ensure that protocol v2 is used\n \tgrep \"fetch< version 2\" trace &&\n \n-\tgit -C client log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C client log --pretty=tformat:%s origin/main >actual &&\n \tcat >expected <<-\\EOF &&\n \tfour\n \tthree\n@@ -670,7 +670,7 @@ test_expect_success 'fetch with http:// using protocol v2' '\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C http_child -c protocol.version=2 \\\n \t\tfetch &&\n \n-\tgit -C http_child log -1 --format=%s origin/master >actual &&\n+\tgit -C http_child log -1 --format=%s origin/main >actual &&\n \tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH/http_parent\" log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -698,11 +698,11 @@ test_expect_success 'fetch from namespaced repo respects namespaces' '\n \ttest_commit -C \"$HTTPD_DOCUMENT_ROOT_PATH/nsrepo\" one &&\n \ttest_commit -C \"$HTTPD_DOCUMENT_ROOT_PATH/nsrepo\" two &&\n \tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH/nsrepo\" \\\n-\t\tupdate-ref refs/namespaces/ns/refs/heads/master one &&\n+\t\tupdate-ref refs/namespaces/ns/refs/heads/main one &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C http_child -c protocol.version=2 \\\n \t\tfetch \"$HTTPD_URL/smart_namespace/nsrepo\" \\\n-\t\trefs/heads/master:refs/heads/theirs &&\n+\t\trefs/heads/main:refs/heads/theirs &&\n \n \t# Server responded using protocol v2\n \tgrep \"fetch< version 2\" log &&\n@@ -733,7 +733,7 @@ test_expect_success 'push with http:// and a config of v2 does not request v2' '\n \ttest_commit -C http_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C http_child -c protocol.version=2 \\\n \t\tpush origin HEAD:client_branch &&\n \ndiff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\nindex b46940b725..bbf03a8f66 100755\n--- a/t/t5703-upload-pack-ref-in-want.sh\n+++ b/t/t5703-upload-pack-ref-in-want.sh\n@@ -38,7 +38,7 @@ write_command () {\n \n # c(o/foo) d(o/bar)\n #        \\ /\n-#         b   e(baz)  f(master)\n+#         b   e(baz)  f(main)\n #          \\__  |  __/\n #             \\ | /\n #               a\n@@ -51,7 +51,7 @@ test_expect_success 'setup repository' '\n \ttest_commit d &&\n \tgit checkout -b baz a &&\n \ttest_commit e &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit f\n '\n \n@@ -88,7 +88,7 @@ test_expect_success 'invalid want-ref line' '\n test_expect_success 'basic want-ref' '\n \toid=$(git rev-parse f) &&\n \tcat >expected_refs <<-EOF &&\n-\t$oid refs/heads/master\n+\t$oid refs/heads/main\n \tEOF\n \tgit rev-parse f >expected_commits &&\n \n@@ -97,7 +97,7 @@ test_expect_success 'basic want-ref' '\n \t$(write_command fetch)\n \t0001\n \tno-progress\n-\twant-ref refs/heads/master\n+\twant-ref refs/heads/main\n \thave $oid\n \tdone\n \t0000\n@@ -135,7 +135,7 @@ test_expect_success 'multiple want-ref lines' '\n test_expect_success 'mix want and want-ref' '\n \toid=$(git rev-parse f) &&\n \tcat >expected_refs <<-EOF &&\n-\t$oid refs/heads/master\n+\t$oid refs/heads/main\n \tEOF\n \tgit rev-parse e f >expected_commits &&\n \n@@ -143,7 +143,7 @@ test_expect_success 'mix want and want-ref' '\n \t$(write_command fetch)\n \t0001\n \tno-progress\n-\twant-ref refs/heads/master\n+\twant-ref refs/heads/main\n \twant $(git rev-parse e)\n \thave $(git rev-parse a)\n \tdone\n@@ -182,7 +182,7 @@ LOCAL_PRISTINE=\"$(pwd)/local_pristine\"\n # $REPO\n # c(o/foo) d(o/bar)\n #        \\ /\n-#         b   e(baz)  f(master)\n+#         b   e(baz)  f(main)\n #          \\__  |  __/\n #             \\ | /\n #               a\n@@ -193,7 +193,7 @@ LOCAL_PRISTINE=\"$(pwd)/local_pristine\"\n #\t\t.\n #\t\t.\n #\t\t|\n-#\t\ta(master)\n+#\t\ta(main)\n test_expect_success 'setup repos for fetching with ref-in-want tests' '\n \t(\n \t\tgit init \"$REPO\" &&\n@@ -209,7 +209,7 @@ test_expect_success 'setup repos for fetching with ref-in-want tests' '\n \t\ttest_commit_bulk --id=s 33 &&\n \n \t\t# Add novel commits to upstream\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tcd \"$REPO\" &&\n \t\tgit checkout -b o/foo &&\n \t\ttest_commit b &&\n@@ -218,7 +218,7 @@ test_expect_success 'setup repos for fetching with ref-in-want tests' '\n \t\ttest_commit d &&\n \t\tgit checkout -b baz a &&\n \t\ttest_commit e &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit f\n \t) &&\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant true &&\n@@ -245,12 +245,12 @@ test_expect_success 'fetching multiple refs' '\n \n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C local fetch origin master baz &&\n+\tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C local fetch origin main baz &&\n \n-\tgit -C \"$REPO\" rev-parse \"master\" \"baz\" >expected &&\n-\tgit -C local rev-parse refs/remotes/origin/master refs/remotes/origin/baz >actual &&\n+\tgit -C \"$REPO\" rev-parse \"main\" \"baz\" >expected &&\n+\tgit -C local rev-parse refs/remotes/origin/main refs/remotes/origin/baz >actual &&\n \ttest_cmp expected actual &&\n-\tgrep \"want-ref refs/heads/master\" log &&\n+\tgrep \"want-ref refs/heads/main\" log &&\n \tgrep \"want-ref refs/heads/baz\" log\n '\n \n@@ -261,13 +261,13 @@ test_expect_success 'fetching ref and exact OID' '\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n \toid=$(git -C \"$REPO\" rev-parse b) &&\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C local fetch origin \\\n-\t\tmaster \"$oid\":refs/heads/actual &&\n+\t\tmain \"$oid\":refs/heads/actual &&\n \n-\tgit -C \"$REPO\" rev-parse \"master\" \"b\" >expected &&\n-\tgit -C local rev-parse refs/remotes/origin/master refs/heads/actual >actual &&\n+\tgit -C \"$REPO\" rev-parse \"main\" \"b\" >expected &&\n+\tgit -C local rev-parse refs/remotes/origin/main refs/heads/actual >actual &&\n \ttest_cmp expected actual &&\n \tgrep \"want $oid\" log &&\n-\tgrep \"want-ref refs/heads/master\" log\n+\tgrep \"want-ref refs/heads/main\" log\n '\n \n test_expect_success 'fetching with wildcard that does not match any refs' '\n@@ -316,7 +316,7 @@ test_expect_success 'setup repos for change-while-negotiating test' '\n \t\ttest_commit_bulk --id=s 33 &&\n \n \t\t# Add novel commits to upstream\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tcd \"$REPO\" &&\n \t\ttest_commit m2 &&\n \t\ttest_commit m3 &&\n@@ -342,7 +342,7 @@ test_expect_success 'server is initially ahead - no ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant false &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tinconsistency master $(test_oid numeric) &&\n+\tinconsistency main $(test_oid numeric) &&\n \ttest_must_fail git -C local fetch 2>err &&\n \ttest_i18ngrep \"fatal: remote error: upload-pack: not our ref\" err\n '\n@@ -351,11 +351,11 @@ test_expect_success 'server is initially ahead - ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant true &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tinconsistency master $(test_oid numeric) &&\n+\tinconsistency main $(test_oid numeric) &&\n \tgit -C local fetch &&\n \n-\tgit -C \"$REPO\" rev-parse --verify master >expected &&\n-\tgit -C local rev-parse --verify refs/remotes/origin/master >actual &&\n+\tgit -C \"$REPO\" rev-parse --verify main >expected &&\n+\tgit -C local rev-parse --verify refs/remotes/origin/main >actual &&\n \ttest_cmp expected actual\n '\n \n@@ -363,11 +363,11 @@ test_expect_success 'server is initially behind - no ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant false &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tinconsistency master \"master^\" &&\n+\tinconsistency main \"main^\" &&\n \tgit -C local fetch &&\n \n-\tgit -C \"$REPO\" rev-parse --verify \"master^\" >expected &&\n-\tgit -C local rev-parse --verify refs/remotes/origin/master >actual &&\n+\tgit -C \"$REPO\" rev-parse --verify \"main^\" >expected &&\n+\tgit -C local rev-parse --verify refs/remotes/origin/main >actual &&\n \ttest_cmp expected actual\n '\n \n@@ -375,11 +375,11 @@ test_expect_success 'server is initially behind - ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant true &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tinconsistency master \"master^\" &&\n+\tinconsistency main \"main^\" &&\n \tgit -C local fetch &&\n \n-\tgit -C \"$REPO\" rev-parse --verify \"master\" >expected &&\n-\tgit -C local rev-parse --verify refs/remotes/origin/master >actual &&\n+\tgit -C \"$REPO\" rev-parse --verify \"main\" >expected &&\n+\tgit -C local rev-parse --verify refs/remotes/origin/main >actual &&\n \ttest_cmp expected actual\n '\n \ndiff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh\nindex 0f04b6cddb..306fe9e5e1 100755\n--- a/t/t5801-remote-helpers.sh\n+++ b/t/t5801-remote-helpers.sh\n@@ -71,18 +71,18 @@ test_expect_success 'fetch multiple branches' '\n \t(cd local &&\n \t git fetch\n \t) &&\n-\tcompare_refs server master local refs/remotes/origin/master &&\n+\tcompare_refs server main local refs/remotes/origin/main &&\n \tcompare_refs server new local refs/remotes/origin/new\n '\n \n test_expect_success 'push when remote has extra refs' '\n \t(cd local &&\n-\t git reset --hard origin/master &&\n+\t git reset --hard origin/main &&\n \t echo content >>file &&\n \t git commit -a -m six &&\n \t git push\n \t) &&\n-\tcompare_refs local master server master\n+\tcompare_refs local main server main\n '\n \n test_expect_success 'push new branch by name' '\n@@ -174,7 +174,7 @@ test_expect_failure 'pushing without marks' '\n \n test_expect_success 'push all with existing object' '\n \t(cd local &&\n-\tgit branch dup2 master &&\n+\tgit branch dup2 main &&\n \tgit push origin --all\n \t) &&\n \tcompare_refs local dup2 server dup2\n@@ -182,7 +182,7 @@ test_expect_success 'push all with existing object' '\n \n test_expect_success 'push ref with existing object' '\n \t(cd local &&\n-\tgit branch dup master &&\n+\tgit branch dup main &&\n \tgit push origin dup\n \t) &&\n \tcompare_refs local dup server dup\n@@ -190,7 +190,7 @@ test_expect_success 'push ref with existing object' '\n \n test_expect_success GPG 'push signed tag' '\n \t(cd local &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag -s -m signed-tag signed-tag &&\n \tgit push origin signed-tag\n \t) &&\n@@ -200,7 +200,7 @@ test_expect_success GPG 'push signed tag' '\n \n test_expect_success GPG 'push signed tag with signed-tags capability' '\n \t(cd local &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag -s -m signed-tag signed-tag-2 &&\n \tGIT_REMOTE_TESTGIT_SIGNED_TAGS=1 git push origin signed-tag-2\n \t) &&\n@@ -209,7 +209,7 @@ test_expect_success GPG 'push signed tag with signed-tags capability' '\n \n test_expect_success 'push update refs' '\n \t(cd local &&\n-\tgit checkout -b update master &&\n+\tgit checkout -b update main &&\n \techo update >>file &&\n \tgit commit -a -m update &&\n \tgit push origin update &&\n@@ -260,7 +260,7 @@ test_expect_success 'proper failure checks for fetching' '\n test_expect_success 'proper failure checks for pushing' '\n \ttest_when_finished \"rm -rf local/git.marks local/testgit.marks\" &&\n \t(cd local &&\n-\tgit checkout -b crash master &&\n+\tgit checkout -b crash main &&\n \techo crash >>file &&\n \tgit commit -a -m crash &&\n \ttest_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 git push --all &&\n@@ -272,7 +272,7 @@ test_expect_success 'proper failure checks for pushing' '\n \n test_expect_success 'push messages' '\n \t(cd local &&\n-\tgit checkout -b new_branch master &&\n+\tgit checkout -b new_branch main &&\n \techo new >>file &&\n \tgit commit -a -m new &&\n \tgit push origin new_branch &&\n@@ -286,7 +286,7 @@ test_expect_success 'push messages' '\n \n test_expect_success 'fetch HEAD' '\n \t(cd server &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo more >>file &&\n \tgit commit -a -m more\n \t) &&\n@@ -298,7 +298,7 @@ test_expect_success 'fetch HEAD' '\n \n test_expect_success 'fetch url' '\n \t(cd server &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo more >>file &&\n \tgit commit -a -m more\n \t) &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex f919021063..a78ff1e57e 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-4]*|5[0-5]*)\n+[0-5]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409813","messageId":"b5ca6e9acd0c7c501584d042a9676f0f54d17a29.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 12/28] t550*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:42Z","receivedAt":"2020-11-12T22:44:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t550*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5500-fetch-pack.sh            |  28 +++----\n t/t5501-fetch-push-alternates.sh |   4 +-\n t/t5502-quickfetch.sh            |   6 +-\n t/t5503-tagfollow.sh             |  12 +--\n t/t5504-fetch-receive-strict.sh  |  20 ++---\n t/t5505-remote.sh                | 140 +++++++++++++++----------------\n t/t5506-remote-groups.sh         |   4 +-\n t/t5509-fetch-push-namespaces.sh |  30 +++----\n t/test-lib.sh                    |   2 +-\n 9 files changed, 123 insertions(+), 123 deletions(-)\n\ndiff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh\nindex 3557374312..70e41ada01 100755\n--- a/t/t5500-fetch-pack.sh\n+++ b/t/t5500-fetch-pack.sh\n@@ -407,14 +407,14 @@ test_expect_success 'in_vain resetted upon ACK' '\n \trm -rf myserver myclient &&\n \tgit init myserver &&\n \n-\t# Linked list of commits on master. The first is common; the rest are\n+\t# Linked list of commits on main. The first is common; the rest are\n \t# not.\n-\ttest_commit -C myserver first_master_commit &&\n+\ttest_commit -C myserver first_main_commit &&\n \tgit clone \"file://$(pwd)/myserver\" myclient &&\n \ttest_commit_bulk -C myclient 255 &&\n \n \t# Another linked list of commits on anotherbranch with no connection to\n-\t# master. The first is common; the rest are not.\n+\t# main. The first is common; the rest are not.\n \tgit -C myserver checkout --orphan anotherbranch &&\n \ttest_commit -C myserver first_anotherbranch_commit &&\n \tgit -C myclient fetch origin anotherbranch:refs/heads/anotherbranch &&\n@@ -422,14 +422,14 @@ test_expect_success 'in_vain resetted upon ACK' '\n \ttest_commit_bulk -C myclient 255 &&\n \n \t# The new commit that the client wants to fetch.\n-\tgit -C myserver checkout master &&\n+\tgit -C myserver checkout main &&\n \ttest_commit -C myserver to_fetch &&\n \n \t# The client will send (as \"have\"s) all 256 commits in anotherbranch\n \t# first. The 256th commit is common between the client and the server,\n \t# and should reset in_vain. This allows negotiation to continue until\n \t# the client reports that first_anotherbranch_commit is common.\n-\tgit -C myclient fetch --progress origin master 2>log &&\n+\tgit -C myclient fetch --progress origin main 2>log &&\n \ttest_i18ngrep \"Total 3 \" log\n '\n \n@@ -637,7 +637,7 @@ test_expect_success 'shallow fetch with tags does not break the repository' '\n \t\tmkdir repo2 &&\n \t\tcd repo2 &&\n \t\tgit init &&\n-\t\tgit fetch --depth=2 ../.git master:branch &&\n+\t\tgit fetch --depth=2 ../.git main:branch &&\n \t\tgit fsck\n \t)\n '\n@@ -662,7 +662,7 @@ test_expect_success 'fetch-pack can fetch a raw sha1 that is advertised as a ref\n \n \tgit init client &&\n \tgit -C client fetch-pack ../server \\\n-\t\t$(git -C server rev-parse refs/heads/master)\n+\t\t$(git -C server rev-parse refs/heads/main)\n '\n \n test_expect_success 'fetch-pack can fetch a raw sha1 overlapping a named ref' '\n@@ -688,7 +688,7 @@ test_expect_success 'fetch-pack cannot fetch a raw sha1 that is not advertised a\n \t# Some protocol versions (e.g. 2) support fetching\n \t# unadvertised objects, so restrict this test to v0.\n \ttest_must_fail env GIT_TEST_PROTOCOL_VERSION=0 git -C client fetch-pack ../server \\\n-\t\t$(git -C server rev-parse refs/heads/master^) 2>err &&\n+\t\t$(git -C server rev-parse refs/heads/main^) 2>err &&\n \ttest_i18ngrep \"Server does not allow request for unadvertised object\" err\n '\n \n@@ -822,7 +822,7 @@ test_expect_success 'clone shallow since ...' '\n \n test_expect_success 'fetch shallow since ...' '\n \tgit -C shallow11 fetch --shallow-since \"200000000 +0700\" origin &&\n-\tgit -C shallow11 log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C shallow11 log --pretty=tformat:%s origin/main >actual &&\n \tcat >expected <<-\\EOF &&\n \tthree\n \ttwo\n@@ -863,7 +863,7 @@ test_expect_success 'shallow since with commit graph and already-seen commit' '\n \t(\n \tcd shallow-since-graph &&\n \ttest_commit base &&\n-\ttest_commit master &&\n+\ttest_commit main &&\n \tgit checkout -b other HEAD^ &&\n \ttest_commit other &&\n \tgit commit-graph write --reachable &&\n@@ -874,7 +874,7 @@ test_expect_success 'shallow since with commit graph and already-seen commit' '\n \t$(echo \"object-format=$(test_oid algo)\" | packetize)\n \t00010013deepen-since 1\n \t$(echo \"want $(git rev-parse other)\" | packetize)\n-\t$(echo \"have $(git rev-parse master)\" | packetize)\n+\t$(echo \"have $(git rev-parse main)\" | packetize)\n \t0000\n \tEOF\n \t)\n@@ -896,7 +896,7 @@ test_expect_success 'shallow clone exclude tag two' '\n \n test_expect_success 'fetch exclude tag one' '\n \tgit -C shallow12 fetch --shallow-exclude one origin &&\n-\tgit -C shallow12 log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C shallow12 log --pretty=tformat:%s origin/main >actual &&\n \ttest_write_lines three two >expected &&\n \ttest_cmp expected actual\n '\n@@ -910,11 +910,11 @@ test_expect_success 'fetching deepen' '\n \ttest_commit three &&\n \tgit clone --depth 1 \"file://$(pwd)/.\" deepen &&\n \ttest_commit four &&\n-\tgit -C deepen log --pretty=tformat:%s master >actual &&\n+\tgit -C deepen log --pretty=tformat:%s main >actual &&\n \techo three >expected &&\n \ttest_cmp expected actual &&\n \tgit -C deepen fetch --deepen=1 &&\n-\tgit -C deepen log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C deepen log --pretty=tformat:%s origin/main >actual &&\n \tcat >expected <<-\\EOF &&\n \tfour\n \tthree\ndiff --git a/t/t5501-fetch-push-alternates.sh b/t/t5501-fetch-push-alternates.sh\nindex 1bc57ac03f..0054163ce4 100755\n--- a/t/t5501-fetch-push-alternates.sh\n+++ b/t/t5501-fetch-push-alternates.sh\n@@ -45,7 +45,7 @@ test_expect_success setup '\n test_expect_success 'pushing into a repository with the same alternate' '\n \t(\n \t\tcd one &&\n-\t\tgit push ../receiver master:refs/heads/it\n+\t\tgit push ../receiver main:refs/heads/it\n \t) &&\n \t(\n \t\tcd receiver &&\n@@ -57,7 +57,7 @@ test_expect_success 'pushing into a repository with the same alternate' '\n test_expect_success 'fetching from a repository with the same alternate' '\n \t(\n \t\tcd fetcher &&\n-\t\tgit fetch ../one master:refs/heads/it &&\n+\t\tgit fetch ../one main:refs/heads/it &&\n \t\tcount_objects >../fetcher.count\n \t) &&\n \ttest_cmp one.count fetcher.count\ndiff --git a/t/t5502-quickfetch.sh b/t/t5502-quickfetch.sh\nindex 7a46cbdbe6..b163787a05 100755\n--- a/t/t5502-quickfetch.sh\n+++ b/t/t5502-quickfetch.sh\n@@ -108,14 +108,14 @@ test_expect_success 'quickfetch should not copy from alternate' '\n \t\t\t\tq\n \t\t\t}\"\n \t) ) &&\n-\torigin_master=$( (\n+\torigin_main=$( (\n \t\tcd quickclone &&\n-\t\tgit rev-parse origin/master\n+\t\tgit rev-parse origin/main\n \t) ) &&\n \techo \"loose objects: $obj_cnt, packfiles: $pck_cnt\" &&\n \ttest $obj_cnt -eq 0 &&\n \ttest $pck_cnt -eq 0 &&\n-\ttest z$origin_master = z$(git rev-parse master)\n+\ttest z$origin_main = z$(git rev-parse main)\n \n '\n \ndiff --git a/t/t5503-tagfollow.sh b/t/t5503-tagfollow.sh\nindex 6dafbe4543..b3e5f810e0 100755\n--- a/t/t5503-tagfollow.sh\n+++ b/t/t5503-tagfollow.sh\n@@ -11,7 +11,7 @@ test_description='test automatic tag following'\n #   L - A ------ O ------ B\n #    \\   \\                 \\\n #     \\   C - origin/cat    \\\n-#      origin/master           master\n+#      origin/main           main\n \n test_expect_success setup '\n \ttest_tick &&\n@@ -57,7 +57,7 @@ test_expect_success 'fetch A (new commit : 1 connection)' '\n \t(\n \t\tcd cloned &&\n \t\tGIT_TRACE_PACKET=$UPATH git fetch &&\n-\t\ttest $A = $(git rev-parse --verify origin/master)\n+\t\ttest $A = $(git rev-parse --verify origin/main)\n \t) &&\n \tget_needs $U >actual &&\n \ttest_cmp expect actual\n@@ -72,7 +72,7 @@ test_expect_success \"create tag T on A, create C on branch cat\" '\n \tgit add file &&\n \tgit commit -m C &&\n \tC=$(git rev-parse --verify HEAD) &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'setup expect' '\n@@ -123,7 +123,7 @@ test_expect_success 'fetch B, S (commit and tag : 1 connection)' '\n \t(\n \t\tcd cloned &&\n \t\tGIT_TRACE_PACKET=$UPATH git fetch &&\n-\t\ttest $B = $(git rev-parse --verify origin/master) &&\n+\t\ttest $B = $(git rev-parse --verify origin/main) &&\n \t\ttest $B = $(git rev-parse --verify tag2^0) &&\n \t\ttest $S = $(git rev-parse --verify tag2)\n \t) &&\n@@ -138,7 +138,7 @@ want $S\n EOF\n '\n \n-test_expect_success 'new clone fetch master and tags' '\n+test_expect_success 'new clone fetch main and tags' '\n \ttest_might_fail git branch -D cat &&\n \trm -f $U &&\n \t(\n@@ -147,7 +147,7 @@ test_expect_success 'new clone fetch master and tags' '\n \t\tgit init &&\n \t\tgit remote add origin .. &&\n \t\tGIT_TRACE_PACKET=$UPATH git fetch &&\n-\t\ttest $B = $(git rev-parse --verify origin/master) &&\n+\t\ttest $B = $(git rev-parse --verify origin/main) &&\n \t\ttest $S = $(git rev-parse --verify tag2) &&\n \t\ttest $B = $(git rev-parse --verify tag2^0) &&\n \t\ttest $T = $(git rev-parse --verify tag1) &&\ndiff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh\nindex 1a16ac4c0d..d2ba19ce68 100755\n--- a/t/t5504-fetch-receive-strict.sh\n+++ b/t/t5504-fetch-receive-strict.sh\n@@ -25,7 +25,7 @@ test_expect_success 'fetch without strict' '\n \t\tcd dst &&\n \t\tgit config fetch.fsckobjects false &&\n \t\tgit config transfer.fsckobjects false &&\n-\t\ttest_must_fail git fetch ../.git master\n+\t\ttest_must_fail git fetch ../.git main\n \t)\n '\n \n@@ -36,7 +36,7 @@ test_expect_success 'fetch with !fetch.fsckobjects' '\n \t\tcd dst &&\n \t\tgit config fetch.fsckobjects false &&\n \t\tgit config transfer.fsckobjects true &&\n-\t\ttest_must_fail git fetch ../.git master\n+\t\ttest_must_fail git fetch ../.git main\n \t)\n '\n \n@@ -47,7 +47,7 @@ test_expect_success 'fetch with fetch.fsckobjects' '\n \t\tcd dst &&\n \t\tgit config fetch.fsckobjects true &&\n \t\tgit config transfer.fsckobjects false &&\n-\t\ttest_must_fail git fetch ../.git master\n+\t\ttest_must_fail git fetch ../.git main\n \t)\n '\n \n@@ -57,13 +57,13 @@ test_expect_success 'fetch with transfer.fsckobjects' '\n \t(\n \t\tcd dst &&\n \t\tgit config transfer.fsckobjects true &&\n-\t\ttest_must_fail git fetch ../.git master\n+\t\ttest_must_fail git fetch ../.git main\n \t)\n '\n \n cat >exp <<EOF\n To dst\n-!\trefs/heads/master:refs/heads/test\t[remote rejected] (missing necessary objects)\n+!\trefs/heads/main:refs/heads/test\t[remote rejected] (missing necessary objects)\n Done\n EOF\n \n@@ -75,7 +75,7 @@ test_expect_success 'push without strict' '\n \t\tgit config fetch.fsckobjects false &&\n \t\tgit config transfer.fsckobjects false\n \t) &&\n-\ttest_must_fail git push --porcelain dst master:refs/heads/test >act &&\n+\ttest_must_fail git push --porcelain dst main:refs/heads/test >act &&\n \ttest_cmp exp act\n '\n \n@@ -87,13 +87,13 @@ test_expect_success 'push with !receive.fsckobjects' '\n \t\tgit config receive.fsckobjects false &&\n \t\tgit config transfer.fsckobjects true\n \t) &&\n-\ttest_must_fail git push --porcelain dst master:refs/heads/test >act &&\n+\ttest_must_fail git push --porcelain dst main:refs/heads/test >act &&\n \ttest_cmp exp act\n '\n \n cat >exp <<EOF\n To dst\n-!\trefs/heads/master:refs/heads/test\t[remote rejected] (unpacker error)\n+!\trefs/heads/main:refs/heads/test\t[remote rejected] (unpacker error)\n EOF\n \n test_expect_success 'push with receive.fsckobjects' '\n@@ -104,7 +104,7 @@ test_expect_success 'push with receive.fsckobjects' '\n \t\tgit config receive.fsckobjects true &&\n \t\tgit config transfer.fsckobjects false\n \t) &&\n-\ttest_must_fail git push --porcelain dst master:refs/heads/test >act &&\n+\ttest_must_fail git push --porcelain dst main:refs/heads/test >act &&\n \ttest_cmp exp act\n '\n \n@@ -115,7 +115,7 @@ test_expect_success 'push with transfer.fsckobjects' '\n \t\tcd dst &&\n \t\tgit config transfer.fsckobjects true\n \t) &&\n-\ttest_must_fail git push --porcelain dst master:refs/heads/test >act &&\n+\ttest_must_fail git push --porcelain dst main:refs/heads/test >act &&\n \ttest_cmp exp act\n '\n \ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex eaa6e90220..540d65aa22 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -17,7 +17,7 @@ setup_repository () {\n \tgit add elif &&\n \ttest_tick &&\n \tgit commit -m \"Second\" &&\n-\tgit checkout master\n+\tgit checkout main\n \t)\n }\n \n@@ -60,8 +60,8 @@ test_expect_success C_LOCALE_OUTPUT 'remote information for the origin' '\n \t(\n \t\tcd test &&\n \t\ttokens_match origin \"$(git remote)\" &&\n-\t\tcheck_remote_track origin master side &&\n-\t\tcheck_tracking_branch origin HEAD master side\n+\t\tcheck_remote_track origin main side &&\n+\t\tcheck_tracking_branch origin HEAD main side\n \t)\n '\n \n@@ -70,7 +70,7 @@ test_expect_success 'add another remote' '\n \t\tcd test &&\n \t\tgit remote add -f second ../two &&\n \t\ttokens_match \"origin second\" \"$(git remote)\" &&\n-\t\tcheck_tracking_branch second master side another &&\n+\t\tcheck_tracking_branch second main side another &&\n \t\tgit for-each-ref \"--format=%(refname)\" refs/remotes |\n \t\tsed -e \"/^refs\\/remotes\\/origin\\//d\" \\\n \t\t    -e \"/^refs\\/remotes\\/second\\//d\" >actual &&\n@@ -81,8 +81,8 @@ test_expect_success 'add another remote' '\n test_expect_success C_LOCALE_OUTPUT 'check remote-tracking' '\n \t(\n \t\tcd test &&\n-\t\tcheck_remote_track origin master side &&\n-\t\tcheck_remote_track second master side another\n+\t\tcheck_remote_track origin main side &&\n+\t\tcheck_remote_track second main side another\n \t)\n '\n \n@@ -99,7 +99,7 @@ test_expect_success 'remote forces tracking branches' '\n test_expect_success 'remove remote' '\n \t(\n \t\tcd test &&\n-\t\tgit symbolic-ref refs/remotes/second/HEAD refs/remotes/second/master &&\n+\t\tgit symbolic-ref refs/remotes/second/HEAD refs/remotes/second/main &&\n \t\tgit remote rm second\n \t)\n '\n@@ -108,7 +108,7 @@ test_expect_success C_LOCALE_OUTPUT 'remove remote' '\n \t(\n \t\tcd test &&\n \t\ttokens_match origin \"$(git remote)\" &&\n-\t\tcheck_remote_track origin master side &&\n+\t\tcheck_remote_track origin main side &&\n \t\tgit for-each-ref \"--format=%(refname)\" refs/remotes |\n \t\tsed -e \"/^refs\\/remotes\\/origin\\//d\" >actual &&\n \t\ttest_must_be_empty actual\n@@ -121,13 +121,13 @@ test_expect_success 'remove remote protects local branches' '\n \t\tcat >expect1 <<-\\EOF &&\n \t\tNote: A branch outside the refs/remotes/ hierarchy was not removed;\n \t\tto delete it, use:\n-\t\t  git branch -d master\n+\t\t  git branch -d main\n \t\tEOF\n \t\tcat >expect2 <<-\\EOF &&\n \t\tNote: Some branches outside the refs/remotes/ hierarchy were not removed;\n \t\tto delete them, use:\n \t\t  git branch -d foobranch\n-\t\t  git branch -d master\n+\t\t  git branch -d main\n \t\tEOF\n \t\tgit tag footag &&\n \t\tgit config --add remote.oops.fetch \"+refs/*:refs/*\" &&\n@@ -153,7 +153,7 @@ test_expect_success 'remove errors out early when deleting non-existent branch'\n \n test_expect_success 'remove remote with a branch without configured merge' '\n \ttest_when_finished \"(\n-\t\tgit -C test checkout master;\n+\t\tgit -C test checkout main;\n \t\tgit -C test branch -D two;\n \t\tgit -C test config --remove-section remote.two;\n \t\tgit -C test config --remove-section branch.second;\n@@ -163,9 +163,9 @@ test_expect_success 'remove remote with a branch without configured merge' '\n \t\tcd test &&\n \t\tgit remote add two ../two &&\n \t\tgit fetch two &&\n-\t\tgit checkout -b second two/master^0 &&\n+\t\tgit checkout -b second two/main^0 &&\n \t\tgit config branch.second.remote two &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit remote rm two\n \t)\n '\n@@ -211,7 +211,7 @@ cat >test/expect <<EOF\n * remote origin\n   Fetch URL: $(pwd)/one\n   Push  URL: $(pwd)/one\n-  HEAD branch: master\n+  HEAD branch: main\n   Remote branches:\n     main new (next fetch will store in remotes/origin)\n     side tracked\n@@ -221,14 +221,14 @@ cat >test/expect <<EOF\n     octopus  merges with remote topic-a\n                 and with remote topic-b\n                 and with remote topic-c\n-    rebase  rebases onto remote master\n+    rebase  rebases onto remote main\n   Local refs configured for 'git push':\n     main pushes to main     (local out of date)\n     main pushes to upstream (create)\n * remote two\n   Fetch URL: ../two\n   Push  URL: ../three\n-  HEAD branch: master\n+  HEAD branch: main\n   Local refs configured for 'git push':\n     ahead forces to main    (fast-forwardable)\n     main  pushes to another (up to date)\n@@ -237,16 +237,16 @@ EOF\n test_expect_success PREPARE_FOR_MAIN_BRANCH 'show' '\n \t(\n \t\tcd test &&\n-\t\tgit config --add remote.origin.fetch refs/heads/master:refs/heads/upstream &&\n+\t\tgit config --add remote.origin.fetch refs/heads/main:refs/heads/upstream &&\n \t\tgit fetch &&\n-\t\tgit checkout -b ahead origin/master &&\n+\t\tgit checkout -b ahead origin/main &&\n \t\techo 1 >>file &&\n \t\ttest_tick &&\n \t\tgit commit -m update file &&\n-\t\tgit checkout master &&\n-\t\tgit branch --track octopus origin/master &&\n-\t\tgit branch --track rebase origin/master &&\n-\t\tgit branch -d -r origin/master &&\n+\t\tgit checkout main &&\n+\t\tgit branch --track octopus origin/main &&\n+\t\tgit branch --track rebase origin/main &&\n+\t\tgit branch -d -r origin/main &&\n \t\tgit config --add remote.two.url ../two &&\n \t\tgit config --add remote.two.pushurl ../three &&\n \t\tgit config branch.rebase.rebase true &&\n@@ -258,10 +258,10 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'show' '\n \t\t\tgit commit -m update file\n \t\t) &&\n \t\tgit config --add remote.origin.push : &&\n-\t\tgit config --add remote.origin.push refs/heads/master:refs/heads/upstream &&\n+\t\tgit config --add remote.origin.push refs/heads/main:refs/heads/upstream &&\n \t\tgit config --add remote.origin.push +refs/tags/lastbackup &&\n-\t\tgit config --add remote.two.push +refs/heads/ahead:refs/heads/master &&\n-\t\tgit config --add remote.two.push refs/heads/master:refs/heads/another &&\n+\t\tgit config --add remote.two.push +refs/heads/ahead:refs/heads/main &&\n+\t\tgit config --add remote.two.push refs/heads/main:refs/heads/another &&\n \t\tgit remote show origin two >output &&\n \t\tgit branch -d rebase octopus &&\n \t\ttest_i18ncmp expect output\n@@ -274,7 +274,7 @@ cat >test/expect <<EOF\n   Push  URL: $(pwd)/one\n   HEAD branch: (not queried)\n   Remote branches: (status not queried)\n-    master\n+    main\n     side\n   Local branches configured for 'git pull':\n     ahead merges with remote main\n@@ -322,7 +322,7 @@ test_expect_success 'set-head --auto' '\n \t(\n \t\tcd test &&\n \t\tgit remote set-head --auto origin &&\n-\t\techo refs/remotes/origin/master >expect &&\n+\t\techo refs/remotes/origin/main >expect &&\n \t\tgit symbolic-ref refs/remotes/origin/HEAD >output &&\n \t\ttest_cmp expect output\n \t)\n@@ -333,7 +333,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'set-head --auto has no problem w/mu\n \t\tcd test &&\n \t\tgit fetch two \"refs/heads/*:refs/remotes/two/*\" &&\n \t\tgit remote set-head --auto two >output 2>&1 &&\n-\t\techo \"two/HEAD set to master\" >expect &&\n+\t\techo \"two/HEAD set to main\" >expect &&\n \t\ttest_i18ncmp expect output\n \t)\n '\n@@ -347,7 +347,7 @@ test_expect_success 'set-head explicit' '\n \t\tcd test &&\n \t\tgit remote set-head origin side2 &&\n \t\tgit symbolic-ref refs/remotes/origin/HEAD >output &&\n-\t\tgit remote set-head origin master &&\n+\t\tgit remote set-head origin main &&\n \t\ttest_cmp expect output\n \t)\n '\n@@ -410,7 +410,7 @@ test_expect_success 'fetch mirrors act as mirrors during fetch' '\n \t(\n \t\tcd mirror-fetch/parent &&\n \t\tgit branch new &&\n-\t\tgit branch -m master renamed\n+\t\tgit branch -m main renamed\n \t) &&\n \t(\n \t\tcd mirror-fetch/child &&\n@@ -424,7 +424,7 @@ test_expect_success 'fetch mirrors can prune' '\n \t(\n \t\tcd mirror-fetch/child &&\n \t\tgit remote prune parent &&\n-\t\ttest_must_fail git rev-parse --verify refs/heads/master\n+\t\ttest_must_fail git rev-parse --verify refs/heads/main\n \t)\n '\n \n@@ -477,14 +477,14 @@ test_expect_success 'push mirrors act as mirrors during push' '\n \t(\n \t\tcd mirror-push/private &&\n \t\tgit branch new &&\n-\t\tgit branch -m master renamed &&\n+\t\tgit branch -m main renamed &&\n \t\tgit push public\n \t) &&\n \t(\n \t\tcd mirror-push/private &&\n \t\tgit rev-parse --verify refs/heads/new &&\n \t\tgit rev-parse --verify refs/heads/renamed &&\n-\t\ttest_must_fail git rev-parse --verify refs/heads/master\n+\t\ttest_must_fail git rev-parse --verify refs/heads/main\n \t)\n '\n \n@@ -610,10 +610,10 @@ test_expect_success 'reject --no-no-tags' '\n '\n \n cat >one/expect <<\\EOF\n-  apis/master\n+  apis/main\n   apis/side\n   drosophila/another\n-  drosophila/master\n+  drosophila/main\n   drosophila/side\n EOF\n \n@@ -630,11 +630,11 @@ test_expect_success 'update' '\n \n cat >one/expect <<\\EOF\n   drosophila/another\n-  drosophila/master\n+  drosophila/main\n   drosophila/side\n-  manduca/master\n+  manduca/main\n   manduca/side\n-  megaloprepus/master\n+  megaloprepus/main\n   megaloprepus/side\n EOF\n \n@@ -673,11 +673,11 @@ test_expect_success 'update --prune' '\n '\n \n cat >one/expect <<-\\EOF\n-  apis/master\n+  apis/main\n   apis/side\n-  manduca/master\n+  manduca/main\n   manduca/side\n-  megaloprepus/master\n+  megaloprepus/main\n   megaloprepus/side\n EOF\n \n@@ -697,7 +697,7 @@ test_expect_success 'update default' '\n \n cat >one/expect <<\\EOF\n   drosophila/another\n-  drosophila/master\n+  drosophila/main\n   drosophila/side\n EOF\n \n@@ -751,14 +751,14 @@ test_expect_success 'rename a remote' '\n \tgit clone one four &&\n \t(\n \t\tcd four &&\n-\t\tgit config branch.master.pushRemote origin &&\n+\t\tgit config branch.main.pushRemote origin &&\n \t\tgit remote rename origin upstream &&\n \t\ttest -z \"$(git for-each-ref refs/remotes/origin)\" &&\n-\t\ttest \"$(git symbolic-ref refs/remotes/upstream/HEAD)\" = \"refs/remotes/upstream/master\" &&\n-\t\ttest \"$(git rev-parse upstream/master)\" = \"$(git rev-parse master)\" &&\n+\t\ttest \"$(git symbolic-ref refs/remotes/upstream/HEAD)\" = \"refs/remotes/upstream/main\" &&\n+\t\ttest \"$(git rev-parse upstream/main)\" = \"$(git rev-parse main)\" &&\n \t\ttest \"$(git config remote.upstream.fetch)\" = \"+refs/heads/*:refs/remotes/upstream/*\" &&\n-\t\ttest \"$(git config branch.master.remote)\" = \"upstream\" &&\n-\t\ttest \"$(git config branch.master.pushRemote)\" = \"upstream\" &&\n+\t\ttest \"$(git config branch.main.remote)\" = \"upstream\" &&\n+\t\ttest \"$(git config branch.main.pushRemote)\" = \"upstream\" &&\n \t\ttest \"$(git config --global remote.pushDefault)\" = \"origin\"\n \t)\n '\n@@ -804,7 +804,7 @@ test_expect_success 'rename does not update a non-default fetch refspec' '\n \t\tgit config remote.origin.fetch +refs/heads/*:refs/heads/origin/* &&\n \t\tgit remote rename origin upstream &&\n \t\ttest \"$(git config remote.upstream.fetch)\" = \"+refs/heads/*:refs/heads/origin/*\" &&\n-\t\tgit rev-parse -q origin/master\n+\t\tgit rev-parse -q origin/main\n \t)\n '\n \n@@ -824,7 +824,7 @@ test_expect_success 'rename a remote with name prefix of other remote' '\n \t\tcd four.three &&\n \t\tgit remote add o git://example.com/repo.git &&\n \t\tgit remote rename o upstream &&\n-\t\ttest \"$(git rev-parse origin/master)\" = \"$(git rev-parse master)\"\n+\t\ttest \"$(git rev-parse origin/main)\" = \"$(git rev-parse main)\"\n \t)\n '\n \n@@ -840,11 +840,11 @@ test_expect_success 'remove a remote' '\n \tgit clone one four.five &&\n \t(\n \t\tcd four.five &&\n-\t\tgit config branch.master.pushRemote origin &&\n+\t\tgit config branch.main.pushRemote origin &&\n \t\tgit remote remove origin &&\n \t\ttest -z \"$(git for-each-ref refs/remotes/origin)\" &&\n-\t\ttest_must_fail git config branch.master.remote &&\n-\t\ttest_must_fail git config branch.master.pushRemote &&\n+\t\ttest_must_fail git config branch.main.remote &&\n+\t\ttest_must_fail git config branch.main.pushRemote &&\n \t\ttest \"$(git config --global remote.pushDefault)\" = \"origin\"\n \t)\n '\n@@ -885,9 +885,9 @@ test_expect_success 'remove a remote removes repo remote.pushDefault but keeps g\n \n cat >remotes_origin <<EOF\n URL: $(pwd)/one\n-Push: refs/heads/master:refs/heads/upstream\n+Push: refs/heads/main:refs/heads/upstream\n Push: refs/heads/next:refs/heads/upstream2\n-Pull: refs/heads/master:refs/heads/origin\n+Pull: refs/heads/main:refs/heads/origin\n Pull: refs/heads/next:refs/heads/origin2\n EOF\n \n@@ -903,11 +903,11 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '\n \t\ttest_path_is_missing .git/remotes/origin &&\n \t\ttest \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n \t\tcat >push_expected <<-\\EOF &&\n-\t\trefs/heads/master:refs/heads/upstream\n+\t\trefs/heads/main:refs/heads/upstream\n \t\trefs/heads/next:refs/heads/upstream2\n \t\tEOF\n \t\tcat >fetch_expected <<-\\EOF &&\n-\t\trefs/heads/master:refs/heads/origin\n+\t\trefs/heads/main:refs/heads/origin\n \t\trefs/heads/next:refs/heads/origin2\n \t\tEOF\n \t\tgit config --get-all remote.origin.push >push_actual &&\n@@ -927,8 +927,8 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '\n \t\tgit remote rename origin origin &&\n \t\ttest_path_is_missing .git/branches/origin &&\n \t\ttest \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n-\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\" &&\n-\t\ttest \"$(git config remote.origin.push)\" = \"HEAD:refs/heads/master\"\n+\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/main:refs/heads/origin\" &&\n+\t\ttest \"$(git config remote.origin.push)\" = \"HEAD:refs/heads/main\"\n \t)\n '\n \n@@ -951,7 +951,7 @@ test_expect_success 'remote prune to cause a dangling symref' '\n \t(\n \t\tcd one &&\n \t\tgit checkout side2 &&\n-\t\tgit branch -D master\n+\t\tgit branch -D main\n \t) &&\n \t(\n \t\tcd eight &&\n@@ -994,22 +994,22 @@ test_expect_success 'remote set-branches' '\n \tEOF\n \tsort <<-\\EOF >expect.replace &&\n \t+refs/heads/maint:refs/remotes/scratch/maint\n-\t+refs/heads/master:refs/remotes/scratch/master\n+\t+refs/heads/main:refs/remotes/scratch/main\n \t+refs/heads/next:refs/remotes/scratch/next\n \tEOF\n \tsort <<-\\EOF >expect.add-two &&\n \t+refs/heads/maint:refs/remotes/scratch/maint\n-\t+refs/heads/master:refs/remotes/scratch/master\n+\t+refs/heads/main:refs/remotes/scratch/main\n \t+refs/heads/next:refs/remotes/scratch/next\n \t+refs/heads/seen:refs/remotes/scratch/seen\n \t+refs/heads/t/topic:refs/remotes/scratch/t/topic\n \tEOF\n \tsort <<-\\EOF >expect.setup-ffonly &&\n-\trefs/heads/master:refs/remotes/scratch/master\n+\trefs/heads/main:refs/remotes/scratch/main\n \t+refs/heads/next:refs/remotes/scratch/next\n \tEOF\n \tsort <<-\\EOF >expect.respect-ffonly &&\n-\trefs/heads/master:refs/remotes/scratch/master\n+\trefs/heads/main:refs/remotes/scratch/main\n \t+refs/heads/next:refs/remotes/scratch/next\n \t+refs/heads/seen:refs/remotes/scratch/seen\n \tEOF\n@@ -1025,7 +1025,7 @@ test_expect_success 'remote set-branches' '\n \t\tgit config --get-all remote.scratch.fetch >config-result &&\n \t\tsort <config-result >../actual.add &&\n \n-\t\tgit remote set-branches scratch maint master next &&\n+\t\tgit remote set-branches scratch maint main next &&\n \t\tgit config --get-all remote.scratch.fetch >config-result &&\n \t\tsort <config-result >../actual.replace &&\n \n@@ -1035,7 +1035,7 @@ test_expect_success 'remote set-branches' '\n \n \t\tgit config --unset-all remote.scratch.fetch &&\n \t\tgit config remote.scratch.fetch \\\n-\t\t\trefs/heads/master:refs/remotes/scratch/master &&\n+\t\t\trefs/heads/main:refs/remotes/scratch/main &&\n \t\tgit config --add remote.scratch.fetch \\\n \t\t\t+refs/heads/next:refs/remotes/scratch/next &&\n \t\tgit config --get-all remote.scratch.fetch >config-result &&\n@@ -1055,14 +1055,14 @@ test_expect_success 'remote set-branches' '\n \n test_expect_success 'remote set-branches with --mirror' '\n \techo \"+refs/*:refs/*\" >expect.initial &&\n-\techo \"+refs/heads/master:refs/heads/master\" >expect.replace &&\n+\techo \"+refs/heads/main:refs/heads/main\" >expect.replace &&\n \tgit clone --mirror .git/ setbranches-mirror &&\n \t(\n \t\tcd setbranches-mirror &&\n \t\tgit remote rename origin scratch &&\n \t\tgit config --get-all remote.scratch.fetch >../actual.initial &&\n \n-\t\tgit remote set-branches scratch heads/master &&\n+\t\tgit remote set-branches scratch heads/main &&\n \t\tgit config --get-all remote.scratch.fetch >../actual.replace\n \t) &&\n \ttest_cmp expect.initial actual.initial &&\n@@ -1308,7 +1308,7 @@ test_extra_arg () {\n test_extra_arg add nick url\n test_extra_arg rename origin newname\n test_extra_arg remove origin\n-test_extra_arg set-head origin master\n+test_extra_arg set-head origin main\n # set-branches takes any number of args\n test_extra_arg get-url origin newurl\n test_extra_arg set-url origin newurl oldurl\n@@ -1325,7 +1325,7 @@ test_expect_success 'unqualified <dst> refspec DWIM and advice' '\n \ttest_when_finished \"(cd test && git tag -d some-tag)\" &&\n \t(\n \t\tcd test &&\n-\t\tgit tag -a -m \"Some tag\" some-tag master &&\n+\t\tgit tag -a -m \"Some tag\" some-tag main &&\n \t\texit_with=true &&\n \t\tfor type in commit tag tree blob\n \t\tdo\n@@ -1351,7 +1351,7 @@ test_expect_success 'unqualified <dst> refspec DWIM and advice' '\n test_expect_success PREPARE_FOR_MAIN_BRANCH 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '\n \t(\n \t\tcd two &&\n-\t\tgit tag -a -m \"Some tag\" my-tag master &&\n+\t\tgit tag -a -m \"Some tag\" my-tag main &&\n \t\tgit update-ref refs/trees/my-head-tree HEAD^{tree} &&\n \t\tgit update-ref refs/blobs/my-file-blob HEAD:file\n \t) &&\ndiff --git a/t/t5506-remote-groups.sh b/t/t5506-remote-groups.sh\nindex 83d5558c0e..f2df3944e0 100755\n--- a/t/t5506-remote-groups.sh\n+++ b/t/t5506-remote-groups.sh\n@@ -31,8 +31,8 @@ repo_fetched() {\n test_expect_success 'setup' '\n \tmkdir one && (cd one && git init) &&\n \tmkdir two && (cd two && git init) &&\n-\tgit remote add -m master one one &&\n-\tgit remote add -m master two two\n+\tgit remote add -m main one one &&\n+\tgit remote add -m main two two\n '\n \n test_expect_success 'no group updates all' '\ndiff --git a/t/t5509-fetch-push-namespaces.sh b/t/t5509-fetch-push-namespaces.sh\nindex a67f792adf..ad4a3f5c6e 100755\n--- a/t/t5509-fetch-push-namespaces.sh\n+++ b/t/t5509-fetch-push-namespaces.sh\n@@ -27,9 +27,9 @@ test_expect_success setup '\n test_expect_success 'pushing into a repository using a ref namespace' '\n \t(\n \t\tcd original &&\n-\t\tgit push pushee-namespaced master &&\n+\t\tgit push pushee-namespaced main &&\n \t\tgit ls-remote pushee-namespaced >actual &&\n-\t\tprintf \"$commit1\\trefs/heads/master\\n\" >expected &&\n+\t\tprintf \"$commit1\\trefs/heads/main\\n\" >expected &&\n \t\ttest_cmp expected actual &&\n \t\tgit push pushee-namespaced --tags &&\n \t\tgit ls-remote pushee-namespaced >actual &&\n@@ -56,7 +56,7 @@ test_expect_success 'pulling from a repository using a ref namespace' '\n \t\tcd puller &&\n \t\tgit remote add -f pushee-namespaced \"ext::git --namespace=namespace %s ../pushee\" &&\n \t\tgit for-each-ref refs/ >actual &&\n-\t\tprintf \"$commit1 commit\\trefs/remotes/pushee-namespaced/master\\n\" >expected &&\n+\t\tprintf \"$commit1 commit\\trefs/remotes/pushee-namespaced/main\\n\" >expected &&\n \t\tprintf \"$commit0 commit\\trefs/tags/0\\n\" >>expected &&\n \t\tprintf \"$commit1 commit\\trefs/tags/1\\n\" >>expected &&\n \t\ttest_cmp expected actual\n@@ -76,7 +76,7 @@ test_expect_success 'mirroring a repository using a ref namespace' '\n \t(\n \t\tcd mirror &&\n \t\tgit for-each-ref refs/ >actual &&\n-\t\tprintf \"$commit1 commit\\trefs/namespaces/namespace/refs/heads/master\\n\" >expected &&\n+\t\tprintf \"$commit1 commit\\trefs/namespaces/namespace/refs/heads/main\\n\" >expected &&\n \t\tprintf \"$commit0 commit\\trefs/namespaces/namespace/refs/tags/0\\n\" >>expected &&\n \t\tprintf \"$commit1 commit\\trefs/namespaces/namespace/refs/tags/1\\n\" >>expected &&\n \t\ttest_cmp expected actual\n@@ -87,7 +87,7 @@ test_expect_success 'hide namespaced refs with transfer.hideRefs' '\n \tGIT_NAMESPACE=namespace \\\n \t\tgit -C pushee -c transfer.hideRefs=refs/tags \\\n \t\tls-remote \"ext::git %s .\" >actual &&\n-\tprintf \"$commit1\\trefs/heads/master\\n\" >expected &&\n+\tprintf \"$commit1\\trefs/heads/main\\n\" >expected &&\n \ttest_cmp expected actual\n '\n \n@@ -95,7 +95,7 @@ test_expect_success 'check that transfer.hideRefs does not match unstripped refs\n \tGIT_NAMESPACE=namespace \\\n \t\tgit -C pushee -c transfer.hideRefs=refs/namespaces/namespace/refs/tags \\\n \t\tls-remote \"ext::git %s .\" >actual &&\n-\tprintf \"$commit1\\trefs/heads/master\\n\" >expected &&\n+\tprintf \"$commit1\\trefs/heads/main\\n\" >expected &&\n \tprintf \"$commit0\\trefs/tags/0\\n\" >>expected &&\n \tprintf \"$commit1\\trefs/tags/1\\n\" >>expected &&\n \ttest_cmp expected actual\n@@ -105,23 +105,23 @@ test_expect_success 'hide full refs with transfer.hideRefs' '\n \tGIT_NAMESPACE=namespace \\\n \t\tgit -C pushee -c transfer.hideRefs=\"^refs/namespaces/namespace/refs/tags\" \\\n \t\tls-remote \"ext::git %s .\" >actual &&\n-\tprintf \"$commit1\\trefs/heads/master\\n\" >expected &&\n+\tprintf \"$commit1\\trefs/heads/main\\n\" >expected &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'try to update a hidden ref' '\n-\ttest_config -C pushee transfer.hideRefs refs/heads/master &&\n-\ttest_must_fail git -C original push pushee-namespaced master\n+\ttest_config -C pushee transfer.hideRefs refs/heads/main &&\n+\ttest_must_fail git -C original push pushee-namespaced main\n '\n \n test_expect_success 'try to update a ref that is not hidden' '\n-\ttest_config -C pushee transfer.hideRefs refs/namespaces/namespace/refs/heads/master &&\n-\tgit -C original push pushee-namespaced master\n+\ttest_config -C pushee transfer.hideRefs refs/namespaces/namespace/refs/heads/main &&\n+\tgit -C original push pushee-namespaced main\n '\n \n test_expect_success 'try to update a hidden full ref' '\n-\ttest_config -C pushee transfer.hideRefs \"^refs/namespaces/namespace/refs/heads/master\" &&\n-\ttest_must_fail git -C original push pushee-namespaced master\n+\ttest_config -C pushee transfer.hideRefs \"^refs/namespaces/namespace/refs/heads/main\" &&\n+\ttest_must_fail git -C original push pushee-namespaced main\n '\n \n test_expect_success 'set up ambiguous HEAD' '\n@@ -157,9 +157,9 @@ test_expect_success 'denyCurrentBranch and unborn branch with ref namespace' '\n \t\tcd original &&\n \t\tgit init unborn &&\n \t\tgit remote add unborn-namespaced \"ext::git --namespace=namespace %s unborn\" &&\n-\t\ttest_must_fail git push unborn-namespaced HEAD:master &&\n+\t\ttest_must_fail git push unborn-namespaced HEAD:main &&\n \t\tgit -C unborn config receive.denyCurrentBranch updateInstead &&\n-\t\tgit push unborn-namespaced HEAD:master\n+\t\tgit push unborn-namespaced HEAD:main\n \t)\n '\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 155bfad454..ca86f666e6 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-4]*|5[0-4]*)\n+[0-4]*|5[0-4]*|550*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409820","messageId":"3a987c452eb88c2d18c6eebc9841644516d10e1c.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 22/28] t8*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:52Z","receivedAt":"2020-11-12T22:44:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t8*.sh annotate*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/annotate-tests.sh             |  8 ++++----\n t/t8001-annotate.sh             |  2 +-\n t/t8003-blame-corner-cases.sh   |  4 ++--\n t/t8004-blame-with-conflicts.sh | 14 +++++++-------\n t/test-lib.sh                   |  2 +-\n 5 files changed, 15 insertions(+), 15 deletions(-)\n\ndiff --git a/t/annotate-tests.sh b/t/annotate-tests.sh\nindex 3aee61d2cc..ee5d2d4cf8 100644\n--- a/t/annotate-tests.sh\n+++ b/t/annotate-tests.sh\n@@ -95,7 +95,7 @@ test_expect_success 'blame 2 authors' '\n '\n \n test_expect_success 'setup B1 lines (branch1)' '\n-\tgit checkout -b branch1 master &&\n+\tgit checkout -b branch1 main &&\n \techo \"3A slow green fox jumps into the\" >>file &&\n \techo \"well.\" >>file &&\n \tGIT_AUTHOR_NAME=\"B1\" GIT_AUTHOR_EMAIL=\"B1@test.git\" \\\n@@ -107,7 +107,7 @@ test_expect_success 'blame 2 authors + 1 branch1 author' '\n '\n \n test_expect_success 'setup B2 lines (branch2)' '\n-\tgit checkout -b branch2 master &&\n+\tgit checkout -b branch2 main &&\n \tsed -e \"s/2A quick brown/4A quick brown lazy dog/\" <file >file.new &&\n \tmv file.new file &&\n \tGIT_AUTHOR_NAME=\"B2\" GIT_AUTHOR_EMAIL=\"B2@test.git\" \\\n@@ -131,11 +131,11 @@ test_expect_success 'blame --first-parent blames merge for branch1' '\n '\n \n test_expect_success 'blame ancestor' '\n-\tcheck_count -h master A 2 B 2\n+\tcheck_count -h main A 2 B 2\n '\n \n test_expect_success 'blame great-ancestor' '\n-\tcheck_count -h master^ A 2\n+\tcheck_count -h main^ A 2\n '\n \n test_expect_success 'setup evil merge' '\ndiff --git a/t/t8001-annotate.sh b/t/t8001-annotate.sh\nindex 72176e42c1..3687fc58d8 100755\n--- a/t/t8001-annotate.sh\n+++ b/t/t8001-annotate.sh\n@@ -7,7 +7,7 @@ PROG='git annotate'\n . \"$TEST_DIRECTORY\"/annotate-tests.sh\n \n test_expect_success 'annotate old revision' '\n-\tgit annotate file master >actual &&\n+\tgit annotate file main >actual &&\n \tawk \"{ print \\$3; }\" <actual >authors &&\n \ttest 2 = $(grep A <authors | wc -l) &&\n \ttest 2 = $(grep B <authors | wc -l)\ndiff --git a/t/t8003-blame-corner-cases.sh b/t/t8003-blame-corner-cases.sh\nindex ba8013b002..2e499b4511 100755\n--- a/t/t8003-blame-corner-cases.sh\n+++ b/t/t8003-blame-corner-cases.sh\n@@ -161,13 +161,13 @@ test_expect_success 'blame wholesale copy and more in the index' '\n \n test_expect_success 'blame during cherry-pick with file rename conflict' '\n \n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \tgit checkout HEAD~3 &&\n \techo MOUSE >> mouse &&\n \tgit mv mouse rodent &&\n \tgit add rodent &&\n \tGIT_AUTHOR_NAME=Rodent git commit -m \"rodent\" &&\n-\tgit checkout --detach master &&\n+\tgit checkout --detach main &&\n \t(git cherry-pick HEAD@{1} || test $? -eq 1) &&\n \tgit show HEAD@{1}:rodent > rodent &&\n \tgit add rodent &&\ndiff --git a/t/t8004-blame-with-conflicts.sh b/t/t8004-blame-with-conflicts.sh\nindex 9c353ab222..b6c992ec45 100755\n--- a/t/t8004-blame-with-conflicts.sh\n+++ b/t/t8004-blame-with-conflicts.sh\n@@ -21,16 +21,16 @@ test_expect_success 'setup first case' '\n \tgit add file2 &&\n \tgit commit --author \"U Gly <ug@localhost>\" -m ugly &&\n \n-\t# Back to master and change something\n-\tgit checkout master &&\n+\t# Back to main and change something\n+\tgit checkout main &&\n \techo \"\n \n bla\" >> file1 &&\n \tgit commit --author \"Old Line <ol@localhost>\" -a -m file1.b &&\n \n-\t# Back to foo and merge master\n+\t# Back to foo and merge main\n \tgit checkout foo &&\n-\tif git merge master; then\n+\tif git merge main; then\n \t\techo needed conflict here\n \t\texit 1\n \telse\n@@ -44,8 +44,8 @@ Even more\" > file2 &&\n \tgit rm file1 &&\n \tgit commit --author \"M Result <mr@localhost>\" -a -m merged &&\n \n-\t# Back to master and change file1 again\n-\tgit checkout master &&\n+\t# Back to main and change file1 again\n+\tgit checkout main &&\n \tsed s/bla/foo/ <file1 >X &&\n \trm file1 &&\n \tmv X file1 &&\n@@ -53,7 +53,7 @@ Even more\" > file2 &&\n \n \t# Try to merge into foo again\n \tgit checkout foo &&\n-\tif git merge master; then\n+\tif git merge main; then\n \t\techo needed conflict here\n \t\texit 1\n \telse\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 2ef51a4f3f..4ddfb9e3ee 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-7]*)\n+[0-8]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409815","messageId":"2367a322c8405a752984d1e150bd25c61259a459.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 24/28] t9[5-7]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:54Z","receivedAt":"2020-11-12T22:44:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t9[5-7]*.sh lib-cvs.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/lib-cvs.sh                              |  2 +-\n t/t9500-gitweb-standalone-no-errors.sh    | 20 ++++++++++----------\n t/t9501-gitweb-standalone-http-status.sh  | 14 +++++++-------\n t/t9502-gitweb-standalone-parse-output.sh | 16 ++++++++--------\n t/t9600-cvsimport.sh                      |  2 +-\n t/t9601-cvsimport-vendor-branch.sh        | 16 ++++++++--------\n t/t9602-cvsimport-branches-tags.sh        |  4 ++--\n t/t9603-cvsimport-patchsets.sh            |  8 ++++----\n t/test-lib.sh                             |  2 +-\n 9 files changed, 42 insertions(+), 42 deletions(-)\n\ndiff --git a/t/lib-cvs.sh b/t/lib-cvs.sh\nindex 9b2bcfb1b0..32b3473379 100644\n--- a/t/lib-cvs.sh\n+++ b/t/lib-cvs.sh\n@@ -36,7 +36,7 @@ setup_cvs_test_repository () {\n test_cvs_co () {\n \t# Usage: test_cvs_co BRANCH_NAME\n \trm -rf module-cvs-\"$1\"\n-\tif [ \"$1\" = \"master\" ]\n+\tif [ \"$1\" = \"main\" ]\n \tthen\n \t\t$CVS co -P -d module-cvs-\"$1\" -A module\n \telse\ndiff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\nindex b484e3e250..452470ff3b 100755\n--- a/t/t9500-gitweb-standalone-no-errors.sh\n+++ b/t/t9500-gitweb-standalone-no-errors.sh\n@@ -327,7 +327,7 @@ test_expect_success \\\n \t echo \"Branch\" >>b &&\n \t git add b &&\n \t git commit -a -m \"On branch\" &&\n-\t git checkout master &&\n+\t git checkout main &&\n \t git merge b &&\n \t git tag merge_commit'\n \n@@ -364,7 +364,7 @@ test_expect_success \\\n \t echo \"Changed and have mode changed\" >07-change-mode-change &&\n \t test_chmod +x 07-change-mode-change &&\n \t git commit -a -m \"Large commit\" &&\n-\t git checkout master'\n+\t git checkout main'\n \n test_expect_success \\\n \t'commit(1): large commit' \\\n@@ -402,7 +402,7 @@ test_expect_success 'side-by-side: merge commit' '\n \n test_expect_success \\\n \t'tags: list of different types of tags' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t git tag -a -m \"Tag commit object\" tag-commit HEAD &&\n \t git tag -a -m \"\" tag-commit-nomessage HEAD &&\n \t git tag -a -m \"Tag tag object\" tag-tag tag-commit &&\n@@ -443,7 +443,7 @@ test_expect_success \\\n \n test_expect_success \\\n \t'logs: history (implicit HEAD, deleted file)' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t echo \"to be deleted\" >deleted_file &&\n \t git add deleted_file &&\n \t git commit -m \"Add file to be deleted\" &&\n@@ -463,11 +463,11 @@ test_expect_success \\\n \n test_expect_success \\\n \t'path_info: project/branch:file' \\\n-\t'gitweb_run \"\" \"/.git/master:file\"'\n+\t'gitweb_run \"\" \"/.git/main:file\"'\n \n test_expect_success \\\n \t'path_info: project/branch:dir/' \\\n-\t'gitweb_run \"\" \"/.git/master:foo/\"'\n+\t'gitweb_run \"\" \"/.git/main:foo/\"'\n \n test_expect_success \\\n \t'path_info: project/branch (non-existent)' \\\n@@ -479,16 +479,16 @@ test_expect_success \\\n \n test_expect_success \\\n \t'path_info: project/branch:file (non-existent)' \\\n-\t'gitweb_run \"\" \"/.git/master:non-existent\"'\n+\t'gitweb_run \"\" \"/.git/main:non-existent\"'\n \n test_expect_success \\\n \t'path_info: project/branch:dir/ (non-existent)' \\\n-\t'gitweb_run \"\" \"/.git/master:non-existent/\"'\n+\t'gitweb_run \"\" \"/.git/main:non-existent/\"'\n \n \n test_expect_success \\\n \t'path_info: project/branch:/file' \\\n-\t'gitweb_run \"\" \"/.git/master:/file\"'\n+\t'gitweb_run \"\" \"/.git/main:/file\"'\n \n test_expect_success \\\n \t'path_info: project/:/file (implicit HEAD)' \\\n@@ -801,7 +801,7 @@ test_expect_success \\\n \t\tgit checkout orphan_branch ||\n \t\tgit checkout --orphan orphan_branch\n \t } &&\n-\t test_when_finished \"git checkout master\" &&\n+\t test_when_finished \"git checkout main\" &&\n \t gitweb_run \"p=.git;a=summary\"'\n \n test_done\ndiff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-status.sh\nindex 2a0ffed870..16f98ab54e 100755\n--- a/t/t9501-gitweb-standalone-http-status.sh\n+++ b/t/t9501-gitweb-standalone-http-status.sh\n@@ -85,7 +85,7 @@ test_debug 'cat gitweb.headers'\n # snapshot hash ids\n \n test_expect_success 'snapshots: good tree-ish id' '\n-\tgitweb_run \"p=.git;a=snapshot;h=master;sf=tgz\" &&\n+\tgitweb_run \"p=.git;a=snapshot;h=main;sf=tgz\" &&\n \tgrep \"Status: 200 OK\" gitweb.output\n '\n test_debug 'cat gitweb.headers'\n@@ -123,7 +123,7 @@ test_debug 'cat gitweb.output'\n # modification times (Last-Modified and If-Modified-Since)\n \n test_expect_success DATE_PARSER 'modification: feed last-modified' '\n-\tgitweb_run \"p=.git;a=atom;h=master\" &&\n+\tgitweb_run \"p=.git;a=atom;h=main\" &&\n \tgrep \"Status: 200 OK\" gitweb.headers &&\n \tgrep \"Last-modified: Thu, 7 Apr 2005 22:14:13 +0000\" gitweb.headers\n '\n@@ -133,7 +133,7 @@ test_expect_success DATE_PARSER 'modification: feed if-modified-since (modified)\n \tHTTP_IF_MODIFIED_SINCE=\"Wed, 6 Apr 2005 22:14:13 +0000\" &&\n \texport HTTP_IF_MODIFIED_SINCE &&\n \ttest_when_finished \"unset HTTP_IF_MODIFIED_SINCE\" &&\n-\tgitweb_run \"p=.git;a=atom;h=master\" &&\n+\tgitweb_run \"p=.git;a=atom;h=main\" &&\n \tgrep \"Status: 200 OK\" gitweb.headers\n '\n test_debug 'cat gitweb.headers'\n@@ -142,13 +142,13 @@ test_expect_success DATE_PARSER 'modification: feed if-modified-since (unmodifie\n \tHTTP_IF_MODIFIED_SINCE=\"Thu, 7 Apr 2005 22:14:13 +0000\" &&\n \texport HTTP_IF_MODIFIED_SINCE &&\n \ttest_when_finished \"unset HTTP_IF_MODIFIED_SINCE\" &&\n-\tgitweb_run \"p=.git;a=atom;h=master\" &&\n+\tgitweb_run \"p=.git;a=atom;h=main\" &&\n \tgrep \"Status: 304 Not Modified\" gitweb.headers\n '\n test_debug 'cat gitweb.headers'\n \n test_expect_success DATE_PARSER 'modification: snapshot last-modified' '\n-\tgitweb_run \"p=.git;a=snapshot;h=master;sf=tgz\" &&\n+\tgitweb_run \"p=.git;a=snapshot;h=main;sf=tgz\" &&\n \tgrep \"Status: 200 OK\" gitweb.headers &&\n \tgrep \"Last-modified: Thu, 7 Apr 2005 22:14:13 +0000\" gitweb.headers\n '\n@@ -158,7 +158,7 @@ test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (modif\n \tHTTP_IF_MODIFIED_SINCE=\"Wed, 6 Apr 2005 22:14:13 +0000\" &&\n \texport HTTP_IF_MODIFIED_SINCE &&\n \ttest_when_finished \"unset HTTP_IF_MODIFIED_SINCE\" &&\n-\tgitweb_run \"p=.git;a=snapshot;h=master;sf=tgz\" &&\n+\tgitweb_run \"p=.git;a=snapshot;h=main;sf=tgz\" &&\n \tgrep \"Status: 200 OK\" gitweb.headers\n '\n test_debug 'cat gitweb.headers'\n@@ -167,7 +167,7 @@ test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (unmod\n \tHTTP_IF_MODIFIED_SINCE=\"Thu, 7 Apr 2005 22:14:13 +0000\" &&\n \texport HTTP_IF_MODIFIED_SINCE &&\n \ttest_when_finished \"unset HTTP_IF_MODIFIED_SINCE\" &&\n-\tgitweb_run \"p=.git;a=snapshot;h=master;sf=tgz\" &&\n+\tgitweb_run \"p=.git;a=snapshot;h=main;sf=tgz\" &&\n \tgrep \"Status: 304 Not Modified\" gitweb.headers\n '\n test_debug 'cat gitweb.headers'\ndiff --git a/t/t9502-gitweb-standalone-parse-output.sh b/t/t9502-gitweb-standalone-parse-output.sh\nindex e38cbc97d3..d0cfff9fdd 100755\n--- a/t/t9502-gitweb-standalone-parse-output.sh\n+++ b/t/t9502-gitweb-standalone-parse-output.sh\n@@ -79,10 +79,10 @@ test_expect_success 'snapshot: HEAD' '\n '\n test_debug 'cat gitweb.headers && cat file_list'\n \n-test_expect_success 'snapshot: short branch name (master)' '\n-\tgitweb_run \"p=.git;a=snapshot;h=master;sf=tar\" &&\n-\tID=$(git rev-parse --verify --short=7 master) &&\n-\tcheck_snapshot \".git-master-$ID\"\n+test_expect_success 'snapshot: short branch name (main)' '\n+\tgitweb_run \"p=.git;a=snapshot;h=main;sf=tar\" &&\n+\tID=$(git rev-parse --verify --short=7 main) &&\n+\tcheck_snapshot \".git-main-$ID\"\n '\n test_debug 'cat gitweb.headers && cat file_list'\n \n@@ -93,10 +93,10 @@ test_expect_success 'snapshot: short tag name (first)' '\n '\n test_debug 'cat gitweb.headers && cat file_list'\n \n-test_expect_success 'snapshot: full branch name (refs/heads/master)' '\n-\tgitweb_run \"p=.git;a=snapshot;h=refs/heads/master;sf=tar\" &&\n-\tID=$(git rev-parse --verify --short=7 master) &&\n-\tcheck_snapshot \".git-master-$ID\"\n+test_expect_success 'snapshot: full branch name (refs/heads/main)' '\n+\tgitweb_run \"p=.git;a=snapshot;h=refs/heads/main;sf=tar\" &&\n+\tID=$(git rev-parse --verify --short=7 main) &&\n+\tcheck_snapshot \".git-main-$ID\"\n '\n test_debug 'cat gitweb.headers && cat file_list'\n \ndiff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh\nindex 251fdd66c4..0c8e02c2b3 100755\n--- a/t/t9600-cvsimport.sh\n+++ b/t/t9600-cvsimport.sh\n@@ -159,6 +159,6 @@ test_expect_success PERL 'no .git/cvs-revisions created by default' '\n \n '\n \n-test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree master'\n+test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree main'\n \n test_done\ndiff --git a/t/t9601-cvsimport-vendor-branch.sh b/t/t9601-cvsimport-vendor-branch.sh\nindex 827d39f5bf..1e89f936e8 100755\n--- a/t/t9601-cvsimport-vendor-branch.sh\n+++ b/t/t9601-cvsimport-vendor-branch.sh\n@@ -42,43 +42,43 @@ test_expect_success PERL 'import a module with a vendor branch' '\n \n '\n \n-test_expect_success PERL 'check HEAD out of cvs repository' 'test_cvs_co master'\n+test_expect_success PERL 'check HEAD out of cvs repository' 'test_cvs_co main'\n \n-test_expect_success PERL 'check master out of git repository' 'test_git_co master'\n+test_expect_success PERL 'check main out of git repository' 'test_git_co main'\n \n test_expect_success PERL 'check a file that was imported once' '\n \n-\ttest_cmp_branch_file master imported-once.txt\n+\ttest_cmp_branch_file main imported-once.txt\n \n '\n \n test_expect_failure PERL 'check a file that was imported twice' '\n \n-\ttest_cmp_branch_file master imported-twice.txt\n+\ttest_cmp_branch_file main imported-twice.txt\n \n '\n \n test_expect_success PERL 'check a file that was imported then modified on HEAD' '\n \n-\ttest_cmp_branch_file master imported-modified.txt\n+\ttest_cmp_branch_file main imported-modified.txt\n \n '\n \n test_expect_success PERL 'check a file that was imported, modified, then imported again' '\n \n-\ttest_cmp_branch_file master imported-modified-imported.txt\n+\ttest_cmp_branch_file main imported-modified-imported.txt\n \n '\n \n test_expect_success PERL 'check a file that was added to HEAD then imported' '\n \n-\ttest_cmp_branch_file master added-imported.txt\n+\ttest_cmp_branch_file main added-imported.txt\n \n '\n \n test_expect_success PERL 'a vendor branch whose tag has been removed' '\n \n-\ttest_cmp_branch_file master imported-anonymously.txt\n+\ttest_cmp_branch_file main imported-anonymously.txt\n \n '\n \ndiff --git a/t/t9602-cvsimport-branches-tags.sh b/t/t9602-cvsimport-branches-tags.sh\nindex e1db323f54..fa3c1ae133 100755\n--- a/t/t9602-cvsimport-branches-tags.sh\n+++ b/t/t9602-cvsimport-branches-tags.sh\n@@ -14,9 +14,9 @@ test_expect_success PERL 'import module' '\n \n '\n \n-test_expect_success PERL 'test branch master' '\n+test_expect_success PERL 'test branch main' '\n \n-\ttest_cmp_branch_tree master\n+\ttest_cmp_branch_tree main\n \n '\n \ndiff --git a/t/t9603-cvsimport-patchsets.sh b/t/t9603-cvsimport-patchsets.sh\nindex e7a91611dc..19f38f78f2 100755\n--- a/t/t9603-cvsimport-patchsets.sh\n+++ b/t/t9603-cvsimport-patchsets.sh\n@@ -20,16 +20,16 @@ test_expect_failure PERL 'import with criss cross times on revisions' '\n \tgit cvsimport -p\"-x\" -C module-git module &&\n \t(\n \t\tcd module-git &&\n-\t\tgit log --pretty=format:%s > ../actual-master &&\n+\t\tgit log --pretty=format:%s > ../actual-main &&\n \t\tgit log A~2..A --pretty=\"format:%s %ad\" -- > ../actual-A &&\n-\t\techo \"\" >> ../actual-master &&\n+\t\techo \"\" >> ../actual-main &&\n \t\techo \"\" >> ../actual-A\n \t) &&\n \techo \"Rev 4\n Rev 3\n Rev 2\n-Rev 1\" > expect-master &&\n-\ttest_cmp expect-master actual-master &&\n+Rev 1\" > expect-main &&\n+\ttest_cmp expect-main actual-main &&\n \n \techo \"Rev 5 Branch A Wed Mar 11 19:09:10 2009 +0000\n Rev 4 Branch A Wed Mar 11 19:03:52 2009 +0000\" > expect-A &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex a2b539aa30..803b9c2a58 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-8]*|9[0-4]*)\n+[0-8]*|9[0-7]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409819","messageId":"bd32d55eab2ceab101343ebf1d571056d6e7696a.1605221040.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 25/28] tests(git-p4): transition to the default branch name `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:55Z","receivedAt":"2020-11-12T22:44:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn the previous commits, we adjusted the test suite to use the branch\nname `main` for initial branches.\n\nThe `git p4`-related tests are a bit harder to adjust because `git p4`\nuses the ref `refs/heads/p4/master` to track the remote branches, and\nfor now, we do not want to change that (this might be the subject of a\nfuture patch series). We only need to adjust for the actual initial\nbranch name to be changed to `main`.\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9800-git-p4-basic.sh        |  2 +-\n t/t9801-git-p4-branch.sh       | 16 ++++++++--------\n t/t9806-git-p4-options.sh      | 18 +++++++++---------\n t/t9807-git-p4-submit.sh       |  2 +-\n t/t9811-git-p4-label-import.sh |  2 +-\n t/test-lib.sh                  |  2 +-\n 6 files changed, 21 insertions(+), 21 deletions(-)\n\ndiff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh\nindex c98c1dfc23..0c543a8708 100755\n--- a/t/t9800-git-p4-basic.sh\n+++ b/t/t9800-git-p4-basic.sh\n@@ -226,7 +226,7 @@ test_expect_success 'clone --bare should make a bare repository' '\n \t\tgit config --get --bool core.bare true &&\n \t\tgit rev-parse --verify refs/remotes/p4/master &&\n \t\tgit rev-parse --verify refs/remotes/p4/HEAD &&\n-\t\tgit rev-parse --verify refs/heads/master &&\n+\t\tgit rev-parse --verify refs/heads/main &&\n \t\tgit rev-parse --verify HEAD\n \t)\n '\ndiff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh\nindex a3abd778f9..94161d4b57 100755\n--- a/t/t9801-git-p4-branch.sh\n+++ b/t/t9801-git-p4-branch.sh\n@@ -67,7 +67,7 @@ test_expect_success 'import main, no branch detection' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 4 wc\n \t)\n '\n@@ -78,7 +78,7 @@ test_expect_success 'import branch1, no branch detection' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 2 wc\n \t)\n '\n@@ -89,7 +89,7 @@ test_expect_success 'import branch2, no branch detection' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 2 wc\n \t)\n '\n@@ -100,7 +100,7 @@ test_expect_success 'import depot, no branch detection' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 8 wc\n \t)\n '\n@@ -114,7 +114,7 @@ test_expect_success 'import depot, branch detection' '\n \t\tgit log --oneline --graph --decorate --all &&\n \n \t\t# 4 main commits\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 4 wc &&\n \n \t\t# 3 main, 1 integrate, 1 on branch2\n@@ -137,7 +137,7 @@ test_expect_success 'import depot, branch detection, branchList branch definitio\n \t\tgit log --oneline --graph --decorate --all &&\n \n \t\t# 4 main commits\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 4 wc &&\n \n \t\t# 3 main, 1 integrate, 1 on branch2\n@@ -484,7 +484,7 @@ test_expect_success 'use-client-spec detect-branches files in top-level' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit p4 sync --detect-branches --use-client-spec //depot/usecs@all &&\n-\t\tgit checkout -b master p4/usecs/b1 &&\n+\t\tgit checkout -b main p4/usecs/b1 &&\n \t\ttest_path_is_file b1-file1 &&\n \t\ttest_path_is_missing b2-file2 &&\n \t\ttest_path_is_missing b1 &&\n@@ -537,7 +537,7 @@ test_expect_success 'use-client-spec detect-branches skips files in branches' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit p4 sync --detect-branches --use-client-spec //depot/usecs@all &&\n-\t\tgit checkout -b master p4/usecs/b3 &&\n+\t\tgit checkout -b main p4/usecs/b3 &&\n \t\ttest_path_is_file b1-file1 &&\n \t\ttest_path_is_file b3-file3_2 &&\n \t\ttest_path_is_missing b3-file3_1\ndiff --git a/t/t9806-git-p4-options.sh b/t/t9806-git-p4-options.sh\nindex 4e794a01bf..0beae2e3f3 100755\n--- a/t/t9806-git-p4-options.sh\n+++ b/t/t9806-git-p4-options.sh\n@@ -27,14 +27,14 @@ test_expect_success 'clone no --git-dir' '\n \ttest_must_fail git p4 clone --git-dir=xx //depot\n '\n \n-test_expect_success 'clone --branch should checkout master' '\n+test_expect_success 'clone --branch should checkout main' '\n \tgit p4 clone --branch=refs/remotes/p4/sb --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n \t\tgit rev-parse refs/remotes/p4/sb >sb &&\n-\t\tgit rev-parse refs/heads/master >master &&\n-\t\ttest_cmp sb master &&\n+\t\tgit rev-parse refs/heads/main >main &&\n+\t\ttest_cmp sb main &&\n \t\tgit rev-parse HEAD >head &&\n \t\ttest_cmp sb head\n \t)\n@@ -147,22 +147,22 @@ test_expect_success 'clone --changesfile, @all' '\n \ttest_must_fail git p4 clone --changesfile=\"$TRASH_DIRECTORY/cf\" --dest=\"$git\" //depot@all\n '\n \n-# imports both master and p4/master in refs/heads\n+# imports both main and p4/master in refs/heads\n # requires --import-local on sync to find p4 refs/heads\n-# does not update master on sync, just p4/master\n+# does not update main on sync, just p4/master\n test_expect_success 'clone/sync --import-local' '\n \tgit p4 clone --import-local --dest=\"$git\" //depot@1,2 &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n-\t\tgit log --oneline refs/heads/master >lines &&\n+\t\tgit log --oneline refs/heads/main >lines &&\n \t\ttest_line_count = 2 lines &&\n \t\tgit log --oneline refs/heads/p4/master >lines &&\n \t\ttest_line_count = 2 lines &&\n \t\ttest_must_fail git p4 sync &&\n \n \t\tgit p4 sync --import-local &&\n-\t\tgit log --oneline refs/heads/master >lines &&\n+\t\tgit log --oneline refs/heads/main >lines &&\n \t\ttest_line_count = 2 lines &&\n \t\tgit log --oneline refs/heads/p4/master >lines &&\n \t\ttest_line_count = 3 lines\n@@ -174,7 +174,7 @@ test_expect_success 'clone --max-changes' '\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n-\t\tgit log --oneline refs/heads/master >lines &&\n+\t\tgit log --oneline refs/heads/main >lines &&\n \t\ttest_line_count = 2 lines\n \t)\n '\n@@ -237,7 +237,7 @@ test_expect_success 'clone --use-client-spec' '\n \t\t\tgit init &&\n \t\t\tgit config git-p4.useClientSpec true &&\n \t\t\tgit p4 sync //depot/... &&\n-\t\t\tgit checkout -b master p4/master &&\n+\t\t\tgit checkout -b main p4/master &&\n \t\t\ttest_path_is_file bus/dir/f4 &&\n \t\t\ttest_path_is_missing file1\n \t\t)\ndiff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh\nindex eaaae414a1..e45104d1ef 100755\n--- a/t/t9807-git-p4-submit.sh\n+++ b/t/t9807-git-p4-submit.sh\n@@ -114,7 +114,7 @@ test_expect_success 'submit with allowSubmit' '\n \t\tgit config git-p4.skipSubmitEdit true &&\n \t\tgit config git-p4.allowSubmit \"nobranch\" &&\n \t\ttest_must_fail git p4 submit &&\n-\t\tgit config git-p4.allowSubmit \"nobranch,master\" &&\n+\t\tgit config git-p4.allowSubmit \"nobranch,main\" &&\n \t\tgit p4 submit\n \t)\n '\ndiff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh\nindex c1446f26ab..c722b5a176 100755\n--- a/t/t9811-git-p4-label-import.sh\n+++ b/t/t9811-git-p4-label-import.sh\n@@ -185,7 +185,7 @@ test_expect_success 'tag that cannot be exported' '\n \t\tgit add main/f12 &&\n \t\tgit commit -m \"adding f12\" &&\n \t\tgit tag -m \"tag on a_branch\" GIT_TAG_ON_A_BRANCH &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit p4 submit --export-labels\n \t) &&\n \t(\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 803b9c2a58..173880196e 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-8]*|9[0-7]*)\n+[0-8]*|9[0-8]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409817","messageId":"f853fa946f5840518577584a5b8c51660da06928.1605221040.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 28/28] Change the default branch name to `main`","fromName":"Don Goodman-Wilson via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:58Z","receivedAt":"2020-11-12T22:44:26Z","isPatch":true,"sender":{"key":"don@goodman-wilson.com","avatar":"https://gravatar.com/avatar/9819ec326d55ea4c398b8ff018dcf63b4e9603b00db9cc019c725bffc9c05d17?d=mp&s=160"},"body":"From: Don Goodman-Wilson <don@goodman-wilson.com>\n\nThe current default name for the initial branch is a loaded term, and\nmany Open Source projects renamed their principal branches already. A\ncommon choice appears to be `main`.\n\nLet's follow their lead and change the default of `init.defaultBranch`.\n\nCo-authored-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Don Goodman-Wilson <don@goodman-wilson.com>\n---\n refs.c                    | 2 +-\n t/lib-submodule-update.sh | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/refs.c b/refs.c\nindex 392f0bbf68..5576a90573 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -575,7 +575,7 @@ char *repo_default_branch_name(struct repository *r)\n \t\tdie(_(\"could not retrieve `%s`\"), config_display_key);\n \n \tif (!ret)\n-\t\tret = xstrdup(\"master\");\n+\t\tret = xstrdup(\"main\");\n \n \tfull_ref = xstrfmt(\"refs/heads/%s\", ret);\n \tif (check_refname_format(full_ref, 0))\ndiff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh\nindex bd3fa3c6da..1b0abcb0f8 100644\n--- a/t/lib-submodule-update.sh\n+++ b/t/lib-submodule-update.sh\n@@ -144,7 +144,7 @@ create_lib_submodule_repo () {\n \t\tgit checkout -b valid_sub1 &&\n \t\tgit revert HEAD &&\n \n-\t\tgit checkout \"${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME-master}\"\n+\t\tgit checkout \"${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME-main}\"\n \t)\n }\n \n-- \ngitgitgadget\n"},{"id":"409833","messageId":"09b611a3598553b0576fd174ff0ac66a8584ba22.1605221040.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 27/28] tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:57Z","receivedAt":"2020-11-12T22:44:28Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe introduced the `PREPARE_FOR_MAIN_BRANCH` prereq for the sole purpose\nof allowing us to perform the non-trivial adjustments regarding the\n`master` -> `main` rename before the automatable ones.\n\nNow that the transition is almost complete, we can stop using it in most\ninstances. The only exception is t9902: at the time of writing, there\nare other patches in flight that touch this test script, therefore the\ntransition to `main` is postponed to a later date.\n\nThis patch is the result of this command:\n\n\tsed -i 's/PREPARE_FOR_MAIN_BRANCH[ ,]//' t/t[0-9]*.sh &&\n\tgit checkout HEAD -- t/t9902\\*\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t1400-update-ref.sh              |  4 +--\n t/t3200-branch.sh                  |  6 ++---\n t/t3201-branch-contains.sh         |  2 +-\n t/t3203-branch-output.sh           |  2 +-\n t/t3205-branch-color.sh            |  2 +-\n t/t5505-remote.sh                  |  8 +++---\n t/t5510-fetch.sh                   |  4 +--\n t/t5526-fetch-submodules.sh        | 42 +++++++++++++++---------------\n t/t5703-upload-pack-ref-in-want.sh |  2 +-\n t/t6302-for-each-ref-filter.sh     | 12 ++++-----\n 10 files changed, 42 insertions(+), 42 deletions(-)\n\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex 3265a8c58e..127efff136 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -585,7 +585,7 @@ test_expect_success 'stdin fails on unbalanced quotes' '\n \tgrep \"fatal: badly quoted argument: \\\\\\\"main\" err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin fails on invalid escape' '\n+test_expect_success 'stdin fails on invalid escape' '\n \techo \"create $a \\\"ma\\zn\\\"\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n \tgrep \"fatal: badly quoted argument: \\\\\\\"ma\\\\\\\\zn\\\\\\\"\" err\n@@ -704,7 +704,7 @@ test_expect_success 'stdin succeeds with quoted argument' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin succeeds with escaped character' '\n+test_expect_success 'stdin succeeds with escaped character' '\n \tgit update-ref -d $a &&\n \techo \"create $a \\\"ma\\\\151n\\\"\" >stdin &&\n \tgit update-ref --stdin <stdin &&\ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex 63036e0369..430f5af21b 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -321,7 +321,7 @@ test_expect_success 'git branch --list -v with --abbrev' '\n \n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch --column' '\n+test_expect_success 'git branch --column' '\n \tCOLUMNS=81 git branch --column=column >actual &&\n \tcat >expect <<\\EOF &&\n   a/b/c   bam     foo     l     * main    n       o/p     r\n@@ -358,7 +358,7 @@ EOF\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch with column.*' '\n+test_expect_success 'git branch with column.*' '\n \tgit config column.ui column &&\n \tgit config column.branch \"dense\" &&\n \tCOLUMNS=80 git branch >actual &&\n@@ -375,7 +375,7 @@ test_expect_success 'git branch --column -v should fail' '\n \ttest_must_fail git branch --column -v\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch -v with column.ui ignored' '\n+test_expect_success 'git branch -v with column.ui ignored' '\n \tgit config column.ui column &&\n \tCOLUMNS=80 git branch -v | cut -c -8 | sed \"s/ *$//\" >actual &&\n \tgit config --unset column.ui &&\ndiff --git a/t/t3201-branch-contains.sh b/t/t3201-branch-contains.sh\nindex 110cfef820..f39ae97264 100755\n--- a/t/t3201-branch-contains.sh\n+++ b/t/t3201-branch-contains.sh\n@@ -242,7 +242,7 @@ test_expect_success 'branch --merged combined with --no-merged' '\n # Here \"topic\" tracks \"main\" with one extra commit, and \"zzz\" points to the\n # same tip as main The name \"zzz\" must come alphabetically after \"topic\"\n # as we process them in that order.\n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'branch --merged with --verbose' '\n+test_expect_success 'branch --merged with --verbose' '\n \tgit branch --track topic main &&\n \tgit branch zzz topic &&\n \tgit checkout topic &&\ndiff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh\nindex 727c9d9caa..211eb8357f 100755\n--- a/t/t3203-branch-output.sh\n+++ b/t/t3203-branch-output.sh\n@@ -329,7 +329,7 @@ test_expect_success '--color overrides auto-color' '\n \ttest_cmp expect.color actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output lists worktree path' '\n+test_expect_success 'verbose output lists worktree path' '\n \tone=$(git rev-parse --short HEAD) &&\n \ttwo=$(git rev-parse --short main) &&\n \tcat >expect <<-EOF &&\ndiff --git a/t/t3205-branch-color.sh b/t/t3205-branch-color.sh\nindex 9f2fb785d2..2eb619231d 100755\n--- a/t/t3205-branch-color.sh\n+++ b/t/t3205-branch-color.sh\n@@ -28,7 +28,7 @@ test_expect_success 'regular output shows colors' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output shows colors' '\n+test_expect_success 'verbose output shows colors' '\n \toid=$(git rev-parse --short HEAD) &&\n \tcat >expect <<-EOF &&\n \t* <CYAN>main               <RESET> $oid foo\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex 540d65aa22..869109a2c6 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -234,7 +234,7 @@ cat >test/expect <<EOF\n     main  pushes to another (up to date)\n EOF\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'show' '\n+test_expect_success 'show' '\n \t(\n \t\tcd test &&\n \t\tgit config --add remote.origin.fetch refs/heads/main:refs/heads/upstream &&\n@@ -285,7 +285,7 @@ cat >test/expect <<EOF\n     refs/tags/lastbackup forces to refs/tags/lastbackup\n EOF\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'show -n' '\n+test_expect_success 'show -n' '\n \tmv one one.unreachable &&\n \t(\n \t\tcd test &&\n@@ -328,7 +328,7 @@ test_expect_success 'set-head --auto' '\n \t)\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'set-head --auto has no problem w/multiple HEADs' '\n+test_expect_success 'set-head --auto has no problem w/multiple HEADs' '\n \t(\n \t\tcd test &&\n \t\tgit fetch two \"refs/heads/*:refs/remotes/two/*\" &&\n@@ -1348,7 +1348,7 @@ test_expect_success 'unqualified <dst> refspec DWIM and advice' '\n \t)\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '\n+test_expect_success 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '\n \t(\n \t\tcd two &&\n \t\tgit tag -a -m \"Some tag\" my-tag main &&\ndiff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh\nindex 206e3be695..f8bcaeca08 100755\n--- a/t/t5510-fetch.sh\n+++ b/t/t5510-fetch.sh\n@@ -942,7 +942,7 @@ test_expect_success 'fetching with auto-gc does not lock up' '\n \t)\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch aligned output' '\n+test_expect_success C_LOCALE_OUTPUT 'fetch aligned output' '\n \tgit clone . full-output &&\n \ttest_commit looooooooooooong-tag &&\n \t(\n@@ -957,7 +957,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch aligned outpu\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch compact output' '\n+test_expect_success C_LOCALE_OUTPUT 'fetch compact output' '\n \tgit clone . compact &&\n \ttest_commit extraaa &&\n \t(\ndiff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh\nindex f45ba02b8a..356ce31d48 100755\n--- a/t/t5526-fetch-submodules.sh\n+++ b/t/t5526-fetch-submodules.sh\n@@ -61,7 +61,7 @@ test_expect_success setup '\n \t)\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"fetch --recurse-submodules recurses into submodules\" '\n+test_expect_success \"fetch --recurse-submodules recurses into submodules\" '\n \tadd_upstream_commit &&\n \t(\n \t\tcd downstream &&\n@@ -71,7 +71,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"fetch --recurse-submodules recurses\n \ttest_i18ncmp expect.err actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"submodule.recurse option triggers recursive fetch\" '\n+test_expect_success \"submodule.recurse option triggers recursive fetch\" '\n \tadd_upstream_commit &&\n \t(\n \t\tcd downstream &&\n@@ -81,7 +81,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"submodule.recurse option triggers r\n \ttest_i18ncmp expect.err actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"fetch --recurse-submodules -j2 has the same output behaviour\" '\n+test_expect_success \"fetch --recurse-submodules -j2 has the same output behaviour\" '\n \tadd_upstream_commit &&\n \t(\n \t\tcd downstream &&\n@@ -111,7 +111,7 @@ test_expect_success \"fetch --no-recurse-submodules only fetches superproject\" '\n \ttest_must_be_empty actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"using fetchRecurseSubmodules=true in .gitmodules recurses into submodules\" '\n+test_expect_success \"using fetchRecurseSubmodules=true in .gitmodules recurses into submodules\" '\n \t(\n \t\tcd downstream &&\n \t\tgit config -f .gitmodules submodule.submodule.fetchRecurseSubmodules true &&\n@@ -141,7 +141,7 @@ test_expect_success \"using fetchRecurseSubmodules=false in .git/config overrides\n \ttest_must_be_empty actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"--recurse-submodules overrides fetchRecurseSubmodules setting from .git/config\" '\n+test_expect_success \"--recurse-submodules overrides fetchRecurseSubmodules setting from .git/config\" '\n \t(\n \t\tcd downstream &&\n \t\tgit fetch --recurse-submodules >../actual.out 2>../actual.err &&\n@@ -170,7 +170,7 @@ test_expect_success \"--quiet propagates to parallel submodules\" '\n \ttest_must_be_empty actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"--dry-run propagates to submodules\" '\n+test_expect_success \"--dry-run propagates to submodules\" '\n \tadd_upstream_commit &&\n \t(\n \t\tcd downstream &&\n@@ -180,7 +180,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"--dry-run propagates to submodules\"\n \ttest_i18ncmp expect.err actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"Without --dry-run propagates to submodules\" '\n+test_expect_success \"Without --dry-run propagates to submodules\" '\n \t(\n \t\tcd downstream &&\n \t\tgit fetch --recurse-submodules >../actual.out 2>../actual.err\n@@ -189,7 +189,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"Without --dry-run propagates to sub\n \ttest_i18ncmp expect.err actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"recurseSubmodules=true propagates into submodules\" '\n+test_expect_success \"recurseSubmodules=true propagates into submodules\" '\n \tadd_upstream_commit &&\n \t(\n \t\tcd downstream &&\n@@ -200,7 +200,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"recurseSubmodules=true propagates i\n \ttest_i18ncmp expect.err actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"--recurse-submodules overrides config in submodule\" '\n+test_expect_success \"--recurse-submodules overrides config in submodule\" '\n \tadd_upstream_commit &&\n \t(\n \t\tcd downstream &&\n@@ -225,7 +225,7 @@ test_expect_success \"--no-recurse-submodules overrides config setting\" '\n \ttest_must_be_empty actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion doesn't happen when no new commits are fetched in the superproject\" '\n+test_expect_success \"Recursion doesn't happen when no new commits are fetched in the superproject\" '\n \t(\n \t\tcd downstream &&\n \t\t(\n@@ -239,7 +239,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion doesn't happen when no ne\n \ttest_must_be_empty actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion stops when no new submodule commits are fetched\" '\n+test_expect_success \"Recursion stops when no new submodule commits are fetched\" '\n \thead1=$(git rev-parse --short HEAD) &&\n \tgit add submodule &&\n \tgit commit -m \"new submodule\" &&\n@@ -255,7 +255,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion stops when no new submodu\n \ttest_must_be_empty actual.out\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion doesn't happen when new superproject commits don't change any submodules\" '\n+test_expect_success \"Recursion doesn't happen when new superproject commits don't change any submodules\" '\n \tadd_upstream_commit &&\n \thead1=$(git rev-parse --short HEAD) &&\n \techo a > file &&\n@@ -272,7 +272,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion doesn't happen when new s\n \ttest_i18ncmp expect.err.file actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion picks up config in submodule\" '\n+test_expect_success \"Recursion picks up config in submodule\" '\n \t(\n \t\tcd downstream &&\n \t\tgit fetch --recurse-submodules &&\n@@ -301,7 +301,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion picks up config in submod\n \ttest_must_be_empty actual.out\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion picks up all submodules when necessary\" '\n+test_expect_success \"Recursion picks up all submodules when necessary\" '\n \tadd_upstream_commit &&\n \t(\n \t\tcd submodule &&\n@@ -334,7 +334,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion picks up all submodules w\n \ttest_must_be_empty actual.out\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"'--recurse-submodules=on-demand' doesn't recurse when no new commits are fetched in the superproject (and ignores config)\" '\n+test_expect_success \"'--recurse-submodules=on-demand' doesn't recurse when no new commits are fetched in the superproject (and ignores config)\" '\n \tadd_upstream_commit &&\n \t(\n \t\tcd submodule &&\n@@ -361,7 +361,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"'--recurse-submodules=on-demand' do\n \ttest_must_be_empty actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"'--recurse-submodules=on-demand' recurses as deep as necessary (and ignores config)\" '\n+test_expect_success \"'--recurse-submodules=on-demand' recurses as deep as necessary (and ignores config)\" '\n \thead1=$(git rev-parse --short HEAD) &&\n \tgit add submodule &&\n \tgit commit -m \"new submodule\" &&\n@@ -389,7 +389,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"'--recurse-submodules=on-demand' re\n \ttest_i18ncmp expect.err actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"'--recurse-submodules=on-demand' stops when no new submodule commits are found in the superproject (and ignores config)\" '\n+test_expect_success \"'--recurse-submodules=on-demand' stops when no new submodule commits are found in the superproject (and ignores config)\" '\n \tadd_upstream_commit &&\n \thead1=$(git rev-parse --short HEAD) &&\n \techo a >> file &&\n@@ -406,7 +406,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"'--recurse-submodules=on-demand' st\n \ttest_i18ncmp expect.err.file actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"'fetch.recurseSubmodules=on-demand' overrides global config\" '\n+test_expect_success \"'fetch.recurseSubmodules=on-demand' overrides global config\" '\n \t(\n \t\tcd downstream &&\n \t\tgit fetch --recurse-submodules\n@@ -434,7 +434,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"'fetch.recurseSubmodules=on-demand'\n \ttest_i18ncmp expect.err.2 actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"'submodule.<sub>.fetchRecurseSubmodules=on-demand' overrides fetch.recurseSubmodules\" '\n+test_expect_success \"'submodule.<sub>.fetchRecurseSubmodules=on-demand' overrides fetch.recurseSubmodules\" '\n \t(\n \t\tcd downstream &&\n \t\tgit fetch --recurse-submodules\n@@ -462,7 +462,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"'submodule.<sub>.fetchRecurseSubmod\n \ttest_i18ncmp expect.err.2 actual.err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"don't fetch submodule when newly recorded commits are already present\" '\n+test_expect_success \"don't fetch submodule when newly recorded commits are already present\" '\n \t(\n \t\tcd submodule &&\n \t\tgit checkout -q HEAD^^\n@@ -485,7 +485,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"don't fetch submodule when newly re\n \t)\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH \"'fetch.recurseSubmodules=on-demand' works also without .gitmodules entry\" '\n+test_expect_success \"'fetch.recurseSubmodules=on-demand' works also without .gitmodules entry\" '\n \t(\n \t\tcd downstream &&\n \t\tgit fetch --recurse-submodules\ndiff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\nindex bbf03a8f66..fe89ea55b1 100755\n--- a/t/t5703-upload-pack-ref-in-want.sh\n+++ b/t/t5703-upload-pack-ref-in-want.sh\n@@ -383,7 +383,7 @@ test_expect_success 'server is initially behind - ref in want' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'server loses a ref - ref in want' '\n+test_expect_success 'server loses a ref - ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant true &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\ndiff --git a/t/t6302-for-each-ref-filter.sh b/t/t6302-for-each-ref-filter.sh\nindex f5a55c1991..7a45bbf048 100755\n--- a/t/t6302-for-each-ref-filter.sh\n+++ b/t/t6302-for-each-ref-filter.sh\n@@ -113,7 +113,7 @@ test_expect_success '%(color) must fail' '\n \ttest_must_fail git for-each-ref --format=\"%(color)%(refname)\"\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'left alignment is default' '\n+test_expect_success 'left alignment is default' '\n \tcat >expect <<-\\EOF &&\n \trefname is refs/heads/main    |refs/heads/main\n \trefname is refs/heads/side    |refs/heads/side\n@@ -131,7 +131,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'left alignment is default' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'middle alignment' '\n+test_expect_success 'middle alignment' '\n \tcat >expect <<-\\EOF &&\n \t|  refname is refs/heads/main  |refs/heads/main\n \t|  refname is refs/heads/side  |refs/heads/side\n@@ -149,7 +149,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'middle alignment' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'right alignment' '\n+test_expect_success 'right alignment' '\n \tcat >expect <<-\\EOF &&\n \t|    refname is refs/heads/main|refs/heads/main\n \t|    refname is refs/heads/side|refs/heads/side\n@@ -184,7 +184,7 @@ EOF\n test_align_permutations() {\n \twhile read -r option\n \tdo\n-\t\ttest_expect_success PREPARE_FOR_MAIN_BRANCH \"align:$option\" '\n+\t\ttest_expect_success \"align:$option\" '\n \t\t\tgit for-each-ref --format=\"|%(align:$option)refname is %(refname)%(end)|%(refname)\" >actual &&\n \t\t\ttest_cmp expect actual\n \t\t'\n@@ -213,7 +213,7 @@ EOF\n \n # Individual atoms inside %(align:...) and %(end) must not be quoted.\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'alignment with format quote' \"\n+test_expect_success 'alignment with format quote' \"\n \tcat >expect <<-\\EOF &&\n \t|'       '\\''main| A U Thor'\\''       '|\n \t|'       '\\''side| A U Thor'\\''       '|\n@@ -231,7 +231,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'alignment with format quote' \"\n \ttest_cmp expect actual\n \"\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'nested alignment with quote formatting' \"\n+test_expect_success 'nested alignment with quote formatting' \"\n \tcat >expect <<-\\EOF &&\n \t|'           main               '|\n \t|'           side               '|\n-- \ngitgitgadget\n\n"},{"id":"409832","messageId":"73100477a86b4ffdb26e80ae93093441df582665.1605221040.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 26/28] t99*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:56Z","receivedAt":"2020-11-12T22:44:29Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t9902, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in\nt9903. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t99*.sh lib-cvs.sh &&\n\t   git checkout HEAD -- t9902\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor all tests (except the ones we specifically excluded for now).\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9903-bash-prompt.sh | 114 ++++++++++++++++++++---------------------\n t/test-lib.sh          |   4 +-\n 2 files changed, 59 insertions(+), 59 deletions(-)\n\ndiff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh\nindex ab5da2cabc..a77daa7419 100755\n--- a/t/t9903-bash-prompt.sh\n+++ b/t/t9903-bash-prompt.sh\n@@ -28,7 +28,7 @@ test_expect_success 'setup for prompt tests' '\n \techo 3 >file &&\n \tgit commit -m \"third b1\" file &&\n \tgit tag -a -m msg2 t2 &&\n-\tgit checkout -b b2 master &&\n+\tgit checkout -b b2 main &&\n \techo 0 >file &&\n \tgit commit -m \"second b2\" file &&\n \techo 00 >file &&\n@@ -37,20 +37,20 @@ test_expect_success 'setup for prompt tests' '\n \tgit commit -m \"yet another b2\" file &&\n \tmkdir ignored_dir &&\n \techo \"ignored_dir/\" >>.gitignore &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'prompt - branch name' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \t__git_ps1 >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n \n test_expect_success SYMLINKS 'prompt - branch name - symlink symref' '\n-\tprintf \" (master)\" >expected &&\n-\ttest_when_finished \"git checkout master\" &&\n+\tprintf \" (main)\" >expected &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_config core.preferSymlinkRefs true &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \t__git_ps1 >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n@@ -58,7 +58,7 @@ test_expect_success SYMLINKS 'prompt - branch name - symlink symref' '\n test_expect_success 'prompt - unborn branch' '\n \tprintf \" (unborn)\" >expected &&\n \tgit checkout --orphan unborn &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t__git_ps1 >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n@@ -72,7 +72,7 @@ test_expect_success FUNNYNAMES 'prompt - with newline in path' '\n with\n newline\" &&\n \tmkdir \"$repo_with_newline\" &&\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \tgit init \"$repo_with_newline\" &&\n \ttest_when_finished \"rm -rf \\\"$repo_with_newline\\\"\" &&\n \tmkdir \"$repo_with_newline\"/subdir &&\n@@ -87,7 +87,7 @@ test_expect_success 'prompt - detached head' '\n \tprintf \" ((%s...))\" $(git log -1 --format=\"%h\" --abbrev=13 b1^) >expected &&\n \ttest_config core.abbrev 13 &&\n \tgit checkout b1^ &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t__git_ps1 >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n@@ -95,7 +95,7 @@ test_expect_success 'prompt - detached head' '\n test_expect_success 'prompt - describe detached head - contains' '\n \tprintf \" ((t2~1))\" >expected &&\n \tgit checkout b1^ &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t(\n \t\tGIT_PS1_DESCRIBE_STYLE=contains &&\n \t\t__git_ps1 >\"$actual\"\n@@ -106,7 +106,7 @@ test_expect_success 'prompt - describe detached head - contains' '\n test_expect_success 'prompt - describe detached head - branch' '\n \tprintf \" ((tags/t2~1))\" >expected &&\n \tgit checkout b1^ &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t(\n \t\tGIT_PS1_DESCRIBE_STYLE=branch &&\n \t\t__git_ps1 >\"$actual\"\n@@ -117,7 +117,7 @@ test_expect_success 'prompt - describe detached head - branch' '\n test_expect_success 'prompt - describe detached head - describe' '\n \tprintf \" ((t1-1-g%s))\" $(git log -1 --format=\"%h\" b1^) >expected &&\n \tgit checkout b1^ &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t(\n \t\tGIT_PS1_DESCRIBE_STYLE=describe &&\n \t\t__git_ps1 >\"$actual\"\n@@ -128,7 +128,7 @@ test_expect_success 'prompt - describe detached head - describe' '\n test_expect_success 'prompt - describe detached head - default' '\n \tprintf \" ((t2))\" >expected &&\n \tgit checkout --detach b1 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t__git_ps1 >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n@@ -152,7 +152,7 @@ test_expect_success 'prompt - deep inside .git directory' '\n '\n \n test_expect_success 'prompt - inside bare repository' '\n-\tprintf \" (BARE:master)\" >expected &&\n+\tprintf \" (BARE:main)\" >expected &&\n \tgit init --bare bare.git &&\n \ttest_when_finished \"rm -rf bare.git\" &&\n \t(\n@@ -172,7 +172,7 @@ test_expect_success 'prompt - interactive rebase' '\n \ttest_when_finished \"rm -f fake_editor.sh\" &&\n \ttest_set_editor \"$TRASH_DIRECTORY/fake_editor.sh\" &&\n \tgit checkout b1 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit rebase -i HEAD^ &&\n \ttest_when_finished \"git rebase --abort\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -182,7 +182,7 @@ test_expect_success 'prompt - interactive rebase' '\n test_expect_success 'prompt - rebase merge' '\n \tprintf \" (b2|REBASE 1/3)\" >expected &&\n \tgit checkout b2 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_must_fail git rebase --merge b1 b2 &&\n \ttest_when_finished \"git rebase --abort\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -192,7 +192,7 @@ test_expect_success 'prompt - rebase merge' '\n test_expect_success 'prompt - rebase am' '\n \tprintf \" (b2|REBASE 1/3)\" >expected &&\n \tgit checkout b2 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_must_fail git rebase --apply b1 b2 &&\n \ttest_when_finished \"git rebase --abort\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -202,7 +202,7 @@ test_expect_success 'prompt - rebase am' '\n test_expect_success 'prompt - merge' '\n \tprintf \" (b1|MERGING)\" >expected &&\n \tgit checkout b1 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_must_fail git merge b2 &&\n \ttest_when_finished \"git reset --hard\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -210,7 +210,7 @@ test_expect_success 'prompt - merge' '\n '\n \n test_expect_success 'prompt - cherry-pick' '\n-\tprintf \" (master|CHERRY-PICKING)\" >expected &&\n+\tprintf \" (main|CHERRY-PICKING)\" >expected &&\n \ttest_must_fail git cherry-pick b1 b1^ &&\n \ttest_when_finished \"git cherry-pick --abort\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -222,7 +222,7 @@ test_expect_success 'prompt - cherry-pick' '\n '\n \n test_expect_success 'prompt - revert' '\n-\tprintf \" (master|REVERTING)\" >expected &&\n+\tprintf \" (main|REVERTING)\" >expected &&\n \ttest_must_fail git revert b1^ b1 &&\n \ttest_when_finished \"git revert --abort\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -234,7 +234,7 @@ test_expect_success 'prompt - revert' '\n '\n \n test_expect_success 'prompt - bisect' '\n-\tprintf \" (master|BISECTING)\" >expected &&\n+\tprintf \" (main|BISECTING)\" >expected &&\n \tgit bisect start &&\n \ttest_when_finished \"git bisect reset\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -242,7 +242,7 @@ test_expect_success 'prompt - bisect' '\n '\n \n test_expect_success 'prompt - dirty status indicator - clean' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWDIRTYSTATE=y &&\n \t\t__git_ps1 >\"$actual\"\n@@ -251,7 +251,7 @@ test_expect_success 'prompt - dirty status indicator - clean' '\n '\n \n test_expect_success 'prompt - dirty status indicator - dirty worktree' '\n-\tprintf \" (master *)\" >expected &&\n+\tprintf \" (main *)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \t(\n@@ -262,7 +262,7 @@ test_expect_success 'prompt - dirty status indicator - dirty worktree' '\n '\n \n test_expect_success 'prompt - dirty status indicator - dirty index' '\n-\tprintf \" (master +)\" >expected &&\n+\tprintf \" (main +)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \tgit add -u &&\n@@ -274,7 +274,7 @@ test_expect_success 'prompt - dirty status indicator - dirty index' '\n '\n \n test_expect_success 'prompt - dirty status indicator - dirty index and worktree' '\n-\tprintf \" (master *+)\" >expected &&\n+\tprintf \" (main *+)\" >expected &&\n \techo \"dirty index\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \tgit add -u &&\n@@ -288,7 +288,7 @@ test_expect_success 'prompt - dirty status indicator - dirty index and worktree'\n \n test_expect_success 'prompt - dirty status indicator - orphan branch - clean' '\n \tprintf \" (orphan #)\" >expected &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit checkout --orphan orphan &&\n \tgit reset --hard &&\n \t(\n@@ -300,7 +300,7 @@ test_expect_success 'prompt - dirty status indicator - orphan branch - clean' '\n \n test_expect_success 'prompt - dirty status indicator - orphan branch - dirty index' '\n \tprintf \" (orphan +)\" >expected &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit checkout --orphan orphan &&\n \t(\n \t\tGIT_PS1_SHOWDIRTYSTATE=y &&\n@@ -311,7 +311,7 @@ test_expect_success 'prompt - dirty status indicator - orphan branch - dirty ind\n \n test_expect_success 'prompt - dirty status indicator - orphan branch - dirty index and worktree' '\n \tprintf \" (orphan *+)\" >expected &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit checkout --orphan orphan &&\n \t>file &&\n \t(\n@@ -322,7 +322,7 @@ test_expect_success 'prompt - dirty status indicator - orphan branch - dirty ind\n '\n \n test_expect_success 'prompt - dirty status indicator - shell variable unset with config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \ttest_config bash.showDirtyState false &&\n@@ -334,7 +334,7 @@ test_expect_success 'prompt - dirty status indicator - shell variable unset with\n '\n \n test_expect_success 'prompt - dirty status indicator - shell variable unset with config enabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \ttest_config bash.showDirtyState true &&\n@@ -346,7 +346,7 @@ test_expect_success 'prompt - dirty status indicator - shell variable unset with\n '\n \n test_expect_success 'prompt - dirty status indicator - shell variable set with config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \ttest_config bash.showDirtyState false &&\n@@ -358,7 +358,7 @@ test_expect_success 'prompt - dirty status indicator - shell variable set with c\n '\n \n test_expect_success 'prompt - dirty status indicator - shell variable set with config enabled' '\n-\tprintf \" (master *)\" >expected &&\n+\tprintf \" (main *)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \ttest_config bash.showDirtyState true &&\n@@ -382,7 +382,7 @@ test_expect_success 'prompt - dirty status indicator - not shown inside .git dir\n '\n \n test_expect_success 'prompt - stash status indicator - no stash' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWSTASHSTATE=y &&\n \t\t__git_ps1 >\"$actual\"\n@@ -391,7 +391,7 @@ test_expect_success 'prompt - stash status indicator - no stash' '\n '\n \n test_expect_success 'prompt - stash status indicator - stash' '\n-\tprintf \" (master $)\" >expected &&\n+\tprintf \" (main $)\" >expected &&\n \techo 2 >file &&\n \tgit stash &&\n \ttest_when_finished \"git stash drop\" &&\n@@ -417,7 +417,7 @@ test_expect_success 'prompt - stash status indicator - not shown inside .git dir\n '\n \n test_expect_success 'prompt - untracked files status indicator - no untracked files' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWUNTRACKEDFILES=y &&\n \t\tcd otherrepo &&\n@@ -427,7 +427,7 @@ test_expect_success 'prompt - untracked files status indicator - no untracked fi\n '\n \n test_expect_success 'prompt - untracked files status indicator - untracked files' '\n-\tprintf \" (master %%)\" >expected &&\n+\tprintf \" (main %%)\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWUNTRACKEDFILES=y &&\n \t\t__git_ps1 >\"$actual\"\n@@ -436,7 +436,7 @@ test_expect_success 'prompt - untracked files status indicator - untracked files\n '\n \n test_expect_success 'prompt - untracked files status indicator - empty untracked dir' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \tmkdir otherrepo/untracked-dir &&\n \ttest_when_finished \"rm -rf otherrepo/untracked-dir\" &&\n \t(\n@@ -448,7 +448,7 @@ test_expect_success 'prompt - untracked files status indicator - empty untracked\n '\n \n test_expect_success 'prompt - untracked files status indicator - non-empty untracked dir' '\n-\tprintf \" (master %%)\" >expected &&\n+\tprintf \" (main %%)\" >expected &&\n \tmkdir otherrepo/untracked-dir &&\n \ttest_when_finished \"rm -rf otherrepo/untracked-dir\" &&\n \t>otherrepo/untracked-dir/untracked-file &&\n@@ -461,7 +461,7 @@ test_expect_success 'prompt - untracked files status indicator - non-empty untra\n '\n \n test_expect_success 'prompt - untracked files status indicator - untracked files outside cwd' '\n-\tprintf \" (master %%)\" >expected &&\n+\tprintf \" (main %%)\" >expected &&\n \t(\n \t\tmkdir -p ignored_dir &&\n \t\tcd ignored_dir &&\n@@ -472,7 +472,7 @@ test_expect_success 'prompt - untracked files status indicator - untracked files\n '\n \n test_expect_success 'prompt - untracked files status indicator - shell variable unset with config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \ttest_config bash.showUntrackedFiles false &&\n \t(\n \t\tsane_unset GIT_PS1_SHOWUNTRACKEDFILES &&\n@@ -482,7 +482,7 @@ test_expect_success 'prompt - untracked files status indicator - shell variable\n '\n \n test_expect_success 'prompt - untracked files status indicator - shell variable unset with config enabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \ttest_config bash.showUntrackedFiles true &&\n \t(\n \t\tsane_unset GIT_PS1_SHOWUNTRACKEDFILES &&\n@@ -492,7 +492,7 @@ test_expect_success 'prompt - untracked files status indicator - shell variable\n '\n \n test_expect_success 'prompt - untracked files status indicator - shell variable set with config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \ttest_config bash.showUntrackedFiles false &&\n \t(\n \t\tGIT_PS1_SHOWUNTRACKEDFILES=y &&\n@@ -502,7 +502,7 @@ test_expect_success 'prompt - untracked files status indicator - shell variable\n '\n \n test_expect_success 'prompt - untracked files status indicator - shell variable set with config enabled' '\n-\tprintf \" (master %%)\" >expected &&\n+\tprintf \" (main %%)\" >expected &&\n \ttest_config bash.showUntrackedFiles true &&\n \t(\n \t\tGIT_PS1_SHOWUNTRACKEDFILES=y &&\n@@ -522,13 +522,13 @@ test_expect_success 'prompt - untracked files status indicator - not shown insid\n '\n \n test_expect_success 'prompt - format string starting with dash' '\n-\tprintf -- \"-master\" >expected &&\n+\tprintf -- \"-main\" >expected &&\n \t__git_ps1 \"-%s\" >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n \n test_expect_success 'prompt - pc mode' '\n-\tprintf \"BEFORE: (\\${__git_ps1_branch_name}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (\\${__git_ps1_branch_name}):AFTER\\\\nmain\" >expected &&\n \t(\n \t\t__git_ps1 \"BEFORE:\" \":AFTER\" >\"$actual\" &&\n \t\ttest_must_be_empty \"$actual\" &&\n@@ -538,7 +538,7 @@ test_expect_success 'prompt - pc mode' '\n '\n \n test_expect_success 'prompt - bash color pc mode - branch name' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear}):AFTER\\\\nmain\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n \t\t__git_ps1 \"BEFORE:\" \":AFTER\" >\"$actual\" &&\n@@ -550,7 +550,7 @@ test_expect_success 'prompt - bash color pc mode - branch name' '\n test_expect_success 'prompt - bash color pc mode - detached head' '\n \tprintf \"BEFORE: (${c_red}\\${__git_ps1_branch_name}${c_clear}):AFTER\\\\n(%s...)\" $(git log -1 --format=\"%h\" b1^) >expected &&\n \tgit checkout b1^ &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t(\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n \t\t__git_ps1 \"BEFORE:\" \":AFTER\" &&\n@@ -560,7 +560,7 @@ test_expect_success 'prompt - bash color pc mode - detached head' '\n '\n \n test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirty worktree' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}*${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}*${c_clear}):AFTER\\\\nmain\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \t(\n@@ -573,7 +573,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirt\n '\n \n test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirty index' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_green}+${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_green}+${c_clear}):AFTER\\\\nmain\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \tgit add -u &&\n@@ -587,7 +587,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirt\n '\n \n test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirty index and worktree' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}*${c_green}+${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}*${c_green}+${c_clear}):AFTER\\\\nmain\" >expected &&\n \techo \"dirty index\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \tgit add -u &&\n@@ -602,7 +602,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirt\n '\n \n test_expect_success 'prompt - bash color pc mode - dirty status indicator - before root commit' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_green}#${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_green}#${c_clear}):AFTER\\\\nmain\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWDIRTYSTATE=y &&\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n@@ -628,7 +628,7 @@ test_expect_success 'prompt - bash color pc mode - inside .git directory' '\n '\n \n test_expect_success 'prompt - bash color pc mode - stash status indicator' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_lblue}\\$${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_lblue}\\$${c_clear}):AFTER\\\\nmain\" >expected &&\n \techo 2 >file &&\n \tgit stash &&\n \ttest_when_finished \"git stash drop\" &&\n@@ -642,7 +642,7 @@ test_expect_success 'prompt - bash color pc mode - stash status indicator' '\n '\n \n test_expect_success 'prompt - bash color pc mode - untracked files status indicator' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}%%${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}%%${c_clear}):AFTER\\\\nmain\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWUNTRACKEDFILES=y &&\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n@@ -653,7 +653,7 @@ test_expect_success 'prompt - bash color pc mode - untracked files status indica\n '\n \n test_expect_success 'prompt - zsh color pc mode' '\n-\tprintf \"BEFORE: (%%F{green}master%%f):AFTER\" >expected &&\n+\tprintf \"BEFORE: (%%F{green}main%%f):AFTER\" >expected &&\n \t(\n \t\tZSH_VERSION=5.0.0 &&\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n@@ -664,7 +664,7 @@ test_expect_success 'prompt - zsh color pc mode' '\n '\n \n test_expect_success 'prompt - hide if pwd ignored - env var unset, config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \ttest_config bash.hideIfPwdIgnored false &&\n \t(\n \t\tcd ignored_dir &&\n@@ -685,7 +685,7 @@ test_expect_success 'prompt - hide if pwd ignored - env var unset, config disabl\n '\n \n test_expect_success 'prompt - hide if pwd ignored - env var unset, config unset' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \t(\n \t\tcd ignored_dir &&\n \t\t__git_ps1 >\"$actual\"\n@@ -704,7 +704,7 @@ test_expect_success 'prompt - hide if pwd ignored - env var unset, config unset,\n '\n \n test_expect_success 'prompt - hide if pwd ignored - env var set, config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \ttest_config bash.hideIfPwdIgnored false &&\n \t(\n \t\tcd ignored_dir &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 173880196e..cbd5ca7944 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,13 +257,13 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-3404|4013|5310|6300|7064|7817)\n+3404|4013|5310|6300|7064|7817|9902)\n \t# Avoid conflicts with patch series that are cooking at the same time\n \t# as the patch series changing the default of `init.defaultBranch`.\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-8]*|9[0-8]*)\n+*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409826","messageId":"e788b610741659842746aab88685c9618b975ca9.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 23/28] t9[0-4]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:53Z","receivedAt":"2020-11-12T22:44:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t9[0-4]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9001-send-email.sh                  | 28 ++++-----\n t/t9100-git-svn-basic.sh               |  2 +-\n t/t9145-git-svn-master-branch.sh       |  6 +-\n t/t9151-svn-mergeinfo.sh               |  2 +-\n t/t9155-git-svn-fetch-deleted-tag.sh   |  2 +-\n t/t9156-git-svn-fetch-deleted-tag-2.sh |  6 +-\n t/t9163-git-svn-reset-clears-caches.sh |  2 +-\n t/t9169-git-svn-dcommit-crlf.sh        |  2 +-\n t/t9300-fast-import.sh                 | 82 ++++++++++++------------\n t/t9301-fast-import-notes.sh           | 14 ++---\n t/t9302-fast-import-unpack-limit.sh    | 16 ++---\n t/t9350-fast-export.sh                 | 86 +++++++++++++-------------\n t/t9351-fast-export-anonymize.sh       |  4 +-\n t/t9400-git-cvsserver-server.sh        | 32 +++++-----\n t/t9401-git-cvsserver-crlf.sh          | 16 ++---\n t/t9402-git-cvsserver-refs.sh          |  8 +--\n t/test-lib.sh                          |  2 +-\n 17 files changed, 155 insertions(+), 155 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex a08f72596a..579360d2f1 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -1168,10 +1168,10 @@ test_expect_success $PREREQ '--compose-encoding adds correct MIME for subject' '\n '\n \n test_expect_success $PREREQ 'detects ambiguous reference/file conflict' '\n-\techo master >master &&\n-\tgit add master &&\n-\tgit commit -m\"add master\" &&\n-\ttest_must_fail git send-email --dry-run master 2>errors &&\n+\techo main >main &&\n+\tgit add main &&\n+\tgit commit -m\"add main\" &&\n+\ttest_must_fail git send-email --dry-run main 2>errors &&\n \tgrep disambiguate errors\n '\n \n@@ -1185,7 +1185,7 @@ test_expect_success $PREREQ 'feed two files' '\n \t\toutdir/000?-*.patch 2>errors >out &&\n \tgrep \"^Subject: \" out >subjects &&\n \ttest \"z$(sed -n -e 1p subjects)\" = \"zSubject: [PATCH 1/2] Second.\" &&\n-\ttest \"z$(sed -n -e 2p subjects)\" = \"zSubject: [PATCH 2/2] add master\"\n+\ttest \"z$(sed -n -e 2p subjects)\" = \"zSubject: [PATCH 2/2] add main\"\n '\n \n test_expect_success $PREREQ 'in-reply-to but no threading' '\n@@ -2037,7 +2037,7 @@ test_expect_success $PREREQ 'setup expected-list' '\n \t--cc=\"Cc2 <cc2@example.com>\" \\\n \t--bcc=\"bcc1@example.com\" \\\n \t--bcc=\"bcc2@example.com\" \\\n-\t0001-add-master.patch | replace_variable_fields \\\n+\t0001-add-main.patch | replace_variable_fields \\\n \t>expected-list\n '\n \n@@ -2049,7 +2049,7 @@ test_expect_success $PREREQ 'use email list in --cc --to and --bcc' '\n \t--to=\"to3@example.com\" \\\n \t--cc=\"Cc 1 <cc1@example.com>, Cc2 <cc2@example.com>\" \\\n \t--bcc=\"bcc1@example.com, bcc2@example.com\" \\\n-\t0001-add-master.patch | replace_variable_fields \\\n+\t0001-add-main.patch | replace_variable_fields \\\n \t>actual-list &&\n \ttest_cmp expected-list actual-list\n '\n@@ -2065,7 +2065,7 @@ test_expect_success $PREREQ 'aliases work with email list' '\n \t--to=\"To 1 <to1@example.com>, to2, to3@example.com\" \\\n \t--cc=\"cc1, Cc2 <cc2@example.com>\" \\\n \t--bcc=\"bcc1@example.com, bcc2@example.com\" \\\n-\t0001-add-master.patch | replace_variable_fields \\\n+\t0001-add-main.patch | replace_variable_fields \\\n \t>actual-list &&\n \ttest_cmp expected-list actual-list\n '\n@@ -2089,7 +2089,7 @@ test_expect_success $PREREQ 'leading and trailing whitespaces are removed' '\n \t--cc=\"Cc2 <cc2@example.com>\" \\\n \t--bcc=\"$BCC1\" \\\n \t--bcc=\"bcc2@example.com\" \\\n-\t0001-add-master.patch | replace_variable_fields \\\n+\t0001-add-main.patch | replace_variable_fields \\\n \t>actual-list &&\n \ttest_cmp expected-list actual-list\n '\n@@ -2108,8 +2108,8 @@ test_expect_success $PREREQ 'invoke hook' '\n \t\tfalse\n \t\t;;\n \tesac &&\n-\ttest -f 0001-add-master.patch &&\n-\tgrep \"add master\" \"$1\"\n+\ttest -f 0001-add-main.patch &&\n+\tgrep \"add main\" \"$1\"\n \tEOF\n \n \tmkdir subdir &&\n@@ -2121,10 +2121,10 @@ test_expect_success $PREREQ 'invoke hook' '\n \t\t\t--from=\"Example <nobody@example.com>\" \\\n \t\t\t--to=nobody@example.com \\\n \t\t\t--smtp-server=\"$(pwd)/../fake.sendmail\" \\\n-\t\t\t../0001-add-master.patch &&\n+\t\t\t../0001-add-main.patch &&\n \n \t\t# Verify error message when a patch is rejected by the hook\n-\t\tsed -e \"s/add master/x/\" ../0001-add-master.patch >../another.patch &&\n+\t\tsed -e \"s/add main/x/\" ../0001-add-main.patch >../another.patch &&\n \t\ttest_must_fail git send-email \\\n \t\t\t--from=\"Example <nobody@example.com>\" \\\n \t\t\t--to=nobody@example.com \\\n@@ -2139,7 +2139,7 @@ test_expect_success $PREREQ 'test that send-email works outside a repo' '\n \t\t--from=\"Example <nobody@example.com>\" \\\n \t\t--to=nobody@example.com \\\n \t\t--smtp-server=\"$(pwd)/fake.sendmail\" \\\n-\t\t\"$(pwd)/0001-add-master.patch\"\n+\t\t\"$(pwd)/0001-add-main.patch\"\n '\n \n test_expect_success $PREREQ 'test that sendmail config is rejected' '\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex e4bb22034e..7dbf4b8fa0 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -275,7 +275,7 @@ test_expect_success 'dcommit $rev does not clobber current branch' '\n \ttest refs/heads/my-bar = $(git symbolic-ref HEAD) &&\n \tgit log refs/remotes/bar | grep \"change 1\" &&\n \t! git log refs/remotes/bar | grep \"change 2\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -D my-bar\n \t'\n \ndiff --git a/t/t9145-git-svn-master-branch.sh b/t/t9145-git-svn-master-branch.sh\nindex 3bbf341f6a..c5acce010d 100755\n--- a/t/t9145-git-svn-master-branch.sh\n+++ b/t/t9145-git-svn-master-branch.sh\n@@ -2,7 +2,7 @@\n #\n # Copyright (c) 2009 Eric Wong\n #\n-test_description='git svn initial master branch is \"trunk\" if possible'\n+test_description='git svn initial main branch is \"trunk\" if possible'\n . ./lib-git-svn.sh\n \n test_expect_success 'setup test repository' '\n@@ -13,12 +13,12 @@ test_expect_success 'setup test repository' '\n \tsvn_cmd import -m b/b i \"$svnrepo/branches/b\"\n '\n \n-test_expect_success 'git svn clone --stdlayout sets up trunk as master' '\n+test_expect_success 'git svn clone --stdlayout sets up trunk as main' '\n \tgit svn clone -s \"$svnrepo\" g &&\n \t(\n \t\tcd g &&\n \t\ttest x$(git rev-parse --verify refs/remotes/origin/trunk^0) = \\\n-\t\t     x$(git rev-parse --verify refs/heads/master^0)\n+\t\t     x$(git rev-parse --verify refs/heads/main^0)\n \t)\n '\n \ndiff --git a/t/t9151-svn-mergeinfo.sh b/t/t9151-svn-mergeinfo.sh\nindex 4f6c06ecb2..e2f63823f1 100755\n--- a/t/t9151-svn-mergeinfo.sh\n+++ b/t/t9151-svn-mergeinfo.sh\n@@ -50,7 +50,7 @@ test_expect_success 'merging two branches in one commit is detected correctly' '\n \t'\n \n test_expect_failure 'everything got merged in the end' '\n-\tunmerged=$(git rev-list --all --not master) &&\n+\tunmerged=$(git rev-list --all --not main) &&\n \t[ -z \"$unmerged\" ]\n \t'\n \ndiff --git a/t/t9155-git-svn-fetch-deleted-tag.sh b/t/t9155-git-svn-fetch-deleted-tag.sh\nindex 184336f346..891c209238 100755\n--- a/t/t9155-git-svn-fetch-deleted-tag.sh\n+++ b/t/t9155-git-svn-fetch-deleted-tag.sh\n@@ -36,7 +36,7 @@ test_expect_success 'fetch deleted tags from same revision with checksum error'\n \tgit svn fetch &&\n \n \tgit diff --exit-code origin/mybranch:trunk/subdir/file origin/tags/mytag:file &&\n-\tgit diff --exit-code master:subdir/file origin/tags/mytag^:file\n+\tgit diff --exit-code main:subdir/file origin/tags/mytag^:file\n '\n \n test_done\ndiff --git a/t/t9156-git-svn-fetch-deleted-tag-2.sh b/t/t9156-git-svn-fetch-deleted-tag-2.sh\nindex 7a6e33ba3c..0b91063edb 100755\n--- a/t/t9156-git-svn-fetch-deleted-tag-2.sh\n+++ b/t/t9156-git-svn-fetch-deleted-tag-2.sh\n@@ -36,9 +36,9 @@ test_expect_success 'fetch deleted tags from same revision with no checksum erro\n \tcd git_project &&\n \tgit svn fetch &&\n \n-\tgit diff --exit-code master:subdir3/file origin/tags/mytag:file &&\n-\tgit diff --exit-code master:subdir2/file origin/tags/mytag^:file &&\n-\tgit diff --exit-code master:subdir1/file origin/tags/mytag^^:file\n+\tgit diff --exit-code main:subdir3/file origin/tags/mytag:file &&\n+\tgit diff --exit-code main:subdir2/file origin/tags/mytag^:file &&\n+\tgit diff --exit-code main:subdir1/file origin/tags/mytag^^:file\n '\n \n test_done\ndiff --git a/t/t9163-git-svn-reset-clears-caches.sh b/t/t9163-git-svn-reset-clears-caches.sh\nindex d6245cee08..0da856338f 100755\n--- a/t/t9163-git-svn-reset-clears-caches.sh\n+++ b/t/t9163-git-svn-reset-clears-caches.sh\n@@ -59,7 +59,7 @@ test_expect_success 'fetch to merge-base (a)' '\n test_expect_success 'rebase looses SVN merge (m)' '\n \tgit svn rebase &&\n \tgit svn fetch &&\n-\ttest 1 = $(git cat-file -p master|grep parent|wc -l)\n+\ttest 1 = $(git cat-file -p main|grep parent|wc -l)\n '\n \n # git svn fetch creates correct history with merge commit\ndiff --git a/t/t9169-git-svn-dcommit-crlf.sh b/t/t9169-git-svn-dcommit-crlf.sh\nindex 54b1f61a2a..5016896ae6 100755\n--- a/t/t9169-git-svn-dcommit-crlf.sh\n+++ b/t/t9169-git-svn-dcommit-crlf.sh\n@@ -14,7 +14,7 @@ test_expect_success 'setup commit repository' '\n \t\tp=$(git rev-parse HEAD) &&\n \t\tt=$(git write-tree) &&\n \t\tcmt=$(git commit-tree -p $p $t <cmt) &&\n-\t\tgit update-ref refs/heads/master $cmt &&\n+\t\tgit update-ref refs/heads/main $cmt &&\n \t\tgit cat-file commit HEAD | tail -n4 >out &&\n \t\ttest_cmp cmt out &&\n \t\tgit svn dcommit &&\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex 308c1ef42c..e66f438e64 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -62,7 +62,7 @@ test_expect_success 'A: create pack from stdin' '\n \tmark :4\n \tdata $file4_len\n \t$file4_data\n-\tcommit refs/heads/master\n+\tcommit refs/heads/main\n \tmark :5\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -117,7 +117,7 @@ test_expect_success 'A: create pack from stdin' '\n \n \tINPUT_END\n \tgit fast-import --export-marks=marks.out <input &&\n-\tgit whatchanged master\n+\tgit whatchanged main\n '\n \n test_expect_success 'A: verify pack' '\n@@ -131,7 +131,7 @@ test_expect_success 'A: verify commit' '\n \n \tinitial\n \tEOF\n-\tgit cat-file commit master | sed 1d >actual &&\n+\tgit cat-file commit main | sed 1d >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -141,31 +141,31 @@ test_expect_success 'A: verify tree' '\n \t100644 blob file3\n \t100755 blob file4\n \tEOF\n-\tgit cat-file -p master^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n+\tgit cat-file -p main^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'A: verify file2' '\n \techo \"$file2_data\" >expect &&\n-\tgit cat-file blob master:file2 >actual &&\n+\tgit cat-file blob main:file2 >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'A: verify file3' '\n \techo \"$file3_data\" >expect &&\n-\tgit cat-file blob master:file3 >actual &&\n+\tgit cat-file blob main:file3 >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'A: verify file4' '\n \tprintf \"$file4_data\" >expect &&\n-\tgit cat-file blob master:file4 >actual &&\n+\tgit cat-file blob main:file4 >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'A: verify tag/series-A' '\n \tcat >expect <<-EOF &&\n-\tobject $(git rev-parse refs/heads/master)\n+\tobject $(git rev-parse refs/heads/main)\n \ttype commit\n \ttag series-A\n \n@@ -177,7 +177,7 @@ test_expect_success 'A: verify tag/series-A' '\n \n test_expect_success 'A: verify tag/series-A-blob' '\n \tcat >expect <<-EOF &&\n-\tobject $(git rev-parse refs/heads/master:file3)\n+\tobject $(git rev-parse refs/heads/main:file3)\n \ttype blob\n \ttag series-A-blob\n \n@@ -193,13 +193,13 @@ test_expect_success 'A: verify tag deletion is successful' '\n \n test_expect_success 'A: verify marks output' '\n \tcat >expect <<-EOF &&\n-\t:2 $(git rev-parse --verify master:file2)\n-\t:3 $(git rev-parse --verify master:file3)\n-\t:4 $(git rev-parse --verify master:file4)\n-\t:5 $(git rev-parse --verify master^0)\n+\t:2 $(git rev-parse --verify main:file2)\n+\t:3 $(git rev-parse --verify main:file3)\n+\t:4 $(git rev-parse --verify main:file4)\n+\t:5 $(git rev-parse --verify main^0)\n \t:6 $(git cat-file tag nested | grep object | cut -d\" \" -f 2)\n \t:7 $(git rev-parse --verify nested)\n-\t:8 $(git rev-parse --verify master^0)\n+\t:8 $(git rev-parse --verify main^0)\n \tEOF\n \ttest_cmp expect marks.out\n '\n@@ -217,7 +217,7 @@ test_expect_success 'A: tag blob by sha1' '\n \tnew_blob=$(echo testing | git hash-object --stdin) &&\n \tcat >input <<-INPUT_END &&\n \ttag series-A-blob-2\n-\tfrom $(git rev-parse refs/heads/master:file3)\n+\tfrom $(git rev-parse refs/heads/main:file3)\n \tdata <<EOF\n \tTag blob by sha1.\n \tEOF\n@@ -243,7 +243,7 @@ test_expect_success 'A: tag blob by sha1' '\n \tINPUT_END\n \n \tcat >expect <<-EOF &&\n-\tobject $(git rev-parse refs/heads/master:file3)\n+\tobject $(git rev-parse refs/heads/main:file3)\n \ttype blob\n \ttag series-A-blob-2\n \n@@ -284,13 +284,13 @@ test_expect_success 'A: verify pack' '\n '\n \n test_expect_success 'A: verify diff' '\n-\tcopy=$(git rev-parse --verify master:file2) &&\n+\tcopy=$(git rev-parse --verify main:file2) &&\n \tcat >expect <<-EOF &&\n \t:000000 100755 $ZERO_OID $copy A\tcopy-of-file2\n \tEOF\n-\tgit diff-tree -M -r master verify--import-marks >actual &&\n+\tgit diff-tree -M -r main verify--import-marks >actual &&\n \tcompare_diff_raw expect actual &&\n-\ttest $(git rev-parse --verify master:file2) \\\n+\ttest $(git rev-parse --verify main:file2) \\\n \t    = $(git rev-parse --verify verify--import-marks:copy-of-file2)\n '\n \n@@ -364,7 +364,7 @@ test_expect_success 'B: fail on invalid blob sha1' '\n \tcorrupt\n \tCOMMIT\n \n-\tfrom refs/heads/master\n+\tfrom refs/heads/main\n \tM 755 $(echo $ZERO_OID | sed -e \"s/0$/1/\") zero1\n \n \tINPUT_END\n@@ -381,7 +381,7 @@ test_expect_success 'B: accept branch name \"TEMP_TAG\"' '\n \ttag base\n \tCOMMIT\n \n-\tfrom refs/heads/master\n+\tfrom refs/heads/main\n \n \tINPUT_END\n \n@@ -390,7 +390,7 @@ test_expect_success 'B: accept branch name \"TEMP_TAG\"' '\n \t\tgit prune\" &&\n \tgit fast-import <input &&\n \ttest -f .git/TEMP_TAG &&\n-\ttest $(git rev-parse master) = $(git rev-parse TEMP_TAG^)\n+\ttest $(git rev-parse main) = $(git rev-parse TEMP_TAG^)\n '\n \n test_expect_success 'B: accept empty committer' '\n@@ -528,8 +528,8 @@ test_expect_success 'B: fail on invalid committer (5)' '\n \n test_expect_success 'C: incremental import create pack from stdin' '\n \tnewf=$(echo hi newf | git hash-object -w --stdin) &&\n-\toldf=$(git rev-parse --verify master:file2) &&\n-\tthrf=$(git rev-parse --verify master:file3) &&\n+\toldf=$(git rev-parse --verify main:file2) &&\n+\tthrf=$(git rev-parse --verify main:file3) &&\n \ttest_tick &&\n \tcat >input <<-INPUT_END &&\n \tcommit refs/heads/branch\n@@ -538,7 +538,7 @@ test_expect_success 'C: incremental import create pack from stdin' '\n \tsecond\n \tCOMMIT\n \n-\tfrom refs/heads/master\n+\tfrom refs/heads/main\n \tM 644 $oldf file2/oldf\n \tM 755 $newf file2/newf\n \tD file3\n@@ -560,7 +560,7 @@ test_expect_success 'C: validate reuse existing blob' '\n \n test_expect_success 'C: verify commit' '\n \tcat >expect <<-EOF &&\n-\tparent $(git rev-parse --verify master^0)\n+\tparent $(git rev-parse --verify main^0)\n \tauthor $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n@@ -578,7 +578,7 @@ test_expect_success 'C: validate rename result' '\n \t:100644 100644 $oldf $oldf R100\tfile2\tfile2/oldf\n \t:100644 000000 $thrf $zero D\tfile3\n \tEOF\n-\tgit diff-tree -M -r master branch >actual &&\n+\tgit diff-tree -M -r main branch >actual &&\n \tcompare_diff_raw expect actual\n '\n \n@@ -1698,7 +1698,7 @@ test_expect_success 'P: superproject & submodule mix' '\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata 8\n \tinitial\n-\tfrom refs/heads/master\n+\tfrom refs/heads/main\n \tM 100644 :3 .gitmodules\n \tM 160000 :2 sub\n \n@@ -1733,8 +1733,8 @@ test_expect_success 'P: superproject & submodule mix' '\n \t(\n \t\tcd sub &&\n \t\tgit init &&\n-\t\tgit fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&\n-\t\tgit checkout master\n+\t\tgit fetch --update-head-ok .. refs/heads/sub:refs/heads/main &&\n+\t\tgit checkout main\n \t) &&\n \tgit submodule init &&\n \tgit submodule update\n@@ -1758,7 +1758,7 @@ test_expect_success 'P: verbatim SHA gitlinks' '\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata 8\n \tinitial\n-\tfrom refs/heads/master\n+\tfrom refs/heads/main\n \tM 100644 :1 .gitmodules\n \tM 160000 $SUBPREV sub\n \n@@ -3429,8 +3429,8 @@ mark :1\n data 4\n foo\n \n-reset refs/heads/master\n-commit refs/heads/master\n+reset refs/heads/main\n+commit refs/heads/main\n mark :2\n author Full Name <user@company.tld> 1000000000 +0100\n committer Full Name <user@company.tld> 1000000000 +0100\n@@ -3444,7 +3444,7 @@ data 8\n foo\n bar\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :4\n author Full Name <user@company.tld> 1000000001 +0100\n committer Full Name <user@company.tld> 1000000001 +0100\n@@ -3461,8 +3461,8 @@ mark :1\n data 4\n foo\n \n-reset refs/heads/master\n-commit refs/heads/master\n+reset refs/heads/main\n+commit refs/heads/main\n mark :2\n author Full Name <user@company.tld> 2000000000 +0100\n committer Full Name <user@company.tld> 2000000000 +0100\n@@ -3477,7 +3477,7 @@ data 73\n \tpath = sub1\n \turl = https://void.example.com/main.git\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :4\n author Full Name <user@company.tld> 2000000001 +0100\n committer Full Name <user@company.tld> 2000000001 +0100\n@@ -3493,7 +3493,7 @@ data 8\n foo\n bar\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :6\n author Full Name <user@company.tld> 2000000002 +0100\n committer Full Name <user@company.tld> 2000000002 +0100\n@@ -3511,8 +3511,8 @@ Y_INPUT_END\n \n test_expect_success 'Y: setup' '\n \ttest_oid_cache <<-EOF\n-\tYmaster sha1:9afed2f9161ddf416c0a1863b8b0725b00070504\n-\tYmaster sha256:c0a1010da1df187b2e287654793df01b464bd6f8e3f17fc1481a7dadf84caee3\n+\tYmain sha1:9afed2f9161ddf416c0a1863b8b0725b00070504\n+\tYmain sha256:c0a1010da1df187b2e287654793df01b464bd6f8e3f17fc1481a7dadf84caee3\n \tEOF\n '\n \n@@ -3524,7 +3524,7 @@ test_expect_success 'Y: rewrite submodules' '\n \t\tgit -C sub2 fast-import --export-marks=../sub2-marks <../Y-sub-input &&\n \t\tgit fast-import --rewrite-submodules-from=sub:../Y-marks \\\n \t\t\t--rewrite-submodules-to=sub:sub2-marks <../Y-main-input &&\n-\t\ttest \"$(git rev-parse master)\" = \"$(test_oid Ymaster)\"\n+\t\ttest \"$(git rev-parse main)\" = \"$(test_oid Ymain)\"\n \t)\n '\n \ndiff --git a/t/t9301-fast-import-notes.sh b/t/t9301-fast-import-notes.sh\nindex 14c1baa739..ea6efbd387 100755\n--- a/t/t9301-fast-import-notes.sh\n+++ b/t/t9301-fast-import-notes.sh\n@@ -9,7 +9,7 @@ test_description='test git fast-import of notes objects'\n \n test_tick\n cat >input <<INPUT_END\n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n first commit\n@@ -30,7 +30,7 @@ data <<EOF\n file baz/xyzzy in first commit\n EOF\n \n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n second commit\n@@ -46,7 +46,7 @@ data <<EOF\n file baz/xyzzy in second commit\n EOF\n \n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n third commit\n@@ -57,7 +57,7 @@ data <<EOF\n file foo in third commit\n EOF\n \n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n fourth commit\n@@ -70,13 +70,13 @@ EOF\n \n INPUT_END\n \n-test_expect_success 'set up master branch' '\n+test_expect_success 'set up main branch' '\n \n \tgit fast-import <input &&\n-\tgit whatchanged master\n+\tgit whatchanged main\n '\n \n-commit4=$(git rev-parse refs/heads/master)\n+commit4=$(git rev-parse refs/heads/main)\n commit3=$(git rev-parse \"$commit4^\")\n commit2=$(git rev-parse \"$commit4~2\")\n commit1=$(git rev-parse \"$commit4~3\")\ndiff --git a/t/t9302-fast-import-unpack-limit.sh b/t/t9302-fast-import-unpack-limit.sh\nindex bb1c39cfcc..f519e4f1bf 100755\n--- a/t/t9302-fast-import-unpack-limit.sh\n+++ b/t/t9302-fast-import-unpack-limit.sh\n@@ -5,7 +5,7 @@ test_description='test git fast-import unpack limit'\n test_expect_success 'create loose objects on import' '\n \ttest_tick &&\n \tcat >input <<-INPUT_END &&\n-\tcommit refs/heads/master\n+\tcommit refs/heads/main\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n \tinitial\n@@ -23,12 +23,12 @@ test_expect_success 'create loose objects on import' '\n test_expect_success 'bigger packs are preserved' '\n \ttest_tick &&\n \tcat >input <<-INPUT_END &&\n-\tcommit refs/heads/master\n+\tcommit refs/heads/main\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n \tincremental should create a pack\n \tCOMMIT\n-\tfrom refs/heads/master^0\n+\tfrom refs/heads/main^0\n \n \tcommit refs/heads/branch\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n@@ -48,7 +48,7 @@ test_expect_success 'bigger packs are preserved' '\n test_expect_success 'lookups after checkpoint works' '\n \thello_id=$(echo hello | git hash-object --stdin -t blob) &&\n \tid=\"$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\" &&\n-\tbefore=$(git rev-parse refs/heads/master^0) &&\n+\tbefore=$(git rev-parse refs/heads/main^0) &&\n \t(\n \t\tcat <<-INPUT_END &&\n \t\tblob\n@@ -56,13 +56,13 @@ test_expect_success 'lookups after checkpoint works' '\n \t\tdata 6\n \t\thello\n \n-\t\tcommit refs/heads/master\n+\t\tcommit refs/heads/main\n \t\tmark :2\n \t\tcommitter $id\n \t\tdata <<COMMIT\n \t\tcheckpoint after this\n \t\tCOMMIT\n-\t\tfrom refs/heads/master^0\n+\t\tfrom refs/heads/main^0\n \t\tM 100644 :1 hello\n \n \t\t# pre-checkpoint\n@@ -86,10 +86,10 @@ test_expect_success 'lookups after checkpoint works' '\n \t\t\t\tn=$(($n + 1))\n \t\t\tfi &&\n \t\t\tsleep 1 &&\n-\t\t\tfrom=$(git rev-parse refs/heads/master^0)\n+\t\t\tfrom=$(git rev-parse refs/heads/main^0)\n \t\tdone &&\n \t\tcat <<-INPUT_END &&\n-\t\tcommit refs/heads/master\n+\t\tcommit refs/heads/main\n \t\tcommitter $id\n \t\tdata <<COMMIT\n \t\tmake sure from \"unpacked sha1 reference\" works, too\ndiff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh\nindex 1372842559..0715eefd52 100755\n--- a/t/t9350-fast-export.sh\n+++ b/t/t9350-fast-export.sh\n@@ -31,13 +31,13 @@ test_expect_success 'setup' '\n \tgit commit -m sitzt file2 &&\n \ttest_tick &&\n \tgit tag -a -m valentin muss &&\n-\tgit merge -s ours master\n+\tgit merge -s ours main\n \n '\n \n test_expect_success 'fast-export | fast-import' '\n \n-\tMASTER=$(git rev-parse --verify master) &&\n+\tMAIN=$(git rev-parse --verify main) &&\n \tREIN=$(git rev-parse --verify rein) &&\n \tWER=$(git rev-parse --verify wer) &&\n \tMUSS=$(git rev-parse --verify muss) &&\n@@ -46,7 +46,7 @@ test_expect_success 'fast-export | fast-import' '\n \tgit fast-export --all >actual &&\n \t(cd new &&\n \t git fast-import &&\n-\t test $MASTER = $(git rev-parse --verify refs/heads/master) &&\n+\t test $MAIN = $(git rev-parse --verify refs/heads/main) &&\n \t test $REIN = $(git rev-parse --verify refs/tags/rein) &&\n \t test $WER = $(git rev-parse --verify refs/heads/wer) &&\n \t test $MUSS = $(git rev-parse --verify refs/tags/muss)) <actual\n@@ -80,35 +80,35 @@ test_expect_success 'fast-export --mark-tags ^muss^{commit} muss' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'fast-export master~2..master' '\n+test_expect_success 'fast-export main~2..main' '\n \n-\tgit fast-export master~2..master >actual &&\n-\tsed \"s/master/partial/\" actual |\n+\tgit fast-export main~2..main >actual &&\n+\tsed \"s/main/partial/\" actual |\n \t\t(cd new &&\n \t\t git fast-import &&\n-\t\t test $MASTER != $(git rev-parse --verify refs/heads/partial) &&\n-\t\t git diff --exit-code master partial &&\n-\t\t git diff --exit-code master^ partial^ &&\n+\t\t test $MAIN != $(git rev-parse --verify refs/heads/partial) &&\n+\t\t git diff --exit-code main partial &&\n+\t\t git diff --exit-code main^ partial^ &&\n \t\t test_must_fail git rev-parse partial~2)\n \n '\n \n-test_expect_success 'fast-export --reference-excluded-parents master~2..master' '\n+test_expect_success 'fast-export --reference-excluded-parents main~2..main' '\n \n-\tgit fast-export --reference-excluded-parents master~2..master >actual &&\n-\tgrep commit.refs/heads/master actual >commit-count &&\n+\tgit fast-export --reference-excluded-parents main~2..main >actual &&\n+\tgrep commit.refs/heads/main actual >commit-count &&\n \ttest_line_count = 2 commit-count &&\n-\tsed \"s/master/rewrite/\" actual |\n+\tsed \"s/main/rewrite/\" actual |\n \t\t(cd new &&\n \t\t git fast-import &&\n-\t\t test $MASTER = $(git rev-parse --verify refs/heads/rewrite))\n+\t\t test $MAIN = $(git rev-parse --verify refs/heads/rewrite))\n '\n \n test_expect_success 'fast-export --show-original-ids' '\n \n-\tgit fast-export --show-original-ids master >output &&\n+\tgit fast-export --show-original-ids main >output &&\n \tgrep ^original-oid output| sed -e s/^original-oid.// | sort >actual &&\n-\tgit rev-list --objects master muss >objects-and-names &&\n+\tgit rev-list --objects main muss >objects-and-names &&\n \tawk \"{print \\$1}\" objects-and-names | sort >commits-trees-blobs &&\n \tcomm -23 actual commits-trees-blobs >unfound &&\n \ttest_must_be_empty unfound\n@@ -116,8 +116,8 @@ test_expect_success 'fast-export --show-original-ids' '\n \n test_expect_success 'fast-export --show-original-ids | git fast-import' '\n \n-\tgit fast-export --show-original-ids master muss | git fast-import --quiet &&\n-\ttest $MASTER = $(git rev-parse --verify refs/heads/master) &&\n+\tgit fast-export --show-original-ids main muss | git fast-import --quiet &&\n+\ttest $MAIN = $(git rev-parse --verify refs/heads/main) &&\n \ttest $MUSS = $(git rev-parse --verify refs/tags/muss)\n '\n \n@@ -200,7 +200,7 @@ test_expect_success 'encoding preserved if reencoding fails' '\n \n test_expect_success 'import/export-marks' '\n \n-\tgit checkout -b marks master &&\n+\tgit checkout -b marks main &&\n \tgit fast-export --export-marks=tmp-marks HEAD &&\n \ttest -s tmp-marks &&\n \ttest_line_count = 3 tmp-marks &&\n@@ -265,7 +265,7 @@ test_expect_success 'signed-tags=warn-strip' '\n \n test_expect_success 'setup submodule' '\n \n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tmkdir sub &&\n \t(\n \t\tcd sub &&\n@@ -290,17 +290,17 @@ test_expect_success 'setup submodule' '\n \n test_expect_success 'submodule fast-export | fast-import' '\n \n-\tSUBENT1=$(git ls-tree master^ sub) &&\n-\tSUBENT2=$(git ls-tree master sub) &&\n+\tSUBENT1=$(git ls-tree main^ sub) &&\n+\tSUBENT2=$(git ls-tree main sub) &&\n \trm -rf new &&\n \tmkdir new &&\n \tgit --git-dir=new/.git init &&\n \tgit fast-export --signed-tags=strip --all >actual &&\n \t(cd new &&\n \t git fast-import &&\n-\t test \"$SUBENT1\" = \"$(git ls-tree refs/heads/master^ sub)\" &&\n-\t test \"$SUBENT2\" = \"$(git ls-tree refs/heads/master sub)\" &&\n-\t git checkout master &&\n+\t test \"$SUBENT1\" = \"$(git ls-tree refs/heads/main^ sub)\" &&\n+\t test \"$SUBENT2\" = \"$(git ls-tree refs/heads/main sub)\" &&\n+\t git checkout main &&\n \t git submodule init &&\n \t git submodule update &&\n \t cmp sub/file ../sub/file) <actual\n@@ -352,7 +352,7 @@ test_expect_success 'fast-export -C -C | fast-import' '\n \n '\n \n-test_expect_success 'fast-export | fast-import when master is tagged' '\n+test_expect_success 'fast-export | fast-import when main is tagged' '\n \n \tgit tag -m msg last &&\n \tgit fast-export -C -C --signed-tags=strip --all > output &&\n@@ -467,8 +467,8 @@ mark :2\n data 3\n hi\n \n-reset refs/heads/master\n-commit refs/heads/master\n+reset refs/heads/main\n+commit refs/heads/main\n mark :3\n author A U Thor <author@example.com> 1112912713 -0700\n committer C O Mitter <committer@example.com> 1112912713 -0700\n@@ -482,7 +482,7 @@ EOF\n test_expect_failure 'no exact-ref revisions included' '\n \t(\n \t\tcd limit-by-paths &&\n-\t\tgit fast-export master~2..master~1 > output &&\n+\t\tgit fast-export main~2..main~1 > output &&\n \t\ttest_cmp expected output\n \t)\n '\n@@ -524,7 +524,7 @@ test_expect_success 'full-tree re-shows unmodified files'        '\n '\n \n test_expect_success 'set-up a few more tags for tag export tests' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tHEAD_TREE=$(git show -s --pretty=raw HEAD | grep tree | sed \"s/tree //\") &&\n \tgit tag    tree_tag        -m \"tagging a tree\" $HEAD_TREE &&\n \tgit tag -a tree_tag-obj    -m \"tagging a tree\" $HEAD_TREE &&\n@@ -549,7 +549,7 @@ test_expect_success 'tag-obj_tag'     'git fast-export tag-obj_tag'\n test_expect_success 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'\n \n test_expect_success 'handling tags of blobs' '\n-\tgit tag -a -m \"Tag of a blob\" blobtag $(git rev-parse master:file) &&\n+\tgit tag -a -m \"Tag of a blob\" blobtag $(git rev-parse main:file) &&\n \tgit fast-export blobtag >actual &&\n \tcat >expect <<-EOF &&\n \tblob\n@@ -592,10 +592,10 @@ test_expect_success 'directory becomes symlink'        '\n \t) &&\n \t(\n \t\tcd dirtosymlink &&\n-\t\tgit fast-export master -- foo |\n+\t\tgit fast-export main -- foo |\n \t\t(cd ../result && git fast-import --quiet)\n \t) &&\n-\t(cd result && git show master:foo)\n+\t(cd result && git show main:foo)\n '\n \n test_expect_success 'fast-export quotes pathnames' '\n@@ -643,7 +643,7 @@ mark :13\n data 5\n bump\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :14\n author A U Thor <author@example.com> 1112912773 -0700\n committer C O Mitter <committer@example.com> 1112912773 -0700\n@@ -657,18 +657,18 @@ EOF\n test_expect_success 'avoid uninteresting refs' '\n \t> tmp-marks &&\n \tgit fast-export --import-marks=tmp-marks \\\n-\t\t--export-marks=tmp-marks master > /dev/null &&\n+\t\t--export-marks=tmp-marks main > /dev/null &&\n \tgit tag v1.0 &&\n \tgit branch uninteresting &&\n \techo bump > file &&\n \tgit commit -a -m bump &&\n \tgit fast-export --import-marks=tmp-marks \\\n-\t\t--export-marks=tmp-marks ^uninteresting ^v1.0 master > actual &&\n+\t\t--export-marks=tmp-marks ^uninteresting ^v1.0 main > actual &&\n \ttest_cmp expected actual\n '\n \n cat > expected << EOF\n-reset refs/heads/master\n+reset refs/heads/main\n from :14\n \n EOF\n@@ -676,14 +676,14 @@ EOF\n test_expect_success 'refs are updated even if no commits need to be exported' '\n \t> tmp-marks &&\n \tgit fast-export --import-marks=tmp-marks \\\n-\t\t--export-marks=tmp-marks master > /dev/null &&\n+\t\t--export-marks=tmp-marks main > /dev/null &&\n \tgit fast-export --import-marks=tmp-marks \\\n-\t\t--export-marks=tmp-marks master > actual &&\n+\t\t--export-marks=tmp-marks main > actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'use refspec' '\n-\tgit fast-export --refspec refs/heads/master:refs/heads/foobar master >actual2 &&\n+\tgit fast-export --refspec refs/heads/main:refs/heads/foobar main >actual2 &&\n \tgrep \"^commit \" actual2 | sort | uniq >actual &&\n \techo \"commit refs/heads/foobar\" > expected &&\n \ttest_cmp expected actual\n@@ -736,13 +736,13 @@ test_expect_success 'merge commit gets exported with --import-marks' '\n \t\ttest_commit initial &&\n \t\tgit checkout -b topic &&\n \t\ttest_commit on-topic &&\n-\t\tgit checkout master &&\n-\t\ttest_commit on-master &&\n+\t\tgit checkout main &&\n+\t\ttest_commit on-main &&\n \t\ttest_tick &&\n \t\tgit merge --no-ff -m Yeah topic &&\n \n \t\techo \":1 $(git rev-parse HEAD^^)\" >marks &&\n-\t\tgit fast-export --import-marks=marks master >out &&\n+\t\tgit fast-export --import-marks=marks main >out &&\n \t\tgrep Yeah out\n \t)\n '\ndiff --git a/t/t9351-fast-export-anonymize.sh b/t/t9351-fast-export-anonymize.sh\nindex 5ac2c3b5ee..c07175db47 100755\n--- a/t/t9351-fast-export-anonymize.sh\n+++ b/t/t9351-fast-export-anonymize.sh\n@@ -51,7 +51,7 @@ test_expect_success 'stream retains other as refname' '\n '\n \n test_expect_success 'stream omits other refnames' '\n-\t! grep master stream &&\n+\t! grep main stream &&\n \t! grep mytag stream\n '\n \n@@ -85,7 +85,7 @@ test_expect_success 'repo has original shape and timestamps' '\n \tshape () {\n \t\tgit log --format=\"%m %ct\" --left-right --boundary \"$@\"\n \t} &&\n-\t(cd .. && shape master...other) >expect &&\n+\t(cd .. && shape main...other) >expect &&\n \tshape $main_branch...$other_branch >actual &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh\nindex 4a46f31c41..9aa49c6906 100755\n--- a/t/t9400-git-cvsserver-server.sh\n+++ b/t/t9400-git-cvsserver-server.sh\n@@ -45,7 +45,7 @@ test_expect_success 'setup' '\n   touch secondrootfile &&\n   git add secondrootfile &&\n   git commit -m \"second root\") &&\n-  git fetch secondroot master &&\n+  git fetch secondroot main &&\n   git merge --allow-unrelated-histories FETCH_HEAD &&\n   git clone -q --bare \"$WORKDIR/.git\" \"$SERVERDIR\" >/dev/null 2>&1 &&\n   GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled true &&\n@@ -57,7 +57,7 @@ test_expect_success 'setup' '\n # note that cvs doesn't accept absolute pathnames\n # as argument to co -d\n test_expect_success 'basic checkout' \\\n-  'GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master &&\n+  'GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main &&\n    test \"$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | head -n 1))\" = \"empty/1.1/\" &&\n    test \"$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | sed -ne \\$p))\" = \"secondrootfile/1.1/\"'\n \n@@ -226,7 +226,7 @@ GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled true || exit 1\n \n test_expect_success 'gitcvs.enabled = false' \\\n   'GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled false &&\n-   if GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1\n+   if GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1\n    then\n      echo unexpected cvs success\n      false\n@@ -240,14 +240,14 @@ rm -fr cvswork2\n test_expect_success 'gitcvs.ext.enabled = true' \\\n   'GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.ext.enabled true &&\n    GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled false &&\n-   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&\n+   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1 &&\n    test_cmp cvswork cvswork2'\n \n rm -fr cvswork2\n test_expect_success 'gitcvs.ext.enabled = false' \\\n   'GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.ext.enabled false &&\n    GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled true &&\n-   if GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1\n+   if GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1\n    then\n      echo unexpected cvs success\n      false\n@@ -261,21 +261,21 @@ rm -fr cvswork2\n test_expect_success 'gitcvs.dbname' \\\n   'GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.ext.enabled true &&\n    GIT_DIR=\"$SERVERDIR\" git config gitcvs.dbname %Ggitcvs.%a.%m.sqlite &&\n-   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&\n+   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1 &&\n    test_cmp cvswork cvswork2 &&\n-   test -f \"$SERVERDIR/gitcvs.ext.master.sqlite\" &&\n-   cmp \"$SERVERDIR/gitcvs.master.sqlite\" \"$SERVERDIR/gitcvs.ext.master.sqlite\"'\n+   test -f \"$SERVERDIR/gitcvs.ext.main.sqlite\" &&\n+   cmp \"$SERVERDIR/gitcvs.main.sqlite\" \"$SERVERDIR/gitcvs.ext.main.sqlite\"'\n \n rm -fr cvswork2\n test_expect_success 'gitcvs.ext.dbname' \\\n   'GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.ext.enabled true &&\n    GIT_DIR=\"$SERVERDIR\" git config gitcvs.ext.dbname %Ggitcvs1.%a.%m.sqlite &&\n    GIT_DIR=\"$SERVERDIR\" git config gitcvs.dbname %Ggitcvs2.%a.%m.sqlite &&\n-   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&\n+   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1 &&\n    test_cmp cvswork cvswork2 &&\n-   test -f \"$SERVERDIR/gitcvs1.ext.master.sqlite\" &&\n-   test ! -f \"$SERVERDIR/gitcvs2.ext.master.sqlite\" &&\n-   cmp \"$SERVERDIR/gitcvs.master.sqlite\" \"$SERVERDIR/gitcvs1.ext.master.sqlite\"'\n+   test -f \"$SERVERDIR/gitcvs1.ext.main.sqlite\" &&\n+   test ! -f \"$SERVERDIR/gitcvs2.ext.main.sqlite\" &&\n+   cmp \"$SERVERDIR/gitcvs.main.sqlite\" \"$SERVERDIR/gitcvs1.ext.main.sqlite\"'\n \n \n #------------\n@@ -457,7 +457,7 @@ cd \"$WORKDIR\"\n test_expect_success 'cvs update (module list supports packed refs)' '\n     GIT_DIR=\"$SERVERDIR\" git pack-refs --all &&\n     GIT_CONFIG=\"$git_config\" cvs -n up -d 2> out &&\n-    grep \"cvs update: New directory \\`master'\\''\" < out\n+    grep \"cvs update: New directory \\`main'\\''\" < out\n '\n \n #------------\n@@ -499,8 +499,8 @@ test_expect_success 'cvs status (no subdirs in header)' '\n cd \"$WORKDIR\"\n test_expect_success 'cvs co -c (shows module database)' '\n     GIT_CONFIG=\"$git_config\" cvs co -c > out &&\n-    grep \"^master[\t ][ \t]*master$\" <out &&\n-    ! grep -v \"^master[\t ][ \t]*master$\" <out\n+    grep \"^main[\t ][ \t]*main$\" <out &&\n+    ! grep -v \"^main[\t ][ \t]*main$\" <out\n '\n \n #------------\n@@ -526,7 +526,7 @@ test_expect_success 'cvs co -c (shows module database)' '\n \n sed -e 's/^x//' -e 's/SP$/ /' > \"$WORKDIR/expect\" <<EOF\n x\n-xRCS file: $WORKDIR/gitcvs.git/master/merge,v\n+xRCS file: $WORKDIR/gitcvs.git/main/merge,v\n xWorking file: merge\n xhead: 1.4\n xbranch:\ndiff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh\nindex c7a0dd84a4..8046a25b1f 100755\n--- a/t/t9401-git-cvsserver-crlf.sh\n+++ b/t/t9401-git-cvsserver-crlf.sh\n@@ -105,14 +105,14 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'cvs co (default crlf)' '\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     test x\"$(grep '/-k' cvswork/CVS/Entries cvswork/subdir/CVS/Entries)\" = x\"\"\n '\n \n rm -rf cvswork\n test_expect_success 'cvs co (allbinary)' '\n     GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.allbinary true &&\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     marked_as cvswork textfile.c -kb &&\n     marked_as cvswork binfile.bin -kb &&\n     marked_as cvswork .gitattributes -kb &&\n@@ -125,7 +125,7 @@ test_expect_success 'cvs co (allbinary)' '\n rm -rf cvswork cvs.log\n test_expect_success 'cvs co (use attributes/allbinary)' '\n     GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.usecrlfattr true &&\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     marked_as cvswork textfile.c \"\" &&\n     marked_as cvswork binfile.bin -kb &&\n     marked_as cvswork .gitattributes -kb &&\n@@ -138,7 +138,7 @@ test_expect_success 'cvs co (use attributes/allbinary)' '\n rm -rf cvswork\n test_expect_success 'cvs co (use attributes)' '\n     GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.allbinary false &&\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     marked_as cvswork textfile.c \"\" &&\n     marked_as cvswork binfile.bin -kb &&\n     marked_as cvswork .gitattributes \"\" &&\n@@ -194,7 +194,7 @@ test_expect_success 'updating' '\n rm -rf cvswork\n test_expect_success 'cvs co (use attributes/guess)' '\n     GIT_DIR=\"$SERVERDIR\" git config gitcvs.allbinary guess &&\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     marked_as cvswork textfile.c \"\" &&\n     marked_as cvswork binfile.bin -kb &&\n     marked_as cvswork .gitattributes \"\" &&\n@@ -224,7 +224,7 @@ test_expect_success 'setup multi-line files' '\n rm -rf cvswork\n test_expect_success 'cvs co (guess)' '\n     GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.usecrlfattr false &&\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     marked_as cvswork textfile.c \"\" &&\n     marked_as cvswork binfile.bin -kb &&\n     marked_as cvswork .gitattributes \"\" &&\n@@ -239,7 +239,7 @@ test_expect_success 'cvs co (guess)' '\n '\n \n test_expect_success 'cvs co another copy (guess)' '\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1 &&\n     marked_as cvswork2 textfile.c \"\" &&\n     marked_as cvswork2 binfile.bin -kb &&\n     marked_as cvswork2 .gitattributes \"\" &&\n@@ -335,7 +335,7 @@ test_expect_success 'update subdir of other copy (guess)' '\n \n echo \"starting update/merge\" >> \"${WORKDIR}/marked.log\"\n test_expect_success 'update/merge full other copy (guess)' '\n-    git pull gitcvs.git master &&\n+    git pull gitcvs.git main &&\n     sed \"s/3/replaced_3/\" < multilineTxt.c > ml.temp &&\n     mv ml.temp multilineTxt.c &&\n     git add multilineTxt.c &&\ndiff --git a/t/t9402-git-cvsserver-refs.sh b/t/t9402-git-cvsserver-refs.sh\nindex 6436c91a3c..3b30b02bd1 100755\n--- a/t/t9402-git-cvsserver-refs.sh\n+++ b/t/t9402-git-cvsserver-refs.sh\n@@ -115,7 +115,7 @@ test_expect_success 'setup v1, b1' '\n \n rm -rf cvswork\n test_expect_success 'cvs co v1' '\n-\tcvs -f -Q co -r v1 -d cvswork master >cvs.log 2>&1 &&\n+\tcvs -f -Q co -r v1 -d cvswork main >cvs.log 2>&1 &&\n \tcheck_start_tree cvswork &&\n \tcheck_file cvswork textfile.c v1 &&\n \tcheck_file cvswork t2 v1 &&\n@@ -128,7 +128,7 @@ test_expect_success 'cvs co v1' '\n \n rm -rf cvswork\n test_expect_success 'cvs co b1' '\n-\tcvs -f co -r b1 -d cvswork master >cvs.log 2>&1 &&\n+\tcvs -f co -r b1 -d cvswork main >cvs.log 2>&1 &&\n \tcheck_start_tree cvswork &&\n \tcheck_file cvswork textfile.c v1 &&\n \tcheck_file cvswork t2 v1 &&\n@@ -140,7 +140,7 @@ test_expect_success 'cvs co b1' '\n '\n \n test_expect_success 'cvs co b1 [cvswork3]' '\n-\tcvs -f co -r b1 -d cvswork3 master >cvs.log 2>&1 &&\n+\tcvs -f co -r b1 -d cvswork3 main >cvs.log 2>&1 &&\n \tcheck_start_tree cvswork3 &&\n \tcheck_file cvswork3 textfile.c v1 &&\n \tcheck_file cvswork3 t2 v1 &&\n@@ -265,7 +265,7 @@ test_expect_success 'setup simple b2' '\n '\n \n test_expect_success 'cvs co b2 [into cvswork2]' '\n-\tcvs -f co -r b2 -d cvswork2 master >cvs.log 2>&1 &&\n+\tcvs -f co -r b2 -d cvswork2 main >cvs.log 2>&1 &&\n \tcheck_start_tree cvswork &&\n \tcheck_file cvswork textfile.c v1 &&\n \tcheck_file cvswork t2 v1 &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 4ddfb9e3ee..a2b539aa30 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-8]*)\n+[0-8]*|9[0-4]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409818","messageId":"3aef39320e96aad10e133f1c97a9010aa85aa894.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 14/28] t55[23]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:44Z","receivedAt":"2020-11-12T22:44:32Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -e 's/naster/nain/g' -- t55[23]*.sh)\n\nNote that t5533 contains a variation of the name `master` (`naster`)\nthat we rename here, too.\n\nThis commit allows us to define\n`GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for that range of tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5520-pull.sh                |  30 +++---\n t/t5521-pull-options.sh        |  16 +--\n t/t5523-push-upstream.sh       |  30 +++---\n t/t5526-fetch-submodules.sh    |   6 +-\n t/t5527-fetch-odd-refs.sh      |  14 +--\n t/t5528-push-default.sh        |  98 ++++++++---------\n t/t5529-push-errors.sh         |   2 +-\n t/t5530-upload-pack-error.sh   |   2 +-\n t/t5531-deep-submodule-push.sh | 188 ++++++++++++++++-----------------\n t/t5533-push-cas.sh            | 142 ++++++++++++-------------\n t/t5534-push-signed.sh         |   4 +-\n t/t5537-fetch-shallow.sh       |  30 +++---\n t/t5538-push-shallow.sh        |  22 ++--\n t/t5539-fetch-http-shallow.sh  |  14 +--\n t/test-lib.sh                  |   2 +-\n 15 files changed, 300 insertions(+), 300 deletions(-)\n\ndiff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\nindex 9fae07cdfa..3be99df66d 100755\n--- a/t/t5520-pull.sh\n+++ b/t/t5520-pull.sh\n@@ -48,11 +48,11 @@ test_expect_success 'pulling into void' '\n \ttest_cmp file cloned/file\n '\n \n-test_expect_success 'pulling into void using master:master' '\n+test_expect_success 'pulling into void using main:main' '\n \tgit init cloned-uho &&\n \t(\n \t\tcd cloned-uho &&\n-\t\tgit pull .. master:master\n+\t\tgit pull .. main:main\n \t) &&\n \ttest_path_is_file file &&\n \ttest_path_is_file cloned-uho/file &&\n@@ -64,7 +64,7 @@ test_expect_success 'pulling into void does not overwrite untracked files' '\n \t(\n \t\tcd cloned-untracked &&\n \t\techo untracked >file &&\n-\t\ttest_must_fail git pull .. master &&\n+\t\ttest_must_fail git pull .. main &&\n \t\techo untracked >expect &&\n \t\ttest_cmp expect file\n \t)\n@@ -76,7 +76,7 @@ test_expect_success 'pulling into void does not overwrite staged files' '\n \t\tcd cloned-staged-colliding &&\n \t\techo \"alternate content\" >file &&\n \t\tgit add file &&\n-\t\ttest_must_fail git pull .. master &&\n+\t\ttest_must_fail git pull .. main &&\n \t\techo \"alternate content\" >expect &&\n \t\ttest_cmp expect file &&\n \t\tgit cat-file blob :file >file.index &&\n@@ -90,7 +90,7 @@ test_expect_success 'pulling into void does not remove new staged files' '\n \t\tcd cloned-staged-new &&\n \t\techo \"new tracked file\" >newfile &&\n \t\tgit add newfile &&\n-\t\tgit pull .. master &&\n+\t\tgit pull .. main &&\n \t\techo \"new tracked file\" >expect &&\n \t\ttest_cmp expect newfile &&\n \t\tgit cat-file blob :newfile >newfile.index &&\n@@ -102,15 +102,15 @@ test_expect_success 'pulling into void must not create an octopus' '\n \tgit init cloned-octopus &&\n \t(\n \t\tcd cloned-octopus &&\n-\t\ttest_must_fail git pull .. master master &&\n+\t\ttest_must_fail git pull .. main main &&\n \t\ttest_path_is_missing file\n \t)\n '\n \n test_expect_success 'test . as a remote' '\n-\tgit branch copy master &&\n+\tgit branch copy main &&\n \tgit config branch.copy.remote . &&\n-\tgit config branch.copy.merge refs/heads/master &&\n+\tgit config branch.copy.merge refs/heads/main &&\n \techo updated >file &&\n \tgit commit -a -m updated &&\n \tgit checkout copy &&\n@@ -126,7 +126,7 @@ test_expect_success 'test . as a remote' '\n '\n \n test_expect_success 'the default remote . should not break explicit pull' '\n-\tgit checkout -b second master^ &&\n+\tgit checkout -b second main^ &&\n \techo modified >file &&\n \tgit commit -a -m modified &&\n \tgit checkout copy &&\n@@ -361,7 +361,7 @@ test_expect_success 'failed --rebase shows advice' '\n \n test_expect_success '--rebase fails with multiple branches' '\n \tgit reset --hard before-rebase &&\n-\ttest_must_fail git pull --rebase . copy master 2>err &&\n+\ttest_must_fail git pull --rebase . copy main 2>err &&\n \ttest_cmp_rev HEAD before-rebase &&\n \ttest_i18ngrep \"Cannot rebase onto multiple branches\" err &&\n \techo modified >expect &&\n@@ -500,7 +500,7 @@ test_expect_success 'pull --rebase does not warn on --no-verify-signatures' '\n \ttest_i18ngrep ! \"verify-signatures\" err\n '\n \n-# add a feature branch, keep-merge, that is merged into master, so the\n+# add a feature branch, keep-merge, that is merged into main, so the\n # test can try preserving the merge commit (or not) with various\n # --rebase flags/pull.rebase settings.\n test_expect_success 'preserve merge setup' '\n@@ -699,12 +699,12 @@ test_expect_success 'pull --rebase dies early with dirty working directory' '\n '\n \n test_expect_success 'pull --rebase works on branch yet to be born' '\n-\tgit rev-parse master >expect &&\n+\tgit rev-parse main >expect &&\n \tmkdir empty_repo &&\n \t(\n \t\tcd empty_repo &&\n \t\tgit init &&\n-\t\tgit pull --rebase .. master &&\n+\t\tgit pull --rebase .. main &&\n \t\tgit rev-parse HEAD >../actual\n \t) &&\n \ttest_cmp expect actual\n@@ -720,7 +720,7 @@ test_expect_success 'pull --rebase fails on unborn branch with staged changes' '\n \t\techo staged-file >expect &&\n \t\tgit ls-files >actual &&\n \t\ttest_cmp expect actual &&\n-\t\ttest_must_fail git pull --rebase .. master 2>err &&\n+\t\ttest_must_fail git pull --rebase .. main 2>err &&\n \t\tgit ls-files >actual &&\n \t\ttest_cmp expect actual &&\n \t\tgit show :staged-file >actual &&\n@@ -779,7 +779,7 @@ test_expect_success 'setup for avoiding reapplying old patches' '\n \t(\n \t\tcd dst &&\n \t\ttest_might_fail git rebase --abort &&\n-\t\tgit reset --hard origin/master\n+\t\tgit reset --hard origin/main\n \t) &&\n \tgit clone --bare src src-replace.git &&\n \trm -rf src &&\ndiff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh\nindex db1a381cd9..ae80aaa480 100755\n--- a/t/t5521-pull-options.sh\n+++ b/t/t5521-pull-options.sh\n@@ -99,13 +99,13 @@ test_expect_success 'git pull --force' '\n \tcat >>.git/config <<-\\EOF &&\n \t[remote \"one\"]\n \t\turl = ../parent\n-\t\tfetch = refs/heads/master:refs/heads/mirror\n+\t\tfetch = refs/heads/main:refs/heads/mirror\n \t[remote \"two\"]\n \t\turl = ../parent\n-\t\tfetch = refs/heads/master:refs/heads/origin\n-\t[branch \"master\"]\n+\t\tfetch = refs/heads/main:refs/heads/origin\n+\t[branch \"main\"]\n \t\tremote = two\n-\t\tmerge = refs/heads/master\n+\t\tmerge = refs/heads/main\n \tEOF\n \tgit pull two &&\n \ttest_commit A &&\n@@ -124,9 +124,9 @@ test_expect_success 'git pull --all' '\n \t[remote \"two\"]\n \t\turl = ../parent\n \t\tfetch = refs/heads/*:refs/remotes/two/*\n-\t[branch \"master\"]\n+\t[branch \"main\"]\n \t\tremote = one\n-\t\tmerge = refs/heads/master\n+\t\tmerge = refs/heads/main\n \tEOF\n \tgit pull --all\n \t)\n@@ -139,7 +139,7 @@ test_expect_success 'git pull --dry-run' '\n \t\tcd clonedry &&\n \t\tgit pull --dry-run ../parent &&\n \t\ttest_path_is_missing .git/FETCH_HEAD &&\n-\t\ttest_path_is_missing .git/refs/heads/master &&\n+\t\ttest_path_is_missing .git/refs/heads/main &&\n \t\ttest_path_is_missing .git/index &&\n \t\ttest_path_is_missing file\n \t)\n@@ -153,7 +153,7 @@ test_expect_success 'git pull --all --dry-run' '\n \t\tgit remote add origin ../parent &&\n \t\tgit pull --all --dry-run &&\n \t\ttest_path_is_missing .git/FETCH_HEAD &&\n-\t\ttest_path_is_missing .git/refs/remotes/origin/master &&\n+\t\ttest_path_is_missing .git/refs/remotes/origin/main &&\n \t\ttest_path_is_missing .git/index &&\n \t\ttest_path_is_missing file\n \t)\ndiff --git a/t/t5523-push-upstream.sh b/t/t5523-push-upstream.sh\nindex e47b5db5d6..a2eaa877a2 100755\n--- a/t/t5523-push-upstream.sh\n+++ b/t/t5523-push-upstream.sh\n@@ -26,19 +26,19 @@ check_config() {\n \ttest_cmp expect.$1 actual.$1\n }\n \n-test_expect_success 'push -u master:master' '\n-\tgit push -u upstream master:master &&\n-\tcheck_config master upstream refs/heads/master\n+test_expect_success 'push -u main:main' '\n+\tgit push -u upstream main:main &&\n+\tcheck_config main upstream refs/heads/main\n '\n \n-test_expect_success 'push -u master:other' '\n-\tgit push -u upstream master:other &&\n-\tcheck_config master upstream refs/heads/other\n+test_expect_success 'push -u main:other' '\n+\tgit push -u upstream main:other &&\n+\tcheck_config main upstream refs/heads/other\n '\n \n-test_expect_success 'push -u --dry-run master:otherX' '\n-\tgit push -u --dry-run upstream master:otherX &&\n-\tcheck_config master upstream refs/heads/other\n+test_expect_success 'push -u --dry-run main:otherX' '\n+\tgit push -u --dry-run upstream main:otherX &&\n+\tcheck_config main upstream refs/heads/other\n '\n \n test_expect_success 'push -u topic_2:topic_2' '\n@@ -74,7 +74,7 @@ test_expect_success 'push -u HEAD' '\n test_expect_success TTY 'progress messages go to tty' '\n \tensure_fresh_upstream &&\n \n-\ttest_terminal git push -u upstream master >out 2>err &&\n+\ttest_terminal git push -u upstream main >out 2>err &&\n \ttest_i18ngrep \"Writing objects\" err\n '\n \n@@ -82,7 +82,7 @@ test_expect_success 'progress messages do not go to non-tty' '\n \tensure_fresh_upstream &&\n \n \t# skip progress messages, since stderr is non-tty\n-\tgit push -u upstream master >out 2>err &&\n+\tgit push -u upstream main >out 2>err &&\n \ttest_i18ngrep ! \"Writing objects\" err\n '\n \n@@ -90,21 +90,21 @@ test_expect_success 'progress messages go to non-tty (forced)' '\n \tensure_fresh_upstream &&\n \n \t# force progress messages to stderr, even though it is non-tty\n-\tgit push -u --progress upstream master >out 2>err &&\n+\tgit push -u --progress upstream main >out 2>err &&\n \ttest_i18ngrep \"Writing objects\" err\n '\n \n test_expect_success TTY 'push -q suppresses progress' '\n \tensure_fresh_upstream &&\n \n-\ttest_terminal git push -u -q upstream master >out 2>err &&\n+\ttest_terminal git push -u -q upstream main >out 2>err &&\n \ttest_i18ngrep ! \"Writing objects\" err\n '\n \n test_expect_success TTY 'push --no-progress suppresses progress' '\n \tensure_fresh_upstream &&\n \n-\ttest_terminal git push -u --no-progress upstream master >out 2>err &&\n+\ttest_terminal git push -u --no-progress upstream main >out 2>err &&\n \ttest_i18ngrep ! \"Unpacking objects\" err &&\n \ttest_i18ngrep ! \"Writing objects\" err\n '\n@@ -112,7 +112,7 @@ test_expect_success TTY 'push --no-progress suppresses progress' '\n test_expect_success TTY 'quiet push' '\n \tensure_fresh_upstream &&\n \n-\ttest_terminal git push --quiet --no-progress upstream master 2>&1 | tee output &&\n+\ttest_terminal git push --quiet --no-progress upstream main 2>&1 | tee output &&\n \ttest_must_be_empty output\n '\n \ndiff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh\nindex dd8e423d25..f45ba02b8a 100755\n--- a/t/t5526-fetch-submodules.sh\n+++ b/t/t5526-fetch-submodules.sh\n@@ -481,7 +481,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"don't fetch submodule when newly re\n \ttest_i18ncmp expect.err actual.err &&\n \t(\n \t\tcd submodule &&\n-\t\tgit checkout -q master\n+\t\tgit checkout -q main\n \t)\n '\n \n@@ -663,9 +663,9 @@ test_expect_success 'fetch new submodule commits on-demand without .gitmodules e\n \tgit config -f .gitmodules --remove-section submodule.sub1 &&\n \tgit add .gitmodules &&\n \tgit commit -m \"delete gitmodules file\" &&\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tgit -C downstream fetch &&\n-\tgit -C downstream checkout origin/master &&\n+\tgit -C downstream checkout origin/main &&\n \n \tC=$(git -C submodule commit-tree -m \"yet another change outside refs/heads\" HEAD^{tree}) &&\n \tgit -C submodule update-ref refs/changes/7 $C &&\ndiff --git a/t/t5527-fetch-odd-refs.sh b/t/t5527-fetch-odd-refs.sh\nindex 3b0cb98422..c6a4db4c59 100755\n--- a/t/t5527-fetch-odd-refs.sh\n+++ b/t/t5527-fetch-odd-refs.sh\n@@ -5,13 +5,13 @@ test_description='test fetching of oddly-named refs'\n \n # afterwards we will have:\n #  HEAD - two\n-#  refs/for/refs/heads/master - one\n-#  refs/heads/master - three\n+#  refs/for/refs/heads/main - one\n+#  refs/heads/main - three\n test_expect_success 'setup repo with odd suffix ref' '\n \techo content >file &&\n \tgit add . &&\n \tgit commit -m one &&\n-\tgit update-ref refs/for/refs/heads/master HEAD &&\n+\tgit update-ref refs/for/refs/heads/main HEAD &&\n \techo content >>file &&\n \tgit commit -a -m two &&\n \techo content >>file &&\n@@ -22,7 +22,7 @@ test_expect_success 'setup repo with odd suffix ref' '\n test_expect_success 'suffix ref is ignored during fetch' '\n \tgit clone --bare file://\"$PWD\" suffix &&\n \techo three >expect &&\n-\tgit --git-dir=suffix log -1 --format=%s refs/heads/master >actual &&\n+\tgit --git-dir=suffix log -1 --format=%s refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -33,7 +33,7 @@ test_expect_success 'try to create repo with absurdly long refname' '\n \t(\n \t\tcd long &&\n \t\ttest_commit long &&\n-\t\ttest_commit master\n+\t\ttest_commit main\n \t) &&\n \tif git -C long update-ref refs/heads/$ref1440 long; then\n \t\ttest_set_prereq LONG_REF\n@@ -46,7 +46,7 @@ test_expect_success LONG_REF 'fetch handles extremely long refname' '\n \tgit fetch long refs/heads/*:refs/remotes/long/* &&\n \tcat >expect <<-\\EOF &&\n \tlong\n-\tmaster\n+\tmain\n \tEOF\n \tgit for-each-ref --format=\"%(subject)\" refs/remotes/long >actual &&\n \ttest_cmp expect actual\n@@ -55,7 +55,7 @@ test_expect_success LONG_REF 'fetch handles extremely long refname' '\n test_expect_success LONG_REF 'push handles extremely long refname' '\n \tgit push long :refs/heads/$ref1440 &&\n \tgit -C long for-each-ref --format=\"%(subject)\" refs/heads >actual &&\n-\techo master >expect &&\n+\techo main >expect &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t5528-push-default.sh b/t/t5528-push-default.sh\nindex f0a287d97d..b6d1776c98 100755\n--- a/t/t5528-push-default.sh\n+++ b/t/t5528-push-default.sh\n@@ -41,7 +41,7 @@ test_push_failure () {\n \n # $1 = success or failure\n # $2 = push.default value\n-# $3 = branch to check for actual output (master or foo)\n+# $3 = branch to check for actual output (main or foo)\n # $4 = [optional] switch to triangular workflow\n test_pushdefault_workflow () {\n \tworkflow=central\n@@ -51,8 +51,8 @@ test_pushdefault_workflow () {\n \t\tpushdefault=parent2\n \tfi\n \ttest_expect_success \"push.default = $2 $1 in $workflow workflows\" \"\n-\t\ttest_config branch.master.remote parent1 &&\n-\t\ttest_config branch.master.merge refs/heads/foo &&\n+\t\ttest_config branch.main.remote parent1 &&\n+\t\ttest_config branch.main.merge refs/heads/foo &&\n \t\ttest_config remote.pushdefault $pushdefault &&\n \t\ttest_commit commit-for-$2${4+-triangular} &&\n \t\ttest_push_$1 $2 $3 ${4+repo2}\n@@ -60,32 +60,32 @@ test_pushdefault_workflow () {\n }\n \n test_expect_success '\"upstream\" pushes to configured upstream' '\n-\tgit checkout master &&\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_config branch.master.merge refs/heads/foo &&\n+\tgit checkout main &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_config branch.main.merge refs/heads/foo &&\n \ttest_commit two &&\n \ttest_push_success upstream foo\n '\n \n test_expect_success '\"upstream\" does not push on unconfigured remote' '\n-\tgit checkout master &&\n-\ttest_unconfig branch.master.remote &&\n+\tgit checkout main &&\n+\ttest_unconfig branch.main.remote &&\n \ttest_commit three &&\n \ttest_push_failure upstream\n '\n \n test_expect_success '\"upstream\" does not push on unconfigured branch' '\n-\tgit checkout master &&\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_unconfig branch.master.merge &&\n+\tgit checkout main &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_unconfig branch.main.merge &&\n \ttest_commit four &&\n \ttest_push_failure upstream\n '\n \n test_expect_success '\"upstream\" does not push when remotes do not match' '\n-\tgit checkout master &&\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_config branch.master.merge refs/heads/foo &&\n+\tgit checkout main &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_config branch.main.merge refs/heads/foo &&\n \ttest_config push.default upstream &&\n \ttest_commit five &&\n \ttest_must_fail git push parent2\n@@ -121,99 +121,99 @@ test_expect_success 'push from/to new branch with current creates remote branch'\n '\n \n test_expect_success 'push to existing branch, with no upstream configured' '\n-\ttest_config branch.master.remote repo1 &&\n-\tgit checkout master &&\n+\ttest_config branch.main.remote repo1 &&\n+\tgit checkout main &&\n \ttest_push_failure simple &&\n \ttest_push_failure upstream\n '\n \n test_expect_success 'push to existing branch, upstream configured with same name' '\n-\ttest_config branch.master.remote repo1 &&\n-\ttest_config branch.master.merge refs/heads/master &&\n-\tgit checkout master &&\n+\ttest_config branch.main.remote repo1 &&\n+\ttest_config branch.main.merge refs/heads/main &&\n+\tgit checkout main &&\n \ttest_commit six &&\n-\ttest_push_success upstream master &&\n+\ttest_push_success upstream main &&\n \ttest_commit seven &&\n-\ttest_push_success simple master\n+\ttest_push_success simple main\n '\n \n test_expect_success 'push to existing branch, upstream configured with different name' '\n-\ttest_config branch.master.remote repo1 &&\n-\ttest_config branch.master.merge refs/heads/other-name &&\n-\tgit checkout master &&\n+\ttest_config branch.main.remote repo1 &&\n+\ttest_config branch.main.merge refs/heads/other-name &&\n+\tgit checkout main &&\n \ttest_commit eight &&\n \ttest_push_success upstream other-name &&\n \ttest_commit nine &&\n \ttest_push_failure simple &&\n \tgit --git-dir=repo1 log -1 --format=\"%h %s\" \"other-name\" >expect-other-name &&\n-\ttest_push_success current master &&\n+\ttest_push_success current main &&\n \tgit --git-dir=repo1 log -1 --format=\"%h %s\" \"other-name\" >actual-other-name &&\n \ttest_cmp expect-other-name actual-other-name\n '\n \n-# We are on 'master', which integrates with 'foo' from parent1\n+# We are on 'main', which integrates with 'foo' from parent1\n # remote (set in test_pushdefault_workflow helper).  Push to\n # parent1 in centralized, and push to parent2 in triangular workflow.\n-# The parent1 repository has 'master' and 'foo' branches, while\n-# the parent2 repository has only 'master' branch.\n+# The parent1 repository has 'main' and 'foo' branches, while\n+# the parent2 repository has only 'main' branch.\n #\n # test_pushdefault_workflow() arguments:\n # $1 = success or failure\n # $2 = push.default value\n-# $3 = branch to check for actual output (master or foo)\n+# $3 = branch to check for actual output (main or foo)\n # $4 = [optional] switch to triangular workflow\n \n-# update parent1's master (which is not our upstream)\n-test_pushdefault_workflow success current master\n+# update parent1's main (which is not our upstream)\n+test_pushdefault_workflow success current main\n \n # update parent1's foo (which is our upstream)\n test_pushdefault_workflow success upstream foo\n \n # upstream is foo which is not the name of the current branch\n-test_pushdefault_workflow failure simple master\n+test_pushdefault_workflow failure simple main\n \n-# master and foo are updated\n-test_pushdefault_workflow success matching master\n+# main and foo are updated\n+test_pushdefault_workflow success matching main\n \n-# master is updated\n-test_pushdefault_workflow success current master triangular\n+# main is updated\n+test_pushdefault_workflow success current main triangular\n \n # upstream mode cannot be used in triangular\n test_pushdefault_workflow failure upstream foo triangular\n \n # in triangular, 'simple' works as 'current' and update the branch\n # with the same name.\n-test_pushdefault_workflow success simple master triangular\n+test_pushdefault_workflow success simple main triangular\n \n-# master is updated (parent2 does not have foo)\n-test_pushdefault_workflow success matching master triangular\n+# main is updated (parent2 does not have foo)\n+test_pushdefault_workflow success matching main triangular\n \n # default tests, when no push-default is specified. This\n # should behave the same as \"simple\" in non-triangular\n # settings, and as \"current\" otherwise.\n \n test_expect_success 'default behavior allows \"simple\" push' '\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_config branch.master.merge refs/heads/master &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_config branch.main.merge refs/heads/main &&\n \ttest_config remote.pushdefault parent1 &&\n-\ttest_commit default-master-master &&\n-\ttest_push_success \"\" master\n+\ttest_commit default-main-main &&\n+\ttest_push_success \"\" main\n '\n \n test_expect_success 'default behavior rejects non-simple push' '\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_config branch.master.merge refs/heads/foo &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_config branch.main.merge refs/heads/foo &&\n \ttest_config remote.pushdefault parent1 &&\n-\ttest_commit default-master-foo &&\n+\ttest_commit default-main-foo &&\n \ttest_push_failure \"\"\n '\n \n test_expect_success 'default triangular behavior acts like \"current\"' '\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_config branch.master.merge refs/heads/foo &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_config branch.main.merge refs/heads/foo &&\n \ttest_config remote.pushdefault parent2 &&\n \ttest_commit default-triangular &&\n-\ttest_push_success \"\" master repo2\n+\ttest_push_success \"\" main repo2\n '\n \n test_done\ndiff --git a/t/t5529-push-errors.sh b/t/t5529-push-errors.sh\nindex 9871307fd4..ce85fd30ad 100755\n--- a/t/t5529-push-errors.sh\n+++ b/t/t5529-push-errors.sh\n@@ -32,7 +32,7 @@ test_expect_success 'detect missing branches early' '\n test_expect_success 'detect missing sha1 expressions early' '\n \techo no >rp-ran &&\n \techo no >expect &&\n-\ttest_must_fail git push origin master~2:master &&\n+\ttest_must_fail git push origin main~2:main &&\n \ttest_cmp expect rp-ran\n '\n \ndiff --git a/t/t5530-upload-pack-error.sh b/t/t5530-upload-pack-error.sh\nindex 9dd2d2457a..7c1460eaa9 100755\n--- a/t/t5530-upload-pack-error.sh\n+++ b/t/t5530-upload-pack-error.sh\n@@ -115,7 +115,7 @@ test_expect_success 'create empty repository' '\n \n test_expect_success 'fetch fails' '\n \n-\ttest_must_fail git fetch .. master\n+\ttest_must_fail git fetch .. main\n \n '\n \ndiff --git a/t/t5531-deep-submodule-push.sh b/t/t5531-deep-submodule-push.sh\nindex 4ad059e6be..afc0cd79f6 100755\n--- a/t/t5531-deep-submodule-push.sh\n+++ b/t/t5531-deep-submodule-push.sh\n@@ -30,7 +30,7 @@ test_expect_success setup '\n test_expect_success 'push works with recorded gitlink' '\n \t(\n \t\tcd work &&\n-\t\tgit push ../pub.git master\n+\t\tgit push ../pub.git main\n \t)\n '\n \n@@ -45,7 +45,7 @@ test_expect_success 'push if submodule has no remote' '\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Second commit for gar/bage\" &&\n-\t\tgit push --recurse-submodules=check ../pub.git master\n+\t\tgit push --recurse-submodules=check ../pub.git main\n \t)\n '\n \n@@ -66,21 +66,21 @@ test_expect_success 'push fails if submodule commit not on remote' '\n \t\tgit commit -m \"Third commit for gar/bage\" &&\n \t\t# the push should fail with --recurse-submodules=check\n \t\t# on the command line...\n-\t\ttest_must_fail git push --recurse-submodules=check ../pub.git master &&\n+\t\ttest_must_fail git push --recurse-submodules=check ../pub.git main &&\n \n \t\t# ...or if specified in the configuration..\n-\t\ttest_must_fail git -c push.recurseSubmodules=check push ../pub.git master\n+\t\ttest_must_fail git -c push.recurseSubmodules=check push ../pub.git main\n \t)\n '\n \n test_expect_success 'push succeeds after commit was pushed to remote' '\n \t(\n \t\tcd work/gar/bage &&\n-\t\tgit push origin master\n+\t\tgit push origin main\n \t) &&\n \t(\n \t\tcd work &&\n-\t\tgit push --recurse-submodules=check ../pub.git master\n+\t\tgit push --recurse-submodules=check ../pub.git main\n \t)\n '\n \n@@ -95,13 +95,13 @@ test_expect_success 'push succeeds if submodule commit not on remote but using o\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse on-demand on command line for gar/bage\" &&\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master &&\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# Check that the submodule commit got there too\n \t\tcd gar/bage &&\n-\t\tgit diff --quiet origin/master master\n+\t\tgit diff --quiet origin/main main\n \t)\n '\n \n@@ -116,13 +116,13 @@ test_expect_success 'push succeeds if submodule commit not on remote but using o\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse on-demand from config for gar/bage\" &&\n-\t\tgit -c push.recurseSubmodules=on-demand push ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=on-demand push ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# Check that the submodule commit got there too\n \t\tcd gar/bage &&\n-\t\tgit diff --quiet origin/master master\n+\t\tgit diff --quiet origin/main main\n \t)\n '\n \n@@ -137,13 +137,13 @@ test_expect_success 'push succeeds if submodule commit not on remote but using a\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse submodule.recurse from config for gar/bage\" &&\n-\t\tgit -c submodule.recurse push ../pub.git master &&\n+\t\tgit -c submodule.recurse push ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# Check that the submodule commit got there too\n \t\tcd gar/bage &&\n-\t\tgit diff --quiet origin/master master\n+\t\tgit diff --quiet origin/main main\n \t)\n '\n \n@@ -161,34 +161,34 @@ test_expect_success 'push recurse-submodules on command line overrides config' '\n \n \t\t# Ensure that we can override on-demand in the config\n \t\t# to just check submodules\n-\t\ttest_must_fail git -c push.recurseSubmodules=on-demand push --recurse-submodules=check ../pub.git master &&\n+\t\ttest_must_fail git -c push.recurseSubmodules=on-demand push --recurse-submodules=check ../pub.git main &&\n \t\t# Check that the supermodule commit did not get there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master^ &&\n+\t\tgit diff --quiet FETCH_HEAD main^ &&\n \t\t# Check that the submodule commit did not get there\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# Ensure that we can override check in the config to\n \t\t# disable submodule recursion entirely\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n-\t\tgit -c push.recurseSubmodules=on-demand push --recurse-submodules=no ../pub.git master &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n+\t\tgit -c push.recurseSubmodules=on-demand push --recurse-submodules=no ../pub.git main &&\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# Ensure that we can override check in the config to\n \t\t# disable submodule recursion entirely (alternative form)\n-\t\tgit -c push.recurseSubmodules=on-demand push --no-recurse-submodules ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=on-demand push --no-recurse-submodules ../pub.git main &&\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# Ensure that we can override check in the config to\n \t\t# push the submodule too\n-\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=on-demand ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=on-demand ../pub.git main &&\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n-\t\t(cd gar/bage && git diff --quiet origin/master master)\n+\t\tgit diff --quiet FETCH_HEAD main &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main)\n \t)\n '\n \n@@ -205,31 +205,31 @@ test_expect_success 'push recurse-submodules last one wins on command line' '\n \t\tgit commit -m \"Recurse on command-line overriding earlier command-line for gar/bage\" &&\n \n \t\t# should result in \"check\"\n-\t\ttest_must_fail git push --recurse-submodules=on-demand --recurse-submodules=check ../pub.git master &&\n+\t\ttest_must_fail git push --recurse-submodules=on-demand --recurse-submodules=check ../pub.git main &&\n \t\t# Check that the supermodule commit did not get there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master^ &&\n+\t\tgit diff --quiet FETCH_HEAD main^ &&\n \t\t# Check that the submodule commit did not get there\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# should result in \"no\"\n-\t\tgit push --recurse-submodules=on-demand --recurse-submodules=no ../pub.git master &&\n+\t\tgit push --recurse-submodules=on-demand --recurse-submodules=no ../pub.git main &&\n \t\t# Check that the supermodule commit did get there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# Check that the submodule commit did not get there\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# should result in \"no\"\n-\t\tgit push --recurse-submodules=on-demand --no-recurse-submodules ../pub.git master &&\n+\t\tgit push --recurse-submodules=on-demand --no-recurse-submodules ../pub.git main &&\n \t\t# Check that the submodule commit did not get there\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# But the options in the other order should push the submodule\n-\t\tgit push --recurse-submodules=check --recurse-submodules=on-demand ../pub.git master &&\n+\t\tgit push --recurse-submodules=check --recurse-submodules=on-demand ../pub.git main &&\n \t\t# Check that the submodule commit did get there\n \t\tgit fetch ../pub.git &&\n-\t\t(cd gar/bage && git diff --quiet origin/master master)\n+\t\t(cd gar/bage && git diff --quiet origin/main main)\n \t)\n '\n \n@@ -244,13 +244,13 @@ test_expect_success 'push succeeds if submodule commit not on remote using on-de\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse on-demand on command-line overriding config for gar/bage\" &&\n-\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=on-demand ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=on-demand ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# Check that the submodule commit got there\n \t\tcd gar/bage &&\n-\t\tgit diff --quiet origin/master master\n+\t\tgit diff --quiet origin/main main\n \t)\n '\n \n@@ -265,14 +265,14 @@ test_expect_success 'push succeeds if submodule commit disabling recursion from\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse disable on command-line overriding config for gar/bage\" &&\n-\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=no ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=no ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# But that the submodule commit did not\n-\t\t( cd gar/bage && git diff --quiet origin/master master^ ) &&\n+\t\t( cd gar/bage && git diff --quiet origin/main main^ ) &&\n \t\t# Now push it to avoid confusing future tests\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t)\n '\n \n@@ -287,14 +287,14 @@ test_expect_success 'push succeeds if submodule commit disabling recursion from\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse disable on command-line alternative overriding config for gar/bage\" &&\n-\t\tgit -c push.recurseSubmodules=check push --no-recurse-submodules ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=check push --no-recurse-submodules ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# But that the submodule commit did not\n-\t\t( cd gar/bage && git diff --quiet origin/master master^ ) &&\n+\t\t( cd gar/bage && git diff --quiet origin/main main^ ) &&\n \t\t# Now push it to avoid confusing future tests\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t)\n '\n \n@@ -304,7 +304,7 @@ test_expect_success 'submodule entry pointing at a tag is error' '\n \tgit -C work update-index --cacheinfo 160000 \"$tag\" gar/bage &&\n \tgit -C work commit -m \"bad commit\" &&\n \ttest_when_finished \"git -C work reset --hard HEAD^\" &&\n-\ttest_must_fail git -C work push --recurse-submodules=on-demand ../pub.git master 2>err &&\n+\ttest_must_fail git -C work push --recurse-submodules=on-demand ../pub.git main 2>err &&\n \ttest_i18ngrep \"is a tag, not a commit\" err\n '\n \n@@ -319,9 +319,9 @@ test_expect_success 'push fails if recurse submodules option passed as yes' '\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse push fails if recurse submodules option passed as yes for gar/bage\" &&\n-\t\ttest_must_fail git push --recurse-submodules=yes ../pub.git master &&\n-\t\ttest_must_fail git -c push.recurseSubmodules=yes push ../pub.git master &&\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\ttest_must_fail git push --recurse-submodules=yes ../pub.git main &&\n+\t\ttest_must_fail git -c push.recurseSubmodules=yes push ../pub.git main &&\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t)\n '\n \n@@ -363,7 +363,7 @@ test_expect_success 'push succeeds if submodule has no remote and is on the firs\n \t\t) &&\n \t\tgit add b &&\n \t\tgit commit -m \"added submodule\" &&\n-\t\tgit push --recurse-submodules=check origin master\n+\t\tgit push --recurse-submodules=check origin main\n \t)\n '\n \n@@ -372,21 +372,21 @@ test_expect_success 'push unpushed submodules when not needed' '\n \t\tcd work &&\n \t\t(\n \t\t\tcd gar/bage &&\n-\t\t\tgit checkout master &&\n+\t\t\tgit checkout main &&\n \t\t\t>junk5 &&\n \t\t\tgit add junk5 &&\n \t\t\tgit commit -m \"Fifth junk\" &&\n \t\t\tgit push &&\n-\t\t\tgit rev-parse origin/master >../../../expected\n+\t\t\tgit rev-parse origin/main >../../../expected\n \t\t) &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Fifth commit for gar/bage\" &&\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t) &&\n \t(\n \t\tcd submodule.git &&\n-\t\tgit rev-parse master >../actual\n+\t\tgit rev-parse main >../actual\n \t) &&\n \ttest_cmp expected actual\n '\n@@ -394,7 +394,7 @@ test_expect_success 'push unpushed submodules when not needed' '\n test_expect_success 'push unpushed submodules when not needed 2' '\n \t(\n \t\tcd submodule.git &&\n-\t\tgit rev-parse master >../expected\n+\t\tgit rev-parse main >../expected\n \t) &&\n \t(\n \t\tcd work &&\n@@ -407,11 +407,11 @@ test_expect_success 'push unpushed submodules when not needed 2' '\n \t\t>junk2 &&\n \t\tgit add junk2 &&\n \t\tgit commit -m \"Second junk for work\" &&\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t) &&\n \t(\n \t\tcd submodule.git &&\n-\t\tgit rev-parse master >../actual\n+\t\tgit rev-parse main >../actual\n \t) &&\n \ttest_cmp expected actual\n '\n@@ -421,20 +421,20 @@ test_expect_success 'push unpushed submodules recursively' '\n \t\tcd work &&\n \t\t(\n \t\t\tcd gar/bage &&\n-\t\t\tgit checkout master &&\n+\t\t\tgit checkout main &&\n \t\t\t> junk7 &&\n \t\t\tgit add junk7 &&\n \t\t\tgit commit -m \"Seventh junk\" &&\n-\t\t\tgit rev-parse master >../../../expected\n+\t\t\tgit rev-parse main >../../../expected\n \t\t) &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Seventh commit for gar/bage\" &&\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t) &&\n \t(\n \t\tcd submodule.git &&\n-\t\tgit rev-parse master >../actual\n+\t\tgit rev-parse main >../actual\n \t) &&\n \ttest_cmp expected actual\n '\n@@ -444,64 +444,64 @@ test_expect_success 'push unpushable submodule recursively fails' '\n \t\tcd work &&\n \t\t(\n \t\t\tcd gar/bage &&\n-\t\t\tgit rev-parse origin/master >../../../expected &&\n-\t\t\tgit checkout master~0 &&\n+\t\t\tgit rev-parse origin/main >../../../expected &&\n+\t\t\tgit checkout main~0 &&\n \t\t\t> junk8 &&\n \t\t\tgit add junk8 &&\n \t\t\tgit commit -m \"Eighth junk\"\n \t\t) &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Eighth commit for gar/bage\" &&\n-\t\ttest_must_fail git push --recurse-submodules=on-demand ../pub.git master\n+\t\ttest_must_fail git push --recurse-submodules=on-demand ../pub.git main\n \t) &&\n \t(\n \t\tcd submodule.git &&\n-\t\tgit rev-parse master >../actual\n+\t\tgit rev-parse main >../actual\n \t) &&\n-\ttest_when_finished git -C work reset --hard master^ &&\n+\ttest_when_finished git -C work reset --hard main^ &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'push --dry-run does not recursively update submodules' '\n \t(\n \t\tcd work/gar/bage &&\n-\t\tgit checkout master &&\n-\t\tgit rev-parse master >../../../expected_submodule &&\n+\t\tgit checkout main &&\n+\t\tgit rev-parse main >../../../expected_submodule &&\n \t\t> junk9 &&\n \t\tgit add junk9 &&\n \t\tgit commit -m \"Ninth junk\" &&\n \n \t\t# Go up to 'work' directory\n \t\tcd ../.. &&\n-\t\tgit checkout master &&\n-\t\tgit rev-parse master >../expected_pub &&\n+\t\tgit checkout main &&\n+\t\tgit rev-parse main >../expected_pub &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Ninth commit for gar/bage\" &&\n-\t\tgit push --dry-run --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --dry-run --recurse-submodules=on-demand ../pub.git main\n \t) &&\n-\tgit -C submodule.git rev-parse master >actual_submodule &&\n-\tgit -C pub.git rev-parse master >actual_pub &&\n+\tgit -C submodule.git rev-parse main >actual_submodule &&\n+\tgit -C pub.git rev-parse main >actual_pub &&\n \ttest_cmp expected_pub actual_pub &&\n \ttest_cmp expected_submodule actual_submodule\n '\n \n test_expect_success 'push --dry-run does not recursively update submodules' '\n-\tgit -C work push --dry-run --recurse-submodules=only ../pub.git master &&\n+\tgit -C work push --dry-run --recurse-submodules=only ../pub.git main &&\n \n-\tgit -C submodule.git rev-parse master >actual_submodule &&\n-\tgit -C pub.git rev-parse master >actual_pub &&\n+\tgit -C submodule.git rev-parse main >actual_submodule &&\n+\tgit -C pub.git rev-parse main >actual_pub &&\n \ttest_cmp expected_pub actual_pub &&\n \ttest_cmp expected_submodule actual_submodule\n '\n \n test_expect_success 'push only unpushed submodules recursively' '\n-\tgit -C work/gar/bage rev-parse master >expected_submodule &&\n-\tgit -C pub.git rev-parse master >expected_pub &&\n+\tgit -C work/gar/bage rev-parse main >expected_submodule &&\n+\tgit -C pub.git rev-parse main >expected_pub &&\n \n-\tgit -C work push --recurse-submodules=only ../pub.git master &&\n+\tgit -C work push --recurse-submodules=only ../pub.git main &&\n \n-\tgit -C submodule.git rev-parse master >actual_submodule &&\n-\tgit -C pub.git rev-parse master >actual_pub &&\n+\tgit -C submodule.git rev-parse main >actual_submodule &&\n+\tgit -C pub.git rev-parse main >actual_pub &&\n \ttest_cmp expected_submodule actual_submodule &&\n \ttest_cmp expected_pub actual_pub\n '\n@@ -517,14 +517,14 @@ test_expect_success 'push propagating the remotes name to a submodule' '\n \tgit -C work commit -m \"Tenth junk added to gar/bage\" &&\n \n \t# Fails when submodule does not have a matching remote\n-\ttest_must_fail git -C work push --recurse-submodules=on-demand pub master &&\n+\ttest_must_fail git -C work push --recurse-submodules=on-demand pub main &&\n \t# Succeeds when submodules has matching remote and refspec\n-\tgit -C work push --recurse-submodules=on-demand origin master &&\n+\tgit -C work push --recurse-submodules=on-demand origin main &&\n \n-\tgit -C submodule.git rev-parse master >actual_submodule &&\n-\tgit -C pub.git rev-parse master >actual_pub &&\n-\tgit -C work/gar/bage rev-parse master >expected_submodule &&\n-\tgit -C work rev-parse master >expected_pub &&\n+\tgit -C submodule.git rev-parse main >actual_submodule &&\n+\tgit -C pub.git rev-parse main >actual_pub &&\n+\tgit -C work/gar/bage rev-parse main >expected_submodule &&\n+\tgit -C work rev-parse main >expected_pub &&\n \ttest_cmp expected_submodule actual_submodule &&\n \ttest_cmp expected_pub actual_pub\n '\n@@ -548,7 +548,7 @@ test_expect_success 'push propagating refspec to a submodule' '\n \ttest_must_fail git -C work push --recurse-submodules=on-demand origin \\\n \t\tHEAD:refs/heads/branch2 &&\n \n-\tgit -C work/gar/bage branch branch2 master &&\n+\tgit -C work/gar/bage branch branch2 main &&\n \tgit -C work push --recurse-submodules=on-demand origin branch2 &&\n \n \tgit -C submodule.git rev-parse branch2 >actual_submodule &&\ndiff --git a/t/t5533-push-cas.sh b/t/t5533-push-cas.sh\nindex 7813e8470e..9fcec604c3 100755\n--- a/t/t5533-push-cas.sh\n+++ b/t/t5533-push-cas.sh\n@@ -29,22 +29,22 @@ setup_src_dup_dst () {\n \t(\n \t\tcd dup &&\n \t\tgit fetch &&\n-\t\tgit merge origin/master &&\n-\t\tgit switch -c branch master~2 &&\n+\t\tgit merge origin/main &&\n+\t\tgit switch -c branch main~2 &&\n \t\ttest_commit D &&\n \t\ttest_commit E &&\n \t\tgit push origin --all\n \t) &&\n \t(\n \t\tcd src &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\tgit fetch --all &&\n \t\tgit branch branch --track origin/branch &&\n-\t\tgit rebase origin/master\n+\t\tgit rebase origin/main\n \t) &&\n \t(\n \t\tcd dup &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit F &&\n \t\ttest_commit G &&\n \t\tgit switch branch &&\n@@ -65,11 +65,11 @@ test_expect_success 'push to update (protected)' '\n \t(\n \t\tcd dst &&\n \t\ttest_commit D &&\n-\t\ttest_must_fail git push --force-with-lease=master:master origin master 2>err &&\n+\t\ttest_must_fail git push --force-with-lease=main:main origin main 2>err &&\n \t\tgrep \"stale info\" err\n \t) &&\n-\tgit ls-remote . refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote . refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -78,11 +78,11 @@ test_expect_success 'push to update (protected, forced)' '\n \t(\n \t\tcd dst &&\n \t\ttest_commit D &&\n-\t\tgit push --force --force-with-lease=master:master origin master 2>err &&\n+\t\tgit push --force --force-with-lease=main:main origin main 2>err &&\n \t\tgrep \"forced update\" err\n \t) &&\n-\tgit ls-remote dst refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote dst refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -90,20 +90,20 @@ test_expect_success 'push to update (protected, tracking)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit D &&\n \t\tgit checkout HEAD^0\n \t) &&\n-\tgit ls-remote src refs/heads/master >expect &&\n+\tgit ls-remote src refs/heads/main >expect &&\n \t(\n \t\tcd dst &&\n \t\ttest_commit E &&\n-\t\tgit ls-remote . refs/remotes/origin/master >expect &&\n-\t\ttest_must_fail git push --force-with-lease=master origin master &&\n-\t\tgit ls-remote . refs/remotes/origin/master >actual &&\n+\t\tgit ls-remote . refs/remotes/origin/main >expect &&\n+\t\ttest_must_fail git push --force-with-lease=main origin main &&\n+\t\tgit ls-remote . refs/remotes/origin/main >actual &&\n \t\ttest_cmp expect actual\n \t) &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -111,18 +111,18 @@ test_expect_success 'push to update (protected, tracking, forced)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit D &&\n \t\tgit checkout HEAD^0\n \t) &&\n \t(\n \t\tcd dst &&\n \t\ttest_commit E &&\n-\t\tgit ls-remote . refs/remotes/origin/master >expect &&\n-\t\tgit push --force --force-with-lease=master origin master\n+\t\tgit ls-remote . refs/remotes/origin/main >expect &&\n+\t\tgit push --force --force-with-lease=main origin main\n \t) &&\n-\tgit ls-remote dst refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote dst refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -131,10 +131,10 @@ test_expect_success 'push to update (allowed)' '\n \t(\n \t\tcd dst &&\n \t\ttest_commit D &&\n-\t\tgit push --force-with-lease=master:master^ origin master\n+\t\tgit push --force-with-lease=main:main^ origin main\n \t) &&\n-\tgit ls-remote dst refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote dst refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -143,11 +143,11 @@ test_expect_success 'push to update (allowed, tracking)' '\n \t(\n \t\tcd dst &&\n \t\ttest_commit D &&\n-\t\tgit push --force-with-lease=master origin master 2>err &&\n+\t\tgit push --force-with-lease=main origin main 2>err &&\n \t\t! grep \"forced update\" err\n \t) &&\n-\tgit ls-remote dst refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote dst refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -157,22 +157,22 @@ test_expect_success 'push to update (allowed even though no-ff)' '\n \t\tcd dst &&\n \t\tgit reset --hard HEAD^ &&\n \t\ttest_commit D &&\n-\t\tgit push --force-with-lease=master origin master 2>err &&\n+\t\tgit push --force-with-lease=main origin main 2>err &&\n \t\tgrep \"forced update\" err\n \t) &&\n-\tgit ls-remote dst refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote dst refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'push to delete (protected)' '\n \tsetup_srcdst_basic &&\n-\tgit ls-remote src refs/heads/master >expect &&\n+\tgit ls-remote src refs/heads/main >expect &&\n \t(\n \t\tcd dst &&\n-\t\ttest_must_fail git push --force-with-lease=master:master^ origin :master\n+\t\ttest_must_fail git push --force-with-lease=main:main^ origin :main\n \t) &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -180,9 +180,9 @@ test_expect_success 'push to delete (protected, forced)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd dst &&\n-\t\tgit push --force --force-with-lease=master:master^ origin :master\n+\t\tgit push --force --force-with-lease=main:main^ origin :main\n \t) &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_must_be_empty actual\n '\n \n@@ -190,10 +190,10 @@ test_expect_success 'push to delete (allowed)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd dst &&\n-\t\tgit push --force-with-lease=master origin :master 2>err &&\n+\t\tgit push --force-with-lease=main origin :main 2>err &&\n \t\tgrep deleted err\n \t) &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_must_be_empty actual\n '\n \n@@ -201,12 +201,12 @@ test_expect_success 'cover everything with default force-with-lease (protected)'\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit branch naster master^\n+\t\tgit branch nain main^\n \t) &&\n \tgit ls-remote src refs/heads/\\* >expect &&\n \t(\n \t\tcd dst &&\n-\t\ttest_must_fail git push --force-with-lease origin master master:naster\n+\t\ttest_must_fail git push --force-with-lease origin main main:nain\n \t) &&\n \tgit ls-remote src refs/heads/\\* >actual &&\n \ttest_cmp expect actual\n@@ -216,16 +216,16 @@ test_expect_success 'cover everything with default force-with-lease (allowed)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit branch naster master^\n+\t\tgit branch nain main^\n \t) &&\n \t(\n \t\tcd dst &&\n \t\tgit fetch &&\n-\t\tgit push --force-with-lease origin master master:naster\n+\t\tgit push --force-with-lease origin main main:nain\n \t) &&\n-\tgit ls-remote dst refs/heads/master |\n-\tsed -e \"s/master/naster/\" >expect &&\n-\tgit ls-remote src refs/heads/naster >actual &&\n+\tgit ls-remote dst refs/heads/main |\n+\tsed -e \"s/main/nain/\" >expect &&\n+\tgit ls-remote src refs/heads/nain >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -233,7 +233,7 @@ test_expect_success 'new branch covered by force-with-lease' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd dst &&\n-\t\tgit branch branch master &&\n+\t\tgit branch branch main &&\n \t\tgit push --force-with-lease=branch origin branch\n \t) &&\n \tgit ls-remote dst refs/heads/branch >expect &&\n@@ -245,7 +245,7 @@ test_expect_success 'new branch covered by force-with-lease (explicit)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd dst &&\n-\t\tgit branch branch master &&\n+\t\tgit branch branch main &&\n \t\tgit push --force-with-lease=branch: origin branch\n \t) &&\n \tgit ls-remote dst refs/heads/branch >expect &&\n@@ -257,12 +257,12 @@ test_expect_success 'new branch already exists' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit checkout -b branch master &&\n+\t\tgit checkout -b branch main &&\n \t\ttest_commit F\n \t) &&\n \t(\n \t\tcd dst &&\n-\t\tgit branch branch master &&\n+\t\tgit branch branch main &&\n \t\ttest_must_fail git push --force-with-lease=branch: origin branch\n \t)\n '\n@@ -277,7 +277,7 @@ test_expect_success 'background updates of REMOTE can be mitigated with a non-up\n \t\tcd dst &&\n \t\ttest_commit G &&\n \t\tgit remote add origin-push ../src.bare &&\n-\t\tgit push origin-push master:master\n+\t\tgit push origin-push main:main\n \t) &&\n \tgit clone --no-local src.bare dst2 &&\n \ttest_when_finished \"rm -rf dst2\" &&\n@@ -299,58 +299,58 @@ test_expect_success 'background updates of REMOTE can be mitigated with a non-up\n test_expect_success 'background updates to remote can be mitigated with \"--force-if-includes\"' '\n \tsetup_src_dup_dst &&\n \ttest_when_finished \"rm -fr dst src dup\" &&\n-\tgit ls-remote dst refs/heads/master >expect.master &&\n+\tgit ls-remote dst refs/heads/main >expect.main &&\n \tgit ls-remote dst refs/heads/branch >expect.branch &&\n \t(\n \t\tcd src &&\n \t\tgit switch branch &&\n \t\ttest_commit I &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit J &&\n \t\tgit fetch --all &&\n \t\ttest_must_fail git push --force-with-lease --force-if-includes --all\n \t) &&\n-\tgit ls-remote dst refs/heads/master >actual.master &&\n+\tgit ls-remote dst refs/heads/main >actual.main &&\n \tgit ls-remote dst refs/heads/branch >actual.branch &&\n-\ttest_cmp expect.master actual.master &&\n+\ttest_cmp expect.main actual.main &&\n \ttest_cmp expect.branch actual.branch\n '\n \n test_expect_success 'background updates to remote can be mitigated with \"push.useForceIfIncludes\"' '\n \tsetup_src_dup_dst &&\n \ttest_when_finished \"rm -fr dst src dup\" &&\n-\tgit ls-remote dst refs/heads/master >expect.master &&\n+\tgit ls-remote dst refs/heads/main >expect.main &&\n \t(\n \t\tcd src &&\n \t\tgit switch branch &&\n \t\ttest_commit I &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit J &&\n \t\tgit fetch --all &&\n \t\tgit config --local push.useForceIfIncludes true &&\n-\t\ttest_must_fail git push --force-with-lease=master origin master\n+\t\ttest_must_fail git push --force-with-lease=main origin main\n \t) &&\n-\tgit ls-remote dst refs/heads/master >actual.master &&\n-\ttest_cmp expect.master actual.master\n+\tgit ls-remote dst refs/heads/main >actual.main &&\n+\ttest_cmp expect.main actual.main\n '\n \n test_expect_success '\"--force-if-includes\" should be disabled for --force-with-lease=\"<refname>:<expect>\"' '\n \tsetup_src_dup_dst &&\n \ttest_when_finished \"rm -fr dst src dup\" &&\n-\tgit ls-remote dst refs/heads/master >expect.master &&\n+\tgit ls-remote dst refs/heads/main >expect.main &&\n \t(\n \t\tcd src &&\n \t\tgit switch branch &&\n \t\ttest_commit I &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit J &&\n-\t\tremote_head=\"$(git rev-parse refs/remotes/origin/master)\" &&\n+\t\tremote_head=\"$(git rev-parse refs/remotes/origin/main)\" &&\n \t\tgit fetch --all &&\n-\t\ttest_must_fail git push --force-if-includes --force-with-lease=\"master:$remote_head\" 2>err &&\n+\t\ttest_must_fail git push --force-if-includes --force-with-lease=\"main:$remote_head\" 2>err &&\n \t\tgrep \"stale info\" err\n \t) &&\n-\tgit ls-remote dst refs/heads/master >actual.master &&\n-\ttest_cmp expect.master actual.master\n+\tgit ls-remote dst refs/heads/main >actual.main &&\n+\ttest_cmp expect.main actual.main\n '\n \n test_expect_success '\"--force-if-includes\" should allow forced update after a rebase (\"pull --rebase\")' '\n@@ -360,10 +360,10 @@ test_expect_success '\"--force-if-includes\" should allow forced update after a re\n \t\tcd src &&\n \t\tgit switch branch &&\n \t\ttest_commit I &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit J &&\n-\t\tgit pull --rebase origin master &&\n-\t\tgit push --force-if-includes --force-with-lease=\"master\"\n+\t\tgit pull --rebase origin main &&\n+\t\tgit push --force-if-includes --force-with-lease=\"main\"\n \t)\n '\n \n@@ -374,11 +374,11 @@ test_expect_success '\"--force-if-includes\" should allow forced update after a re\n \t\tcd src &&\n \t\tgit switch branch &&\n \t\ttest_commit I &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit J &&\n-\t\tgit pull --rebase origin master &&\n+\t\tgit pull --rebase origin main &&\n \t\tgit rebase --onto HEAD~4 HEAD~1 &&\n-\t\tgit push --force-if-includes --force-with-lease=\"master\"\n+\t\tgit push --force-if-includes --force-with-lease=\"main\"\n \t)\n '\n \ndiff --git a/t/t5534-push-signed.sh b/t/t5534-push-signed.sh\nindex af0385fb89..0e850a76de 100755\n--- a/t/t5534-push-signed.sh\n+++ b/t/t5534-push-signed.sh\n@@ -9,11 +9,11 @@ prepare_dst () {\n \trm -fr dst &&\n \ttest_create_repo dst &&\n \n-\tgit push dst master:noop master:ff master:noff\n+\tgit push dst main:noop main:ff main:noff\n }\n \n test_expect_success setup '\n-\t# master, ff and noff branches pointing at the same commit\n+\t# main, ff and noff branches pointing at the same commit\n \ttest_tick &&\n \tgit commit --allow-empty -m initial &&\n \ndiff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh\nindex a55202d2d3..01071f2306 100755\n--- a/t/t5537-fetch-shallow.sh\n+++ b/t/t5537-fetch-shallow.sh\n@@ -49,7 +49,7 @@ test_expect_success 'fetch from shallow clone' '\n \tcd shallow2 &&\n \tgit fetch &&\n \tgit fsck &&\n-\tgit log --format=%s origin/master >actual &&\n+\tgit log --format=%s origin/main >actual &&\n \ttest_write_lines 5 4 3 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -64,7 +64,7 @@ test_expect_success 'fetch --depth from shallow clone' '\n \tcd shallow2 &&\n \tgit fetch --depth=2 &&\n \tgit fsck &&\n-\tgit log --format=%s origin/master >actual &&\n+\tgit log --format=%s origin/main >actual &&\n \ttest_write_lines 6 5 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -75,7 +75,7 @@ test_expect_success 'fetch --unshallow from shallow clone' '\n \tcd shallow2 &&\n \tgit fetch --unshallow &&\n \tgit fsck &&\n-\tgit log --format=%s origin/master >actual &&\n+\tgit log --format=%s origin/main >actual &&\n \ttest_write_lines 6 5 4 3 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -89,7 +89,7 @@ test_expect_success 'fetch --unshallow from a full clone' '\n \ttest_write_lines 4 3 >expect &&\n \ttest_cmp expect actual &&\n \tgit -c fetch.writeCommitGraph fetch --unshallow &&\n-\tgit log origin/master --format=%s >actual &&\n+\tgit log origin/main --format=%s >actual &&\n \ttest_write_lines 4 3 2 1 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -104,9 +104,9 @@ test_expect_success 'fetch something upstream has but hidden by clients shallow\n \tgit commit -m add-1-back &&\n \t(\n \tcd shallow2 &&\n-\tgit fetch ../.git +refs/heads/master:refs/remotes/top/master &&\n+\tgit fetch ../.git +refs/heads/main:refs/remotes/top/main &&\n \tgit fsck &&\n-\tgit log --format=%s top/master >actual &&\n+\tgit log --format=%s top/main >actual &&\n \ttest_write_lines add-1-back 4 3 >expect &&\n \ttest_cmp expect actual\n \t) &&\n@@ -135,7 +135,7 @@ test_expect_success 'fetch that requires changes in .git/shallow is filtered' '\n test_expect_success 'fetch --update-shallow' '\n \t(\n \tcd shallow &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcommit 7 &&\n \tgit tag -m foo heavy-tag HEAD^ &&\n \tgit tag light-tag HEAD^:tracked\n@@ -146,13 +146,13 @@ test_expect_success 'fetch --update-shallow' '\n \tgit fsck &&\n \tgit for-each-ref --sort=refname --format=\"%(refname)\" >actual.refs &&\n \tcat <<-\\EOF >expect.refs &&\n-\trefs/remotes/shallow/master\n+\trefs/remotes/shallow/main\n \trefs/remotes/shallow/no-shallow\n \trefs/tags/heavy-tag\n \trefs/tags/light-tag\n \tEOF\n \ttest_cmp expect.refs actual.refs &&\n-\tgit log --format=%s shallow/master >actual &&\n+\tgit log --format=%s shallow/main >actual &&\n \ttest_write_lines 7 6 5 4 3 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -161,7 +161,7 @@ test_expect_success 'fetch --update-shallow' '\n test_expect_success 'fetch --update-shallow (with fetch.writeCommitGraph)' '\n \t(\n \tcd shallow &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcommit 8 &&\n \tgit tag -m foo heavy-tag-for-graph HEAD^ &&\n \tgit tag light-tag-for-graph HEAD^:tracked\n@@ -173,7 +173,7 @@ test_expect_success 'fetch --update-shallow (with fetch.writeCommitGraph)' '\n \tgit fsck &&\n \tgit for-each-ref --sort=refname --format=\"%(refname)\" >actual.refs &&\n \tcat <<-EOF >expect.refs &&\n-\trefs/remotes/shallow/master\n+\trefs/remotes/shallow/main\n \trefs/remotes/shallow/no-shallow\n \trefs/tags/heavy-tag\n \trefs/tags/heavy-tag-for-graph\n@@ -181,7 +181,7 @@ test_expect_success 'fetch --update-shallow (with fetch.writeCommitGraph)' '\n \trefs/tags/light-tag-for-graph\n \tEOF\n \ttest_cmp expect.refs actual.refs &&\n-\tgit log --format=%s shallow/master >actual &&\n+\tgit log --format=%s shallow/main >actual &&\n \ttest_write_lines 8 7 6 5 4 3 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -206,7 +206,7 @@ test_expect_success '.git/shallow is edited by repack' '\n \ttest_commit -C shallow-server E &&\n \ttest_commit -C shallow-server D &&\n \td=\"$(git -C shallow-server rev-parse --verify D^0)\" &&\n-\tgit -C shallow-server checkout master &&\n+\tgit -C shallow-server checkout main &&\n \n \tgit clone --depth=1 --no-tags --no-single-branch \\\n \t\t\"file://$PWD/shallow-server\" shallow-client &&\n@@ -244,7 +244,7 @@ test_expect_success 'shallow fetches check connectivity before writing shallow f\n \tgit -C \"$REPO\" config protocol.version 2 &&\n \tgit -C client config protocol.version 2 &&\n \n-\tgit -C client fetch --depth=2 \"$HTTPD_URL/one_time_perl/repo\" master:a_branch &&\n+\tgit -C client fetch --depth=2 \"$HTTPD_URL/one_time_perl/repo\" main:a_branch &&\n \n \t# Craft a situation in which the server sends back an unshallow request\n \t# with an empty packfile. This is done by refetching with a shorter\n@@ -256,7 +256,7 @@ test_expect_success 'shallow fetches check connectivity before writing shallow f\n \t       >\"$HTTPD_ROOT_PATH/one-time-perl\" &&\n \ttest_must_fail env GIT_TEST_SIDEBAND_ALL=0 git -C client \\\n \t\tfetch --depth=1 \"$HTTPD_URL/one_time_perl/repo\" \\\n-\t\tmaster:a_branch &&\n+\t\tmain:a_branch &&\n \n \t# Ensure that the one-time-perl script was used.\n \t! test -e \"$HTTPD_ROOT_PATH/one-time-perl\" &&\ndiff --git a/t/t5538-push-shallow.sh b/t/t5538-push-shallow.sh\nindex ecbf84d21c..9d3e946bf1 100755\n--- a/t/t5538-push-shallow.sh\n+++ b/t/t5538-push-shallow.sh\n@@ -44,9 +44,9 @@ test_expect_success 'push from shallow clone' '\n \t(\n \tcd shallow &&\n \tcommit 5 &&\n-\tgit push ../.git +master:refs/remotes/shallow/master\n+\tgit push ../.git +main:refs/remotes/shallow/main\n \t) &&\n-\tgit log --format=%s shallow/master >actual &&\n+\tgit log --format=%s shallow/main >actual &&\n \tgit fsck &&\n \tcat <<EOF >expect &&\n 5\n@@ -61,10 +61,10 @@ EOF\n test_expect_success 'push from shallow clone, with grafted roots' '\n \t(\n \tcd shallow2 &&\n-\ttest_must_fail git push ../.git +master:refs/remotes/shallow2/master 2>err &&\n-\tgrep \"shallow2/master.*shallow update not allowed\" err\n+\ttest_must_fail git push ../.git +main:refs/remotes/shallow2/main 2>err &&\n+\tgrep \"shallow2/main.*shallow update not allowed\" err\n \t) &&\n-\ttest_must_fail git rev-parse shallow2/master &&\n+\ttest_must_fail git rev-parse shallow2/main &&\n \tgit fsck\n '\n \n@@ -72,9 +72,9 @@ test_expect_success 'add new shallow root with receive.updateshallow on' '\n \ttest_config receive.shallowupdate true &&\n \t(\n \tcd shallow2 &&\n-\tgit push ../.git +master:refs/remotes/shallow2/master\n+\tgit push ../.git +main:refs/remotes/shallow2/main\n \t) &&\n-\tgit log --format=%s shallow2/master >actual &&\n+\tgit log --format=%s shallow2/main >actual &&\n \tgit fsck &&\n \tcat <<EOF >expect &&\n c\n@@ -87,12 +87,12 @@ test_expect_success 'push from shallow to shallow' '\n \t(\n \tcd shallow &&\n \tgit --git-dir=../shallow2/.git config receive.shallowupdate true &&\n-\tgit push ../shallow2/.git +master:refs/remotes/shallow/master &&\n+\tgit push ../shallow2/.git +main:refs/remotes/shallow/main &&\n \tgit --git-dir=../shallow2/.git config receive.shallowupdate false\n \t) &&\n \t(\n \tcd shallow2 &&\n-\tgit log --format=%s shallow/master >actual &&\n+\tgit log --format=%s shallow/main >actual &&\n \tgit fsck &&\n \tcat <<EOF >expect &&\n 5\n@@ -106,10 +106,10 @@ EOF\n test_expect_success 'push from full to shallow' '\n \t! git --git-dir=shallow2/.git cat-file blob $(echo 1|git hash-object --stdin) &&\n \tcommit 1 &&\n-\tgit push shallow2/.git +master:refs/remotes/top/master &&\n+\tgit push shallow2/.git +main:refs/remotes/top/main &&\n \t(\n \tcd shallow2 &&\n-\tgit log --format=%s top/master >actual &&\n+\tgit log --format=%s top/main >actual &&\n \tgit fsck &&\n \tcat <<EOF >expect &&\n 1\ndiff --git a/t/t5539-fetch-http-shallow.sh b/t/t5539-fetch-http-shallow.sh\nindex 82aa99ae87..4397197829 100755\n--- a/t/t5539-fetch-http-shallow.sh\n+++ b/t/t5539-fetch-http-shallow.sh\n@@ -32,7 +32,7 @@ test_expect_success 'clone http repository' '\n \t(\n \tcd clone &&\n \tgit fsck &&\n-\tgit log --format=%s origin/master >actual &&\n+\tgit log --format=%s origin/main >actual &&\n \tcat <<EOF >expect &&\n 7\n 6\n@@ -60,9 +60,9 @@ test_expect_success 'no shallow lines after receiving ACK ready' '\n \t\t\t\trefs/heads/unrelated$i:refs/heads/unrelated$i ||\n \t\t\texit 1\n \t\tdone &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit new &&\n-\t\tgit push  \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" master\n+\t\tgit push  \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" main\n \t) &&\n \t(\n \t\tcd clone &&\n@@ -95,7 +95,7 @@ test_expect_success 'clone shallow since ...' '\n \n test_expect_success 'fetch shallow since ...' '\n \tgit -C shallow11 fetch --shallow-since \"200000000 +0700\" origin &&\n-\tgit -C shallow11 log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C shallow11 log --pretty=tformat:%s origin/main >actual &&\n \tcat >expected <<-\\EOF &&\n \tthree\n \ttwo\n@@ -120,7 +120,7 @@ test_expect_success 'shallow clone exclude tag two' '\n \n test_expect_success 'fetch exclude tag one' '\n \tgit -C shallow12 fetch --shallow-exclude one origin &&\n-\tgit -C shallow12 log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C shallow12 log --pretty=tformat:%s origin/main >actual &&\n \ttest_write_lines three two >expected &&\n \ttest_cmp expected actual\n '\n@@ -136,12 +136,12 @@ test_expect_success 'fetching deepen' '\n \tgit clone --depth 1 $HTTPD_URL/smart/shallow-deepen.git deepen &&\n \tmv \"$HTTPD_DOCUMENT_ROOT_PATH/shallow-deepen.git\" .git &&\n \ttest_commit four &&\n-\tgit -C deepen log --pretty=tformat:%s master >actual &&\n+\tgit -C deepen log --pretty=tformat:%s main >actual &&\n \techo three >expected &&\n \ttest_cmp expected actual &&\n \tmv .git \"$HTTPD_DOCUMENT_ROOT_PATH/shallow-deepen.git\" &&\n \tgit -C deepen fetch --deepen=1 &&\n-\tgit -C deepen log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C deepen log --pretty=tformat:%s origin/main >actual &&\n \tcat >expected <<-\\EOF &&\n \tfour\n \tthree\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex a12a1993d0..ecaa0f36f3 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-4]*|5[0-4]*|55[01]*)\n+[0-4]*|5[0-4]*|55[0-3]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409821","messageId":"40cdd5db8cdbd2aa188d8656965eb1401e50a8bf.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 11/28] t5503: prepare aligned comment for replacing `master` with `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:41Z","receivedAt":"2020-11-12T22:44:32Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn an upcoming commit, we will use `main` as the default branch name in\nt5503 instead of `master`. This will require extra padding in ASCII-art\ncommit graphs, which we hereby add preemptively.\n\nBy doing this preemptively rather than after the commit applying the\nsearch-and-replace, it is more obvious that we caught all aligned\ncomments that are affected by the latter commit.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5503-tagfollow.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t5503-tagfollow.sh b/t/t5503-tagfollow.sh\nindex 6041a4dd32..6dafbe4543 100755\n--- a/t/t5503-tagfollow.sh\n+++ b/t/t5503-tagfollow.sh\n@@ -11,7 +11,7 @@ test_description='test automatic tag following'\n #   L - A ------ O ------ B\n #    \\   \\                 \\\n #     \\   C - origin/cat    \\\n-#      origin/master         master\n+#      origin/master           master\n \n test_expect_success setup '\n \ttest_tick &&\n-- \ngitgitgadget\n\n"},{"id":"409828","messageId":"55b6c04fc0ed3bbdf7e94b955d94227260fe1330.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 10/28] t5[0-4]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:40Z","receivedAt":"2020-11-12T22:44:33Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t5310, which is developed independently of the\ncurrent patch series at the time of writing, we now use `main` as\ndefault branch in t5[0-4]*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t5[0-4]*.sh &&\n\t   git checkout HEAD -- t5310\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5150-request-pull.sh                | 34 ++++++-------\n t/t5304-prune.sh                       |  2 +-\n t/t5305-include-tag.sh                 |  2 +-\n t/t5312-prune-corruption.sh            | 16 +++----\n t/t5317-pack-objects-filter-objects.sh |  2 +-\n t/t5322-pack-objects-sparse.sh         |  2 +-\n t/t5323-pack-redundant.sh              | 66 +++++++++++++-------------\n t/t5400-send-pack.sh                   | 60 +++++++++++------------\n t/t5401-update-hooks.sh                | 24 +++++-----\n t/t5402-post-merge-hook.sh             |  2 +-\n t/t5403-post-checkout-hook.sh          |  6 +--\n t/t5404-tracking-branches.sh           |  8 ++--\n t/t5405-send-pack-rewind.sh            |  6 +--\n t/t5407-post-rewrite-hook.sh           |  2 +-\n t/t5410-receive-pack-alternates.sh     |  4 +-\n t/test-lib.sh                          |  4 +-\n 16 files changed, 120 insertions(+), 120 deletions(-)\n\ndiff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh\nindex c1811ea0f4..4fa71961a6 100755\n--- a/t/t5150-request-pull.sh\n+++ b/t/t5150-request-pull.sh\n@@ -31,13 +31,13 @@ test_expect_success 'setup' '\n \t\ttest_tick &&\n \t\tgit commit -m \"\\\"Thirty days\\\", a reminder of month lengths\" &&\n \t\tgit tag -m \"version 1\" -a initial &&\n-\t\tgit push --tags origin master\n+\t\tgit push --tags origin main\n \t) &&\n \t(\n \t\tcd local &&\n \t\tgit remote add upstream \"$trash_url/upstream.git\" &&\n \t\tgit fetch upstream &&\n-\t\tgit pull upstream master &&\n+\t\tgit pull upstream main &&\n \t\tcat <<-\\EOT >>mnemonic.txt &&\n \t\tOf twyecescore-eightt is but eine,\n \t\tAnd all the remnante be thrycescore-eine.\n@@ -59,7 +59,7 @@ test_expect_success 'setup' '\n \t\tgit commit -a -m \"Adapt to use modern, simpler English\n \n But keep the old version, too, in case some people prefer it.\" &&\n-\t\tgit checkout master\n+\t\tgit checkout main\n \t)\n \n '\n@@ -129,7 +129,7 @@ test_expect_success 'pull request when forgot to push' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n+\t\tgit merge --ff-only main &&\n \t\ttest_must_fail git request-pull initial \"$downstream_url\" \\\n \t\t\t2>../err\n \t) &&\n@@ -145,9 +145,9 @@ test_expect_success 'pull request after push' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n-\t\tgit push origin master:for-upstream &&\n-\t\tgit request-pull initial origin master:for-upstream >../request\n+\t\tgit merge --ff-only main &&\n+\t\tgit push origin main:for-upstream &&\n+\t\tgit request-pull initial origin main:for-upstream >../request\n \t) &&\n \tsed -nf read-request.sed <request >digest &&\n \t{\n@@ -172,9 +172,9 @@ test_expect_success 'request asks HEAD to be pulled' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n-\t\tgit push --tags origin master simplify &&\n-\t\tgit push origin master:for-upstream &&\n+\t\tgit merge --ff-only main &&\n+\t\tgit push --tags origin main simplify &&\n+\t\tgit push origin main:for-upstream &&\n \t\tgit request-pull initial \"$downstream_url\" >../request\n \t) &&\n \tsed -nf read-request.sed <request >digest &&\n@@ -215,7 +215,7 @@ test_expect_success 'pull request format' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n+\t\tgit merge --ff-only main &&\n \t\tgit push origin tags/full &&\n \t\tgit request-pull initial \"$downstream_url\" tags/full >../request\n \t) &&\n@@ -243,9 +243,9 @@ test_expect_success 'request-pull ignores OPTIONS_KEEPDASHDASH poison' '\n \t\tOPTIONS_KEEPDASHDASH=Yes &&\n \t\texport OPTIONS_KEEPDASHDASH &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n-\t\tgit push origin master:for-upstream &&\n-\t\tgit request-pull -- initial \"$downstream_url\" master:for-upstream >../request\n+\t\tgit merge --ff-only main &&\n+\t\tgit push origin main:for-upstream &&\n+\t\tgit request-pull -- initial \"$downstream_url\" main:for-upstream >../request\n \t)\n \n '\n@@ -257,7 +257,7 @@ test_expect_success 'request-pull quotes regex metacharacters properly' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n+\t\tgit merge --ff-only main &&\n \t\tgit tag -mrelease v2.0 &&\n \t\tgit push origin refs/tags/v2.0:refs/tags/v2-0 &&\n \t\ttest_must_fail git request-pull initial \"$downstream_url\" tags/v2.0 \\\n@@ -275,7 +275,7 @@ test_expect_success 'pull request with mismatched object' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n+\t\tgit merge --ff-only main &&\n \t\tgit push origin HEAD:refs/tags/full &&\n \t\ttest_must_fail git request-pull initial \"$downstream_url\" tags/full \\\n \t\t\t2>../err\n@@ -292,7 +292,7 @@ test_expect_success 'pull request with stale object' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n+\t\tgit merge --ff-only main &&\n \t\tgit push origin refs/tags/full &&\n \t\tgit tag -f -m\"Thirty-one days\" full &&\n \t\ttest_must_fail git request-pull initial \"$downstream_url\" tags/full \\\ndiff --git a/t/t5304-prune.sh b/t/t5304-prune.sh\nindex df60f18fb8..7391f95c7e 100755\n--- a/t/t5304-prune.sh\n+++ b/t/t5304-prune.sh\n@@ -119,7 +119,7 @@ test_expect_success 'prune: do not prune detached HEAD with no reflog' '\n test_expect_success 'prune: prune former HEAD after checking out branch' '\n \n \thead_oid=$(git rev-parse HEAD) &&\n-\tgit checkout --quiet master &&\n+\tgit checkout --quiet main &&\n \tgit prune -v >prune_actual &&\n \tgrep \"$head_oid\" prune_actual\n \ndiff --git a/t/t5305-include-tag.sh b/t/t5305-include-tag.sh\nindex a5eca210b8..69233574b8 100755\n--- a/t/t5305-include-tag.sh\n+++ b/t/t5305-include-tag.sh\n@@ -111,7 +111,7 @@ test_expect_success 'check unpacked result (have all objects)' '\n \n test_expect_success 'single-branch clone can transfer tag' '\n \trm -rf clone.git &&\n-\tgit clone --no-local --single-branch -b master . clone.git &&\n+\tgit clone --no-local --single-branch -b main . clone.git &&\n \tgit -C clone.git fsck\n '\n \ndiff --git a/t/t5312-prune-corruption.sh b/t/t5312-prune-corruption.sh\nindex da9d59940d..8ca3823f23 100755\n--- a/t/t5312-prune-corruption.sh\n+++ b/t/t5312-prune-corruption.sh\n@@ -16,7 +16,7 @@ test_expect_success 'disable reflogs' '\n '\n \n test_expect_success 'create history reachable only from a bogus-named ref' '\n-\ttest_tick && git commit --allow-empty -m master &&\n+\ttest_tick && git commit --allow-empty -m main &&\n \tbase=$(git rev-parse HEAD) &&\n \ttest_tick && git commit --allow-empty -m bogus &&\n \tbogus=$(git rev-parse HEAD) &&\n@@ -51,7 +51,7 @@ test_expect_success 'clean up bogus ref' '\n '\n \n # We create two new objects here, \"one\" and \"two\". Our\n-# master branch points to \"two\", which is deleted,\n+# main branch points to \"two\", which is deleted,\n # corrupting the repository. But we'd like to make sure\n # that the otherwise unreachable \"one\" is not pruned\n # (since it is the user's best bet for recovering\n@@ -81,7 +81,7 @@ test_expect_success 'pruning with a corrupted tip does not drop history' '\n test_expect_success 'pack-refs does not silently delete broken loose ref' '\n \tgit pack-refs --all --prune &&\n \techo $missing >expect &&\n-\tgit rev-parse refs/heads/master >actual &&\n+\tgit rev-parse refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -89,25 +89,25 @@ test_expect_success 'pack-refs does not silently delete broken loose ref' '\n # actually pack it, as it is perfectly reasonable to\n # skip processing a broken ref\n test_expect_success 'create packed-refs file with broken ref' '\n-\trm -f .git/refs/heads/master &&\n+\trm -f .git/refs/heads/main &&\n \tcat >.git/packed-refs <<-EOF &&\n-\t$missing refs/heads/master\n+\t$missing refs/heads/main\n \t$recoverable refs/heads/other\n \tEOF\n \techo $missing >expect &&\n-\tgit rev-parse refs/heads/master >actual &&\n+\tgit rev-parse refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'pack-refs does not silently delete broken packed ref' '\n \tgit pack-refs --all --prune &&\n-\tgit rev-parse refs/heads/master >actual &&\n+\tgit rev-parse refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'pack-refs does not drop broken refs during deletion' '\n \tgit update-ref -d refs/heads/other &&\n-\tgit rev-parse refs/heads/master >actual &&\n+\tgit rev-parse refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t5317-pack-objects-filter-objects.sh b/t/t5317-pack-objects-filter-objects.sh\nindex dc0446574b..6ee66d58ce 100755\n--- a/t/t5317-pack-objects-filter-objects.sh\n+++ b/t/t5317-pack-objects-filter-objects.sh\n@@ -382,7 +382,7 @@ test_expect_success 'verify sparse:oid=oid-ish' '\n \tawk -f print_2.awk ls_files_result |\n \tsort >expected &&\n \n-\tgit -C r4 pack-objects --revs --stdout --filter=sparse:oid=master:pattern >filter.pack <<-EOF &&\n+\tgit -C r4 pack-objects --revs --stdout --filter=sparse:oid=main:pattern >filter.pack <<-EOF &&\n \tHEAD\n \tEOF\n \tgit -C r4 index-pack ../filter.pack &&\ndiff --git a/t/t5322-pack-objects-sparse.sh b/t/t5322-pack-objects-sparse.sh\nindex a581eaf529..99bdab0610 100755\n--- a/t/t5322-pack-objects-sparse.sh\n+++ b/t/t5322-pack-objects-sparse.sh\n@@ -18,7 +18,7 @@ test_expect_success 'setup repo' '\n \tgit commit -m \"Initialized trees\" &&\n \tfor i in $(test_seq 1 3)\n \tdo\n-\t\tgit checkout -b topic$i master &&\n+\t\tgit checkout -b topic$i main &&\n \t\techo change-$i >f$i/f$i/data.txt &&\n \t\tgit commit -a -m \"Changed f$i/f$i/data.txt\"\n \tdone &&\ndiff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh\nindex 3903148926..89c8688647 100755\n--- a/t/t5323-pack-redundant.sh\n+++ b/t/t5323-pack-redundant.sh\n@@ -6,7 +6,7 @@\n test_description='Test git pack-redundant\n \n In order to test git-pack-redundant, we will create a number of objects and\n-packs in the repository `master.git`. The relationship between packs (P1-P8)\n+packs in the repository `main.git`. The relationship between packs (P1-P8)\n and objects (T, A-R) is showed in the following chart. Objects of a pack will\n be marked with letter x, while objects of redundant packs will be marked with\n exclamation point, and redundant pack itself will be marked with asterisk.\n@@ -25,7 +25,7 @@ exclamation point, and redundant pack itself will be marked with asterisk.\n     ALL | x x x x x x x x x x x x x x x x x x x\n \n Another repository `shared.git` has unique objects (X-Z), while other objects\n-(marked with letter s) are shared through alt-odb (of `master.git`). The\n+(marked with letter s) are shared through alt-odb (of `main.git`). The\n relationship between packs and objects is as follows:\n \n \t| T A B C D E F G H I J K L M N O P Q R   X Y Z\n@@ -36,7 +36,7 @@ relationship between packs and objects is as follows:\n \n . ./test-lib.sh\n \n-master_repo=master.git\n+main_repo=main.git\n shared_repo=shared.git\n \n # Create commits in <repo> and assign each commit's oid to shell variables\n@@ -69,7 +69,7 @@ create_commits_in () {\n \t\tshift ||\n \t\treturn 1\n \tdone &&\n-\tgit -C \"$repo\" update-ref refs/heads/master $oid\n+\tgit -C \"$repo\" update-ref refs/heads/main $oid\n }\n \n # Create pack in <repo> and assign pack id to variable given in the 2nd argument\n@@ -107,9 +107,9 @@ format_packfiles () {\n \tsort\n }\n \n-test_expect_success 'setup master repo' '\n-\tgit init --bare \"$master_repo\" &&\n-\tcreate_commits_in \"$master_repo\" A B C D E F G H I J K L M N O P Q R\n+test_expect_success 'setup main repo' '\n+\tgit init --bare \"$main_repo\" &&\n+\tcreate_commits_in \"$main_repo\" A B C D E F G H I J K L M N O P Q R\n '\n \n #############################################################################\n@@ -124,8 +124,8 @@ test_expect_success 'setup master repo' '\n #     ALL | x x x x x x x x x x x x x x         x\n #\n #############################################################################\n-test_expect_success 'master: no redundant for pack 1, 2, 3' '\n-\tcreate_pack_in \"$master_repo\" P1 <<-EOF &&\n+test_expect_success 'main: no redundant for pack 1, 2, 3' '\n+\tcreate_pack_in \"$main_repo\" P1 <<-EOF &&\n \t\t$T\n \t\t$A\n \t\t$B\n@@ -135,7 +135,7 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '\n \t\t$F\n \t\t$R\n \t\tEOF\n-\tcreate_pack_in \"$master_repo\" P2 <<-EOF &&\n+\tcreate_pack_in \"$main_repo\" P2 <<-EOF &&\n \t\t$B\n \t\t$C\n \t\t$D\n@@ -144,7 +144,7 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '\n \t\t$H\n \t\t$I\n \t\tEOF\n-\tcreate_pack_in \"$master_repo\" P3 <<-EOF &&\n+\tcreate_pack_in \"$main_repo\" P3 <<-EOF &&\n \t\t$F\n \t\t$I\n \t\t$J\n@@ -153,7 +153,7 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '\n \t\t$M\n \t\tEOF\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tgit pack-redundant --all >out &&\n \t\ttest_must_be_empty out\n \t)\n@@ -173,22 +173,22 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '\n #     ALL | x x x x x x x x x x x x x x x x x   x\n #\n #############################################################################\n-test_expect_success 'master: one of pack-2/pack-3 is redundant' '\n-\tcreate_pack_in \"$master_repo\" P4 <<-EOF &&\n+test_expect_success 'main: one of pack-2/pack-3 is redundant' '\n+\tcreate_pack_in \"$main_repo\" P4 <<-EOF &&\n \t\t$J\n \t\t$K\n \t\t$L\n \t\t$M\n \t\t$P\n \t\tEOF\n-\tcreate_pack_in \"$master_repo\" P5 <<-EOF &&\n+\tcreate_pack_in \"$main_repo\" P5 <<-EOF &&\n \t\t$G\n \t\t$H\n \t\t$N\n \t\t$O\n \t\tEOF\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tcat >expect <<-EOF &&\n \t\t\tP3:$P3\n \t\t\tEOF\n@@ -214,18 +214,18 @@ test_expect_success 'master: one of pack-2/pack-3 is redundant' '\n #     ALL | x x x x x x x x x x x x x x x x x x x\n #\n #############################################################################\n-test_expect_success 'master: pack 2, 4, and 6 are redundant' '\n-\tcreate_pack_in \"$master_repo\" P6 <<-EOF &&\n+test_expect_success 'main: pack 2, 4, and 6 are redundant' '\n+\tcreate_pack_in \"$main_repo\" P6 <<-EOF &&\n \t\t$N\n \t\t$O\n \t\t$Q\n \t\tEOF\n-\tcreate_pack_in \"$master_repo\" P7 <<-EOF &&\n+\tcreate_pack_in \"$main_repo\" P7 <<-EOF &&\n \t\t$P\n \t\t$Q\n \t\tEOF\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tcat >expect <<-EOF &&\n \t\t\tP2:$P2\n \t\t\tP4:$P4\n@@ -254,12 +254,12 @@ test_expect_success 'master: pack 2, 4, and 6 are redundant' '\n #     ALL | x x x x x x x x x x x x x x x x x x x\n #\n #############################################################################\n-test_expect_success 'master: pack-8 (subset of pack-1) is also redundant' '\n-\tcreate_pack_in \"$master_repo\" P8 <<-EOF &&\n+test_expect_success 'main: pack-8 (subset of pack-1) is also redundant' '\n+\tcreate_pack_in \"$main_repo\" P8 <<-EOF &&\n \t\t$A\n \t\tEOF\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tcat >expect <<-EOF &&\n \t\t\tP2:$P2\n \t\t\tP4:$P4\n@@ -272,18 +272,18 @@ test_expect_success 'master: pack-8 (subset of pack-1) is also redundant' '\n \t)\n '\n \n-test_expect_success 'master: clean loose objects' '\n+test_expect_success 'main: clean loose objects' '\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tgit prune-packed &&\n \t\tfind objects -type f | sed -e \"/objects\\/pack\\//d\" >out &&\n \t\ttest_must_be_empty out\n \t)\n '\n \n-test_expect_success 'master: remove redundant packs and pass fsck' '\n+test_expect_success 'main: remove redundant packs and pass fsck' '\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tgit pack-redundant --all | xargs rm &&\n \t\tgit fsck &&\n \t\tgit pack-redundant --all >out &&\n@@ -292,12 +292,12 @@ test_expect_success 'master: remove redundant packs and pass fsck' '\n '\n \n # The following test cases will execute inside `shared.git`, instead of\n-# inside `master.git`.\n+# inside `main.git`.\n test_expect_success 'setup shared.git' '\n-\tgit clone --mirror \"$master_repo\" \"$shared_repo\" &&\n+\tgit clone --mirror \"$main_repo\" \"$shared_repo\" &&\n \t(\n \t\tcd \"$shared_repo\" &&\n-\t\tprintf \"../../$master_repo/objects\\n\" >objects/info/alternates\n+\t\tprintf \"../../$main_repo/objects\\n\" >objects/info/alternates\n \t)\n '\n \n@@ -312,7 +312,7 @@ test_expect_success 'shared: all packs are redundant, but no output without --al\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================= master.git ================\n+#     ================= main.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------+\n #     ----+--------------------------------------             |\n #     P1  | x x x x x x x                       x             |\n@@ -394,7 +394,7 @@ test_expect_success 'shared: no redundant without --alt-odb' '\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================= master.git ================\n+#     ================= main.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------------+\n #     ----+--------------------------------------                   |\n #     P1  | x x x x x x x                       x                   |\n@@ -426,7 +426,7 @@ test_expect_success 'shared: one pack is redundant with --alt-odb' '\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================= master.git ================\n+#     ================= main.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------------+\n #     ----+--------------------------------------                   |\n #     P1  | x x x x x x x                       x                   |\ndiff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh\nindex cc86ef213e..e50ca0d8c6 100755\n--- a/t/t5400-send-pack.sh\n+++ b/t/t5400-send-pack.sh\n@@ -66,20 +66,20 @@ test_expect_success 'pack the destination repository' '\n '\n \n test_expect_success 'refuse pushing rewound head without --force' '\n-\tpushed_head=$(git rev-parse --verify master) &&\n-\tvictim_orig=$(cd victim && git rev-parse --verify master) &&\n-\ttest_must_fail git send-pack ./victim master &&\n-\tvictim_head=$(cd victim && git rev-parse --verify master) &&\n+\tpushed_head=$(git rev-parse --verify main) &&\n+\tvictim_orig=$(cd victim && git rev-parse --verify main) &&\n+\ttest_must_fail git send-pack ./victim main &&\n+\tvictim_head=$(cd victim && git rev-parse --verify main) &&\n \ttest \"$victim_head\" = \"$victim_orig\" &&\n \t# this should update\n-\tgit send-pack --force ./victim master &&\n-\tvictim_head=$(cd victim && git rev-parse --verify master) &&\n+\tgit send-pack --force ./victim main &&\n+\tvictim_head=$(cd victim && git rev-parse --verify main) &&\n \ttest \"$victim_head\" = \"$pushed_head\"\n '\n \n test_expect_success 'push can be used to delete a ref' '\n-\t( cd victim && git branch extra master ) &&\n-\tgit send-pack ./victim :extra master &&\n+\t( cd victim && git branch extra main ) &&\n+\tgit send-pack ./victim :extra main &&\n \t( cd victim &&\n \t  test_must_fail git rev-parse --verify extra )\n '\n@@ -89,9 +89,9 @@ test_expect_success 'refuse deleting push with denyDeletes' '\n \t\tcd victim &&\n \t\ttest_might_fail git branch -D extra &&\n \t\tgit config receive.denyDeletes true &&\n-\t\tgit branch extra master\n+\t\tgit branch extra main\n \t) &&\n-\ttest_must_fail git send-pack ./victim :extra master\n+\ttest_must_fail git send-pack ./victim :extra main\n '\n \n test_expect_success 'cannot override denyDeletes with git -c send-pack' '\n@@ -99,10 +99,10 @@ test_expect_success 'cannot override denyDeletes with git -c send-pack' '\n \t\tcd victim &&\n \t\ttest_might_fail git branch -D extra &&\n \t\tgit config receive.denyDeletes true &&\n-\t\tgit branch extra master\n+\t\tgit branch extra main\n \t) &&\n \ttest_must_fail git -c receive.denyDeletes=false \\\n-\t\t\t\t\tsend-pack ./victim :extra master\n+\t\t\t\t\tsend-pack ./victim :extra main\n '\n \n test_expect_success 'override denyDeletes with git -c receive-pack' '\n@@ -110,11 +110,11 @@ test_expect_success 'override denyDeletes with git -c receive-pack' '\n \t\tcd victim &&\n \t\ttest_might_fail git branch -D extra &&\n \t\tgit config receive.denyDeletes true &&\n-\t\tgit branch extra master\n+\t\tgit branch extra main\n \t) &&\n \tgit send-pack \\\n \t\t--receive-pack=\"git -c receive.denyDeletes=false receive-pack\" \\\n-\t\t./victim :extra master\n+\t\t./victim :extra main\n '\n \n test_expect_success 'denyNonFastforwards trumps --force' '\n@@ -123,9 +123,9 @@ test_expect_success 'denyNonFastforwards trumps --force' '\n \t\ttest_might_fail git branch -D extra &&\n \t\tgit config receive.denyNonFastforwards true\n \t) &&\n-\tvictim_orig=$(cd victim && git rev-parse --verify master) &&\n-\ttest_must_fail git send-pack --force ./victim master^:master &&\n-\tvictim_head=$(cd victim && git rev-parse --verify master) &&\n+\tvictim_orig=$(cd victim && git rev-parse --verify main) &&\n+\ttest_must_fail git send-pack --force ./victim main^:main &&\n+\tvictim_head=$(cd victim && git rev-parse --verify main) &&\n \ttest \"$victim_orig\" = \"$victim_head\"\n '\n \n@@ -210,41 +210,41 @@ rewound_push_setup() {\n \n test_expect_success 'pushing explicit refspecs respects forcing' '\n \trewound_push_setup &&\n-\tparent_orig=$(cd parent && git rev-parse --verify master) &&\n+\tparent_orig=$(cd parent && git rev-parse --verify main) &&\n \t(\n \t\tcd child &&\n \t\ttest_must_fail git send-pack ../parent \\\n-\t\t\trefs/heads/master:refs/heads/master\n+\t\t\trefs/heads/main:refs/heads/main\n \t) &&\n-\tparent_head=$(cd parent && git rev-parse --verify master) &&\n+\tparent_head=$(cd parent && git rev-parse --verify main) &&\n \ttest \"$parent_orig\" = \"$parent_head\" &&\n \t(\n \t\tcd child &&\n \t\tgit send-pack ../parent \\\n-\t\t\t+refs/heads/master:refs/heads/master\n+\t\t\t+refs/heads/main:refs/heads/main\n \t) &&\n-\tparent_head=$(cd parent && git rev-parse --verify master) &&\n-\tchild_head=$(cd child && git rev-parse --verify master) &&\n+\tparent_head=$(cd parent && git rev-parse --verify main) &&\n+\tchild_head=$(cd child && git rev-parse --verify main) &&\n \ttest \"$parent_head\" = \"$child_head\"\n '\n \n test_expect_success 'pushing wildcard refspecs respects forcing' '\n \trewound_push_setup &&\n-\tparent_orig=$(cd parent && git rev-parse --verify master) &&\n+\tparent_orig=$(cd parent && git rev-parse --verify main) &&\n \t(\n \t\tcd child &&\n \t\ttest_must_fail git send-pack ../parent \\\n \t\t\t\"refs/heads/*:refs/heads/*\"\n \t) &&\n-\tparent_head=$(cd parent && git rev-parse --verify master) &&\n+\tparent_head=$(cd parent && git rev-parse --verify main) &&\n \ttest \"$parent_orig\" = \"$parent_head\" &&\n \t(\n \t\tcd child &&\n \t\tgit send-pack ../parent \\\n \t\t\t\"+refs/heads/*:refs/heads/*\"\n \t) &&\n-\tparent_head=$(cd parent && git rev-parse --verify master) &&\n-\tchild_head=$(cd child && git rev-parse --verify master) &&\n+\tparent_head=$(cd parent && git rev-parse --verify main) &&\n+\tchild_head=$(cd child && git rev-parse --verify main) &&\n \ttest \"$parent_head\" = \"$child_head\"\n '\n \n@@ -252,7 +252,7 @@ test_expect_success 'deny pushing to delete current branch' '\n \trewound_push_setup &&\n \t(\n \t\tcd child &&\n-\t\ttest_must_fail git send-pack ../parent :refs/heads/master 2>errs\n+\t\ttest_must_fail git send-pack ../parent :refs/heads/main 2>errs\n \t)\n '\n \n@@ -283,9 +283,9 @@ test_expect_success 'receive-pack de-dupes .have lines' '\n \tlocal=$(git -C fork rev-parse HEAD) &&\n \tshared=$(git -C shared rev-parse only-shared) &&\n \tcat >expect <<-EOF &&\n-\t$local refs/heads/master\n+\t$local refs/heads/main\n \t$local refs/remotes/origin/HEAD\n-\t$local refs/remotes/origin/master\n+\t$local refs/remotes/origin/main\n \t$shared .have\n \tEOF\n \ndiff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh\nindex 956d69f5b1..6012cc8172 100755\n--- a/t/t5401-update-hooks.sh\n+++ b/t/t5401-update-hooks.sh\n@@ -15,11 +15,11 @@ test_expect_success setup '\n \tgit update-index a &&\n \ttree1=$(git write-tree) &&\n \tcommit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&\n-\tgit update-ref refs/heads/master $commit0 &&\n+\tgit update-ref refs/heads/main $commit0 &&\n \tgit update-ref refs/heads/tofail $commit1 &&\n \tgit clone --bare ./. victim.git &&\n \tGIT_DIR=victim.git git update-ref refs/heads/tofail $commit1 &&\n-\tgit update-ref refs/heads/master $commit1 &&\n+\tgit update-ref refs/heads/main $commit1 &&\n \tgit update-ref refs/heads/tofail $commit0\n '\n \n@@ -38,7 +38,7 @@ echo \"$@\" >>$GIT_DIR/update.args\n read x; printf %s \"$x\" >$GIT_DIR/update.stdin\n echo STDOUT update $1\n echo STDERR update $1 >&2\n-test \"$1\" = refs/heads/master || exit\n+test \"$1\" = refs/heads/main || exit\n EOF\n chmod u+x victim.git/hooks/update\n \n@@ -62,11 +62,11 @@ chmod u+x victim.git/hooks/post-update\n \n test_expect_success push '\n \ttest_must_fail git send-pack --force ./victim.git \\\n-\t\tmaster tofail >send.out 2>send.err\n+\t\tmain tofail >send.out 2>send.err\n '\n \n test_expect_success 'updated as expected' '\n-\ttest $(GIT_DIR=victim.git git rev-parse master) = $commit1 &&\n+\ttest $(GIT_DIR=victim.git git rev-parse main) = $commit1 &&\n \ttest $(GIT_DIR=victim.git git rev-parse tofail) = $commit1\n '\n \n@@ -82,24 +82,24 @@ test_expect_success 'hooks ran' '\n '\n \n test_expect_success 'pre-receive hook input' '\n-\t(echo $commit0 $commit1 refs/heads/master &&\n+\t(echo $commit0 $commit1 refs/heads/main &&\n \t echo $commit1 $commit0 refs/heads/tofail\n \t) | test_cmp - victim.git/pre-receive.stdin\n '\n \n test_expect_success 'update hook arguments' '\n-\t(echo refs/heads/master $commit0 $commit1 &&\n+\t(echo refs/heads/main $commit0 $commit1 &&\n \t echo refs/heads/tofail $commit1 $commit0\n \t) | test_cmp - victim.git/update.args\n '\n \n test_expect_success 'post-receive hook input' '\n-\techo $commit0 $commit1 refs/heads/master |\n+\techo $commit0 $commit1 refs/heads/main |\n \ttest_cmp - victim.git/post-receive.stdin\n '\n \n test_expect_success 'post-update hook arguments' '\n-\techo refs/heads/master |\n+\techo refs/heads/main |\n \ttest_cmp - victim.git/post-update.args\n '\n \n@@ -120,8 +120,8 @@ test_expect_success 'send-pack produced no output' '\n cat <<EOF >expect\n remote: STDOUT pre-receive\n remote: STDERR pre-receive\n-remote: STDOUT update refs/heads/master\n-remote: STDERR update refs/heads/master\n+remote: STDOUT update refs/heads/main\n+remote: STDERR update refs/heads/main\n remote: STDOUT update refs/heads/tofail\n remote: STDERR update refs/heads/tofail\n remote: error: hook declined to update refs/heads/tofail\n@@ -143,7 +143,7 @@ test_expect_success 'pre-receive hook that forgets to read its input' '\n \n \tfor v in $(test_seq 100 999)\n \tdo\n-\t\tgit branch branch_$v master || return\n+\t\tgit branch branch_$v main || return\n \tdone &&\n \tgit push ./victim.git \"+refs/heads/*:refs/heads/*\"\n '\ndiff --git a/t/t5402-post-merge-hook.sh b/t/t5402-post-merge-hook.sh\nindex 4aeea8f5b7..26c800e60b 100755\n--- a/t/t5402-post-merge-hook.sh\n+++ b/t/t5402-post-merge-hook.sh\n@@ -15,7 +15,7 @@ test_expect_success setup '\n \tgit update-index a &&\n \ttree1=$(git write-tree) &&\n \tcommit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&\n-\tgit update-ref refs/heads/master $commit0 &&\n+\tgit update-ref refs/heads/main $commit0 &&\n \tgit clone ./. clone1 &&\n \tGIT_DIR=clone1/.git git update-index --add a &&\n \tgit clone ./. clone2 &&\ndiff --git a/t/t5403-post-checkout-hook.sh b/t/t5403-post-checkout-hook.sh\nindex a39b3b5c78..867dec8862 100755\n--- a/t/t5403-post-checkout-hook.sh\n+++ b/t/t5403-post-checkout-hook.sh\n@@ -20,7 +20,7 @@ test_expect_success setup '\n \n test_expect_success 'post-checkout receives the right arguments with HEAD unchanged ' '\n \ttest_when_finished \"rm -f .git/post-checkout.args\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tread old new flag <.git/post-checkout.args &&\n \ttest $old = $new && test $flag = 1\n '\n@@ -41,14 +41,14 @@ test_expect_success 'post-checkout receives the right args with HEAD changed ' '\n \n test_expect_success 'post-checkout receives the right args when not switching branches ' '\n \ttest_when_finished \"rm -f .git/post-checkout.args\" &&\n-\tgit checkout master -- three.t &&\n+\tgit checkout main -- three.t &&\n \tread old new flag <.git/post-checkout.args &&\n \ttest $old = $new && test $flag = 0\n '\n \n test_expect_success 'post-checkout is triggered on rebase' '\n \ttest_when_finished \"rm -f .git/post-checkout.args\" &&\n-\tgit checkout -b rebase-test master &&\n+\tgit checkout -b rebase-test main &&\n \trm -f .git/post-checkout.args &&\n \tgit rebase rebase-on-me &&\n \tread old new flag <.git/post-checkout.args &&\ndiff --git a/t/t5404-tracking-branches.sh b/t/t5404-tracking-branches.sh\nindex 2762f420bc..83751e68d0 100755\n--- a/t/t5404-tracking-branches.sh\n+++ b/t/t5404-tracking-branches.sh\n@@ -30,9 +30,9 @@ test_expect_success 'prepare pushable branches' '\n \tgit checkout -b b2 origin/b2 &&\n \techo aa-b2 >>file &&\n \tgit commit -a -m aa-b2 &&\n-\tgit checkout master &&\n-\techo aa-master >>file &&\n-\tgit commit -a -m aa-master\n+\tgit checkout main &&\n+\techo aa-main >>file &&\n+\tgit commit -a -m aa-main\n '\n \n test_expect_success 'mixed-success push returns error' '\n@@ -40,7 +40,7 @@ test_expect_success 'mixed-success push returns error' '\n '\n \n test_expect_success 'check tracking branches updated correctly after push' '\n-\ttest \"$(git rev-parse origin/master)\" = \"$(git rev-parse master)\"\n+\ttest \"$(git rev-parse origin/main)\" = \"$(git rev-parse main)\"\n '\n \n test_expect_success 'check tracking branches not updated for failed refs' '\ndiff --git a/t/t5405-send-pack-rewind.sh b/t/t5405-send-pack-rewind.sh\nindex 235fb7686a..8792e74682 100755\n--- a/t/t5405-send-pack-rewind.sh\n+++ b/t/t5405-send-pack-rewind.sh\n@@ -13,7 +13,7 @@ test_expect_success setup '\n \tmkdir another && (\n \t\tcd another &&\n \t\tgit init &&\n-\t\tgit fetch --update-head-ok .. master:master\n+\t\tgit fetch --update-head-ok .. main:main\n \t) &&\n \n \t>file2 && git add file2 && test_tick &&\n@@ -25,7 +25,7 @@ test_expect_success 'non forced push should die not segfault' '\n \n \t(\n \t\tcd another &&\n-\t\ttest_must_fail git push .. master:master\n+\t\ttest_must_fail git push .. main:main\n \t)\n \n '\n@@ -34,7 +34,7 @@ test_expect_success 'forced push should succeed' '\n \n \t(\n \t\tcd another &&\n-\t\tgit push .. +master:master\n+\t\tgit push .. +main:main\n \t)\n \n '\ndiff --git a/t/t5407-post-rewrite-hook.sh b/t/t5407-post-rewrite-hook.sh\nindex 80750a817e..27bc159acf 100755\n--- a/t/t5407-post-rewrite-hook.sh\n+++ b/t/t5407-post-rewrite-hook.sh\n@@ -14,7 +14,7 @@ test_expect_success 'setup' '\n \tgit checkout A^0 &&\n \ttest_commit E bar E &&\n \ttest_commit F foo F &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n mkdir .git/hooks\ndiff --git a/t/t5410-receive-pack-alternates.sh b/t/t5410-receive-pack-alternates.sh\nindex f00d0da860..cb6fffe611 100755\n--- a/t/t5410-receive-pack-alternates.sh\n+++ b/t/t5410-receive-pack-alternates.sh\n@@ -7,9 +7,9 @@ test_description='git receive-pack with alternate ref filtering'\n test_expect_success 'setup' '\n \ttest_commit base &&\n \tgit clone -s --bare . fork &&\n-\tgit checkout -b public/branch master &&\n+\tgit checkout -b public/branch main &&\n \ttest_commit public &&\n-\tgit checkout -b private/branch master &&\n+\tgit checkout -b private/branch main &&\n \ttest_commit private\n '\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex b783629348..155bfad454 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,13 +257,13 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-3404|4013)\n+3404|4013|5310)\n \t# Avoid conflicts with patch series that are cooking at the same time\n \t# as the patch series changing the default of `init.defaultBranch`.\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-4]*)\n+[0-4]*|5[0-4]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409827","messageId":"d141e476b18bd0bdc0b559223f1fe242cfa4ea8c.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 08/28] t4*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:38Z","receivedAt":"2020-11-12T22:44:34Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t4013, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in t4*.\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t4*.sh t4211/*.export &&\n\t   git checkout HEAD -- t4013\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t4014-format-patch.sh              | 176 +++++++++++++--------------\n t/t4015-diff-whitespace.sh           |   2 +-\n t/t4017-diff-retval.sh               |   2 +-\n t/t4038-diff-combined.sh             |  14 +--\n t/t4041-diff-submodule-option.sh     |   2 +-\n t/t4048-diff-combined-binary.sh      |  10 +-\n t/t4052-stat-output.sh               |   4 +-\n t/t4056-diff-order.sh                |   2 +-\n t/t4057-diff-combined-paths.sh       |  20 +--\n t/t4061-diff-indent.sh               |  24 ++--\n t/t4066-diff-emit-delay.sh           |   2 +-\n t/t4068-diff-symmetric-merge-base.sh |  48 ++++----\n t/t4103-apply-binary.sh              |  36 +++---\n t/t4108-apply-threeway.sh            |  14 +--\n t/t4121-apply-diffs.sh               |   2 +-\n t/t4122-apply-symlink-inside.sh      |   6 +-\n t/t4150-am.sh                        |  26 ++--\n t/t4200-rerere.sh                    |  20 +--\n t/t4201-shortlog.sh                  |   2 +-\n t/t4202-log.sh                       | 106 ++++++++--------\n t/t4203-mailmap.sh                   |   2 +-\n t/t4204-patch-id.sh                  |  26 ++--\n t/t4207-log-decoration-colors.sh     |   6 +-\n t/t4208-log-magic-pathspec.sh        |   4 +-\n t/t4211/history.export               |   2 +-\n t/t4214-log-graph-octopus.sh         |   2 +-\n t/t4216-log-bloom.sh                 |   4 +-\n t/t4253-am-keep-cr-dos.sh            |  20 +--\n t/t4257-am-interactive.sh            |   2 +-\n t/test-lib.sh                        |   4 +-\n 30 files changed, 295 insertions(+), 295 deletions(-)\n\ndiff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh\nindex c5e5e0da3f..636d028b5d 100755\n--- a/t/t4014-format-patch.sh\n+++ b/t/t4014-format-patch.sh\n@@ -32,11 +32,11 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m \"Side changes #3 with \\\\n backslash-n in it.\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit diff-tree -p C2 >patch &&\n \tgit apply --index <patch &&\n \ttest_tick &&\n-\tgit commit -m \"Master accepts moral equivalent of #2\" &&\n+\tgit commit -m \"Main accepts moral equivalent of #2\" &&\n \n \tgit checkout side &&\n \tgit checkout -b patchid &&\n@@ -56,39 +56,39 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m \"patchid 3\" &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'format-patch --ignore-if-in-upstream' '\n-\tgit format-patch --stdout master..side >patch0 &&\n+\tgit format-patch --stdout main..side >patch0 &&\n \tgrep \"^From \" patch0 >from0 &&\n \ttest_line_count = 3 from0\n '\n \n test_expect_success 'format-patch --ignore-if-in-upstream' '\n \tgit format-patch --stdout \\\n-\t\t--ignore-if-in-upstream master..side >patch1 &&\n+\t\t--ignore-if-in-upstream main..side >patch1 &&\n \tgrep \"^From \" patch1 >from1 &&\n \ttest_line_count = 2 from1\n '\n \n test_expect_success 'format-patch --ignore-if-in-upstream handles tags' '\n \tgit tag -a v1 -m tag side &&\n-\tgit tag -a v2 -m tag master &&\n+\tgit tag -a v2 -m tag main &&\n \tgit format-patch --stdout --ignore-if-in-upstream v2..v1 >patch1 &&\n \tgrep \"^From \" patch1 >from1 &&\n \ttest_line_count = 2 from1\n '\n \n test_expect_success \"format-patch doesn't consider merge commits\" '\n-\tgit checkout -b feature master &&\n+\tgit checkout -b feature main &&\n \techo \"Another line\" >>file &&\n \ttest_tick &&\n \tgit commit -am \"Feature branch change #1\" &&\n \techo \"Yet another line\" >>file &&\n \ttest_tick &&\n \tgit commit -am \"Feature branch change #2\" &&\n-\tgit checkout -b merger master &&\n+\tgit checkout -b merger main &&\n \ttest_tick &&\n \tgit merge --no-ff feature &&\n \tgit format-patch -3 --stdout >patch &&\n@@ -97,16 +97,16 @@ test_expect_success \"format-patch doesn't consider merge commits\" '\n '\n \n test_expect_success 'format-patch result applies' '\n-\tgit checkout -b rebuild-0 master &&\n+\tgit checkout -b rebuild-0 main &&\n \tgit am -3 patch0 &&\n-\tgit rev-list master.. >list &&\n+\tgit rev-list main.. >list &&\n \ttest_line_count = 2 list\n '\n \n test_expect_success 'format-patch --ignore-if-in-upstream result applies' '\n-\tgit checkout -b rebuild-1 master &&\n+\tgit checkout -b rebuild-1 main &&\n \tgit am -3 patch1 &&\n-\tgit rev-list master.. >list &&\n+\tgit rev-list main.. >list &&\n \ttest_line_count = 2 list\n '\n \n@@ -130,7 +130,7 @@ test_expect_success 'extra headers' '\n \" &&\n \tgit config --add format.headers \"Cc: S E Cipient <scipient@example.com>\n \" &&\n-\tgit format-patch --stdout master..side >patch2 &&\n+\tgit format-patch --stdout main..side >patch2 &&\n \tsed -e \"/^\\$/q\" patch2 >hdrs2 &&\n \tgrep \"^To: R E Cipient <rcipient@example.com>\\$\" hdrs2 &&\n \tgrep \"^Cc: S E Cipient <scipient@example.com>\\$\" hdrs2\n@@ -139,7 +139,7 @@ test_expect_success 'extra headers' '\n test_expect_success 'extra headers without newlines' '\n \tgit config --replace-all format.headers \"To: R E Cipient <rcipient@example.com>\" &&\n \tgit config --add format.headers \"Cc: S E Cipient <scipient@example.com>\" &&\n-\tgit format-patch --stdout master..side >patch3 &&\n+\tgit format-patch --stdout main..side >patch3 &&\n \tsed -e \"/^\\$/q\" patch3 >hdrs3 &&\n \tgrep \"^To: R E Cipient <rcipient@example.com>\\$\" hdrs3 &&\n \tgrep \"^Cc: S E Cipient <scipient@example.com>\\$\" hdrs3\n@@ -148,7 +148,7 @@ test_expect_success 'extra headers without newlines' '\n test_expect_success 'extra headers with multiple To:s' '\n \tgit config --replace-all format.headers \"To: R E Cipient <rcipient@example.com>\" &&\n \tgit config --add format.headers \"To: S E Cipient <scipient@example.com>\" &&\n-\tgit format-patch --stdout master..side >patch4 &&\n+\tgit format-patch --stdout main..side >patch4 &&\n \tsed -e \"/^\\$/q\" patch4 >hdrs4 &&\n \tgrep \"^To: R E Cipient <rcipient@example.com>,\\$\" hdrs4 &&\n \tgrep \"^ *S E Cipient <scipient@example.com>\\$\" hdrs4\n@@ -156,7 +156,7 @@ test_expect_success 'extra headers with multiple To:s' '\n \n test_expect_success 'additional command line cc (ascii)' '\n \tgit config --replace-all format.headers \"Cc: R E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --cc=\"S E Cipient <scipient@example.com>\" --stdout master..side >patch5 &&\n+\tgit format-patch --cc=\"S E Cipient <scipient@example.com>\" --stdout main..side >patch5 &&\n \tsed -e \"/^\\$/q\" patch5 >hdrs5 &&\n \tgrep \"^Cc: R E Cipient <rcipient@example.com>,\\$\" hdrs5 &&\n \tgrep \"^ *S E Cipient <scipient@example.com>\\$\" hdrs5\n@@ -164,7 +164,7 @@ test_expect_success 'additional command line cc (ascii)' '\n \n test_expect_failure 'additional command line cc (rfc822)' '\n \tgit config --replace-all format.headers \"Cc: R E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --cc=\"S. E. Cipient <scipient@example.com>\" --stdout master..side >patch5 &&\n+\tgit format-patch --cc=\"S. E. Cipient <scipient@example.com>\" --stdout main..side >patch5 &&\n \tsed -e \"/^\\$/q\" patch5 >hdrs5 &&\n \tgrep \"^Cc: R E Cipient <rcipient@example.com>,\\$\" hdrs5 &&\n \tgrep \"^ *\\\"S. E. Cipient\\\" <scipient@example.com>\\$\" hdrs5\n@@ -172,14 +172,14 @@ test_expect_failure 'additional command line cc (rfc822)' '\n \n test_expect_success 'command line headers' '\n \tgit config --unset-all format.headers &&\n-\tgit format-patch --add-header=\"Cc: R E Cipient <rcipient@example.com>\" --stdout master..side >patch6 &&\n+\tgit format-patch --add-header=\"Cc: R E Cipient <rcipient@example.com>\" --stdout main..side >patch6 &&\n \tsed -e \"/^\\$/q\" patch6 >hdrs6 &&\n \tgrep \"^Cc: R E Cipient <rcipient@example.com>\\$\" hdrs6\n '\n \n test_expect_success 'configuration headers and command line headers' '\n \tgit config --replace-all format.headers \"Cc: R E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --add-header=\"Cc: S E Cipient <scipient@example.com>\" --stdout master..side >patch7 &&\n+\tgit format-patch --add-header=\"Cc: S E Cipient <scipient@example.com>\" --stdout main..side >patch7 &&\n \tsed -e \"/^\\$/q\" patch7 >hdrs7 &&\n \tgrep \"^Cc: R E Cipient <rcipient@example.com>,\\$\" hdrs7 &&\n \tgrep \"^ *S E Cipient <scipient@example.com>\\$\" hdrs7\n@@ -187,40 +187,40 @@ test_expect_success 'configuration headers and command line headers' '\n \n test_expect_success 'command line To: header (ascii)' '\n \tgit config --unset-all format.headers &&\n-\tgit format-patch --to=\"R E Cipient <rcipient@example.com>\" --stdout master..side >patch8 &&\n+\tgit format-patch --to=\"R E Cipient <rcipient@example.com>\" --stdout main..side >patch8 &&\n \tsed -e \"/^\\$/q\" patch8 >hdrs8 &&\n \tgrep \"^To: R E Cipient <rcipient@example.com>\\$\" hdrs8\n '\n \n test_expect_failure 'command line To: header (rfc822)' '\n-\tgit format-patch --to=\"R. E. Cipient <rcipient@example.com>\" --stdout master..side >patch8 &&\n+\tgit format-patch --to=\"R. E. Cipient <rcipient@example.com>\" --stdout main..side >patch8 &&\n \tsed -e \"/^\\$/q\" patch8 >hdrs8 &&\n \tgrep \"^To: \\\"R. E. Cipient\\\" <rcipient@example.com>\\$\" hdrs8\n '\n \n test_expect_failure 'command line To: header (rfc2047)' '\n-\tgit format-patch --to=\"R Ä Cipient <rcipient@example.com>\" --stdout master..side >patch8 &&\n+\tgit format-patch --to=\"R Ä Cipient <rcipient@example.com>\" --stdout main..side >patch8 &&\n \tsed -e \"/^\\$/q\" patch8 >hdrs8 &&\n \tgrep \"^To: =?UTF-8?q?R=20=C3=84=20Cipient?= <rcipient@example.com>\\$\" hdrs8\n '\n \n test_expect_success 'configuration To: header (ascii)' '\n \tgit config format.to \"R E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --stdout master..side >patch9 &&\n+\tgit format-patch --stdout main..side >patch9 &&\n \tsed -e \"/^\\$/q\" patch9 >hdrs9 &&\n \tgrep \"^To: R E Cipient <rcipient@example.com>\\$\" hdrs9\n '\n \n test_expect_failure 'configuration To: header (rfc822)' '\n \tgit config format.to \"R. E. Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --stdout master..side >patch9 &&\n+\tgit format-patch --stdout main..side >patch9 &&\n \tsed -e \"/^\\$/q\" patch9 >hdrs9 &&\n \tgrep \"^To: \\\"R. E. Cipient\\\" <rcipient@example.com>\\$\" hdrs9\n '\n \n test_expect_failure 'configuration To: header (rfc2047)' '\n \tgit config format.to \"R Ä Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --stdout master..side >patch9 &&\n+\tgit format-patch --stdout main..side >patch9 &&\n \tsed -e \"/^\\$/q\" patch9 >hdrs9 &&\n \tgrep \"^To: =?UTF-8?q?R=20=C3=84=20Cipient?= <rcipient@example.com>\\$\" hdrs9\n '\n@@ -234,35 +234,35 @@ check_patch () {\n }\n \n test_expect_success 'format.from=false' '\n-\tgit -c format.from=false format-patch --stdout master..side >patch &&\n+\tgit -c format.from=false format-patch --stdout main..side >patch &&\n \tsed -e \"/^\\$/q\" patch >hdrs &&\n \tcheck_patch patch &&\n \t! grep \"^From: C O Mitter <committer@example.com>\\$\" hdrs\n '\n \n test_expect_success 'format.from=true' '\n-\tgit -c format.from=true format-patch --stdout master..side >patch &&\n+\tgit -c format.from=true format-patch --stdout main..side >patch &&\n \tsed -e \"/^\\$/q\" patch >hdrs &&\n \tcheck_patch hdrs &&\n \tgrep \"^From: C O Mitter <committer@example.com>\\$\" hdrs\n '\n \n test_expect_success 'format.from with address' '\n-\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --stdout master..side >patch &&\n+\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --stdout main..side >patch &&\n \tsed -e \"/^\\$/q\" patch >hdrs &&\n \tcheck_patch hdrs &&\n \tgrep \"^From: F R Om <from@example.com>\\$\" hdrs\n '\n \n test_expect_success '--no-from overrides format.from' '\n-\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --no-from --stdout master..side >patch &&\n+\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --no-from --stdout main..side >patch &&\n \tsed -e \"/^\\$/q\" patch >hdrs &&\n \tcheck_patch hdrs &&\n \t! grep \"^From: F R Om <from@example.com>\\$\" hdrs\n '\n \n test_expect_success '--from overrides format.from' '\n-\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --from --stdout master..side >patch &&\n+\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --from --stdout main..side >patch &&\n \tsed -e \"/^\\$/q\" patch >hdrs &&\n \tcheck_patch hdrs &&\n \t! grep \"^From: F R Om <from@example.com>\\$\" hdrs\n@@ -271,7 +271,7 @@ test_expect_success '--from overrides format.from' '\n test_expect_success '--no-to overrides config.to' '\n \tgit config --replace-all format.to \\\n \t\t\"R E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --no-to --stdout master..side >patch10 &&\n+\tgit format-patch --no-to --stdout main..side >patch10 &&\n \tsed -e \"/^\\$/q\" patch10 >hdrs10 &&\n \tcheck_patch hdrs10 &&\n \t! grep \"^To: R E Cipient <rcipient@example.com>\\$\" hdrs10\n@@ -281,7 +281,7 @@ test_expect_success '--no-to and --to replaces config.to' '\n \tgit config --replace-all format.to \\\n \t\t\"Someone <someone@out.there>\" &&\n \tgit format-patch --no-to --to=\"Someone Else <else@out.there>\" \\\n-\t\t--stdout master..side >patch11 &&\n+\t\t--stdout main..side >patch11 &&\n \tsed -e \"/^\\$/q\" patch11 >hdrs11 &&\n \tcheck_patch hdrs11 &&\n \t! grep \"^To: Someone <someone@out.there>\\$\" hdrs11 &&\n@@ -291,7 +291,7 @@ test_expect_success '--no-to and --to replaces config.to' '\n test_expect_success '--no-cc overrides config.cc' '\n \tgit config --replace-all format.cc \\\n \t\t\"C E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --no-cc --stdout master..side >patch12 &&\n+\tgit format-patch --no-cc --stdout main..side >patch12 &&\n \tsed -e \"/^\\$/q\" patch12 >hdrs12 &&\n \tcheck_patch hdrs12 &&\n \t! grep \"^Cc: C E Cipient <rcipient@example.com>\\$\" hdrs12\n@@ -300,7 +300,7 @@ test_expect_success '--no-cc overrides config.cc' '\n test_expect_success '--no-add-header overrides config.headers' '\n \tgit config --replace-all format.headers \\\n \t\t\"Header1: B E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --no-add-header --stdout master..side >patch13 &&\n+\tgit format-patch --no-add-header --stdout main..side >patch13 &&\n \tsed -e \"/^\\$/q\" patch13 >hdrs13 &&\n \tcheck_patch hdrs13 &&\n \t! grep \"^Header1: B E Cipient <rcipient@example.com>\\$\" hdrs13\n@@ -309,7 +309,7 @@ test_expect_success '--no-add-header overrides config.headers' '\n test_expect_success 'multiple files' '\n \trm -rf patches/ &&\n \tgit checkout side &&\n-\tgit format-patch -o patches/ master &&\n+\tgit format-patch -o patches/ main &&\n \tls patches/0001-Side-changes-1.patch patches/0002-Side-changes-2.patch patches/0003-Side-changes-3-with-n-backslash-n-in-it.patch\n '\n \n@@ -369,7 +369,7 @@ test_expect_success 'filename limit applies only to basename' '\n \n test_expect_success 'reroll count' '\n \trm -fr patches &&\n-\tgit format-patch -o patches --cover-letter --reroll-count 4 master..side >list &&\n+\tgit format-patch -o patches --cover-letter --reroll-count 4 main..side >list &&\n \t! grep -v \"^patches/v4-000[0-3]-\" list &&\n \tsed -n -e \"/^Subject: /p\" $(cat list) >subjects &&\n \t! grep -v \"^Subject: \\[PATCH v4 [0-3]/3\\] \" subjects\n@@ -377,7 +377,7 @@ test_expect_success 'reroll count' '\n \n test_expect_success 'reroll count (-v)' '\n \trm -fr patches &&\n-\tgit format-patch -o patches --cover-letter -v4 master..side >list &&\n+\tgit format-patch -o patches --cover-letter -v4 main..side >list &&\n \t! grep -v \"^patches/v4-000[0-3]-\" list &&\n \tsed -n -e \"/^Subject: /p\" $(cat list) >subjects &&\n \t! grep -v \"^Subject: \\[PATCH v4 [0-3]/3\\] \" subjects\n@@ -413,7 +413,7 @@ EOF\n \n test_expect_success 'no threading' '\n \tgit checkout side &&\n-\tcheck_threading expect.no-threading master\n+\tcheck_threading expect.no-threading main\n '\n \n cat >expect.thread <<EOF\n@@ -430,7 +430,7 @@ References: <0>\n EOF\n \n test_expect_success 'thread' '\n-\tcheck_threading expect.thread --thread master\n+\tcheck_threading expect.thread --thread main\n '\n \n cat >expect.in-reply-to <<EOF\n@@ -450,7 +450,7 @@ EOF\n \n test_expect_success 'thread in-reply-to' '\n \tcheck_threading expect.in-reply-to --in-reply-to=\"<test.message>\" \\\n-\t\t--thread master\n+\t\t--thread main\n '\n \n cat >expect.cover-letter <<EOF\n@@ -471,7 +471,7 @@ References: <0>\n EOF\n \n test_expect_success 'thread cover-letter' '\n-\tcheck_threading expect.cover-letter --cover-letter --thread master\n+\tcheck_threading expect.cover-letter --cover-letter --thread main\n '\n \n cat >expect.cl-irt <<EOF\n@@ -498,12 +498,12 @@ EOF\n \n test_expect_success 'thread cover-letter in-reply-to' '\n \tcheck_threading expect.cl-irt --cover-letter \\\n-\t\t--in-reply-to=\"<test.message>\" --thread master\n+\t\t--in-reply-to=\"<test.message>\" --thread main\n '\n \n test_expect_success 'thread explicit shallow' '\n \tcheck_threading expect.cl-irt --cover-letter \\\n-\t\t--in-reply-to=\"<test.message>\" --thread=shallow master\n+\t\t--in-reply-to=\"<test.message>\" --thread=shallow main\n '\n \n cat >expect.deep <<EOF\n@@ -521,7 +521,7 @@ References: <0>\n EOF\n \n test_expect_success 'thread deep' '\n-\tcheck_threading expect.deep --thread=deep master\n+\tcheck_threading expect.deep --thread=deep main\n '\n \n cat >expect.deep-irt <<EOF\n@@ -544,7 +544,7 @@ EOF\n \n test_expect_success 'thread deep in-reply-to' '\n \tcheck_threading expect.deep-irt  --thread=deep \\\n-\t\t--in-reply-to=\"<test.message>\" master\n+\t\t--in-reply-to=\"<test.message>\" main\n '\n \n cat >expect.deep-cl <<EOF\n@@ -568,7 +568,7 @@ References: <0>\n EOF\n \n test_expect_success 'thread deep cover-letter' '\n-\tcheck_threading expect.deep-cl --cover-letter --thread=deep master\n+\tcheck_threading expect.deep-cl --cover-letter --thread=deep main\n '\n \n cat >expect.deep-cl-irt <<EOF\n@@ -598,27 +598,27 @@ EOF\n \n test_expect_success 'thread deep cover-letter in-reply-to' '\n \tcheck_threading expect.deep-cl-irt --cover-letter \\\n-\t\t--in-reply-to=\"<test.message>\" --thread=deep master\n+\t\t--in-reply-to=\"<test.message>\" --thread=deep main\n '\n \n test_expect_success 'thread via config' '\n \ttest_config format.thread true &&\n-\tcheck_threading expect.thread master\n+\tcheck_threading expect.thread main\n '\n \n test_expect_success 'thread deep via config' '\n \ttest_config format.thread deep &&\n-\tcheck_threading expect.deep master\n+\tcheck_threading expect.deep main\n '\n \n test_expect_success 'thread config + override' '\n \ttest_config format.thread deep &&\n-\tcheck_threading expect.thread --thread master\n+\tcheck_threading expect.thread --thread main\n '\n \n test_expect_success 'thread config + --no-thread' '\n \ttest_config format.thread deep &&\n-\tcheck_threading expect.no-threading --no-thread master\n+\tcheck_threading expect.no-threading --no-thread main\n '\n \n test_expect_success 'excessive subject' '\n@@ -631,7 +631,7 @@ test_expect_success 'excessive subject' '\n \tafter=$(git rev-parse --short $after) &&\n \tgit update-index file &&\n \tgit commit -m \"This is an excessively long subject line for a message due to the habit some projects have of not having a short, one-line subject at the start of the commit message, but rather sticking a whole paragraph right at the start as the only thing in the commit message. It had better not become the filename for the patch.\" &&\n-\tgit format-patch -o patches/ master..side &&\n+\tgit format-patch -o patches/ main..side &&\n \tls patches/0004-This-is-an-excessively-long-subject-line-for-a-messa.patch\n '\n \n@@ -893,13 +893,13 @@ test_expect_success 'options no longer allowed for format-patch' '\n '\n \n test_expect_success 'format-patch --numstat should produce a patch' '\n-\tgit format-patch --numstat --stdout master..side >output &&\n+\tgit format-patch --numstat --stdout main..side >output &&\n \tgrep \"^diff --git a/\" output >diff &&\n \ttest_line_count = 5 diff\n '\n \n test_expect_success 'format-patch -- <path>' '\n-\tgit format-patch master..side -- file 2>error &&\n+\tgit format-patch main..side -- file 2>error &&\n \t! grep \"Use .--\" error\n '\n \n@@ -1673,9 +1673,9 @@ test_expect_success 'cover letter with invalid --cover-from-description and conf\n \ttest_config branch.rebuild-1.description \"config subject\n \n body\" &&\n-\ttest_must_fail git format-patch --cover-letter --cover-from-description garbage master &&\n+\ttest_must_fail git format-patch --cover-letter --cover-from-description garbage main &&\n \ttest_config format.coverFromDescription garbage &&\n-\ttest_must_fail git format-patch --cover-letter master\n+\ttest_must_fail git format-patch --cover-letter main\n '\n \n test_expect_success 'cover letter with format.coverFromDescription = default' '\n@@ -1684,7 +1684,7 @@ test_expect_success 'cover letter with format.coverFromDescription = default' '\n body\" &&\n \ttest_config format.coverFromDescription default &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^config subject$\" actual &&\n@@ -1696,7 +1696,7 @@ test_expect_success 'cover letter with --cover-from-description default' '\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description default master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description default main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^config subject$\" actual &&\n@@ -1709,7 +1709,7 @@ test_expect_success 'cover letter with format.coverFromDescription = none' '\n body\" &&\n \ttest_config format.coverFromDescription none &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \tgrep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1721,7 +1721,7 @@ test_expect_success 'cover letter with --cover-from-description none' '\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description none master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description none main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \tgrep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1734,7 +1734,7 @@ test_expect_success 'cover letter with format.coverFromDescription = message' '\n body\" &&\n \ttest_config format.coverFromDescription message &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^config subject$\" actual &&\n@@ -1746,7 +1746,7 @@ test_expect_success 'cover letter with --cover-from-description message' '\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description message master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description message main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^config subject$\" actual &&\n@@ -1759,7 +1759,7 @@ test_expect_success 'cover letter with format.coverFromDescription = subject' '\n body\" &&\n \ttest_config format.coverFromDescription subject &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] config subject$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1771,7 +1771,7 @@ test_expect_success 'cover letter with --cover-from-description subject' '\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description subject master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description subject main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] config subject$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1784,7 +1784,7 @@ test_expect_success 'cover letter with format.coverFromDescription = auto (short\n body\" &&\n \ttest_config format.coverFromDescription auto &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] config subject$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1796,7 +1796,7 @@ test_expect_success 'cover letter with --cover-from-description auto (short subj\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description auto master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description auto main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] config subject$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1809,7 +1809,7 @@ test_expect_success 'cover letter with format.coverFromDescription = auto (long\n body\" &&\n \ttest_config format.coverFromDescription auto &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^this is a really long first line and it is over 100 characters long which is the threshold for long subjects$\" actual &&\n@@ -1821,7 +1821,7 @@ test_expect_success 'cover letter with --cover-from-description auto (long subje\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description auto master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description auto main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^this is a really long first line and it is over 100 characters long which is the threshold for long subjects$\" actual &&\n@@ -1834,7 +1834,7 @@ test_expect_success 'cover letter with command-line --cover-from-description ove\n body\" &&\n \ttest_config format.coverFromDescription none &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description subject master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description subject main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] config subject$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1844,7 +1844,7 @@ body\" &&\n test_expect_success 'cover letter using branch description (1)' '\n \tgit checkout rebuild-1 &&\n \ttest_config branch.rebuild-1.description hello &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep hello actual\n '\n \n@@ -1858,14 +1858,14 @@ test_expect_success 'cover letter using branch description (2)' '\n test_expect_success 'cover letter using branch description (3)' '\n \tgit checkout rebuild-1 &&\n \ttest_config branch.rebuild-1.description hello &&\n-\tgit format-patch --stdout --cover-letter ^master rebuild-1 >actual &&\n+\tgit format-patch --stdout --cover-letter ^main rebuild-1 >actual &&\n \tgrep hello actual\n '\n \n test_expect_success 'cover letter using branch description (4)' '\n \tgit checkout rebuild-1 &&\n \ttest_config branch.rebuild-1.description hello &&\n-\tgit format-patch --stdout --cover-letter master.. >actual &&\n+\tgit format-patch --stdout --cover-letter main.. >actual &&\n \tgrep hello actual\n '\n \n@@ -1932,8 +1932,8 @@ test_expect_success 'From line has expected format' '\n \n test_expect_success 'format-patch -o with no leading directories' '\n \trm -fr patches &&\n-\tgit format-patch -o patches master..side &&\n-\tcount=$(git rev-list --count master..side) &&\n+\tgit format-patch -o patches main..side &&\n+\tcount=$(git rev-list --count main..side) &&\n \tls patches >list &&\n \ttest_line_count = $count list\n '\n@@ -1941,16 +1941,16 @@ test_expect_success 'format-patch -o with no leading directories' '\n test_expect_success 'format-patch -o with leading existing directories' '\n \trm -rf existing-dir &&\n \tmkdir existing-dir &&\n-\tgit format-patch -o existing-dir/patches master..side &&\n-\tcount=$(git rev-list --count master..side) &&\n+\tgit format-patch -o existing-dir/patches main..side &&\n+\tcount=$(git rev-list --count main..side) &&\n \tls existing-dir/patches >list &&\n \ttest_line_count = $count list\n '\n \n test_expect_success 'format-patch -o with leading non-existing directories' '\n \trm -rf non-existing-dir &&\n-\tgit format-patch -o non-existing-dir/patches master..side &&\n-\tcount=$(git rev-list --count master..side) &&\n+\tgit format-patch -o non-existing-dir/patches main..side &&\n+\tcount=$(git rev-list --count main..side) &&\n \ttest_path_is_dir non-existing-dir &&\n \tls non-existing-dir/patches >list &&\n \ttest_line_count = $count list\n@@ -1959,8 +1959,8 @@ test_expect_success 'format-patch -o with leading non-existing directories' '\n test_expect_success 'format-patch format.outputDirectory option' '\n \ttest_config format.outputDirectory patches &&\n \trm -fr patches &&\n-\tgit format-patch master..side &&\n-\tcount=$(git rev-list --count master..side) &&\n+\tgit format-patch main..side &&\n+\tcount=$(git rev-list --count main..side) &&\n \tls patches >list &&\n \ttest_line_count = $count list\n '\n@@ -1968,7 +1968,7 @@ test_expect_success 'format-patch format.outputDirectory option' '\n test_expect_success 'format-patch -o overrides format.outputDirectory' '\n \ttest_config format.outputDirectory patches &&\n \trm -fr patches patchset &&\n-\tgit format-patch master..side -o patchset &&\n+\tgit format-patch main..side -o patchset &&\n \ttest_path_is_missing patches &&\n \ttest_path_is_dir patchset\n '\n@@ -2065,14 +2065,14 @@ test_expect_success 'format-patch --base errors out when base commit is not ance\n \t#\t  ------------W\n \t#\n \t# If \"format-patch Z..X\" is given, P and Z can not be specified as the base commit\n-\tgit checkout -b topic1 master &&\n+\tgit checkout -b topic1 main &&\n \tgit rev-parse HEAD >commit-id-base &&\n \ttest_commit P &&\n \tgit rev-parse HEAD >commit-id-P &&\n \ttest_commit Z &&\n \tgit rev-parse HEAD >commit-id-Z &&\n \ttest_commit Y &&\n-\tgit checkout -b topic2 master &&\n+\tgit checkout -b topic2 main &&\n \ttest_commit W &&\n \tgit merge topic1 &&\n \ttest_commit X &&\n@@ -2085,7 +2085,7 @@ test_expect_success 'format-patch --base errors out when base commit is not ance\n '\n \n test_expect_success 'format-patch --base=auto' '\n-\tgit checkout -b upstream master &&\n+\tgit checkout -b upstream main &&\n \tgit checkout -b local upstream &&\n \tgit branch --set-upstream-to=upstream &&\n \ttest_commit N1 &&\n@@ -2106,11 +2106,11 @@ test_expect_success 'format-patch errors out when history involves criss-cross'\n \t#  \\ / \\\n \t#   C---M2---E\n \t#\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit A &&\n-\tgit checkout -b xb master &&\n+\tgit checkout -b xb main &&\n \ttest_commit B &&\n-\tgit checkout -b xc master &&\n+\tgit checkout -b xc main &&\n \ttest_commit C &&\n \tgit checkout -b xbc xb -- &&\n \tgit merge xc &&\n@@ -2230,7 +2230,7 @@ test_expect_success 'format-patch --pretty=mboxrd' '\n '\n \n test_expect_success 'interdiff: setup' '\n-\tgit checkout -b boop master &&\n+\tgit checkout -b boop main &&\n \ttest_commit fnorp blorp &&\n \ttest_commit fleep blorp\n '\ndiff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh\nindex 8bdaa0a693..899fad379e 100755\n--- a/t/t4015-diff-whitespace.sh\n+++ b/t/t4015-diff-whitespace.sh\n@@ -883,7 +883,7 @@ test_expect_success 'combined diff with autocrlf conversion' '\n \techo >x goodbye &&\n \tgit commit -m \"the other side\" x &&\n \tgit config core.autocrlf true &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \n \tgit diff >actual.raw &&\n \tsed -e \"1,/^@@@/d\" actual.raw >actual &&\ndiff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh\nindex 95a7ca7070..484d847749 100755\n--- a/t/t4017-diff-retval.sh\n+++ b/t/t4017-diff-retval.sh\n@@ -111,7 +111,7 @@ test_expect_success 'check detects leftover conflict markers' '\n \tgit checkout HEAD^ &&\n \techo binary >>b &&\n \tgit commit -m \"side\" b &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit add b &&\n \ttest_expect_code 2 git --no-pager diff --cached --check >test.out &&\n \ttest 3 = $(grep \"conflict marker\" test.out | wc -l) &&\ndiff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh\nindex 94680836ce..5eb36907c1 100755\n--- a/t/t4038-diff-combined.sh\n+++ b/t/t4038-diff-combined.sh\n@@ -115,7 +115,7 @@ test_expect_success 'check --cc --raw with forty trees' '\n '\n \n test_expect_success 'setup combined ignore spaces' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \t>test &&\n \tgit add test &&\n \tgit commit -m initial &&\n@@ -143,7 +143,7 @@ test_expect_success 'setup combined ignore spaces' '\n \tEOF\n \tgit commit -m \"test other space changes\" -a &&\n \n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttr -d Q <<-\\EOF >test &&\n \teol spaces Q\n \tspace  change\n@@ -404,7 +404,7 @@ test_expect_success 'combine diff missing delete bug' '\n test_expect_success 'combine diff gets tree sorting right' '\n \t# create a directory and a file that sort differently in trees\n \t# versus byte-wise (implied \"/\" sorts after \".\")\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tmkdir foo &&\n \techo base >foo/one &&\n \techo base >foo/two &&\n@@ -414,9 +414,9 @@ test_expect_success 'combine diff gets tree sorting right' '\n \n \t# one side modifies a file in the directory, along with the root\n \t# file...\n-\techo master >foo/one &&\n-\techo master >foo.ext &&\n-\tgit commit -a -m master &&\n+\techo main >foo/one &&\n+\techo main >foo.ext &&\n+\tgit commit -a -m main &&\n \n \t# the other side modifies the other file in the directory\n \tgit checkout -b other HEAD^ &&\n@@ -426,7 +426,7 @@ test_expect_success 'combine diff gets tree sorting right' '\n \t# And now we merge. The files in the subdirectory will resolve cleanly,\n \t# meaning that a combined diff will not find them interesting. But it\n \t# will find the tree itself interesting, because it had to be merged.\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge other &&\n \n \tprintf \"MM\\tfoo\\n\" >expect &&\ndiff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh\nindex f852136585..23701e0e8a 100755\n--- a/t/t4041-diff-submodule-option.sh\n+++ b/t/t4041-diff-submodule-option.sh\n@@ -538,7 +538,7 @@ test_expect_success 'diff --submodule with objects referenced by alternates' '\n \t(cd super &&\n \t\t(cd sub &&\n \t\t\tgit fetch &&\n-\t\t\tgit checkout origin/master\n+\t\t\tgit checkout origin/main\n \t\t) &&\n \t\tgit diff --submodule > ../actual\n \t) &&\ndiff --git a/t/t4048-diff-combined-binary.sh b/t/t4048-diff-combined-binary.sh\nindex 7f9ad9fa3d..f23824c2b6 100755\n--- a/t/t4048-diff-combined-binary.sh\n+++ b/t/t4048-diff-combined-binary.sh\n@@ -14,7 +14,7 @@ test_expect_success 'setup binary merge conflict' '\n \techo threeQ3 | q_to_nul >binary &&\n \tgit commit -a -m three &&\n \tthree=$(git rev-parse --short HEAD:binary) &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \techo resolvedQhooray | q_to_nul >binary &&\n \tgit commit -a -m resolved &&\n \tres=$(git rev-parse --short HEAD:binary)\n@@ -62,14 +62,14 @@ test_expect_success 'diff --cc indicates binary-ness' '\n '\n \n test_expect_success 'setup non-binary with binary attribute' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit one text &&\n \ttest_commit two text &&\n \ttwo=$(git rev-parse --short HEAD:text) &&\n \tgit checkout -b branch-text HEAD^ &&\n \ttest_commit three text &&\n \tthree=$(git rev-parse --short HEAD:text) &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest_commit resolved text &&\n \tres=$(git rev-parse --short HEAD:text) &&\n \techo text -diff >.gitattributes\n@@ -206,11 +206,11 @@ index $three,$two..0000000\n  +THREE\n ++=======\n + TWO\n-++>>>>>>> MASTER\n+++>>>>>>> MAIN\n EOF\n test_expect_success 'diff --cc respects textconv on worktree file' '\n \tgit reset --hard HEAD^ &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit diff >actual &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh\nindex 28c053849a..e747a26cbd 100755\n--- a/t/t4052-stat-output.sh\n+++ b/t/t4052-stat-output.sh\n@@ -353,7 +353,7 @@ cat >expect <<'EOF'\n EOF\n test_expect_success 'merge --stat respects COLUMNS (big change)' '\n \tgit checkout -b branch HEAD^^ &&\n-\tCOLUMNS=100 git merge --stat --no-ff master^ >output &&\n+\tCOLUMNS=100 git merge --stat --no-ff main^ >output &&\n \tgrep \" | \" output >actual &&\n \ttest_cmp expect actual\n '\n@@ -362,7 +362,7 @@ cat >expect <<'EOF'\n  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++\n EOF\n test_expect_success 'merge --stat respects COLUMNS (long filename)' '\n-\tCOLUMNS=100 git merge --stat --no-ff master >output &&\n+\tCOLUMNS=100 git merge --stat --no-ff main >output &&\n \tgrep \" | \" output >actual &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t4056-diff-order.sh b/t/t4056-diff-order.sh\nindex 43dd474a12..07fcee31f4 100755\n--- a/t/t4056-diff-order.sh\n+++ b/t/t4056-diff-order.sh\n@@ -106,7 +106,7 @@ done\n test_expect_success 'setup for testing combine-diff order' '\n \tgit checkout -b tmp HEAD~ &&\n \tcreate_files 3 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge --no-commit -s ours tmp &&\n \tcreate_files 5\n '\ndiff --git a/t/t4057-diff-combined-paths.sh b/t/t4057-diff-combined-paths.sh\nindex 0b78573733..918b86fb63 100755\n--- a/t/t4057-diff-combined-paths.sh\n+++ b/t/t4057-diff-combined-paths.sh\n@@ -24,9 +24,9 @@ test_expect_success 'trivial merge - combine-diff empty' '\n \t\techo $i/2 >>$i.txt\n \tdone &&\n \tgit commit -a -m \"side 2-9\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo 1/2 >1.txt &&\n-\tgit commit -a -m \"master 1\" &&\n+\tgit commit -a -m \"main 1\" &&\n \tgit merge side &&\n \t>diffc.expect &&\n \tdiffc_verify\n@@ -41,19 +41,19 @@ test_expect_success 'only one truly conflicting path' '\n \tdone &&\n \techo \"4side\" >>4.txt &&\n \tgit commit -a -m \"side 2-9 +4\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tfor i in $(test_seq 1 9)\n \tdo\n \t\techo $i/3 >>$i.txt\n \tdone &&\n-\techo \"4master\" >>4.txt &&\n-\tgit commit -a -m \"master 1-9 +4\" &&\n+\techo \"4main\" >>4.txt &&\n+\tgit commit -a -m \"main 1-9 +4\" &&\n \ttest_must_fail git merge side &&\n \tcat <<-\\EOF >4.txt &&\n \t4\n \t4/2\n \t4/3\n-\t4master\n+\t4main\n \t4side\n \tEOF\n \tgit add 4.txt &&\n@@ -69,12 +69,12 @@ test_expect_success 'merge introduces new file' '\n \t\techo $i/4 >>$i.txt\n \tdone &&\n \tgit commit -a -m \"side 5-9\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tfor i in $(test_seq 1 3)\n \tdo\n \t\techo $i/4 >>$i.txt\n \tdone &&\n-\tgit commit -a -m \"master 1-3 +4hello\" &&\n+\tgit commit -a -m \"main 1-3 +4hello\" &&\n \tgit merge side &&\n \techo \"Hello World\" >4hello.txt &&\n \tgit add 4hello.txt &&\n@@ -90,12 +90,12 @@ test_expect_success 'merge removed a file' '\n \t\techo $i/5 >>$i.txt\n \tdone &&\n \tgit commit -a -m \"side 5-9\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tfor i in $(test_seq 1 3)\n \tdo\n \t\techo $i/4 >>$i.txt\n \tdone &&\n-\tgit commit -a -m \"master 1-3\" &&\n+\tgit commit -a -m \"main 1-3\" &&\n \tgit merge side &&\n \tgit rm 4.txt &&\n \tgit commit --amend &&\ndiff --git a/t/t4061-diff-indent.sh b/t/t4061-diff-indent.sh\nindex 0f7a6d97a8..5efdc34d51 100755\n--- a/t/t4061-diff-indent.sh\n+++ b/t/t4061-diff-indent.sh\n@@ -266,7 +266,7 @@ test_expect_success 'diff-index: nice spaces with --indent-heuristic' '\n \tgit reset --soft HEAD~ &&\n \tgit diff-index --indent-heuristic -p old -- spaces.txt >out-diff-index-compacted &&\n \tcompare_diff spaces-compacted-expect out-diff-index-compacted &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-index: nice spaces with diff.indentHeuristic=true' '\n@@ -274,7 +274,7 @@ test_expect_success 'diff-index: nice spaces with diff.indentHeuristic=true' '\n \tgit reset --soft HEAD~ &&\n \tgit -c diff.indentHeuristic=true diff-index -p old -- spaces.txt >out-diff-index-compacted2 &&\n \tcompare_diff spaces-compacted-expect out-diff-index-compacted2 &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-index: ugly spaces with --no-indent-heuristic' '\n@@ -282,7 +282,7 @@ test_expect_success 'diff-index: ugly spaces with --no-indent-heuristic' '\n \tgit reset --soft HEAD~ &&\n \tgit diff-index --no-indent-heuristic -p old -- spaces.txt >out-diff-index &&\n \tcompare_diff spaces-expect out-diff-index &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-index: ugly spaces with diff.indentHeuristic=false' '\n@@ -290,7 +290,7 @@ test_expect_success 'diff-index: ugly spaces with diff.indentHeuristic=false' '\n \tgit reset --soft HEAD~ &&\n \tgit -c diff.indentHeuristic=false diff-index -p old -- spaces.txt >out-diff-index2 &&\n \tcompare_diff spaces-expect out-diff-index2 &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-index: --indent-heuristic overrides config' '\n@@ -298,7 +298,7 @@ test_expect_success 'diff-index: --indent-heuristic overrides config' '\n \tgit reset --soft HEAD~ &&\n \tgit -c diff.indentHeuristic=false diff-index --indent-heuristic -p old -- spaces.txt >out-diff-index-compacted3 &&\n \tcompare_diff spaces-compacted-expect out-diff-index-compacted3 &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-index: --no-indent-heuristic overrides config' '\n@@ -306,7 +306,7 @@ test_expect_success 'diff-index: --no-indent-heuristic overrides config' '\n \tgit reset --soft HEAD~ &&\n \tgit -c diff.indentHeuristic=true diff-index --no-indent-heuristic -p old -- spaces.txt >out-diff-index3 &&\n \tcompare_diff spaces-expect out-diff-index3 &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n # --- diff-files tests ----------------------------------------------------\n@@ -317,7 +317,7 @@ test_expect_success 'diff-files: nice spaces with --indent-heuristic' '\n \tgit diff-files --indent-heuristic -p spaces.txt >out-diff-files-raw &&\n \tgrep -v index out-diff-files-raw >out-diff-files-compacted &&\n \tcompare_diff spaces-compacted-expect out-diff-files-compacted &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-files: nice spaces with diff.indentHeuristic=true' '\n@@ -326,7 +326,7 @@ test_expect_success 'diff-files: nice spaces with diff.indentHeuristic=true' '\n \tgit -c diff.indentHeuristic=true diff-files -p spaces.txt >out-diff-files-raw2 &&\n \tgrep -v index out-diff-files-raw2 >out-diff-files-compacted2 &&\n \tcompare_diff spaces-compacted-expect out-diff-files-compacted2 &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-files: ugly spaces with --no-indent-heuristic' '\n@@ -335,7 +335,7 @@ test_expect_success 'diff-files: ugly spaces with --no-indent-heuristic' '\n \tgit diff-files --no-indent-heuristic -p spaces.txt >out-diff-files-raw &&\n \tgrep -v index out-diff-files-raw >out-diff-files &&\n \tcompare_diff spaces-expect out-diff-files &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-files: ugly spaces with diff.indentHeuristic=false' '\n@@ -344,7 +344,7 @@ test_expect_success 'diff-files: ugly spaces with diff.indentHeuristic=false' '\n \tgit -c diff.indentHeuristic=false diff-files -p spaces.txt >out-diff-files-raw2 &&\n \tgrep -v index out-diff-files-raw2 >out-diff-files &&\n \tcompare_diff spaces-expect out-diff-files &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-files: --indent-heuristic overrides config' '\n@@ -353,7 +353,7 @@ test_expect_success 'diff-files: --indent-heuristic overrides config' '\n \tgit -c diff.indentHeuristic=false diff-files --indent-heuristic -p spaces.txt >out-diff-files-raw3 &&\n \tgrep -v index out-diff-files-raw3 >out-diff-files-compacted &&\n \tcompare_diff spaces-compacted-expect out-diff-files-compacted &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-files: --no-indent-heuristic overrides config' '\n@@ -362,7 +362,7 @@ test_expect_success 'diff-files: --no-indent-heuristic overrides config' '\n \tgit -c diff.indentHeuristic=true diff-files --no-indent-heuristic -p spaces.txt >out-diff-files-raw4 &&\n \tgrep -v index out-diff-files-raw4 >out-diff-files &&\n \tcompare_diff spaces-expect out-diff-files &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_done\ndiff --git a/t/t4066-diff-emit-delay.sh b/t/t4066-diff-emit-delay.sh\nindex 6331f63b12..fcd54fa3eb 100755\n--- a/t/t4066-diff-emit-delay.sh\n+++ b/t/t4066-diff-emit-delay.sh\n@@ -13,7 +13,7 @@ test_expect_success 'set up history with a merge' '\n \ttest_commit B &&\n \tgit checkout -b side HEAD^ &&\n \ttest_commit C &&\n-\tgit merge -m M master &&\n+\tgit merge -m M main &&\n \ttest_commit D\n '\n \ndiff --git a/t/t4068-diff-symmetric-merge-base.sh b/t/t4068-diff-symmetric-merge-base.sh\nindex 03487cc945..ccd4da4fe9 100755\n--- a/t/t4068-diff-symmetric-merge-base.sh\n+++ b/t/t4068-diff-symmetric-merge-base.sh\n@@ -6,10 +6,10 @@ test_description='behavior of diff with symmetric-diff setups and --merge-base'\n \n # build these situations:\n #  - normal merge with one merge base (br1...b2r);\n-#  - criss-cross merge ie 2 merge bases (br1...master);\n-#  - disjoint subgraph (orphan branch, br3...master).\n+#  - criss-cross merge ie 2 merge bases (br1...main);\n+#  - disjoint subgraph (orphan branch, br3...main).\n #\n-#     B---E   <-- master\n+#     B---E   <-- main\n #    / \\ /\n #   A   X\n #    \\ / \\\n@@ -32,9 +32,9 @@ test_expect_success setup '\n \tgit add c &&\n \tgit commit -m C &&\n \tgit tag commit-C &&\n-\tgit merge -m D master &&\n+\tgit merge -m D main &&\n \tgit tag commit-D &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge -m E commit-C &&\n \tgit checkout -b br2 commit-C &&\n \techo f >f &&\n@@ -58,7 +58,7 @@ test_expect_success 'diff with one merge base' '\n # It should have one of those two, which comes out\n # to seven lines.\n test_expect_success 'diff with two merge bases' '\n-\tgit diff br1...master >tmp 2>err &&\n+\tgit diff br1...main >tmp 2>err &&\n \ttest_line_count = 7 tmp &&\n \ttest_line_count = 1 err\n '\n@@ -69,22 +69,22 @@ test_expect_success 'diff with no merge bases' '\n '\n \n test_expect_success 'diff with too many symmetric differences' '\n-\ttest_must_fail git diff br1...master br2...br3 2>err &&\n+\ttest_must_fail git diff br1...main br2...br3 2>err &&\n \ttest_i18ngrep \"usage\" err\n '\n \n test_expect_success 'diff with symmetric difference and extraneous arg' '\n-\ttest_must_fail git diff master br1...master 2>err &&\n+\ttest_must_fail git diff main br1...main 2>err &&\n \ttest_i18ngrep \"usage\" err\n '\n \n test_expect_success 'diff with two ranges' '\n-\ttest_must_fail git diff master br1..master br2..br3 2>err &&\n+\ttest_must_fail git diff main br1..main br2..br3 2>err &&\n \ttest_i18ngrep \"usage\" err\n '\n \n test_expect_success 'diff with ranges and extra arg' '\n-\ttest_must_fail git diff master br1..master commit-D 2>err &&\n+\ttest_must_fail git diff main br1..main commit-D 2>err &&\n \ttest_i18ngrep \"usage\" err\n '\n \n@@ -93,21 +93,21 @@ test_expect_success 'diff --merge-base with no commits' '\n '\n \n test_expect_success 'diff --merge-base with three commits' '\n-\ttest_must_fail git diff --merge-base br1 br2 master 2>err &&\n+\ttest_must_fail git diff --merge-base br1 br2 main 2>err &&\n \ttest_i18ngrep \"usage\" err\n '\n \n for cmd in diff-index diff\n do\n \ttest_expect_success \"$cmd --merge-base with one commit\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit $cmd commit-C >expect &&\n \t\tgit $cmd --merge-base br2 >actual &&\n \t\ttest_cmp expect actual\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with one commit and unstaged changes\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_when_finished git reset --hard &&\n \t\techo unstaged >>c &&\n \t\tgit $cmd commit-C >expect &&\n@@ -116,7 +116,7 @@ do\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with one commit and staged and unstaged changes\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_when_finished git reset --hard &&\n \t\techo staged >>c &&\n \t\tgit add c &&\n@@ -127,7 +127,7 @@ do\n \t'\n \n \ttest_expect_success \"$cmd --merge-base --cached with one commit and staged and unstaged changes\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_when_finished git reset --hard &&\n \t\techo staged >>c &&\n \t\tgit add c &&\n@@ -138,19 +138,19 @@ do\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with non-commit\" '\n-\t\tgit checkout master &&\n-\t\ttest_must_fail git $cmd --merge-base master^{tree} 2>err &&\n+\t\tgit checkout main &&\n+\t\ttest_must_fail git $cmd --merge-base main^{tree} 2>err &&\n \t\ttest_i18ngrep \"fatal: --merge-base only works with commits\" err\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with no merge bases and one commit\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_must_fail git $cmd --merge-base br3 2>err &&\n \t\ttest_i18ngrep \"fatal: no merge base found\" err\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with multiple merge bases and one commit\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_must_fail git $cmd --merge-base br1 2>err &&\n \t\ttest_i18ngrep \"fatal: multiple merge bases found\" err\n \t'\n@@ -159,13 +159,13 @@ done\n for cmd in diff-tree diff\n do\n \ttest_expect_success \"$cmd --merge-base with two commits\" '\n-\t\tgit $cmd commit-C master >expect &&\n-\t\tgit $cmd --merge-base br2 master >actual &&\n+\t\tgit $cmd commit-C main >expect &&\n+\t\tgit $cmd --merge-base br2 main >actual &&\n \t\ttest_cmp expect actual\n \t'\n \n \ttest_expect_success \"$cmd --merge-base commit and non-commit\" '\n-\t\ttest_must_fail git $cmd --merge-base br2 master^{tree} 2>err &&\n+\t\ttest_must_fail git $cmd --merge-base br2 main^{tree} 2>err &&\n \t\ttest_i18ngrep \"fatal: --merge-base only works with commits\" err\n \t'\n \n@@ -175,13 +175,13 @@ do\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with multiple merge bases and two commits\" '\n-\t\ttest_must_fail git $cmd --merge-base master br1 2>err &&\n+\t\ttest_must_fail git $cmd --merge-base main br1 2>err &&\n \t\ttest_i18ngrep \"fatal: multiple merge bases found\" err\n \t'\n done\n \n test_expect_success 'diff-tree --merge-base with one commit' '\n-\ttest_must_fail git diff-tree --merge-base master 2>err &&\n+\ttest_must_fail git diff-tree --merge-base main 2>err &&\n \ttest_i18ngrep \"fatal: --merge-base only works with two commits\" err\n '\n \ndiff --git a/t/t4103-apply-binary.sh b/t/t4103-apply-binary.sh\nindex 1b420e3b5f..b5a68cfe78 100755\n--- a/t/t4103-apply-binary.sh\n+++ b/t/t4103-apply-binary.sh\n@@ -31,64 +31,64 @@ test_expect_success 'setup' '\n \tgit update-index --add --remove file1 file2 file3 file4 &&\n \tgit commit -m \"Second Version\" &&\n \n-\tgit diff-tree -p master binary >B.diff &&\n-\tgit diff-tree -p -C master binary >C.diff &&\n+\tgit diff-tree -p main binary >B.diff &&\n+\tgit diff-tree -p -C main binary >C.diff &&\n \n-\tgit diff-tree -p --binary master binary >BF.diff &&\n-\tgit diff-tree -p --binary -C master binary >CF.diff &&\n+\tgit diff-tree -p --binary main binary >BF.diff &&\n+\tgit diff-tree -p --binary -C main binary >CF.diff &&\n \n-\tgit diff-tree -p --full-index master binary >B-index.diff &&\n-\tgit diff-tree -p -C --full-index master binary >C-index.diff &&\n+\tgit diff-tree -p --full-index main binary >B-index.diff &&\n+\tgit diff-tree -p -C --full-index main binary >C-index.diff &&\n \n-\tgit diff-tree -p --binary --no-prefix master binary -- file3 >B0.diff &&\n+\tgit diff-tree -p --binary --no-prefix main binary -- file3 >B0.diff &&\n \n \tgit init other-repo &&\n \t(\n \t\tcd other-repo &&\n-\t\tgit fetch .. master &&\n+\t\tgit fetch .. main &&\n \t\tgit reset --hard FETCH_HEAD\n \t)\n '\n \n test_expect_success 'stat binary diff -- should not fail.' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t git apply --stat --summary B.diff'\n \n test_expect_success 'stat binary -p0 diff -- should not fail.' '\n-\t git checkout master &&\n+\t git checkout main &&\n \t git apply --stat -p0 B0.diff\n '\n \n test_expect_success 'stat binary diff (copy) -- should not fail.' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t git apply --stat --summary C.diff'\n \n test_expect_success 'check binary diff -- should fail.' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t test_must_fail git apply --check B.diff'\n \n test_expect_success 'check binary diff (copy) -- should fail.' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t test_must_fail git apply --check C.diff'\n \n test_expect_success \\\n \t'check incomplete binary diff with replacement -- should fail.' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git apply --check --allow-binary-replacement B.diff\n '\n \n test_expect_success \\\n     'check incomplete binary diff with replacement (copy) -- should fail.' '\n-\t git checkout master &&\n+\t git checkout main &&\n \t test_must_fail git apply --check --allow-binary-replacement C.diff\n '\n \n test_expect_success 'check binary diff with replacement.' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t git apply --check --allow-binary-replacement BF.diff'\n \n test_expect_success 'check binary diff with replacement (copy).' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t git apply --check --allow-binary-replacement CF.diff'\n \n # Now we start applying them.\n@@ -96,7 +96,7 @@ test_expect_success 'check binary diff with replacement (copy).' \\\n do_reset () {\n \trm -f file? &&\n \tgit reset --hard &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n }\n \n test_expect_success 'apply binary diff -- should fail.' \\\ndiff --git a/t/t4108-apply-threeway.sh b/t/t4108-apply-threeway.sh\nindex d7349ced6b..f073df1792 100755\n--- a/t/t4108-apply-threeway.sh\n+++ b/t/t4108-apply-threeway.sh\n@@ -24,14 +24,14 @@ test_expect_success setup '\n \ttest_tick &&\n \ttest_write_lines 1 two 3 4 5 six 7 >one &&\n \ttest_write_lines 1 two 3 4 5 6 7 >two &&\n-\tgit commit -a -m master &&\n+\tgit commit -a -m main &&\n \n \tgit checkout side &&\n \ttest_write_lines 1 2 3 4 five 6 7 >one &&\n \ttest_write_lines 1 2 3 4 five 6 7 >two &&\n \tgit commit -a -m side &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'apply without --3way' '\n@@ -39,7 +39,7 @@ test_expect_success 'apply without --3way' '\n \n \t# should fail to apply\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git apply --index P.diff &&\n \t# should leave things intact\n \tgit diff-files --exit-code &&\n@@ -52,14 +52,14 @@ test_apply_with_3way () {\n \n \t# The corresponding conflicted merge\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git merge --no-commit side &&\n \tgit ls-files -s >expect.ls &&\n \tprint_sanitized_conflicted_diff >expect.diff &&\n \n \t# should fail to apply\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git apply --index --3way P.diff &&\n \tgit ls-files -s >actual.ls &&\n \tprint_sanitized_conflicted_diff >actual.diff &&\n@@ -86,7 +86,7 @@ test_expect_success 'apply with --3way with rerere enabled' '\n \n \t# The corresponding conflicted merge\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git merge --no-commit side &&\n \n \t# Manually resolve and record the resolution\n@@ -96,7 +96,7 @@ test_expect_success 'apply with --3way with rerere enabled' '\n \n \t# should fail to apply\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git apply --index --3way P.diff &&\n \n \t# but rerere should have replayed the recorded resolution\ndiff --git a/t/t4121-apply-diffs.sh b/t/t4121-apply-diffs.sh\nindex 66368effd5..ff2257fef1 100755\n--- a/t/t4121-apply-diffs.sh\n+++ b/t/t4121-apply-diffs.sh\n@@ -23,7 +23,7 @@ test_expect_success 'setup' \\\n \tgit commit -a -q -m 2 &&\n \techo 9 >>file &&\n \tgit commit -a -q -m 3 &&\n-\tgit checkout master'\n+\tgit checkout main'\n \n test_expect_success \\\n \t'check if contextually independent diffs for the same file apply' \\\ndiff --git a/t/t4122-apply-symlink-inside.sh b/t/t4122-apply-symlink-inside.sh\nindex 4acb3f336e..36562677c4 100755\n--- a/t/t4122-apply-symlink-inside.sh\n+++ b/t/t4122-apply-symlink-inside.sh\n@@ -35,11 +35,11 @@ test_expect_success apply '\n \n test_expect_success 'check result' '\n \n-\tgit diff --exit-code master &&\n-\tgit diff --exit-code --cached master &&\n+\tgit diff --exit-code main &&\n+\tgit diff --exit-code --cached main &&\n \ttest_tick &&\n \tgit commit -m replay &&\n-\tT1=$(git rev-parse \"master^{tree}\") &&\n+\tT1=$(git rev-parse \"main^{tree}\") &&\n \tT2=$(git rev-parse \"HEAD^{tree}\") &&\n \ttest \"z$T1\" = \"z$T2\"\n \ndiff --git a/t/t4150-am.sh b/t/t4150-am.sh\nindex 3ecbef6f8e..2514341522 100755\n--- a/t/t4150-am.sh\n+++ b/t/t4150-am.sh\n@@ -179,8 +179,8 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m \"added another file\" &&\n \n-\tgit format-patch --stdout master >lorem-move.patch &&\n-\tgit format-patch --no-prefix --stdout master >lorem-zero.patch &&\n+\tgit format-patch --stdout main >lorem-move.patch &&\n+\tgit format-patch --no-prefix --stdout main >lorem-zero.patch &&\n \n \tgit checkout -b rename &&\n \tgit mv file renamed &&\n@@ -453,11 +453,11 @@ test_expect_success 'am changes committer and keeps author' '\n \tgit checkout first &&\n \tgit am patch2 &&\n \ttest_path_is_missing .git/rebase-apply &&\n-\ttest \"$(git rev-parse master^^)\" = \"$(git rev-parse HEAD^^)\" &&\n-\tgit diff --exit-code master..HEAD &&\n-\tgit diff --exit-code master^..HEAD^ &&\n-\tcompare author master HEAD &&\n-\tcompare author master^ HEAD^ &&\n+\ttest \"$(git rev-parse main^^)\" = \"$(git rev-parse HEAD^^)\" &&\n+\tgit diff --exit-code main..HEAD &&\n+\tgit diff --exit-code main^..HEAD^ &&\n+\tcompare author main HEAD &&\n+\tcompare author main^ HEAD^ &&\n \ttest \"$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>\" = \\\n \t     \"$(git log -1 --pretty=format:\"%cn <%ce>\" HEAD)\"\n '\n@@ -759,7 +759,7 @@ test_expect_success 'am takes patches from a Pine mailbox' '\n \tgit checkout first &&\n \tcat pine patch1 | git am &&\n \ttest_path_is_missing .git/rebase-apply &&\n-\tgit diff --exit-code master^..HEAD\n+\tgit diff --exit-code main^..HEAD\n '\n \n test_expect_success 'am fails on mail without patch' '\n@@ -1112,21 +1112,21 @@ test_expect_success 'am and .gitattibutes' '\n \t\ttest_commit sixth &&\n \n \t\tgit checkout test &&\n-\t\tgit format-patch --stdout master..HEAD >patches &&\n-\t\tgit reset --hard master &&\n+\t\tgit format-patch --stdout main..HEAD >patches &&\n+\t\tgit reset --hard main &&\n \t\tgit am patches &&\n \t\tgrep \"smudged\" a.txt &&\n \n \t\tgit checkout removal &&\n \t\tgit reset --hard &&\n-\t\tgit format-patch --stdout master..HEAD >patches &&\n-\t\tgit reset --hard master &&\n+\t\tgit format-patch --stdout main..HEAD >patches &&\n+\t\tgit reset --hard main &&\n \t\tgit am patches &&\n \t\tgrep \"clean\" a.txt &&\n \n \t\tgit checkout conflict &&\n \t\tgit reset --hard &&\n-\t\tgit format-patch --stdout master..HEAD >patches &&\n+\t\tgit format-patch --stdout main..HEAD >patches &&\n \t\tgit reset --hard fourth &&\n \t\ttest_must_fail git am -3 patches &&\n \t\tgrep \"<<<<<<<<<<\" a.txt\ndiff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh\nindex b12b43e9e9..a6222b84bb 100755\n--- a/t/t4200-rerere.sh\n+++ b/t/t4200-rerere.sh\n@@ -8,7 +8,7 @@ test_description='git rerere\n ! [fifth] version1\n  ! [first] first\n   ! [fourth] version1\n-   ! [master] initial\n+   ! [main] initial\n     ! [second] prefer first over second\n      ! [third] version2\n ------\n@@ -19,7 +19,7 @@ test_description='git rerere\n     -  [second] prefer first over second\n  +  +  [first] first\n     +  [second^] second\n-++++++ [master] initial\n+++++++ [main] initial\n '\n \n . ./test-lib.sh\n@@ -57,7 +57,7 @@ test_expect_success 'setup' '\n \ttest_tick &&\n \tgit commit -q -a -m first &&\n \n-\tgit checkout -b second master &&\n+\tgit checkout -b second main &&\n \tgit show first:a1 |\n \tsed -e \"s/To die, t/To die! T/\" -e \"s/Some title/Some Title/\" >a1 &&\n \techo \"* END *\" >>a1 &&\n@@ -168,7 +168,7 @@ test_expect_success 'first postimage wins' '\n \n \toldmtimepost=$(test-tool chmtime --get -60 $rr/postimage) &&\n \n-\tgit checkout -b third master &&\n+\tgit checkout -b third main &&\n \tgit show second^:a1 | sed \"s/To die: t/To die! T/\" >a1 &&\n \tgit commit -q -a -m third &&\n \n@@ -580,13 +580,13 @@ test_expect_success 'multiple identical conflicts' '\n test_expect_success 'rerere with unexpected conflict markers does not crash' '\n \tgit reset --hard &&\n \n-\tgit checkout -b branch-1 master &&\n+\tgit checkout -b branch-1 main &&\n \techo \"bar\" >test &&\n \tgit add test &&\n \tgit commit -q -m two &&\n \n \tgit reset --hard &&\n-\tgit checkout -b branch-2 master &&\n+\tgit checkout -b branch-2 main &&\n \techo \"foo\" >test &&\n \tgit add test &&\n \tgit commit -q -a -m one &&\n@@ -601,7 +601,7 @@ test_expect_success 'rerere with unexpected conflict markers does not crash' '\n test_expect_success 'rerere with inner conflict markers' '\n \tgit reset --hard &&\n \n-\tgit checkout -b A master &&\n+\tgit checkout -b A main &&\n \techo \"bar\" >test &&\n \tgit add test &&\n \tgit commit -q -m two &&\n@@ -610,7 +610,7 @@ test_expect_success 'rerere with inner conflict markers' '\n \tgit commit -q -m three &&\n \n \tgit reset --hard &&\n-\tgit checkout -b B master &&\n+\tgit checkout -b B main &&\n \techo \"foo\" >test &&\n \tgit add test &&\n \tgit commit -q -a -m one &&\n@@ -651,11 +651,11 @@ test_expect_success 'setup simple stage 1 handling' '\n \t\tgit add original &&\n \t\tgit commit -m original &&\n \n-\t\tgit checkout -b A master &&\n+\t\tgit checkout -b A main &&\n \t\tgit mv original A &&\n \t\tgit commit -m \"rename to A\" &&\n \n-\t\tgit checkout -b B master &&\n+\t\tgit checkout -b B main &&\n \t\tgit mv original B &&\n \t\tgit commit -m \"rename to B\"\n \t)\ndiff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh\nindex 3d5c4a2086..005fff4c2c 100755\n--- a/t/t4201-shortlog.sh\n+++ b/t/t4201-shortlog.sh\n@@ -191,7 +191,7 @@ test_expect_success 'shortlog with revision pseudo options' '\n '\n \n test_expect_success 'shortlog with --output=<file>' '\n-\tgit shortlog --output=shortlog -1 master >output &&\n+\tgit shortlog --output=shortlog -1 main >output &&\n \ttest_must_be_empty output &&\n \ttest_line_count = 3 shortlog\n '\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex 56d34ed465..93b72ad85e 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -478,7 +478,7 @@ test_expect_success 'set up merge history' '\n \tgit checkout -b side HEAD~4 &&\n \ttest_commit side-1 1 1 &&\n \ttest_commit side-2 2 2 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge side\n '\n \n@@ -541,17 +541,17 @@ test_expect_success 'log --graph with merge with log.graphColors' '\n '\n \n test_expect_success 'log --raw --graph -m with merge' '\n-\tgit log --raw --graph --oneline -m master | head -n 500 >actual &&\n+\tgit log --raw --graph --oneline -m main | head -n 500 >actual &&\n \tgrep \"initial\" actual\n '\n \n test_expect_success 'diff-tree --graph' '\n-\tgit diff-tree --graph master^ | head -n 500 >actual &&\n+\tgit diff-tree --graph main^ | head -n 500 >actual &&\n \tgrep \"one\" actual\n '\n \n cat > expect <<\\EOF\n-*   commit master\n+*   commit main\n |\\  Merge: A B\n | | Author: A U Thor <author@example.com>\n | |\n@@ -567,22 +567,22 @@ cat > expect <<\\EOF\n | |\n | |     side-1\n | |\n-* | commit master~1\n+* | commit main~1\n | | Author: A U Thor <author@example.com>\n | |\n | |     Second\n | |\n-* | commit master~2\n+* | commit main~2\n | | Author: A U Thor <author@example.com>\n | |\n | |     sixth\n | |\n-* | commit master~3\n+* | commit main~3\n | | Author: A U Thor <author@example.com>\n | |\n | |     fifth\n | |\n-* | commit master~4\n+* | commit main~4\n |/  Author: A U Thor <author@example.com>\n |\n |       fourth\n@@ -613,19 +613,19 @@ test_expect_success 'log --graph with full output' '\n test_expect_success 'set up more tangled history' '\n \tgit checkout -b tangle HEAD~6 &&\n \ttest_commit tangle-a tangle-a a &&\n-\tgit merge master~3 &&\n+\tgit merge main~3 &&\n \tgit merge side~1 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge tangle &&\n \tgit checkout -b reach &&\n \ttest_commit reach &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -b octopus-a &&\n \ttest_commit octopus-a &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -b octopus-b &&\n \ttest_commit octopus-b &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit seventh &&\n \tgit merge octopus-a octopus-b &&\n \tgit merge reach\n@@ -650,7 +650,7 @@ cat > expect <<\\EOF\n |\\\n | *   Merge branch 'side' (early part) into tangle\n | |\\\n-| * \\   Merge branch 'master' (early part) into tangle\n+| * \\   Merge branch 'main' (early part) into tangle\n | |\\ \\\n | * | | tangle-a\n * | | |   Merge branch 'side'\n@@ -794,7 +794,7 @@ test_expect_success 'multiple decorate-refs' '\n \n test_expect_success 'decorate-refs-exclude with glob' '\n \tcat >expect.decorate <<-\\EOF &&\n-\tMerge-tag-reach (HEAD -> master)\n+\tMerge-tag-reach (HEAD -> main)\n \tMerge-tags-octopus-a-and-octopus-b\n \tseventh (tag: seventh)\n \toctopus-b (tag: octopus-b)\n@@ -811,7 +811,7 @@ test_expect_success 'decorate-refs-exclude with glob' '\n \n test_expect_success 'decorate-refs-exclude without globs' '\n \tcat >expect.decorate <<-\\EOF &&\n-\tMerge-tag-reach (HEAD -> master)\n+\tMerge-tag-reach (HEAD -> main)\n \tMerge-tags-octopus-a-and-octopus-b\n \tseventh (tag: seventh)\n \toctopus-b (tag: octopus-b, octopus-b)\n@@ -828,7 +828,7 @@ test_expect_success 'decorate-refs-exclude without globs' '\n \n test_expect_success 'multiple decorate-refs-exclude' '\n \tcat >expect.decorate <<-\\EOF &&\n-\tMerge-tag-reach (HEAD -> master)\n+\tMerge-tag-reach (HEAD -> main)\n \tMerge-tags-octopus-a-and-octopus-b\n \tseventh (tag: seventh)\n \toctopus-b (tag: octopus-b)\n@@ -851,7 +851,7 @@ test_expect_success 'multiple decorate-refs-exclude' '\n \n test_expect_success 'decorate-refs and decorate-refs-exclude' '\n \tcat >expect.no-decorate <<-\\EOF &&\n-\tMerge-tag-reach (master)\n+\tMerge-tag-reach (main)\n \tMerge-tags-octopus-a-and-octopus-b\n \tseventh\n \toctopus-b\n@@ -866,7 +866,7 @@ test_expect_success 'decorate-refs and decorate-refs-exclude' '\n \n test_expect_success 'deocrate-refs and log.excludeDecoration' '\n \tcat >expect.decorate <<-\\EOF &&\n-\tMerge-tag-reach (master)\n+\tMerge-tag-reach (main)\n \tMerge-tags-octopus-a-and-octopus-b\n \tseventh\n \toctopus-b (octopus-b)\n@@ -881,7 +881,7 @@ test_expect_success 'deocrate-refs and log.excludeDecoration' '\n \n test_expect_success 'decorate-refs-exclude and simplify-by-decoration' '\n \tcat >expect.decorate <<-\\EOF &&\n-\tMerge-tag-reach (HEAD -> master)\n+\tMerge-tag-reach (HEAD -> main)\n \treach (tag: reach, reach)\n \tseventh (tag: seventh)\n \tMerge-branch-tangle\n@@ -1080,7 +1080,7 @@ cat >expect <<\\EOF\n | |\\ \\  Merge: MERGE_PARENTS\n | | | | Author: A U Thor <author@example.com>\n | | | |\n-| | | |     Merge branch 'master' (early part) into tangle\n+| | | |     Merge branch 'main' (early part) into tangle\n | | | |\n | * | | commit COMMIT_OBJECT_NAME\n | | | | Author: A U Thor <author@example.com>\n@@ -1355,7 +1355,7 @@ cat >expect <<\\EOF\n *** | |\\ \\  Merge: MERGE_PARENTS\n *** | | | | Author: A U Thor <author@example.com>\n *** | | | |\n-*** | | | |     Merge branch 'master' (early part) into tangle\n+*** | | | |     Merge branch 'main' (early part) into tangle\n *** | | | |\n *** | * | | commit COMMIT_OBJECT_NAME\n *** | | | | Author: A U Thor <author@example.com>\n@@ -1588,24 +1588,24 @@ test_expect_success 'dotdot is a parent directory' '\n '\n \n test_expect_success GPG 'setup signed branch' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b signed master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b signed main &&\n \techo foo >foo &&\n \tgit add foo &&\n \tgit commit -S -m signed_commit\n '\n \n test_expect_success GPG 'setup signed branch with subkey' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b signed-subkey master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b signed-subkey main &&\n \techo foo >foo &&\n \tgit add foo &&\n \tgit commit -SB7227189 -m signed_commit\n '\n \n test_expect_success GPGSM 'setup signed branch x509' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b signed-x509 master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b signed-x509 main &&\n \techo foo >foo &&\n \tgit add foo &&\n \ttest_config gpg.format x509 &&\n@@ -1638,12 +1638,12 @@ test_expect_success GPGSM 'log --graph --show-signature x509' '\n '\n \n test_expect_success GPG 'log --graph --show-signature for merged tag' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b plain master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b plain main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged master &&\n+\tgit checkout -b tagged main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1657,12 +1657,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag' '\n '\n \n test_expect_success GPG 'log --graph --show-signature for merged tag in shallow clone' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b plain-shallow master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b plain-shallow main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout --detach master &&\n+\tgit checkout --detach main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1677,12 +1677,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag in shallow\n '\n \n test_expect_success GPG 'log --graph --show-signature for merged tag with missing key' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b plain-nokey master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b plain-nokey main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-nokey master &&\n+\tgit checkout -b tagged-nokey main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1696,12 +1696,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag with missin\n '\n \n test_expect_success GPG 'log --graph --show-signature for merged tag with bad signature' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b plain-bad master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b plain-bad main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-bad master &&\n+\tgit checkout -b tagged-bad main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1718,12 +1718,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag with bad si\n '\n \n test_expect_success GPG 'log --show-signature for merged tag with GPG failure' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b plain-fail master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b plain-fail main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-fail master &&\n+\tgit checkout -b tagged-fail main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1737,14 +1737,14 @@ test_expect_success GPG 'log --show-signature for merged tag with GPG failure' '\n '\n \n test_expect_success GPGSM 'log --graph --show-signature for merged tag x509' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \ttest_config gpg.format x509 &&\n \ttest_config user.signingkey $GIT_COMMITTER_EMAIL &&\n-\tgit checkout -b plain-x509 master &&\n+\tgit checkout -b plain-x509 main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-x509 master &&\n+\tgit checkout -b tagged-x509 main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1758,14 +1758,14 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509' '\n '\n \n test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 missing key' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \ttest_config gpg.format x509 &&\n \ttest_config user.signingkey $GIT_COMMITTER_EMAIL &&\n-\tgit checkout -b plain-x509-nokey master &&\n+\tgit checkout -b plain-x509-nokey main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-x509-nokey master &&\n+\tgit checkout -b tagged-x509-nokey main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1778,14 +1778,14 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 miss\n '\n \n test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 bad signature' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \ttest_config gpg.format x509 &&\n \ttest_config user.signingkey $GIT_COMMITTER_EMAIL &&\n-\tgit checkout -b plain-x509-bad master &&\n+\tgit checkout -b plain-x509-bad main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-x509-bad master &&\n+\tgit checkout -b tagged-x509-bad main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1835,7 +1835,7 @@ test_expect_success 'log diagnoses bogus HEAD' '\n \tgit init empty &&\n \ttest_must_fail git -C empty log 2>stderr &&\n \ttest_i18ngrep does.not.have.any.commits stderr &&\n-\techo 1234abcd >empty/.git/refs/heads/master &&\n+\techo 1234abcd >empty/.git/refs/heads/main &&\n \ttest_must_fail git -C empty log 2>stderr &&\n \ttest_i18ngrep broken stderr &&\n \techo \"ref: refs/heads/invalid.lock\" >empty/.git/HEAD &&\ndiff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh\nindex 586c3a86b1..2127b1652d 100755\n--- a/t/t4203-mailmap.sh\n+++ b/t/t4203-mailmap.sh\n@@ -194,7 +194,7 @@ test_expect_success 'No mailmap files, but configured' '\n \n test_expect_success 'setup mailmap blob tests' '\n \tgit checkout -b map &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tcat >just-bugs <<- EOF &&\n \tBlob Guy <bugs@company.xx>\n \tEOF\ndiff --git a/t/t4204-patch-id.sh b/t/t4204-patch-id.sh\nindex 8ff8bd84c7..3808dce5c7 100755\n--- a/t/t4204-patch-id.sh\n+++ b/t/t4204-patch-id.sh\n@@ -13,9 +13,9 @@ test_expect_success 'setup' '\n \ttest_write_lines $as b >foo &&\n \ttest_write_lines $as b >bar &&\n \tgit commit -a -m first &&\n-\tgit checkout -b same master &&\n+\tgit checkout -b same main &&\n \tgit commit --amend -m same-msg &&\n-\tgit checkout -b notsame master &&\n+\tgit checkout -b notsame main &&\n \techo c >foo &&\n \techo c >bar &&\n \tgit commit --amend -a -m notsame-msg &&\n@@ -46,31 +46,31 @@ get_patch_id () {\n }\n \n test_expect_success 'patch-id detects equality' '\n-\tget_patch_id master &&\n+\tget_patch_id main &&\n \tget_patch_id same &&\n-\ttest_cmp patch-id_master patch-id_same\n+\ttest_cmp patch-id_main patch-id_same\n '\n \n test_expect_success 'patch-id detects inequality' '\n-\tget_patch_id master &&\n+\tget_patch_id main &&\n \tget_patch_id notsame &&\n-\t! test_cmp patch-id_master patch-id_notsame\n+\t! test_cmp patch-id_main patch-id_notsame\n '\n \n test_expect_success 'patch-id supports git-format-patch output' '\n-\tget_patch_id master &&\n+\tget_patch_id main &&\n \tgit checkout same &&\n \tgit format-patch -1 --stdout | calc_patch_id same &&\n-\ttest_cmp patch-id_master patch-id_same &&\n+\ttest_cmp patch-id_main patch-id_same &&\n \tset $(git format-patch -1 --stdout | git patch-id) &&\n \ttest \"$2\" = $(git rev-parse HEAD)\n '\n \n test_expect_success 'whitespace is irrelevant in footer' '\n-\tget_patch_id master &&\n+\tget_patch_id main &&\n \tgit checkout same &&\n \tgit format-patch -1 --stdout | sed \"s/ \\$//\" | calc_patch_id same &&\n-\ttest_cmp patch-id_master patch-id_same\n+\ttest_cmp patch-id_main patch-id_same\n '\n \n cmp_patch_id () {\n@@ -88,7 +88,7 @@ test_patch_id_file_order () {\n \tshift\n \tname=\"order-${1}-$relevant\"\n \tshift\n-\tget_top_diff \"master\" | calc_patch_id \"$name\" \"$@\" &&\n+\tget_top_diff \"main\" | calc_patch_id \"$name\" \"$@\" &&\n \tgit checkout same &&\n \tgit format-patch -1 --stdout -O foo-then-bar |\n \t\tcalc_patch_id \"ordered-$name\" \"$@\" &&\n@@ -137,10 +137,10 @@ test_expect_success '--stable overrides patchid.stable = false' '\n '\n \n test_expect_success 'patch-id supports git-format-patch MIME output' '\n-\tget_patch_id master &&\n+\tget_patch_id main &&\n \tgit checkout same &&\n \tgit format-patch -1 --attach --stdout | calc_patch_id same &&\n-\ttest_cmp patch-id_master patch-id_same\n+\ttest_cmp patch-id_main patch-id_same\n '\n \n test_expect_success 'patch-id respects config from subdir' '\ndiff --git a/t/t4207-log-decoration-colors.sh b/t/t4207-log-decoration-colors.sh\nindex 60f040cab8..b6793064dc 100755\n--- a/t/t4207-log-decoration-colors.sh\n+++ b/t/t4207-log-decoration-colors.sh\n@@ -40,13 +40,13 @@ test_expect_success setup '\n \n cat >expected <<EOF\n ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD ->\\\n- ${c_reset}${c_branch}master${c_reset}${c_commit},\\\n+ ${c_reset}${c_branch}main${c_reset}${c_commit},\\\n  ${c_reset}${c_tag}tag: v1.0${c_reset}${c_commit},\\\n  ${c_reset}${c_tag}tag: B${c_reset}${c_commit})${c_reset} B\n ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A1${c_reset}${c_commit},\\\n- ${c_reset}${c_remoteBranch}other/master${c_reset}${c_commit})${c_reset} A1\n+ ${c_reset}${c_remoteBranch}other/main${c_reset}${c_commit})${c_reset} A1\n ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_stash}refs/stash${c_reset}${c_commit})${c_reset}\\\n- On master: Changes to A.t\n+ On main: Changes to A.t\n ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A${c_reset}${c_commit})${c_reset} A\n EOF\n \ndiff --git a/t/t4208-log-magic-pathspec.sh b/t/t4208-log-magic-pathspec.sh\nindex 6cdbe4747a..58b928dbf3 100755\n--- a/t/t4208-log-magic-pathspec.sh\n+++ b/t/t4208-log-magic-pathspec.sh\n@@ -26,7 +26,7 @@ test_expect_success '\"git log :/a -- \" should not be ambiguous' '\n '\n \n test_expect_success '\"git log :/detached -- \" should find a commit only in HEAD' '\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit checkout --detach &&\n \t# Must manually call `test_tick` instead of using `test_commit`,\n \t# because the latter additionally creates a tag, which would make\n@@ -119,7 +119,7 @@ test_expect_success 'command line pathspec parsing for \"git log\"' '\n \tgit checkout HEAD^ &&\n \techo 2 >a &&\n \tgit commit -a -m \"update a to 2\" &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit add a &&\n \tgit log --merge -- a\n '\ndiff --git a/t/t4211/history.export b/t/t4211/history.export\nindex f9f41e211e..006972a1f2 100644\n--- a/t/t4211/history.export\n+++ b/t/t4211/history.export\n@@ -316,7 +316,7 @@ long f(long x)\n \treturn s;\n }\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :19\n author Thomas Rast <trast@student.ethz.ch> 1362045024 +0100\n committer Thomas Rast <trast@student.ethz.ch> 1362045024 +0100\ndiff --git a/t/t4214-log-graph-octopus.sh b/t/t4214-log-graph-octopus.sh\nindex a080325098..d4e07cb0ba 100755\n--- a/t/t4214-log-graph-octopus.sh\n+++ b/t/t4214-log-graph-octopus.sh\n@@ -17,7 +17,7 @@ test_cmp_colored_graph () {\n test_expect_success 'set up merge history' '\n \ttest_commit initial &&\n \tfor i in 1 2 3 4 ; do\n-\t\tgit checkout master -b $i || return $?\n+\t\tgit checkout main -b $i || return $?\n \t\t# Make tag name different from branch name, to avoid\n \t\t# ambiguity error when calling checkout.\n \t\ttest_commit $i $i $i tag$i || return $?\ndiff --git a/t/t4216-log-bloom.sh b/t/t4216-log-bloom.sh\nindex d11040ce41..95a9bae4de 100755\n--- a/t/t4216-log-bloom.sh\n+++ b/t/t4216-log-bloom.sh\n@@ -21,7 +21,7 @@ test_expect_success 'setup test - repo, commits, commit graph, log outputs' '\n \ttest_commit c10 file_to_be_deleted &&\n \tgit checkout -b side HEAD~4 &&\n \ttest_commit side-1 file4 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge side &&\n \ttest_commit c11 file5 &&\n \tmv file5 file5_renamed &&\n@@ -94,7 +94,7 @@ do\n \t\t      \"--topo-order\" \\\n \t\t      \"--date-order\" \\\n \t\t      \"--author-date-order\" \\\n-\t\t      \"--ancestry-path side..master\"\n+\t\t      \"--ancestry-path side..main\"\n \tdo\n \t\ttest_expect_success \"git log option: $option for path: $path\" '\n \t\t\ttest_bloom_filters_used \"$option -- $path\" &&\ndiff --git a/t/t4253-am-keep-cr-dos.sh b/t/t4253-am-keep-cr-dos.sh\nindex 6e1b73ec3a..cf51efa2ee 100755\n--- a/t/t4253-am-keep-cr-dos.sh\n+++ b/t/t4253-am-keep-cr-dos.sh\n@@ -43,7 +43,7 @@ test_expect_success 'setup repository with dos files' '\n \n test_expect_success 'am with dos files without --keep-cr' '\n \tgit checkout -b dosfiles initial &&\n-\tgit format-patch -k initial..master &&\n+\tgit format-patch -k initial..main &&\n \ttest_must_fail git am -k -3 000*.patch &&\n \tgit am --abort &&\n \trm -rf .git/rebase-apply 000*.patch\n@@ -51,23 +51,23 @@ test_expect_success 'am with dos files without --keep-cr' '\n \n test_expect_success 'am with dos files with --keep-cr' '\n \tgit checkout -b dosfiles-keep-cr initial &&\n-\tgit format-patch -k --stdout initial..master >output &&\n+\tgit format-patch -k --stdout initial..main >output &&\n \tgit am --keep-cr -k -3 output &&\n-\tgit diff --exit-code master\n+\tgit diff --exit-code main\n '\n \n test_expect_success 'am with dos files config am.keepcr' '\n \tgit config am.keepcr 1 &&\n \tgit checkout -b dosfiles-conf-keepcr initial &&\n-\tgit format-patch -k --stdout initial..master >output &&\n+\tgit format-patch -k --stdout initial..main >output &&\n \tgit am -k -3 output &&\n-\tgit diff --exit-code master\n+\tgit diff --exit-code main\n '\n \n test_expect_success 'am with dos files config am.keepcr overridden by --no-keep-cr' '\n \tgit config am.keepcr 1 &&\n \tgit checkout -b dosfiles-conf-keepcr-override initial &&\n-\tgit format-patch -k initial..master &&\n+\tgit format-patch -k initial..main &&\n \ttest_must_fail git am -k -3 --no-keep-cr 000*.patch &&\n \tgit am --abort &&\n \trm -rf .git/rebase-apply 000*.patch\n@@ -75,14 +75,14 @@ test_expect_success 'am with dos files config am.keepcr overridden by --no-keep-\n \n test_expect_success 'am with dos files with --keep-cr continue' '\n \tgit checkout -b dosfiles-keep-cr-continue initial &&\n-\tgit format-patch -k initial..master &&\n+\tgit format-patch -k initial..main &&\n \tappend_cr <file1a >file &&\n \tgit commit -m \"different patch\" file &&\n \ttest_must_fail git am --keep-cr -k -3 000*.patch &&\n \tappend_cr <file2 >file &&\n \tgit add file &&\n \tgit am -3 --resolved &&\n-\tgit diff --exit-code master\n+\tgit diff --exit-code main\n '\n \n test_expect_success 'am with unix files config am.keepcr overridden by --no-keep-cr' '\n@@ -90,9 +90,9 @@ test_expect_success 'am with unix files config am.keepcr overridden by --no-keep\n \tgit checkout -b unixfiles-conf-keepcr-override initial &&\n \tcp -f file1 file &&\n \tgit commit -m \"line ending to unix\" file &&\n-\tgit format-patch -k initial..master &&\n+\tgit format-patch -k initial..main &&\n \tgit am -k -3 --no-keep-cr 000*.patch &&\n-\tgit diff --exit-code -w master\n+\tgit diff --exit-code -w main\n '\n \n test_done\ndiff --git a/t/t4257-am-interactive.sh b/t/t4257-am-interactive.sh\nindex 5344bd248a..aed8f4de3d 100755\n--- a/t/t4257-am-interactive.sh\n+++ b/t/t4257-am-interactive.sh\n@@ -10,7 +10,7 @@ test_expect_success 'set up patches to apply' '\n \tgit format-patch --stdout -2 >mbox &&\n \n \tgit reset --hard unrelated &&\n-\ttest_commit conflict-master file master base\n+\ttest_commit conflict-main file main base\n '\n \n # Sanity check our setup.\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 76ab747b53..b783629348 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,13 +257,13 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-3404)\n+3404|4013)\n \t# Avoid conflicts with patch series that are cooking at the same time\n \t# as the patch series changing the default of `init.defaultBranch`.\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-3]*)\n+[0-4]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409830","messageId":"07714a8c6543703f099b83860c369896484c7bff.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 21/28] t7[5-9]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:51Z","receivedAt":"2020-11-12T22:44:36Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nExcluding t7817, which is added in an unrelated patch series at the time\nof writing, this adjusts t7[5-9]*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t7[5-9]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t7501-commit-basic-functionality.sh         |   2 +-\n t/t7502-commit-porcelain.sh                   |  12 +-\n ...3-pre-commit-and-pre-merge-commit-hooks.sh |  42 ++---\n t/t7504-commit-msg-hook.sh                    |  24 +--\n t/t7505-prepare-commit-msg-hook.sh            |  20 +-\n t/t7508-status.sh                             |  58 +++---\n t/t7510-signed-commit.sh                      |   2 +-\n t/t7512-status-help.sh                        |  40 ++--\n t/t7517-per-repo-email.sh                     |  12 +-\n t/t7600-merge.sh                              |  44 ++---\n t/t7606-merge-custom.sh                       |   2 +-\n t/t7608-merge-messages.sh                     |  36 ++--\n t/t7610-mergetool.sh                          | 174 +++++++++---------\n t/t7611-merge-abort.sh                        |   4 +-\n t/t7612-merge-verify-signatures.sh            |   2 +-\n t/t7614-merge-signoff.sh                      |  24 +--\n t/t7701-repack-unpack-unreachable.sh          |   2 +-\n t/t7800-difftool.sh                           |  38 ++--\n t/t7810-grep.sh                               |  28 +--\n t/test-lib.sh                                 |   4 +-\n 20 files changed, 285 insertions(+), 285 deletions(-)\n\ndiff --git a/t/t7501-commit-basic-functionality.sh b/t/t7501-commit-basic-functionality.sh\nindex 110b4bf459..72c9031934 100755\n--- a/t/t7501-commit-basic-functionality.sh\n+++ b/t/t7501-commit-basic-functionality.sh\n@@ -603,7 +603,7 @@ test_expect_success 'same tree (merge and amend merge)' '\n \techo zero >zero &&\n \tgit add zero &&\n \tgit commit -m \"add zero\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit merge -s ours side -m \"empty ok\" &&\n \tgit diff HEAD^ HEAD >actual &&\ndiff --git a/t/t7502-commit-porcelain.sh b/t/t7502-commit-porcelain.sh\nindex 14c92e4c25..3956dcc237 100755\n--- a/t/t7502-commit-porcelain.sh\n+++ b/t/t7502-commit-porcelain.sh\n@@ -76,7 +76,7 @@ test_expect_success 'output summary format for merges' '\n \n output_tests_cleanup() {\n \t# this is needed for \"do not fire editor in the presence of conflicts\"\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \t# this is needed for the \"partial removal\" test to pass\n \tgit rm file1 &&\n@@ -440,7 +440,7 @@ test_expect_success 'do not fire editor in the presence of conflicts' '\n \tgit add g &&\n \tgit commit -m \"add g\" &&\n \tgit branch second &&\n-\techo master >g &&\n+\techo main >g &&\n \techo g >h &&\n \tgit add g h &&\n \tgit commit -m \"modify g and add h\" &&\n@@ -449,7 +449,7 @@ test_expect_success 'do not fire editor in the presence of conflicts' '\n \tgit add g &&\n \tgit commit -m second &&\n \t# Must fail due to conflict\n-\ttest_must_fail git cherry-pick -n master &&\n+\ttest_must_fail git cherry-pick -n main &&\n \techo \"editor not started\" >.git/result &&\n \t(\n \t\tGIT_EDITOR=\"\\\"$(pwd)/.git/FAKE_EDITOR\\\"\" &&\n@@ -478,9 +478,9 @@ git reset -q --hard\n \n test_expect_success 'Hand committing of a redundant merge removes dups' '\n \n-\tgit rev-parse second master >expect &&\n-\ttest_must_fail git merge second master &&\n-\tgit checkout master g &&\n+\tgit rev-parse second main >expect &&\n+\ttest_must_fail git merge second main &&\n+\tgit checkout main g &&\n \tEDITOR=: git commit -a &&\n \tgit cat-file commit HEAD >raw &&\n \tsed -n -e \"s/^parent //p\" -e \"/^$/q\" raw >actual &&\ndiff --git a/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh b/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh\nindex b3485450a2..6ac12726d6 100755\n--- a/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh\n+++ b/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh\n@@ -44,16 +44,16 @@ test_expect_success 'root commit' '\n \tgit add foo &&\n \tgit commit -m \"make it non-ff\" &&\n \tgit branch side-orig side &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'setup conflicting branches' '\n-\ttest_when_finished \"git checkout master\" &&\n-\tgit checkout -b conflicting-a master &&\n+\ttest_when_finished \"git checkout main\" &&\n+\tgit checkout -b conflicting-a main &&\n \techo a >conflicting &&\n \tgit add conflicting &&\n \tgit commit -m conflicting-a &&\n-\tgit checkout -b conflicting-b master &&\n+\tgit checkout -b conflicting-b main &&\n \techo b >conflicting &&\n \tgit add conflicting &&\n \tgit commit -m conflicting-b\n@@ -71,8 +71,8 @@ test_expect_success 'with no hook (merge)' '\n \ttest_when_finished \"rm -f actual_hooks\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \n@@ -88,8 +88,8 @@ test_expect_success '--no-verify with no hook (merge)' '\n \ttest_when_finished \"rm -f actual_hooks\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge --no-verify -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge --no-verify -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \n@@ -108,15 +108,15 @@ test_expect_success 'with succeeding hook (merge)' '\n \tcp \"$HOOKDIR/success.sample\" \"$PREMERGE\" &&\n \techo \"$PREMERGE\" >expected_hooks &&\n \tgit checkout side &&\n-\tgit merge -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_cmp expected_hooks actual_hooks\n '\n \n test_expect_success 'automatic merge fails; both hooks are available' '\n \ttest_when_finished \"rm -f \\\"$PREMERGE\\\" \\\"$PRECOMMIT\\\"\" &&\n \ttest_when_finished \"rm -f expected_hooks actual_hooks\" &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tcp \"$HOOKDIR/success.sample\" \"$PREMERGE\" &&\n \tcp \"$HOOKDIR/success.sample\" \"$PRECOMMIT\" &&\n \n@@ -145,8 +145,8 @@ test_expect_success '--no-verify with succeeding hook (merge)' '\n \tcp \"$HOOKDIR/success.sample\" \"$PREMERGE\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge --no-verify -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge --no-verify -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \n@@ -174,8 +174,8 @@ test_expect_success 'with failing hook (merge)' '\n \tcp \"$HOOKDIR/fail.sample\" \"$PREMERGE\" &&\n \techo \"$PREMERGE\" >expected_hooks &&\n \tgit checkout side &&\n-\ttest_must_fail git merge -m \"merge master\" master &&\n-\tgit checkout master &&\n+\ttest_must_fail git merge -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_cmp expected_hooks actual_hooks\n '\n \n@@ -184,8 +184,8 @@ test_expect_success '--no-verify with failing hook (merge)' '\n \tcp \"$HOOKDIR/fail.sample\" \"$PREMERGE\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge --no-verify -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge --no-verify -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \n@@ -212,8 +212,8 @@ test_expect_success POSIXPERM 'with non-executable hook (merge)' '\n \tcp \"$HOOKDIR/non-exec.sample\" \"$PREMERGE\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \n@@ -222,8 +222,8 @@ test_expect_success POSIXPERM '--no-verify with non-executable hook (merge)' '\n \tcp \"$HOOKDIR/non-exec.sample\" \"$PREMERGE\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge --no-verify -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge --no-verify -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \ndiff --git a/t/t7504-commit-msg-hook.sh b/t/t7504-commit-msg-hook.sh\nindex 31b9c6a2c1..2547362a39 100755\n--- a/t/t7504-commit-msg-hook.sh\n+++ b/t/t7504-commit-msg-hook.sh\n@@ -142,12 +142,12 @@ test_expect_success '--no-verify with failing hook (editor)' '\n test_expect_success 'merge fails with failing hook' '\n \n \ttest_when_finished \"git branch -D newbranch\" &&\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout --orphan newbranch &&\n \t: >file2 &&\n \tgit add file2 &&\n \tgit commit --no-verify file2 -m in-side-branch &&\n-\ttest_must_fail git merge --allow-unrelated-histories master &&\n+\ttest_must_fail git merge --allow-unrelated-histories main &&\n \tcommit_msg_is \"in-side-branch\" # HEAD before merge\n \n '\n@@ -155,14 +155,14 @@ test_expect_success 'merge fails with failing hook' '\n test_expect_success 'merge bypasses failing hook with --no-verify' '\n \n \ttest_when_finished \"git branch -D newbranch\" &&\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout --orphan newbranch &&\n \tgit rm -f file &&\n \t: >file2 &&\n \tgit add file2 &&\n \tgit commit --no-verify file2 -m in-side-branch &&\n-\tgit merge --no-verify --allow-unrelated-histories master &&\n-\tcommit_msg_is \"Merge branch '\\''master'\\'' into newbranch\"\n+\tgit merge --no-verify --allow-unrelated-histories main &&\n+\tcommit_msg_is \"Merge branch '\\''main'\\'' into newbranch\"\n '\n \n \n@@ -248,28 +248,28 @@ test_expect_success \"hook doesn't edit commit message (editor)\" '\n \n test_expect_success 'hook called in git-merge picks up commit message' '\n \ttest_when_finished \"git branch -D newbranch\" &&\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout --orphan newbranch &&\n \tgit rm -f file &&\n \t: >file2 &&\n \tgit add file2 &&\n \tgit commit --no-verify file2 -m in-side-branch &&\n-\tgit merge --allow-unrelated-histories master &&\n+\tgit merge --allow-unrelated-histories main &&\n \tcommit_msg_is \"new message\"\n '\n \n test_expect_failure 'merge --continue remembers --no-verify' '\n \ttest_when_finished \"git branch -D newbranch\" &&\n-\ttest_when_finished \"git checkout -f master\" &&\n-\tgit checkout master &&\n+\ttest_when_finished \"git checkout -f main\" &&\n+\tgit checkout main &&\n \techo a >file2 &&\n \tgit add file2 &&\n-\tgit commit --no-verify -m \"add file2 to master\" &&\n-\tgit checkout -b newbranch master^ &&\n+\tgit commit --no-verify -m \"add file2 to main\" &&\n+\tgit checkout -b newbranch main^ &&\n \techo b >file2 &&\n \tgit add file2 &&\n \tgit commit --no-verify file2 -m in-side-branch &&\n-\tgit merge --no-verify -m not-rewritten-by-hook master &&\n+\tgit merge --no-verify -m not-rewritten-by-hook main &&\n \t# resolve conflict:\n \techo c >file2 &&\n \tgit add file2 &&\ndiff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh\nindex 94f85cdf83..20b49629cd 100755\n--- a/t/t7505-prepare-commit-msg-hook.sh\n+++ b/t/t7505-prepare-commit-msg-hook.sh\n@@ -15,7 +15,7 @@ test_expect_success 'set up commits for rebasing' '\n \tdo\n \t\ttest_commit rebase-$i c $i\n \tdone &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tcat >rebase-todo <<-EOF\n \tpick $(git rev-parse rebase-a)\n@@ -190,7 +190,7 @@ test_expect_success 'with hook (-c)' '\n \n test_expect_success 'with hook (merge)' '\n \n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other HEAD@{1} &&\n \techo \"more\" >>file &&\n \tgit add file &&\n@@ -202,7 +202,7 @@ test_expect_success 'with hook (merge)' '\n \n test_expect_success 'with hook and editor (merge)' '\n \n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other HEAD@{1} &&\n \techo \"more\" >>file &&\n \tgit add file &&\n@@ -218,7 +218,7 @@ test_rebase () {\n \ttest_expect_$expect C_LOCALE_OUTPUT \"with hook (rebase ${mode:--i})\" '\n \t\ttest_when_finished \"\\\n \t\t\tgit rebase --abort\n-\t\t\tgit checkout -f master\n+\t\t\tgit checkout -f main\n \t\t\tgit branch -D tmp\" &&\n \t\tgit checkout -b tmp rebase-me &&\n \t\tGIT_SEQUENCE_EDITOR=\"cp rebase-todo\" &&\n@@ -250,14 +250,14 @@ test_rebase success\n test_have_prereq !REBASE_P || test_rebase success -p\n \n test_expect_success 'with hook (cherry-pick)' '\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other b &&\n \tgit cherry-pick rebase-1 &&\n \ttest \"$(git log -1 --pretty=format:%s)\" = \"message (no editor)\"\n '\n \n test_expect_success 'with hook and editor (cherry-pick)' '\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other b &&\n \tgit cherry-pick -e rebase-1 &&\n \ttest \"$(git log -1 --pretty=format:%s)\" = merge\n@@ -270,7 +270,7 @@ EOF\n \n test_expect_success 'with failing hook' '\n \n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \thead=$(git rev-parse HEAD) &&\n \techo \"more\" >> file &&\n \tgit add file &&\n@@ -280,7 +280,7 @@ test_expect_success 'with failing hook' '\n \n test_expect_success 'with failing hook (--no-verify)' '\n \n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \thead=$(git rev-parse HEAD) &&\n \techo \"more\" >> file &&\n \tgit add file &&\n@@ -290,7 +290,7 @@ test_expect_success 'with failing hook (--no-verify)' '\n \n test_expect_success 'with failing hook (merge)' '\n \n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other HEAD@{1} &&\n \techo \"more\" >> file &&\n \tgit add file &&\n@@ -305,7 +305,7 @@ test_expect_success 'with failing hook (merge)' '\n '\n \n test_expect_success C_LOCALE_OUTPUT 'with failing hook (cherry-pick)' '\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other b &&\n \ttest_must_fail git cherry-pick rebase-1 2>actual &&\n \ttest $(grep -c prepare-commit-msg actual) = 1\ndiff --git a/t/t7508-status.sh b/t/t7508-status.sh\nindex 963fed6821..d01aacb66b 100755\n--- a/t/t7508-status.sh\n+++ b/t/t7508-status.sh\n@@ -37,11 +37,11 @@ test_expect_success 'create upstream branch' '\n \tgit checkout -b upstream &&\n \ttest_commit upstream1 &&\n \ttest_commit upstream2 &&\n-\t# leave the first commit on master as root because several\n+\t# leave the first commit on main as root because several\n \t# tests depend on this case; for our upstream we only\n \t# care about commit counts anyway, so a totally divergent\n \t# history is OK\n-\tgit checkout --orphan master\n+\tgit checkout --orphan main\n '\n \n test_expect_success 'setup' '\n@@ -88,7 +88,7 @@ EOF\n \n test_expect_success 'status --column' '\n \tcat >expect <<\\EOF &&\n-# On branch master\n+# On branch main\n # Your branch and '\\''upstream'\\'' have diverged,\n # and have 1 and 2 different commits each, respectively.\n #   (use \"git pull\" to merge the remote branch into yours)\n@@ -119,7 +119,7 @@ test_expect_success 'status --column status.displayCommentPrefix=false' '\n '\n \n cat >expect <<\\EOF\n-# On branch master\n+# On branch main\n # Your branch and 'upstream' have diverged,\n # and have 1 and 2 different commits each, respectively.\n #   (use \"git pull\" to merge the remote branch into yours)\n@@ -193,7 +193,7 @@ test_expect_success 'commit ignores status.displayCommentPrefix=false in COMMIT_\n '\n \n cat >expect <<\\EOF\n-On branch master\n+On branch main\n Your branch and 'upstream' have diverged,\n and have 1 and 2 different commits each, respectively.\n \n@@ -266,7 +266,7 @@ test_expect_success 'status with gitignore' '\n \ttest_cmp expect output &&\n \n \tcat >expect <<\\EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -331,7 +331,7 @@ test_expect_success 'status with gitignore (nothing untracked)' '\n \ttest_cmp expect output &&\n \n \tcat >expect <<\\EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -368,7 +368,7 @@ output*\n EOF\n \n cat >expect <<\\EOF\n-## master...upstream [ahead 1, behind 2]\n+## main...upstream [ahead 1, behind 2]\n  M dir1/modified\n A  dir2/added\n ?? dir1/untracked\n@@ -401,7 +401,7 @@ test_expect_success 'setup dir3' '\n \n test_expect_success 'status -uno' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -429,7 +429,7 @@ test_expect_success 'status (status.showUntrackedFiles no)' '\n \n test_expect_success 'status -uno (advice.statusHints false)' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n \n@@ -463,7 +463,7 @@ test_expect_success 'status -s (status.showUntrackedFiles no)' '\n \n test_expect_success 'status -unormal' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -518,7 +518,7 @@ test_expect_success 'status -s (status.showUntrackedFiles normal)' '\n \n test_expect_success 'status -uall' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -578,7 +578,7 @@ test_expect_success 'status -s (status.showUntrackedFiles all)' '\n \n test_expect_success 'status with relative paths' '\n \tcat >expect <<\\EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -646,7 +646,7 @@ test_expect_success 'setup unique colors' '\n \n test_expect_success TTY 'status with color.ui' '\n \tcat >expect <<\\EOF &&\n-On branch <GREEN>master<RESET>\n+On branch <GREEN>main<RESET>\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -706,7 +706,7 @@ test_expect_success TTY 'status -s with color.status' '\n '\n \n cat >expect <<\\EOF\n-## <YELLOW>master<RESET>...<CYAN>upstream<RESET> [ahead <YELLOW>1<RESET>, behind <CYAN>2<RESET>]\n+## <YELLOW>main<RESET>...<CYAN>upstream<RESET> [ahead <YELLOW>1<RESET>, behind <CYAN>2<RESET>]\n  <RED>M<RESET> dir1/modified\n <GREEN>A<RESET>  dir2/added\n <BLUE>??<RESET> dir1/untracked\n@@ -757,7 +757,7 @@ test_expect_success 'status --porcelain respects -b' '\n \n \tgit status --porcelain -b >output &&\n \t{\n-\t\techo \"## master...upstream [ahead 1, behind 2]\" &&\n+\t\techo \"## main...upstream [ahead 1, behind 2]\" &&\n \t\tcat expect\n \t} >tmp &&\n \tmv tmp expect &&\n@@ -769,7 +769,7 @@ test_expect_success 'status --porcelain respects -b' '\n \n test_expect_success 'status without relative paths' '\n \tcat >expect <<\\EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -843,7 +843,7 @@ test_expect_success 'status -s without relative paths' '\n \n test_expect_success 'dry-run of partial commit excluding new file in index' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -897,7 +897,7 @@ test_expect_success 'setup status submodule summary' '\n \n test_expect_success 'status submodule summary is disabled by default' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -954,7 +954,7 @@ head=$(cd sm && git rev-parse --short=7 --verify HEAD)\n \n test_expect_success 'status submodule summary' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1013,7 +1013,7 @@ test_expect_success 'status -s submodule summary' '\n \n test_expect_success 'status submodule summary (clean submodule): commit' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1061,7 +1061,7 @@ test_expect_success 'status -z implies porcelain' '\n \n test_expect_success 'commit --dry-run submodule summary (--amend)' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1113,7 +1113,7 @@ touch .gitmodules\n \n test_expect_success '--ignore-submodules=untracked suppresses submodules with untracked content' '\n \tcat > expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1222,7 +1222,7 @@ test_expect_success '.git/config ignore=dirty suppresses submodules with modifie\n \n test_expect_success \"--ignore-submodules=untracked doesn't suppress submodules with modified content\" '\n \tcat > expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1279,7 +1279,7 @@ head2=$(cd sm && git commit -q -m \"2nd commit\" foo && git rev-parse --short=7 --\n \n test_expect_success \"--ignore-submodules=untracked doesn't suppress submodule summary\" '\n \tcat > expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1360,7 +1360,7 @@ test_expect_success \".git/config ignore=dirty doesn't suppress submodule summary\n '\n \n cat > expect << EOF\n-; On branch master\n+; On branch main\n ; Your branch and 'upstream' have diverged,\n ; and have 2 and 2 different commits each, respectively.\n ;   (use \"git pull\" to merge the remote branch into yours)\n@@ -1408,7 +1408,7 @@ test_expect_success \"status (core.commentchar with two chars with submodule summ\n \n test_expect_success \"--ignore-submodules=all suppresses submodule summary\" '\n \tcat > expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1434,7 +1434,7 @@ EOF\n \n test_expect_success '.gitmodules ignore=all suppresses unstaged submodule summary' '\n \tcat > expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1554,7 +1554,7 @@ test_expect_success 'git commit --dry-run will show a staged but ignored submodu\n \tgit reset HEAD^ &&\n \tgit add sm &&\n \tcat >expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\ndiff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh\nindex 6baaa1ad91..0653fdcd02 100755\n--- a/t/t7510-signed-commit.sh\n+++ b/t/t7510-signed-commit.sh\n@@ -25,7 +25,7 @@ test_expect_success GPG 'create signed commits' '\n \techo 3 >elif && git add elif &&\n \ttest_tick && git commit -m \"third on side\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick && git merge -S side &&\n \tgit tag merge &&\n \ndiff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh\nindex 29518e0949..29aa9adcfd 100755\n--- a/t/t7512-status-help.sh\n+++ b/t/t7512-status-help.sh\n@@ -17,14 +17,14 @@ test_expect_success 'prepare for conflicts' '\n \tgit config --global advice.statusuoption false &&\n \ttest_commit init main.txt init &&\n \tgit branch conflicts &&\n-\ttest_commit on_master main.txt on_master &&\n+\ttest_commit on_main main.txt on_main &&\n \tgit checkout conflicts &&\n \ttest_commit on_conflicts main.txt on_conflicts\n '\n \n \n test_expect_success 'status when conflicts unresolved' '\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tcat >expected <<\\EOF &&\n On branch conflicts\n You have unmerged paths.\n@@ -44,7 +44,7 @@ EOF\n \n test_expect_success 'status when conflicts resolved before commit' '\n \tgit reset --hard conflicts &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \techo one >main.txt &&\n \tgit add main.txt &&\n \tcat >expected <<\\EOF &&\n@@ -63,7 +63,7 @@ EOF\n \n \n test_expect_success 'prepare for rebase conflicts' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b rebase_conflicts &&\n \ttest_commit one_rebase main.txt one &&\n \ttest_commit two_rebase main.txt two &&\n@@ -118,11 +118,11 @@ EOF\n \n \n test_expect_success 'prepare for rebase_i_conflicts' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b rebase_i_conflicts &&\n \ttest_commit one_unmerge main.txt one_unmerge &&\n \tgit branch rebase_i_conflicts_second &&\n-\ttest_commit one_master main.txt one_master &&\n+\ttest_commit one_main main.txt one_main &&\n \tgit checkout rebase_i_conflicts_second &&\n \ttest_commit one_second main.txt one_second\n '\n@@ -182,7 +182,7 @@ EOF\n \n \n test_expect_success 'status when rebasing -i in edit mode' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b rebase_i_edit &&\n \ttest_commit one_rebase_i main.txt one &&\n \ttest_commit two_rebase_i main.txt two &&\n@@ -212,7 +212,7 @@ EOF\n \n \n test_expect_success 'status when splitting a commit' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b split_commit &&\n \ttest_commit one_split main.txt one &&\n \ttest_commit two_split main.txt two &&\n@@ -251,7 +251,7 @@ EOF\n \n \n test_expect_success 'status after editing the last commit with --amend during a rebase -i' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b amend_last &&\n \ttest_commit one_amend main.txt one &&\n \ttest_commit two_amend main.txt two &&\n@@ -284,7 +284,7 @@ EOF\n \n \n test_expect_success 'prepare for several edits' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b several_edits &&\n \ttest_commit one_edits main.txt one &&\n \ttest_commit two_edits main.txt two &&\n@@ -593,7 +593,7 @@ EOF\n \n \n test_expect_success 'prepare am_session' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b am_session &&\n \ttest_commit one_am one.txt \"one\" &&\n \ttest_commit two_am two.txt \"two\" &&\n@@ -666,7 +666,7 @@ EOF\n \n \n test_expect_success 'status when bisecting' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b bisect &&\n \ttest_commit one_bisect main.txt one &&\n \ttest_commit two_bisect main.txt two &&\n@@ -689,7 +689,7 @@ EOF\n \n \n test_expect_success 'status when rebase --apply conflicts with statushints disabled' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b statushints_disabled &&\n \ttest_when_finished \"git config --local advice.statushints true\" &&\n \tgit config --local advice.statushints false &&\n@@ -714,7 +714,7 @@ EOF\n \n \n test_expect_success 'prepare for cherry-pick conflicts' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b cherry_branch &&\n \ttest_commit one_cherry main.txt one &&\n \ttest_commit two_cherries main.txt two &&\n@@ -825,7 +825,7 @@ EOF\n '\n \n test_expect_success 'status while reverting commit (conflicts)' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo before >to-revert.txt &&\n \ttest_commit before to-revert.txt &&\n \techo old >to-revert.txt &&\n@@ -835,7 +835,7 @@ test_expect_success 'status while reverting commit (conflicts)' '\n \tTO_REVERT=$(git rev-parse --short HEAD^) &&\n \ttest_must_fail git revert $TO_REVERT &&\n \tcat >expected <<EOF &&\n-On branch master\n+On branch main\n You are currently reverting commit $TO_REVERT.\n   (fix conflicts and run \"git revert --continue\")\n   (use \"git revert --skip\" to skip this patch)\n@@ -856,7 +856,7 @@ test_expect_success 'status while reverting commit (conflicts resolved)' '\n \techo reverted >to-revert.txt &&\n \tgit add to-revert.txt &&\n \tcat >expected <<EOF &&\n-On branch master\n+On branch main\n You are currently reverting commit $TO_REVERT.\n   (all conflicts fixed: run \"git revert --continue\")\n   (use \"git revert --skip\" to skip this patch)\n@@ -875,7 +875,7 @@ EOF\n test_expect_success 'status after reverting commit' '\n \tgit revert --continue &&\n \tcat >expected <<\\EOF &&\n-On branch master\n+On branch main\n nothing to commit (use -u to show untracked files)\n EOF\n \tgit status --untracked-files=no >actual &&\n@@ -889,7 +889,7 @@ test_expect_success 'status while reverting after committing conflict resolution\n \techo reverted >to-revert.txt &&\n \tgit commit -a &&\n \tcat >expected <<EOF &&\n-On branch master\n+On branch main\n Revert currently in progress.\n   (run \"git revert --continue\" to continue)\n   (use \"git revert --skip\" to skip this patch)\n@@ -902,7 +902,7 @@ EOF\n '\n \n test_expect_success 'prepare for different number of commits rebased' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b several_commits &&\n \ttest_commit one_commit main.txt one &&\n \ttest_commit two_commit main.txt two &&\ndiff --git a/t/t7517-per-repo-email.sh b/t/t7517-per-repo-email.sh\nindex b2401cec3e..3a7723d16b 100755\n--- a/t/t7517-per-repo-email.sh\n+++ b/t/t7517-per-repo-email.sh\n@@ -47,24 +47,24 @@ test_expect_success 'set up rebase scenarios' '\n \n test_expect_success 'fast-forward rebase does not care about ident' '\n \tgit checkout -B tmp side-without-commit &&\n-\tgit rebase master\n+\tgit rebase main\n '\n \n test_expect_success 'non-fast-forward rebase refuses to write commits' '\n \ttest_when_finished \"git rebase --abort || true\" &&\n \tgit checkout -B tmp side-with-commit &&\n-\ttest_must_fail git rebase master\n+\ttest_must_fail git rebase main\n '\n \n test_expect_success 'fast-forward rebase does not care about ident (interactive)' '\n \tgit checkout -B tmp side-without-commit &&\n-\tgit rebase -i master\n+\tgit rebase -i main\n '\n \n test_expect_success 'non-fast-forward rebase refuses to write commits (interactive)' '\n \ttest_when_finished \"git rebase --abort || true\" &&\n \tgit checkout -B tmp side-with-commit &&\n-\ttest_must_fail git rebase -i master\n+\ttest_must_fail git rebase -i main\n '\n \n test_expect_success 'noop interactive rebase does not care about ident' '\n@@ -75,14 +75,14 @@ test_expect_success 'noop interactive rebase does not care about ident' '\n test_expect_success REBASE_P \\\n \t'fast-forward rebase does not care about ident (preserve)' '\n \tgit checkout -B tmp side-without-commit &&\n-\tgit rebase -p master\n+\tgit rebase -p main\n '\n \n test_expect_success REBASE_P \\\n \t'non-fast-forward rebase refuses to write commits (preserve)' '\n \ttest_when_finished \"git rebase --abort || true\" &&\n \tgit checkout -B tmp side-with-commit &&\n-\ttest_must_fail git rebase -p master\n+\ttest_must_fail git rebase -p main\n '\n \n test_expect_success 'author.name overrides user.name' '\ndiff --git a/t/t7600-merge.sh b/t/t7600-merge.sh\nindex 1c85f75555..6feb8895f3 100755\n--- a/t/t7600-merge.sh\n+++ b/t/t7600-merge.sh\n@@ -14,9 +14,9 @@ Testing basic merge operations/option parsing.\n     ! [c4] c4\n      ! [c5] c5\n       ! [c6] c6\n-       * [master] Merge commit 'c1'\n+       * [main] Merge commit 'c1'\n --------\n-       - [master] Merge commit 'c1'\n+       - [main] Merge commit 'c1'\n  +     * [c1] commit 1\n       +  [c6] c6\n      +   [c5] c5\n@@ -203,13 +203,13 @@ test_expect_success 'merge c0 with c1 with --ff-only' '\n test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'merge from unborn branch' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \ttest_might_fail git branch -D kid &&\n \n \techo \"OBJID HEAD@{0}: initial pull\" >reflog.expected &&\n \n \tgit checkout --orphan kid &&\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit rm -fr . &&\n \ttest_tick &&\n \tgit merge --ff-only c1 &&\n@@ -413,7 +413,7 @@ test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'merge c1 with c2 (no-commit in config)' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"--no-commit\" &&\n+\ttest_config branch.main.mergeoptions \"--no-commit\" &&\n \tgit merge c2 &&\n \tverify_merge file result.1-5 &&\n \tverify_head $c1 &&\n@@ -427,7 +427,7 @@ test_expect_success 'merge c1 with c2 (log in config)' '\n \tgit merge --log c2 &&\n \tgit show -s --pretty=tformat:%s%n%b >expect &&\n \n-\ttest_config branch.master.mergeoptions \"--log\" &&\n+\ttest_config branch.main.mergeoptions \"--log\" &&\n \tgit reset --hard c1 &&\n \tgit merge c2 &&\n \tgit show -s --pretty=tformat:%s%n%b >actual &&\n@@ -440,7 +440,7 @@ test_expect_success 'merge c1 with c2 (log in config gets overridden)' '\n \tgit merge c2 &&\n \tgit show -s --pretty=tformat:%s%n%b >expect &&\n \n-\ttest_config branch.master.mergeoptions \"--no-log\" &&\n+\ttest_config branch.main.mergeoptions \"--no-log\" &&\n \ttest_config merge.log \"true\" &&\n \tgit reset --hard c1 &&\n \tgit merge c2 &&\n@@ -451,7 +451,7 @@ test_expect_success 'merge c1 with c2 (log in config gets overridden)' '\n \n test_expect_success 'merge c1 with c2 (squash in config)' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"--squash\" &&\n+\ttest_config branch.main.mergeoptions \"--squash\" &&\n \tgit merge c2 &&\n \tverify_merge file result.1-5 &&\n \tverify_head $c1 &&\n@@ -463,7 +463,7 @@ test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'override config option -n with --summary' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"-n\" &&\n+\ttest_config branch.main.mergeoptions \"-n\" &&\n \ttest_tick &&\n \tgit merge --summary c2 >diffstat.txt &&\n \tverify_merge file result.1-5 msg.1-5 &&\n@@ -477,7 +477,7 @@ test_expect_success 'override config option -n with --summary' '\n \n test_expect_success 'override config option -n with --stat' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"-n\" &&\n+\ttest_config branch.main.mergeoptions \"-n\" &&\n \ttest_tick &&\n \tgit merge --stat c2 >diffstat.txt &&\n \tverify_merge file result.1-5 msg.1-5 &&\n@@ -493,7 +493,7 @@ test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'override config option --stat' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"--stat\" &&\n+\ttest_config branch.main.mergeoptions \"--stat\" &&\n \ttest_tick &&\n \tgit merge -n c2 >diffstat.txt &&\n \tverify_merge file result.1-5 msg.1-5 &&\n@@ -509,7 +509,7 @@ test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'merge c1 with c2 (override --no-commit)' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"--no-commit\" &&\n+\ttest_config branch.main.mergeoptions \"--no-commit\" &&\n \ttest_tick &&\n \tgit merge --commit c2 &&\n \tverify_merge file result.1-5 msg.1-5 &&\n@@ -520,7 +520,7 @@ test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'merge c1 with c2 (override --squash)' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"--squash\" &&\n+\ttest_config branch.main.mergeoptions \"--squash\" &&\n \ttest_tick &&\n \tgit merge --no-squash c2 &&\n \tverify_merge file result.1-5 msg.1-5 &&\n@@ -549,9 +549,9 @@ test_expect_success 'merge c0 with c1 (merge.ff=false)' '\n '\n test_debug 'git log --graph --decorate --oneline --all'\n \n-test_expect_success 'combine branch.master.mergeoptions with merge.ff' '\n+test_expect_success 'combine branch.main.mergeoptions with merge.ff' '\n \tgit reset --hard c0 &&\n-\ttest_config branch.master.mergeoptions \"--ff\" &&\n+\ttest_config branch.main.mergeoptions \"--ff\" &&\n \ttest_config merge.ff \"false\" &&\n \ttest_tick &&\n \tgit merge c1 &&\n@@ -593,7 +593,7 @@ test_expect_success 'option --no-ff overrides merge.ff=only config' '\n \n test_expect_success 'merge c0 with c1 (ff overrides no-ff)' '\n \tgit reset --hard c0 &&\n-\ttest_config branch.master.mergeoptions \"--no-ff\" &&\n+\ttest_config branch.main.mergeoptions \"--no-ff\" &&\n \tgit merge --ff c1 &&\n \tverify_merge file result.1 &&\n \tverify_head $c1\n@@ -606,7 +606,7 @@ test_expect_success 'merge log message' '\n \ttest_must_be_empty msg.act &&\n \n \tgit reset --hard c0 &&\n-\ttest_config branch.master.mergeoptions \"--no-ff\" &&\n+\ttest_config branch.main.mergeoptions \"--no-ff\" &&\n \tgit merge --no-log c2 &&\n \tgit show -s --pretty=format:%b HEAD >msg.act &&\n \ttest_must_be_empty msg.act &&\n@@ -950,10 +950,10 @@ test_expect_success 'set up mod-256 conflict scenario' '\n \tgit add file &&\n \tgit commit -m base &&\n \n-\t# one side changes the first line of each to \"master\"\n-\tsed s/-1/-master/ file >tmp &&\n+\t# one side changes the first line of each to \"main\"\n+\tsed s/-1/-main/ file >tmp &&\n \tmv tmp file &&\n-\tgit commit -am master &&\n+\tgit commit -am main &&\n \n \t# and the other to \"side\"; merging the two will\n \t# yield 256 separate conflicts\n@@ -965,12 +965,12 @@ test_expect_success 'set up mod-256 conflict scenario' '\n \n test_expect_success 'merge detects mod-256 conflicts (recursive)' '\n \tgit reset --hard &&\n-\ttest_must_fail git merge -s recursive master\n+\ttest_must_fail git merge -s recursive main\n '\n \n test_expect_success 'merge detects mod-256 conflicts (resolve)' '\n \tgit reset --hard &&\n-\ttest_must_fail git merge -s resolve master\n+\ttest_must_fail git merge -s resolve main\n '\n \n test_expect_success 'merge nothing into void' '\ndiff --git a/t/t7606-merge-custom.sh b/t/t7606-merge-custom.sh\nindex 8e8c4d7246..81fb7c474c 100755\n--- a/t/t7606-merge-custom.sh\n+++ b/t/t7606-merge-custom.sh\n@@ -4,7 +4,7 @@ test_description=\"git merge\n \n Testing a custom strategy.\n \n-*   (HEAD, master) Merge commit 'c3'\n+*   (HEAD, main) Merge commit 'c3'\n |\\\n | * (tag: c3) c3\n * | (tag: c1) c1\ndiff --git a/t/t7608-merge-messages.sh b/t/t7608-merge-messages.sh\nindex 8e7e0a5865..d5e411daf5 100755\n--- a/t/t7608-merge-messages.sh\n+++ b/t/t7608-merge-messages.sh\n@@ -10,51 +10,51 @@ check_oneline() {\n }\n \n test_expect_success 'merge local branch' '\n-\ttest_commit master-1 &&\n+\ttest_commit main-1 &&\n \tgit checkout -b local-branch &&\n \ttest_commit branch-1 &&\n-\tgit checkout master &&\n-\ttest_commit master-2 &&\n+\tgit checkout main &&\n+\ttest_commit main-2 &&\n \tgit merge local-branch &&\n \tcheck_oneline \"Merge branch Qlocal-branchQ\"\n '\n \n test_expect_success 'merge octopus branches' '\n-\tgit checkout -b octopus-a master &&\n+\tgit checkout -b octopus-a main &&\n \ttest_commit octopus-1 &&\n-\tgit checkout -b octopus-b master &&\n+\tgit checkout -b octopus-b main &&\n \ttest_commit octopus-2 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge octopus-a octopus-b &&\n \tcheck_oneline \"Merge branches Qoctopus-aQ and Qoctopus-bQ\"\n '\n \n test_expect_success 'merge tag' '\n-\tgit checkout -b tag-branch master &&\n+\tgit checkout -b tag-branch main &&\n \ttest_commit tag-1 &&\n-\tgit checkout master &&\n-\ttest_commit master-3 &&\n+\tgit checkout main &&\n+\ttest_commit main-3 &&\n \tgit merge tag-1 &&\n \tcheck_oneline \"Merge tag Qtag-1Q\"\n '\n \n test_expect_success 'ambiguous tag' '\n-\tgit checkout -b ambiguous master &&\n+\tgit checkout -b ambiguous main &&\n \ttest_commit ambiguous &&\n-\tgit checkout master &&\n-\ttest_commit master-4 &&\n+\tgit checkout main &&\n+\ttest_commit main-4 &&\n \tgit merge ambiguous &&\n \tcheck_oneline \"Merge tag QambiguousQ\"\n '\n \n test_expect_success 'remote-tracking branch' '\n-\tgit checkout -b remote master &&\n+\tgit checkout -b remote main &&\n \ttest_commit remote-1 &&\n-\tgit update-ref refs/remotes/origin/master remote &&\n-\tgit checkout master &&\n-\ttest_commit master-5 &&\n-\tgit merge origin/master &&\n-\tcheck_oneline \"Merge remote-tracking branch Qorigin/masterQ\"\n+\tgit update-ref refs/remotes/origin/main remote &&\n+\tgit checkout main &&\n+\ttest_commit main-5 &&\n+\tgit merge origin/main &&\n+\tcheck_oneline \"Merge remote-tracking branch Qorigin/mainQ\"\n '\n \n test_done\ndiff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh\nindex 70afdd06fa..69ef7f7356 100755\n--- a/t/t7610-mergetool.sh\n+++ b/t/t7610-mergetool.sh\n@@ -10,19 +10,19 @@ Testing basic merge tool invocation'\n . ./test-lib.sh\n \n # All the mergetool test work by checking out a temporary branch based\n-# off 'branch1' and then merging in master and checking the results of\n+# off 'branch1' and then merging in main and checking the results of\n # running mergetool\n \n test_expect_success 'setup' '\n \ttest_config rerere.enabled true &&\n-\techo master >file1 &&\n-\techo master spaced >\"spaced name\" &&\n-\techo master file11 >file11 &&\n-\techo master file12 >file12 &&\n-\techo master file13 >file13 &&\n-\techo master file14 >file14 &&\n+\techo main >file1 &&\n+\techo main spaced >\"spaced name\" &&\n+\techo main file11 >file11 &&\n+\techo main file12 >file12 &&\n+\techo main file13 >file13 &&\n+\techo main file14 >file14 &&\n \tmkdir subdir &&\n-\techo master sub >subdir/file3 &&\n+\techo main sub >subdir/file3 &&\n \ttest_create_repo submod &&\n \t(\n \t\tcd submod &&\n@@ -34,7 +34,7 @@ test_expect_success 'setup' '\n \tgit add file1 \"spaced name\" file1[1-4] subdir/file3 .gitmodules submod &&\n \tgit commit -m \"add initial versions\" &&\n \n-\tgit checkout -b branch1 master &&\n+\tgit checkout -b branch1 main &&\n \tgit submodule update -N &&\n \techo branch1 change >file1 &&\n \techo branch1 newfile >file2 &&\n@@ -71,39 +71,39 @@ test_expect_success 'setup' '\n \ttest_write_lines one two 3 >c/c/file.txt &&\n \tgit commit -a -m\"move to c\" &&\n \n-\tgit checkout -b stash1 master &&\n+\tgit checkout -b stash1 main &&\n \techo stash1 change file11 >file11 &&\n \tgit add file11 &&\n \tgit commit -m \"stash1 changes\" &&\n \n-\tgit checkout -b stash2 master &&\n+\tgit checkout -b stash2 main &&\n \techo stash2 change file11 >file11 &&\n \tgit add file11 &&\n \tgit commit -m \"stash2 changes\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit submodule update -N &&\n-\techo master updated >file1 &&\n-\techo master new >file2 &&\n-\techo master updated spaced >\"spaced name\" &&\n-\techo master both added >both &&\n-\techo master updated file12 >file12 &&\n-\techo master updated file14 >file14 &&\n-\techo master new sub >subdir/file3 &&\n+\techo main updated >file1 &&\n+\techo main new >file2 &&\n+\techo main updated spaced >\"spaced name\" &&\n+\techo main both added >both &&\n+\techo main updated file12 >file12 &&\n+\techo main updated file14 >file14 &&\n+\techo main new sub >subdir/file3 &&\n \t(\n \t\tcd submod &&\n-\t\techo master submodule >bar &&\n+\t\techo main submodule >bar &&\n \t\tgit add bar &&\n-\t\tgit commit -m \"Add bar on master\" &&\n-\t\tgit checkout -b submod-master\n+\t\tgit commit -m \"Add bar on main\" &&\n+\t\tgit checkout -b submod-main\n \t) &&\n \tgit add file1 \"spaced name\" file12 file14 file2 subdir/file3 submod &&\n \tgit add both &&\n \tgit rm file11 &&\n-\tgit commit -m \"master updates\" &&\n+\tgit commit -m \"main updates\" &&\n \n \tgit clean -fdx &&\n-\tgit checkout -b order-file-start master &&\n+\tgit checkout -b order-file-start main &&\n \techo start >a &&\n \techo start >b &&\n \tgit add a b &&\n@@ -130,7 +130,7 @@ test_expect_success 'custom mergetool' '\n \ttest_when_finished \"git reset --hard\" &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tyes \"\" | git mergetool both &&\n \tyes \"\" | git mergetool file1 file1 &&\n \tyes \"\" | git mergetool file2 \"spaced name\" &&\n@@ -138,11 +138,11 @@ test_expect_success 'custom mergetool' '\n \tyes \"d\" | git mergetool file11 &&\n \tyes \"d\" | git mergetool file12 &&\n \tyes \"l\" | git mergetool submod &&\n-\techo \"master updated\" >expect &&\n+\techo \"main updated\" >expect &&\n \ttest_cmp expect file1 &&\n-\techo \"master new\" >expect &&\n+\techo \"main new\" >expect &&\n \ttest_cmp expect file2 &&\n-\techo \"master new sub\" >expect &&\n+\techo \"main new sub\" >expect &&\n \ttest_cmp expect subdir/file3 &&\n \techo \"branch1 submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n@@ -156,7 +156,7 @@ test_expect_success 'gui mergetool' '\n \ttest_when_finished \"git reset --hard\" &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tyes \"\" | git mergetool --gui both &&\n \tyes \"\" | git mergetool -g file1 file1 &&\n \tyes \"\" | git mergetool --gui file2 \"spaced name\" &&\n@@ -164,11 +164,11 @@ test_expect_success 'gui mergetool' '\n \tyes \"d\" | git mergetool --gui file11 &&\n \tyes \"d\" | git mergetool --gui file12 &&\n \tyes \"l\" | git mergetool --gui submod &&\n-\techo \"gui master updated\" >expect &&\n+\techo \"gui main updated\" >expect &&\n \ttest_cmp expect file1 &&\n-\techo \"gui master new\" >expect &&\n+\techo \"gui main new\" >expect &&\n \ttest_cmp expect file2 &&\n-\techo \"gui master new sub\" >expect &&\n+\techo \"gui main new sub\" >expect &&\n \ttest_cmp expect subdir/file3 &&\n \techo \"branch1 submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n@@ -179,7 +179,7 @@ test_expect_success 'gui mergetool without merge.guitool set falls back to merge\n \ttest_when_finished \"git reset --hard\" &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tyes \"\" | git mergetool --gui both &&\n \tyes \"\" | git mergetool -g file1 file1 &&\n \tyes \"\" | git mergetool --gui file2 \"spaced name\" &&\n@@ -187,11 +187,11 @@ test_expect_success 'gui mergetool without merge.guitool set falls back to merge\n \tyes \"d\" | git mergetool --gui file11 &&\n \tyes \"d\" | git mergetool --gui file12 &&\n \tyes \"l\" | git mergetool --gui submod &&\n-\techo \"master updated\" >expect &&\n+\techo \"main updated\" >expect &&\n \ttest_cmp expect file1 &&\n-\techo \"master new\" >expect &&\n+\techo \"main new\" >expect &&\n \ttest_cmp expect file2 &&\n-\techo \"master new sub\" >expect &&\n+\techo \"main new sub\" >expect &&\n \ttest_cmp expect subdir/file3 &&\n \techo \"branch1 submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n@@ -206,7 +206,7 @@ test_expect_success 'mergetool crlf' '\n \t# test_when_finished is LIFO.)\n \ttest_config core.autocrlf true &&\n \tgit checkout -b test$test_count branch1 &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tyes \"\" | git mergetool file1 &&\n \tyes \"\" | git mergetool file2 &&\n \tyes \"\" | git mergetool \"spaced name\" &&\n@@ -215,11 +215,11 @@ test_expect_success 'mergetool crlf' '\n \tyes \"d\" | git mergetool file11 &&\n \tyes \"d\" | git mergetool file12 &&\n \tyes \"r\" | git mergetool submod &&\n-\ttest \"$(printf x | cat file1 -)\" = \"$(printf \"master updated\\r\\nx\")\" &&\n-\ttest \"$(printf x | cat file2 -)\" = \"$(printf \"master new\\r\\nx\")\" &&\n-\ttest \"$(printf x | cat subdir/file3 -)\" = \"$(printf \"master new sub\\r\\nx\")\" &&\n+\ttest \"$(printf x | cat file1 -)\" = \"$(printf \"main updated\\r\\nx\")\" &&\n+\ttest \"$(printf x | cat file2 -)\" = \"$(printf \"main new\\r\\nx\")\" &&\n+\ttest \"$(printf x | cat subdir/file3 -)\" = \"$(printf \"main new sub\\r\\nx\")\" &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit commit -m \"branch1 resolved with mergetool - autocrlf\"\n '\n@@ -230,9 +230,9 @@ test_expect_success 'mergetool in subdir' '\n \tgit submodule update -N &&\n \t(\n \t\tcd subdir &&\n-\t\ttest_must_fail git merge master &&\n+\t\ttest_must_fail git merge main &&\n \t\tyes \"\" | git mergetool file3 &&\n-\t\techo \"master new sub\" >expect &&\n+\t\techo \"main new sub\" >expect &&\n \t\ttest_cmp expect file3\n \t)\n '\n@@ -243,7 +243,7 @@ test_expect_success 'mergetool on file in parent dir' '\n \tgit submodule update -N &&\n \t(\n \t\tcd subdir &&\n-\t\ttest_must_fail git merge master &&\n+\t\ttest_must_fail git merge main &&\n \t\tyes \"\" | git mergetool file3 &&\n \t\tyes \"\" | git mergetool ../file1 &&\n \t\tyes \"\" | git mergetool ../file2 ../spaced\\ name &&\n@@ -251,9 +251,9 @@ test_expect_success 'mergetool on file in parent dir' '\n \t\tyes \"d\" | git mergetool ../file11 &&\n \t\tyes \"d\" | git mergetool ../file12 &&\n \t\tyes \"l\" | git mergetool ../submod &&\n-\t\techo \"master updated\" >expect &&\n+\t\techo \"main updated\" >expect &&\n \t\ttest_cmp expect ../file1 &&\n-\t\techo \"master new\" >expect &&\n+\t\techo \"main new\" >expect &&\n \t\ttest_cmp expect ../file2 &&\n \t\techo \"branch1 submodule\" >expect &&\n \t\ttest_cmp expect ../submod/bar &&\n@@ -265,7 +265,7 @@ test_expect_success 'mergetool skips autoresolved' '\n \ttest_when_finished \"git reset --hard\" &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"d\" | git mergetool file11 &&\n \tyes \"d\" | git mergetool file12 &&\n@@ -280,17 +280,17 @@ test_expect_success 'mergetool merges all from subdir (rerere disabled)' '\n \ttest_config rerere.enabled false &&\n \t(\n \t\tcd subdir &&\n-\t\ttest_must_fail git merge master &&\n+\t\ttest_must_fail git merge main &&\n \t\tyes \"r\" | git mergetool ../submod &&\n \t\tyes \"d\" \"d\" | git mergetool --no-prompt &&\n-\t\techo \"master updated\" >expect &&\n+\t\techo \"main updated\" >expect &&\n \t\ttest_cmp expect ../file1 &&\n-\t\techo \"master new\" >expect &&\n+\t\techo \"main new\" >expect &&\n \t\ttest_cmp expect ../file2 &&\n-\t\techo \"master new sub\" >expect &&\n+\t\techo \"main new sub\" >expect &&\n \t\ttest_cmp expect file3 &&\n \t\t( cd .. && git submodule update -N ) &&\n-\t\techo \"master submodule\" >expect &&\n+\t\techo \"main submodule\" >expect &&\n \t\ttest_cmp expect ../submod/bar &&\n \t\tgit commit -m \"branch2 resolved by mergetool from subdir\"\n \t)\n@@ -303,17 +303,17 @@ test_expect_success 'mergetool merges all from subdir (rerere enabled)' '\n \trm -rf .git/rr-cache &&\n \t(\n \t\tcd subdir &&\n-\t\ttest_must_fail git merge master &&\n+\t\ttest_must_fail git merge main &&\n \t\tyes \"r\" | git mergetool ../submod &&\n \t\tyes \"d\" \"d\" | git mergetool --no-prompt &&\n-\t\techo \"master updated\" >expect &&\n+\t\techo \"main updated\" >expect &&\n \t\ttest_cmp expect ../file1 &&\n-\t\techo \"master new\" >expect &&\n+\t\techo \"main new\" >expect &&\n \t\ttest_cmp expect ../file2 &&\n-\t\techo \"master new sub\" >expect &&\n+\t\techo \"main new sub\" >expect &&\n \t\ttest_cmp expect file3 &&\n \t\t( cd .. && git submodule update -N ) &&\n-\t\techo \"master submodule\" >expect &&\n+\t\techo \"main submodule\" >expect &&\n \t\ttest_cmp expect ../submod/bar &&\n \t\tgit commit -m \"branch2 resolved by mergetool from subdir\"\n \t)\n@@ -325,7 +325,7 @@ test_expect_success 'mergetool skips resolved paths when rerere is active' '\n \trm -rf .git/rr-cache &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tyes \"l\" | git mergetool --no-prompt submod &&\n \tyes \"d\" \"d\" | git mergetool --no-prompt &&\n \tgit submodule update -N &&\n@@ -366,11 +366,11 @@ test_expect_success 'mergetool takes partial path' '\n \ttest_config rerere.enabled false &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \n \tyes \"\" | git mergetool subdir &&\n \n-\techo \"master new sub\" >expect &&\n+\techo \"main new sub\" >expect &&\n \ttest_cmp expect subdir/file3\n '\n \n@@ -434,7 +434,7 @@ test_expect_success 'deleted vs modified submodule' '\n \tgit rm --cached submod &&\n \tgit commit -m \"Submodule deleted from branch\" &&\n \tgit checkout -b test$test_count.a test$test_count &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 &&\n \tyes \"\" | git mergetool both &&\n@@ -444,7 +444,7 @@ test_expect_success 'deleted vs modified submodule' '\n \techo \"branch1 submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \toutput=\"$(git mergetool --no-prompt)\" &&\n \ttest \"$output\" = \"No files need merging\" &&\n@@ -453,7 +453,7 @@ test_expect_success 'deleted vs modified submodule' '\n \tmv submod submod-movedaside &&\n \tgit checkout -b test$test_count.b test$test_count &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 &&\n \tyes \"\" | git mergetool both &&\n@@ -465,7 +465,7 @@ test_expect_success 'deleted vs modified submodule' '\n \tgit commit -m \"Merge resolved by deleting module\" &&\n \n \tmv submod-movedaside submod &&\n-\tgit checkout -b test$test_count.c master &&\n+\tgit checkout -b test$test_count.c main &&\n \tgit submodule update -N &&\n \ttest_must_fail git merge test$test_count &&\n \ttest -n \"$(git ls-files -u)\" &&\n@@ -481,7 +481,7 @@ test_expect_success 'deleted vs modified submodule' '\n \tgit commit -m \"Merge resolved by deleting module\" &&\n \tmv submod.orig submod &&\n \n-\tgit checkout -b test$test_count.d master &&\n+\tgit checkout -b test$test_count.d main &&\n \tgit submodule update -N &&\n \ttest_must_fail git merge test$test_count &&\n \ttest -n \"$(git ls-files -u)\" &&\n@@ -489,10 +489,10 @@ test_expect_success 'deleted vs modified submodule' '\n \tyes \"\" | git mergetool both &&\n \tyes \"d\" | git mergetool file11 file12 &&\n \tyes \"l\" | git mergetool submod &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \toutput=\"$(git mergetool --no-prompt)\" &&\n \ttest \"$output\" = \"No files need merging\" &&\n@@ -509,7 +509,7 @@ test_expect_success 'file vs modified submodule' '\n \tgit add submod &&\n \tgit commit -m \"Submodule path becomes file\" &&\n \tgit checkout -b test$test_count.a branch1 &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 &&\n \tyes \"\" | git mergetool both &&\n@@ -519,7 +519,7 @@ test_expect_success 'file vs modified submodule' '\n \techo \"branch1 submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \toutput=\"$(git mergetool --no-prompt)\" &&\n \ttest \"$output\" = \"No files need merging\" &&\n@@ -527,7 +527,7 @@ test_expect_success 'file vs modified submodule' '\n \n \tmv submod submod-movedaside &&\n \tgit checkout -b test$test_count.b test$test_count &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 &&\n \tyes \"\" | git mergetool both &&\n@@ -547,7 +547,7 @@ test_expect_success 'file vs modified submodule' '\n \ttest \"$output\" = \"No files need merging\" &&\n \tgit commit -m \"Merge resolved by keeping file\" &&\n \n-\tgit checkout -b test$test_count.c master &&\n+\tgit checkout -b test$test_count.c main &&\n \trmdir submod && mv submod-movedaside submod &&\n \ttest ! -e submod.orig &&\n \tgit submodule update -N &&\n@@ -573,7 +573,7 @@ test_expect_success 'file vs modified submodule' '\n \ttest \"$output\" = \"No files need merging\" &&\n \tgit commit -m \"Merge resolved by keeping file\" &&\n \n-\tgit checkout -b test$test_count.d master &&\n+\tgit checkout -b test$test_count.d main &&\n \trmdir submod && mv submod.orig submod &&\n \tgit submodule update -N &&\n \ttest_must_fail git merge test$test_count &&\n@@ -586,10 +586,10 @@ test_expect_success 'file vs modified submodule' '\n \tthen\n \t\tyes \"d\" | git mergetool submod~test19\n \tfi &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \toutput=\"$(git mergetool --no-prompt)\" &&\n \ttest \"$output\" = \"No files need merging\" &&\n@@ -672,7 +672,7 @@ test_expect_success 'directory vs modified submodule' '\n \tgit add submod/file16 &&\n \tgit commit -m \"Submodule path becomes directory\" &&\n \n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"l\" | git mergetool submod &&\n \techo \"not a submodule\" >expect &&\n@@ -680,14 +680,14 @@ test_expect_success 'directory vs modified submodule' '\n \trm -rf submod.orig &&\n \n \tgit reset --hard &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \ttest ! -e submod.orig &&\n \tif test \"$GIT_TEST_MERGE_ALGORITHM\" = ort\n \tthen\n-\t\tyes \"r\" | git mergetool submod~master &&\n+\t\tyes \"r\" | git mergetool submod~main &&\n \t\tgit mv submod submod.orig &&\n-\t\tgit mv submod~master submod\n+\t\tgit mv submod~main submod\n \telse\n \t\tyes \"r\" | git mergetool submod\n \tfi &&\n@@ -698,18 +698,18 @@ test_expect_success 'directory vs modified submodule' '\n \tmv submod-movedaside/.git submod &&\n \t( cd submod && git clean -f && git reset --hard ) &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit reset --hard &&\n \trm -rf submod-movedaside &&\n \n-\tgit checkout -b test$test_count.c master &&\n+\tgit checkout -b test$test_count.c main &&\n \tgit submodule update -N &&\n \ttest_must_fail git merge test$test_count &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"l\" | git mergetool submod &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \n \tgit reset --hard &&\n@@ -721,7 +721,7 @@ test_expect_success 'directory vs modified submodule' '\n \techo \"not a submodule\" >expect &&\n \ttest_cmp expect submod/file16 &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \t( cd submod && git clean -f && git reset --hard ) &&\n \tgit submodule update -N\n '\n@@ -729,7 +729,7 @@ test_expect_success 'directory vs modified submodule' '\n test_expect_success 'file with no base' '\n \ttest_when_finished \"git reset --hard\" &&\n \tgit checkout -b test$test_count branch1 &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit mergetool --no-prompt --tool mybase -- both &&\n \ttest_must_be_empty both\n '\n@@ -739,9 +739,9 @@ test_expect_success 'custom commands override built-ins' '\n \tgit checkout -b test$test_count branch1 &&\n \ttest_config mergetool.defaults.cmd \"cat \\\"\\$REMOTE\\\" >\\\"\\$MERGED\\\"\" &&\n \ttest_config mergetool.defaults.trustExitCode true &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit mergetool --no-prompt --tool defaults -- both &&\n-\techo master both added >expected &&\n+\techo main both added >expected &&\n \ttest_cmp expected both\n '\n \n@@ -751,7 +751,7 @@ test_expect_success 'filenames seen by tools start with ./' '\n \ttest_config mergetool.writeToTemp false &&\n \ttest_config mergetool.myecho.cmd \"echo \\\"\\$LOCAL\\\"\" &&\n \ttest_config mergetool.myecho.trustExitCode true &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit mergetool --no-prompt --tool myecho -- both >actual &&\n \tgrep ^\\./both_LOCAL_ actual\n '\n@@ -768,7 +768,7 @@ test_expect_success MKTEMP 'temporary filenames are used with mergetool.writeToT\n \ttest_config mergetool.writeToTemp true &&\n \ttest_config mergetool.myecho.cmd \"echo \\\"\\$LOCAL\\\"\" &&\n \ttest_config mergetool.myecho.trustExitCode true &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit mergetool --no-prompt --tool myecho -- both >actual &&\n \t! grep ^\\./both_LOCAL_ actual &&\n \tgrep /both_LOCAL_ actual\ndiff --git a/t/t7611-merge-abort.sh b/t/t7611-merge-abort.sh\nindex 7c84a518aa..8e95182566 100755\n--- a/t/t7611-merge-abort.sh\n+++ b/t/t7611-merge-abort.sh\n@@ -7,7 +7,7 @@ Set up repo with conflicting and non-conflicting branches:\n There are three files foo/bar/baz, and the following graph illustrates the\n content of these files in each commit:\n \n-# foo/bar/baz --- foo/bar/bazz     <-- master\n+# foo/bar/baz --- foo/bar/bazz     <-- main\n #             \\\n #              --- foo/barf/bazf   <-- conflict_branch\n #               \\\n@@ -40,7 +40,7 @@ test_expect_success 'setup' '\n \tgit checkout -b clean_branch HEAD^ &&\n \techo bart > bar &&\n \tgit commit -a -m \"clean\" &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n pre_merge_head=\"$(git rev-parse HEAD)\"\ndiff --git a/t/t7612-merge-verify-signatures.sh b/t/t7612-merge-verify-signatures.sh\nindex a426f3a89a..6c52b6ac1e 100755\n--- a/t/t7612-merge-verify-signatures.sh\n+++ b/t/t7612-merge-verify-signatures.sh\n@@ -31,7 +31,7 @@ test_expect_success GPG 'create signed commits' '\n \techo 3 >baz && git add baz &&\n \ttest_tick && git commit -SB7227189 -m \"untrusted on side\" &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success GPG 'merge unsigned commit with verification' '\ndiff --git a/t/t7614-merge-signoff.sh b/t/t7614-merge-signoff.sh\nindex c1b8446f49..1e901224cd 100755\n--- a/t/t7614-merge-signoff.sh\n+++ b/t/t7614-merge-signoff.sh\n@@ -11,17 +11,17 @@ This test runs git merge --signoff and makes sure that it works.\n test_setup() {\n \t# Expected commit message after merge --signoff\n \tcat >expected-signed <<EOF &&\n-Merge branch 'master' into other-branch\n+Merge branch 'main' into other-branch\n \n Signed-off-by: $(git var GIT_COMMITTER_IDENT | sed -e \"s/>.*/>/\")\n EOF\n \n \t# Expected commit message after merge without --signoff (or with --no-signoff)\n \tcat >expected-unsigned <<EOF &&\n-Merge branch 'master' into other-branch\n+Merge branch 'main' into other-branch\n EOF\n \n-\t# Initial commit and feature branch to merge master into it.\n+\t# Initial commit and feature branch to merge main into it.\n \tgit commit --allow-empty -m \"Initial empty commit\" &&\n \tgit checkout -b other-branch &&\n \ttest_commit other-branch file1 1\n@@ -38,30 +38,30 @@ test_expect_success 'setup' '\n \n # Test with --signoff flag\n test_expect_success 'git merge --signoff adds a sign-off line' '\n-\tgit checkout master &&\n-\ttest_commit master-branch-2 file2 2 &&\n+\tgit checkout main &&\n+\ttest_commit main-branch-2 file2 2 &&\n \tgit checkout other-branch &&\n-\tgit merge master --signoff --no-edit &&\n+\tgit merge main --signoff --no-edit &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n \ttest_cmp expected-signed actual\n '\n \n # Test without --signoff flag\n test_expect_success 'git merge does not add a sign-off line' '\n-\tgit checkout master &&\n-\ttest_commit master-branch-3 file3 3 &&\n+\tgit checkout main &&\n+\ttest_commit main-branch-3 file3 3 &&\n \tgit checkout other-branch &&\n-\tgit merge master --no-edit &&\n+\tgit merge main --no-edit &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n \ttest_cmp expected-unsigned actual\n '\n \n # Test for --no-signoff flag\n test_expect_success 'git merge --no-signoff flag cancels --signoff flag' '\n-\tgit checkout master &&\n-\ttest_commit master-branch-4 file4 4 &&\n+\tgit checkout main &&\n+\ttest_commit main-branch-4 file4 4 &&\n \tgit checkout other-branch &&\n-\tgit merge master --no-edit --signoff --no-signoff &&\n+\tgit merge main --no-edit --signoff --no-signoff &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n \ttest_cmp expected-unsigned actual\n '\ndiff --git a/t/t7701-repack-unpack-unreachable.sh b/t/t7701-repack-unpack-unreachable.sh\nindex 48261ba080..852c81d13e 100755\n--- a/t/t7701-repack-unpack-unreachable.sh\n+++ b/t/t7701-repack-unpack-unreachable.sh\n@@ -22,7 +22,7 @@ test_expect_success '-A with -d option leaves unreachable objects unpacked' '\n \tgit commit -a -m more_content &&\n \tcsha1=$(git rev-parse HEAD^{commit}) &&\n \ttsha1=$(git rev-parse HEAD^{tree}) &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo even more content >> file1 &&\n \ttest_tick &&\n \tgit commit -a -m even_more_content &&\ndiff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh\nindex a578b35761..31e719e361 100755\n--- a/t/t7800-difftool.sh\n+++ b/t/t7800-difftool.sh\n@@ -35,23 +35,23 @@ test_expect_success 'basic usage requires no repo' '\n \ttest_i18ngrep ^usage: output\n '\n \n-# Create a file on master and change it on branch\n+# Create a file on main and change it on branch\n test_expect_success 'setup' '\n-\techo master >file &&\n+\techo main >file &&\n \tgit add file &&\n \tgit commit -m \"added file\" &&\n \n-\tgit checkout -b branch master &&\n+\tgit checkout -b branch main &&\n \techo branch >file &&\n \tgit commit -a -m \"branch changed file\" &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n # Configure a custom difftool.<tool>.cmd and use it\n test_expect_success 'custom commands' '\n \tdifftool_test_setup &&\n \ttest_config difftool.test-tool.cmd \"cat \\\"\\$REMOTE\\\"\" &&\n-\techo master >expect &&\n+\techo main >expect &&\n \tgit difftool --no-prompt branch >actual &&\n \ttest_cmp expect actual &&\n \n@@ -63,7 +63,7 @@ test_expect_success 'custom commands' '\n \n test_expect_success 'custom tool commands override built-ins' '\n \ttest_config difftool.vimdiff.cmd \"cat \\\"\\$REMOTE\\\"\" &&\n-\techo master >expect &&\n+\techo main >expect &&\n \tgit difftool --tool vimdiff --no-prompt branch >actual &&\n \ttest_cmp expect actual\n '\n@@ -311,21 +311,21 @@ test_expect_success 'difftool.<tool>.path' '\n \n test_expect_success 'difftool --extcmd=cat' '\n \techo branch >expect &&\n-\techo master >>expect &&\n+\techo main >>expect &&\n \tgit difftool --no-prompt --extcmd=cat branch >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'difftool --extcmd cat' '\n \techo branch >expect &&\n-\techo master >>expect &&\n+\techo main >>expect &&\n \tgit difftool --no-prompt --extcmd=cat branch >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'difftool -x cat' '\n \techo branch >expect &&\n-\techo master >>expect &&\n+\techo main >>expect &&\n \tgit difftool --no-prompt -x cat branch >actual &&\n \ttest_cmp expect actual\n '\n@@ -338,7 +338,7 @@ test_expect_success 'difftool --extcmd echo arg1' '\n '\n \n test_expect_success 'difftool --extcmd cat arg1' '\n-\techo master >expect &&\n+\techo main >expect &&\n \tgit difftool --no-prompt \\\n \t\t--extcmd sh\\ -c\\ \\\"cat\\ \\$1\\\" branch >actual &&\n \ttest_cmp expect actual\n@@ -351,7 +351,7 @@ test_expect_success 'difftool --extcmd cat arg2' '\n \ttest_cmp expect actual\n '\n \n-# Create a second file on master and a different version on branch\n+# Create a second file on main and a different version on branch\n test_expect_success 'setup with 2 files different' '\n \techo m2 >file2 &&\n \tgit add file2 &&\n@@ -361,7 +361,7 @@ test_expect_success 'setup with 2 files different' '\n \techo br2 >file2 &&\n \tgit add file2 &&\n \tgit commit -a -m \"branch changed file2\" &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'say no to the first file' '\n@@ -369,14 +369,14 @@ test_expect_success 'say no to the first file' '\n \tgit difftool -x cat branch <input >output &&\n \tgrep m2 output &&\n \tgrep br2 output &&\n-\t! grep master output &&\n+\t! grep main output &&\n \t! grep branch output\n '\n \n test_expect_success 'say no to the second file' '\n \t(echo && echo n) >input &&\n \tgit difftool -x cat branch <input >output &&\n-\tgrep master output &&\n+\tgrep main output &&\n \tgrep branch output &&\n \t! grep m2 output &&\n \t! grep br2 output\n@@ -384,7 +384,7 @@ test_expect_success 'say no to the second file' '\n \n test_expect_success 'ending prompt input with EOF' '\n \tgit difftool -x cat branch </dev/null >output &&\n-\t! grep master output &&\n+\t! grep main output &&\n \t! grep branch output &&\n \t! grep m2 output &&\n \t! grep br2 output\n@@ -396,9 +396,9 @@ test_expect_success 'difftool --tool-help' '\n '\n \n test_expect_success 'setup change in subdirectory' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tmkdir sub &&\n-\techo master >sub/sub &&\n+\techo main >sub/sub &&\n \tgit add sub/sub &&\n \tgit commit -m \"added sub/sub\" &&\n \tgit tag v1 &&\n@@ -526,7 +526,7 @@ run_dir_diff_test 'difftool --dir-diff from subdirectory with GIT_DIR set' '\n run_dir_diff_test 'difftool --dir-diff when worktree file is missing' '\n \ttest_when_finished git reset --hard &&\n \trm file2 &&\n-\tgit difftool --dir-diff $symlinks --extcmd ls branch master >output &&\n+\tgit difftool --dir-diff $symlinks --extcmd ls branch main >output &&\n \tgrep file2 output\n '\n \n@@ -543,7 +543,7 @@ run_dir_diff_test 'difftool --dir-diff with unmerged files' '\n \techo b >>file &&\n \tgit add file &&\n \tgit commit -m conflict-b &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge conflict-a &&\n \ttest_must_fail git merge conflict-b &&\n \tcat >expect <<-EOF &&\ndiff --git a/t/t7810-grep.sh b/t/t7810-grep.sh\nindex 991d5bd9c0..bee57a4e08 100755\n--- a/t/t7810-grep.sh\n+++ b/t/t7810-grep.sh\n@@ -1206,19 +1206,19 @@ test_expect_success 'grep -e -- -- path' '\n '\n \n test_expect_success 'dashdash disambiguates rev as rev' '\n-\ttest_when_finished \"rm -f master\" &&\n-\techo content >master &&\n-\techo master:hello.c >expect &&\n-\tgit grep -l o master -- hello.c >actual &&\n+\ttest_when_finished \"rm -f main\" &&\n+\techo content >main &&\n+\techo main:hello.c >expect &&\n+\tgit grep -l o main -- hello.c >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'dashdash disambiguates pathspec as pathspec' '\n-\ttest_when_finished \"git rm -f master\" &&\n-\techo content >master &&\n-\tgit add master &&\n-\techo master:content >expect &&\n-\tgit grep o -- master >actual &&\n+\ttest_when_finished \"git rm -f main\" &&\n+\techo content >main &&\n+\tgit add main &&\n+\techo main:content >expect &&\n+\tgit grep o -- main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -1254,15 +1254,15 @@ test_expect_success 'grep --no-index pattern -- path' '\n '\n \n test_expect_success 'grep --no-index complains of revs' '\n-\ttest_must_fail git grep --no-index o master -- 2>err &&\n+\ttest_must_fail git grep --no-index o main -- 2>err &&\n \ttest_i18ngrep \"cannot be used with revs\" err\n '\n \n test_expect_success 'grep --no-index prefers paths to revs' '\n-\ttest_when_finished \"rm -f master\" &&\n-\techo content >master &&\n-\techo master:content >expect &&\n-\tgit grep --no-index o master >actual &&\n+\ttest_when_finished \"rm -f main\" &&\n+\techo content >main &&\n+\techo main:content >expect &&\n+\tgit grep --no-index o main >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 815d7b21fe..2ef51a4f3f 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,13 +257,13 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-3404|4013|5310|6300|7064)\n+3404|4013|5310|6300|7064|7817)\n \t# Avoid conflicts with patch series that are cooking at the same time\n \t# as the patch series changing the default of `init.defaultBranch`.\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-6]*|7[0-4]*)\n+[0-7]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409834","messageId":"pull.762.git.1605221038.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":null,"subject":"[PATCH 00/28] Use main as default branch name","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:30Z","receivedAt":"2020-11-12T22:44:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This is the big one. This changes the default of init.defaultBranch to main,\nreflecting what many open source projects already did (which was followed by\nGitHub, Azure Repos and others).\n\nInstead of one huge patch that reflects essentially a search-and-replace in\nthe test suite, this patch series splits the changes up into chunks that are\nintended to be smaller than 100kB so that they are not rejected by the Git\nmailing list. Interspersed between those changes are adjustments e.g. in\nalignment, to make it easier to review (or recreate) the search-and-replace\npatches.\n\nNote that this branch is based on next, mostly because it would otherwise\nconflict with en/merge-tests, jk/diff-release-filespec-fix and \nds/maintenance-part-3.\n\nThe semantic conflict with pk/subsub-fetch-fix consists of just a single\nline in t/t5526-fetch-submodules.sh needing s/master/main/g.\n\nTo avoid even more conflicts with topics that did not even make it to seen \nyet, this patch series specifically excludes t3404, t4013, t5310, t6300,\nt7064, t7817, t9902: in those test scripts, we will still use master for the\ntime being. Once the topics in question have settled, I will send the\nappropriate follow-up patches to adjust them to use main instead.\n\nDon Goodman-Wilson (1):\n  Change the default branch name to `main`\n\nJohannes Schindelin (27):\n  t0060: preemptively adjust alignment\n  t[01]*: adjust the references to the default branch name \"main\"\n  t2*: adjust the references to the default branch name \"main\"\n  t3[0-3]*: adjust the references to the default branch name \"main\"\n  t3416: preemptively adjust alignment in a comment\n  t34*: adjust the references to the default branch name \"main\"\n  t3[5-9]*: adjust the references to the default branch name \"main\"\n  t4*: adjust the references to the default branch name \"main\"\n  t5323: prepare centered comment for `master` -> `main`\n  t5[0-4]*: adjust the references to the default branch name \"main\"\n  t5503: prepare aligned comment for replacing `master` with `main`\n  t550*: adjust the references to the default branch name \"main\"\n  t551*: adjust the references to the default branch name \"main\"\n  t55[23]*: adjust the references to the default branch name \"main\"\n  t55[4-9]*: adjust the references to the default branch name \"main\"\n  t5[6-9]*: adjust the references to the default branch name \"main\"\n  t6[0-3]*: adjust the references to the default branch name \"main\"\n  t64*: preemptively adjust alignment to prepare for `master` -> `main`\n  t6[4-9]*: adjust the references to the default branch name \"main\"\n  t7[0-4]*: adjust the references to the default branch name \"main\"\n  t7[5-9]*: adjust the references to the default branch name \"main\"\n  t8*: adjust the references to the default branch name \"main\"\n  t9[0-4]*: adjust the references to the default branch name \"main\"\n  t9[5-7]*: adjust the references to the default branch name \"main\"\n  tests(git-p4): transition to the default branch name `main`\n  t99*: adjust the references to the default branch name \"main\"\n  tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed\n\n refs.c                                        |   2 +-\n t/annotate-tests.sh                           |   8 +-\n t/lib-cvs.sh                                  |   2 +-\n t/lib-submodule-update.sh                     |   2 +-\n t/t0002-gitfile.sh                            |   6 +-\n t/t0020-crlf.sh                               |   8 +-\n t/t0021-conversion.sh                         |  40 +-\n t/t0027-auto-crlf.sh                          |   4 +-\n t/t0028-working-tree-encoding.sh              |   4 +-\n t/t0041-usage.sh                              |  10 +-\n t/t0050-filesystem.sh                         |   6 +-\n t/t0060-path-utils.sh                         |   4 +-\n t/t0100-previous.sh                           |  18 +-\n t/t1004-read-tree-m-u-wf.sh                   |  40 +-\n t/t1008-read-tree-overlay.sh                  |   2 +-\n t/t1009-read-tree-new-index.sh                |   4 +-\n t/t1011-read-tree-sparse-checkout.sh          |   2 +-\n t/t1021-rerere-in-workdir.sh                  |   2 +-\n t/t1090-sparse-checkout-scope.sh              |  10 +-\n t/t1091-sparse-checkout-builtin.sh            |   2 +-\n t/t1300-config.sh                             |   8 +-\n t/t1301-shared-repo.sh                        |   4 +-\n t/t1305-config-include.sh                     |   2 +-\n t/t1309-early-config.sh                       |   4 +-\n t/t1400-update-ref.sh                         |  72 +--\n t/t1402-check-ref-format.sh                   |  28 +-\n t/t1403-show-ref.sh                           |  18 +-\n t/t1405-main-ref-store.sh                     |  42 +-\n t/t1406-submodule-ref-store.sh                |  30 +-\n t/t1407-worktree-ref-store.sh                 |  32 +-\n t/t1408-packed-refs.sh                        |  12 +-\n t/t1410-reflog.sh                             |  56 +-\n t/t1411-reflog-show.sh                        |   2 +-\n t/t1413-reflog-detach.sh                      |  24 +-\n t/t1414-reflog-walk.sh                        |  12 +-\n t/t1416-ref-transaction-hooks.sh              |  10 +-\n t/t1430-bad-ref-name.sh                       |  52 +-\n t/t1450-fsck.sh                               |   2 +-\n t/t1500-rev-parse.sh                          |   4 +-\n t/t1503-rev-parse-verify.sh                   |  28 +-\n t/t1505-rev-parse-last.sh                     |   8 +-\n t/t1506-rev-parse-diagnosis.sh                |   4 +-\n t/t1507-rev-parse-upstream.sh                 |  40 +-\n t/t1508-at-combinations.sh                    |  10 +-\n t/t1511-rev-parse-caret.sh                    |  26 +-\n t/t1512-rev-parse-disambiguation.sh           |   2 +-\n t/t1513-rev-parse-prefix.sh                   |   4 +-\n t/t1514-rev-parse-push.sh                     |  16 +-\n t/t1700-split-index.sh                        |   2 +-\n t/t2007-checkout-symlink.sh                   |  10 +-\n t/t2009-checkout-statinfo.sh                  |   8 +-\n t/t2010-checkout-ambiguous.sh                 |   4 +-\n t/t2011-checkout-invalid-head.sh              |  16 +-\n t/t2012-checkout-last.sh                      |  48 +-\n t/t2015-checkout-unborn.sh                    |   2 +-\n t/t2017-checkout-orphan.sh                    |  44 +-\n t/t2020-checkout-detach.sh                    |  28 +-\n t/t2022-checkout-paths.sh                     |  22 +-\n t/t2023-checkout-m.sh                         |  10 +-\n t/t2024-checkout-dwim.sh                      |  70 +--\n t/t2027-checkout-track.sh                     |   6 +-\n t/t2030-unresolve-info.sh                     |   6 +-\n t/t2060-switch.sh                             |  30 +-\n t/t2070-restore.sh                            |   4 +-\n t/t2106-update-index-assume-unchanged.sh      |   2 +-\n t/t2400-worktree-add.sh                       |  66 +--\n t/t2401-worktree-prune.sh                     |   2 +-\n t/t2402-worktree-list.sh                      |  20 +-\n t/t2405-worktree-submodule.sh                 |   6 +-\n t/t3040-subprojects-basic.sh                  |   2 +-\n t/t3200-branch.sh                             | 248 ++++-----\n t/t3201-branch-contains.sh                    |  82 +--\n t/t3202-show-branch-octopus.sh                |   2 +-\n t/t3203-branch-output.sh                      |  40 +-\n t/t3204-branch-name-interpretation.sh         |   6 +-\n t/t3205-branch-color.sh                       |   8 +-\n t/t3206-range-diff.sh                         |  40 +-\n t/t3206/history.export                        |   2 +-\n t/t3210-pack-refs.sh                          |   4 +-\n t/t3211-peel-ref.sh                           |   4 +-\n t/t3301-notes.sh                              |   6 +-\n t/t3302-notes-index-expensive.sh              |   2 +-\n t/t3303-notes-subtrees.sh                     |   8 +-\n t/t3304-notes-mixed.sh                        |   8 +-\n t/t3308-notes-merge.sh                        |   2 +-\n t/t3320-notes-merge-worktrees.sh              |   4 +-\n t/t3400-rebase.sh                             |  60 +--\n t/t3402-rebase-merge.sh                       |  44 +-\n t/t3403-rebase-skip.sh                        |   6 +-\n t/t3405-rebase-malformed.sh                   |   8 +-\n t/t3406-rebase-message.sh                     |  24 +-\n t/t3407-rebase-abort.sh                       |  18 +-\n t/t3408-rebase-multi-line.sh                  |   2 +-\n t/t3409-rebase-preserve-merges.sh             |  10 +-\n t/t3412-rebase-root.sh                        |  28 +-\n t/t3413-rebase-hook.sh                        |  42 +-\n t/t3415-rebase-autosquash.sh                  |   2 +-\n t/t3416-rebase-onto-threedots.sh              |  54 +-\n t/t3418-rebase-continue.sh                    |  24 +-\n t/t3419-rebase-patch-id.sh                    |  12 +-\n t/t3420-rebase-autostash.sh                   |   8 +-\n t/t3423-rebase-reword.sh                      |   6 +-\n t/t3427-rebase-subtree.sh                     |  20 +-\n t/t3430-rebase-merges.sh                      |  16 +-\n t/t3431-rebase-fork-point.sh                  |  32 +-\n t/t3432-rebase-fast-forward.sh                |  34 +-\n t/t3434-rebase-i18n.sh                        |   8 +-\n t/t3435-rebase-gpg-sign.sh                    |   4 +-\n t/t3436-rebase-more-options.sh                |   2 +-\n t/t3500-cherry.sh                             |  12 +-\n t/t3501-revert-cherry-pick.sh                 |   4 +-\n t/t3502-cherry-pick-merge.sh                  |   2 +-\n t/t3503-cherry-pick-root.sh                   |  10 +-\n t/t3504-cherry-pick-rerere.sh                 |  24 +-\n t/t3505-cherry-pick-empty.sh                  |  24 +-\n t/t3506-cherry-pick-ff.sh                     |   8 +-\n t/t3507-cherry-pick-conflict.sh               |   2 +-\n t/t3508-cherry-pick-many-commits.sh           |  38 +-\n t/t3509-cherry-pick-merge-df.sh               |   2 +-\n t/t3512-cherry-pick-submodule.sh              |   2 +-\n t/t3600-rm.sh                                 |  10 +-\n t/t3701-add-interactive.sh                    |   4 +-\n t/t3901-i18n-patch.sh                         |  40 +-\n t/t3903-stash.sh                              |  32 +-\n t/t3910-mac-os-precompose.sh                  |   6 +-\n t/t4014-format-patch.sh                       | 176 +++---\n t/t4015-diff-whitespace.sh                    |   2 +-\n t/t4017-diff-retval.sh                        |   2 +-\n t/t4038-diff-combined.sh                      |  14 +-\n t/t4041-diff-submodule-option.sh              |   2 +-\n t/t4048-diff-combined-binary.sh               |  10 +-\n t/t4052-stat-output.sh                        |   4 +-\n t/t4056-diff-order.sh                         |   2 +-\n t/t4057-diff-combined-paths.sh                |  20 +-\n t/t4061-diff-indent.sh                        |  24 +-\n t/t4066-diff-emit-delay.sh                    |   2 +-\n t/t4068-diff-symmetric-merge-base.sh          |  48 +-\n t/t4103-apply-binary.sh                       |  36 +-\n t/t4108-apply-threeway.sh                     |  14 +-\n t/t4121-apply-diffs.sh                        |   2 +-\n t/t4122-apply-symlink-inside.sh               |   6 +-\n t/t4150-am.sh                                 |  26 +-\n t/t4200-rerere.sh                             |  20 +-\n t/t4201-shortlog.sh                           |   2 +-\n t/t4202-log.sh                                | 106 ++--\n t/t4203-mailmap.sh                            |   2 +-\n t/t4204-patch-id.sh                           |  26 +-\n t/t4207-log-decoration-colors.sh              |   6 +-\n t/t4208-log-magic-pathspec.sh                 |   4 +-\n t/t4211/history.export                        |   2 +-\n t/t4214-log-graph-octopus.sh                  |   2 +-\n t/t4216-log-bloom.sh                          |   4 +-\n t/t4253-am-keep-cr-dos.sh                     |  20 +-\n t/t4257-am-interactive.sh                     |   2 +-\n t/t5150-request-pull.sh                       |  34 +-\n t/t5304-prune.sh                              |   2 +-\n t/t5305-include-tag.sh                        |   2 +-\n t/t5312-prune-corruption.sh                   |  16 +-\n t/t5317-pack-objects-filter-objects.sh        |   2 +-\n t/t5322-pack-objects-sparse.sh                |   2 +-\n t/t5323-pack-redundant.sh                     |  66 +--\n t/t5400-send-pack.sh                          |  60 +--\n t/t5401-update-hooks.sh                       |  24 +-\n t/t5402-post-merge-hook.sh                    |   2 +-\n t/t5403-post-checkout-hook.sh                 |   6 +-\n t/t5404-tracking-branches.sh                  |   8 +-\n t/t5405-send-pack-rewind.sh                   |   6 +-\n t/t5407-post-rewrite-hook.sh                  |   2 +-\n t/t5410-receive-pack-alternates.sh            |   4 +-\n t/t5500-fetch-pack.sh                         |  28 +-\n t/t5501-fetch-push-alternates.sh              |   4 +-\n t/t5502-quickfetch.sh                         |   6 +-\n t/t5503-tagfollow.sh                          |  12 +-\n t/t5504-fetch-receive-strict.sh               |  20 +-\n t/t5505-remote.sh                             | 148 +++---\n t/t5506-remote-groups.sh                      |   4 +-\n t/t5509-fetch-push-namespaces.sh              |  30 +-\n t/t5510-fetch.sh                              | 162 +++---\n t/t5511-refspec.sh                            |  12 +-\n t/t5512-ls-remote.sh                          |  26 +-\n t/t5514-fetch-multiple.sh                     |  30 +-\n t/t5516-fetch-push.sh                         | 500 +++++++++---------\n t/t5517-push-mirror.sh                        | 124 ++---\n t/t5518-fetch-exit-status.sh                  |   6 +-\n t/t5519-push-alternates.sh                    |  12 +-\n t/t5520-pull.sh                               |  30 +-\n t/t5521-pull-options.sh                       |  16 +-\n t/t5523-push-upstream.sh                      |  30 +-\n t/t5526-fetch-submodules.sh                   |  48 +-\n t/t5527-fetch-odd-refs.sh                     |  14 +-\n t/t5528-push-default.sh                       |  98 ++--\n t/t5529-push-errors.sh                        |   2 +-\n t/t5530-upload-pack-error.sh                  |   2 +-\n t/t5531-deep-submodule-push.sh                | 188 +++----\n t/t5533-push-cas.sh                           | 142 ++---\n t/t5534-push-signed.sh                        |   4 +-\n t/t5537-fetch-shallow.sh                      |  30 +-\n t/t5538-push-shallow.sh                       |  22 +-\n t/t5539-fetch-http-shallow.sh                 |  14 +-\n t/t5540-http-push-webdav.sh                   |   8 +-\n t/t5541-http-push-smart.sh                    |  40 +-\n t/t5542-push-http-shallow.sh                  |   8 +-\n t/t5543-atomic-push.sh                        |  80 +--\n t/t5545-push-options.sh                       |  62 +--\n t/t5548-push-porcelain.sh                     |  64 +--\n t/t5550-http-fetch-dumb.sh                    |  20 +-\n t/t5551-http-fetch-smart.sh                   |  20 +-\n t/t5552-skipping-fetch-negotiator.sh          |   2 +-\n t/t5553-set-upstream.sh                       |  82 +--\n t/t5561-http-backend.sh                       |   4 +-\n t/t556x_common                                |   8 +-\n t/t5570-git-daemon.sh                         |  16 +-\n t/t5571-pre-push-hook.sh                      |   4 +-\n t/t5572-pull-submodule.sh                     |   4 +-\n t/t5580-unc-paths.sh                          |   2 +-\n t/t5581-http-curl-verbose.sh                  |   2 +-\n t/t5582-fetch-negative-refspec.sh             |  22 +-\n t/t5601-clone.sh                              |   4 +-\n t/t5604-clone-reference.sh                    |  12 +-\n t/t5605-clone-local.sh                        |  10 +-\n t/t5606-clone-options.sh                      |   8 +-\n t/t5607-clone-bundle.sh                       |  14 +-\n t/t5608-clone-2gb.sh                          |   2 +-\n t/t5609-clone-branch.sh                       |   6 +-\n t/t5610-clone-detached.sh                     |   4 +-\n t/t5611-clone-config.sh                       |  16 +-\n t/t5612-clone-refspec.sh                      |  42 +-\n t/t5614-clone-submodules-shallow.sh           |   2 +-\n t/t5616-partial-clone.sh                      |  50 +-\n t/t5617-clone-submodules-remote.sh            |   6 +-\n t/t5700-protocol-v1.sh                        |  16 +-\n t/t5701-git-serve.sh                          |  16 +-\n t/t5702-protocol-v2.sh                        |  50 +-\n t/t5703-upload-pack-ref-in-want.sh            |  60 +--\n t/t5801-remote-helpers.sh                     |  24 +-\n t/t6000-rev-list-misc.sh                      |   2 +-\n t/t6001-rev-list-graft.sh                     |   2 +-\n t/t6004-rev-list-path-optim.sh                |  14 +-\n t/t6006-rev-list-format.sh                    |  14 +-\n t/t6007-rev-list-cherry-pick-file.sh          |   4 +-\n t/t6008-rev-list-submodule.sh                 |   2 +-\n t/t6009-rev-list-parent.sh                    |   6 +-\n t/t6012-rev-list-simplify.sh                  |   8 +-\n t/t6013-rev-list-reverse-parents.sh           |  10 +-\n t/t6016-rev-list-graph-simplify-history.sh    |   2 +-\n t/t6017-rev-list-stdin.sh                     |   8 +-\n t/t6018-rev-list-glob.sh                      |  50 +-\n t/t6019-rev-list-ancestry-path.sh             |   6 +-\n t/t6030-bisect-porcelain.sh                   |  10 +-\n t/t6040-tracking-info.sh                      |  54 +-\n t/t6050-replace.sh                            |  10 +-\n t/t6101-rev-parse-parents.sh                  |   2 +-\n t/t6110-rev-list-sparse.sh                    |   2 +-\n t/t6111-rev-list-treesame.sh                  |   6 +-\n t/t6112-rev-list-filters-objects.sh           |  14 +-\n t/t6120-describe.sh                           |  20 +-\n t/t6200-fmt-merge-msg.sh                      |  50 +-\n t/t6302-for-each-ref-filter.sh                |  58 +-\n t/t6400-merge-df.sh                           |   6 +-\n t/t6402-merge-rename.sh                       |  46 +-\n t/t6404-recursive-merge.sh                    |   4 +-\n t/t6405-merge-symlinks.sh                     |  14 +-\n t/t6406-merge-attr.sh                         |  24 +-\n t/t6407-merge-binary.sh                       |   6 +-\n t/t6409-merge-subtree.sh                      |  16 +-\n t/t6411-merge-filemode.sh                     |  10 +-\n t/t6412-merge-large-rename.sh                 |   6 +-\n t/t6413-merge-crlf.sh                         |   2 +-\n t/t6414-merge-rename-nocruft.sh               |   2 +-\n t/t6415-merge-dir-to-symlink.sh               |  22 +-\n t/t6416-recursive-corner-cases.sh             |  28 +-\n t/t6417-merge-ours-theirs.sh                  |  28 +-\n t/t6418-merge-text-auto.sh                    |  12 +-\n t/t6419-merge-ignorecase.sh                   |  10 +-\n t/t6422-merge-rename-corner-cases.sh          |  12 +-\n t/t6425-merge-rename-delete.sh                |   2 +-\n t/t6427-diff3-conflict-markers.sh             |  14 +-\n t/t6430-merge-recursive.sh                    |  18 +-\n t/t6432-merge-recursive-space-options.sh      |   6 +-\n t/t6433-merge-toplevel.sh                     |   8 +-\n t/t6434-merge-recursive-rename-options.sh     |   6 +-\n t/t6436-merge-overwrite.sh                    |   2 +-\n t/t6437-submodule-merge.sh                    |  14 +-\n t/t6439-merge-co-error-msgs.sh                |   6 +-\n t/t6501-freshen-objects.sh                    |   2 +-\n t/t7003-filter-branch.sh                      |  40 +-\n t/t7004-tag.sh                                |   8 +-\n t/t7030-verify-tag.sh                         |   2 +-\n t/t7060-wtstatus.sh                           |  26 +-\n t/t7063-status-untracked-cache.sh             |  14 +-\n t/t7102-reset.sh                              |   6 +-\n t/t7113-post-index-change-hook.sh             |   2 +-\n t/t7201-co.sh                                 | 110 ++--\n t/t7400-submodule-basic.sh                    |  20 +-\n t/t7403-submodule-sync.sh                     |  10 +-\n t/t7406-submodule-update.sh                   |  38 +-\n t/t7407-submodule-foreach.sh                  |  24 +-\n t/t7409-submodule-detached-work-tree.sh       |   8 +-\n t/t7417-submodule-path-url.sh                 |   2 +-\n t/t7501-commit-basic-functionality.sh         |   2 +-\n t/t7502-commit-porcelain.sh                   |  12 +-\n ...3-pre-commit-and-pre-merge-commit-hooks.sh |  42 +-\n t/t7504-commit-msg-hook.sh                    |  24 +-\n t/t7505-prepare-commit-msg-hook.sh            |  20 +-\n t/t7508-status.sh                             |  58 +-\n t/t7510-signed-commit.sh                      |   2 +-\n t/t7512-status-help.sh                        |  40 +-\n t/t7517-per-repo-email.sh                     |  12 +-\n t/t7600-merge.sh                              |  44 +-\n t/t7606-merge-custom.sh                       |   2 +-\n t/t7608-merge-messages.sh                     |  36 +-\n t/t7610-mergetool.sh                          | 174 +++---\n t/t7611-merge-abort.sh                        |   4 +-\n t/t7612-merge-verify-signatures.sh            |   2 +-\n t/t7614-merge-signoff.sh                      |  24 +-\n t/t7701-repack-unpack-unreachable.sh          |   2 +-\n t/t7800-difftool.sh                           |  38 +-\n t/t7810-grep.sh                               |  28 +-\n t/t8001-annotate.sh                           |   2 +-\n t/t8003-blame-corner-cases.sh                 |   4 +-\n t/t8004-blame-with-conflicts.sh               |  14 +-\n t/t9001-send-email.sh                         |  28 +-\n t/t9100-git-svn-basic.sh                      |   2 +-\n t/t9145-git-svn-master-branch.sh              |   6 +-\n t/t9151-svn-mergeinfo.sh                      |   2 +-\n t/t9155-git-svn-fetch-deleted-tag.sh          |   2 +-\n t/t9156-git-svn-fetch-deleted-tag-2.sh        |   6 +-\n t/t9163-git-svn-reset-clears-caches.sh        |   2 +-\n t/t9169-git-svn-dcommit-crlf.sh               |   2 +-\n t/t9300-fast-import.sh                        |  82 +--\n t/t9301-fast-import-notes.sh                  |  14 +-\n t/t9302-fast-import-unpack-limit.sh           |  16 +-\n t/t9350-fast-export.sh                        |  86 +--\n t/t9351-fast-export-anonymize.sh              |   4 +-\n t/t9400-git-cvsserver-server.sh               |  32 +-\n t/t9401-git-cvsserver-crlf.sh                 |  16 +-\n t/t9402-git-cvsserver-refs.sh                 |   8 +-\n t/t9500-gitweb-standalone-no-errors.sh        |  20 +-\n t/t9501-gitweb-standalone-http-status.sh      |  14 +-\n t/t9502-gitweb-standalone-parse-output.sh     |  16 +-\n t/t9600-cvsimport.sh                          |   2 +-\n t/t9601-cvsimport-vendor-branch.sh            |  16 +-\n t/t9602-cvsimport-branches-tags.sh            |   4 +-\n t/t9603-cvsimport-patchsets.sh                |   8 +-\n t/t9800-git-p4-basic.sh                       |   2 +-\n t/t9801-git-p4-branch.sh                      |  16 +-\n t/t9806-git-p4-options.sh                     |  18 +-\n t/t9807-git-p4-submit.sh                      |   2 +-\n t/t9811-git-p4-label-import.sh                |   2 +-\n t/t9903-bash-prompt.sh                        | 114 ++--\n t/test-lib.sh                                 |  13 +\n 351 files changed, 3903 insertions(+), 3890 deletions(-)\n\n\nbase-commit: aff20da3a209088e7f8f3632077fa11b86453d67\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-762%2Fdscho%2Fuse-main-as-default-branch-name-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-762/dscho/use-main-as-default-branch-name-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/762\n-- \ngitgitgadget\n"},{"id":"409823","messageId":"1ef276c97efc63ca714b51083b364e3d6eac9ed4.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 19/28] t6[4-9]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:49Z","receivedAt":"2020-11-12T22:44:39Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t6[4-9]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t6400-merge-df.sh                       |  6 +--\n t/t6402-merge-rename.sh                   | 46 +++++++++++------------\n t/t6404-recursive-merge.sh                |  4 +-\n t/t6405-merge-symlinks.sh                 | 14 +++----\n t/t6406-merge-attr.sh                     | 24 ++++++------\n t/t6407-merge-binary.sh                   |  6 +--\n t/t6409-merge-subtree.sh                  | 16 ++++----\n t/t6411-merge-filemode.sh                 | 10 ++---\n t/t6412-merge-large-rename.sh             |  6 +--\n t/t6413-merge-crlf.sh                     |  2 +-\n t/t6414-merge-rename-nocruft.sh           |  2 +-\n t/t6415-merge-dir-to-symlink.sh           | 22 +++++------\n t/t6416-recursive-corner-cases.sh         | 28 +++++++-------\n t/t6417-merge-ours-theirs.sh              | 28 +++++++-------\n t/t6418-merge-text-auto.sh                | 12 +++---\n t/t6419-merge-ignorecase.sh               | 10 ++---\n t/t6422-merge-rename-corner-cases.sh      | 12 +++---\n t/t6425-merge-rename-delete.sh            |  2 +-\n t/t6427-diff3-conflict-markers.sh         | 14 +++----\n t/t6430-merge-recursive.sh                | 18 ++++-----\n t/t6432-merge-recursive-space-options.sh  |  6 +--\n t/t6433-merge-toplevel.sh                 |  8 ++--\n t/t6434-merge-recursive-rename-options.sh |  6 +--\n t/t6436-merge-overwrite.sh                |  2 +-\n t/t6437-submodule-merge.sh                | 14 +++----\n t/t6439-merge-co-error-msgs.sh            |  6 +--\n t/t6501-freshen-objects.sh                |  2 +-\n t/test-lib.sh                             |  2 +-\n 28 files changed, 164 insertions(+), 164 deletions(-)\n\ndiff --git a/t/t6400-merge-df.sh b/t/t6400-merge-df.sh\nindex 9da0838216..f7907df3af 100755\n--- a/t/t6400-merge-df.sh\n+++ b/t/t6400-merge-df.sh\n@@ -24,12 +24,12 @@ test_expect_success 'prepare repository' '\n '\n \n test_expect_success 'Merge with d/f conflicts' '\n-\ttest_expect_code 1 git merge -m \"merge msg\" master\n+\ttest_expect_code 1 git merge -m \"merge msg\" main\n '\n \n test_expect_success 'F/D conflict' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \trm .git/index &&\n \n \tmkdir before &&\n@@ -47,7 +47,7 @@ test_expect_success 'F/D conflict' '\n \tgit add . &&\n \tgit commit -m para &&\n \n-\tgit merge master\n+\tgit merge main\n '\n \n test_expect_success 'setup modify/delete + directory/file conflict' '\ndiff --git a/t/t6402-merge-rename.sh b/t/t6402-merge-rename.sh\nindex 3f64f62224..82b1b00d5b 100755\n--- a/t/t6402-merge-rename.sh\n+++ b/t/t6402-merge-rename.sh\n@@ -54,9 +54,9 @@ test_expect_success 'setup' '\n \tgit branch change &&\n \tgit branch change+rename &&\n \n-\tsed -e \"/^g /s/.*/g : master changes a line/\" <A >A+ &&\n+\tsed -e \"/^g /s/.*/g : main changes a line/\" <A >A+ &&\n \tmv A+ A &&\n-\tgit commit -a -m \"master updates A\" &&\n+\tgit commit -a -m \"main updates A\" &&\n \n \tgit checkout yellow &&\n \trm -f M &&\n@@ -94,7 +94,7 @@ test_expect_success 'setup' '\n \tgit update-index --add B &&\n \tgit commit -q -a -m \"changed and renamed\" &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'pull renaming branch into unrenaming one' \\\n@@ -109,7 +109,7 @@ test_expect_success 'pull renaming branch into unrenaming one' \\\n \tsed -ne \"/^g/{\n \tp\n \tq\n-\t}\" B | grep master &&\n+\t}\" B | grep main &&\n \tgit diff --exit-code white N\n '\n \n@@ -134,7 +134,7 @@ test_expect_success 'pull unrenaming branch into renaming one' \\\n '\n \tgit reset --hard &&\n \tgit show-branch &&\n-\ttest_expect_code 1 git pull . master &&\n+\ttest_expect_code 1 git pull . main &&\n \tgit ls-files -u B >b.stages &&\n \ttest_line_count = 3 b.stages &&\n \tgit ls-files -s N >n.stages &&\n@@ -187,7 +187,7 @@ test_expect_success 'interference with untracked working tree file' '\n test_expect_success 'interference with untracked working tree file' '\n \tgit reset --hard &&\n \trm -f A M &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit tag -f anchor &&\n \tgit show-branch &&\n \tgit pull . yellow &&\n@@ -198,7 +198,7 @@ test_expect_success 'interference with untracked working tree file' '\n test_expect_success 'updated working tree file should prevent the merge' '\n \tgit reset --hard &&\n \trm -f A M &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit tag -f anchor &&\n \tgit show-branch &&\n \techo >>M one line addition &&\n@@ -211,7 +211,7 @@ test_expect_success 'updated working tree file should prevent the merge' '\n test_expect_success 'updated working tree file should prevent the merge' '\n \tgit reset --hard &&\n \trm -f A M &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit tag -f anchor &&\n \tgit show-branch &&\n \techo >>M one line addition &&\n@@ -229,7 +229,7 @@ test_expect_success 'interference with untracked working tree file' '\n \tgit tag -f anchor &&\n \tgit show-branch &&\n \techo >M this file should not matter &&\n-\tgit pull . master &&\n+\tgit pull . main &&\n \ttest_path_is_file M &&\n \t! {\n \t\tgit ls-files -s |\n@@ -764,7 +764,7 @@ test_expect_success 'setup avoid unnecessary update, dir->(file,nothing)' '\n \tgit rm -rf df &&\n \tgit commit -mB &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit rm -rf df &&\n \techo bla >df &&\n \tgit add -A &&\n@@ -772,7 +772,7 @@ test_expect_success 'setup avoid unnecessary update, dir->(file,nothing)' '\n '\n \n test_expect_success 'avoid unnecessary update, dir->(file,nothing)' '\n-\tgit checkout -q master^0 &&\n+\tgit checkout -q main^0 &&\n \ttest-tool chmtime --get -3600 df >expect &&\n \tgit merge side &&\n \ttest-tool chmtime --get df >actual &&\n@@ -794,14 +794,14 @@ test_expect_success 'setup avoid unnecessary update, modify/delete' '\n \tgit rm -f file &&\n \tgit commit -m \"Delete file\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo bla >file &&\n \tgit add -A &&\n \tgit commit -m \"Modify file\"\n '\n \n test_expect_success 'avoid unnecessary update, modify/delete' '\n-\tgit checkout -q master^0 &&\n+\tgit checkout -q main^0 &&\n \ttest-tool chmtime --get -3600 file >expect &&\n \ttest_must_fail git merge side &&\n \ttest-tool chmtime --get file >actual &&\n@@ -823,13 +823,13 @@ test_expect_success 'setup avoid unnecessary update, rename/add-dest' '\n \tgit add -A &&\n \tgit commit -m \"Add file copy\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit mv file newfile &&\n \tgit commit -m \"Rename file\"\n '\n \n test_expect_success 'avoid unnecessary update, rename/add-dest' '\n-\tgit checkout -q master^0 &&\n+\tgit checkout -q main^0 &&\n \ttest-tool chmtime --get -3600 newfile >expect &&\n \tgit merge side &&\n \ttest-tool chmtime --get newfile >actual &&\n@@ -879,15 +879,15 @@ test_expect_success 'setup for use of extended merge markers' '\n \tgit mv original_file renamed_file &&\n \tgit commit -mB &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo 8.5 >>original_file &&\n \tgit add original_file &&\n \tgit commit -mC\n '\n \n-test_expect_success 'merge master into rename has correct extended markers' '\n+test_expect_success 'merge main into rename has correct extended markers' '\n \tgit checkout rename^0 &&\n-\ttest_must_fail git merge -s recursive master^0 &&\n+\ttest_must_fail git merge -s recursive main^0 &&\n \n \tcat >expected <<-\\EOF &&\n \t1\n@@ -902,14 +902,14 @@ test_expect_success 'merge master into rename has correct extended markers' '\n \t9\n \t=======\n \t8.5\n-\t>>>>>>> master^0:original_file\n+\t>>>>>>> main^0:original_file\n \tEOF\n \ttest_cmp expected renamed_file\n '\n \n-test_expect_success 'merge rename into master has correct extended markers' '\n+test_expect_success 'merge rename into main has correct extended markers' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git merge -s recursive rename^0 &&\n \n \tcat >expected <<-\\EOF &&\n@@ -945,13 +945,13 @@ test_expect_success 'setup spurious \"refusing to lose untracked\" message' '\n \tgit mv original_file renamed_file &&\n \tgit commit -mB &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit rm original_file &&\n \tgit commit -mC\n '\n \n test_expect_success 'no spurious \"refusing to lose untracked\" message' '\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git merge rename^0 2>errors.txt &&\n \t! grep \"refusing to lose untracked file\" errors.txt\n '\ndiff --git a/t/t6404-recursive-merge.sh b/t/t6404-recursive-merge.sh\nindex b1c3d4dda4..410a17865b 100755\n--- a/t/t6404-recursive-merge.sh\n+++ b/t/t6404-recursive-merge.sh\n@@ -19,11 +19,11 @@ test_expect_success 'setup tests' '\n \tgit add a1 &&\n \tGIT_AUTHOR_DATE=\"2006-12-12 23:00:00\" git commit -m 1 a1 &&\n \n-\tgit checkout -b A master &&\n+\tgit checkout -b A main &&\n \techo A >a1 &&\n \tGIT_AUTHOR_DATE=\"2006-12-12 23:00:01\" git commit -m A a1 &&\n \n-\tgit checkout -b B master &&\n+\tgit checkout -b B main &&\n \techo B >a1 &&\n \tGIT_AUTHOR_DATE=\"2006-12-12 23:00:02\" git commit -m B a1 &&\n \ndiff --git a/t/t6405-merge-symlinks.sh b/t/t6405-merge-symlinks.sh\nindex 6c0a90d044..160c2c10f6 100755\n--- a/t/t6405-merge-symlinks.sh\n+++ b/t/t6405-merge-symlinks.sh\n@@ -19,7 +19,7 @@ test_expect_success 'setup' '\n \tgit branch b-file &&\n \tl=$(printf file | git hash-object -t blob -w --stdin) &&\n \techo \"120000 $l\tsymlink\" | git update-index --index-info &&\n-\tgit commit -m master &&\n+\tgit commit -m main &&\n \tgit checkout b-symlink &&\n \tl=$(printf file-different | git hash-object -t blob -w --stdin) &&\n \techo \"120000 $l\tsymlink\" | git update-index --index-info &&\n@@ -30,28 +30,28 @@ test_expect_success 'setup' '\n \tgit commit -m b-file\n '\n \n-test_expect_success 'merge master into b-symlink, which has a different symbolic link' '\n+test_expect_success 'merge main into b-symlink, which has a different symbolic link' '\n \tgit checkout b-symlink &&\n-\ttest_must_fail git merge master\n+\ttest_must_fail git merge main\n '\n \n test_expect_success 'the merge result must be a file' '\n \ttest_path_is_file symlink\n '\n \n-test_expect_success 'merge master into b-file, which has a file instead of a symbolic link' '\n+test_expect_success 'merge main into b-file, which has a file instead of a symbolic link' '\n \tgit reset --hard &&\n \tgit checkout b-file &&\n-\ttest_must_fail git merge master\n+\ttest_must_fail git merge main\n '\n \n test_expect_success 'the merge result must be a file' '\n \ttest_path_is_file symlink\n '\n \n-test_expect_success 'merge b-file, which has a file instead of a symbolic link, into master' '\n+test_expect_success 'merge b-file, which has a file instead of a symbolic link, into main' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git merge b-file\n '\n \ndiff --git a/t/t6406-merge-attr.sh b/t/t6406-merge-attr.sh\nindex 76a55f838c..c559b5a3e6 100755\n--- a/t/t6406-merge-attr.sh\n+++ b/t/t6406-merge-attr.sh\n@@ -19,10 +19,10 @@ test_expect_success setup '\n \tgit branch side &&\n \tfor f in text binary union\n \tdo\n-\t\techo Master >>$f && git add $f || return 1\n+\t\techo Main >>$f && git add $f || return 1\n \tdone &&\n \ttest_tick &&\n-\tgit commit -m Master &&\n+\tgit commit -m Main &&\n \n \tgit checkout side &&\n \tfor f in text binary union\n@@ -64,7 +64,7 @@ test_expect_success merge '\n \t\techo \"union merge=union\"\n \t} >.gitattributes &&\n \n-\tif git merge master\n+\tif git merge main\n \tthen\n \t\techo Gaah, should have conflicted\n \t\tfalse\n@@ -87,7 +87,7 @@ test_expect_success 'check merge result in working tree' '\n \tgrep \"<<<<<<<\" text &&\n \tcmp binary-orig binary &&\n \t! grep \"<<<<<<<\" union &&\n-\tgrep Master union &&\n+\tgrep Main union &&\n \tgrep Side union\n \n '\n@@ -115,13 +115,13 @@ test_expect_success 'custom merge backend' '\n \tgit config --replace-all \\\n \tmerge.custom.name \"custom merge driver for testing\" &&\n \n-\tgit merge master &&\n+\tgit merge main &&\n \n \tcmp binary union &&\n \tsed -e 1,3d text >check-1 &&\n-\to=$(git unpack-file master^:text) &&\n+\to=$(git unpack-file main^:text) &&\n \ta=$(git unpack-file side^:text) &&\n-\tb=$(git unpack-file master:text) &&\n+\tb=$(git unpack-file main:text) &&\n \tsh -c \"./custom-merge $o $a $b 0 text\" &&\n \tsed -e 1,3d $a >check-2 &&\n \tcmp check-1 check-2 &&\n@@ -136,7 +136,7 @@ test_expect_success 'custom merge backend' '\n \tgit config --replace-all \\\n \tmerge.custom.name \"custom merge driver for testing\" &&\n \n-\tif git merge master\n+\tif git merge main\n \tthen\n \t\techo \"Eh? should have conflicted\"\n \t\tfalse\n@@ -146,9 +146,9 @@ test_expect_success 'custom merge backend' '\n \n \tcmp binary union &&\n \tsed -e 1,3d text >check-1 &&\n-\to=$(git unpack-file master^:text) &&\n+\to=$(git unpack-file main^:text) &&\n \ta=$(git unpack-file anchor:text) &&\n-\tb=$(git unpack-file master:text) &&\n+\tb=$(git unpack-file main:text) &&\n \tsh -c \"./custom-merge $o $a $b 0 text\" &&\n \tsed -e 1,3d $a >check-2 &&\n \tcmp check-1 check-2 &&\n@@ -176,7 +176,7 @@ test_expect_success 'up-to-date merge without common ancestor' '\n \ttest_tick &&\n \t(\n \t\tcd repo1 &&\n-\t\tgit fetch ../repo2 master &&\n+\t\tgit fetch ../repo2 main &&\n \t\tgit merge --allow-unrelated-histories FETCH_HEAD\n \t)\n '\n@@ -201,7 +201,7 @@ test_expect_success 'custom merge does not lock index' '\n \t# By packaging the command in test_when_finished, we get both\n \t# the correctness check and the clean-up.\n \ttest_when_finished \"kill \\$(cat sleep.pid)\" &&\n-\tgit merge master\n+\tgit merge main\n '\n \n test_done\ndiff --git a/t/t6407-merge-binary.sh b/t/t6407-merge-binary.sh\nindex 4e6c7cb77e..a76c85ec1e 100755\n--- a/t/t6407-merge-binary.sh\n+++ b/t/t6407-merge-binary.sh\n@@ -20,7 +20,7 @@ test_expect_success setup '\n \tgit ls-files -s a >E0 &&\n \tgit ls-files -s m | sed -e \"s/ 0\t/ 3\t/\" >E3 &&\n \ttest_tick &&\n-\tgit commit -m \"master adds some\" &&\n+\tgit commit -m \"main adds some\" &&\n \n \tgit checkout side &&\n \techo rezrov >>m &&\n@@ -39,7 +39,7 @@ test_expect_success resolve '\n \trm -f a* m* &&\n \tgit reset --hard anchor &&\n \n-\tif git merge -s resolve master\n+\tif git merge -s resolve main\n \tthen\n \t\techo Oops, should not have succeeded\n \t\tfalse\n@@ -54,7 +54,7 @@ test_expect_success recursive '\n \trm -f a* m* &&\n \tgit reset --hard anchor &&\n \n-\tif git merge -s recursive master\n+\tif git merge -s recursive main\n \tthen\n \t\techo Oops, should not have succeeded\n \t\tfalse\ndiff --git a/t/t6409-merge-subtree.sh b/t/t6409-merge-subtree.sh\nindex b8e8b6f642..55ae58584a 100755\n--- a/t/t6409-merge-subtree.sh\n+++ b/t/t6409-merge-subtree.sh\n@@ -14,10 +14,10 @@ test_expect_success setup '\n \techo >>hello world &&\n \tgit add hello &&\n \tgit commit -m second &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tfor i in mundo $s; do echo $i; done >hello &&\n \tgit add hello &&\n-\tgit commit -m master\n+\tgit commit -m main\n \n '\n \n@@ -36,7 +36,7 @@ test_expect_success 'setup branch sub' '\n '\n \n test_expect_success 'setup topic branch' '\n-\tgit checkout -b topic master &&\n+\tgit checkout -b topic main &&\n \tgit merge -s ours --no-commit --allow-unrelated-histories sub &&\n \tgit read-tree --prefix=dir/ -u sub &&\n \tgit commit -m \"initial merge of sub into topic\" &&\n@@ -77,8 +77,8 @@ test_expect_success 'setup' '\n \n test_expect_success 'initial merge' '\n \tgit remote add -f gui ../git-gui &&\n-\tgit merge -s ours --no-commit --allow-unrelated-histories gui/master &&\n-\tgit read-tree --prefix=git-gui/ -u gui/master &&\n+\tgit merge -s ours --no-commit --allow-unrelated-histories gui/main &&\n+\tgit read-tree --prefix=git-gui/ -u gui/main &&\n \tgit commit -m \"Merge git-gui as our subdirectory\" &&\n \tgit checkout -b work &&\n \tgit ls-files -s >actual &&\n@@ -108,10 +108,10 @@ test_expect_success 'merge update' '\n \n test_expect_success 'initial ambiguous subtree' '\n \tcd ../git &&\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b topic_2 &&\n-\tgit merge -s ours --no-commit gui/master &&\n-\tgit read-tree --prefix=git-gui2/ -u gui/master &&\n+\tgit merge -s ours --no-commit gui/main &&\n+\tgit read-tree --prefix=git-gui2/ -u gui/main &&\n \tgit commit -m \"Merge git-gui2 as our subdirectory\" &&\n \tgit checkout -b work2 &&\n \tgit ls-files -s >actual &&\ndiff --git a/t/t6411-merge-filemode.sh b/t/t6411-merge-filemode.sh\nindex 87741efad3..7ded226de4 100755\n--- a/t/t6411-merge-filemode.sh\n+++ b/t/t6411-merge-filemode.sh\n@@ -7,11 +7,11 @@ test_expect_success 'set up mode change in one branch' '\n \t: >file1 &&\n \tgit add file1 &&\n \tgit commit -m initial &&\n-\tgit checkout -b a1 master &&\n+\tgit checkout -b a1 main &&\n \t: >dummy &&\n \tgit add dummy &&\n \tgit commit -m a &&\n-\tgit checkout -b b1 master &&\n+\tgit checkout -b b1 main &&\n \ttest_chmod +x file1 &&\n \tgit add file1 &&\n \tgit commit -m b1\n@@ -39,12 +39,12 @@ do_one_mode resolve b1 a1\n \n test_expect_success 'set up mode change in both branches' '\n \tgit reset --hard HEAD &&\n-\tgit checkout -b a2 master &&\n+\tgit checkout -b a2 main &&\n \t: >file2 &&\n \tH=$(git hash-object file2) &&\n \ttest_chmod +x file2 &&\n \tgit commit -m a2 &&\n-\tgit checkout -b b2 master &&\n+\tgit checkout -b b2 main &&\n \t: >file2 &&\n \tgit add file2 &&\n \tgit commit -m b2 &&\n@@ -76,7 +76,7 @@ do_both_modes resolve\n \n test_expect_success 'set up delete/modechange scenario' '\n \tgit reset --hard &&\n-\tgit checkout -b deletion master &&\n+\tgit checkout -b deletion main &&\n \tgit rm file1 &&\n \tgit commit -m deletion\n '\ndiff --git a/t/t6412-merge-large-rename.sh b/t/t6412-merge-large-rename.sh\nindex 80777386dc..489ebd9bb7 100755\n--- a/t/t6412-merge-large-rename.sh\n+++ b/t/t6412-merge-large-rename.sh\n@@ -30,7 +30,7 @@ test_rename() {\n \ttest_expect_success \"rename ($1, $2)\" '\n \tn='$1' &&\n \texpect='$2' &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \ttest_might_fail git branch -D test$n &&\n \tgit reset --hard initial &&\n \tfor i in $(count $n); do\n@@ -50,8 +50,8 @@ test_rename() {\n \tgit add . &&\n \tgit commit -m change+rename=$n &&\n \tcase \"$expect\" in\n-\t\tok) git merge master ;;\n-\t\t *) test_must_fail git merge master ;;\n+\t\tok) git merge main ;;\n+\t\t *) test_must_fail git merge main ;;\n \tesac\n \t'\n }\ndiff --git a/t/t6413-merge-crlf.sh b/t/t6413-merge-crlf.sh\nindex e8d65eefb5..feaf9ef1a0 100755\n--- a/t/t6413-merge-crlf.sh\n+++ b/t/t6413-merge-crlf.sh\n@@ -24,7 +24,7 @@ test_expect_success setup '\n \techo line from b | append_cr >file &&\n \tgit commit -m \"add line from b\" file &&\n \tgit tag b &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'Check \"ours\" is CRLF' '\ndiff --git a/t/t6414-merge-rename-nocruft.sh b/t/t6414-merge-rename-nocruft.sh\nindex a25e730460..81fa89331c 100755\n--- a/t/t6414-merge-rename-nocruft.sh\n+++ b/t/t6414-merge-rename-nocruft.sh\n@@ -65,7 +65,7 @@ test_expect_success 'setup' '\n \tgit update-index A &&\n \tgit commit -m \"blue modify A\" &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n # This test broke in 65ac6e9c3f47807cb603af07a6a9e1a43bc119ae\ndiff --git a/t/t6415-merge-dir-to-symlink.sh b/t/t6415-merge-dir-to-symlink.sh\nindex 2eddcc7664..3bbabbee49 100755\n--- a/t/t6415-merge-dir-to-symlink.sh\n+++ b/t/t6415-merge-dir-to-symlink.sh\n@@ -19,7 +19,7 @@ test_expect_success 'create a commit where dir a/b changed to symlink' '\n \n test_expect_success 'checkout does not clobber untracked symlink' '\n \tgit checkout HEAD^0 &&\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit rm --cached a/b &&\n \tgit commit -m \"untracked symlink remains\" &&\n \ttest_must_fail git checkout start^0\n@@ -27,7 +27,7 @@ test_expect_success 'checkout does not clobber untracked symlink' '\n \n test_expect_success 'a/b-2/c/d is kept when clobbering symlink b' '\n \tgit checkout HEAD^0 &&\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit rm --cached a/b &&\n \tgit commit -m \"untracked symlink remains\" &&\n \tgit checkout -f start^0 &&\n@@ -36,7 +36,7 @@ test_expect_success 'a/b-2/c/d is kept when clobbering symlink b' '\n \n test_expect_success 'checkout should not have deleted a/b-2/c/d' '\n \tgit checkout HEAD^0 &&\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \t git checkout start^0 &&\n \t test_path_is_file a/b-2/c/d\n '\n@@ -53,7 +53,7 @@ test_expect_success 'setup for merge test' '\n test_expect_success 'Handle D/F conflict, do not lose a/b-2/c/d in merge (resolve)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n-\tgit merge -s resolve master &&\n+\tgit merge -s resolve main &&\n \ttest_path_is_file a/b-2/c/d\n '\n \n@@ -64,7 +64,7 @@ test_expect_success SYMLINKS 'a/b was resolved as symlink' '\n test_expect_success 'Handle D/F conflict, do not lose a/b-2/c/d in merge (recursive)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n-\tgit merge -s recursive master &&\n+\tgit merge -s recursive main &&\n \ttest_path_is_file a/b-2/c/d\n '\n \n@@ -74,7 +74,7 @@ test_expect_success SYMLINKS 'a/b was resolved as symlink' '\n \n test_expect_success 'Handle F/D conflict, do not lose a/b-2/c/d in merge (resolve)' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit merge -s resolve baseline^0 &&\n \ttest_path_is_file a/b-2/c/d\n '\n@@ -85,7 +85,7 @@ test_expect_success SYMLINKS 'a/b was resolved as symlink' '\n \n test_expect_success 'Handle F/D conflict, do not lose a/b-2/c/d in merge (recursive)' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit merge -s recursive baseline^0 &&\n \ttest_path_is_file a/b-2/c/d\n '\n@@ -98,7 +98,7 @@ test_expect_failure 'do not lose untracked in merge (resolve)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n \t>a/b/c/e &&\n-\ttest_must_fail git merge -s resolve master &&\n+\ttest_must_fail git merge -s resolve main &&\n \ttest_path_is_file a/b/c/e &&\n \ttest_path_is_file a/b-2/c/d\n '\n@@ -107,7 +107,7 @@ test_expect_success 'do not lose untracked in merge (recursive)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n \t>a/b/c/e &&\n-\ttest_must_fail git merge -s recursive master &&\n+\ttest_must_fail git merge -s recursive main &&\n \ttest_path_is_file a/b/c/e &&\n \ttest_path_is_file a/b-2/c/d\n '\n@@ -116,14 +116,14 @@ test_expect_success 'do not lose modifications in merge (resolve)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n \techo more content >>a/b/c/d &&\n-\ttest_must_fail git merge -s resolve master\n+\ttest_must_fail git merge -s resolve main\n '\n \n test_expect_success 'do not lose modifications in merge (recursive)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n \techo more content >>a/b/c/d &&\n-\ttest_must_fail git merge -s recursive master\n+\ttest_must_fail git merge -s recursive main\n '\n \n test_expect_success 'setup a merge where dir a/b-2 changed to symlink' '\ndiff --git a/t/t6416-recursive-corner-cases.sh b/t/t6416-recursive-corner-cases.sh\nindex dbccc3158a..b43ecb38b7 100755\n--- a/t/t6416-recursive-corner-cases.sh\n+++ b/t/t6416-recursive-corner-cases.sh\n@@ -385,7 +385,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete' '\n \t\ttest_line_count = 2 out &&\n \n \t\tgit rev-parse >expect       \\\n-\t\t\tmaster:file    B:file &&\n+\t\t\tmain:file    B:file &&\n \t\tgit rev-parse   >actual      \\\n \t\t\t:1:file      :2:file &&\n \t\ttest_cmp expect actual\n@@ -407,7 +407,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete, rev\n \t\ttest_line_count = 2 out &&\n \n \t\tgit rev-parse >expect       \\\n-\t\t\tmaster:file    B:file &&\n+\t\t\tmain:file    B:file &&\n \t\tgit rev-parse   >actual      \\\n \t\t\t:1:file      :3:file &&\n \t\ttest_cmp expect actual\n@@ -1553,12 +1553,12 @@ test_expect_failure 'check conflicting modes for regular file' '\n # Setup:\n #          L1---L2\n #         /  \\ /  \\\n-#     master    X    ?\n+#     main    X    ?\n #         \\  / \\  /\n #          R1---R2\n #\n # Where:\n-#   master has two files, named 'b' and 'a'\n+#   main has two files, named 'b' and 'a'\n #   branches L1 and R1 both modify each of the two files in conflicting ways\n #\n #   L2 is a merge of R1 into L1; more on it later.\n@@ -1663,7 +1663,7 @@ test_expect_success 'check nested conflicts' '\n \t\tcd nested_conflicts &&\n \n \t\tgit clean -f &&\n-\t\tMASTER=$(git rev-parse --short master) &&\n+\t\tMAIN=$(git rev-parse --short main) &&\n \t\tgit checkout L2^0 &&\n \n \t\t# Merge must fail; there is a conflict\n@@ -1679,24 +1679,24 @@ test_expect_success 'check nested conflicts' '\n \t\ttest_line_count = 1 out &&\n \n \t\t# Create a and b from virtual merge base X\n-\t\tgit cat-file -p master:a >base &&\n+\t\tgit cat-file -p main:a >base &&\n \t\tgit cat-file -p L1:a >ours &&\n \t\tgit cat-file -p R1:a >theirs &&\n \t\ttest_must_fail git merge-file --diff3 \\\n \t\t\t-L \"Temporary merge branch 1\" \\\n-\t\t\t-L \"$MASTER\"  \\\n+\t\t\t-L \"$MAIN\"  \\\n \t\t\t-L \"Temporary merge branch 2\" \\\n \t\t\tours  \\\n \t\t\tbase  \\\n \t\t\ttheirs &&\n \t\tsed -e \"s/^\\([<|=>]\\)/\\1\\1/\" ours >vmb_a &&\n \n-\t\tgit cat-file -p master:b >base &&\n+\t\tgit cat-file -p main:b >base &&\n \t\tgit cat-file -p L1:b >ours &&\n \t\tgit cat-file -p R1:b >theirs &&\n \t\ttest_must_fail git merge-file --diff3 \\\n \t\t\t-L \"Temporary merge branch 1\" \\\n-\t\t\t-L \"$MASTER\"  \\\n+\t\t\t-L \"$MAIN\"  \\\n \t\t\t-L \"Temporary merge branch 2\" \\\n \t\t\tours  \\\n \t\t\tbase  \\\n@@ -1748,12 +1748,12 @@ test_expect_success 'check nested conflicts' '\n # Setup:\n #          L1---L2---L3\n #         /  \\ /  \\ /  \\\n-#     master    X1   X2   ?\n+#     main    X1   X2   ?\n #         \\  / \\  / \\  /\n #          R1---R2---R3\n #\n # Where:\n-#   master has one file named 'content'\n+#   main has one file named 'content'\n #   branches L1 and R1 both modify each of the two files in conflicting ways\n #\n #   L<n> (n>1) is a merge of R<n-1> into L<n-1>\n@@ -1834,7 +1834,7 @@ test_expect_success 'check virtual merge base with nested conflicts' '\n \t(\n \t\tcd virtual_merge_base_has_nested_conflicts &&\n \n-\t\tMASTER=$(git rev-parse --short master) &&\n+\t\tMAIN=$(git rev-parse --short main) &&\n \t\tgit checkout L3^0 &&\n \n \t\t# Merge must fail; there is a conflict\n@@ -1857,13 +1857,13 @@ test_expect_success 'check virtual merge base with nested conflicts' '\n \t\t# Imitate X1 merge base, except without long enough conflict\n \t\t# markers because a subsequent sed will modify them.  Put\n \t\t# result into vmb.\n-\t\tgit cat-file -p master:content >base &&\n+\t\tgit cat-file -p main:content >base &&\n \t\tgit cat-file -p L:content >left &&\n \t\tgit cat-file -p R:content >right &&\n \t\tcp left merged-once &&\n \t\ttest_must_fail git merge-file --diff3 \\\n \t\t\t-L \"Temporary merge branch 1\" \\\n-\t\t\t-L \"$MASTER\"  \\\n+\t\t\t-L \"$MAIN\"  \\\n \t\t\t-L \"Temporary merge branch 2\" \\\n \t\t\tmerged-once \\\n \t\t\tbase        \\\ndiff --git a/t/t6417-merge-ours-theirs.sh b/t/t6417-merge-ours-theirs.sh\nindex 0aebc6c028..4bb77b9779 100755\n--- a/t/t6417-merge-ours-theirs.sh\n+++ b/t/t6417-merge-ours-theirs.sh\n@@ -20,11 +20,11 @@ test_expect_success setup '\n \tsed -e \"s/9/nueve/\" >file <elif &&\n \tgit commit -a -m theirs &&\n \n-\tgit checkout master^0\n+\tgit checkout main^0\n '\n \n test_expect_success 'plain recursive - should conflict' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \ttest_must_fail git merge -s recursive side &&\n \tgrep nine file &&\n \tgrep nueve file &&\n@@ -34,7 +34,7 @@ test_expect_success 'plain recursive - should conflict' '\n '\n \n test_expect_success 'recursive favouring theirs' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit merge -s recursive -Xtheirs side &&\n \t! grep nine file &&\n \tgrep nueve file &&\n@@ -44,7 +44,7 @@ test_expect_success 'recursive favouring theirs' '\n '\n \n test_expect_success 'recursive favouring ours' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit merge -s recursive -X ours side &&\n \tgrep nine file &&\n \t! grep nueve file &&\n@@ -56,26 +56,26 @@ test_expect_success 'recursive favouring ours' '\n test_expect_success 'binary file with -Xours/-Xtheirs' '\n \techo file binary >.gitattributes &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit merge -s recursive -X theirs side &&\n \tgit diff --exit-code side HEAD -- file &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit merge -s recursive -X ours side &&\n-\tgit diff --exit-code master HEAD -- file\n+\tgit diff --exit-code main HEAD -- file\n '\n \n test_expect_success 'pull passes -X to underlying merge' '\n-\tgit reset --hard master && git pull -s recursive -Xours . side &&\n-\tgit reset --hard master && git pull -s recursive -X ours . side &&\n-\tgit reset --hard master && git pull -s recursive -Xtheirs . side &&\n-\tgit reset --hard master && git pull -s recursive -X theirs . side &&\n-\tgit reset --hard master && test_must_fail git pull -s recursive -X bork . side\n+\tgit reset --hard main && git pull -s recursive -Xours . side &&\n+\tgit reset --hard main && git pull -s recursive -X ours . side &&\n+\tgit reset --hard main && git pull -s recursive -Xtheirs . side &&\n+\tgit reset --hard main && git pull -s recursive -X theirs . side &&\n+\tgit reset --hard main && test_must_fail git pull -s recursive -X bork . side\n '\n \n test_expect_success SYMLINKS 'symlink with -Xours/-Xtheirs' '\n-\tgit reset --hard master &&\n-\tgit checkout -b two master &&\n+\tgit reset --hard main &&\n+\tgit checkout -b two main &&\n \tln -s target-zero link &&\n \tgit add link &&\n \tgit commit -m \"add link pointing to zero\" &&\ndiff --git a/t/t6418-merge-text-auto.sh b/t/t6418-merge-text-auto.sh\nindex 30983d18b1..b8df80d2df 100755\n--- a/t/t6418-merge-text-auto.sh\n+++ b/t/t6418-merge-text-auto.sh\n@@ -2,13 +2,13 @@\n \n test_description='CRLF merge conflict across text=auto change\n \n-* [master] remove .gitattributes\n+* [main] remove .gitattributes\n  ! [side] add line from b\n --\n  + [side] add line from b\n-*  [master] remove .gitattributes\n-*  [master^] add line from a\n-*  [master~2] normalize file\n+*  [main] remove .gitattributes\n+*  [main^] add line from a\n+*  [main~2] normalize file\n *+ [side^] Initial\n '\n \n@@ -64,7 +64,7 @@ test_expect_success setup '\n \tgit commit -m \"add line from b\" &&\n \tgit tag b &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'set up fuzz_conflict() helper' '\n@@ -195,7 +195,7 @@ test_expect_success 'Test delete/normalize conflict' '\n \tgit reset --hard initial &&\n \tgit rm file &&\n \tgit commit -m \"remove file\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard a^ &&\n \tgit merge side &&\n \ttest_path_is_missing file\ndiff --git a/t/t6419-merge-ignorecase.sh b/t/t6419-merge-ignorecase.sh\nindex 531850d834..d32bbb3359 100755\n--- a/t/t6419-merge-ignorecase.sh\n+++ b/t/t6419-merge-ignorecase.sh\n@@ -20,18 +20,18 @@ test_expect_success 'merge with case-changing rename' '\n \t>foo &&\n \tgit add foo &&\n \tgit commit -m \"intervening commit\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit rm TestCase &&\n \t>testcase &&\n \tgit add testcase &&\n \tgit commit -m \"rename to testcase\" &&\n \tgit checkout with-camel &&\n-\tgit merge master -m \"merge\" &&\n+\tgit merge main -m \"merge\" &&\n \ttest_path_is_file testcase\n '\n \n test_expect_success 'merge with case-changing rename on both sides' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard baseline &&\n \tgit branch -D with-camel &&\n \tgit checkout -b with-camel &&\n@@ -40,13 +40,13 @@ test_expect_success 'merge with case-changing rename on both sides' '\n \t>foo &&\n \tgit add foo &&\n \tgit commit -m \"intervening commit\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit rm TestCase &&\n \t>testcase &&\n \tgit add testcase &&\n \tgit commit -m \"rename to testcase\" &&\n \tgit checkout with-camel &&\n-\tgit merge master -m \"merge\" &&\n+\tgit merge main -m \"merge\" &&\n \ttest_path_is_file testcase\n '\n \ndiff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh\nindex e40a1b686f..21c64b51be 100755\n--- a/t/t6422-merge-rename-corner-cases.sh\n+++ b/t/t6422-merge-rename-corner-cases.sh\n@@ -1130,7 +1130,7 @@ test_conflicts_with_adds_and_renames() {\n \t# Setup:\n \t#          L\n \t#         / \\\n-\t#     master   ?\n+\t#     main   ?\n \t#         \\ /\n \t#          R\n \t#\n@@ -1260,7 +1260,7 @@ test_conflicts_with_adds_and_renames() {\n \t\t\t\t:2:three           \\\n \t\t\t\t:3:three           &&\n \t\t\tgit rev-parse >expected        \\\n-\t\t\t\tmaster:irrelevant_file \\\n+\t\t\t\tmain:irrelevant_file \\\n \t\t\t\tfile_v2                \\\n \t\t\t\tfile_v4                &&\n \t\t\ttest_cmp expected actual &&\n@@ -1290,12 +1290,12 @@ test_conflicts_with_adds_and_renames add    add\n # Setup:\n #          L\n #         / \\\n-#     master   ?\n+#     main   ?\n #         \\ /\n #          R\n #\n # Where:\n-#   master has two files, named 'one' and 'two'.\n+#   main has two files, named 'one' and 'two'.\n #   branches L and R both modify 'one', in conflicting ways.\n #   branches L and R both modify 'two', in conflicting ways.\n #   branch L also renames 'one' to 'three'.\n@@ -1376,7 +1376,7 @@ test_expect_success 'check nested conflicts from rename/rename(2to1)' '\n \t\ttest_line_count = 1 out &&\n \n \t\t# Compare :2:three to expected values\n-\t\tgit cat-file -p master:one >base &&\n+\t\tgit cat-file -p main:one >base &&\n \t\tgit cat-file -p L:three >ours &&\n \t\tgit cat-file -p R:one >theirs &&\n \t\ttest_must_fail git merge-file    \\\n@@ -1387,7 +1387,7 @@ test_expect_success 'check nested conflicts from rename/rename(2to1)' '\n \t\ttest_cmp expect L-three &&\n \n \t\t# Compare :2:three to expected values\n-\t\tgit cat-file -p master:two >base &&\n+\t\tgit cat-file -p main:two >base &&\n \t\tgit cat-file -p L:two >ours &&\n \t\tgit cat-file -p R:three >theirs &&\n \t\ttest_must_fail git merge-file    \\\ndiff --git a/t/t6425-merge-rename-delete.sh b/t/t6425-merge-rename-delete.sh\nindex f79d021590..2d39bf630e 100755\n--- a/t/t6425-merge-rename-delete.sh\n+++ b/t/t6425-merge-rename-delete.sh\n@@ -12,7 +12,7 @@ test_expect_success 'rename/delete' '\n \tgit mv A B &&\n \tgit commit -m \"rename\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit rm A &&\n \tgit commit -m \"delete\" &&\n \ndiff --git a/t/t6427-diff3-conflict-markers.sh b/t/t6427-diff3-conflict-markers.sh\nindex f7620e677c..b28966d0f4 100755\n--- a/t/t6427-diff3-conflict-markers.sh\n+++ b/t/t6427-diff3-conflict-markers.sh\n@@ -43,7 +43,7 @@ test_expect_success 'check no merge base' '\n # Setup:\n #          L1\n #         /  \\\n-#     master    ?\n+#     main    ?\n #         \\  /\n #          R1\n #\n@@ -90,18 +90,18 @@ test_expect_success 'check unique merge base' '\n \t\tcd unique_merge_base &&\n \n \t\tgit checkout L^0 &&\n-\t\tMASTER=$(git rev-parse --short master) &&\n+\t\tMAIN=$(git rev-parse --short main) &&\n \n \t\ttest_must_fail git -c merge.conflictstyle=diff3 merge -s recursive R^0 &&\n \n-\t\tgrep \"|||||| $MASTER:content\" renamed\n+\t\tgrep \"|||||| $MAIN:content\" renamed\n \t)\n '\n \n # Setup:\n #          L1---L2--L3\n #         /  \\ /      \\\n-#     master    X1       ?\n+#     main    X1       ?\n #         \\  / \\      /\n #          R1---R2--R3\n #\n@@ -191,10 +191,10 @@ test_expect_success 'rebase --merge describes parent of commit being picked' '\n \t(\n \t\tcd rebase &&\n \t\ttest_commit base file &&\n-\t\ttest_commit master file &&\n+\t\ttest_commit main file &&\n \t\tgit checkout -b side HEAD^ &&\n \t\ttest_commit side file &&\n-\t\ttest_must_fail git -c merge.conflictstyle=diff3 rebase --merge master &&\n+\t\ttest_must_fail git -c merge.conflictstyle=diff3 rebase --merge main &&\n \t\tgrep \"||||||| parent of\" file\n \t)\n '\n@@ -203,7 +203,7 @@ test_expect_success 'rebase --apply describes fake ancestor base' '\n \t(\n \t\tcd rebase &&\n \t\tgit rebase --abort &&\n-\t\ttest_must_fail git -c merge.conflictstyle=diff3 rebase --apply master &&\n+\t\ttest_must_fail git -c merge.conflictstyle=diff3 rebase --apply main &&\n \t\tgrep \"||||||| constructed merge base\" file\n \t)\n '\ndiff --git a/t/t6430-merge-recursive.sh b/t/t6430-merge-recursive.sh\nindex 9c08e63af2..4bc8cc764b 100755\n--- a/t/t6430-merge-recursive.sh\n+++ b/t/t6430-merge-recursive.sh\n@@ -35,7 +35,7 @@ test_expect_success 'setup 1' '\n \tgit add a d/e &&\n \n \ttest_tick &&\n-\tgit commit -m \"master modifies a and d/e\" &&\n+\tgit commit -m \"main modifies a and d/e\" &&\n \tc1=$(git rev-parse --verify HEAD) &&\n \t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n@@ -466,7 +466,7 @@ test_expect_success SYMLINKS 'dir in working tree with symlink ancestor does not\n \t\tgit checkout -b branch1 &&\n \t\tgit commit --allow-empty -m \"empty commit\" &&\n \n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit rm foo &&\n \t\tmkdir foo &&\n \t\t>foo/bar &&\n@@ -475,7 +475,7 @@ test_expect_success SYMLINKS 'dir in working tree with symlink ancestor does not\n \n \t\tgit checkout branch1 &&\n \n-\t\tgit cherry-pick master &&\n+\t\tgit cherry-pick main &&\n \t\ttest_path_is_dir foo &&\n \t\ttest_path_is_file foo/bar\n \t)\n@@ -490,8 +490,8 @@ test_expect_success 'reset and 3-way merge' '\n \n test_expect_success 'reset and bind merge' '\n \n-\tgit reset --hard master &&\n-\tgit read-tree --prefix=M/ master &&\n+\tgit reset --hard main &&\n+\tgit read-tree --prefix=M/ main &&\n \tgit ls-files -s >actual &&\n \t(\n \t\techo \"100644 $o1 0\tM/a\" &&\n@@ -505,7 +505,7 @@ test_expect_success 'reset and bind merge' '\n \t) >expected &&\n \ttest_cmp expected actual &&\n \n-\tgit read-tree --prefix=a1/ master &&\n+\tgit read-tree --prefix=a1/ main &&\n \tgit ls-files -s >actual &&\n \t(\n \t\techo \"100644 $o1 0\tM/a\" &&\n@@ -523,7 +523,7 @@ test_expect_success 'reset and bind merge' '\n \t) >expected &&\n \ttest_cmp expected actual &&\n \n-\tgit read-tree --prefix=z/ master &&\n+\tgit read-tree --prefix=z/ main &&\n \tgit ls-files -s >actual &&\n \t(\n \t\techo \"100644 $o1 0\tM/a\" &&\n@@ -599,11 +599,11 @@ test_expect_success 'merge-recursive w/ empty work tree - theirs has rename' '\n \n test_expect_success 'merge removes empty directories' '\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b rm &&\n \tgit rm d/e &&\n \tgit commit -mremoved-d/e &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge -s recursive rm &&\n \ttest_path_is_missing d\n '\ndiff --git a/t/t6432-merge-recursive-space-options.sh b/t/t6432-merge-recursive-space-options.sh\nindex b56180ee4a..4eda1dd444 100755\n--- a/t/t6432-merge-recursive-space-options.sh\n+++ b/t/t6432-merge-recursive-space-options.sh\n@@ -2,11 +2,11 @@\n \n test_description='merge-recursive space options\n \n-* [master] Clarify\n+* [main] Clarify\n  ! [remote] Remove cruft\n --\n  + [remote] Remove cruft\n-*  [master] Clarify\n+*  [main] Clarify\n *+ [remote^] Initial revision\n *   ok 1: setup\n '\n@@ -87,7 +87,7 @@ test_expect_success 'setup' '\n \tmv text.txt+ text.txt &&\n \tgit commit -a -m \"Remove cruft\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tsed -e \"\n \t\t\ts/\\(not in his right mind\\),\\(.*\\)/\\1;\\2Q/\n \t\t\ts/Quite correct\\(.*\\)/It is too correct\\1Q/\ndiff --git a/t/t6433-merge-toplevel.sh b/t/t6433-merge-toplevel.sh\nindex e29c284b9b..fdbd095cde 100755\n--- a/t/t6433-merge-toplevel.sh\n+++ b/t/t6433-merge-toplevel.sh\n@@ -5,7 +5,7 @@ test_description='\"git merge\" top-level frontend'\n . ./test-lib.sh\n \n t3033_reset () {\n-\tgit checkout -B master two &&\n+\tgit checkout -B main two &&\n \tgit branch -f left three &&\n \tgit branch -f right four\n }\n@@ -21,7 +21,7 @@ test_expect_success setup '\n \ttest_commit four &&\n \tgit checkout --orphan newroot &&\n \ttest_commit five &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n # Local branches\n@@ -61,7 +61,7 @@ test_expect_success 'merge octopus, non-fast-forward (ff)' '\n test_expect_success 'merge octopus, fast-forward (does not ff)' '\n \tt3033_reset &&\n \tgit merge left right &&\n-\t# two (master) is not an ancestor of three (left) and four (right)\n+\t# two (main) is not an ancestor of three (left) and four (right)\n \ttest_must_fail git rev-parse --verify HEAD^4 &&\n \tgit rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&\n \tgit rev-parse two three four | sort >expect &&\n@@ -118,7 +118,7 @@ test_expect_success 'merge FETCH_HEAD octopus fast-forward (does not ff)' '\n \tt3033_reset &&\n \tgit fetch . left right &&\n \tgit merge FETCH_HEAD &&\n-\t# two (master) is not an ancestor of three (left) and four (right)\n+\t# two (main) is not an ancestor of three (left) and four (right)\n \ttest_must_fail git rev-parse --verify HEAD^4 &&\n \tgit rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&\n \tgit rev-parse two three four | sort >expect &&\ndiff --git a/t/t6434-merge-recursive-rename-options.sh b/t/t6434-merge-recursive-rename-options.sh\nindex 3d9fae68c4..1203984101 100755\n--- a/t/t6434-merge-recursive-rename-options.sh\n+++ b/t/t6434-merge-recursive-rename-options.sh\n@@ -5,11 +5,11 @@ test_description='merge-recursive rename options\n Test rename detection by examining rename/delete conflicts.\n \n * (HEAD -> rename) rename\n-| * (master) delete\n+| * (main) delete\n |/\n * base\n \n-git diff --name-status base master\n+git diff --name-status base main\n D\t0-old\n D\t1-old\n D\t2-old\n@@ -118,7 +118,7 @@ test_expect_success 'setup repo' '\n \tget_expected_stages 2 &&\n \tget_expected_stages 3 &&\n \tcheck_50=\"false\" &&\n-\ttail=\"HEAD^ -- HEAD master\"\n+\ttail=\"HEAD^ -- HEAD main\"\n '\n \n test_expect_success 'setup thresholds' '\ndiff --git a/t/t6436-merge-overwrite.sh b/t/t6436-merge-overwrite.sh\nindex dd9376842f..8efe96dc8c 100755\n--- a/t/t6436-merge-overwrite.sh\n+++ b/t/t6436-merge-overwrite.sh\n@@ -193,7 +193,7 @@ test_expect_success 'set up unborn branch and content' '\n '\n \n test_expect_success 'will not clobber WT/index when merging into unborn' '\n-\tgit merge master &&\n+\tgit merge main &&\n \tgrep foo tracked-file &&\n \tgit show :tracked-file >expect &&\n \tgrep foo expect &&\ndiff --git a/t/t6437-submodule-merge.sh b/t/t6437-submodule-merge.sh\nindex 3ead2b726f..d71e9410b9 100755\n--- a/t/t6437-submodule-merge.sh\n+++ b/t/t6437-submodule-merge.sh\n@@ -27,7 +27,7 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m root &&\n \n-\tgit checkout -b a master &&\n+\tgit checkout -b a main &&\n \t(cd sub &&\n \t echo A > file &&\n \t git add file &&\n@@ -37,7 +37,7 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m a &&\n \n-\tgit checkout -b b master &&\n+\tgit checkout -b b main &&\n \t(cd sub &&\n \t echo B > file &&\n \t git add file &&\n@@ -254,22 +254,22 @@ test_expect_success 'setup for recursive merge with submodule' '\n \t (cd sub &&\n \t  git init &&\n \t  test_commit a &&\n-\t  git checkout -b sub-b master &&\n+\t  git checkout -b sub-b main &&\n \t  test_commit b &&\n-\t  git checkout -b sub-c master &&\n+\t  git checkout -b sub-c main &&\n \t  test_commit c &&\n \t  git checkout -b sub-bc sub-b &&\n \t  git merge sub-c &&\n \t  git checkout -b sub-cb sub-c &&\n \t  git merge sub-b &&\n-\t  git checkout master) &&\n+\t  git checkout main) &&\n \t git add sub &&\n \t git commit -m a &&\n-\t git checkout -b top-b master &&\n+\t git checkout -b top-b main &&\n \t (cd sub && git checkout sub-b) &&\n \t git add sub &&\n \t git commit -m b &&\n-\t git checkout -b top-c master &&\n+\t git checkout -b top-c main &&\n \t (cd sub && git checkout sub-c) &&\n \t git add sub &&\n \t git commit -m c &&\ndiff --git a/t/t6439-merge-co-error-msgs.sh b/t/t6439-merge-co-error-msgs.sh\nindex 5c8894d94f..cd87fe6dd4 100755\n--- a/t/t6439-merge-co-error-msgs.sh\n+++ b/t/t6439-merge-co-error-msgs.sh\n@@ -18,7 +18,7 @@ test_expect_success 'setup' '\n \tgit add two three four five &&\n \tgit commit -m Second &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo other >two &&\n \techo other >three &&\n \techo other >four &&\n@@ -83,7 +83,7 @@ test_expect_success 'cannot switch branches because of local changes' '\n \techo two >rep/two &&\n \tgit add rep/one rep/two &&\n \tgit commit -m Fourth &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo uno >rep/one &&\n \techo dos >rep/two &&\n \ttest_must_fail git checkout branch 2>out &&\n@@ -128,7 +128,7 @@ test_expect_success 'not_uptodate_dir porcelain checkout error' '\n \t>rep2 &&\n \tgit add rep rep2 &&\n \tgit commit -m \"added test as a file\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \t>rep/untracked-file &&\n \t>rep2/untracked-file &&\n \ttest_must_fail git checkout branch 2>out &&\ndiff --git a/t/t6501-freshen-objects.sh b/t/t6501-freshen-objects.sh\nindex 8a3bb4105b..2f2b89f229 100755\n--- a/t/t6501-freshen-objects.sh\n+++ b/t/t6501-freshen-objects.sh\n@@ -67,7 +67,7 @@ for repack in '' true; do\n \t\tgit checkout -b experiment &&\n \t\tcommit abandon &&\n \t\tmaybe_repack &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit branch -D experiment\n \t'\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 307b75eafe..44b4bba0cb 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-5]*|6[0-3]*)\n+[0-6]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409825","messageId":"dc8011e4bfec33ebbb9953ee45c4c2efd40ddae7.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 17/28] t6[0-3]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:47Z","receivedAt":"2020-11-12T22:44:40Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t6300, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in\nt6[0-3]*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t6[0-3]*.sh &&\n\t   git checkout HEAD -- t6300\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t6000-rev-list-misc.sh                   |  2 +-\n t/t6001-rev-list-graft.sh                  |  2 +-\n t/t6004-rev-list-path-optim.sh             | 14 +++---\n t/t6006-rev-list-format.sh                 | 14 +++---\n t/t6007-rev-list-cherry-pick-file.sh       |  4 +-\n t/t6008-rev-list-submodule.sh              |  2 +-\n t/t6009-rev-list-parent.sh                 |  6 +--\n t/t6012-rev-list-simplify.sh               |  8 ++--\n t/t6013-rev-list-reverse-parents.sh        | 10 ++--\n t/t6016-rev-list-graph-simplify-history.sh |  2 +-\n t/t6017-rev-list-stdin.sh                  |  8 ++--\n t/t6018-rev-list-glob.sh                   | 50 ++++++++++----------\n t/t6019-rev-list-ancestry-path.sh          |  6 +--\n t/t6030-bisect-porcelain.sh                | 10 ++--\n t/t6040-tracking-info.sh                   | 54 +++++++++++-----------\n t/t6050-replace.sh                         | 10 ++--\n t/t6101-rev-parse-parents.sh               |  2 +-\n t/t6110-rev-list-sparse.sh                 |  2 +-\n t/t6111-rev-list-treesame.sh               |  6 +--\n t/t6112-rev-list-filters-objects.sh        | 14 +++---\n t/t6120-describe.sh                        | 20 ++++----\n t/t6200-fmt-merge-msg.sh                   | 50 ++++++++++----------\n t/t6302-for-each-ref-filter.sh             | 46 +++++++++---------\n t/test-lib.sh                              |  4 +-\n 24 files changed, 173 insertions(+), 173 deletions(-)\n\ndiff --git a/t/t6000-rev-list-misc.sh b/t/t6000-rev-list-misc.sh\nindex fc4d55dcb2..dc40a39fce 100755\n--- a/t/t6000-rev-list-misc.sh\n+++ b/t/t6000-rev-list-misc.sh\n@@ -85,7 +85,7 @@ test_expect_success 'propagate uninteresting flag down correctly' '\n '\n \n test_expect_success 'symleft flag bit is propagated down from tag' '\n-\tgit log --format=\"%m %s\" --left-right v1.0...master >actual &&\n+\tgit log --format=\"%m %s\" --left-right v1.0...main >actual &&\n \tcat >expect <<-\\EOF &&\n \t< another\n \t< that\ndiff --git a/t/t6001-rev-list-graft.sh b/t/t6001-rev-list-graft.sh\nindex 7504ba4751..4490981352 100755\n--- a/t/t6001-rev-list-graft.sh\n+++ b/t/t6001-rev-list-graft.sh\n@@ -20,7 +20,7 @@ test_expect_success setup '\n \tgit commit -a -m \"Third in one history.\" &&\n \tA2=$(git rev-parse --verify HEAD) &&\n \n-\trm -f .git/refs/heads/master .git/index &&\n+\trm -f .git/refs/heads/main .git/index &&\n \n \techo >fileA fileA again &&\n \techo >subdir/fileB fileB again &&\ndiff --git a/t/t6004-rev-list-path-optim.sh b/t/t6004-rev-list-path-optim.sh\nindex 3e8c42ee0b..81d1b57ced 100755\n--- a/t/t6004-rev-list-path-optim.sh\n+++ b/t/t6004-rev-list-path-optim.sh\n@@ -4,7 +4,7 @@ test_description='git rev-list trivial path optimization test\n \n    d/z1\n    b0                             b1\n-   o------------------------*----o master\n+   o------------------------*----o main\n   /                        /\n  o---------o----o----o----o side\n  a0        c0   c1   a1   c2\n@@ -55,18 +55,18 @@ test_expect_success 'further setup' '\n \tgit add c &&\n \ttest_tick &&\n \tgit commit -m \"Side makes yet another irrelevant commit\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo Another >b &&\n \techo Munged >d/z &&\n \tgit add b d/z &&\n \ttest_tick &&\n-\tgit commit -m \"Master touches b\" &&\n-\tgit tag master_b0 &&\n+\tgit commit -m \"Main touches b\" &&\n+\tgit tag main_b0 &&\n \tgit merge side &&\n \techo Touched >b &&\n \tgit add b &&\n \ttest_tick &&\n-\tgit commit -m \"Master touches b again\"\n+\tgit commit -m \"Main touches b again\"\n '\n \n test_expect_success 'path optimization 2' '\n@@ -76,13 +76,13 @@ test_expect_success 'path optimization 2' '\n '\n \n test_expect_success 'pathspec with leading path' '\n-\tgit rev-parse master^ master_b0 side_c0 initial >expected &&\n+\tgit rev-parse main^ main_b0 side_c0 initial >expected &&\n \tgit rev-list HEAD -- d >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'pathspec with glob (1)' '\n-\tgit rev-parse master^ master_b0 side_c0 initial >expected &&\n+\tgit rev-parse main^ main_b0 side_c0 initial >expected &&\n \tgit rev-list HEAD -- \"d/*\" >actual &&\n \ttest_cmp expected actual\n '\ndiff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh\nindex 99a1eaf332..8cc54a5a50 100755\n--- a/t/t6006-rev-list-format.sh\n+++ b/t/t6006-rev-list-format.sh\n@@ -53,7 +53,7 @@ test_expect_success 'setup' '\n test_format () {\n \tcat >expect.$1\n \ttest_expect_${3:-success} \"format $1\" \"\n-\t\tgit rev-list --pretty=format:'$2' master >output.$1 &&\n+\t\tgit rev-list --pretty=format:'$2' main >output.$1 &&\n \t\ttest_cmp expect.$1 output.$1\n \t\"\n }\n@@ -184,13 +184,13 @@ test_expect_success 'basic colors' '\n \t<RED>foo<GREEN>bar<BLUE>baz<RESET>xyzzy\n \tEOF\n \tformat=\"%Credfoo%Cgreenbar%Cbluebaz%Cresetxyzzy\" &&\n-\tgit rev-list --color --format=\"$format\" -1 master >actual.raw &&\n+\tgit rev-list --color --format=\"$format\" -1 main >actual.raw &&\n \ttest_decode_color <actual.raw >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success '%S is not a placeholder for rev-list yet' '\n-\tgit rev-list --format=\"%S\" -1 master | grep \"%S\"\n+\tgit rev-list --format=\"%S\" -1 main | grep \"%S\"\n '\n \n test_expect_success 'advanced colors' '\n@@ -199,7 +199,7 @@ test_expect_success 'advanced colors' '\n \t<BOLD;RED;BYELLOW>foo<RESET>\n \tEOF\n \tformat=\"%C(red yellow bold)foo%C(reset)\" &&\n-\tgit rev-list --color --format=\"$format\" -1 master >actual.raw &&\n+\tgit rev-list --color --format=\"$format\" -1 main >actual.raw &&\n \ttest_decode_color <actual.raw >actual &&\n \ttest_cmp expect actual\n '\n@@ -406,7 +406,7 @@ test_expect_success '%x00 shows NUL' '\n \n test_expect_success '%ad respects --date=' '\n \techo 2005-04-07 >expect.ad-short &&\n-\tgit log -1 --date=short --pretty=tformat:%ad >output.ad-short master &&\n+\tgit log -1 --date=short --pretty=tformat:%ad >output.ad-short main &&\n \ttest_cmp expect.ad-short output.ad-short\n '\n \n@@ -494,8 +494,8 @@ test_expect_success '\"%h %gD: %gs\" is same as git-reflog (with --abbrev)' '\n '\n \n test_expect_success '%gd shortens ref name' '\n-\techo \"master@{0}\" >expect.gd-short &&\n-\tgit log -g -1 --format=%gd refs/heads/master >actual.gd-short &&\n+\techo \"main@{0}\" >expect.gd-short &&\n+\tgit log -g -1 --format=%gd refs/heads/main >actual.gd-short &&\n \ttest_cmp expect.gd-short actual.gd-short\n '\n \ndiff --git a/t/t6007-rev-list-cherry-pick-file.sh b/t/t6007-rev-list-cherry-pick-file.sh\nindex f0268372d2..e689959593 100755\n--- a/t/t6007-rev-list-cherry-pick-file.sh\n+++ b/t/t6007-rev-list-cherry-pick-file.sh\n@@ -31,7 +31,7 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m \"E\" &&\n \tgit tag E &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout branch foo &&\n \ttest_tick &&\n \tgit commit -m \"B\" &&\n@@ -233,7 +233,7 @@ test_expect_success '--cherry-pick with independent, but identical branches' '\n \ttest_tick &&\n \tgit commit -m \"independent, too\" foo &&\n \ttest -z \"$(git rev-list --left-right --cherry-pick \\\n-\t\tHEAD...master -- foo)\"\n+\t\tHEAD...main -- foo)\"\n '\n \n cat >expect <<EOF\ndiff --git a/t/t6008-rev-list-submodule.sh b/t/t6008-rev-list-submodule.sh\nindex c4af9ca0a7..39762aa6ff 100755\n--- a/t/t6008-rev-list-submodule.sh\n+++ b/t/t6008-rev-list-submodule.sh\n@@ -36,7 +36,7 @@ test_expect_success 'setup' '\n '\n \n test_expect_success \"Ilari's test\" '\n-\tgit rev-list --objects super master ^super^\n+\tgit rev-list --objects super main ^super^\n '\n \n test_done\ndiff --git a/t/t6009-rev-list-parent.sh b/t/t6009-rev-list-parent.sh\nindex 916d9692bc..7dedceb472 100755\n--- a/t/t6009-rev-list-parent.sh\n+++ b/t/t6009-rev-list-parent.sh\n@@ -45,7 +45,7 @@ test_expect_success 'setup roots, merges and octopuses' '\n \ttest_commit seven &&\n \tgit checkout -b yetanotherbranch four &&\n \ttest_commit eight &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit merge --allow-unrelated-histories -m normalmerge newroot &&\n \tgit tag normalmerge &&\n@@ -56,7 +56,7 @@ test_expect_success 'setup roots, merges and octopuses' '\n \ttest_tick &&\n \tgit merge -m tetrapus sidebranch anotherbranch yetanotherbranch &&\n \tgit tag tetrapus &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'rev-list roots' '\n@@ -123,7 +123,7 @@ test_expect_success 'dodecapus' '\n \t\troots=\"$roots root$i\" ||\n \t\treturn\n \tdone &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit merge -m dodecapus $roots &&\n \tgit tag dodecapus &&\ndiff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh\nindex fd202fcb94..1b5f54a3f5 100755\n--- a/t/t6012-rev-list-simplify.sh\n+++ b/t/t6012-rev-list-simplify.sh\n@@ -43,7 +43,7 @@ test_expect_success setup '\n \tgit add side &&\n \ttest_tick && git commit -m \"Side root\" &&\n \tnote J &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \techo \"Hello\" >file &&\n \techo \"second\" >lost &&\n@@ -65,7 +65,7 @@ test_expect_success setup '\n \tnote D &&\n \n \ttest_tick &&\n-\ttest_must_fail git merge -m \"merge\" master &&\n+\ttest_must_fail git merge -m \"merge\" main &&\n \t>lost && git commit -a -m \"merge\" &&\n \tnote E &&\n \n@@ -74,7 +74,7 @@ test_expect_success setup '\n \ttest_tick && git commit -m \"Irrelevant change\" &&\n \tnote F &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo \"Yet another\" >elif &&\n \tgit add elif &&\n \ttest_tick && git commit -m \"Another irrelevant change\" &&\n@@ -87,7 +87,7 @@ test_expect_success setup '\n \ttest_tick && git commit -a -m \"Final change\" &&\n \tnote I &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick && git merge --allow-unrelated-histories -m \"Coolest\" unrelated &&\n \tnote K &&\n \ndiff --git a/t/t6013-rev-list-reverse-parents.sh b/t/t6013-rev-list-reverse-parents.sh\nindex 89458d370f..e6caf80d7e 100755\n--- a/t/t6013-rev-list-reverse-parents.sh\n+++ b/t/t6013-rev-list-reverse-parents.sh\n@@ -18,24 +18,24 @@ test_expect_success 'set up --reverse example' '\n \tcommit two &&\n \tgit checkout -b side HEAD^ &&\n \tcommit three &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge -s ours side &&\n \tcommit five\n \t'\n \n test_expect_success '--reverse --parents --full-history combines correctly' '\n-\tgit rev-list --parents --full-history master -- foo |\n+\tgit rev-list --parents --full-history main -- foo |\n \t\tperl -e \"print reverse <>\" > expected &&\n-\tgit rev-list --reverse --parents --full-history master -- foo \\\n+\tgit rev-list --reverse --parents --full-history main -- foo \\\n \t\t> actual &&\n \ttest_cmp expected actual\n \t'\n \n test_expect_success '--boundary does too' '\n-\tgit rev-list --boundary --parents --full-history master ^root -- foo |\n+\tgit rev-list --boundary --parents --full-history main ^root -- foo |\n \t\tperl -e \"print reverse <>\" > expected &&\n \tgit rev-list --boundary --reverse --parents --full-history \\\n-\t\tmaster ^root -- foo > actual &&\n+\t\tmain ^root -- foo > actual &&\n \ttest_cmp expected actual\n \t'\n \ndiff --git a/t/t6016-rev-list-graph-simplify-history.sh b/t/t6016-rev-list-graph-simplify-history.sh\nindex f5e6e92f5b..c341e6ecb4 100755\n--- a/t/t6016-rev-list-graph-simplify-history.sh\n+++ b/t/t6016-rev-list-graph-simplify-history.sh\n@@ -14,7 +14,7 @@ test_expect_success 'set up rev-list --graph test' '\n \ttest_commit A1 foo.txt &&\n \ttest_commit A2 bar.txt &&\n \ttest_commit A3 bar.txt &&\n-\tgit branch -m master A &&\n+\tgit branch -m main A &&\n \n \t# 2 commits on branch B, started from A1\n \tgit checkout -b B A1 &&\ndiff --git a/t/t6017-rev-list-stdin.sh b/t/t6017-rev-list-stdin.sh\nindex 667b37564e..6b72f100cb 100755\n--- a/t/t6017-rev-list-stdin.sh\n+++ b/t/t6017-rev-list-stdin.sh\n@@ -40,7 +40,7 @@ test_expect_success setup '\n \t\tdone &&\n \t\tfor i in $them\n \t\tdo\n-\t\t\tgit checkout -b side-$i master~$i &&\n+\t\t\tgit checkout -b side-$i main~$i &&\n \t\t\techo updated $i >file-$i &&\n \t\t\tgit add file-$i &&\n \t\t\ttest_tick &&\n@@ -49,7 +49,7 @@ test_expect_success setup '\n \t)\n '\n \n-check master\n+check main\n check side-1 ^side-4\n check side-1 ^side-7 --\n check side-1 ^side-7 -- file-1\n@@ -66,11 +66,11 @@ test_expect_success 'not only --stdin' '\n \tfile-2\n \tEOF\n \tcat >input <<-EOF &&\n-\t^master^\n+\t^main^\n \t--\n \tfile-2\n \tEOF\n-\tgit log --pretty=tformat:%s --name-only --stdin master -- file-1 \\\n+\tgit log --pretty=tformat:%s --name-only --stdin main -- file-1 \\\n \t\t<input >actual &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t6018-rev-list-glob.sh b/t/t6018-rev-list-glob.sh\nindex fe2f3cec3d..ac030b9a7c 100755\n--- a/t/t6018-rev-list-glob.sh\n+++ b/t/t6018-rev-list-glob.sh\n@@ -20,22 +20,22 @@ compare () {\n \n test_expect_success 'setup' '\n \n-\tcommit master &&\n-\tgit checkout -b subspace/one master &&\n+\tcommit main &&\n+\tgit checkout -b subspace/one main &&\n \tcommit one &&\n-\tgit checkout -b subspace/two master &&\n+\tgit checkout -b subspace/two main &&\n \tcommit two &&\n-\tgit checkout -b subspace-x master &&\n+\tgit checkout -b subspace-x main &&\n \tcommit subspace-x &&\n-\tgit checkout -b other/three master &&\n+\tgit checkout -b other/three main &&\n \tcommit three &&\n-\tgit checkout -b someref master &&\n+\tgit checkout -b someref main &&\n \tcommit some &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcommit topic_2 &&\n-\tgit tag foo/bar master &&\n+\tgit tag foo/bar main &&\n \tcommit topic_3 &&\n-\tgit update-ref refs/remotes/foo/baz master &&\n+\tgit update-ref refs/remotes/foo/baz main &&\n \tcommit topic_4 &&\n \tgit update-ref refs/remotes/upstream/one subspace/one &&\n \tgit update-ref refs/remotes/upstream/two subspace/two &&\n@@ -83,7 +83,7 @@ test_expect_failure 'rev-parse accepts --glob as detached option' '\n \n test_expect_failure 'rev-parse is not confused by option-like glob' '\n \n-\tcompare rev-parse \"master\" \"--glob --symbolic master\"\n+\tcompare rev-parse \"main\" \"--glob --symbolic main\"\n \n '\n \n@@ -111,15 +111,15 @@ test_expect_success 'rev-parse --glob=heads/subspace/* --glob=heads/other/*' '\n \n '\n \n-test_expect_success 'rev-parse --glob=heads/someref/* master' '\n+test_expect_success 'rev-parse --glob=heads/someref/* main' '\n \n-\tcompare rev-parse \"master\" \"--glob=heads/someref/* master\"\n+\tcompare rev-parse \"main\" \"--glob=heads/someref/* main\"\n \n '\n \n test_expect_success 'rev-parse --glob=heads/*' '\n \n-\tcompare rev-parse \"master other/three someref subspace-x subspace/one subspace/two\" \"--glob=heads/*\"\n+\tcompare rev-parse \"main other/three someref subspace-x subspace/one subspace/two\" \"--glob=heads/*\"\n \n '\n \n@@ -136,7 +136,7 @@ test_expect_success 'rev-parse --remotes=foo' '\n '\n \n test_expect_success 'rev-parse --exclude with --branches' '\n-\tcompare rev-parse \"--exclude=*/* --branches\" \"master someref subspace-x\"\n+\tcompare rev-parse \"--exclude=*/* --branches\" \"main someref subspace-x\"\n '\n \n test_expect_success 'rev-parse --exclude with --all' '\n@@ -221,7 +221,7 @@ test_expect_success 'rev-list --glob refs/heads/subspace/*' '\n \n test_expect_success 'rev-list not confused by option-like --glob arg' '\n \n-\tcompare rev-list \"master\" \"--glob -0 master\"\n+\tcompare rev-list \"main\" \"--glob -0 main\"\n \n '\n \n@@ -269,13 +269,13 @@ test_expect_success 'rev-list --branches=subspace' '\n \n test_expect_success 'rev-list --branches' '\n \n-\tcompare rev-list \"master subspace-x someref other/three subspace/one subspace/two\" \"--branches\"\n+\tcompare rev-list \"main subspace-x someref other/three subspace/one subspace/two\" \"--branches\"\n \n '\n \n-test_expect_success 'rev-list --glob=heads/someref/* master' '\n+test_expect_success 'rev-list --glob=heads/someref/* main' '\n \n-\tcompare rev-list \"master\" \"--glob=heads/someref/* master\"\n+\tcompare rev-list \"main\" \"--glob=heads/someref/* main\"\n \n '\n \n@@ -287,7 +287,7 @@ test_expect_success 'rev-list --glob=heads/subspace/* --glob=heads/other/*' '\n \n test_expect_success 'rev-list --glob=heads/*' '\n \n-\tcompare rev-list \"master other/three someref subspace-x subspace/one subspace/two\" \"--glob=heads/*\"\n+\tcompare rev-list \"main other/three someref subspace-x subspace/one subspace/two\" \"--glob=heads/*\"\n \n '\n \n@@ -310,7 +310,7 @@ test_expect_success 'rev-list --remotes=foo' '\n '\n \n test_expect_success 'rev-list --exclude with --branches' '\n-\tcompare rev-list \"--exclude=*/* --branches\" \"master someref subspace-x\"\n+\tcompare rev-list \"--exclude=*/* --branches\" \"main someref subspace-x\"\n '\n \n test_expect_success 'rev-list --exclude with --all' '\n@@ -354,13 +354,13 @@ test_expect_success 'shortlog accepts --glob/--tags/--remotes' '\n \n \tcompare shortlog \"subspace/one subspace/two\" --branches=subspace &&\n \tcompare shortlog \\\n-\t  \"master subspace-x someref other/three subspace/one subspace/two\" \\\n+\t  \"main subspace-x someref other/three subspace/one subspace/two\" \\\n \t  --branches &&\n-\tcompare shortlog master \"--glob=heads/someref/* master\" &&\n+\tcompare shortlog main \"--glob=heads/someref/* main\" &&\n \tcompare shortlog \"subspace/one subspace/two other/three\" \\\n \t  \"--glob=heads/subspace/* --glob=heads/other/*\" &&\n \tcompare shortlog \\\n-\t  \"master other/three someref subspace-x subspace/one subspace/two\" \\\n+\t  \"main other/three someref subspace-x subspace/one subspace/two\" \\\n \t  \"--glob=heads/*\" &&\n \tcompare shortlog foo/bar --tags=foo &&\n \tcompare shortlog \"foo/bar qux/one qux/two qux/x\" --tags &&\n@@ -371,14 +371,14 @@ test_expect_success 'shortlog accepts --glob/--tags/--remotes' '\n test_expect_failure 'shortlog accepts --glob as detached option' '\n \n \tcompare shortlog \\\n-\t  \"master other/three someref subspace-x subspace/one subspace/two\" \\\n+\t  \"main other/three someref subspace-x subspace/one subspace/two\" \\\n \t  \"--glob heads/*\"\n \n '\n \n test_expect_failure 'shortlog --glob is not confused by option-like argument' '\n \n-\tcompare shortlog master \"--glob -e master\"\n+\tcompare shortlog main \"--glob -e main\"\n \n '\n \ndiff --git a/t/t6019-rev-list-ancestry-path.sh b/t/t6019-rev-list-ancestry-path.sh\nindex 353f84313f..c664d66773 100755\n--- a/t/t6019-rev-list-ancestry-path.sh\n+++ b/t/t6019-rev-list-ancestry-path.sh\n@@ -128,15 +128,15 @@ test_expect_success 'setup criss-cross' '\n \t(cd criss-cross &&\n \t git init &&\n \t test_commit A &&\n-\t git checkout -b xb master &&\n+\t git checkout -b xb main &&\n \t test_commit B &&\n-\t git checkout -b xc master &&\n+\t git checkout -b xc main &&\n \t test_commit C &&\n \t git checkout -b xbc xb -- &&\n \t git merge xc &&\n \t git checkout -b xcb xc -- &&\n \t git merge xb &&\n-\t git checkout master)\n+\t git checkout main)\n '\n \n # no commits in bc descend from cb\ndiff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh\nindex aa226381be..386841f7b7 100755\n--- a/t/t6030-bisect-porcelain.sh\n+++ b/t/t6030-bisect-porcelain.sh\n@@ -89,9 +89,9 @@ test_expect_success 'bisect start without -- takes unknown arg as pathspec' '\n \tgrep bar \".git/BISECT_NAMES\"\n '\n \n-test_expect_success 'bisect reset: back in the master branch' '\n+test_expect_success 'bisect reset: back in the main branch' '\n \tgit bisect reset &&\n-\techo \"* master\" > branch.expect &&\n+\techo \"* main\" > branch.expect &&\n \tgit branch > branch.output &&\n \tcmp branch.expect branch.output\n '\n@@ -102,7 +102,7 @@ test_expect_success 'bisect reset: back in another branch' '\n \tgit bisect good $HASH1 &&\n \tgit bisect bad $HASH3 &&\n \tgit bisect reset &&\n-\techo \"  master\" > branch.expect &&\n+\techo \"  main\" > branch.expect &&\n \techo \"* other\" >> branch.expect &&\n \tgit branch > branch.output &&\n \tcmp branch.expect branch.output\n@@ -348,7 +348,7 @@ test_expect_success 'bisect skip many ranges' '\n \n test_expect_success 'bisect starting with a detached HEAD' '\n \tgit bisect reset &&\n-\tgit checkout master^ &&\n+\tgit checkout main^ &&\n \tHEAD=$(git rev-parse --verify HEAD) &&\n \tgit bisect start &&\n \ttest $HEAD = $(cat .git/BISECT_START) &&\n@@ -716,7 +716,7 @@ test_expect_success 'bisect: --no-checkout - target after breakage' '\n test_expect_success 'bisect: demonstrate identification of damage boundary' \"\n \tgit bisect reset &&\n \tgit checkout broken &&\n-\tgit bisect start broken master --no-checkout &&\n+\tgit bisect start broken main --no-checkout &&\n \ttest_must_fail git bisect run \\\"\\$SHELL_PATH\\\" -c '\n \t\tGOOD=\\$(git for-each-ref \\\"--format=%(objectname)\\\" refs/bisect/good-*) &&\n \t\tgit rev-list --objects BISECT_HEAD --not \\$GOOD >tmp.\\$\\$ &&\ndiff --git a/t/t6040-tracking-info.sh b/t/t6040-tracking-info.sh\nindex 50a934e1b2..8ad1390511 100755\n--- a/t/t6040-tracking-info.sh\n+++ b/t/t6040-tracking-info.sh\n@@ -34,7 +34,7 @@ test_expect_success setup '\n \t\tgit branch -d brokenbase &&\n \t\tgit checkout -b b6 origin\n \t) &&\n-\tgit checkout -b follower --track master &&\n+\tgit checkout -b follower --track main &&\n \tadvance h\n '\n \n@@ -58,12 +58,12 @@ test_expect_success 'branch -v' '\n '\n \n cat >expect <<\\EOF\n-b1 [origin/master: ahead 1, behind 1] d\n-b2 [origin/master: ahead 1, behind 1] d\n-b3 [origin/master: behind 1] b\n-b4 [origin/master: ahead 2] f\n+b1 [origin/main: ahead 1, behind 1] d\n+b2 [origin/main: ahead 1, behind 1] d\n+b3 [origin/main: behind 1] b\n+b4 [origin/main: ahead 2] f\n b5 [brokenbase: gone] g\n-b6 [origin/master] c\n+b6 [origin/main] c\n EOF\n \n test_expect_success 'branch -vv' '\n@@ -83,7 +83,7 @@ test_expect_success 'checkout (diverged from upstream)' '\n '\n \n test_expect_success 'checkout with local tracked branch' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout follower >actual &&\n \ttest_i18ngrep \"is ahead of\" actual\n '\n@@ -100,7 +100,7 @@ test_expect_success 'checkout (up-to-date with upstream)' '\n \t(\n \t\tcd test && git checkout b6\n \t) >actual &&\n-\ttest_i18ngrep \"Your branch is up to date with .origin/master\" actual\n+\ttest_i18ngrep \"Your branch is up to date with .origin/main\" actual\n '\n \n test_expect_success 'status (diverged from upstream)' '\n@@ -130,11 +130,11 @@ test_expect_success 'status (up-to-date with upstream)' '\n \t\t# reports nothing to commit\n \t\ttest_must_fail git commit --dry-run\n \t) >actual &&\n-\ttest_i18ngrep \"Your branch is up to date with .origin/master\" actual\n+\ttest_i18ngrep \"Your branch is up to date with .origin/main\" actual\n '\n \n cat >expect <<\\EOF\n-## b1...origin/master [ahead 1, behind 1]\n+## b1...origin/main [ahead 1, behind 1]\n EOF\n \n test_expect_success 'status -s -b (diverged from upstream)' '\n@@ -147,7 +147,7 @@ test_expect_success 'status -s -b (diverged from upstream)' '\n '\n \n cat >expect <<\\EOF\n-## b1...origin/master [different]\n+## b1...origin/main [different]\n EOF\n \n test_expect_success 'status -s -b --no-ahead-behind (diverged from upstream)' '\n@@ -160,7 +160,7 @@ test_expect_success 'status -s -b --no-ahead-behind (diverged from upstream)' '\n '\n \n cat >expect <<\\EOF\n-## b1...origin/master [different]\n+## b1...origin/main [different]\n EOF\n \n test_expect_success 'status.aheadbehind=false status -s -b (diverged from upstream)' '\n@@ -174,7 +174,7 @@ test_expect_success 'status.aheadbehind=false status -s -b (diverged from upstre\n \n cat >expect <<\\EOF\n On branch b1\n-Your branch and 'origin/master' have diverged,\n+Your branch and 'origin/main' have diverged,\n and have 1 and 1 different commits each, respectively.\n EOF\n \n@@ -198,7 +198,7 @@ test_expect_success 'status --long --branch' '\n \n cat >expect <<\\EOF\n On branch b1\n-Your branch and 'origin/master' refer to different commits.\n+Your branch and 'origin/main' refer to different commits.\n EOF\n \n test_expect_success 'status --long --branch --no-ahead-behind' '\n@@ -233,7 +233,7 @@ test_expect_success 'status -s -b (upstream is gone)' '\n '\n \n cat >expect <<\\EOF\n-## b6...origin/master\n+## b6...origin/main\n EOF\n \n test_expect_success 'status -s -b (up-to-date with upstream)' '\n@@ -246,7 +246,7 @@ test_expect_success 'status -s -b (up-to-date with upstream)' '\n '\n \n test_expect_success 'fail to track lightweight tags' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag light &&\n \ttest_must_fail git branch --track lighttrack light >actual &&\n \ttest_i18ngrep ! \"set up to track\" actual &&\n@@ -254,7 +254,7 @@ test_expect_success 'fail to track lightweight tags' '\n '\n \n test_expect_success 'fail to track annotated tags' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag -m heavy heavy &&\n \ttest_must_fail git branch --track heavytrack heavy >actual &&\n \ttest_i18ngrep ! \"set up to track\" actual &&\n@@ -262,17 +262,17 @@ test_expect_success 'fail to track annotated tags' '\n '\n \n test_expect_success '--set-upstream-to does not change branch' '\n-\tgit branch from-master master &&\n-\tgit branch --set-upstream-to master from-master &&\n-\tgit branch from-topic_2 master &&\n+\tgit branch from-main main &&\n+\tgit branch --set-upstream-to main from-main &&\n+\tgit branch from-topic_2 main &&\n \ttest_must_fail git config branch.from-topic_2.merge > actual &&\n \tgit rev-list from-topic_2 &&\n \tgit update-ref refs/heads/from-topic_2 from-topic_2^ &&\n \tgit rev-parse from-topic_2 >expect2 &&\n-\tgit branch --set-upstream-to master from-topic_2 &&\n-\tgit config branch.from-master.merge > actual &&\n+\tgit branch --set-upstream-to main from-topic_2 &&\n+\tgit config branch.from-main.merge > actual &&\n \tgit rev-parse from-topic_2 >actual2 &&\n-\tgrep -q \"^refs/heads/master$\" actual &&\n+\tgrep -q \"^refs/heads/main$\" actual &&\n \tcmp expect2 actual2\n '\n \n@@ -280,11 +280,11 @@ test_expect_success '--set-upstream-to @{-1}' '\n \tgit checkout follower &&\n \tgit checkout from-topic_2 &&\n \tgit config branch.from-topic_2.merge > expect2 &&\n-\tgit branch --set-upstream-to @{-1} from-master &&\n-\tgit config branch.from-master.merge > actual &&\n+\tgit branch --set-upstream-to @{-1} from-main &&\n+\tgit config branch.from-main.merge > actual &&\n \tgit config branch.from-topic_2.merge > actual2 &&\n-\tgit branch --set-upstream-to follower from-master &&\n-\tgit config branch.from-master.merge > expect &&\n+\tgit branch --set-upstream-to follower from-main &&\n+\tgit config branch.from-main.merge > expect &&\n \ttest_cmp expect2 actual2 &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t6050-replace.sh b/t/t6050-replace.sh\nindex c80dc10b8f..56cf4ceb90 100755\n--- a/t/t6050-replace.sh\n+++ b/t/t6050-replace.sh\n@@ -133,9 +133,9 @@ test_expect_success 'tag replaced commit' '\n '\n \n test_expect_success '\"git fsck\" works' '\n-     git fsck master >fsck_master.out &&\n-     test_i18ngrep \"dangling commit $R\" fsck_master.out &&\n-     test_i18ngrep \"dangling tag $(git show-ref -s refs/tags/mytag)\" fsck_master.out &&\n+     git fsck main >fsck_main.out &&\n+     test_i18ngrep \"dangling commit $R\" fsck_main.out &&\n+     test_i18ngrep \"dangling tag $(git show-ref -s refs/tags/mytag)\" fsck_main.out &&\n      test -z \"$(git fsck)\"\n '\n \n@@ -218,7 +218,7 @@ test_expect_success 'create parallel branch without the bug' '\n      git cherry-pick $HASH6 &&\n      PARA6=$(git rev-parse --verify HEAD) &&\n      git replace $HASH6 $PARA6 &&\n-     git checkout master &&\n+     git checkout main &&\n      cur=$(git rev-parse --verify HEAD) &&\n      test \"$cur\" = \"$HASH7\" &&\n      git log --pretty=oneline | grep $PARA2 &&\n@@ -461,7 +461,7 @@ test_expect_success GPG 'set up a merge commit with a mergetag' '\n \tgit commit -m \"hello: 2 more lines from a test branch\" &&\n \tHASH9=$(git rev-parse --verify HEAD) &&\n \tgit tag -s -m \"tag for testing with a mergetag\" test_tag HEAD &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge -s ours test_tag &&\n \tHASH10=$(git rev-parse --verify HEAD) &&\n \tgit cat-file commit $HASH10 | grep \"^mergetag object\"\ndiff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh\nindex 7531262a5e..288a75c02b 100755\n--- a/t/t6101-rev-parse-parents.sh\n+++ b/t/t6101-rev-parse-parents.sh\n@@ -18,7 +18,7 @@ test_expect_success 'setup' '\n \ttest_commit second &&\n \tgit checkout --orphan tmp &&\n \ttest_commit start2 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge -m next --allow-unrelated-histories start2 &&\n \ttest_commit final &&\n \ndiff --git a/t/t6110-rev-list-sparse.sh b/t/t6110-rev-list-sparse.sh\nindex 656ac7fe9d..093536fd85 100755\n--- a/t/t6110-rev-list-sparse.sh\n+++ b/t/t6110-rev-list-sparse.sh\n@@ -10,7 +10,7 @@ test_expect_success setup '\n \tgit checkout -b side HEAD^ &&\n \ttest_commit D &&\n \ttest_commit E &&\n-\tgit merge master\n+\tgit merge main\n '\n \n test_expect_success 'rev-list --first-parent --boundary' '\ndiff --git a/t/t6111-rev-list-treesame.sh b/t/t6111-rev-list-treesame.sh\nindex 4244638285..90c8630e34 100755\n--- a/t/t6111-rev-list-treesame.sh\n+++ b/t/t6111-rev-list-treesame.sh\n@@ -33,13 +33,13 @@ test_expect_success setup '\n \tgit checkout other-branch &&\n \ttest_commit \"Added other\" other \"Hello\" C &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_merge D other-branch &&\n \n \tgit checkout third-branch &&\n \ttest_commit \"Third file\" third \"Nothing\" E &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit \"file=Blah\" file \"Blah\" F &&\n \n \ttest_tick && git merge --no-commit third-branch &&\n@@ -56,7 +56,7 @@ test_expect_success setup '\n \n \ttest_tick && git revert I && note J &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick && git merge --no-ff fiddler-branch &&\n \tnote K &&\n \ndiff --git a/t/t6112-rev-list-filters-objects.sh b/t/t6112-rev-list-filters-objects.sh\nindex de0e5a5d36..c6729320ea 100755\n--- a/t/t6112-rev-list-filters-objects.sh\n+++ b/t/t6112-rev-list-filters-objects.sh\n@@ -223,7 +223,7 @@ test_expect_success 'verify sparse:oid=oid-ish omits top-level files' '\n \tsort >expected &&\n \n \tgit -C r3 rev-list --quiet --objects --filter-print-omitted \\\n-\t\t--filter=sparse:oid=master:pattern HEAD >revs &&\n+\t\t--filter=sparse:oid=main:pattern HEAD >revs &&\n \tawk -f print_1.awk revs |\n \tsed \"s/~//\" |\n \tsort >observed &&\n@@ -436,7 +436,7 @@ test_expect_success 'add sparse pattern blobs whose paths have reserved chars' '\n \n test_expect_success 'combine:... with more than two sub-filters' '\n \tgit -C r3 rev-list --objects \\\n-\t\t--filter=combine:tree:3+blob:limit=40+sparse:oid=master:pattern \\\n+\t\t--filter=combine:tree:3+blob:limit=40+sparse:oid=main:pattern \\\n \t\tHEAD >actual &&\n \n \texpect_has HEAD \"\" &&\n@@ -454,7 +454,7 @@ test_expect_success 'combine:... with more than two sub-filters' '\n \tcp actual expect &&\n \n \tgit -C r3 rev-list --objects \\\n-\t\t--filter=combine:tree:3+blob:limit=40+sparse:oid=master:pattern1%2brenamed%25 \\\n+\t\t--filter=combine:tree:3+blob:limit=40+sparse:oid=main:pattern1%2brenamed%25 \\\n \t\tHEAD >actual &&\n \ttest_cmp expect actual &&\n \n@@ -464,23 +464,23 @@ test_expect_success 'combine:... with more than two sub-filters' '\n \ttest_when_finished \"rm -f trace1\" &&\n \tGIT_TRACE=$(pwd)/trace1 git -C r3 rev-list --objects \\\n \t\t--filter=tree:3 --filter=blob:limit=40 \\\n-\t\t--filter=sparse:oid=\"master:p;at%ter+n\" \\\n+\t\t--filter=sparse:oid=\"main:p;at%ter+n\" \\\n \t\tHEAD >actual &&\n \n \ttest_cmp expect actual &&\n-\tgrep \"Add to combine filter-spec: sparse:oid=master:p%3bat%25ter%2bn\" \\\n+\tgrep \"Add to combine filter-spec: sparse:oid=main:p%3bat%25ter%2bn\" \\\n \t\ttrace1 &&\n \n \t# Repeat the above test, but this time, the characters to encode are in\n \t# the LHS of the combined filter.\n \ttest_when_finished \"rm -f trace2\" &&\n \tGIT_TRACE=$(pwd)/trace2 git -C r3 rev-list --objects \\\n-\t\t--filter=sparse:oid=master:^~pattern \\\n+\t\t--filter=sparse:oid=main:^~pattern \\\n \t\t--filter=tree:3 --filter=blob:limit=40 \\\n \t\tHEAD >actual &&\n \n \ttest_cmp expect actual &&\n-\tgrep \"Add to combine filter-spec: sparse:oid=master:%5e%7epattern\" \\\n+\tgrep \"Add to combine filter-spec: sparse:oid=main:%5e%7epattern\" \\\n \t\ttrace2\n '\n \ndiff --git a/t/t6120-describe.sh b/t/t6120-describe.sh\nindex f822d5d328..53617c9da9 100755\n--- a/t/t6120-describe.sh\n+++ b/t/t6120-describe.sh\n@@ -102,7 +102,7 @@ check_describe c-* --tags HEAD^^2\n check_describe B --tags HEAD^^2^\n check_describe e --tags HEAD^^^\n \n-check_describe heads/master --all HEAD\n+check_describe heads/main --all HEAD\n check_describe tags/c-* --all HEAD^\n check_describe tags/e --all HEAD^^^\n \n@@ -403,15 +403,15 @@ test_expect_success ULIMIT_STACK_SIZE 'name-rev works in a deep repo' '\n \ti=1 &&\n \twhile test $i -lt 8000\n \tdo\n-\t\techo \"commit refs/heads/master\n+\t\techo \"commit refs/heads/main\n committer A U Thor <author@example.com> $((1000000000 + $i * 100)) +0200\n data <<EOF\n commit #$i\n EOF\"\n-\t\ttest $i = 1 && echo \"from refs/heads/master^0\"\n+\t\ttest $i = 1 && echo \"from refs/heads/main^0\"\n \t\ti=$(($i + 1))\n \tdone | git fast-import &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag far-far-away HEAD^ &&\n \techo \"HEAD~4000 tags/far-far-away~3999\" >expect &&\n \tgit name-rev HEAD~4000 >actual &&\n@@ -442,7 +442,7 @@ test_expect_success 'describe complains about missing object' '\n '\n \n test_expect_success 'name-rev a rev shortly after epoch' '\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \n \tgit checkout --orphan no-timestamp-underflow &&\n \t# Any date closer to epoch than the CUTOFF_DATE_SLOP constant\n@@ -456,7 +456,7 @@ test_expect_success 'name-rev a rev shortly after epoch' '\n \ttest_cmp expect actual\n '\n \n-# A--------------master\n+# A--------------main\n #  \\            /\n #   \\----------M2\n #    \\        /\n@@ -487,10 +487,10 @@ test_expect_success 'name-rev covers all conditions while looking at parents' '\n \t\tgit checkout $A &&\n \t\tgit merge --no-ff HEAD@{1} && # M2\n \n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit merge --no-ff HEAD@{1} &&\n \n-\t\techo \"$B master^2^2~1^2\" >expect &&\n+\t\techo \"$B main^2^2~1^2\" >expect &&\n \t\tgit name-rev $B >actual &&\n \n \t\ttest_cmp expect actual\n@@ -516,7 +516,7 @@ test_expect_success 'describe commits with disjoint bases' '\n \t\tgit checkout --orphan branch && rm file &&\n \t\techo B > file2 && git add file2 && git commit -m B &&\n \t\tgit tag B -a -m B &&\n-\t\tgit merge --no-ff --allow-unrelated-histories master -m x &&\n+\t\tgit merge --no-ff --allow-unrelated-histories main -m x &&\n \n \t\tcheck_describe \"A-3-*\" HEAD\n \t)\n@@ -542,7 +542,7 @@ test_expect_success 'describe commits with disjoint bases 2' '\n \t\techo o >> file2 && git add file2 && GIT_COMMITTER_DATE=\"2020-01-01 15:01\" git commit -m o &&\n \t\techo B >> file2 && git add file2 && GIT_COMMITTER_DATE=\"2020-01-01 15:02\" git commit -m B &&\n \t\tgit tag B -a -m B &&\n-\t\tgit merge --no-ff --allow-unrelated-histories master -m x &&\n+\t\tgit merge --no-ff --allow-unrelated-histories main -m x &&\n \n \t\tcheck_describe \"B-3-*\" HEAD\n \t)\ndiff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh\nindex f3e66eaf9b..8be07ce902 100755\n--- a/t/t6200-fmt-merge-msg.sh\n+++ b/t/t6200-fmt-merge-msg.sh\n@@ -81,7 +81,7 @@ test_expect_success GPG 'set up a signed tag' '\n test_expect_success 'message for merging local branch' '\n \techo \"Merge branch ${apos}left${apos}\" >expected &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch . left &&\n \n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n@@ -89,7 +89,7 @@ test_expect_success 'message for merging local branch' '\n '\n \n test_expect_success GPG 'message for merging local tag signed by good key' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch . signed-good-tag &&\n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&\n \tgrep \"^Merge tag ${apos}signed-good-tag${apos}\" actual &&\n@@ -98,7 +98,7 @@ test_expect_success GPG 'message for merging local tag signed by good key' '\n '\n \n test_expect_success GPG 'message for merging local tag signed by unknown key' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch . signed-good-tag &&\n \tGNUPGHOME=. git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&\n \tgrep \"^Merge tag ${apos}signed-good-tag${apos}\" actual &&\n@@ -109,7 +109,7 @@ test_expect_success GPG 'message for merging local tag signed by unknown key' '\n test_expect_success 'message for merging external branch' '\n \techo \"Merge branch ${apos}left${apos} of $(pwd)\" >expected &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch \"$(pwd)\" left &&\n \n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n@@ -133,7 +133,7 @@ test_expect_success '[merge] summary/log configuration' '\n \ttest_config merge.log true &&\n \ttest_unconfig merge.summary &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left &&\n \n@@ -142,7 +142,7 @@ test_expect_success '[merge] summary/log configuration' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary true &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left &&\n \n@@ -153,7 +153,7 @@ test_expect_success '[merge] summary/log configuration' '\n '\n \n test_expect_success 'setup FETCH_HEAD' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left\n '\n@@ -281,7 +281,7 @@ test_expect_success 'fmt-merge-msg -m' '\n \n \ttest_unconfig merge.log &&\n \ttest_unconfig merge.summary &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch \"$(pwd)\" left &&\n \tgit fmt-merge-msg -m \"Sync with left\" <.git/FETCH_HEAD >actual &&\n \tgit fmt-merge-msg --log -m \"Sync with left\" \\\n@@ -323,28 +323,28 @@ test_expect_success 'setup: expected shortlog for two branches' '\n test_expect_success 'shortlog for two branches' '\n \ttest_config merge.log true &&\n \ttest_unconfig merge.summary &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual1 &&\n \n \ttest_unconfig merge.log &&\n \ttest_config merge.summary true &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual2 &&\n \n \ttest_config merge.log yes &&\n \ttest_unconfig merge.summary &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual3 &&\n \n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual4 &&\n@@ -358,7 +358,7 @@ test_expect_success 'shortlog for two branches' '\n test_expect_success 'merge-msg -F' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tgit fmt-merge-msg -F .git/FETCH_HEAD >actual &&\n@@ -368,7 +368,7 @@ test_expect_success 'merge-msg -F' '\n test_expect_success 'merge-msg -F in subdirectory' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tmkdir sub &&\n@@ -408,7 +408,7 @@ test_expect_success 'merge-msg tag' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . tag tag-r3 &&\n \n@@ -438,7 +438,7 @@ test_expect_success 'merge-msg two tags' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . tag tag-r3 tag tag-l5 &&\n \n@@ -468,7 +468,7 @@ test_expect_success 'merge-msg tag and branch' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . tag tag-r3 left &&\n \n@@ -495,7 +495,7 @@ test_expect_success 'merge-msg lots of commits' '\n \n \ttest_config merge.summary yes &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . long &&\n \n@@ -506,11 +506,11 @@ test_expect_success 'merge-msg lots of commits' '\n test_expect_success 'merge-msg with \"merging\" an annotated tag' '\n \ttest_config merge.log true &&\n \n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit commit --allow-empty -m \"One step ahead\" &&\n \tgit tag -a -m \"An annotated one\" annote HEAD &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch . annote &&\n \n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n@@ -543,23 +543,23 @@ test_expect_success 'merge-msg with \"merging\" an annotated tag' '\n '\n \n test_expect_success 'merge.suppressDest configuration' '\n-\tgit checkout -B side master &&\n+\tgit checkout -B side main &&\n \tgit commit --allow-empty -m \"One step ahead\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch . side &&\n \n \tgit -c merge.suppressDest=\"\" fmt-merge-msg <.git/FETCH_HEAD >full.1 &&\n \thead -n1 full.1 >actual &&\n-\tgrep -e \"Merge branch .side. into master\" actual &&\n+\tgrep -e \"Merge branch .side. into main\" actual &&\n \n \tgit -c merge.suppressDest=\"mast\" fmt-merge-msg <.git/FETCH_HEAD >full.2 &&\n \thead -n1 full.2 >actual &&\n-\tgrep -e \"Merge branch .side. into master$\" actual &&\n+\tgrep -e \"Merge branch .side. into main$\" actual &&\n \n \tgit -c merge.suppressDest=\"ma?*[rn]\" fmt-merge-msg <.git/FETCH_HEAD >full.3 &&\n \thead -n1 full.3 >actual &&\n \tgrep -e \"Merge branch .side.\" actual &&\n-\t! grep -e \" into master$\" actual\n+\t! grep -e \" into main$\" actual\n '\n \n test_done\ndiff --git a/t/t6302-for-each-ref-filter.sh b/t/t6302-for-each-ref-filter.sh\nindex 0a21669f56..f5a55c1991 100755\n--- a/t/t6302-for-each-ref-filter.sh\n+++ b/t/t6302-for-each-ref-filter.sh\n@@ -26,17 +26,17 @@ test_expect_success 'setup some history and refs' '\n \tgit tag $sign -m \"A signed tag\" signed-tag &&\n \tgit tag $sign -m \"Signed doubly\" doubly-signed-tag signed-tag &&\n \n-\tgit checkout master &&\n-\tgit update-ref refs/odd/spot master\n+\tgit checkout main &&\n+\tgit update-ref refs/odd/spot main\n '\n \n test_expect_success 'filtering with --points-at' '\n \tcat >expect <<-\\EOF &&\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/odd/spot\n \trefs/tags/three\n \tEOF\n-\tgit for-each-ref --format=\"%(refname)\" --points-at=master >actual &&\n+\tgit for-each-ref --format=\"%(refname)\" --points-at=main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -53,13 +53,13 @@ test_expect_success 'check signed tags with --points-at' '\n \n test_expect_success 'filtering with --merged' '\n \tcat >expect <<-\\EOF &&\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/odd/spot\n \trefs/tags/one\n \trefs/tags/three\n \trefs/tags/two\n \tEOF\n-\tgit for-each-ref --format=\"%(refname)\" --merged=master >actual &&\n+\tgit for-each-ref --format=\"%(refname)\" --merged=main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -72,13 +72,13 @@ test_expect_success 'filtering with --no-merged' '\n \trefs/tags/four\n \trefs/tags/signed-tag\n \tEOF\n-\tgit for-each-ref --format=\"%(refname)\" --no-merged=master >actual &&\n+\tgit for-each-ref --format=\"%(refname)\" --no-merged=main >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'filtering with --contains' '\n \tcat >expect <<-\\EOF &&\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/heads/side\n \trefs/odd/spot\n \trefs/tags/annotated-tag\n@@ -251,7 +251,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'nested alignment with quote formatt\n \n test_expect_success 'check `%(contents:lines=1)`' '\n \tcat >expect <<-\\EOF &&\n-\tmaster |three\n+\tmain |three\n \tside |four\n \todd/spot |three\n \tannotated-tag |An annotated tag\n@@ -269,7 +269,7 @@ test_expect_success 'check `%(contents:lines=1)`' '\n \n test_expect_success 'check `%(contents:lines=0)`' '\n \tcat >expect <<-\\EOF &&\n-\tmaster |\n+\tmain |\n \tside |\n \todd/spot |\n \tannotated-tag |\n@@ -287,7 +287,7 @@ test_expect_success 'check `%(contents:lines=0)`' '\n \n test_expect_success 'check `%(contents:lines=99999)`' '\n \tcat >expect <<-\\EOF &&\n-\tmaster |three\n+\tmain |three\n \tside |four\n \todd/spot |three\n \tannotated-tag |An annotated tag\n@@ -360,7 +360,7 @@ test_expect_success 'improper usage of %(if), %(then), %(else) and %(end) atoms'\n test_expect_success 'check %(if)...%(then)...%(end) atoms' '\n \tgit for-each-ref --format=\"%(refname)%(if)%(authorname)%(then) Author: %(authorname)%(end)\" >actual &&\n \tcat >expect <<-\\EOF &&\n-\trefs/heads/master Author: A U Thor\n+\trefs/heads/main Author: A U Thor\n \trefs/heads/side Author: A U Thor\n \trefs/odd/spot Author: A U Thor\n \trefs/tags/annotated-tag\n@@ -381,7 +381,7 @@ test_expect_success 'check %(if)...%(then)...%(end) atoms' '\n test_expect_success 'check %(if)...%(then)...%(else)...%(end) atoms' '\n \tgit for-each-ref --format=\"%(if)%(authorname)%(then)%(authorname)%(else)No author%(end): %(refname)\" >actual &&\n \tcat >expect <<-\\EOF &&\n-\tA U Thor: refs/heads/master\n+\tA U Thor: refs/heads/main\n \tA U Thor: refs/heads/side\n \tA U Thor: refs/odd/spot\n \tNo author: refs/tags/annotated-tag\n@@ -401,7 +401,7 @@ test_expect_success 'check %(if)...%(then)...%(else)...%(end) atoms' '\n test_expect_success 'ignore spaces in %(if) atom usage' '\n \tgit for-each-ref --format=\"%(refname:short): %(if)%(HEAD)%(then)Head ref%(else)Not Head ref%(end)\" >actual &&\n \tcat >expect <<-\\EOF &&\n-\tmaster: Head ref\n+\tmain: Head ref\n \tside: Not Head ref\n \todd/spot: Not Head ref\n \tannotated-tag: Not Head ref\n@@ -420,19 +420,19 @@ test_expect_success 'ignore spaces in %(if) atom usage' '\n '\n \n test_expect_success 'check %(if:equals=<string>)' '\n-\tgit for-each-ref --format=\"%(if:equals=master)%(refname:short)%(then)Found master%(else)Not master%(end)\" refs/heads/ >actual &&\n+\tgit for-each-ref --format=\"%(if:equals=main)%(refname:short)%(then)Found main%(else)Not main%(end)\" refs/heads/ >actual &&\n \tcat >expect <<-\\EOF &&\n-\tFound master\n-\tNot master\n+\tFound main\n+\tNot main\n \tEOF\n \ttest_cmp expect actual\n '\n \n test_expect_success 'check %(if:notequals=<string>)' '\n-\tgit for-each-ref --format=\"%(if:notequals=master)%(refname:short)%(then)Not master%(else)Found master%(end)\" refs/heads/ >actual &&\n+\tgit for-each-ref --format=\"%(if:notequals=main)%(refname:short)%(then)Not main%(else)Found main%(end)\" refs/heads/ >actual &&\n \tcat >expect <<-\\EOF &&\n-\tFound master\n-\tNot master\n+\tFound main\n+\tNot main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -443,11 +443,11 @@ test_expect_success '--merged is compatible with --no-merged' '\n \n test_expect_success 'validate worktree atom' '\n \tcat >expect <<-EOF &&\n-\tmaster: $(pwd)\n-\tmaster_worktree: $(pwd)/worktree_dir\n+\tmain: $(pwd)\n+\tmain_worktree: $(pwd)/worktree_dir\n \tside: not checked out\n \tEOF\n-\tgit worktree add -b master_worktree worktree_dir master &&\n+\tgit worktree add -b main_worktree worktree_dir main &&\n \tgit for-each-ref --format=\"%(refname:short): %(if)%(worktreepath)%(then)%(worktreepath)%(else)not checked out%(end)\" refs/heads/ >actual &&\n \trm -r worktree_dir &&\n \tgit worktree prune &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex a78ff1e57e..307b75eafe 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,13 +257,13 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-3404|4013|5310)\n+3404|4013|5310|6300)\n \t# Avoid conflicts with patch series that are cooking at the same time\n \t# as the patch series changing the default of `init.defaultBranch`.\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-5]*)\n+[0-5]*|6[0-3]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409829","messageId":"e2f140939928835d8941efffbd68929ad9ce82e8.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 18/28] t64*: preemptively adjust alignment to prepare for `master` -> `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:48Z","receivedAt":"2020-11-12T22:44:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe are in the process of renaming the default branch name to `main`,\nwhich is two characters shorter than `master`. Therefore, some lines\nneed to be adjusted in t6416, t6422 and t6427 that want to align text\ninvolving the default branch name.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t6416-recursive-corner-cases.sh    | 8 ++++----\n t/t6422-merge-rename-corner-cases.sh | 4 ++--\n t/t6427-diff3-conflict-markers.sh    | 4 ++--\n 3 files changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t6416-recursive-corner-cases.sh b/t/t6416-recursive-corner-cases.sh\nindex 887c2195a9..dbccc3158a 100755\n--- a/t/t6416-recursive-corner-cases.sh\n+++ b/t/t6416-recursive-corner-cases.sh\n@@ -385,7 +385,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete' '\n \t\ttest_line_count = 2 out &&\n \n \t\tgit rev-parse >expect       \\\n-\t\t\tmaster:file  B:file &&\n+\t\t\tmaster:file    B:file &&\n \t\tgit rev-parse   >actual      \\\n \t\t\t:1:file      :2:file &&\n \t\ttest_cmp expect actual\n@@ -407,7 +407,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete, rev\n \t\ttest_line_count = 2 out &&\n \n \t\tgit rev-parse >expect       \\\n-\t\t\tmaster:file  B:file &&\n+\t\t\tmaster:file    B:file &&\n \t\tgit rev-parse   >actual      \\\n \t\t\t:1:file      :3:file &&\n \t\ttest_cmp expect actual\n@@ -1553,7 +1553,7 @@ test_expect_failure 'check conflicting modes for regular file' '\n # Setup:\n #          L1---L2\n #         /  \\ /  \\\n-#   master    X    ?\n+#     master    X    ?\n #         \\  / \\  /\n #          R1---R2\n #\n@@ -1748,7 +1748,7 @@ test_expect_success 'check nested conflicts' '\n # Setup:\n #          L1---L2---L3\n #         /  \\ /  \\ /  \\\n-#   master    X1   X2   ?\n+#     master    X1   X2   ?\n #         \\  / \\  / \\  /\n #          R1---R2---R3\n #\ndiff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh\nindex 78bfaf17f0..e40a1b686f 100755\n--- a/t/t6422-merge-rename-corner-cases.sh\n+++ b/t/t6422-merge-rename-corner-cases.sh\n@@ -1130,7 +1130,7 @@ test_conflicts_with_adds_and_renames() {\n \t# Setup:\n \t#          L\n \t#         / \\\n-\t#   master   ?\n+\t#     master   ?\n \t#         \\ /\n \t#          R\n \t#\n@@ -1290,7 +1290,7 @@ test_conflicts_with_adds_and_renames add    add\n # Setup:\n #          L\n #         / \\\n-#   master   ?\n+#     master   ?\n #         \\ /\n #          R\n #\ndiff --git a/t/t6427-diff3-conflict-markers.sh b/t/t6427-diff3-conflict-markers.sh\nindex f4655bb358..f7620e677c 100755\n--- a/t/t6427-diff3-conflict-markers.sh\n+++ b/t/t6427-diff3-conflict-markers.sh\n@@ -43,7 +43,7 @@ test_expect_success 'check no merge base' '\n # Setup:\n #          L1\n #         /  \\\n-#   master    ?\n+#     master    ?\n #         \\  /\n #          R1\n #\n@@ -101,7 +101,7 @@ test_expect_success 'check unique merge base' '\n # Setup:\n #          L1---L2--L3\n #         /  \\ /      \\\n-#   master    X1       ?\n+#     master    X1       ?\n #         \\  / \\      /\n #          R1---R2--R3\n #\n-- \ngitgitgadget\n\n"},{"id":"409831","messageId":"7f67471c03228a3cc6c37963db05a3c36175e1b7.1605221039.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH 20/28] t7[0-4]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-12T22:43:50Z","receivedAt":"2020-11-12T22:44:44Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t7064, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in\nt7[0-4]*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t7[0-4]*.sh &&\n\t   git checkout HEAD -- t7064\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t7003-filter-branch.sh                |  40 ++++-----\n t/t7004-tag.sh                          |   8 +-\n t/t7030-verify-tag.sh                   |   2 +-\n t/t7060-wtstatus.sh                     |  26 +++---\n t/t7063-status-untracked-cache.sh       |  14 +--\n t/t7102-reset.sh                        |   6 +-\n t/t7113-post-index-change-hook.sh       |   2 +-\n t/t7201-co.sh                           | 110 ++++++++++++------------\n t/t7400-submodule-basic.sh              |  20 ++---\n t/t7403-submodule-sync.sh               |  10 +--\n t/t7406-submodule-update.sh             |  38 ++++----\n t/t7407-submodule-foreach.sh            |  24 +++---\n t/t7409-submodule-detached-work-tree.sh |   8 +-\n t/t7417-submodule-path-url.sh           |   2 +-\n t/test-lib.sh                           |   4 +-\n 15 files changed, 157 insertions(+), 157 deletions(-)\n\ndiff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh\nindex 36477cb1f4..e8df682c8d 100755\n--- a/t/t7003-filter-branch.sh\n+++ b/t/t7003-filter-branch.sh\n@@ -13,7 +13,7 @@ test_expect_success 'setup' '\n \tmkdir dir &&\n \ttest_commit dir/D &&\n \ttest_commit E &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit C &&\n \tgit checkout branch &&\n \tgit merge C &&\n@@ -25,7 +25,7 @@ test_expect_success 'setup' '\n # * G\n # *   Merge commit 'C' into branch\n # |\\\n-# | * (master) C\n+# | * (main) C\n # * | E\n # * | dir/D\n # * | D\n@@ -162,15 +162,15 @@ test_expect_success 'subdirectory filter result looks okay' '\n '\n \n test_expect_success 'more setup' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tmkdir subdir &&\n \techo A > subdir/new &&\n \tgit add subdir/new &&\n \ttest_tick &&\n-\tgit commit -m \"subdir on master\" subdir/new &&\n+\tgit commit -m \"subdir on main\" subdir/new &&\n \tgit rm A.t &&\n \ttest_tick &&\n-\tgit commit -m \"again subdir on master\" &&\n+\tgit commit -m \"again subdir on main\" &&\n \tgit merge branch\n '\n \n@@ -199,7 +199,7 @@ test_expect_success 'author information is preserved' '\n \tgit branch preserved-author &&\n \t(sane_unset GIT_AUTHOR_NAME &&\n \t git filter-branch -f --msg-filter \"cat; \\\n-\t\t\ttest \\$GIT_COMMIT != $(git rev-parse master) || \\\n+\t\t\ttest \\$GIT_COMMIT != $(git rev-parse main) || \\\n \t\t\techo Hallo\" \\\n \t\tpreserved-author) &&\n \tgit rev-list --author=\"B V Uips\" preserved-author >actual &&\n@@ -218,7 +218,7 @@ test_expect_success \"remove a certain author's commits\" '\n \t\telse\\\n \t\t\tgit commit-tree \\\"\\$@\\\";\\\n \t\tfi\" removed-author &&\n-\tcnt1=$(git rev-list master | wc -l) &&\n+\tcnt1=$(git rev-list main | wc -l) &&\n \tcnt2=$(git rev-list removed-author | wc -l) &&\n \ttest $cnt1 -eq $(($cnt2 + 1)) &&\n \tgit rev-list --author=\"B V Uips\" removed-author >actual &&\n@@ -226,7 +226,7 @@ test_expect_success \"remove a certain author's commits\" '\n '\n \n test_expect_success 'barf on invalid name' '\n-\ttest_must_fail git filter-branch -f master xy-problem &&\n+\ttest_must_fail git filter-branch -f main xy-problem &&\n \ttest_must_fail git filter-branch -f HEAD^\n '\n \n@@ -236,8 +236,8 @@ test_expect_success '\"map\" works in commit filter' '\n \t\tmapped=\\$(map \\$parent) &&\n \t\tactual=\\$(echo \\\"\\$@\\\" | sed \\\"s/^.*-p //\\\") &&\n \t\ttest \\$mapped = \\$actual &&\n-\t\tgit commit-tree \\\"\\$@\\\";\" master~2..master &&\n-\tgit rev-parse --verify master\n+\t\tgit commit-tree \\\"\\$@\\\";\" main~2..main &&\n+\tgit rev-parse --verify main\n '\n \n test_expect_success 'Name needing quotes' '\n@@ -256,7 +256,7 @@ test_expect_success 'Name needing quotes' '\n \n test_expect_success 'Subdirectory filter with disappearing trees' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tmkdir foo &&\n \ttouch foo/bar &&\n@@ -275,7 +275,7 @@ test_expect_success 'Subdirectory filter with disappearing trees' '\n \tgit commit -m \"Re-adding foo\" &&\n \n \tgit filter-branch -f --subdirectory-filter foo &&\n-\tgit rev-list master >actual &&\n+\tgit rev-list main >actual &&\n \ttest_line_count = 3 actual\n '\n \n@@ -332,7 +332,7 @@ test_expect_success 'Tag name filtering allows slashes in tag names' '\n \ttest_cmp expect actual\n '\n test_expect_success 'setup --prune-empty comparisons' '\n-\tgit checkout --orphan master-no-a &&\n+\tgit checkout --orphan main-no-a &&\n \tgit rm -rf . &&\n \tunset test_tick &&\n \ttest_tick &&\n@@ -343,7 +343,7 @@ test_expect_success 'setup --prune-empty comparisons' '\n \tmkdir dir &&\n \ttest_commit dir/D dir/D.t dir/D dir/Dx &&\n \ttest_commit E E.t E Ex &&\n-\tgit checkout master-no-a &&\n+\tgit checkout main-no-a &&\n \ttest_commit C C.t C Cx &&\n \tgit checkout branch-no-a &&\n \tgit merge Cx -m \"Merge tag '\\''C'\\'' into branch\" &&\n@@ -397,7 +397,7 @@ test_expect_success '--prune-empty is able to prune entire branch' '\n '\n \n test_expect_success '--remap-to-ancestor with filename filters' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard A &&\n \ttest_commit add-foo foo 1 &&\n \tgit branch moved-foo &&\n@@ -407,15 +407,15 @@ test_expect_success '--remap-to-ancestor with filename filters' '\n \tgit branch moved-bar &&\n \ttest_commit change-foo foo 2 &&\n \tgit filter-branch -f --remap-to-ancestor \\\n-\t\tmoved-foo moved-bar A..master \\\n+\t\tmoved-foo moved-bar A..main \\\n \t\t-- -- foo &&\n \ttest $(git rev-parse moved-foo) = $(git rev-parse moved-bar) &&\n-\ttest $(git rev-parse moved-foo) = $(git rev-parse master^) &&\n+\ttest $(git rev-parse moved-foo) = $(git rev-parse main^) &&\n \ttest $orig_invariant = $(git rev-parse invariant)\n '\n \n test_expect_success 'automatic remapping to ancestor with filename filters' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard A &&\n \ttest_commit add-foo2 foo 1 &&\n \tgit branch moved-foo2 &&\n@@ -425,10 +425,10 @@ test_expect_success 'automatic remapping to ancestor with filename filters' '\n \tgit branch moved-bar2 &&\n \ttest_commit change-foo2 foo 2 &&\n \tgit filter-branch -f \\\n-\t\tmoved-foo2 moved-bar2 A..master \\\n+\t\tmoved-foo2 moved-bar2 A..main \\\n \t\t-- -- foo &&\n \ttest $(git rev-parse moved-foo2) = $(git rev-parse moved-bar2) &&\n-\ttest $(git rev-parse moved-foo2) = $(git rev-parse master^) &&\n+\ttest $(git rev-parse moved-foo2) = $(git rev-parse main^) &&\n \ttest $orig_invariant = $(git rev-parse invariant2)\n '\n \ndiff --git a/t/t7004-tag.sh b/t/t7004-tag.sh\nindex 05f411c821..630fcde90b 100755\n--- a/t/t7004-tag.sh\n+++ b/t/t7004-tag.sh\n@@ -1583,7 +1583,7 @@ test_expect_success 'checking that branch head with --no-contains lists all but\n \"\n \n test_expect_success 'merging original branch into this branch' '\n-\tgit merge --strategy=ours master &&\n+\tgit merge --strategy=ours main &&\n         git tag v4.0\n '\n \n@@ -1944,15 +1944,15 @@ test_expect_success ULIMIT_STACK_SIZE '--contains and --no-contains work in a de\n \ti=1 &&\n \twhile test $i -lt 8000\n \tdo\n-\t\techo \"commit refs/heads/master\n+\t\techo \"commit refs/heads/main\n committer A U Thor <author@example.com> $((1000000000 + $i * 100)) +0200\n data <<EOF\n commit #$i\n EOF\"\n-\t\ttest $i = 1 && echo \"from refs/heads/master^0\"\n+\t\ttest $i = 1 && echo \"from refs/heads/main^0\"\n \t\ti=$(($i + 1))\n \tdone | git fast-import &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag far-far-away HEAD^ &&\n \trun_with_limited_stack git tag --contains HEAD >actual &&\n \ttest_must_be_empty actual &&\ndiff --git a/t/t7030-verify-tag.sh b/t/t7030-verify-tag.sh\nindex 5c5bc32ccb..7a70df79a2 100755\n--- a/t/t7030-verify-tag.sh\n+++ b/t/t7030-verify-tag.sh\n@@ -17,7 +17,7 @@ test_expect_success GPG 'create signed tags' '\n \techo 3 >elif && git add elif &&\n \ttest_tick && git commit -m \"third on side\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick && git merge -S side &&\n \tgit tag -s -m merge merge &&\n \ndiff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh\nindex d5218743e9..cb4e104e4b 100755\n--- a/t/t7060-wtstatus.sh\n+++ b/t/t7060-wtstatus.sh\n@@ -51,7 +51,7 @@ EOF\n \t\tgit checkout -b side HEAD^ &&\n \t\tgit rm foo &&\n \t\tgit commit -m delete &&\n-\t\ttest_must_fail git merge master &&\n+\t\ttest_must_fail git merge main &&\n \t\ttest_must_fail git commit --dry-run >../actual &&\n \t\ttest_i18ncmp ../expect ../actual &&\n \t\tgit status >../actual &&\n@@ -124,18 +124,18 @@ test_expect_success 'git diff-index --cached -C shows 2 copies + 1 unmerged' '\n \n test_expect_success 'status when conflicts with add and rm advice (deleted by them)' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit init main.txt init &&\n \tgit checkout -b second_branch &&\n \tgit rm main.txt &&\n \tgit commit -m \"main.txt deleted on second_branch\" &&\n \ttest_commit second conflict.txt second &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit on_second main.txt on_second &&\n-\ttest_commit master conflict.txt master &&\n+\ttest_commit main conflict.txt main &&\n \ttest_must_fail git merge second_branch &&\n \tcat >expected <<\\EOF &&\n-On branch master\n+On branch main\n You have unmerged paths.\n   (fix conflicts and run \"git commit\")\n   (use \"git merge --abort\" to abort the merge)\n@@ -157,8 +157,8 @@ test_expect_success 'prepare for conflicts' '\n \tgit checkout -b conflict &&\n \ttest_commit one main.txt one &&\n \tgit branch conflict_second &&\n-\tgit mv main.txt sub_master.txt &&\n-\tgit commit -m \"main.txt renamed in sub_master.txt\" &&\n+\tgit mv main.txt sub_main.txt &&\n+\tgit commit -m \"main.txt renamed in sub_main.txt\" &&\n \tgit checkout conflict_second &&\n \tgit mv main.txt sub_second.txt &&\n \tgit commit -m \"main.txt renamed in sub_second.txt\"\n@@ -176,7 +176,7 @@ You have unmerged paths.\n Unmerged paths:\n   (use \"git add/rm <file>...\" as appropriate to mark resolution)\n \tboth deleted:    main.txt\n-\tadded by them:   sub_master.txt\n+\tadded by them:   sub_main.txt\n \tadded by us:     sub_second.txt\n \n no changes added to commit (use \"git add\" and/or \"git commit -a\")\n@@ -189,7 +189,7 @@ EOF\n test_expect_success 'status when conflicts with only rm advice (both deleted)' '\n \tgit reset --hard conflict_second &&\n \ttest_must_fail git merge conflict &&\n-\tgit add sub_master.txt &&\n+\tgit add sub_main.txt &&\n \tgit add sub_second.txt &&\n \tcat >expected <<\\EOF &&\n On branch conflict_second\n@@ -198,7 +198,7 @@ You have unmerged paths.\n   (use \"git merge --abort\" to abort the merge)\n \n Changes to be committed:\n-\tnew file:   sub_master.txt\n+\tnew file:   sub_main.txt\n \n Unmerged paths:\n   (use \"git rm <file>...\" to mark resolution)\n@@ -209,12 +209,12 @@ EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual &&\n \tgit reset --hard &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'status --branch with detached HEAD' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit status --branch --porcelain >actual &&\n \tcat >expected <<-EOF &&\n \t## HEAD (no branch)\n@@ -230,7 +230,7 @@ test_expect_success 'status --branch with detached HEAD' '\n ## Duplicate the above test and verify --porcelain=v1 arg parsing.\n test_expect_success 'status --porcelain=v1 --branch with detached HEAD' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit status --branch --porcelain=v1 >actual &&\n \tcat >expected <<-EOF &&\n \t## HEAD (no branch)\ndiff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh\nindex a682a3d826..3b41d563d5 100755\n--- a/t/t7063-status-untracked-cache.sh\n+++ b/t/t7063-status-untracked-cache.sh\n@@ -475,7 +475,7 @@ EOF\n test_expect_success 'set up sparse checkout' '\n \techo \"done/[a-z]*\" >.git/info/sparse-checkout &&\n \ttest_config core.sparsecheckout true &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit update-index --force-untracked-cache &&\n \tgit status --porcelain >/dev/null && # prime the cache\n \ttest_path_is_missing done/.gitignore &&\n@@ -734,13 +734,13 @@ test_expect_success 'test ident field is working' '\n test_expect_success 'untracked cache survives a checkout' '\n \tgit commit --allow-empty -m empty &&\n \ttest-tool dump-untracked-cache >../before &&\n-\ttest_when_finished  \"git checkout master\" &&\n+\ttest_when_finished  \"git checkout main\" &&\n \tgit checkout -b other_branch &&\n \ttest-tool dump-untracked-cache >../after &&\n \ttest_cmp ../before ../after &&\n \ttest_commit test &&\n \ttest-tool dump-untracked-cache >../before &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest-tool dump-untracked-cache >../after &&\n \ttest_cmp ../before ../after\n '\n@@ -775,7 +775,7 @@ test_expect_success SYMLINKS '\"status\" after symlink replacement should be clean\n \tgit checkout HEAD~ &&\n \tstatus_is_clean &&\n \tstatus_is_clean &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tavoid_racy &&\n \tstatus_is_clean &&\n \tstatus_is_clean\n@@ -786,7 +786,7 @@ test_expect_success SYMLINKS '\"status\" after symlink replacement should be clean\n \tgit checkout HEAD~ &&\n \tstatus_is_clean &&\n \tstatus_is_clean &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tavoid_racy &&\n \tstatus_is_clean &&\n \tstatus_is_clean\n@@ -810,7 +810,7 @@ test_expect_success '\"status\" after file replacement should be clean with UC=tru\n \tgit checkout HEAD~ &&\n \tstatus_is_clean &&\n \tstatus_is_clean &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tavoid_racy &&\n \tstatus_is_clean &&\n \ttest-tool dump-untracked-cache >../actual &&\n@@ -828,7 +828,7 @@ test_expect_success '\"status\" after file replacement should be clean with UC=fal\n \tgit checkout HEAD~ &&\n \tstatus_is_clean &&\n \tstatus_is_clean &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tavoid_racy &&\n \tstatus_is_clean &&\n \tstatus_is_clean\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex b1affb001f..9dfed50354 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -145,7 +145,7 @@ test_expect_success 'trying to do reset --soft with pending merge should fail' '\n \tprintf \"1st line 2nd file\\n2nd line 2nd file\\n3rd line\" >secondfile &&\n \tgit commit -a -m \"the change in branch2\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -D branch1 branch2 &&\n \tcheck_changes $head5\n '\n@@ -167,7 +167,7 @@ test_expect_success 'trying to do reset --soft with pending checkout merge shoul\n \tprintf \"1st line 2nd file\\n2nd line 2nd file\\n3rd line\" >secondfile &&\n \tgit commit -a -m \"the line in branch3\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -D branch3 branch4 &&\n \tcheck_changes $head5\n '\n@@ -380,7 +380,7 @@ test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge\n \tgit reset --hard ORIG_HEAD &&\n \tcheck_changes $head5 &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -D branch1 branch2 &&\n \tcheck_changes $head5\n '\ndiff --git a/t/t7113-post-index-change-hook.sh b/t/t7113-post-index-change-hook.sh\nindex f011ad7eec..2e38428176 100755\n--- a/t/t7113-post-index-change-hook.sh\n+++ b/t/t7113-post-index-change-hook.sh\n@@ -85,7 +85,7 @@ test_expect_success 'test checkout and reset trigger the hook' '\n \tEOF\n \t: force index to be dirty &&\n \ttest-tool chmtime +60 dir1/file1.txt &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_path_is_file testsuccess && rm -f testsuccess &&\n \ttest_path_is_missing testfailure &&\n \ttest-tool chmtime +60 dir1/file1.txt &&\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex b36a93056f..3ab219a04e 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -5,10 +5,10 @@\n \n test_description='git checkout tests.\n \n-Creates master, forks renamer and side branches from it.\n+Creates main, forks renamer and side branches from it.\n Test switching across them.\n \n-  ! [master] Initial A one, A two\n+  ! [main] Initial A one, A two\n    * [renamer] Renamer R one->uno, M two\n     ! [side] Side M one, D two, A three\n      ! [simple] Simple D one, M two\n@@ -16,7 +16,7 @@ Test switching across them.\n      + [simple] Simple D one, M two\n     +  [side] Side M one, D two, A three\n    *   [renamer] Renamer R one->uno, M two\n-  +*++ [master] Initial A one, A two\n+  +*++ [main] Initial A one, A two\n \n '\n \n@@ -46,27 +46,27 @@ test_expect_success setup '\n \tfill a b c d e f >two &&\n \tgit commit -a -m \"Renamer R one->uno, M two\" &&\n \n-\tgit checkout -b side master &&\n+\tgit checkout -b side main &&\n \tfill 1 2 3 4 5 6 7 >one &&\n \tfill A B C D E >three &&\n \trm -f two &&\n \tgit update-index --add --remove one two three &&\n \tgit commit -m \"Side M one, D two, A three\" &&\n \n-\tgit checkout -b simple master &&\n+\tgit checkout -b simple main &&\n \trm -f one &&\n \tfill a c e >two &&\n \tgit commit -a -m \"Simple D one, M two\" &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'checkout from non-existing branch' '\n-\tgit checkout -b delete-me master &&\n+\tgit checkout -b delete-me main &&\n \tgit update-ref -d --no-deref refs/heads/delete-me &&\n \ttest refs/heads/delete-me = \"$(git symbolic-ref HEAD)\" &&\n-\tgit checkout master &&\n-\ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n+\tgit checkout main &&\n+\ttest refs/heads/main = \"$(git symbolic-ref HEAD)\"\n '\n \n test_expect_success 'checkout with dirty tree without -m' '\n@@ -81,7 +81,7 @@ test_expect_success 'checkout with dirty tree without -m' '\n '\n \n test_expect_success 'checkout with unrelated dirty tree without -m' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tfill 0 1 2 3 4 5 6 7 8 >same &&\n \tcp same kept &&\n \tgit checkout side >messages &&\n@@ -91,7 +91,7 @@ test_expect_success 'checkout with unrelated dirty tree without -m' '\n '\n \n test_expect_success 'checkout -m with dirty tree' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit clean -f &&\n \n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n@@ -102,9 +102,9 @@ test_expect_success 'checkout -m with dirty tree' '\n \tprintf \"M\\t%s\\n\" one >expect.messages &&\n \ttest_cmp expect.messages messages &&\n \n-\tfill \"M\tone\" \"A\tthree\" \"D\ttwo\" >expect.master &&\n-\tgit diff --name-status master >current.master &&\n-\ttest_cmp expect.master current.master &&\n+\tfill \"M\tone\" \"A\tthree\" \"D\ttwo\" >expect.main &&\n+\tgit diff --name-status main >current.main &&\n+\ttest_cmp expect.main current.main &&\n \n \tfill \"M\tone\" >expect.side &&\n \tgit diff --name-status side >current.side &&\n@@ -115,7 +115,7 @@ test_expect_success 'checkout -m with dirty tree' '\n '\n \n test_expect_success 'checkout -m with dirty tree, renamed' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f main && git clean -f &&\n \n \tfill 1 2 3 4 5 7 8 >one &&\n \tif git checkout renamer\n@@ -135,7 +135,7 @@ test_expect_success 'checkout -m with dirty tree, renamed' '\n '\n \n test_expect_success 'checkout -m with merge conflict' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f main && git clean -f &&\n \n \tfill 1 T 3 4 5 6 S 8 >one &&\n \tif git checkout renamer\n@@ -148,7 +148,7 @@ test_expect_success 'checkout -m with merge conflict' '\n \n \tgit checkout -m renamer &&\n \n-\tgit diff master:one :3:uno |\n+\tgit diff main:one :3:uno |\n \tsed -e \"1,/^@@/d\" -e \"/^ /d\" -e \"s/^-/d/\" -e \"s/^+/a/\" >current &&\n \tfill d2 aT d7 aS >expect &&\n \ttest_cmp expect current &&\n@@ -157,7 +157,7 @@ test_expect_success 'checkout -m with merge conflict' '\n '\n \n test_expect_success 'format of merge conflict from checkout -m' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit clean -f &&\n \n \tfill b d >two &&\n@@ -181,7 +181,7 @@ test_expect_success 'format of merge conflict from checkout -m' '\n '\n \n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard &&\n \tgit clean -f &&\n \n@@ -193,7 +193,7 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n \ta\n \tc\n \te\n-\t||||||| master\n+\t||||||| main\n \ta\n \tb\n \tc\n@@ -208,7 +208,7 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n '\n \n test_expect_success 'switch to another branch while carrying a deletion' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard &&\n \tgit clean -f &&\n \tgit rm two &&\n@@ -229,7 +229,7 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '\n \ttest_i18ngrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count = 1 messages &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tif git symbolic-ref HEAD >/dev/null 2>&1\n \tthen\n@@ -249,7 +249,7 @@ test_expect_success 'checkout to detach HEAD' '\n \tgrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count -gt 1 messages &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tif git symbolic-ref HEAD >/dev/null 2>&1\n \tthen\n@@ -261,11 +261,11 @@ test_expect_success 'checkout to detach HEAD' '\n '\n \n test_expect_success 'checkout to detach HEAD with branchname^' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit clean -f &&\n \tgit checkout renamer^ &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tif git symbolic-ref HEAD >/dev/null 2>&1\n \tthen\n@@ -277,11 +277,11 @@ test_expect_success 'checkout to detach HEAD with branchname^' '\n '\n \n test_expect_success 'checkout to detach HEAD with :/message' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit clean -f &&\n \tgit checkout \":/Initial\" &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tif git symbolic-ref HEAD >/dev/null 2>&1\n \tthen\n@@ -293,11 +293,11 @@ test_expect_success 'checkout to detach HEAD with :/message' '\n '\n \n test_expect_success 'checkout to detach HEAD with HEAD^0' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit clean -f &&\n \tgit checkout HEAD^0 &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tif git symbolic-ref HEAD >/dev/null 2>&1\n \tthen\n@@ -310,13 +310,13 @@ test_expect_success 'checkout to detach HEAD with HEAD^0' '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n \tgit tag both side &&\n-\tgit branch both master &&\n+\tgit branch both main &&\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit checkout both &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tname=$(git symbolic-ref HEAD 2>/dev/null) &&\n \ttest \"z$name\" = zrefs/heads/both\n@@ -324,12 +324,12 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit tag frotz side &&\n-\tgit branch frotz master &&\n+\tgit branch frotz main &&\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit checkout tags/frotz &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -346,7 +346,7 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \n test_expect_success 'switch branches while in subdirectory' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tmkdir subs &&\n \tgit -C subs checkout side &&\n@@ -362,7 +362,7 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \tgit add subs/bero &&\n \tgit commit -m \"add subs/bero\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tmkdir -p subs &&\n \tgit -C subs checkout side -- bero &&\n \ttest -f subs/bero\n@@ -370,7 +370,7 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \n test_expect_success 'checkout w/--track sets up tracking' '\n     git config branch.autosetupmerge false &&\n-    git checkout master &&\n+    git checkout main &&\n     git checkout --track -b track1 &&\n     test \"$(git config branch.track1.remote)\" &&\n     test \"$(git config branch.track1.merge)\"\n@@ -379,40 +379,40 @@ test_expect_success 'checkout w/--track sets up tracking' '\n test_expect_success 'checkout w/autosetupmerge=always sets up tracking' '\n     test_when_finished git config branch.autosetupmerge false &&\n     git config branch.autosetupmerge always &&\n-    git checkout master &&\n+    git checkout main &&\n     git checkout -b track2 &&\n     test \"$(git config branch.track2.remote)\" &&\n     test \"$(git config branch.track2.merge)\"\n '\n \n test_expect_success 'checkout w/--track from non-branch HEAD fails' '\n-    git checkout master^0 &&\n+    git checkout main^0 &&\n     test_must_fail git symbolic-ref HEAD &&\n     test_must_fail git checkout --track -b track &&\n     test_must_fail git rev-parse --verify track &&\n     test_must_fail git symbolic-ref HEAD &&\n-    test \"z$(git rev-parse master^0)\" = \"z$(git rev-parse HEAD)\"\n+    test \"z$(git rev-parse main^0)\" = \"z$(git rev-parse HEAD)\"\n '\n \n test_expect_success 'checkout w/--track from tag fails' '\n-    git checkout master^0 &&\n+    git checkout main^0 &&\n     test_must_fail git symbolic-ref HEAD &&\n     test_must_fail git checkout --track -b track frotz &&\n     test_must_fail git rev-parse --verify track &&\n     test_must_fail git symbolic-ref HEAD &&\n-    test \"z$(git rev-parse master^0)\" = \"z$(git rev-parse HEAD)\"\n+    test \"z$(git rev-parse main^0)\" = \"z$(git rev-parse HEAD)\"\n '\n \n test_expect_success 'detach a symbolic link HEAD' '\n-    git checkout master &&\n+    git checkout main &&\n     git config --bool core.prefersymlinkrefs yes &&\n     git checkout side &&\n-    git checkout master &&\n+    git checkout main &&\n     it=$(git symbolic-ref HEAD) &&\n-    test \"z$it\" = zrefs/heads/master &&\n-    here=$(git rev-parse --verify refs/heads/master) &&\n+    test \"z$it\" = zrefs/heads/main &&\n+    here=$(git rev-parse --verify refs/heads/main) &&\n     git checkout side^ &&\n-    test \"z$(git rev-parse --verify refs/heads/master)\" = \"z$here\"\n+    test \"z$(git rev-parse --verify refs/heads/main)\" = \"z$here\"\n '\n \n test_expect_success 'checkout with --track fakes a sensible -b <name>' '\n@@ -423,13 +423,13 @@ test_expect_success 'checkout with --track fakes a sensible -b <name>' '\n     test \"refs/heads/koala/bear\" = \"$(git symbolic-ref HEAD)\" &&\n     test \"$(git rev-parse HEAD)\" = \"$(git rev-parse renamer)\" &&\n \n-    git checkout master && git branch -D koala/bear &&\n+    git checkout main && git branch -D koala/bear &&\n \n     git checkout --track refs/remotes/origin/koala/bear &&\n     test \"refs/heads/koala/bear\" = \"$(git symbolic-ref HEAD)\" &&\n     test \"$(git rev-parse HEAD)\" = \"$(git rev-parse renamer)\" &&\n \n-    git checkout master && git branch -D koala/bear &&\n+    git checkout main && git branch -D koala/bear &&\n \n     git checkout --track remotes/origin/koala/bear &&\n     test \"refs/heads/koala/bear\" = \"$(git symbolic-ref HEAD)\" &&\n@@ -582,17 +582,17 @@ test_expect_success 'checkout --conflict=diff3' '\n '\n \n test_expect_success 'failing checkout -b should not break working tree' '\n-\tgit reset --hard master &&\n-\tgit symbolic-ref HEAD refs/heads/master &&\n+\tgit reset --hard main &&\n+\tgit symbolic-ref HEAD refs/heads/main &&\n \ttest_must_fail git checkout -b renamer side^ &&\n-\ttest $(git symbolic-ref HEAD) = refs/heads/master &&\n+\ttest $(git symbolic-ref HEAD) = refs/heads/main &&\n \tgit diff --exit-code &&\n \tgit diff --cached --exit-code\n '\n \n test_expect_success 'switch out of non-branch' '\n-\tgit reset --hard master &&\n-\tgit checkout master^0 &&\n+\tgit reset --hard main &&\n+\tgit checkout main^0 &&\n \techo modified >one &&\n \ttest_must_fail git checkout renamer 2>error.log &&\n \t! grep \"^Previous HEAD\" error.log\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex fec7e0299d..ce320807d4 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -124,7 +124,7 @@ inspect() {\n }\n \n test_expect_success 'submodule add' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -223,7 +223,7 @@ test_expect_success 'submodule add --branch' '\n \techo \"refs/heads/initial\" >expect-head &&\n \tcat <<-\\EOF >expect-heads &&\n \trefs/heads/initial\n-\trefs/heads/master\n+\trefs/heads/main\n \tEOF\n \n \t(\n@@ -241,7 +241,7 @@ test_expect_success 'submodule add --branch' '\n '\n \n test_expect_success 'submodule add with ./ in path' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -257,7 +257,7 @@ test_expect_success 'submodule add with ./ in path' '\n '\n \n test_expect_success 'submodule add with /././ in path' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -273,7 +273,7 @@ test_expect_success 'submodule add with /././ in path' '\n '\n \n test_expect_success 'submodule add with // in path' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -289,7 +289,7 @@ test_expect_success 'submodule add with // in path' '\n '\n \n test_expect_success 'submodule add with /.. in path' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -305,7 +305,7 @@ test_expect_success 'submodule add with /.. in path' '\n '\n \n test_expect_success 'submodule add with ./, /.. and // in path' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -335,7 +335,7 @@ test_expect_success !CYGWIN 'submodule add with \\\\ in path' '\n '\n \n test_expect_success 'submodule add in subdirectory' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \tmkdir addtest/sub &&\n \t(\n@@ -557,7 +557,7 @@ test_expect_success 'status should be \"up-to-date\" after update' '\n \n test_expect_success 'checkout superproject with subproject already present' '\n \tgit checkout initial &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'apply submodule diff' '\n@@ -574,7 +574,7 @@ test_expect_success 'apply submodule diff' '\n \tgit checkout second &&\n \tgit apply --index P.diff &&\n \n-\tgit diff --cached master >staged &&\n+\tgit diff --cached main >staged &&\n \ttest_must_be_empty staged\n '\n \ndiff --git a/t/t7403-submodule-sync.sh b/t/t7403-submodule-sync.sh\nindex 0726799e74..848d4e7db7 100755\n--- a/t/t7403-submodule-sync.sh\n+++ b/t/t7403-submodule-sync.sh\n@@ -78,7 +78,7 @@ test_expect_success 'change submodule url' '\n \t(\n \t\tcd super &&\n \t\tcd submodule &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit pull\n \t) &&\n \tmv submodule moved-submodule &&\n@@ -112,7 +112,7 @@ test_expect_success '\"git submodule sync\" should update submodule URLs' '\n \t)\" &&\n \t(\n \t\tcd super-clone/submodule &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit pull\n \t) &&\n \t(\n@@ -140,7 +140,7 @@ test_expect_success '\"git submodule sync --recursive\" should update all submodul\n \t)\" &&\n \t(\n \t\tcd super-clone/submodule/sub-submodule &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit pull\n \t)\n '\n@@ -168,7 +168,7 @@ test_expect_success '\"git submodule sync\" should update submodule URLs - subdire\n \t)\" &&\n \t(\n \t\tcd super-clone/submodule &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit pull\n \t) &&\n \t(\n@@ -199,7 +199,7 @@ test_expect_success '\"git submodule sync --recursive\" should update all submodul\n \t)\" &&\n \t(\n \t\tcd super-clone/submodule/sub-submodule &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit pull\n \t)\n '\ndiff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh\nindex acb8766ac2..87097846cb 100755\n--- a/t/t7406-submodule-update.sh\n+++ b/t/t7406-submodule-update.sh\n@@ -14,10 +14,10 @@ submodule and \"git submodule update --rebase/--merge\" does not detach the HEAD.\n \n compare_head()\n {\n-    sha_master=$(git rev-list --max-count=1 master)\n+    sha_main=$(git rev-list --max-count=1 main)\n     sha_head=$(git rev-list --max-count=1 HEAD)\n \n-    test \"$sha_master\" = \"$sha_head\"\n+    test \"$sha_main\" = \"$sha_head\"\n }\n \n \n@@ -262,14 +262,14 @@ test_expect_success 'submodule update --remote should fetch upstream changes wit\n \t\tcd super &&\n \t\tgit submodule update --remote --force submodule &&\n \t\tgit -C submodule log -1 --oneline >actual &&\n-\t\tgit -C ../submodule log -1 --oneline master >expect &&\n+\t\tgit -C ../submodule log -1 --oneline main >expect &&\n \t\ttest_cmp expect actual &&\n \t\tgit checkout -b test-branch &&\n \t\tgit submodule update --remote --force submodule &&\n \t\tgit -C submodule log -1 --oneline >actual &&\n \t\tgit -C ../submodule log -1 --oneline test-branch >expect &&\n \t\ttest_cmp expect actual &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit branch -d test-branch &&\n \t\tgit reset --hard HEAD^\n \t)\n@@ -282,7 +282,7 @@ test_expect_success 'local config should override .gitmodules branch' '\n \t git add file &&\n \t test_tick &&\n \t git commit -m \"upstream line5\" &&\n-\t git checkout master\n+\t git checkout main\n \t) &&\n \t(cd super &&\n \t git config submodule.submodule.branch test-branch &&\n@@ -292,9 +292,9 @@ test_expect_success 'local config should override .gitmodules branch' '\n \t)\n '\n \n-test_expect_success 'submodule update --rebase staying on master' '\n+test_expect_success 'submodule update --rebase staying on main' '\n \t(cd super/submodule &&\n-\t  git checkout master\n+\t  git checkout main\n \t) &&\n \t(cd super &&\n \t (cd submodule &&\n@@ -306,7 +306,7 @@ test_expect_success 'submodule update --rebase staying on master' '\n \t)\n '\n \n-test_expect_success 'submodule update --merge staying on master' '\n+test_expect_success 'submodule update --merge staying on main' '\n \t(cd super/submodule &&\n \t  git reset --hard HEAD~1\n \t) &&\n@@ -609,7 +609,7 @@ test_expect_success 'submodule update - update=none in .git/config' '\n \t(cd super &&\n \t git config submodule.submodule.update none &&\n \t (cd submodule &&\n-\t  git checkout master &&\n+\t  git checkout main &&\n \t  compare_head\n \t ) &&\n \t git diff --name-only >out &&\n@@ -629,7 +629,7 @@ test_expect_success 'submodule update - update=none in .git/config but --checkou\n \t(cd super &&\n \t git config submodule.submodule.update none &&\n \t (cd submodule &&\n-\t  git checkout master &&\n+\t  git checkout main &&\n \t  compare_head\n \t ) &&\n \t git diff --name-only >out &&\n@@ -689,7 +689,7 @@ test_expect_success 'submodule update continues after checkout error' '\n test_expect_success 'submodule update continues after recursive checkout error' '\n \t(cd super &&\n \t git reset --hard HEAD &&\n-\t git checkout master &&\n+\t git checkout main &&\n \t git submodule update &&\n \t (cd submodule &&\n \t  git submodule add ../submodule subsubmodule &&\n@@ -733,7 +733,7 @@ test_expect_success 'submodule update continues after recursive checkout error'\n \n test_expect_success 'submodule update exit immediately in case of merge conflict' '\n \t(cd super &&\n-\t git checkout master &&\n+\t git checkout main &&\n \t git reset --hard HEAD &&\n \t (cd submodule &&\n \t  (cd subsubmodule &&\n@@ -751,7 +751,7 @@ test_expect_success 'submodule update exit immediately in case of merge conflict\n \t git add submodule2 &&\n \t git commit -m \"two_new_submodule_commits\" &&\n \t (cd submodule &&\n-\t  git checkout master &&\n+\t  git checkout main &&\n \t  test_commit \"conflict\" file &&\n \t  echo \"conflict\" > file\n \t ) &&\n@@ -770,7 +770,7 @@ test_expect_success 'submodule update exit immediately in case of merge conflict\n \n test_expect_success 'submodule update exit immediately after recursive rebase error' '\n \t(cd super &&\n-\t git checkout master &&\n+\t git checkout main &&\n \t git reset --hard HEAD &&\n \t (cd submodule &&\n \t  git reset --hard HEAD &&\n@@ -786,7 +786,7 @@ test_expect_success 'submodule update exit immediately after recursive rebase er\n \t git add submodule2 &&\n \t git commit -m \"two_new_submodule_commits\" &&\n \t (cd submodule &&\n-\t  git checkout master &&\n+\t  git checkout main &&\n \t  test_commit \"conflict2\" file &&\n \t  echo \"conflict\" > file\n \t ) &&\n@@ -878,21 +878,21 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir re\n \tgit clone subsubsuper_update_r subsubsuper_update_r2 &&\n \t(cd subsubsuper_update_r2 &&\n \t test_commit \"update_subsubsuper\" file &&\n-\t git push origin master\n+\t git push origin main\n \t) &&\n \tgit clone subsuper_update_r subsuper_update_r2 &&\n \t(cd subsuper_update_r2 &&\n \t test_commit \"update_subsuper\" file &&\n \t git submodule add ../subsubsuper_update_r subsubmodule &&\n \t git commit -am \"subsubmodule\" &&\n-\t git push origin master\n+\t git push origin main\n \t) &&\n \tgit clone super_update_r super_update_r2 &&\n \t(cd super_update_r2 &&\n \t test_commit \"update_super\" file &&\n \t git submodule add ../subsuper_update_r submodule &&\n \t git commit -am \"submodule\" &&\n-\t git push origin master\n+\t git push origin main\n \t) &&\n \trm -rf super_update_r2 &&\n \tgit clone super_update_r super_update_r2 &&\n@@ -911,7 +911,7 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir re\n \n test_expect_success 'submodule add properly re-creates deeper level submodules' '\n \t(cd super &&\n-\t git reset --hard master &&\n+\t git reset --hard main &&\n \t rm -rf deeper/ &&\n \t git submodule add --force ../submodule deeper/submodule\n \t)\ndiff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh\nindex 6b2aa917e1..8ebcaa3694 100755\n--- a/t/t7407-submodule-foreach.sh\n+++ b/t/t7407-submodule-foreach.sh\n@@ -277,13 +277,13 @@ sub1sha1_short=$(cd clone3/sub1 && git rev-parse --short HEAD)\n sub2sha1_short=$(cd clone3/sub2 && git rev-parse --short HEAD)\n \n cat > expect <<EOF\n- $nested1sha1 nested1 (heads/master)\n- $nested2sha1 nested1/nested2 (heads/master)\n- $nested3sha1 nested1/nested2/nested3 (heads/master)\n- $submodulesha1 nested1/nested2/nested3/submodule (heads/master)\n+ $nested1sha1 nested1 (heads/main)\n+ $nested2sha1 nested1/nested2 (heads/main)\n+ $nested3sha1 nested1/nested2/nested3 (heads/main)\n+ $submodulesha1 nested1/nested2/nested3/submodule (heads/main)\n  $sub1sha1 sub1 ($sub1sha1_short)\n  $sub2sha1 sub2 ($sub2sha1_short)\n- $sub3sha1 sub3 (heads/master)\n+ $sub3sha1 sub3 (heads/main)\n EOF\n \n test_expect_success 'test \"status --recursive\"' '\n@@ -295,10 +295,10 @@ test_expect_success 'test \"status --recursive\"' '\n '\n \n cat > expect <<EOF\n- $nested1sha1 nested1 (heads/master)\n+ $nested1sha1 nested1 (heads/main)\n +$nested2sha1 nested1/nested2 (file2~1)\n- $nested3sha1 nested1/nested2/nested3 (heads/master)\n- $submodulesha1 nested1/nested2/nested3/submodule (heads/master)\n+ $nested3sha1 nested1/nested2/nested3 (heads/main)\n+ $submodulesha1 nested1/nested2/nested3/submodule (heads/main)\n EOF\n \n test_expect_success 'ensure \"status --cached --recursive\" preserves the --cached flag' '\n@@ -316,13 +316,13 @@ test_expect_success 'ensure \"status --cached --recursive\" preserves the --cached\n nested2sha1=$(git -C clone3/nested1/nested2 rev-parse HEAD)\n \n cat > expect <<EOF\n- $nested1sha1 ../nested1 (heads/master)\n+ $nested1sha1 ../nested1 (heads/main)\n +$nested2sha1 ../nested1/nested2 (file2)\n- $nested3sha1 ../nested1/nested2/nested3 (heads/master)\n- $submodulesha1 ../nested1/nested2/nested3/submodule (heads/master)\n+ $nested3sha1 ../nested1/nested2/nested3 (heads/main)\n+ $submodulesha1 ../nested1/nested2/nested3/submodule (heads/main)\n  $sub1sha1 ../sub1 ($sub1sha1_short)\n  $sub2sha1 ../sub2 ($sub2sha1_short)\n- $sub3sha1 ../sub3 (heads/master)\n+ $sub3sha1 ../sub3 (heads/main)\n EOF\n \n test_expect_success 'test \"status --recursive\" from sub directory' '\ndiff --git a/t/t7409-submodule-detached-work-tree.sh b/t/t7409-submodule-detached-work-tree.sh\nindex fc018e3638..727490eb15 100755\n--- a/t/t7409-submodule-detached-work-tree.sh\n+++ b/t/t7409-submodule-detached-work-tree.sh\n@@ -35,7 +35,7 @@ test_expect_success 'submodule on detached working tree' '\n \t\t\tgit rev-parse --verify HEAD >actual &&\n \t\t\ttest_cmp ../../../../expect actual\n \t\t) &&\n-\t\tgit push origin master\n+\t\tgit push origin main\n \t) &&\n \tmkdir home2 &&\n \t(\n@@ -44,7 +44,7 @@ test_expect_success 'submodule on detached working tree' '\n \t\tGIT_WORK_TREE=\"$(pwd)\" &&\n \t\tGIT_DIR=\"$(pwd)/.dotfiles\" &&\n \t\texport GIT_WORK_TREE GIT_DIR &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit submodule update --init &&\n \t\t(\n \t\t\tunset GIT_WORK_TREE GIT_DIR &&\n@@ -64,10 +64,10 @@ test_expect_success 'submodule on detached working pointed by core.worktree' '\n \t\tgit clone --bare ../remote \"$GIT_DIR\" &&\n \t\tgit config core.bare false &&\n \t\tgit config core.worktree .. &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit submodule add ../bundle1 .vim/bundle/dupe &&\n \t\ttest_commit \"dupe\" &&\n-\t\tgit push origin master\n+\t\tgit push origin main\n \t) &&\n \t(\n \t\tcd home &&\ndiff --git a/t/t7417-submodule-path-url.sh b/t/t7417-submodule-path-url.sh\nindex f7e7e94d7b..1c9181aee7 100755\n--- a/t/t7417-submodule-path-url.sh\n+++ b/t/t7417-submodule-path-url.sh\n@@ -36,7 +36,7 @@ test_expect_success MINGW 'submodule paths disallows trailing spaces' '\n \tsed \"s/sub/sub /\" <tree >tree.new &&\n \ttree=$(git -C super mktree <tree.new) &&\n \tcommit=$(echo with space | git -C super commit-tree $tree) &&\n-\tgit -C super update-ref refs/heads/master $commit &&\n+\tgit -C super update-ref refs/heads/main $commit &&\n \n \ttest_must_fail git clone --recurse-submodules super dst 2>err &&\n \ttest_i18ngrep \"sub \" err\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 44b4bba0cb..815d7b21fe 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,13 +257,13 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-3404|4013|5310|6300)\n+3404|4013|5310|6300|7064)\n \t# Avoid conflicts with patch series that are cooking at the same time\n \t# as the patch series changing the default of `init.defaultBranch`.\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-6]*)\n+[0-6]*|7[0-4]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"409840","messageId":"CAMP44s3DExJ-F=MKhKyupr5M0RDvr8kJzxXbWeNzNjUN1bzXUA@mail.gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-11-13T00:11:42Z","receivedAt":"2020-11-13T00:11:56Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Thu, Nov 12, 2020 at 5:55 PM Johannes Schindelin via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n\n> This is the big one. This changes the default of init.defaultBranch to main,\n> reflecting what many open source projects already did (which was followed by\n> GitHub, Azure Repos and others).\n\nI want to plant a big red flag here for the record.\n\nI am against this change.\n\nAt the very least in the manner it is being made. I started a separate\nthread [1] explaining the reasoning.\n\nIn addition to the manner--which I argue in that other thread should\nbe done for Git 3.0--I also object to the reasoning behind the change.\n\nLet me know if you would rather hear my arguments against the\nreasoning here, or in the other thread.\n\nCheers.\n\n[1] https://lore.kernel.org/git/CAMP44s3BJ3dGsLJ-6yA-Po459=+m826KD9an4+P3qOY1vkbxZg@mail.gmail.com/\n\n-- \nFelipe Contreras\n"},{"id":"409863","messageId":"87v9e9fujk.fsf@evledraar.gmail.com","threadId":"54633","inReplyTo":"f853fa946f5840518577584a5b8c51660da06928.1605221040.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 28/28] Change the default branch name to `main`","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2020-11-13T09:57:51Z","receivedAt":"2020-11-13T09:57:56Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Nov 12 2020, Don Goodman-Wilson via GitGitGadget wrote:\n\n> The current default name for the initial branch is a loaded term, and\n> many Open Source projects renamed their principal branches already. A\n> common choice appears to be `main`.\n>\n> Let's follow their lead and change the default of `init.defaultBranch`.\n\nI think it makes sense to split this change off from a 28-series test\ncleanup series.\n\n> diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh\n> index bd3fa3c6da..1b0abcb0f8 100644\n> --- a/t/lib-submodule-update.sh\n> +++ b/t/lib-submodule-update.sh\n> @@ -144,7 +144,7 @@ create_lib_submodule_repo () {\n>  \t\tgit checkout -b valid_sub1 &&\n>  \t\tgit revert HEAD &&\n>  \n> -\t\tgit checkout \"${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME-master}\"\n> +\t\tgit checkout \"${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME-main}\"\n\nEarlier in that function we're doing a \"git init\". With all this test\ncleanup I wonder why not just \"git rev-parse --abbrev-ref\" to get the\ndefault name, instead of carrying the hardcoding forward.\n\n"},{"id":"409865","messageId":"87sg9dfucb.fsf@evledraar.gmail.com","threadId":"54633","inReplyTo":"3aef39320e96aad10e133f1c97a9010aa85aa894.1605221039.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 14/28] t55[23]*: adjust the references to the default branch name \"main\"","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2020-11-13T10:02:12Z","receivedAt":"2020-11-13T10:02:18Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Nov 12 2020, Johannes Schindelin via GitGitGadget wrote:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> This trick was performed via\n>\n> \t$ (cd t &&\n> \t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n> \t\t-e 's/Master/Main/g' -e 's/naster/nain/g' -- t55[23]*.sh)\n>\n> Note that t5533 contains a variation of the name `master` (`naster`)\n> that we rename here, too.\n>\n> This commit allows us to define\n> `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for that range of tests.\n\nThere's also a \"naster\" in t/t1402-check-ref-format.sh that's not\nchanged here and missed by 02/28 of this series.\n\nIs there some meaning to the name \"nain\" and \"naster\" that I'm missing?\nIf not can we just call this \"topic\" or something while we're at it?\nI.e. this on top (just s/nain/topic/g):\n\ndiff --git a/t/t5533-push-cas.sh b/t/t5533-push-cas.sh\nindex 9fcec604c3..4e33ec1fb9 100755\n--- a/t/t5533-push-cas.sh\n+++ b/t/t5533-push-cas.sh\n@@ -201,12 +201,12 @@ test_expect_success 'cover everything with default force-with-lease (protected)'\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit branch nain main^\n+\t\tgit branch topic main^\n \t) &&\n \tgit ls-remote src refs/heads/\\* >expect &&\n \t(\n \t\tcd dst &&\n-\t\ttest_must_fail git push --force-with-lease origin main main:nain\n+\t\ttest_must_fail git push --force-with-lease origin main main:topic\n \t) &&\n \tgit ls-remote src refs/heads/\\* >actual &&\n \ttest_cmp expect actual\n@@ -216,16 +216,16 @@ test_expect_success 'cover everything with default force-with-lease (allowed)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit branch nain main^\n+\t\tgit branch topic main^\n \t) &&\n \t(\n \t\tcd dst &&\n \t\tgit fetch &&\n-\t\tgit push --force-with-lease origin main main:nain\n+\t\tgit push --force-with-lease origin main main:topic\n \t) &&\n \tgit ls-remote dst refs/heads/main |\n-\tsed -e \"s/main/nain/\" >expect &&\n-\tgit ls-remote src refs/heads/nain >actual &&\n+\tsed -e \"s/main/topic/\" >expect &&\n+\tgit ls-remote src refs/heads/topic >actual &&\n \ttest_cmp expect actual\n '\n \n"},{"id":"409886","messageId":"87pn4hfmc4.fsf@evledraar.gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2020-11-13T12:55:07Z","receivedAt":"2020-11-13T12:55:13Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Nov 12 2020, Johannes Schindelin via GitGitGadget wrote:\n\n> This is the big one. This changes the default of init.defaultBranch to main,\n> reflecting what many open source projects already did (which was followed by\n> GitHub, Azure Repos and others).\n\nI don't have an issue with the end goal of s/master/main|$whatever/ as\nUX here as noted in previous related review rounds. But I don't think\nthis series as it stands is anywhere near ready.\n\nThis is 27 patches of s/master/main/ in the tests, followed by making\nthe change to the default in refs.c without as much as a single\ndocumentation update to inform users of the change.\n\nI don't see the point in doing these sorts of test suite changes, it\njust seems like needless churn. But I have not read the whole backlog of\nprevious iterations of this & related patches, so bear with me.\n\nWhy not instead do what we did when we added protocol v2 to the tests,\ne.g. in 8a1b0978ab (\"test: request GIT_TEST_PROTOCOL_VERSION=0 when\nappropriate\", 2019-12-23) we simply set the t5515 test to always run\nwith protocol v1. If you'd do this:\n    \n    diff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh\n    index 70a9d2d8ab..939c8b2f83 100755\n    --- a/t/t5515-fetch-merge-logic.sh\n    +++ b/t/t5515-fetch-merge-logic.sh\n    @@ -11,6 +11,9 @@ test_description='Merge logic in fetch'\n     GIT_TEST_PROTOCOL_VERSION=0\n     export GIT_TEST_PROTOCOL_VERSION\n     \n    +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n    +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n    +\n     . ./test-lib.sh\n     \n     build_script () {\n    \nOf course that also needs:\n    \n    index fa347ed3e1..2d700a171b 100644\n    --- a/t/test-lib.sh\n    +++ b/t/test-lib.sh\n    @@ -1711,10 +1711,8 @@ test_lazy_prereq SHA1 '\n     test_lazy_prereq REBASE_P '\n     \ttest -z \"$GIT_TEST_SKIP_REBASE_P\"\n     '\n    -# Special-purpose prereq for transitioning to a new default branch name:\n    -# Some tests need more than just a mindless (case-preserving) s/master/main/g\n    -# replacement. The non-trivial adjustments are guarded behind this\n    -# prerequisite, acting kind of as a feature flag\n    -test_lazy_prereq PREPARE_FOR_MAIN_BRANCH '\n    -\ttest \"$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\" = main\n    +\n    +test_lazy_prereq MAIN_BRANCH_IS_MASTER '\n    +\ttest -z \"$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\" ||\n    +\ttest \"$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\" = \"master\"\n     '\n\nBecause (but see \"later\" a few paragraphs later), the logic as it stands\non \"master\" is entirely backwards & broken. I.e. if you don't set\nGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME or set it to \"master\" we now skip a\nbunch of tests ... which only work if the value is \"master\". If you set\nit to \"main\" they'll break.\n\nThen instead of ending up with a hardcoding of \"main\" we'd be able to\nrun the tests with a new custom branch name (even one with whitespace in\nit). That coverage is plenty to test any branch name hardcoding.\n\nThe remaining tests that would still have \"master\" would then just be\ndealt with by the same thing we did for the too-protocol-v1-specific\ntests, i.e.:\n    \n    diff --git a/t/t3502-cherry-pick-merge.sh b/t/t3502-cherry-pick-merge.sh\n    index 8b635a196d..354f9bd851 100755\n    --- a/t/t3502-cherry-pick-merge.sh\n    +++ b/t/t3502-cherry-pick-merge.sh\n    @@ -8,6 +8,8 @@ test_description='cherry picking and reverting a merge\n     \n     '\n     \n    +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n    +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     . ./test-lib.sh\n     \n     test_expect_success setup '\n    \nExcept unlike protocol v1/v2 we're really not gaining anything in\ncoverage by going further, it's not the point of any of these tests to\ntest for the default branch name. It's a *lot* of churn, \n\n\"Later\": After writing the above I see from 704fed9ea2 (\"tests: start\nmoving to a different default main branch name\", 2020-10-23) that this\nstate of affairs is intentional. But doesn't discuss why the more usual\n(because we've done it that way a few times before) v1/v2-esque\ntransition wasn't done instead.\n\nDoing it the other way still seems better. We're now not running our\nfull tests in anticipation for this series landing on \"master\", and\nafter applying this we're still not running all of them.\n\nAnyway, enough with discussing this detail of the test suite churn. My\nmain objection to this version of it is:\n\nAfter this series as it stands lands what's a rather big UI change in\ngit isn't discussed *anywhere* in the docs.\n\nI'm not saying we need some similar s/master/main/g in Documentation/ as\nwhat's being done here in t/, but I think a bare minimum for a rather\nbig UI change like this is:\n\n 1) Let's at least talk about it in some way in git-init(1), i.e. that\n    it used to be \"master\" before version so-and-so and is now\n    different. With this series applied we still say:\n\n    Documentation/git-init.txt:If not specified, fall back to the default name: `master`.\n\n 2) Ditto in the init.defaultBranch and things like that\n\n 3) After all this effort at eliminating \"master\" entirely in the tests\n    we're still shipping a sample hook that expects \"master\" on \"git\n    init\", and breaks now that it's \"main\"\n\nAnd maybe stuff like:\n\n 4) Have \"git init\" emit some new advice message saying that the default\n    has changed and we've init-ed a new repo with a \"main\" branch.\n\nOur primary concern should be the vast majority of users who don't\nfollow this topic on Twitter, don't read this mailing list, and are just\ngoing to waste 10 minutes of their day because some script they've had\nworking for years using \"git init\" did something unexpected.\n\nLet's at least aim to make that 5 minutes instead by making the change\nmore discoverable.\n"},{"id":"409901","messageId":"nycvar.QRO.7.76.6.2011131500020.18437@tvgsbejvaqbjf.bet","threadId":"54633","inReplyTo":"87v9e9fujk.fsf@evledraar.gmail.com","subject":"Re: [PATCH 28/28] Change the default branch name to `main`","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-13T14:09:14Z","receivedAt":"2020-11-13T14:10:16Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ævar,\n\nOn Fri, 13 Nov 2020, Ævar Arnfjörð Bjarmason wrote:\n\n>\n> On Thu, Nov 12 2020, Don Goodman-Wilson via GitGitGadget wrote:\n>\n> > The current default name for the initial branch is a loaded term, and\n> > many Open Source projects renamed their principal branches already. A\n> > common choice appears to be `main`.\n> >\n> > Let's follow their lead and change the default of `init.defaultBranch`.\n>\n> I think it makes sense to split this change off from a 28-series test\n> cleanup series.\n\nIt is not a test cleanup. It is a series of 27 patches preparing the test\nsuite for the change made in the 28th patch.\n\nI don't think that it is a good idea to split off that 28th patch from\nthe patches whose entire purpose is to prepare for that 28th patch.\n\n>\n> > diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh\n> > index bd3fa3c6da..1b0abcb0f8 100644\n> > --- a/t/lib-submodule-update.sh\n> > +++ b/t/lib-submodule-update.sh\n> > @@ -144,7 +144,7 @@ create_lib_submodule_repo () {\n> >  \t\tgit checkout -b valid_sub1 &&\n> >  \t\tgit revert HEAD &&\n> >\n> > -\t\tgit checkout \"${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME-master}\"\n> > +\t\tgit checkout \"${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME-main}\"\n>\n> Earlier in that function we're doing a \"git init\". With all this test\n> cleanup I wonder why not just \"git rev-parse --abbrev-ref\" to get the\n> default name, instead of carrying the hardcoding forward.\n\nMy goal was to keep everything as close to its original as possible. In\nv2.29.2, this line reads:\n\n\t\tgit checkout master\n\nSee https://github.com/git/git/blob/v2.29.2/t/lib-submodule-update.sh#L147\nto convince yourself.\n\nPersonally, I would have used something like\n\n\t\tmain=$(git symbolic-ref --short HEAD) &&\n\t\t[...]\n\t\tgit checkout $main\n\ninstead of what you suggested. That's a topic for another patch (series),\nthough.\n\nCiao,\nDscho\n"},{"id":"409902","messageId":"nycvar.QRO.7.76.6.2011131511060.18437@tvgsbejvaqbjf.bet","threadId":"54633","inReplyTo":"87sg9dfucb.fsf@evledraar.gmail.com","subject":"Re: [PATCH 14/28] t55[23]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-13T14:18:13Z","receivedAt":"2020-11-13T14:19:15Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ævar,\n\nOn Fri, 13 Nov 2020, Ævar Arnfjörð Bjarmason wrote:\n\n>\n> On Thu, Nov 12 2020, Johannes Schindelin via GitGitGadget wrote:\n>\n> > From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> >\n> > This trick was performed via\n> >\n> > \t$ (cd t &&\n> > \t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n> > \t\t-e 's/Master/Main/g' -e 's/naster/nain/g' -- t55[23]*.sh)\n> >\n> > Note that t5533 contains a variation of the name `master` (`naster`)\n> > that we rename here, too.\n> >\n> > This commit allows us to define\n> > `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for that range of tests.\n>\n> There's also a \"naster\" in t/t1402-check-ref-format.sh that's not\n> changed here and missed by 02/28 of this series.\n\nWhoops, you're right. It's not even new: 7c3f847aad7 (check-ref-format\n--branch: do not expand @{...} outside repository, 2017-10-17) introduced\nit. I missed that one, thank you for pointing it out.\n\nI will follow up with a separate patch to fix that, once the dust settles\non this here patch series.\n\n> Is there some meaning to the name \"nain\" and \"naster\" that I'm missing?\n\nI guess the original reasoning was to stay close to the original default\nbranch name. I'm not sure whether it is worth changing that idea. Like, if\nyou ask me whether it hurts to use \"nain\"? I looked up possible\nconnotations, and the most common one was \"grandmother\", and that's rather\nendearing to me.\n\nCiao,\nDscho\n\n> If not can we just call this \"topic\" or something while we're at it?\n> I.e. this on top (just s/nain/topic/g):\n>\n> diff --git a/t/t5533-push-cas.sh b/t/t5533-push-cas.sh\n> index 9fcec604c3..4e33ec1fb9 100755\n> --- a/t/t5533-push-cas.sh\n> +++ b/t/t5533-push-cas.sh\n> @@ -201,12 +201,12 @@ test_expect_success 'cover everything with default force-with-lease (protected)'\n>  \tsetup_srcdst_basic &&\n>  \t(\n>  \t\tcd src &&\n> -\t\tgit branch nain main^\n> +\t\tgit branch topic main^\n>  \t) &&\n>  \tgit ls-remote src refs/heads/\\* >expect &&\n>  \t(\n>  \t\tcd dst &&\n> -\t\ttest_must_fail git push --force-with-lease origin main main:nain\n> +\t\ttest_must_fail git push --force-with-lease origin main main:topic\n>  \t) &&\n>  \tgit ls-remote src refs/heads/\\* >actual &&\n>  \ttest_cmp expect actual\n> @@ -216,16 +216,16 @@ test_expect_success 'cover everything with default force-with-lease (allowed)' '\n>  \tsetup_srcdst_basic &&\n>  \t(\n>  \t\tcd src &&\n> -\t\tgit branch nain main^\n> +\t\tgit branch topic main^\n>  \t) &&\n>  \t(\n>  \t\tcd dst &&\n>  \t\tgit fetch &&\n> -\t\tgit push --force-with-lease origin main main:nain\n> +\t\tgit push --force-with-lease origin main main:topic\n>  \t) &&\n>  \tgit ls-remote dst refs/heads/main |\n> -\tsed -e \"s/main/nain/\" >expect &&\n> -\tgit ls-remote src refs/heads/nain >actual &&\n> +\tsed -e \"s/main/topic/\" >expect &&\n> +\tgit ls-remote src refs/heads/topic >actual &&\n>  \ttest_cmp expect actual\n>  '\n>\n>\n"},{"id":"409903","messageId":"nycvar.QRO.7.76.6.2011131519170.18437@tvgsbejvaqbjf.bet","threadId":"54633","inReplyTo":"87pn4hfmc4.fsf@evledraar.gmail.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-13T14:22:27Z","receivedAt":"2020-11-13T14:23:30Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ævar,\n\nOn Fri, 13 Nov 2020, Ævar Arnfjörð Bjarmason wrote:\n\n> On Thu, Nov 12 2020, Johannes Schindelin via GitGitGadget wrote:\n>\n> > This is the big one. This changes the default of init.defaultBranch to main,\n> > reflecting what many open source projects already did (which was followed by\n> > GitHub, Azure Repos and others).\n>\n> I don't have an issue with the end goal of s/master/main|$whatever/ as\n> UX here as noted in previous related review rounds. But I don't think\n> this series as it stands is anywhere near ready.\n>\n> This is 27 patches of s/master/main/ in the tests, followed by making\n> the change to the default in refs.c without as much as a single\n> documentation update to inform users of the change.\n\nOf course, this is _the one_ patch series mentioned in\nhttps://github.com/gitgitgadget/git/pull/655 that does _not_ link back to\nthe meta-PR.\n\nSo you're right, on its own, these 28 patches do not make sense.\n\nAnd if you split off the 28th patch, the remaining 27 patches make even\nless sense.\n\nThe reason why I partitioned the changes this way was that it is a _ton_\nof patches to review, and in many ways, these 28 patches are the most\nimportant ones to review (I didn't want to just rely on the CI builds\npassing, I reviewed those patches carefully, multiple times, to make sure\nthat they made sense in the goal to transition to `main`).\n\nI will respond to the rest of your concerns later,\nDscho\n\n>\n> I don't see the point in doing these sorts of test suite changes, it\n> just seems like needless churn. But I have not read the whole backlog of\n> previous iterations of this & related patches, so bear with me.\n>\n> Why not instead do what we did when we added protocol v2 to the tests,\n> e.g. in 8a1b0978ab (\"test: request GIT_TEST_PROTOCOL_VERSION=0 when\n> appropriate\", 2019-12-23) we simply set the t5515 test to always run\n> with protocol v1. If you'd do this:\n>\n>     diff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh\n>     index 70a9d2d8ab..939c8b2f83 100755\n>     --- a/t/t5515-fetch-merge-logic.sh\n>     +++ b/t/t5515-fetch-merge-logic.sh\n>     @@ -11,6 +11,9 @@ test_description='Merge logic in fetch'\n>      GIT_TEST_PROTOCOL_VERSION=0\n>      export GIT_TEST_PROTOCOL_VERSION\n>\n>     +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n>     +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n>     +\n>      . ./test-lib.sh\n>\n>      build_script () {\n>\n> Of course that also needs:\n>\n>     index fa347ed3e1..2d700a171b 100644\n>     --- a/t/test-lib.sh\n>     +++ b/t/test-lib.sh\n>     @@ -1711,10 +1711,8 @@ test_lazy_prereq SHA1 '\n>      test_lazy_prereq REBASE_P '\n>      \ttest -z \"$GIT_TEST_SKIP_REBASE_P\"\n>      '\n>     -# Special-purpose prereq for transitioning to a new default branch name:\n>     -# Some tests need more than just a mindless (case-preserving) s/master/main/g\n>     -# replacement. The non-trivial adjustments are guarded behind this\n>     -# prerequisite, acting kind of as a feature flag\n>     -test_lazy_prereq PREPARE_FOR_MAIN_BRANCH '\n>     -\ttest \"$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\" = main\n>     +\n>     +test_lazy_prereq MAIN_BRANCH_IS_MASTER '\n>     +\ttest -z \"$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\" ||\n>     +\ttest \"$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\" = \"master\"\n>      '\n>\n> Because (but see \"later\" a few paragraphs later), the logic as it stands\n> on \"master\" is entirely backwards & broken. I.e. if you don't set\n> GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME or set it to \"master\" we now skip a\n> bunch of tests ... which only work if the value is \"master\". If you set\n> it to \"main\" they'll break.\n>\n> Then instead of ending up with a hardcoding of \"main\" we'd be able to\n> run the tests with a new custom branch name (even one with whitespace in\n> it). That coverage is plenty to test any branch name hardcoding.\n>\n> The remaining tests that would still have \"master\" would then just be\n> dealt with by the same thing we did for the too-protocol-v1-specific\n> tests, i.e.:\n>\n>     diff --git a/t/t3502-cherry-pick-merge.sh b/t/t3502-cherry-pick-merge.sh\n>     index 8b635a196d..354f9bd851 100755\n>     --- a/t/t3502-cherry-pick-merge.sh\n>     +++ b/t/t3502-cherry-pick-merge.sh\n>     @@ -8,6 +8,8 @@ test_description='cherry picking and reverting a merge\n>\n>      '\n>\n>     +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n>     +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n>      . ./test-lib.sh\n>\n>      test_expect_success setup '\n>\n> Except unlike protocol v1/v2 we're really not gaining anything in\n> coverage by going further, it's not the point of any of these tests to\n> test for the default branch name. It's a *lot* of churn,\n>\n> \"Later\": After writing the above I see from 704fed9ea2 (\"tests: start\n> moving to a different default main branch name\", 2020-10-23) that this\n> state of affairs is intentional. But doesn't discuss why the more usual\n> (because we've done it that way a few times before) v1/v2-esque\n> transition wasn't done instead.\n>\n> Doing it the other way still seems better. We're now not running our\n> full tests in anticipation for this series landing on \"master\", and\n> after applying this we're still not running all of them.\n>\n> Anyway, enough with discussing this detail of the test suite churn. My\n> main objection to this version of it is:\n>\n> After this series as it stands lands what's a rather big UI change in\n> git isn't discussed *anywhere* in the docs.\n>\n> I'm not saying we need some similar s/master/main/g in Documentation/ as\n> what's being done here in t/, but I think a bare minimum for a rather\n> big UI change like this is:\n>\n>  1) Let's at least talk about it in some way in git-init(1), i.e. that\n>     it used to be \"master\" before version so-and-so and is now\n>     different. With this series applied we still say:\n>\n>     Documentation/git-init.txt:If not specified, fall back to the default name: `master`.\n>\n>  2) Ditto in the init.defaultBranch and things like that\n>\n>  3) After all this effort at eliminating \"master\" entirely in the tests\n>     we're still shipping a sample hook that expects \"master\" on \"git\n>     init\", and breaks now that it's \"main\"\n>\n> And maybe stuff like:\n>\n>  4) Have \"git init\" emit some new advice message saying that the default\n>     has changed and we've init-ed a new repo with a \"main\" branch.\n>\n> Our primary concern should be the vast majority of users who don't\n> follow this topic on Twitter, don't read this mailing list, and are just\n> going to waste 10 minutes of their day because some script they've had\n> working for years using \"git init\" did something unexpected.\n>\n> Let's at least aim to make that 5 minutes instead by making the change\n> more discoverable.\n>\n"},{"id":"409911","messageId":"20201113161320.16458-1-avarab@gmail.com","threadId":"54633","inReplyTo":"nycvar.QRO.7.76.6.2011131519170.18437@tvgsbejvaqbjf.bet","subject":"[RFC/PATCH] tests: support testing with an arbitrary default branch (sort of)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2020-11-13T16:13:20Z","receivedAt":"2020-11-13T16:13:38Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Since 704fed9ea2 (\"tests: start moving to a different default main\nbranch name\", 2020-10-23) we've been needlessly skipping tests if the\nbranch is \"master\" in preparation for an eventual switch to another name.\n\nAs I noted in [1] I don't see why we shouldn't be doing a more\ngraceful approach here where we don't start skipping unrelated tests\njust because some s/master/main/g changes are in flight.\n\nFurthermore the seeming goal of eliminating the string \"master\" from\nanywhere in git's sources results in needless patch churn, and has\nnothing to do with the goal of changing the branch name in the UX.\n\nThis patch demonstrates that things could be much simpler if we don't\nset ourselves that requirement. Now we:\n\n * Can set GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=<some-name>, but this\n   no longer overrides config, so it behaves like other GIT_TEST_*\n   variables.\n\n * Have a test-tool helper that gives us refs.c's idea of the main\n   branch name to share the logic between the tests and the main C\n   code.\n\n * A lot of tests (but a small minority of the total) have master\n   \"master\" hardcoded in some way. We now inventory them in\n   tests-that-need-master.txt, we can still remove the names from that\n   file and manually change the code later, but this accomplishes a\n   clean test run with a relatively easy-to-review diff.\n\n   We ignore GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=<name> when it comes\n   to these files, unless\n   GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME_HARDER=true is set.\n\n * The changes to t5515-fetch-merge-logic.sh and\n   t5560-http-backend-noserver.sh show how much easier it is to just\n   punt on certain tests. In these tests that heavily rely on the\n   \"master\" name (not inherently, it's just hardcoded in a lot of\n   places) we just give up and keep using \"master\".\n\n1. https://lore.kernel.org/git/87pn4hfmc4.fsf@evledraar.gmail.com/\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n\nI need to walk away from the computer now, but this is an RFC of what\nI was commenting on upthread.\n\n Makefile                            |   1 +\n config.c                            |  10 +\n config.h                            |   1 +\n refs.c                              |   7 +-\n t/helper/test-default-branch-name.c |  16 ++\n t/helper/test-tool.c                |   1 +\n t/helper/test-tool.h                |   1 +\n t/t0001-init.sh                     |   2 +-\n t/t5515-fetch-merge-logic.sh        |   3 +\n t/t5560-http-backend-noserver.sh    |   4 +\n t/test-lib.sh                       |  27 ++-\n t/tests-that-need-master.txt        | 343 ++++++++++++++++++++++++++++\n 12 files changed, 403 insertions(+), 13 deletions(-)\n create mode 100644 t/helper/test-default-branch-name.c\n create mode 100644 t/tests-that-need-master.txt\n\ndiff --git a/Makefile b/Makefile\nindex 790a883932..fb94c836e2 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -696,6 +696,7 @@ TEST_BUILTINS_OBJS += test-chmtime.o\n TEST_BUILTINS_OBJS += test-config.o\n TEST_BUILTINS_OBJS += test-ctype.o\n TEST_BUILTINS_OBJS += test-date.o\n+TEST_BUILTINS_OBJS += test-default-branch-name.o\n TEST_BUILTINS_OBJS += test-delta.o\n TEST_BUILTINS_OBJS += test-dir-iterator.o\n TEST_BUILTINS_OBJS += test-drop-caches.o\ndiff --git a/config.c b/config.c\nindex 2bdff4457b..0c12864b79 100644\n--- a/config.c\n+++ b/config.c\n@@ -1706,6 +1706,16 @@ unsigned long git_env_ulong(const char *k, unsigned long val)\n \treturn val;\n }\n \n+/*\n+ * Parse environment variable 'k' as a char *; if missing, use the\n+ * default value 'def'.\n+ */\n+const char* git_env_str(const char *k, const char *def)\n+{\n+\tconst char *v = getenv(k);\n+\treturn v && strlen(v) ? v : def;\n+}\n+\n int git_config_system(void)\n {\n \treturn !git_env_bool(\"GIT_CONFIG_NOSYSTEM\", 0);\ndiff --git a/config.h b/config.h\nindex 91cdfbfb41..36a7284f8a 100644\n--- a/config.h\n+++ b/config.h\n@@ -298,6 +298,7 @@ int git_config_copy_section_in_file(const char *, const char *, const char *);\n const char *git_etc_gitconfig(void);\n int git_env_bool(const char *, int);\n unsigned long git_env_ulong(const char *, unsigned long);\n+const char* git_env_str(const char *, const char *);\n int git_config_system(void);\n int config_error_nonbool(const char *);\n #if defined(__GNUC__)\ndiff --git a/refs.c b/refs.c\nindex 392f0bbf68..ca8875e945 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -567,15 +567,12 @@ char *repo_default_branch_name(struct repository *r)\n \tconst char *config_key = \"init.defaultbranch\";\n \tconst char *config_display_key = \"init.defaultBranch\";\n \tchar *ret = NULL, *full_ref;\n-\tconst char *env = getenv(\"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\");\n \n-\tif (env && *env)\n-\t\tret = xstrdup(env);\n-\telse if (repo_config_get_string(r, config_key, &ret) < 0)\n+\tif (repo_config_get_string(r, config_key, &ret) < 0)\n \t\tdie(_(\"could not retrieve `%s`\"), config_display_key);\n \n \tif (!ret)\n-\t\tret = xstrdup(\"master\");\n+\t\tret = xstrdup(git_env_str(\"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\", \"master\"));\n \n \tfull_ref = xstrfmt(\"refs/heads/%s\", ret);\n \tif (check_refname_format(full_ref, 0))\ndiff --git a/t/helper/test-default-branch-name.c b/t/helper/test-default-branch-name.c\nnew file mode 100644\nindex 0000000000..1a0c8502ee\n--- /dev/null\n+++ b/t/helper/test-default-branch-name.c\n@@ -0,0 +1,16 @@\n+#include \"test-tool.h\"\n+#include \"git-compat-util.h\"\n+#include \"refs.h\"\n+\n+/*\n+ * usage:\n+ * tool-test default-branch-name\n+ */\n+int cmd__default_branch_name(int argc, const char **argv)\n+{\n+\tconst char *name = git_default_branch_name();\n+\n+\tputs(name);\n+\n+\treturn 0;\n+}\ndiff --git a/t/helper/test-tool.c b/t/helper/test-tool.c\nindex a0d3966b29..ad4bd7274c 100644\n--- a/t/helper/test-tool.c\n+++ b/t/helper/test-tool.c\n@@ -21,6 +21,7 @@ static struct test_cmd cmds[] = {\n \t{ \"ctype\", cmd__ctype },\n \t{ \"date\", cmd__date },\n \t{ \"delta\", cmd__delta },\n+\t{ \"default-branch-name\", cmd__default_branch_name },\n \t{ \"dir-iterator\", cmd__dir_iterator },\n \t{ \"drop-caches\", cmd__drop_caches },\n \t{ \"dump-cache-tree\", cmd__dump_cache_tree },\ndiff --git a/t/helper/test-tool.h b/t/helper/test-tool.h\nindex 07034d3f38..e0dda6bfd8 100644\n--- a/t/helper/test-tool.h\n+++ b/t/helper/test-tool.h\n@@ -10,6 +10,7 @@ int cmd__chmtime(int argc, const char **argv);\n int cmd__config(int argc, const char **argv);\n int cmd__ctype(int argc, const char **argv);\n int cmd__date(int argc, const char **argv);\n+int cmd__default_branch_name(int argc, const char **argv);\n int cmd__delta(int argc, const char **argv);\n int cmd__dir_iterator(int argc, const char **argv);\n int cmd__drop_caches(int argc, const char **argv);\ndiff --git a/t/t0001-init.sh b/t/t0001-init.sh\nindex 69a320489f..68adb9a832 100755\n--- a/t/t0001-init.sh\n+++ b/t/t0001-init.sh\n@@ -562,7 +562,7 @@ test_expect_success 'overridden default main branch name (env)' '\n \ttest_config_global init.defaultBranch nmb &&\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=env git init main-branch-env &&\n \tgit -C main-branch-env symbolic-ref HEAD >actual &&\n-\tgrep env actual\n+\tgrep nmb actual\n '\n \n test_expect_success 'invalid default branch name' '\ndiff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh\nindex 70a9d2d8ab..939c8b2f83 100755\n--- a/t/t5515-fetch-merge-logic.sh\n+++ b/t/t5515-fetch-merge-logic.sh\n@@ -11,6 +11,9 @@ test_description='Merge logic in fetch'\n GIT_TEST_PROTOCOL_VERSION=0\n export GIT_TEST_PROTOCOL_VERSION\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n build_script () {\ndiff --git a/t/t5560-http-backend-noserver.sh b/t/t5560-http-backend-noserver.sh\nindex 9fafcf1945..27b31745ad 100755\n--- a/t/t5560-http-backend-noserver.sh\n+++ b/t/t5560-http-backend-noserver.sh\n@@ -1,6 +1,10 @@\n #!/bin/sh\n \n test_description='test git-http-backend-noserver'\n+\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n HTTPD_DOCUMENT_ROOT_PATH=\"$TRASH_DIRECTORY\"\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex fa347ed3e1..11ea009717 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -1382,6 +1382,26 @@ HOME=\"$TRASH_DIRECTORY\"\n GNUPGHOME=\"$HOME/gnupg-home-not-used\"\n export HOME GNUPGHOME\n \n+# Check if we're doing tests with the main branch != master, and if\n+# we'd like to override that for known-broken tests.\n+GIT_TEST_MAIN=$(test-tool default-branch-name)\n+if test \"$GIT_TEST_MAIN\" = \"master\"\n+then\n+\ttest_set_prereq MAIN_BRANCH_IS_MASTER\n+else\n+\tif test -z \"$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME_HARDER\" &&\n+\t   grep -q $TEST_NAME \"$TEST_DIRECTORY/tests-that-need-master.txt\"\n+\tthen\n+\t\techo overriding\n+\t\tGIT_TEST_MAIN=master\n+\t\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+\t\ttest_set_prereq MAIN_BRANCH_IS_MASTER\n+\tfi\n+fi\n+export GIT_TEST_MAIN\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n+# Initialize the repository after we know the main branch name.\n if test -z \"$TEST_NO_CREATE_REPO\"\n then\n \ttest_create_repo \"$TRASH_DIRECTORY\"\n@@ -1711,10 +1731,3 @@ test_lazy_prereq SHA1 '\n test_lazy_prereq REBASE_P '\n \ttest -z \"$GIT_TEST_SKIP_REBASE_P\"\n '\n-# Special-purpose prereq for transitioning to a new default branch name:\n-# Some tests need more than just a mindless (case-preserving) s/master/main/g\n-# replacement. The non-trivial adjustments are guarded behind this\n-# prerequisite, acting kind of as a feature flag\n-test_lazy_prereq PREPARE_FOR_MAIN_BRANCH '\n-\ttest \"$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\" = main\n-'\ndiff --git a/t/tests-that-need-master.txt b/t/tests-that-need-master.txt\nnew file mode 100644\nindex 0000000000..d7a693b19e\n--- /dev/null\n+++ b/t/tests-that-need-master.txt\n@@ -0,0 +1,343 @@\n+t0002-gitfile.sh\n+t0020-crlf.sh\n+t0021-conversion.sh\n+t0027-auto-crlf.sh\n+t0028-working-tree-encoding.sh\n+t0041-usage.sh\n+t0050-filesystem.sh\n+t0060-path-utils.sh\n+t0100-previous.sh\n+t1004-read-tree-m-u-wf.sh\n+t1008-read-tree-overlay.sh\n+t1009-read-tree-new-index.sh\n+t1011-read-tree-sparse-checkout.sh\n+t1021-rerere-in-workdir.sh\n+t1090-sparse-checkout-scope.sh\n+t1091-sparse-checkout-builtin.sh\n+t1300-config.sh\n+t1301-shared-repo.sh\n+t1305-config-include.sh\n+t1309-early-config.sh\n+t1400-update-ref.sh\n+t1402-check-ref-format.sh\n+t1403-show-ref.sh\n+t1405-main-ref-store.sh\n+t1406-submodule-ref-store.sh\n+t1407-worktree-ref-store.sh\n+t1408-packed-refs.sh\n+t1410-reflog.sh\n+t1411-reflog-show.sh\n+t1413-reflog-detach.sh\n+t1414-reflog-walk.sh\n+t1416-ref-transaction-hooks.sh\n+t1430-bad-ref-name.sh\n+t1450-fsck.sh\n+t1500-rev-parse.sh\n+t1503-rev-parse-verify.sh\n+t1505-rev-parse-last.sh\n+t1506-rev-parse-diagnosis.sh\n+t1507-rev-parse-upstream.sh\n+t1508-at-combinations.sh\n+t1511-rev-parse-caret.sh\n+t1512-rev-parse-disambiguation.sh\n+t1513-rev-parse-prefix.sh\n+t1514-rev-parse-push.sh\n+t1700-split-index.sh\n+t2007-checkout-symlink.sh\n+t2009-checkout-statinfo.sh\n+t2010-checkout-ambiguous.sh\n+t2011-checkout-invalid-head.sh\n+t2012-checkout-last.sh\n+t2015-checkout-unborn.sh\n+t2017-checkout-orphan.sh\n+t2020-checkout-detach.sh\n+t2022-checkout-paths.sh\n+t2023-checkout-m.sh\n+t2024-checkout-dwim.sh\n+t2027-checkout-track.sh\n+t2030-unresolve-info.sh\n+t2060-switch.sh\n+t2070-restore.sh\n+t2106-update-index-assume-unchanged.sh\n+t2400-worktree-add.sh\n+t2401-worktree-prune.sh\n+t2402-worktree-list.sh\n+t2405-worktree-submodule.sh\n+t3040-subprojects-basic.sh\n+t3200-branch.sh\n+t3201-branch-contains.sh\n+t3202-show-branch-octopus.sh\n+t3203-branch-output.sh\n+t3204-branch-name-interpretation.sh\n+t3205-branch-color.sh\n+t3206-range-diff.sh\n+t3210-pack-refs.sh\n+t3211-peel-ref.sh\n+t3301-notes.sh\n+t3302-notes-index-expensive.sh\n+t3303-notes-subtrees.sh\n+t3304-notes-mixed.sh\n+t3308-notes-merge.sh\n+t3320-notes-merge-worktrees.sh\n+t3400-rebase.sh\n+t3402-rebase-merge.sh\n+t3403-rebase-skip.sh\n+t3405-rebase-malformed.sh\n+t3406-rebase-message.sh\n+t3407-rebase-abort.sh\n+t3408-rebase-multi-line.sh\n+t3409-rebase-preserve-merges.sh\n+t3412-rebase-root.sh\n+t3413-rebase-hook.sh\n+t3415-rebase-autosquash.sh\n+t3416-rebase-onto-threedots.sh\n+t3418-rebase-continue.sh\n+t3419-rebase-patch-id.sh\n+t3420-rebase-autostash.sh\n+t3423-rebase-reword.sh\n+t3427-rebase-subtree.sh\n+t3430-rebase-merges.sh\n+t3431-rebase-fork-point.sh\n+t3432-rebase-fast-forward.sh\n+t3434-rebase-i18n.sh\n+t3435-rebase-gpg-sign.sh\n+t3436-rebase-more-options.sh\n+t3500-cherry.sh\n+t3501-revert-cherry-pick.sh\n+t3502-cherry-pick-merge.sh\n+t3503-cherry-pick-root.sh\n+t3504-cherry-pick-rerere.sh\n+t3505-cherry-pick-empty.sh\n+t3506-cherry-pick-ff.sh\n+t3507-cherry-pick-conflict.sh\n+t3508-cherry-pick-many-commits.sh\n+t3509-cherry-pick-merge-df.sh\n+t3512-cherry-pick-submodule.sh\n+t3600-rm.sh\n+t3701-add-interactive.sh\n+t3901-i18n-patch.sh\n+t3903-stash.sh\n+t3910-mac-os-precompose.sh\n+t4014-format-patch.sh\n+t4015-diff-whitespace.sh\n+t4017-diff-retval.sh\n+t4038-diff-combined.sh\n+t4041-diff-submodule-option.sh\n+t4048-diff-combined-binary.sh\n+t4052-stat-output.sh\n+t4056-diff-order.sh\n+t4057-diff-combined-paths.sh\n+t4061-diff-indent.sh\n+t4066-diff-emit-delay.sh\n+t4068-diff-symmetric-merge-base.sh\n+t4103-apply-binary.sh\n+t4108-apply-threeway.sh\n+t4121-apply-diffs.sh\n+t4122-apply-symlink-inside.sh\n+t4150-am.sh\n+t4200-rerere.sh\n+t4201-shortlog.sh\n+t4202-log.sh\n+t4203-mailmap.sh\n+t4204-patch-id.sh\n+t4207-log-decoration-colors.sh\n+t4208-log-magic-pathspec.sh\n+t4214-log-graph-octopus.sh\n+t4216-log-bloom.sh\n+t4253-am-keep-cr-dos.sh\n+t4257-am-interactive.sh\n+t5150-request-pull.sh\n+t5304-prune.sh\n+t5305-include-tag.sh\n+t5312-prune-corruption.sh\n+t5317-pack-objects-filter-objects.sh\n+t5322-pack-objects-sparse.sh\n+t5323-pack-redundant.sh\n+t5400-send-pack.sh\n+t5401-update-hooks.sh\n+t5402-post-merge-hook.sh\n+t5403-post-checkout-hook.sh\n+t5404-tracking-branches.sh\n+t5405-send-pack-rewind.sh\n+t5407-post-rewrite-hook.sh\n+t5410-receive-pack-alternates.sh\n+t5500-fetch-pack.sh\n+t5501-fetch-push-alternates.sh\n+t5502-quickfetch.sh\n+t5503-tagfollow.sh\n+t5504-fetch-receive-strict.sh\n+t5505-remote.sh\n+t5506-remote-groups.sh\n+t5509-fetch-push-namespaces.sh\n+t5510-fetch.sh\n+t5511-refspec.sh\n+t5512-ls-remote.sh\n+t5514-fetch-multiple.sh\n+t5516-fetch-push.sh\n+t5517-push-mirror.sh\n+t5518-fetch-exit-status.sh\n+t5519-push-alternates.sh\n+t5520-pull.sh\n+t5521-pull-options.sh\n+t5523-push-upstream.sh\n+t5526-fetch-submodules.sh\n+t5527-fetch-odd-refs.sh\n+t5528-push-default.sh\n+t5529-push-errors.sh\n+t5530-upload-pack-error.sh\n+t5531-deep-submodule-push.sh\n+t5533-push-cas.sh\n+t5534-push-signed.sh\n+t5537-fetch-shallow.sh\n+t5538-push-shallow.sh\n+t5539-fetch-http-shallow.sh\n+t5540-http-push-webdav.sh\n+t5541-http-push-smart.sh\n+t5542-push-http-shallow.sh\n+t5543-atomic-push.sh\n+t5545-push-options.sh\n+t5548-push-porcelain.sh\n+t5550-http-fetch-dumb.sh\n+t5551-http-fetch-smart.sh\n+t5552-skipping-fetch-negotiator.sh\n+t5553-set-upstream.sh\n+t5561-http-backend.sh\n+t5570-git-daemon.sh\n+t5571-pre-push-hook.sh\n+t5572-pull-submodule.sh\n+t5580-unc-paths.sh\n+t5581-http-curl-verbose.sh\n+t5582-fetch-negative-refspec.sh\n+t5601-clone.sh\n+t5604-clone-reference.sh\n+t5605-clone-local.sh\n+t5606-clone-options.sh\n+t5607-clone-bundle.sh\n+t5608-clone-2gb.sh\n+t5609-clone-branch.sh\n+t5610-clone-detached.sh\n+t5611-clone-config.sh\n+t5612-clone-refspec.sh\n+t5614-clone-submodules-shallow.sh\n+t5616-partial-clone.sh\n+t5617-clone-submodules-remote.sh\n+t5700-protocol-v1.sh\n+t5701-git-serve.sh\n+t5702-protocol-v2.sh\n+t5703-upload-pack-ref-in-want.sh\n+t5801-remote-helpers.sh\n+t6000-rev-list-misc.sh\n+t6001-rev-list-graft.sh\n+t6004-rev-list-path-optim.sh\n+t6006-rev-list-format.sh\n+t6007-rev-list-cherry-pick-file.sh\n+t6008-rev-list-submodule.sh\n+t6009-rev-list-parent.sh\n+t6012-rev-list-simplify.sh\n+t6013-rev-list-reverse-parents.sh\n+t6016-rev-list-graph-simplify-history.sh\n+t6017-rev-list-stdin.sh\n+t6018-rev-list-glob.sh\n+t6019-rev-list-ancestry-path.sh\n+t6030-bisect-porcelain.sh\n+t6040-tracking-info.sh\n+t6050-replace.sh\n+t6101-rev-parse-parents.sh\n+t6110-rev-list-sparse.sh\n+t6111-rev-list-treesame.sh\n+t6112-rev-list-filters-objects.sh\n+t6120-describe.sh\n+t6200-fmt-merge-msg.sh\n+t6302-for-each-ref-filter.sh\n+t6400-merge-df.sh\n+t6402-merge-rename.sh\n+t6404-recursive-merge.sh\n+t6405-merge-symlinks.sh\n+t6406-merge-attr.sh\n+t6407-merge-binary.sh\n+t6409-merge-subtree.sh\n+t6411-merge-filemode.sh\n+t6412-merge-large-rename.sh\n+t6413-merge-crlf.sh\n+t6414-merge-rename-nocruft.sh\n+t6415-merge-dir-to-symlink.sh\n+t6416-recursive-corner-cases.sh\n+t6417-merge-ours-theirs.sh\n+t6418-merge-text-auto.sh\n+t6419-merge-ignorecase.sh\n+t6422-merge-rename-corner-cases.sh\n+t6425-merge-rename-delete.sh\n+t6427-diff3-conflict-markers.sh\n+t6430-merge-recursive.sh\n+t6432-merge-recursive-space-options.sh\n+t6433-merge-toplevel.sh\n+t6434-merge-recursive-rename-options.sh\n+t6436-merge-overwrite.sh\n+t6437-submodule-merge.sh\n+t6439-merge-co-error-msgs.sh\n+t6501-freshen-objects.sh\n+t7003-filter-branch.sh\n+t7004-tag.sh\n+t7030-verify-tag.sh\n+t7060-wtstatus.sh\n+t7063-status-untracked-cache.sh\n+t7102-reset.sh\n+t7113-post-index-change-hook.sh\n+t7201-co.sh\n+t7400-submodule-basic.sh\n+t7403-submodule-sync.sh\n+t7406-submodule-update.sh\n+t7407-submodule-foreach.sh\n+t7409-submodule-detached-work-tree.sh\n+t7417-submodule-path-url.sh\n+t7501-commit-basic-functionality.sh\n+t7502-commit-porcelain.sh\n+t7503-pre-commit-and-pre-merge-commit-hooks.sh\n+t7504-commit-msg-hook.sh\n+t7505-prepare-commit-msg-hook.sh\n+t7508-status.sh\n+t7510-signed-commit.sh\n+t7512-status-help.sh\n+t7517-per-repo-email.sh\n+t7600-merge.sh\n+t7606-merge-custom.sh\n+t7608-merge-messages.sh\n+t7610-mergetool.sh\n+t7611-merge-abort.sh\n+t7612-merge-verify-signatures.sh\n+t7614-merge-signoff.sh\n+t7701-repack-unpack-unreachable.sh\n+t7800-difftool.sh\n+t7810-grep.sh\n+t8001-annotate.sh\n+t8003-blame-corner-cases.sh\n+t8004-blame-with-conflicts.sh\n+t9001-send-email.sh\n+t9100-git-svn-basic.sh\n+t9145-git-svn-master-branch.sh\n+t9151-svn-mergeinfo.sh\n+t9155-git-svn-fetch-deleted-tag.sh\n+t9156-git-svn-fetch-deleted-tag-2.sh\n+t9163-git-svn-reset-clears-caches.sh\n+t9169-git-svn-dcommit-crlf.sh\n+t9300-fast-import.sh\n+t9301-fast-import-notes.sh\n+t9302-fast-import-unpack-limit.sh\n+t9350-fast-export.sh\n+t9351-fast-export-anonymize.sh\n+t9400-git-cvsserver-server.sh\n+t9401-git-cvsserver-crlf.sh\n+t9402-git-cvsserver-refs.sh\n+t9500-gitweb-standalone-no-errors.sh\n+t9501-gitweb-standalone-http-status.sh\n+t9502-gitweb-standalone-parse-output.sh\n+t9600-cvsimport.sh\n+t9601-cvsimport-vendor-branch.sh\n+t9602-cvsimport-branches-tags.sh\n+t9603-cvsimport-patchsets.sh\n+t9800-git-p4-basic.sh\n+t9801-git-p4-branch.sh\n+t9806-git-p4-options.sh\n+t9807-git-p4-submit.sh\n+t9811-git-p4-label-import.sh\n+t9903-bash-prompt.sh\n-- \n2.29.2.222.g5d2a92d10f8\n\n"},{"id":"409913","messageId":"CAMP44s20UBE0w8CYmw_m3vs_e=S32Kzxq-f-SAMDPm7Pz1zHzg@mail.gmail.com","threadId":"54633","inReplyTo":"87pn4hfmc4.fsf@evledraar.gmail.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-11-13T17:42:20Z","receivedAt":"2020-11-13T17:42:37Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Fri, Nov 13, 2020 at 7:00 AM Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n> On Thu, Nov 12 2020, Johannes Schindelin via GitGitGadget wrote:\n\n> After this series as it stands lands what's a rather big UI change in\n> git isn't discussed *anywhere* in the docs.\n>\n> I'm not saying we need some similar s/master/main/g in Documentation/ as\n> what's being done here in t/, but I think a bare minimum for a rather\n> big UI change like this is:\n\nWhy not?\n\nIsn't this change being championed on behalf of users who find the\nword offensive?\n\nWhy would it be offensive to see the word on the commands you type on\nthe command line, but not offensive if the documentation tells you to\ntype those commands? This does not compute.\n\nAnd worse; for the rest of the users that don't find the word\noffensive (99.9% of them?), the documentation is left in an\ninconsistent state, where some commands would not work as they are\nstated.\n\nIf a word is so offensive it has to be erased from the Git lexicon,\nthen it has to be erased *everywhere*, or at least everywhere a user\nmight look.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"409914","messageId":"20201113191418.GA764688@coredump.intra.peff.net","threadId":"54633","inReplyTo":"20201113161320.16458-1-avarab@gmail.com","subject":"Re: [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-11-13T19:14:18Z","receivedAt":"2020-11-13T19:14:21Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 13, 2020 at 05:13:20PM +0100, Ævar Arnfjörð Bjarmason wrote:\n\n>  * A lot of tests (but a small minority of the total) have master\n>    \"master\" hardcoded in some way. We now inventory them in\n>    tests-that-need-master.txt, we can still remove the names from that\n>    file and manually change the code later, but this accomplishes a\n>    clean test run with a relatively easy-to-review diff.\n> \n>    We ignore GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=<name> when it comes\n>    to these files, unless\n>    GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME_HARDER=true is set.\n\nI'm confused how this is better. We could just be setting\nGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME at the top of those files, couldn't\nwe? (Likewise, I think annotating individual scripts is more\ndecentralized than a magic pattern in test-lib.sh, though it amounts to\nthe same thing).\n\nAnd if I understand the current state of Dscho's patches, we don't\n_have_ to convert any tests right now. We could just annotate those\nscripts which are not yet converted to have them use the old name.\n\nBut I don't think we want to live in that state indefinitely. It's\nslightly annoying to have inconsistent naming within the tests. I'd be\nhappy to switch individual tests at a leisurely pace over the next\ncouple of months or whatever. But since Dscho has bothered to write all\nof the patches now, why not use them?\n\nI'm much more concerned about the lack of documentation changes\nassociated with the final patch. We don't necessarily need to eradicate\nevery mention of \"master\" from the documentation, but I think we do need\nto make sure that examples and instructions are consistent with how Git\nwill actually behave. And that does need to happen at the same time as\nthe user-visible flip of the default.\n\nI'm on the fence whether there should be a deprecation period or major\nversion bump for the final patch, but making the tests flexible enough\nto handle the before and after state seems like it can be done uncoupled\nfrom the actual default-flip.\n\n-Peff\n"},{"id":"409929","messageId":"nycvar.QRO.7.76.6.2011132229480.18437@tvgsbejvaqbjf.bet","threadId":"54633","inReplyTo":"20201113191418.GA764688@coredump.intra.peff.net","subject":"Re: [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-13T22:00:48Z","receivedAt":"2020-11-13T22:02:43Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Peff and Ævar,\n\nOn Fri, 13 Nov 2020, Jeff King wrote:\n\n> On Fri, Nov 13, 2020 at 05:13:20PM +0100, Ævar Arnfjörð Bjarmason wrote:\n>\n> >  * A lot of tests (but a small minority of the total) have master\n> >    \"master\" hardcoded in some way. We now inventory them in\n> >    tests-that-need-master.txt, we can still remove the names from that\n> >    file and manually change the code later, but this accomplishes a\n> >    clean test run with a relatively easy-to-review diff.\n> >\n> >    We ignore GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=<name> when it comes\n> >    to these files, unless\n> >    GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME_HARDER=true is set.\n>\n> I'm confused how this is better. We could just be setting\n> GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME at the top of those files, couldn't\n> we? (Likewise, I think annotating individual scripts is more\n> decentralized than a magic pattern in test-lib.sh, though it amounts to\n> the same thing).\n\nI considered this alternative very briefly, and rejected it immediately\nbecause it would have implied a drawn-out limbo where the test suite will\nbe inconsistent. That's not what I want.\n\n> And if I understand the current state of Dscho's patches, we don't\n> _have_ to convert any tests right now. We could just annotate those\n> scripts which are not yet converted to have them use the old name.\n\nAnd that's what I did in some cases, see e.g. 5d5f4ea30de (t5411: finish\npreparing for `main` being the default branch name, 2020-10-31).\n\nIt's just quite a ton of work to do this for all the affected test\nscripts, and I wanted to automate as much as possible of that process so\nthat it'll be easier to cope with all the other topics that are in flight.\n\nTherefore, I opted to \"annotate the scripts\" via a `case` in\n`test-lib.sh`. It should be quite a bit easier to understand, too, for the\noccasional reader, as it shows you the complete range of scripts that have\nbeen handled so far.\n\n> But I don't think we want to live in that state indefinitely. It's\n> slightly annoying to have inconsistent naming within the tests. I'd be\n> happy to switch individual tests at a leisurely pace over the next\n> couple of months or whatever. But since Dscho has bothered to write all\n> of the patches now, why not use them?\n\nYep, I am a bit puzzled why we need to consider other approaches. I would\nhave thought that the more pressing issue is to verify that I\n\n1) caught all the necessary conversions,\n\n2) did not miss any non-trivial adjustments (such as `naster` and aligned\n   comments).\n\nAt the same time, I am quite thankful for all the help Ævar provided;\nmentioning that I missed `naster` in t1400 was definitely super helpful.\n\n> I'm much more concerned about the lack of documentation changes\n> associated with the final patch. We don't necessarily need to eradicate\n> every mention of \"master\" from the documentation, but I think we do need\n> to make sure that examples and instructions are consistent with how Git\n> will actually behave. And that does need to happen at the same time as\n> the user-visible flip of the default.\n\nI am sorry. This is totally my fault. I should have described this much\nbetter in the cover letter. This patch series deliberately omits all the\ndocumentation changes.\n\nI _did_ prepare them, they are pretty much ready-to-go, as part of the\n`inclusive-naming` branch I track in\nhttps://github.com/gitgitgadget/git/pull/655 (I use the branch name\n`use-main-as-default-branch-name-docs` in the `inclusive-naming` branch\nthicket to track the documentation changes).\n\nThe decision to separate them out into their own patch series was made\nconsciously, to avoid having one big, honking, totally unreviewably large\npatch series.\n\nTherefore, just like I fed the preparatory patch series in a slow cadence,\nI planned on feeding the `-docs` patch series once the dust settles on\nthis patch series (i.e. once it hits `next`).\n\n> I'm on the fence whether there should be a deprecation period or major\n> version bump for the final patch, but making the tests flexible enough\n> to handle the before and after state seems like it can be done uncoupled\n> from the actual default-flip.\n\nHmm. On that matter, I wonder what the big fuss is all about. It's not\nlike Git is forcing anybody to change their default branch. That's not at\nall what we're doing. To the contrary: _after_ many projects chose to\nchange their default branch names, and _after_ GitHub started to follow\nthat trend, Git added support for `init.defaultBranch` to accommodate that\nuse case better. So in a sense, we're actually pretty late changing the\nfall-back of `init.defaultBranch`, at least from the perspective outside\nof the Git project.\n\nThere have been plenty of articles about this in the meantime, too, and\nI could imagine that most developers are at least aware that the shift\naway from `master` is happening, in many quite visible projects.\n\nSo to me, this whole discussion about whether this should bump the major\nversion of Git seems a bit overblown. It's not like the median developer\nis creating new repositories on a regular basis, and if they do, chances\nare that they go with whatever branch name happens to be the initial one.\n\nWhat is much more common is that developers clone existing projects. And\nguess what, many of those projects already use a different default branch\nname. And developers seem to accept that and just go on with their lives.\n\nIf it was up to me, I would reserve a major version increment to much\nbigger changes.\n\nCiao,\nDscho\n"},{"id":"409932","messageId":"nycvar.QRO.7.76.6.2011132324070.18437@tvgsbejvaqbjf.bet","threadId":"54633","inReplyTo":"nycvar.QRO.7.76.6.2011132229480.18437@tvgsbejvaqbjf.bet","subject":"Re: [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-13T22:39:00Z","receivedAt":"2020-11-13T22:40:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Peff,\n\nOn Fri, 13 Nov 2020, Johannes Schindelin wrote:\n\n> On Fri, 13 Nov 2020, Jeff King wrote:\n>\n> > I'm on the fence whether there should be a deprecation period or major\n> > version bump for the final patch, but making the tests flexible enough\n> > to handle the before and after state seems like it can be done uncoupled\n> > from the actual default-flip.\n>\n> [...] It's not like the median developer is creating new repositories on\n> a regular basis, and if they do, chances are that they go with whatever\n> branch name happens to be the initial one.\n>\n> What is much more common is that developers clone existing projects. And\n> guess what, many of those projects already use a different default branch\n> name. And developers seem to accept that and just go on with their lives.\n\nAfter sending off this mail, I felt a bit bad about not backing this up\nwith data.\n\nWhatever telemetry I would be able to pull would not be representative,\nand I would not be at liberty to share it anyway. So I asked Alex Mullans\nof GitHub (who is in charge of the default branch name switch to `main`\nthere) whether he has any data I could share publicly and he said: \"Across\nGitHub, 1/4 of daily pushes (and growing) go to `main`.\"\n\nSeeing as the branch name to be used in newly-created repositories on\nGitHub changed only very recently (October 1st, i.e. some 6 weeks ago), I\nhighly suspect that this number means that _a lot_ of existing projects\nhave changed their primary branch name to `main`, and seem to be quite\nhappy with it.\n\nAll this is to say that I consider it unnecessary to have a long\ndeprecation period or major version bump for this patch series, based on\navailable public data. The name `main` is already in wide-spread use (and\ngrowing) as primary branch name of Git projects.\n\nCiao,\nDscho\n"},{"id":"409936","messageId":"87h7psg6lz.fsf@evledraar.gmail.com","threadId":"54633","inReplyTo":"nycvar.QRO.7.76.6.2011132229480.18437@tvgsbejvaqbjf.bet","subject":"Re: [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2020-11-13T23:49:28Z","receivedAt":"2020-11-13T23:49:56Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Fri, Nov 13 2020, Johannes Schindelin wrote:\n\n> Hi Peff and Ævar,\n>\n> On Fri, 13 Nov 2020, Jeff King wrote:\n>\n>> On Fri, Nov 13, 2020 at 05:13:20PM +0100, Ævar Arnfjörð Bjarmason wrote:\n>>\n>> >  * A lot of tests (but a small minority of the total) have master\n>> >    \"master\" hardcoded in some way. We now inventory them in\n>> >    tests-that-need-master.txt, we can still remove the names from that\n>> >    file and manually change the code later, but this accomplishes a\n>> >    clean test run with a relatively easy-to-review diff.\n>> >\n>> >    We ignore GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=<name> when it comes\n>> >    to these files, unless\n>> >    GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME_HARDER=true is set.\n>>\n>> I'm confused how this is better. We could just be setting\n>> GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME at the top of those files, couldn't\n>> we? (Likewise, I think annotating individual scripts is more\n>> decentralized than a magic pattern in test-lib.sh, though it amounts to\n>> the same thing).\n>\n> I considered this alternative very briefly, and rejected it immediately\n> because it would have implied a drawn-out limbo where the test suite will\n> be inconsistent. That's not what I want.\n>\n>> And if I understand the current state of Dscho's patches, we don't\n>> _have_ to convert any tests right now. We could just annotate those\n>> scripts which are not yet converted to have them use the old name.\n>\n> And that's what I did in some cases, see e.g. 5d5f4ea30de (t5411: finish\n> preparing for `main` being the default branch name, 2020-10-31).\n>\n> It's just quite a ton of work to do this for all the affected test\n> scripts, and I wanted to automate as much as possible of that process so\n> that it'll be easier to cope with all the other topics that are in flight.\n>\n> Therefore, I opted to \"annotate the scripts\" via a `case` in\n> `test-lib.sh`. It should be quite a bit easier to understand, too, for the\n> occasional reader, as it shows you the complete range of scripts that have\n> been handled so far.\n>\n>> But I don't think we want to live in that state indefinitely. It's\n>> slightly annoying to have inconsistent naming within the tests. I'd be\n>> happy to switch individual tests at a leisurely pace over the next\n>> couple of months or whatever. But since Dscho has bothered to write all\n>> of the patches now, why not use them?\n>\n> Yep, I am a bit puzzled why we need to consider other approaches. I would\n> have thought that the more pressing issue is to verify that I\n>\n> 1) caught all the necessary conversions,\n>\n> 2) did not miss any non-trivial adjustments (such as `naster` and aligned\n>    comments).\n>\n> At the same time, I am quite thankful for all the help Ævar provided;\n> mentioning that I missed `naster` in t1400 was definitely super helpful.\n\nNot being up-to-date on this whole s/master/main/g discussion, is the\ncontext here that we've essentially pre-approved these patches & doc for\nintegration into the next release? If so I really don't mind doing it\nthis way.\n\nI started poking at this because I noticed that on git.git's master\nbranch tests were being skipped due to PREPARE_FOR_MAIN_BRANCH, so it's\nin some in-between state between patch serieses.\n\nWe're now in week 4/9 of a release cycle for 2.30 (or 3.00 or\nwhatever). I hope the one thing people for & against this master/main\nchange can agree on is that it would be bad to ship a git with an\nincomplete migration to \"main\", e.g. the 28/28 patch here which changes\nit but without any doc updates.\n\nI may be reading this wrong, but it seems\npr-762/dscho/use-main-as-default-branch-name-v1...remotes/dscho/inclusive-naming\n(which I'm assuming is what's left) is another ~30k line diff on top of\nthis ~25k one.\n\nSo yes I'm very late to the discussion, sorry about that. I'm just\nchiming in to say that if we're doing this as part of our regular patch\nreview front-loading these massive search/replace changes seems to be\ntoo much of a change for one cycle.\n\nBut if Junio's going to chime in to say he's applying it all I don't\ncare & don't have any concern about it.\n\n>> I'm much more concerned about the lack of documentation changes\n>> associated with the final patch. We don't necessarily need to eradicate\n>> every mention of \"master\" from the documentation, but I think we do need\n>> to make sure that examples and instructions are consistent with how Git\n>> will actually behave. And that does need to happen at the same time as\n>> the user-visible flip of the default.\n>\n> I am sorry. This is totally my fault. I should have described this much\n> better in the cover letter. This patch series deliberately omits all the\n\nDitto in my hastily-written RFC commit message. A better summary is:\n\n * Yours: All tests depend on master changed to all tests depend on main\n * Mine (well, partway there): You can set $ANY_NAME for the branch, but\n   we blacklist some as being hardcoded on <name> (which I just left at\n   master).\n\n   This means we can test e.g. non-ASCII default branch names. It seems\n   better to me if we're going to s/master/something/g & review it to\n   have that something be \\$GIT_TEST_MAIN (or another variable). Then we\n   can mark that test as \"accepts any default branch name\" and move on.\n\n * Yours: Requires not running some tests while we wait for this to land\n * Mine: Run all tests & mark them as we go along for\n   master||$NEWNAME. Similar to the test protocol v2 refactoring\n\nBut yeah e.g. the t/tests-that-need-master.txt I added in my RFC is\nbetter marked in the test itself, I should have stolen your 'case\n\"$TEST_NUMBER\"' way of doing it.\n\nIn my defense I honestly managed to miss it in skimming the ginormous\ndiff, which I think makes part of my argument here :)\n\n> I _did_ prepare them, they are pretty much ready-to-go, as part of the\n> `inclusive-naming` branch I track in\n> https://github.com/gitgitgadget/git/pull/655 (I use the branch name\n> `use-main-as-default-branch-name-docs` in the `inclusive-naming` branch\n> thicket to track the documentation changes).\n>\n> The decision to separate them out into their own patch series was made\n> consciously, to avoid having one big, honking, totally unreviewably large\n> patch series.\n>\n> Therefore, just like I fed the preparatory patch series in a slow cadence,\n> I planned on feeding the `-docs` patch series once the dust settles on\n> this patch series (i.e. once it hits `next`).\n\nOn the topic of deprecation etc.:\n\n>> I'm on the fence whether there should be a deprecation period or major\n>> version bump for the final patch, but making the tests flexible enough\n>> to handle the before and after state seems like it can be done uncoupled\n>> from the actual default-flip.\n>\n> Hmm. On that matter, I wonder what the big fuss is all about. It's not\n> like Git is forcing anybody to change their default branch. That's not at\n> all what we're doing. To the contrary: _after_ many projects chose to\n> change their default branch names, and _after_ GitHub started to follow\n> that trend, Git added support for `init.defaultBranch` to accommodate that\n> use case better. So in a sense, we're actually pretty late changing the\n> fall-back of `init.defaultBranch`, at least from the perspective outside\n> of the Git project.\n>\n> There have been plenty of articles about this in the meantime, too, and\n> I could imagine that most developers are at least aware that the shift\n> away from `master` is happening, in many quite visible projects.\n>\n> So to me, this whole discussion about whether this should bump the major\n> version of Git seems a bit overblown. It's not like the median developer\n> is creating new repositories on a regular basis, and if they do, chances\n> are that they go with whatever branch name happens to be the initial one.\n>\n> What is much more common is that developers clone existing projects. And\n> guess what, many of those projects already use a different default branch\n> name. And developers seem to accept that and just go on with their lives.\n>\n> If it was up to me, I would reserve a major version increment to much\n> bigger changes.\n>\n[I'm continuing quoting you here from your downthread\n<nycvar.QRO.7.76.6.2011132324070.18437@tvgsbejvaqbjf.bet>]\n\n> Whatever telemetry I would be able to pull would not be representative,\n> and I would not be at liberty to share it anyway. So I asked Alex Mullans\n> of GitHub (who is in charge of the default branch name switch to `main`\n> there) whether he has any data I could share publicly and he said: \"Across\n> GitHub, 1/4 of daily pushes (and growing) go to `main`.\"\n> \n> Seeing as the branch name to be used in newly-created repositories on\n> GitHub changed only very recently (October 1st, i.e. some 6 weeks ago), I\n> highly suspect that this number means that _a lot_ of existing projects\n> have changed their primary branch name to `main`, and seem to be quite\n> happy with it.\n> \n> All this is to say that I consider it unnecessary to have a long\n> deprecation period or major version bump for this patch series, based on\n> available public data. The name `main` is already in wide-spread use (and\n> growing) as primary branch name of Git projects.\n\nAll of that's true, but I really don't see how it's relevant to the\nchange we're discussing making to refs.c in git.git, which from my\ngenerous reading of some of the threads in objection to this is the main\npoint of contention.\n\n(I'm generously not engaging with some of the more howler-monkey esque\nreplies we've had on-list from people who seemed to have no idea what\nwas actually being proposed in git.git)\n\n*That* change is not whether we approve of people using \"main\", or\nhosting sites like GitHub etc. making it the default.\n\nI think it's fair to say that even in some alternate universe where the\nparticular reasons we're switching away from \"master\" didn't exist and\ne.g. GitHub et al had just decided on this out of the blue based on an\naesthetic preference we'd just say \"uh, sure, whatever, you configure it\nhow you want\".\n\nRather, we're talking about what happens when you run \"git init\".\n\nMost people who are using or creating git repositories are nowadays\nnever going to be impacted by what \"git init\" does. So I think the data\nyou're citing here doesn't support your argument at all, it does the\nopposite.\n\nThe people using these repositories with \"main\" on GitHub did not do so\nwith a patch to \"git init\". They clicked a button in the UI, or\ncopy/pasted GitHub's \"how to create a local repo\" which nowadays will\nmanually set the branch to \"main\" before pushing.\n\nThen who's using \"git init\" who's going to be impacted by this change?\nIt's everyone else, like probably tens of tens of thousands of one-off\ncronjobs somewhere creating a daily report of some by \"init && commit &&\ngit diff master..\".\n\nI'm on the fence about what we should do in that case, but I'm leaning\ntowards some deprecation period or at least some other approach than a\ns/master/main/g change precisely because of the numbers you're citing.\n\nBecause they shows how irrelevant the default shipped with git.git is to\nusers who want this s/master/main/g change in repositories they\nregularly use. So we're really mostly talking about an impact to scripts\n& some advanced users, both of who have a pretty good argument for\n\"init\"'s default being what's been explicitly documented for ages in its\nmanpage.\n\nEven if we want to just change it I think it's uncharitable to those\npeople not to at least consider throwing them some bone. E.g. \"init\"\ncould use the old default when it's not connected to a terminal, we\ncould show an advice notice and sleep(5) saying we're using a new\ndefault etc. etc.\n"},{"id":"409937","messageId":"CAMP44s0EqK2rbUzqUH0iAAMmQACDd4oLYZrM10vH4xgh4AHNew@mail.gmail.com","threadId":"54633","inReplyTo":"nycvar.QRO.7.76.6.2011132229480.18437@tvgsbejvaqbjf.bet","subject":"Re: [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of)","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-11-14T00:25:32Z","receivedAt":"2020-11-14T00:26:06Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Fri, Nov 13, 2020 at 4:05 PM Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> On Fri, 13 Nov 2020, Jeff King wrote:\n\n> > I'm on the fence whether there should be a deprecation period or major\n> > version bump for the final patch, but making the tests flexible enough\n> > to handle the before and after state seems like it can be done uncoupled\n> > from the actual default-flip.\n>\n> Hmm. On that matter, I wonder what the big fuss is all about. It's not\n> like Git is forcing anybody to change their default branch.\n\nExcept you are, and you will be doing it without the user consent, and\nwithout warning. This is the opposite of what any software project\nthat cares about its users should do.\n\nThe consequences are predictable.\n\nExactly the same argument was used in 2008, and it was wrong for\nexactly the same reasons.\n\nYes, people could add the exec-path to their PATH, so \"nobody was\nbeing forced\" ultimately, but that's missing the point entirely,\nbecause that happened *after* they were forced initially, and being\ncaught completely off guard.\n\n> There have been plenty of articles about this in the meantime, too, and\n> I could imagine that most developers are at least aware that the shift\n> away from `master` is happening, in many quite visible projects.\n\nI have used Git since 2005, contributed since 2009, follow the git\nsubreddit, and I was not aware of the change, and presumably neither\nwas Ævar.\n\nWhat you imagine most developers know is irrelevant, what is relevant\nis what they actually know.\n\nThis is the bias known as the curse of knowledge: since you have a lot\nof specific knowledge you fail to see how other people could not see\nthe same thing you are seeing, but they don't, and the reason is that\nthey don't have the same knowledge as you.\n\nBut just because you can't see it happen, doesn't mean it can't.\n\nIt did in 2008, and people back then used the same argument you are using now.\n\nDevelopers back then could not imagine how it was possible that users\nwere not aware of the upcoming change that had been cooking for years,\nbut alas they did not.\n\nDo not assume what your users know. Deprecation periods exist for a\nreason, and so do warnings.\n\n-- \nFelipe Contreras\n"},{"id":"409945","messageId":"xmqq361ccvot.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-14T06:13:38Z","receivedAt":"2020-11-14T06:19:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> This is the big one. This changes the default of init.defaultBranch to main,\n> reflecting what many open source projects already did (which was followed by\n> GitHub, Azure Repos and others).\n\nI'll keep this brief as I'm still offline/vacation til next week.\n\nAs other people already said, I'd prefer to see\n\n - all tests updated to work, without losing any coverage,\n   regardless of the default for the init.defaultbranch is.  \n\n   Some test scripts may require setting init.defaultBranch='master'\n   at the top in the 'setup' part (I've shown how in my response to\n   t4013 patchset) if the body of the test relies too heavily on the\n   primary branch to be 'master'.  On the other hand, some test\n   scripts may require setting init.defaultBranch='main' at the top,\n   if they have been converted to work _only_ with 'main'.\n\n   Both of these are unfortunate, but it is much better than losing\n   test coverage during the test update effort.\n\n   Some test scripts may not need any \"this test would only work\n   with 'master|main', so we are forcing\".  After your test update\n   series so far, hopefully many may already be ready to be force to\n   'main' even when the Git binary may still use 'master' as the\n   fallback default for init.defaultBranch.\n\n - a well thought-out transition plan (including user education and\n   publicity), with the final \"flip of the fallback default\".\n\nand I'd strongly prefer that these two to be done separately.  Since\nwe cannot anticipate how long the latter would take with unknown\namount of distraction, I'd prefer 100% of our tests keep working\nwhile the fallback default for init.defaultBranch is 'master', and\nthey still work on the flag day when the default is changed to 'main'\n(or 'primary' for that matter---after all, tests that care too deeply\nwhat the primary branch name is, and have been updated to eradicate\n'master' from them, would be forcing 'main', so the hardcoded\nfallback default in our binary should not matter).\n\nThanks.\n"},{"id":"410038","messageId":"xmqqr1ot84fr.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"xmqq361ccvot.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-16T19:52:40Z","receivedAt":"2020-11-16T19:53:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n>    Some test scripts may require setting init.defaultBranch='master'\n>    at the top in the 'setup' part (I've shown how in my response to\n>    t4013 patchset) if the body of the test relies too heavily on the\n>    primary branch to be 'master'.\n\nAh, I realized we have much better mechanism already in the form of\nGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME environment.\n\nSo, my three wishes in this message now become\n\n - lose PREPARE_FOR_MAIN_BRANCH prerequisite as quickly as possible\n   by doing the following two.\n\n - Use that mechanism to force 'main' in test scripts that now only\n   can work with 'main', even before we change the fallback default\n   from master to main in the production code, so that we won't lose\n   test coverage.\n\n - The same for test scripts that are not converted yet to force use\n   of 'master', so that we could change the fallback default from\n   master to main in the production code even before converting\n   these other scripts, so that we won't lose test coverage.\n\nThanks.\n"},{"id":"410039","messageId":"xmqqmtzh83wq.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"nycvar.QRO.7.76.6.2011131500020.18437@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 28/28] Change the default branch name to `main`","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-16T20:04:05Z","receivedAt":"2020-11-16T20:04:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi Ævar,\n>\n> On Fri, 13 Nov 2020, Ævar Arnfjörð Bjarmason wrote:\n>\n>>\n>> On Thu, Nov 12 2020, Don Goodman-Wilson via GitGitGadget wrote:\n>>\n>> > The current default name for the initial branch is a loaded term, and\n>> > many Open Source projects renamed their principal branches already. A\n>> > common choice appears to be `main`.\n>> >\n>> > Let's follow their lead and change the default of `init.defaultBranch`.\n>>\n>> I think it makes sense to split this change off from a 28-series test\n>> cleanup series.\n>\n> It is not a test cleanup. It is a series of 27 patches preparing the test\n> suite for the change made in the 28th patch.\n>\n> I don't think that it is a good idea to split off that 28th patch from\n> the patches whose entire purpose is to prepare for that 28th patch.\n\nWell, I personally think that the \"purpose\" of the first 27 patches\nmust be updated if that is the case.  \n\nThe test should NOT be prepared only to work in the post \"switch\nfrom master to main\" world.\n\nInstead, what we want to see is that the test would work whether the\nfallback default value for init.defaultBranch is 'master' (i.e. old\nworld) or 'main (i.e. a possible new world).  Perhaps by using the\nGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME mechanism for tests that relies\non a particular value to be the fallback default.  So in the sense,\nthe goal the first 26 patches support is the 27th one, which is the\nmost important one in the series from _my_ point of view.  We get\nourselves prepared so that 28th one can happen at any time.\n\nThat way, as long as the first 27 patches land, we will keep the\nsame test coverage as we've always had, regardless of the timing\nwe actually ship the 28th one to the production environment.\n\n> Personally, I would have used something like\n>\n> \t\tmain=$(git symbolic-ref --short HEAD) &&\n> \t\t[...]\n> \t\tgit checkout $main\n>\n> instead of what you suggested. That's a topic for another patch (series),\n> though.\n\nYeah, I would have used $primary or some word that is neither these\nm* names, but I think that is a good alternative, when workable, to\nthe GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME mechanism.  When the golden\nmaster compared with actual output hardcodes the expected branch\nnames, however, the approach becomes awkward, though.\n\nThanks.\n"},{"id":"410040","messageId":"xmqqima583qw.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"87sg9dfucb.fsf@evledraar.gmail.com","subject":"Re: [PATCH 14/28] t55[23]*: adjust the references to the default branch name \"main\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-16T20:07:35Z","receivedAt":"2020-11-16T20:08:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> Is there some meaning to the name \"nain\" and \"naster\" that I'm missing?\n\nNot for \"naster\", which came from me who just chose \"any single\nletter\" followed by \"aster\" to match 'master', and there is no other\nreason.  I think Dscho just followed suit.\n\n> If not can we just call this \"topic\" or something while we're at it?\n> I.e. this on top (just s/nain/topic/g):\n>\n> diff --git a/t/t5533-push-cas.sh b/t/t5533-push-cas.sh\n> index 9fcec604c3..4e33ec1fb9 100755\n> --- a/t/t5533-push-cas.sh\n> +++ b/t/t5533-push-cas.sh\n> @@ -201,12 +201,12 @@ test_expect_success 'cover everything with default force-with-lease (protected)'\n>  \tsetup_srcdst_basic &&\n>  \t(\n>  \t\tcd src &&\n> -\t\tgit branch nain main^\n> +\t\tgit branch topic main^\n>  \t) &&\n>  \tgit ls-remote src refs/heads/\\* >expect &&\n>  \t(\n>  \t\tcd dst &&\n> -\t\ttest_must_fail git push --force-with-lease origin main main:nain\n> +\t\ttest_must_fail git push --force-with-lease origin main main:topic\n>  \t) &&\n>  \tgit ls-remote src refs/heads/\\* >actual &&\n>  \ttest_cmp expect actual\n> @@ -216,16 +216,16 @@ test_expect_success 'cover everything with default force-with-lease (allowed)' '\n>  \tsetup_srcdst_basic &&\n>  \t(\n>  \t\tcd src &&\n> -\t\tgit branch nain main^\n> +\t\tgit branch topic main^\n>  \t) &&\n>  \t(\n>  \t\tcd dst &&\n>  \t\tgit fetch &&\n> -\t\tgit push --force-with-lease origin main main:nain\n> +\t\tgit push --force-with-lease origin main main:topic\n>  \t) &&\n>  \tgit ls-remote dst refs/heads/main |\n> -\tsed -e \"s/main/nain/\" >expect &&\n> -\tgit ls-remote src refs/heads/nain >actual &&\n> +\tsed -e \"s/main/topic/\" >expect &&\n> +\tgit ls-remote src refs/heads/topic >actual &&\n>  \ttest_cmp expect actual\n>  '\n>  \n"},{"id":"410086","messageId":"nycvar.QRO.7.76.6.2011171651130.18437@tvgsbejvaqbjf.bet","threadId":"54633","inReplyTo":"xmqqr1ot84fr.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-17T16:10:12Z","receivedAt":"2020-11-17T16:10:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Mon, 16 Nov 2020, Junio C Hamano wrote:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n> >    Some test scripts may require setting init.defaultBranch='master'\n> >    at the top in the 'setup' part (I've shown how in my response to\n> >    t4013 patchset) if the body of the test relies too heavily on the\n> >    primary branch to be 'master'.\n>\n> Ah, I realized we have much better mechanism already in the form of\n> GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME environment.\n>\n> So, my three wishes in this message now become\n>\n>  - lose PREPARE_FOR_MAIN_BRANCH prerequisite as quickly as possible\n\nOkay, we're on the same page here.\n\n>    by doing the following two.\n\nA couple of test cases already have the `PREPARE_FOR_MAIN_BRANCH` prereq\n(in preparation for transitioning the test suite, which is what I will\nsettle for in v2 of this patch series). Most notably, t5526 and t9902,\nwhich I had to exclude to avoid clashing with branches that are currently\nin flight.\n\nSo my goal is to transition the test suite as quickly as possible, by\nfirst converting the majority in v2 of this patch series, and then\nhandling the rest of the test scripts individually, on top of the\nin-flight topics.\n\n>  - Use that mechanism to force 'main' in test scripts that now only\n>    can work with 'main', even before we change the fallback default\n>    from master to main in the production code, so that we won't lose\n>    test coverage.\n\nThat's precisely what I do, incrementally, by adjusting that `case`\nstatement in `t/test-lib.sh` whenever a range of test scripts has been\ntransitioned. In patch 2/28, it looks like this:\n\n\tcase \"$TEST_NUMBER\" in\n\t[01]*)\n\t       GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n\t       export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n\t       ;;\n\tesac\n\nBy patch 26/28, it looks like this:\n\n\tcase \"$TEST_NUMBER\" in\n\t3404|4013|5310|5526|6300|7064|7817|9902)\n\t\t# Avoid conflicts with patch series that are cooking at the same\n\t\t# time\n\t\t# as the patch series changing the default of\n\t\t# `init.defaultBranch`.\n\t\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n\t\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n\t\t;;\n\t*)\n\t\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n\t\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n\t\t;;\n\tesac\n\n>  - The same for test scripts that are not converted yet to force use\n>    of 'master', so that we could change the fallback default from\n>    master to main in the production code even before converting\n>    these other scripts, so that we won't lose test coverage.\n\nOkay, I could have done it that way by starting with\n\n\tcase \"$TEST_NUMBER\" in\n\t[01]*)\n\t\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n\t\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n\t\t;;\n\t*)\n\t\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n\t\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n\t\t;;\n\tesac\n\nBut that would result in a funny-looking intermediate state with a\n`master` arm, then `main`, then again `master`.\n\nBesides, it would be more complicated because t/t5411-proc-receive-hook.sh\nand t/t5515-fetch-merge-logic.sh already ask for `main`, but by setting it\nbefore sourcing `test-lib.sh`, and therefore we would have to special-case\nthem in that `case` from the get-go.\n\nTherefore, in the interest of making this patch series _slightly_ easier\nto review (you still have to look at the _bottom_ of most of those patches\nto catch the crucial change to `t/test-lib.sh`), I would like to keep the\npatch series in the current shape.\n\nWill send v2 in a moment.\n\nThanks,\nDscho\n"},{"id":"410087","messageId":"0a05d319c0fc2e88b94ebe488af8d02a0ef63821.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 01/27] t0060: preemptively adjust alignment","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:01Z","receivedAt":"2020-11-17T16:12:59Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe are about to adjust t0060 for the new default branch name `main`.\nThis name is two characters shorter and therefore needs two spaces more\npadding to align correctly.\n\nAdjusting the alignment before the big search-and-replace makes it\neasier to verify that the final result does not leave any misaligned\nlines behind.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t0060-path-utils.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh\nindex b2e3cf3f4c..928eebbdc0 100755\n--- a/t/t0060-path-utils.sh\n+++ b/t/t0060-path-utils.sh\n@@ -312,8 +312,8 @@ test_git_path GIT_COMMON_DIR=bar info/sparse-checkout     .git/info/sparse-check\n test_git_path GIT_COMMON_DIR=bar info//sparse-checkout    .git/info//sparse-checkout\n test_git_path GIT_COMMON_DIR=bar remotes/bar              bar/remotes/bar\n test_git_path GIT_COMMON_DIR=bar branches/bar             bar/branches/bar\n-test_git_path GIT_COMMON_DIR=bar logs/refs/heads/master   bar/logs/refs/heads/master\n-test_git_path GIT_COMMON_DIR=bar refs/heads/master        bar/refs/heads/master\n+test_git_path GIT_COMMON_DIR=bar logs/refs/heads/master     bar/logs/refs/heads/master\n+test_git_path GIT_COMMON_DIR=bar refs/heads/master          bar/refs/heads/master\n test_git_path GIT_COMMON_DIR=bar refs/bisect/foo          .git/refs/bisect/foo\n test_git_path GIT_COMMON_DIR=bar hooks/me                 bar/hooks/me\n test_git_path GIT_COMMON_DIR=bar config                   bar/config\n-- \ngitgitgadget\n\n"},{"id":"410088","messageId":"041ad86e3342b6cc037ee14a3baa4ff15ec41a8c.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 05/27] t3416: preemptively adjust alignment in a comment","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:05Z","receivedAt":"2020-11-17T16:12:59Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe are about to adjust t3416 for the new default branch name `main`.\nThis name is two characters shorter and therefore needs two spaces more\npadding to align correctly.\n\nAdjusting the alignment before the big search-and-replace makes it\neasier to verify that the final result does not leave any misaligned\nlines behind.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3416-rebase-onto-threedots.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t3416-rebase-onto-threedots.sh b/t/t3416-rebase-onto-threedots.sh\nindex 9c2548423b..1f37adf56b 100755\n--- a/t/t3416-rebase-onto-threedots.sh\n+++ b/t/t3416-rebase-onto-threedots.sh\n@@ -12,7 +12,7 @@ test_description='git rebase --onto A...B'\n #\n #\t    F---G topic                             G'\n #\t   /                                       /\n-# A---B---C---D---E master      -->       A---B---C---D---E\n+# A---B---C---D---E master        -->       A---B---C---D---E\n #      \\   \\ /\n #\t\\   x\n #\t \\ / \\\n-- \ngitgitgadget\n\n"},{"id":"410089","messageId":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"[PATCH v2 00/27] tests: use main as default branch name","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:00Z","receivedAt":"2020-11-17T16:12:59Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This (big) patch series (almost) concludes the transition of Git's test\nsuite to use init.defaultBranch=main that was started in \njs/default-branch-name-part-4-minus-1, continued in \njs/default-branch-name-adjust-t5411 and in \njs/default-branch-name-adjust-t5515. This transition prepares for changing\nthe fall-back value of init.defaultBranch accordingly (which will be done in\na different set of patch series, with an appropriate deprecation period),\nreflecting what many open source projects already did followed by GitHub,\nAzure Repos and others.\n\nInstead of one huge patch that reflects essentially a search-and-replace in\nthe test suite, this patch series splits the changes up into chunks that are\nintended to be smaller than 100kB so that they are not rejected by the Git\nmailing list. Interspersed between those changes are adjustments e.g. in\nalignment, to make it easier to review (or recreate) the search-and-replace\npatches.\n\nNote that this branch is based on next, mostly because it would otherwise\nconflict with en/merge-tests, jk/diff-release-filespec-fix and \nds/maintenance-part-3.\n\nTo avoid even more conflicts with topics that did not even make it to seen \nyet, this patch series specifically excludes t3404, t4013, t5310, t5526,\nt6300, t7064, t7817, t9902: in those test scripts, we will still use master \nfor the time being. Once the topics in question have settled, I will send\nthe appropriate follow-up patches to adjust them to use main instead.\n\nNote that even after this patch series, master is still found in t/, even\noutside of the tests we excluded specifically to avoid conflicts with other\npatch series that are currently in flight: t/perf/, the git p4 tests\n(because git p4 still uses p4/master to refer to the remote main branch),\nand some comments still refer to this name. I intend to address at least\nsome of those, in patch series separate from the current one.\n\nChanges since v1:\n\n * Dropped the commit changing the default initial branch name for git init.\n * Adjusted the patch for t1402 to also replace naster by nain.\n * Excluded t5526 from the patches for now, to avoid clashing with \n   pk/subsub-fetch-fix.\n\nJohannes Schindelin (27):\n  t0060: preemptively adjust alignment\n  t[01]*: adjust the references to the default branch name \"main\"\n  t2*: adjust the references to the default branch name \"main\"\n  t3[0-3]*: adjust the references to the default branch name \"main\"\n  t3416: preemptively adjust alignment in a comment\n  t34*: adjust the references to the default branch name \"main\"\n  t3[5-9]*: adjust the references to the default branch name \"main\"\n  t4*: adjust the references to the default branch name \"main\"\n  t5323: prepare centered comment for `master` -> `main`\n  t5[0-4]*: adjust the references to the default branch name \"main\"\n  t5503: prepare aligned comment for replacing `master` with `main`\n  t550*: adjust the references to the default branch name \"main\"\n  t551*: adjust the references to the default branch name \"main\"\n  t55[23]*: adjust the references to the default branch name \"main\"\n  t55[4-9]*: adjust the references to the default branch name \"main\"\n  t5[6-9]*: adjust the references to the default branch name \"main\"\n  t6[0-3]*: adjust the references to the default branch name \"main\"\n  t64*: preemptively adjust alignment to prepare for `master` -> `main`\n  t6[4-9]*: adjust the references to the default branch name \"main\"\n  t7[0-4]*: adjust the references to the default branch name \"main\"\n  t7[5-9]*: adjust the references to the default branch name \"main\"\n  t8*: adjust the references to the default branch name \"main\"\n  t9[0-4]*: adjust the references to the default branch name \"main\"\n  t9[5-7]*: adjust the references to the default branch name \"main\"\n  tests(git-p4): transition to the default branch name `main`\n  t99*: adjust the references to the default branch name \"main\"\n  tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed\n\n t/annotate-tests.sh                           |   8 +-\n t/lib-cvs.sh                                  |   2 +-\n t/t0002-gitfile.sh                            |   6 +-\n t/t0020-crlf.sh                               |   8 +-\n t/t0021-conversion.sh                         |  40 +-\n t/t0027-auto-crlf.sh                          |   4 +-\n t/t0028-working-tree-encoding.sh              |   4 +-\n t/t0041-usage.sh                              |  10 +-\n t/t0050-filesystem.sh                         |   6 +-\n t/t0060-path-utils.sh                         |   4 +-\n t/t0100-previous.sh                           |  18 +-\n t/t1004-read-tree-m-u-wf.sh                   |  40 +-\n t/t1008-read-tree-overlay.sh                  |   2 +-\n t/t1009-read-tree-new-index.sh                |   4 +-\n t/t1011-read-tree-sparse-checkout.sh          |   2 +-\n t/t1021-rerere-in-workdir.sh                  |   2 +-\n t/t1090-sparse-checkout-scope.sh              |  10 +-\n t/t1091-sparse-checkout-builtin.sh            |   2 +-\n t/t1300-config.sh                             |   8 +-\n t/t1301-shared-repo.sh                        |   4 +-\n t/t1305-config-include.sh                     |   2 +-\n t/t1309-early-config.sh                       |   4 +-\n t/t1400-update-ref.sh                         |  72 +--\n t/t1402-check-ref-format.sh                   |  32 +-\n t/t1403-show-ref.sh                           |  18 +-\n t/t1405-main-ref-store.sh                     |  42 +-\n t/t1406-submodule-ref-store.sh                |  30 +-\n t/t1407-worktree-ref-store.sh                 |  32 +-\n t/t1408-packed-refs.sh                        |  12 +-\n t/t1410-reflog.sh                             |  56 +-\n t/t1411-reflog-show.sh                        |   2 +-\n t/t1413-reflog-detach.sh                      |  24 +-\n t/t1414-reflog-walk.sh                        |  12 +-\n t/t1416-ref-transaction-hooks.sh              |  10 +-\n t/t1430-bad-ref-name.sh                       |  52 +-\n t/t1450-fsck.sh                               |   2 +-\n t/t1500-rev-parse.sh                          |   4 +-\n t/t1503-rev-parse-verify.sh                   |  28 +-\n t/t1505-rev-parse-last.sh                     |   8 +-\n t/t1506-rev-parse-diagnosis.sh                |   4 +-\n t/t1507-rev-parse-upstream.sh                 |  40 +-\n t/t1508-at-combinations.sh                    |  10 +-\n t/t1511-rev-parse-caret.sh                    |  26 +-\n t/t1512-rev-parse-disambiguation.sh           |   2 +-\n t/t1513-rev-parse-prefix.sh                   |   4 +-\n t/t1514-rev-parse-push.sh                     |  16 +-\n t/t1700-split-index.sh                        |   2 +-\n t/t2007-checkout-symlink.sh                   |  10 +-\n t/t2009-checkout-statinfo.sh                  |   8 +-\n t/t2010-checkout-ambiguous.sh                 |   4 +-\n t/t2011-checkout-invalid-head.sh              |  16 +-\n t/t2012-checkout-last.sh                      |  48 +-\n t/t2015-checkout-unborn.sh                    |   2 +-\n t/t2017-checkout-orphan.sh                    |  44 +-\n t/t2020-checkout-detach.sh                    |  28 +-\n t/t2022-checkout-paths.sh                     |  22 +-\n t/t2023-checkout-m.sh                         |  10 +-\n t/t2024-checkout-dwim.sh                      |  70 +--\n t/t2027-checkout-track.sh                     |   6 +-\n t/t2030-unresolve-info.sh                     |   6 +-\n t/t2060-switch.sh                             |  30 +-\n t/t2070-restore.sh                            |   4 +-\n t/t2106-update-index-assume-unchanged.sh      |   2 +-\n t/t2400-worktree-add.sh                       |  66 +--\n t/t2401-worktree-prune.sh                     |   2 +-\n t/t2402-worktree-list.sh                      |  20 +-\n t/t2405-worktree-submodule.sh                 |   6 +-\n t/t3040-subprojects-basic.sh                  |   2 +-\n t/t3200-branch.sh                             | 248 ++++-----\n t/t3201-branch-contains.sh                    |  82 +--\n t/t3202-show-branch-octopus.sh                |   2 +-\n t/t3203-branch-output.sh                      |  40 +-\n t/t3204-branch-name-interpretation.sh         |   6 +-\n t/t3205-branch-color.sh                       |   8 +-\n t/t3206-range-diff.sh                         |  40 +-\n t/t3206/history.export                        |   2 +-\n t/t3210-pack-refs.sh                          |   4 +-\n t/t3211-peel-ref.sh                           |   4 +-\n t/t3301-notes.sh                              |   6 +-\n t/t3302-notes-index-expensive.sh              |   2 +-\n t/t3303-notes-subtrees.sh                     |   8 +-\n t/t3304-notes-mixed.sh                        |   8 +-\n t/t3308-notes-merge.sh                        |   2 +-\n t/t3320-notes-merge-worktrees.sh              |   4 +-\n t/t3400-rebase.sh                             |  60 +--\n t/t3402-rebase-merge.sh                       |  44 +-\n t/t3403-rebase-skip.sh                        |   6 +-\n t/t3405-rebase-malformed.sh                   |   8 +-\n t/t3406-rebase-message.sh                     |  24 +-\n t/t3407-rebase-abort.sh                       |  18 +-\n t/t3408-rebase-multi-line.sh                  |   2 +-\n t/t3409-rebase-preserve-merges.sh             |  10 +-\n t/t3412-rebase-root.sh                        |  28 +-\n t/t3413-rebase-hook.sh                        |  42 +-\n t/t3415-rebase-autosquash.sh                  |   2 +-\n t/t3416-rebase-onto-threedots.sh              |  54 +-\n t/t3418-rebase-continue.sh                    |  24 +-\n t/t3419-rebase-patch-id.sh                    |  12 +-\n t/t3420-rebase-autostash.sh                   |   8 +-\n t/t3423-rebase-reword.sh                      |   6 +-\n t/t3427-rebase-subtree.sh                     |  20 +-\n t/t3430-rebase-merges.sh                      |  16 +-\n t/t3431-rebase-fork-point.sh                  |  32 +-\n t/t3432-rebase-fast-forward.sh                |  34 +-\n t/t3434-rebase-i18n.sh                        |   8 +-\n t/t3435-rebase-gpg-sign.sh                    |   4 +-\n t/t3436-rebase-more-options.sh                |   2 +-\n t/t3500-cherry.sh                             |  12 +-\n t/t3501-revert-cherry-pick.sh                 |   4 +-\n t/t3502-cherry-pick-merge.sh                  |   2 +-\n t/t3503-cherry-pick-root.sh                   |  10 +-\n t/t3504-cherry-pick-rerere.sh                 |  24 +-\n t/t3505-cherry-pick-empty.sh                  |  24 +-\n t/t3506-cherry-pick-ff.sh                     |   8 +-\n t/t3507-cherry-pick-conflict.sh               |   2 +-\n t/t3508-cherry-pick-many-commits.sh           |  38 +-\n t/t3509-cherry-pick-merge-df.sh               |   2 +-\n t/t3512-cherry-pick-submodule.sh              |   2 +-\n t/t3600-rm.sh                                 |  10 +-\n t/t3701-add-interactive.sh                    |   4 +-\n t/t3901-i18n-patch.sh                         |  40 +-\n t/t3903-stash.sh                              |  32 +-\n t/t3910-mac-os-precompose.sh                  |   6 +-\n t/t4014-format-patch.sh                       | 176 +++---\n t/t4015-diff-whitespace.sh                    |   2 +-\n t/t4017-diff-retval.sh                        |   2 +-\n t/t4038-diff-combined.sh                      |  14 +-\n t/t4041-diff-submodule-option.sh              |   2 +-\n t/t4048-diff-combined-binary.sh               |  10 +-\n t/t4052-stat-output.sh                        |   4 +-\n t/t4056-diff-order.sh                         |   2 +-\n t/t4057-diff-combined-paths.sh                |  20 +-\n t/t4061-diff-indent.sh                        |  24 +-\n t/t4066-diff-emit-delay.sh                    |   2 +-\n t/t4068-diff-symmetric-merge-base.sh          |  48 +-\n t/t4103-apply-binary.sh                       |  36 +-\n t/t4108-apply-threeway.sh                     |  14 +-\n t/t4121-apply-diffs.sh                        |   2 +-\n t/t4122-apply-symlink-inside.sh               |   6 +-\n t/t4150-am.sh                                 |  26 +-\n t/t4200-rerere.sh                             |  20 +-\n t/t4201-shortlog.sh                           |   2 +-\n t/t4202-log.sh                                | 106 ++--\n t/t4203-mailmap.sh                            |   2 +-\n t/t4204-patch-id.sh                           |  26 +-\n t/t4207-log-decoration-colors.sh              |   6 +-\n t/t4208-log-magic-pathspec.sh                 |   4 +-\n t/t4211/history.export                        |   2 +-\n t/t4214-log-graph-octopus.sh                  |   2 +-\n t/t4216-log-bloom.sh                          |   4 +-\n t/t4253-am-keep-cr-dos.sh                     |  20 +-\n t/t4257-am-interactive.sh                     |   2 +-\n t/t5150-request-pull.sh                       |  34 +-\n t/t5304-prune.sh                              |   2 +-\n t/t5305-include-tag.sh                        |   2 +-\n t/t5312-prune-corruption.sh                   |  16 +-\n t/t5317-pack-objects-filter-objects.sh        |   2 +-\n t/t5322-pack-objects-sparse.sh                |   2 +-\n t/t5323-pack-redundant.sh                     |  66 +--\n t/t5400-send-pack.sh                          |  60 +--\n t/t5401-update-hooks.sh                       |  24 +-\n t/t5402-post-merge-hook.sh                    |   2 +-\n t/t5403-post-checkout-hook.sh                 |   6 +-\n t/t5404-tracking-branches.sh                  |   8 +-\n t/t5405-send-pack-rewind.sh                   |   6 +-\n t/t5407-post-rewrite-hook.sh                  |   2 +-\n t/t5410-receive-pack-alternates.sh            |   4 +-\n t/t5500-fetch-pack.sh                         |  28 +-\n t/t5501-fetch-push-alternates.sh              |   4 +-\n t/t5502-quickfetch.sh                         |   6 +-\n t/t5503-tagfollow.sh                          |  12 +-\n t/t5504-fetch-receive-strict.sh               |  20 +-\n t/t5505-remote.sh                             | 148 +++---\n t/t5506-remote-groups.sh                      |   4 +-\n t/t5509-fetch-push-namespaces.sh              |  30 +-\n t/t5510-fetch.sh                              | 162 +++---\n t/t5511-refspec.sh                            |  12 +-\n t/t5512-ls-remote.sh                          |  26 +-\n t/t5514-fetch-multiple.sh                     |  30 +-\n t/t5516-fetch-push.sh                         | 500 +++++++++---------\n t/t5517-push-mirror.sh                        | 124 ++---\n t/t5518-fetch-exit-status.sh                  |   6 +-\n t/t5519-push-alternates.sh                    |  12 +-\n t/t5520-pull.sh                               |  30 +-\n t/t5521-pull-options.sh                       |  16 +-\n t/t5523-push-upstream.sh                      |  30 +-\n t/t5527-fetch-odd-refs.sh                     |  14 +-\n t/t5528-push-default.sh                       |  98 ++--\n t/t5529-push-errors.sh                        |   2 +-\n t/t5530-upload-pack-error.sh                  |   2 +-\n t/t5531-deep-submodule-push.sh                | 188 +++----\n t/t5533-push-cas.sh                           | 142 ++---\n t/t5534-push-signed.sh                        |   4 +-\n t/t5537-fetch-shallow.sh                      |  30 +-\n t/t5538-push-shallow.sh                       |  22 +-\n t/t5539-fetch-http-shallow.sh                 |  14 +-\n t/t5540-http-push-webdav.sh                   |   8 +-\n t/t5541-http-push-smart.sh                    |  40 +-\n t/t5542-push-http-shallow.sh                  |   8 +-\n t/t5543-atomic-push.sh                        |  80 +--\n t/t5545-push-options.sh                       |  62 +--\n t/t5548-push-porcelain.sh                     |  64 +--\n t/t5550-http-fetch-dumb.sh                    |  20 +-\n t/t5551-http-fetch-smart.sh                   |  20 +-\n t/t5552-skipping-fetch-negotiator.sh          |   2 +-\n t/t5553-set-upstream.sh                       |  82 +--\n t/t5561-http-backend.sh                       |   4 +-\n t/t556x_common                                |   8 +-\n t/t5570-git-daemon.sh                         |  16 +-\n t/t5571-pre-push-hook.sh                      |   4 +-\n t/t5572-pull-submodule.sh                     |   4 +-\n t/t5580-unc-paths.sh                          |   2 +-\n t/t5581-http-curl-verbose.sh                  |   2 +-\n t/t5582-fetch-negative-refspec.sh             |  22 +-\n t/t5601-clone.sh                              |   4 +-\n t/t5604-clone-reference.sh                    |  12 +-\n t/t5605-clone-local.sh                        |  10 +-\n t/t5606-clone-options.sh                      |   8 +-\n t/t5607-clone-bundle.sh                       |  14 +-\n t/t5608-clone-2gb.sh                          |   2 +-\n t/t5609-clone-branch.sh                       |   6 +-\n t/t5610-clone-detached.sh                     |   4 +-\n t/t5611-clone-config.sh                       |  16 +-\n t/t5612-clone-refspec.sh                      |  42 +-\n t/t5614-clone-submodules-shallow.sh           |   2 +-\n t/t5616-partial-clone.sh                      |  50 +-\n t/t5617-clone-submodules-remote.sh            |   6 +-\n t/t5700-protocol-v1.sh                        |  16 +-\n t/t5701-git-serve.sh                          |  16 +-\n t/t5702-protocol-v2.sh                        |  50 +-\n t/t5703-upload-pack-ref-in-want.sh            |  60 +--\n t/t5801-remote-helpers.sh                     |  24 +-\n t/t6000-rev-list-misc.sh                      |   2 +-\n t/t6001-rev-list-graft.sh                     |   2 +-\n t/t6004-rev-list-path-optim.sh                |  14 +-\n t/t6006-rev-list-format.sh                    |  14 +-\n t/t6007-rev-list-cherry-pick-file.sh          |   4 +-\n t/t6008-rev-list-submodule.sh                 |   2 +-\n t/t6009-rev-list-parent.sh                    |   6 +-\n t/t6012-rev-list-simplify.sh                  |   8 +-\n t/t6013-rev-list-reverse-parents.sh           |  10 +-\n t/t6016-rev-list-graph-simplify-history.sh    |   2 +-\n t/t6017-rev-list-stdin.sh                     |   8 +-\n t/t6018-rev-list-glob.sh                      |  50 +-\n t/t6019-rev-list-ancestry-path.sh             |   6 +-\n t/t6030-bisect-porcelain.sh                   |  10 +-\n t/t6040-tracking-info.sh                      |  54 +-\n t/t6050-replace.sh                            |  10 +-\n t/t6101-rev-parse-parents.sh                  |   2 +-\n t/t6110-rev-list-sparse.sh                    |   2 +-\n t/t6111-rev-list-treesame.sh                  |   6 +-\n t/t6112-rev-list-filters-objects.sh           |  14 +-\n t/t6120-describe.sh                           |  20 +-\n t/t6200-fmt-merge-msg.sh                      |  50 +-\n t/t6302-for-each-ref-filter.sh                |  58 +-\n t/t6400-merge-df.sh                           |   6 +-\n t/t6402-merge-rename.sh                       |  46 +-\n t/t6404-recursive-merge.sh                    |   4 +-\n t/t6405-merge-symlinks.sh                     |  14 +-\n t/t6406-merge-attr.sh                         |  24 +-\n t/t6407-merge-binary.sh                       |   6 +-\n t/t6409-merge-subtree.sh                      |  16 +-\n t/t6411-merge-filemode.sh                     |  10 +-\n t/t6412-merge-large-rename.sh                 |   6 +-\n t/t6413-merge-crlf.sh                         |   2 +-\n t/t6414-merge-rename-nocruft.sh               |   2 +-\n t/t6415-merge-dir-to-symlink.sh               |  22 +-\n t/t6416-recursive-corner-cases.sh             |  28 +-\n t/t6417-merge-ours-theirs.sh                  |  28 +-\n t/t6418-merge-text-auto.sh                    |  12 +-\n t/t6419-merge-ignorecase.sh                   |  10 +-\n t/t6422-merge-rename-corner-cases.sh          |  12 +-\n t/t6425-merge-rename-delete.sh                |   2 +-\n t/t6427-diff3-conflict-markers.sh             |  14 +-\n t/t6430-merge-recursive.sh                    |  18 +-\n t/t6432-merge-recursive-space-options.sh      |   6 +-\n t/t6433-merge-toplevel.sh                     |   8 +-\n t/t6434-merge-recursive-rename-options.sh     |   6 +-\n t/t6436-merge-overwrite.sh                    |   2 +-\n t/t6437-submodule-merge.sh                    |  14 +-\n t/t6439-merge-co-error-msgs.sh                |   6 +-\n t/t6501-freshen-objects.sh                    |   2 +-\n t/t7003-filter-branch.sh                      |  40 +-\n t/t7004-tag.sh                                |   8 +-\n t/t7030-verify-tag.sh                         |   2 +-\n t/t7060-wtstatus.sh                           |  26 +-\n t/t7063-status-untracked-cache.sh             |  14 +-\n t/t7102-reset.sh                              |   6 +-\n t/t7113-post-index-change-hook.sh             |   2 +-\n t/t7201-co.sh                                 | 110 ++--\n t/t7400-submodule-basic.sh                    |  20 +-\n t/t7403-submodule-sync.sh                     |  10 +-\n t/t7406-submodule-update.sh                   |  38 +-\n t/t7407-submodule-foreach.sh                  |  24 +-\n t/t7409-submodule-detached-work-tree.sh       |   8 +-\n t/t7417-submodule-path-url.sh                 |   2 +-\n t/t7501-commit-basic-functionality.sh         |   2 +-\n t/t7502-commit-porcelain.sh                   |  12 +-\n ...3-pre-commit-and-pre-merge-commit-hooks.sh |  42 +-\n t/t7504-commit-msg-hook.sh                    |  24 +-\n t/t7505-prepare-commit-msg-hook.sh            |  20 +-\n t/t7508-status.sh                             |  58 +-\n t/t7510-signed-commit.sh                      |   2 +-\n t/t7512-status-help.sh                        |  40 +-\n t/t7517-per-repo-email.sh                     |  12 +-\n t/t7600-merge.sh                              |  44 +-\n t/t7606-merge-custom.sh                       |   2 +-\n t/t7608-merge-messages.sh                     |  36 +-\n t/t7610-mergetool.sh                          | 174 +++---\n t/t7611-merge-abort.sh                        |   4 +-\n t/t7612-merge-verify-signatures.sh            |   2 +-\n t/t7614-merge-signoff.sh                      |  24 +-\n t/t7701-repack-unpack-unreachable.sh          |   2 +-\n t/t7800-difftool.sh                           |  38 +-\n t/t7810-grep.sh                               |  28 +-\n t/t8001-annotate.sh                           |   2 +-\n t/t8003-blame-corner-cases.sh                 |   4 +-\n t/t8004-blame-with-conflicts.sh               |  14 +-\n t/t9001-send-email.sh                         |  28 +-\n t/t9100-git-svn-basic.sh                      |   2 +-\n t/t9145-git-svn-master-branch.sh              |   6 +-\n t/t9151-svn-mergeinfo.sh                      |   2 +-\n t/t9155-git-svn-fetch-deleted-tag.sh          |   2 +-\n t/t9156-git-svn-fetch-deleted-tag-2.sh        |   6 +-\n t/t9163-git-svn-reset-clears-caches.sh        |   2 +-\n t/t9169-git-svn-dcommit-crlf.sh               |   2 +-\n t/t9300-fast-import.sh                        |  82 +--\n t/t9301-fast-import-notes.sh                  |  14 +-\n t/t9302-fast-import-unpack-limit.sh           |  16 +-\n t/t9350-fast-export.sh                        |  86 +--\n t/t9351-fast-export-anonymize.sh              |   4 +-\n t/t9400-git-cvsserver-server.sh               |  32 +-\n t/t9401-git-cvsserver-crlf.sh                 |  16 +-\n t/t9402-git-cvsserver-refs.sh                 |   8 +-\n t/t9500-gitweb-standalone-no-errors.sh        |  20 +-\n t/t9501-gitweb-standalone-http-status.sh      |  14 +-\n t/t9502-gitweb-standalone-parse-output.sh     |  16 +-\n t/t9600-cvsimport.sh                          |   2 +-\n t/t9601-cvsimport-vendor-branch.sh            |  16 +-\n t/t9602-cvsimport-branches-tags.sh            |   4 +-\n t/t9603-cvsimport-patchsets.sh                |   8 +-\n t/t9800-git-p4-basic.sh                       |   2 +-\n t/t9801-git-p4-branch.sh                      |  16 +-\n t/t9806-git-p4-options.sh                     |  18 +-\n t/t9807-git-p4-submit.sh                      |   2 +-\n t/t9811-git-p4-label-import.sh                |   2 +-\n t/t9903-bash-prompt.sh                        | 114 ++--\n t/test-lib.sh                                 |  13 +\n 348 files changed, 3879 insertions(+), 3866 deletions(-)\n\n\nbase-commit: aff20da3a209088e7f8f3632077fa11b86453d67\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-762%2Fdscho%2Fuse-main-as-default-branch-name-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-762/dscho/use-main-as-default-branch-name-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/762\n\nRange-diff vs v1:\n\n  1:  0a05d319c0 =  1:  0a05d319c0 t0060: preemptively adjust alignment\n  2:  830130fa9f !  2:  b8fa037791 t[01]*: adjust the references to the default branch name \"main\"\n     @@ Commit message\n      \n                  $ (cd t &&\n                     sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n     -                    -e 's/Master/Main/g' -- t[01]*.sh)\n     +                    -e 's/Master/Main/g' -e 's/naster/nain/g' -- t[01]*.sh)\n     +\n     +    Note that t5533 contains a variation of the name `master` (`naster`)\n     +    that we rename here, too.\n      \n          This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\n          for those tests.\n      \n     +    Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t0002-gitfile.sh ##\n     @@ t/t1402-check-ref-format.sh: valid_ref !MINGW \"$ref\" '--refspec-pattern --allow-\n      -\ttest \"$refname2\" = master'\n      +\ttest \"$refname2\" = main'\n       \n     - test_expect_success 'check-ref-format --branch -naster' '\n     - \ttest_must_fail git check-ref-format --branch -naster >actual &&\n     +-test_expect_success 'check-ref-format --branch -naster' '\n     +-\ttest_must_fail git check-ref-format --branch -naster >actual &&\n     ++test_expect_success 'check-ref-format --branch -nain' '\n     ++\ttest_must_fail git check-ref-format --branch -nain >actual &&\n     + \ttest_must_be_empty actual\n     + '\n     + \n      @@ t/t1402-check-ref-format.sh: test_expect_success 'check-ref-format --branch from subdir' '\n       \n       \tT=$(git write-tree) &&\n  3:  9b368b1ce1 =  3:  0d4f1275f7 t2*: adjust the references to the default branch name \"main\"\n  4:  0697ef9742 =  4:  aee29a0528 t3[0-3]*: adjust the references to the default branch name \"main\"\n  5:  e494152c3e =  5:  041ad86e33 t3416: preemptively adjust alignment in a comment\n  6:  ec7102156e =  6:  2f62b3f469 t34*: adjust the references to the default branch name \"main\"\n  7:  7a9349653d =  7:  0cf754646e t3[5-9]*: adjust the references to the default branch name \"main\"\n  8:  d141e476b1 =  8:  cf6c1d1d83 t4*: adjust the references to the default branch name \"main\"\n  9:  86c85666d5 =  9:  6ff4594a28 t5323: prepare centered comment for `master` -> `main`\n 10:  55b6c04fc0 = 10:  be29e07892 t5[0-4]*: adjust the references to the default branch name \"main\"\n 11:  40cdd5db8c = 11:  5126d90a32 t5503: prepare aligned comment for replacing `master` with `main`\n 12:  b5ca6e9acd = 12:  332677cbf9 t550*: adjust the references to the default branch name \"main\"\n 13:  727de6fdf5 = 13:  b7333ef201 t551*: adjust the references to the default branch name \"main\"\n 14:  3aef39320e ! 14:  4b1b1ee51f t55[23]*: adjust the references to the default branch name \"main\"\n     @@ Metadata\n       ## Commit message ##\n          t55[23]*: adjust the references to the default branch name \"main\"\n      \n     -    This trick was performed via\n     +    Carefully excluding t5526, which sees independent development elsewhere\n     +    at the time of writing, we use `main` as the default branch name in\n     +    t55[23]*. This trick was performed via\n      \n                  $ (cd t &&\n                     sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n     -                    -e 's/Master/Main/g' -e 's/naster/nain/g' -- t55[23]*.sh)\n     +                    -e 's/Master/Main/g' -e 's/naster/nain/g' -- \\\n     +                    t55[23]*.sh &&\n     +               git checkout HEAD -- t5526\\*)\n      \n          Note that t5533 contains a variation of the name `master` (`naster`)\n          that we rename here, too.\n     @@ t/t5523-push-upstream.sh: test_expect_success TTY 'push --no-progress suppresses\n       '\n       \n      \n     - ## t/t5526-fetch-submodules.sh ##\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"don't fetch submodule when newly re\n     - \ttest_i18ncmp expect.err actual.err &&\n     - \t(\n     - \t\tcd submodule &&\n     --\t\tgit checkout -q master\n     -+\t\tgit checkout -q main\n     - \t)\n     - '\n     - \n     -@@ t/t5526-fetch-submodules.sh: test_expect_success 'fetch new submodule commits on-demand without .gitmodules e\n     - \tgit config -f .gitmodules --remove-section submodule.sub1 &&\n     - \tgit add .gitmodules &&\n     - \tgit commit -m \"delete gitmodules file\" &&\n     --\tgit checkout -B master &&\n     -+\tgit checkout -B main &&\n     - \tgit -C downstream fetch &&\n     --\tgit -C downstream checkout origin/master &&\n     -+\tgit -C downstream checkout origin/main &&\n     - \n     - \tC=$(git -C submodule commit-tree -m \"yet another change outside refs/heads\" HEAD^{tree}) &&\n     - \tgit -C submodule update-ref refs/changes/7 $C &&\n     -\n       ## t/t5527-fetch-odd-refs.sh ##\n      @@ t/t5527-fetch-odd-refs.sh: test_description='test fetching of oddly-named refs'\n       \n     @@ t/t5539-fetch-http-shallow.sh: test_expect_success 'fetching deepen' '\n       \tthree\n      \n       ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TEST_NUMBER\" in\n     +@@ t/test-lib.sh: case \"$TRASH_DIRECTORY\" in\n     + esac\n     + \n     + case \"$TEST_NUMBER\" in\n     +-3404|4013|5310)\n     ++3404|4013|5310|5526)\n     + \t# Avoid conflicts with patch series that are cooking at the same time\n     + \t# as the patch series changing the default of `init.defaultBranch`.\n       \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n       \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n       \t;;\n 15:  8a2511b38e = 15:  c37d97c2d8 t55[4-9]*: adjust the references to the default branch name \"main\"\n 16:  af24b6d69d = 16:  dda6ce098c t5[6-9]*: adjust the references to the default branch name \"main\"\n 17:  dc8011e4bf ! 17:  27d7994933 t6[0-3]*: adjust the references to the default branch name \"main\"\n     @@ t/test-lib.sh: case \"$TRASH_DIRECTORY\" in\n       esac\n       \n       case \"$TEST_NUMBER\" in\n     --3404|4013|5310)\n     -+3404|4013|5310|6300)\n     +-3404|4013|5310|5526)\n     ++3404|4013|5310|5526|6300)\n       \t# Avoid conflicts with patch series that are cooking at the same time\n       \t# as the patch series changing the default of `init.defaultBranch`.\n       \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n 18:  e2f1409399 = 18:  04878e2268 t64*: preemptively adjust alignment to prepare for `master` -> `main`\n 19:  1ef276c97e = 19:  f0fa12b577 t6[4-9]*: adjust the references to the default branch name \"main\"\n 20:  7f67471c03 ! 20:  f9c30dc516 t7[0-4]*: adjust the references to the default branch name \"main\"\n     @@ t/test-lib.sh: case \"$TRASH_DIRECTORY\" in\n       esac\n       \n       case \"$TEST_NUMBER\" in\n     --3404|4013|5310|6300)\n     -+3404|4013|5310|6300|7064)\n     +-3404|4013|5310|5526|6300)\n     ++3404|4013|5310|5526|6300|7064)\n       \t# Avoid conflicts with patch series that are cooking at the same time\n       \t# as the patch series changing the default of `init.defaultBranch`.\n       \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n 21:  07714a8c65 ! 21:  2b269ca983 t7[5-9]*: adjust the references to the default branch name \"main\"\n     @@ t/test-lib.sh: case \"$TRASH_DIRECTORY\" in\n       esac\n       \n       case \"$TEST_NUMBER\" in\n     --3404|4013|5310|6300|7064)\n     -+3404|4013|5310|6300|7064|7817)\n     +-3404|4013|5310|5526|6300|7064)\n     ++3404|4013|5310|5526|6300|7064|7817)\n       \t# Avoid conflicts with patch series that are cooking at the same time\n       \t# as the patch series changing the default of `init.defaultBranch`.\n       \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n 22:  3a987c452e = 22:  5cac0065c8 t8*: adjust the references to the default branch name \"main\"\n 23:  e788b61074 = 23:  57e90d459a t9[0-4]*: adjust the references to the default branch name \"main\"\n 24:  2367a322c8 = 24:  f9e01de17f t9[5-7]*: adjust the references to the default branch name \"main\"\n 25:  bd32d55eab = 25:  4da4b69114 tests(git-p4): transition to the default branch name `main`\n 26:  73100477a8 ! 26:  cfa29c7f71 t99*: adjust the references to the default branch name \"main\"\n     @@ t/test-lib.sh: case \"$TRASH_DIRECTORY\" in\n       esac\n       \n       case \"$TEST_NUMBER\" in\n     --3404|4013|5310|6300|7064|7817)\n     -+3404|4013|5310|6300|7064|7817|9902)\n     +-3404|4013|5310|5526|6300|7064|7817)\n     ++3404|4013|5310|5526|6300|7064|7817|9902)\n       \t# Avoid conflicts with patch series that are cooking at the same time\n       \t# as the patch series changing the default of `init.defaultBranch`.\n       \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n 27:  09b611a359 ! 27:  fc0c1f6463 tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed\n     @@ Commit message\n          `master` -> `main` rename before the automatable ones.\n      \n          Now that the transition is almost complete, we can stop using it in most\n     -    instances. The only exception is t9902: at the time of writing, there\n     -    are other patches in flight that touch this test script, therefore the\n     -    transition to `main` is postponed to a later date.\n     +    instances. The only two exceptions are t5526 and t9902: at the time of\n     +    writing, there are other patches in flight that touch these test\n     +    scripts, therefore their transition to `main` is postponed to a later\n     +    date.\n      \n          This patch is the result of this command:\n      \n                  sed -i 's/PREPARE_FOR_MAIN_BRANCH[ ,]//' t/t[0-9]*.sh &&\n     -            git checkout HEAD -- t/t9902\\*\n     +            git checkout HEAD -- t/t5526\\* t/t9902\\*\n      \n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n     @@ t/t5510-fetch.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'f\n       \ttest_commit extraaa &&\n       \t(\n      \n     - ## t/t5526-fetch-submodules.sh ##\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success setup '\n     - \t)\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"fetch --recurse-submodules recurses into submodules\" '\n     -+test_expect_success \"fetch --recurse-submodules recurses into submodules\" '\n     - \tadd_upstream_commit &&\n     - \t(\n     - \t\tcd downstream &&\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"fetch --recurse-submodules recurses\n     - \ttest_i18ncmp expect.err actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"submodule.recurse option triggers recursive fetch\" '\n     -+test_expect_success \"submodule.recurse option triggers recursive fetch\" '\n     - \tadd_upstream_commit &&\n     - \t(\n     - \t\tcd downstream &&\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"submodule.recurse option triggers r\n     - \ttest_i18ncmp expect.err actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"fetch --recurse-submodules -j2 has the same output behaviour\" '\n     -+test_expect_success \"fetch --recurse-submodules -j2 has the same output behaviour\" '\n     - \tadd_upstream_commit &&\n     - \t(\n     - \t\tcd downstream &&\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success \"fetch --no-recurse-submodules only fetches superproject\" '\n     - \ttest_must_be_empty actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"using fetchRecurseSubmodules=true in .gitmodules recurses into submodules\" '\n     -+test_expect_success \"using fetchRecurseSubmodules=true in .gitmodules recurses into submodules\" '\n     - \t(\n     - \t\tcd downstream &&\n     - \t\tgit config -f .gitmodules submodule.submodule.fetchRecurseSubmodules true &&\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success \"using fetchRecurseSubmodules=false in .git/config overrides\n     - \ttest_must_be_empty actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"--recurse-submodules overrides fetchRecurseSubmodules setting from .git/config\" '\n     -+test_expect_success \"--recurse-submodules overrides fetchRecurseSubmodules setting from .git/config\" '\n     - \t(\n     - \t\tcd downstream &&\n     - \t\tgit fetch --recurse-submodules >../actual.out 2>../actual.err &&\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success \"--quiet propagates to parallel submodules\" '\n     - \ttest_must_be_empty actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"--dry-run propagates to submodules\" '\n     -+test_expect_success \"--dry-run propagates to submodules\" '\n     - \tadd_upstream_commit &&\n     - \t(\n     - \t\tcd downstream &&\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"--dry-run propagates to submodules\"\n     - \ttest_i18ncmp expect.err actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"Without --dry-run propagates to submodules\" '\n     -+test_expect_success \"Without --dry-run propagates to submodules\" '\n     - \t(\n     - \t\tcd downstream &&\n     - \t\tgit fetch --recurse-submodules >../actual.out 2>../actual.err\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"Without --dry-run propagates to sub\n     - \ttest_i18ncmp expect.err actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"recurseSubmodules=true propagates into submodules\" '\n     -+test_expect_success \"recurseSubmodules=true propagates into submodules\" '\n     - \tadd_upstream_commit &&\n     - \t(\n     - \t\tcd downstream &&\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"recurseSubmodules=true propagates i\n     - \ttest_i18ncmp expect.err actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"--recurse-submodules overrides config in submodule\" '\n     -+test_expect_success \"--recurse-submodules overrides config in submodule\" '\n     - \tadd_upstream_commit &&\n     - \t(\n     - \t\tcd downstream &&\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success \"--no-recurse-submodules overrides config setting\" '\n     - \ttest_must_be_empty actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion doesn't happen when no new commits are fetched in the superproject\" '\n     -+test_expect_success \"Recursion doesn't happen when no new commits are fetched in the superproject\" '\n     - \t(\n     - \t\tcd downstream &&\n     - \t\t(\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion doesn't happen when no ne\n     - \ttest_must_be_empty actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion stops when no new submodule commits are fetched\" '\n     -+test_expect_success \"Recursion stops when no new submodule commits are fetched\" '\n     - \thead1=$(git rev-parse --short HEAD) &&\n     - \tgit add submodule &&\n     - \tgit commit -m \"new submodule\" &&\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion stops when no new submodu\n     - \ttest_must_be_empty actual.out\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion doesn't happen when new superproject commits don't change any submodules\" '\n     -+test_expect_success \"Recursion doesn't happen when new superproject commits don't change any submodules\" '\n     - \tadd_upstream_commit &&\n     - \thead1=$(git rev-parse --short HEAD) &&\n     - \techo a > file &&\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion doesn't happen when new s\n     - \ttest_i18ncmp expect.err.file actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion picks up config in submodule\" '\n     -+test_expect_success \"Recursion picks up config in submodule\" '\n     - \t(\n     - \t\tcd downstream &&\n     - \t\tgit fetch --recurse-submodules &&\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion picks up config in submod\n     - \ttest_must_be_empty actual.out\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion picks up all submodules when necessary\" '\n     -+test_expect_success \"Recursion picks up all submodules when necessary\" '\n     - \tadd_upstream_commit &&\n     - \t(\n     - \t\tcd submodule &&\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"Recursion picks up all submodules w\n     - \ttest_must_be_empty actual.out\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"'--recurse-submodules=on-demand' doesn't recurse when no new commits are fetched in the superproject (and ignores config)\" '\n     -+test_expect_success \"'--recurse-submodules=on-demand' doesn't recurse when no new commits are fetched in the superproject (and ignores config)\" '\n     - \tadd_upstream_commit &&\n     - \t(\n     - \t\tcd submodule &&\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"'--recurse-submodules=on-demand' do\n     - \ttest_must_be_empty actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"'--recurse-submodules=on-demand' recurses as deep as necessary (and ignores config)\" '\n     -+test_expect_success \"'--recurse-submodules=on-demand' recurses as deep as necessary (and ignores config)\" '\n     - \thead1=$(git rev-parse --short HEAD) &&\n     - \tgit add submodule &&\n     - \tgit commit -m \"new submodule\" &&\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"'--recurse-submodules=on-demand' re\n     - \ttest_i18ncmp expect.err actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"'--recurse-submodules=on-demand' stops when no new submodule commits are found in the superproject (and ignores config)\" '\n     -+test_expect_success \"'--recurse-submodules=on-demand' stops when no new submodule commits are found in the superproject (and ignores config)\" '\n     - \tadd_upstream_commit &&\n     - \thead1=$(git rev-parse --short HEAD) &&\n     - \techo a >> file &&\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"'--recurse-submodules=on-demand' st\n     - \ttest_i18ncmp expect.err.file actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"'fetch.recurseSubmodules=on-demand' overrides global config\" '\n     -+test_expect_success \"'fetch.recurseSubmodules=on-demand' overrides global config\" '\n     - \t(\n     - \t\tcd downstream &&\n     - \t\tgit fetch --recurse-submodules\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"'fetch.recurseSubmodules=on-demand'\n     - \ttest_i18ncmp expect.err.2 actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"'submodule.<sub>.fetchRecurseSubmodules=on-demand' overrides fetch.recurseSubmodules\" '\n     -+test_expect_success \"'submodule.<sub>.fetchRecurseSubmodules=on-demand' overrides fetch.recurseSubmodules\" '\n     - \t(\n     - \t\tcd downstream &&\n     - \t\tgit fetch --recurse-submodules\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"'submodule.<sub>.fetchRecurseSubmod\n     - \ttest_i18ncmp expect.err.2 actual.err\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"don't fetch submodule when newly recorded commits are already present\" '\n     -+test_expect_success \"don't fetch submodule when newly recorded commits are already present\" '\n     - \t(\n     - \t\tcd submodule &&\n     - \t\tgit checkout -q HEAD^^\n     -@@ t/t5526-fetch-submodules.sh: test_expect_success PREPARE_FOR_MAIN_BRANCH \"don't fetch submodule when newly re\n     - \t)\n     - '\n     - \n     --test_expect_success PREPARE_FOR_MAIN_BRANCH \"'fetch.recurseSubmodules=on-demand' works also without .gitmodules entry\" '\n     -+test_expect_success \"'fetch.recurseSubmodules=on-demand' works also without .gitmodules entry\" '\n     - \t(\n     - \t\tcd downstream &&\n     - \t\tgit fetch --recurse-submodules\n     -\n       ## t/t5703-upload-pack-ref-in-want.sh ##\n      @@ t/t5703-upload-pack-ref-in-want.sh: test_expect_success 'server is initially behind - ref in want' '\n       \ttest_cmp expected actual\n 28:  f853fa946f <  -:  ---------- Change the default branch name to `main`\n\n-- \ngitgitgadget\n"},{"id":"410091","messageId":"0d4f1275f745f90a1ea007dfc82510f0040ab4a0.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 03/27] t2*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:03Z","receivedAt":"2020-11-17T16:12:59Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t2*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t2007-checkout-symlink.sh              | 10 ++--\n t/t2009-checkout-statinfo.sh             |  8 +--\n t/t2010-checkout-ambiguous.sh            |  4 +-\n t/t2011-checkout-invalid-head.sh         | 16 +++---\n t/t2012-checkout-last.sh                 | 48 ++++++++--------\n t/t2015-checkout-unborn.sh               |  2 +-\n t/t2017-checkout-orphan.sh               | 44 +++++++--------\n t/t2020-checkout-detach.sh               | 28 +++++-----\n t/t2022-checkout-paths.sh                | 22 ++++----\n t/t2023-checkout-m.sh                    | 10 ++--\n t/t2024-checkout-dwim.sh                 | 70 ++++++++++++------------\n t/t2027-checkout-track.sh                |  6 +-\n t/t2030-unresolve-info.sh                |  6 +-\n t/t2060-switch.sh                        | 30 +++++-----\n t/t2070-restore.sh                       |  4 +-\n t/t2106-update-index-assume-unchanged.sh |  2 +-\n t/t2400-worktree-add.sh                  | 66 +++++++++++-----------\n t/t2401-worktree-prune.sh                |  2 +-\n t/t2402-worktree-list.sh                 | 20 +++----\n t/t2405-worktree-submodule.sh            |  6 +-\n t/test-lib.sh                            |  2 +-\n 21 files changed, 203 insertions(+), 203 deletions(-)\n\ndiff --git a/t/t2007-checkout-symlink.sh b/t/t2007-checkout-symlink.sh\nindex fc9aad530e..d6468ad8f3 100755\n--- a/t/t2007-checkout-symlink.sh\n+++ b/t/t2007-checkout-symlink.sh\n@@ -12,14 +12,14 @@ test_expect_success setup '\n \techo hello >frotz/filfre &&\n \tgit add frotz/filfre &&\n \ttest_tick &&\n-\tgit commit -m \"master has file frotz/filfre\" &&\n+\tgit commit -m \"main has file frotz/filfre\" &&\n \n \tgit branch side &&\n \n \techo goodbye >nitfol &&\n \tgit add nitfol &&\n \ttest_tick &&\n-\tgit commit -m \"master adds file nitfol\" &&\n+\tgit commit -m \"main adds file nitfol\" &&\n \n \tgit checkout side &&\n \n@@ -34,13 +34,13 @@ test_expect_success setup '\n \n test_expect_success 'switch from symlink to dir' '\n \n-\tgit checkout master\n+\tgit checkout main\n \n '\n \n-test_expect_success 'Remove temporary directories & switch to master' '\n+test_expect_success 'Remove temporary directories & switch to main' '\n \trm -fr frotz xyzzy nitfol &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'switch from dir to symlink' '\ndiff --git a/t/t2009-checkout-statinfo.sh b/t/t2009-checkout-statinfo.sh\nindex f3c2152087..91940f3c60 100755\n--- a/t/t2009-checkout-statinfo.sh\n+++ b/t/t2009-checkout-statinfo.sh\n@@ -21,13 +21,13 @@ test_expect_success 'branch switching' '\n \tgit reset --hard &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n \tgit checkout side &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest \"$(git diff-files --raw)\" = \"\"\n \n '\n@@ -37,13 +37,13 @@ test_expect_success 'path checkout' '\n \tgit reset --hard &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n-\tgit checkout master world &&\n+\tgit checkout main world &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n \tgit checkout side world &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n-\tgit checkout master world &&\n+\tgit checkout main world &&\n \ttest \"$(git diff-files --raw)\" = \"\"\n \n '\ndiff --git a/t/t2010-checkout-ambiguous.sh b/t/t2010-checkout-ambiguous.sh\nindex 2e47fe01cf..64395479e8 100755\n--- a/t/t2010-checkout-ambiguous.sh\n+++ b/t/t2010-checkout-ambiguous.sh\n@@ -17,7 +17,7 @@ test_expect_success 'reference must be a tree' '\n '\n \n test_expect_success 'branch switching' '\n-\ttest \"refs/heads/master\" = \"$(git symbolic-ref HEAD)\" &&\n+\ttest \"refs/heads/main\" = \"$(git symbolic-ref HEAD)\" &&\n \tgit checkout world -- &&\n \ttest \"refs/heads/world\" = \"$(git symbolic-ref HEAD)\"\n '\n@@ -57,7 +57,7 @@ test_expect_success 'disambiguate checking out from a tree-ish' '\n '\n \n test_expect_success 'accurate error message with more than one ref' '\n-\ttest_must_fail git checkout HEAD master -- 2>actual &&\n+\ttest_must_fail git checkout HEAD main -- 2>actual &&\n \ttest_i18ngrep 2 actual &&\n \ttest_i18ngrep \"one reference expected, 2 given\" actual\n '\ndiff --git a/t/t2011-checkout-invalid-head.sh b/t/t2011-checkout-invalid-head.sh\nindex 0e8d56aa76..d92f8582ea 100755\n--- a/t/t2011-checkout-invalid-head.sh\n+++ b/t/t2011-checkout-invalid-head.sh\n@@ -11,12 +11,12 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'checkout should not start branch from a tree' '\n-\ttest_must_fail git checkout -b newbranch master^{tree}\n+\ttest_must_fail git checkout -b newbranch main^{tree}\n '\n \n-test_expect_success 'checkout master from invalid HEAD' '\n+test_expect_success 'checkout main from invalid HEAD' '\n \techo $ZERO_OID >.git/HEAD &&\n-\tgit checkout master --\n+\tgit checkout main --\n '\n \n test_expect_success 'checkout notices failure to lock HEAD' '\n@@ -26,7 +26,7 @@ test_expect_success 'checkout notices failure to lock HEAD' '\n '\n \n test_expect_success 'create ref directory/file conflict scenario' '\n-\tgit update-ref refs/heads/outer/inner master &&\n+\tgit update-ref refs/heads/outer/inner main &&\n \n \t# do not rely on symbolic-ref to get a known state,\n \t# as it may use the same code we are testing\n@@ -37,12 +37,12 @@ test_expect_success 'create ref directory/file conflict scenario' '\n \n test_expect_success 'checkout away from d/f HEAD (unpacked, to branch)' '\n \treset_to_df &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'checkout away from d/f HEAD (unpacked, to detached)' '\n \treset_to_df &&\n-\tgit checkout --detach master\n+\tgit checkout --detach main\n '\n \n test_expect_success 'pack refs' '\n@@ -51,11 +51,11 @@ test_expect_success 'pack refs' '\n \n test_expect_success 'checkout away from d/f HEAD (packed, to branch)' '\n \treset_to_df &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'checkout away from d/f HEAD (packed, to detached)' '\n \treset_to_df &&\n-\tgit checkout --detach master\n+\tgit checkout --detach main\n '\n test_done\ndiff --git a/t/t2012-checkout-last.sh b/t/t2012-checkout-last.sh\nindex e7ba8c505f..7a126337ca 100755\n--- a/t/t2012-checkout-last.sh\n+++ b/t/t2012-checkout-last.sh\n@@ -24,7 +24,7 @@ test_expect_success 'first branch switch' '\n \n test_expect_success '\"checkout -\" switches back' '\n \tgit checkout - &&\n-\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/master\"\n+\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/main\"\n '\n \n test_expect_success '\"checkout -\" switches forth' '\n@@ -98,56 +98,56 @@ test_expect_success 'merge base test setup' '\n \tgit commit -m third\n '\n \n-test_expect_success 'another...master' '\n+test_expect_success 'another...main' '\n \tgit checkout another &&\n-\tgit checkout another...master &&\n-\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify master^)\"\n+\tgit checkout another...main &&\n+\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify main^)\"\n '\n \n-test_expect_success '...master' '\n+test_expect_success '...main' '\n \tgit checkout another &&\n-\tgit checkout ...master &&\n-\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify master^)\"\n+\tgit checkout ...main &&\n+\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify main^)\"\n '\n \n-test_expect_success 'master...' '\n+test_expect_success 'main...' '\n \tgit checkout another &&\n-\tgit checkout master... &&\n-\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify master^)\"\n+\tgit checkout main... &&\n+\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify main^)\"\n '\n \n test_expect_success '\"checkout -\" works after a rebase A' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout other &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \tgit checkout - &&\n-\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/master\"\n+\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/main\"\n '\n \n test_expect_success '\"checkout -\" works after a rebase A B' '\n-\tgit branch moodle master~1 &&\n-\tgit checkout master &&\n+\tgit branch moodle main~1 &&\n+\tgit checkout main &&\n \tgit checkout other &&\n-\tgit rebase master moodle &&\n+\tgit rebase main moodle &&\n \tgit checkout - &&\n-\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/master\"\n+\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/main\"\n '\n \n test_expect_success '\"checkout -\" works after a rebase -i A' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout other &&\n-\tgit rebase -i master &&\n+\tgit rebase -i main &&\n \tgit checkout - &&\n-\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/master\"\n+\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/main\"\n '\n \n test_expect_success '\"checkout -\" works after a rebase -i A B' '\n-\tgit branch foodle master~1 &&\n-\tgit checkout master &&\n+\tgit branch foodle main~1 &&\n+\tgit checkout main &&\n \tgit checkout other &&\n-\tgit rebase master foodle &&\n+\tgit rebase main foodle &&\n \tgit checkout - &&\n-\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/master\"\n+\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/main\"\n '\n \n test_done\ndiff --git a/t/t2015-checkout-unborn.sh b/t/t2015-checkout-unborn.sh\nindex 37bdcedcc9..2b3e6dc27e 100755\n--- a/t/t2015-checkout-unborn.sh\n+++ b/t/t2015-checkout-unborn.sh\n@@ -11,7 +11,7 @@ test_expect_success 'setup' '\n \t git add file &&\n \t git commit -m base\n \t) &&\n-\tgit fetch parent master:origin\n+\tgit fetch parent main:origin\n '\n \n test_expect_success 'checkout from unborn preserves untracked files' '\ndiff --git a/t/t2017-checkout-orphan.sh b/t/t2017-checkout-orphan.sh\nindex 655f278c5f..e2ce29c8e7 100755\n--- a/t/t2017-checkout-orphan.sh\n+++ b/t/t2017-checkout-orphan.sh\n@@ -29,34 +29,34 @@ test_expect_success '--orphan creates a new orphan branch from HEAD' '\n \ttest_tick &&\n \tgit commit -m \"Third Commit\" &&\n \ttest_must_fail git rev-parse --verify HEAD^ &&\n-\tgit diff-tree --quiet master alpha\n+\tgit diff-tree --quiet main alpha\n '\n \n test_expect_success '--orphan creates a new orphan branch from <start_point>' '\n-\tgit checkout master &&\n-\tgit checkout --orphan beta master^ &&\n+\tgit checkout main &&\n+\tgit checkout --orphan beta main^ &&\n \ttest_must_fail git rev-parse --verify HEAD &&\n \ttest \"refs/heads/beta\" = \"$(git symbolic-ref HEAD)\" &&\n \ttest_tick &&\n \tgit commit -m \"Fourth Commit\" &&\n \ttest_must_fail git rev-parse --verify HEAD^ &&\n-\tgit diff-tree --quiet master^ beta\n+\tgit diff-tree --quiet main^ beta\n '\n \n test_expect_success '--orphan must be rejected with -b' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git checkout --orphan new -b newer &&\n-\ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n+\ttest refs/heads/main = \"$(git symbolic-ref HEAD)\"\n '\n \n test_expect_success '--orphan must be rejected with -t' '\n-\tgit checkout master &&\n-\ttest_must_fail git checkout --orphan new -t master &&\n-\ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n+\tgit checkout main &&\n+\ttest_must_fail git checkout --orphan new -t main &&\n+\ttest refs/heads/main = \"$(git symbolic-ref HEAD)\"\n '\n \n test_expect_success '--orphan ignores branch.autosetupmerge' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config branch.autosetupmerge always &&\n \tgit checkout --orphan gamma &&\n \ttest -z \"$(git config branch.gamma.merge)\" &&\n@@ -65,7 +65,7 @@ test_expect_success '--orphan ignores branch.autosetupmerge' '\n '\n \n test_expect_success '--orphan makes reflog by default' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config --unset core.logAllRefUpdates &&\n \tgit checkout --orphan delta &&\n \ttest_must_fail git rev-parse --verify delta@{0} &&\n@@ -74,7 +74,7 @@ test_expect_success '--orphan makes reflog by default' '\n '\n \n test_expect_success '--orphan does not make reflog when core.logAllRefUpdates = false' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config core.logAllRefUpdates false &&\n \tgit checkout --orphan epsilon &&\n \ttest_must_fail git rev-parse --verify epsilon@{0} &&\n@@ -83,7 +83,7 @@ test_expect_success '--orphan does not make reflog when core.logAllRefUpdates =\n '\n \n test_expect_success '--orphan with -l makes reflog when core.logAllRefUpdates = false' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -l --orphan zeta &&\n \ttest_must_fail git rev-parse --verify zeta@{0} &&\n \tgit commit -m Zeta &&\n@@ -91,33 +91,33 @@ test_expect_success '--orphan with -l makes reflog when core.logAllRefUpdates =\n '\n \n test_expect_success 'giving up --orphan not committed when -l and core.logAllRefUpdates = false deletes reflog' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -l --orphan eta &&\n \ttest_must_fail git rev-parse --verify eta@{0} &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git rev-parse --verify eta@{0}\n '\n \n test_expect_success '--orphan is rejected with an existing name' '\n-\tgit checkout master &&\n-\ttest_must_fail git checkout --orphan master &&\n-\ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n+\tgit checkout main &&\n+\ttest_must_fail git checkout --orphan main &&\n+\ttest refs/heads/main = \"$(git symbolic-ref HEAD)\"\n '\n \n test_expect_success '--orphan refuses to switch if a merge is needed' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard &&\n \techo local >>\"$TEST_FILE\" &&\n \tcat \"$TEST_FILE\" >\"$TEST_FILE.saved\" &&\n-\ttest_must_fail git checkout --orphan new master^ &&\n-\ttest refs/heads/master = \"$(git symbolic-ref HEAD)\" &&\n+\ttest_must_fail git checkout --orphan new main^ &&\n+\ttest refs/heads/main = \"$(git symbolic-ref HEAD)\" &&\n \ttest_cmp \"$TEST_FILE\" \"$TEST_FILE.saved\" &&\n \tgit diff-index --quiet --cached HEAD &&\n \tgit reset --hard\n '\n \n test_expect_success 'cannot --detach on an unborn branch' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout --orphan new &&\n \ttest_must_fail git checkout --detach\n '\ndiff --git a/t/t2020-checkout-detach.sh b/t/t2020-checkout-detach.sh\nindex b748db9946..25885c3065 100755\n--- a/t/t2020-checkout-detach.sh\n+++ b/t/t2020-checkout-detach.sh\n@@ -22,7 +22,7 @@ check_no_orphan_warning() {\n }\n \n reset () {\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcheck_not_detached\n }\n \n@@ -85,7 +85,7 @@ test_expect_success 'checkout --detach errors out for non-commit' '\n \n test_expect_success 'checkout --detach errors out for extra argument' '\n \treset &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git checkout --detach tag one.t &&\n \tcheck_not_detached\n '\n@@ -113,7 +113,7 @@ test_expect_success 'checkout warns on orphan commits' '\n \techo new content >orphan &&\n \tgit commit -a -m orphan2 &&\n \torphan2=$(git rev-parse HEAD) &&\n-\tgit checkout master 2>stderr\n+\tgit checkout main 2>stderr\n '\n \n test_expect_success 'checkout warns on orphan commits: output' '\n@@ -132,7 +132,7 @@ test_expect_success 'checkout warns orphaning 1 of 2 commits: output' '\n test_expect_success 'checkout does not warn leaving ref tip' '\n \treset &&\n \tgit checkout --detach two &&\n-\tgit checkout master 2>stderr\n+\tgit checkout main 2>stderr\n '\n \n test_expect_success 'checkout does not warn leaving ref tip' '\n@@ -142,7 +142,7 @@ test_expect_success 'checkout does not warn leaving ref tip' '\n test_expect_success 'checkout does not warn leaving reachable commit' '\n \treset &&\n \tgit checkout --detach HEAD^ &&\n-\tgit checkout master 2>stderr\n+\tgit checkout main 2>stderr\n '\n \n test_expect_success 'checkout does not warn leaving reachable commit' '\n@@ -150,14 +150,14 @@ test_expect_success 'checkout does not warn leaving reachable commit' '\n '\n \n cat >expect <<'EOF'\n-Your branch is behind 'master' by 1 commit, and can be fast-forwarded.\n+Your branch is behind 'main' by 1 commit, and can be fast-forwarded.\n   (use \"git pull\" to update your local branch)\n EOF\n test_expect_success 'tracking count is accurate after orphan check' '\n \treset &&\n-\tgit branch child master^ &&\n+\tgit branch child main^ &&\n \tgit config branch.child.remote . &&\n-\tgit config branch.child.merge refs/heads/master &&\n+\tgit config branch.child.merge refs/heads/main &&\n \tgit checkout child^ &&\n \tgit checkout child >stdout &&\n \ttest_i18ncmp expect stdout\n@@ -189,9 +189,9 @@ test_expect_success 'no advice given for explicit detached head state' '\n # Detached HEAD tests for GIT_PRINT_SHA1_ELLIPSIS (new format)\n test_expect_success 'describe_detached_head prints no SHA-1 ellipsis when not asked to' \"\n \n-\tcommit=$(git rev-parse --short=12 master^) &&\n-\tcommit2=$(git rev-parse --short=12 master~2) &&\n-\tcommit3=$(git rev-parse --short=12 master~3) &&\n+\tcommit=$(git rev-parse --short=12 main^) &&\n+\tcommit2=$(git rev-parse --short=12 main~2) &&\n+\tcommit3=$(git rev-parse --short=12 main~3) &&\n \n \t# The first detach operation is more chatty than the following ones.\n \tcat >1st_detach <<-EOF &&\n@@ -271,9 +271,9 @@ test_expect_success 'describe_detached_head prints no SHA-1 ellipsis when not as\n # Detached HEAD tests for GIT_PRINT_SHA1_ELLIPSIS (old format)\n test_expect_success 'describe_detached_head does print SHA-1 ellipsis when asked to' \"\n \n-\tcommit=$(git rev-parse --short=12 master^) &&\n-\tcommit2=$(git rev-parse --short=12 master~2) &&\n-\tcommit3=$(git rev-parse --short=12 master~3) &&\n+\tcommit=$(git rev-parse --short=12 main^) &&\n+\tcommit2=$(git rev-parse --short=12 main~2) &&\n+\tcommit3=$(git rev-parse --short=12 main~3) &&\n \n \t# The first detach operation is more chatty than the following ones.\n \tcat >1st_detach <<-EOF &&\ndiff --git a/t/t2022-checkout-paths.sh b/t/t2022-checkout-paths.sh\nindex 6844afafc0..4174620cf4 100755\n--- a/t/t2022-checkout-paths.sh\n+++ b/t/t2022-checkout-paths.sh\n@@ -5,15 +5,15 @@ test_description='checkout $tree -- $paths'\n \n test_expect_success setup '\n \tmkdir dir &&\n-\t>dir/master &&\n+\t>dir/main &&\n \techo common >dir/common &&\n-\tgit add dir/master dir/common &&\n-\ttest_tick && git commit -m \"master has dir/master\" &&\n+\tgit add dir/main dir/common &&\n+\ttest_tick && git commit -m \"main has dir/main\" &&\n \tgit checkout -b next &&\n-\tgit mv dir/master dir/next0 &&\n+\tgit mv dir/main dir/next0 &&\n \techo next >dir/next1 &&\n \tgit add dir &&\n-\ttest_tick && git commit -m \"next has dir/next but not dir/master\"\n+\ttest_tick && git commit -m \"next has dir/next but not dir/main\"\n '\n \n test_expect_success 'checking out paths out of a tree does not clobber unrelated paths' '\n@@ -26,11 +26,11 @@ test_expect_success 'checking out paths out of a tree does not clobber unrelated\n \techo untracked >expect.next2 &&\n \tcat expect.next2 >dir/next2 &&\n \n-\tgit checkout master dir &&\n+\tgit checkout main dir &&\n \n \ttest_cmp expect.common dir/common &&\n-\ttest_path_is_file dir/master &&\n-\tgit diff --exit-code master dir/master &&\n+\ttest_path_is_file dir/main &&\n+\tgit diff --exit-code main dir/main &&\n \n \ttest_path_is_missing dir/next0 &&\n \ttest_cmp expect.next1 dir/next1 &&\n@@ -52,11 +52,11 @@ test_expect_success 'do not touch unmerged entries matching $path but not in $tr\n \tEOF\n \tgit update-index --index-info <expect.next0 &&\n \n-\tgit checkout master dir &&\n+\tgit checkout main dir &&\n \n \ttest_cmp expect.common dir/common &&\n-\ttest_path_is_file dir/master &&\n-\tgit diff --exit-code master dir/master &&\n+\ttest_path_is_file dir/main &&\n+\tgit diff --exit-code main dir/main &&\n \tgit ls-files -s dir/next0 >actual.next0 &&\n \ttest_cmp expect.next0 actual.next0\n '\ndiff --git a/t/t2023-checkout-m.sh b/t/t2023-checkout-m.sh\nindex fca3f85824..ddcfcc3e9b 100755\n--- a/t/t2023-checkout-m.sh\n+++ b/t/t2023-checkout-m.sh\n@@ -10,15 +10,15 @@ test_expect_success setup '\n \ttest_tick &&\n \ttest_commit both.txt both.txt initial &&\n \tgit branch topic &&\n-\ttest_commit modified_in_master both.txt in_master &&\n-\ttest_commit added_in_master each.txt in_master &&\n+\ttest_commit modified_in_main both.txt in_main &&\n+\ttest_commit added_in_main each.txt in_main &&\n \tgit checkout topic &&\n \ttest_commit modified_in_topic both.txt in_topic &&\n \ttest_commit added_in_topic each.txt in_topic\n '\n \n-test_expect_success 'git merge master' '\n-    test_must_fail git merge master\n+test_expect_success 'git merge main' '\n+    test_must_fail git merge main\n '\n \n clean_branchnames () {\n@@ -61,7 +61,7 @@ test_expect_success 'force checkout a conflict file creates stage zero entry' '\n \t\tgit checkout topic &&\n \t\techo c >a &&\n \t\tC_OBJ=$(git hash-object a) &&\n-\t\tgit checkout -m master &&\n+\t\tgit checkout -m main &&\n \t\ttest_cmp_rev :1:a $A_OBJ &&\n \t\ttest_cmp_rev :2:a $B_OBJ &&\n \t\ttest_cmp_rev :3:a $C_OBJ &&\ndiff --git a/t/t2024-checkout-dwim.sh b/t/t2024-checkout-dwim.sh\nindex a4f8d3a67e..4a1c901456 100755\n--- a/t/t2024-checkout-dwim.sh\n+++ b/t/t2024-checkout-dwim.sh\n@@ -29,11 +29,11 @@ status_uno_is_clean () {\n }\n \n test_expect_success 'setup' '\n-\ttest_commit my_master &&\n+\ttest_commit my_main &&\n \tgit init repo_a &&\n \t(\n \t\tcd repo_a &&\n-\t\ttest_commit a_master &&\n+\t\ttest_commit a_main &&\n \t\tgit checkout -b foo &&\n \t\ttest_commit a_foo &&\n \t\tgit checkout -b bar &&\n@@ -44,7 +44,7 @@ test_expect_success 'setup' '\n \tgit init repo_b &&\n \t(\n \t\tcd repo_b &&\n-\t\ttest_commit b_master &&\n+\t\ttest_commit b_main &&\n \t\tgit checkout -b foo &&\n \t\ttest_commit b_foo &&\n \t\tgit checkout -b baz &&\n@@ -60,23 +60,23 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'checkout of non-existing branch fails' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D xyzzy &&\n \n \ttest_must_fail git checkout xyzzy &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/xyzzy &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout of branch from multiple remotes fails #1' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D foo &&\n \n \ttest_must_fail git checkout foo &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/foo &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'when arg matches multiple remotes, do not fallback to interpreting as pathspec' '\n@@ -100,21 +100,21 @@ test_expect_success 'when arg matches multiple remotes, do not fallback to inter\n '\n \n test_expect_success 'checkout of branch from multiple remotes fails with advice' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D foo &&\n \ttest_must_fail git checkout foo 2>stderr &&\n-\ttest_branch master &&\n+\ttest_branch main &&\n \tstatus_uno_is_clean &&\n \ttest_i18ngrep \"^hint: \" stderr &&\n \ttest_must_fail git -c advice.checkoutAmbiguousRemoteBranchName=false \\\n \t\tcheckout foo 2>stderr &&\n-\ttest_branch master &&\n+\ttest_branch main &&\n \tstatus_uno_is_clean &&\n \ttest_i18ngrep ! \"^hint: \" stderr\n '\n \n test_expect_success PERL 'checkout -p with multiple remotes does not print advice' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D foo &&\n \n \tgit checkout -p foo 2>stderr &&\n@@ -123,7 +123,7 @@ test_expect_success PERL 'checkout -p with multiple remotes does not print advic\n '\n \n test_expect_success 'checkout of branch from multiple remotes succeeds with checkout.defaultRemote #1' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D foo &&\n \n@@ -135,7 +135,7 @@ test_expect_success 'checkout of branch from multiple remotes succeeds with chec\n '\n \n test_expect_success 'checkout of branch from a single remote succeeds #1' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D bar &&\n \n \tgit checkout bar &&\n@@ -146,7 +146,7 @@ test_expect_success 'checkout of branch from a single remote succeeds #1' '\n '\n \n test_expect_success 'checkout of branch from a single remote succeeds #2' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D baz &&\n \n \tgit checkout baz &&\n@@ -157,33 +157,33 @@ test_expect_success 'checkout of branch from a single remote succeeds #2' '\n '\n \n test_expect_success '--no-guess suppresses branch auto-vivification' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D bar &&\n \n \ttest_must_fail git checkout --no-guess bar &&\n \ttest_must_fail git rev-parse --verify refs/heads/bar &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout.guess = false suppresses branch auto-vivification' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D bar &&\n \n \ttest_config checkout.guess false &&\n \ttest_must_fail git checkout bar &&\n \ttest_must_fail git rev-parse --verify refs/heads/bar &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'setup more remotes with unconventional refspecs' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \tgit init repo_c &&\n \t(\n \t\tcd repo_c &&\n-\t\ttest_commit c_master &&\n+\t\ttest_commit c_main &&\n \t\tgit checkout -b bar &&\n \t\ttest_commit c_bar &&\n \t\tgit checkout -b spam &&\n@@ -192,7 +192,7 @@ test_expect_success 'setup more remotes with unconventional refspecs' '\n \tgit init repo_d &&\n \t(\n \t\tcd repo_d &&\n-\t\ttest_commit d_master &&\n+\t\ttest_commit d_main &&\n \t\tgit checkout -b baz &&\n \t\ttest_commit d_baz &&\n \t\tgit checkout -b eggs &&\n@@ -208,29 +208,29 @@ test_expect_success 'setup more remotes with unconventional refspecs' '\n '\n \n test_expect_success 'checkout of branch from multiple remotes fails #2' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D bar &&\n \n \ttest_must_fail git checkout bar &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/bar &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout of branch from multiple remotes fails #3' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D baz &&\n \n \ttest_must_fail git checkout baz &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/baz &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout of branch from a single remote succeeds #3' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D spam &&\n \n@@ -242,7 +242,7 @@ test_expect_success 'checkout of branch from a single remote succeeds #3' '\n '\n \n test_expect_success 'checkout of branch from a single remote succeeds #4' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D eggs &&\n \n@@ -254,7 +254,7 @@ test_expect_success 'checkout of branch from a single remote succeeds #4' '\n '\n \n test_expect_success 'checkout of branch with a file having the same name fails' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D spam &&\n \n@@ -262,11 +262,11 @@ test_expect_success 'checkout of branch with a file having the same name fails'\n \ttest_must_fail git checkout spam &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/spam &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout of branch with a file in subdir having the same name fails' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D spam &&\n \n@@ -276,11 +276,11 @@ test_expect_success 'checkout of branch with a file in subdir having the same na\n \ttest_must_fail git -C sub checkout spam &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/spam &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout <branch> -- succeeds, even if a file with the same name exists' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D spam &&\n \n@@ -294,7 +294,7 @@ test_expect_success 'checkout <branch> -- succeeds, even if a file with the same\n \n test_expect_success 'loosely defined local base branch is reported correctly' '\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tstatus_uno_is_clean &&\n \tgit branch strict &&\n \tgit branch loose &&\n@@ -302,8 +302,8 @@ test_expect_success 'loosely defined local base branch is reported correctly' '\n \n \ttest_config branch.strict.remote . &&\n \ttest_config branch.loose.remote . &&\n-\ttest_config branch.strict.merge refs/heads/master &&\n-\ttest_config branch.loose.merge master &&\n+\ttest_config branch.strict.merge refs/heads/main &&\n+\ttest_config branch.loose.merge main &&\n \n \tgit checkout strict | sed -e \"s/strict/BRANCHNAME/g\" >expect &&\n \tstatus_uno_is_clean &&\ndiff --git a/t/t2027-checkout-track.sh b/t/t2027-checkout-track.sh\nindex bcba1bf90c..bc46c5a68e 100755\n--- a/t/t2027-checkout-track.sh\n+++ b/t/t2027-checkout-track.sh\n@@ -10,14 +10,14 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'checkout --track -b creates a new tracking branch' '\n-\tgit checkout --track -b branch1 master &&\n+\tgit checkout --track -b branch1 main &&\n \ttest $(git rev-parse --abbrev-ref HEAD) = branch1 &&\n \ttest $(git config --get branch.branch1.remote) = . &&\n-\ttest $(git config --get branch.branch1.merge) = refs/heads/master\n+\ttest $(git config --get branch.branch1.merge) = refs/heads/main\n '\n \n test_expect_success 'checkout --track -b rejects an extra path argument' '\n-\ttest_must_fail git checkout --track -b branch2 master one.t 2>err &&\n+\ttest_must_fail git checkout --track -b branch2 main one.t 2>err &&\n \ttest_i18ngrep \"cannot be used with updating paths\" err\n '\n \ndiff --git a/t/t2030-unresolve-info.sh b/t/t2030-unresolve-info.sh\nindex 309199bca2..3cdd73c172 100755\n--- a/t/t2030-unresolve-info.sh\n+++ b/t/t2030-unresolve-info.sh\n@@ -59,7 +59,7 @@ test_expect_success setup '\n \ttest_commit fourth fi/le fourth &&\n \tgit checkout add-add &&\n \ttest_commit fifth add-differently &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'add records switch clears' '\n@@ -183,8 +183,8 @@ test_expect_success 'rerere forget (binary)' '\n '\n \n test_expect_success 'rerere forget (add-add conflict)' '\n-\tgit checkout -f master &&\n-\techo master >add-differently &&\n+\tgit checkout -f main &&\n+\techo main >add-differently &&\n \tgit add add-differently &&\n \tgit commit -m \"add differently\" &&\n \ttest_must_fail git merge fifth &&\ndiff --git a/t/t2060-switch.sh b/t/t2060-switch.sh\nindex 68c9101b02..11f85f8861 100755\n--- a/t/t2060-switch.sh\n+++ b/t/t2060-switch.sh\n@@ -23,41 +23,41 @@ test_expect_success 'switch branch' '\n '\n \n test_expect_success 'switch and detach' '\n-\ttest_when_finished git switch master &&\n-\ttest_must_fail git switch master^{commit} &&\n-\tgit switch --detach master^{commit} &&\n+\ttest_when_finished git switch main &&\n+\ttest_must_fail git switch main^{commit} &&\n+\tgit switch --detach main^{commit} &&\n \ttest_must_fail git symbolic-ref HEAD\n '\n \n test_expect_success 'switch and detach current branch' '\n-\ttest_when_finished git switch master &&\n-\tgit switch master &&\n+\ttest_when_finished git switch main &&\n+\tgit switch main &&\n \tgit switch --detach &&\n \ttest_must_fail git symbolic-ref HEAD\n '\n \n test_expect_success 'switch and create branch' '\n-\ttest_when_finished git switch master &&\n-\tgit switch -c temp master^ &&\n-\ttest_cmp_rev master^ refs/heads/temp &&\n+\ttest_when_finished git switch main &&\n+\tgit switch -c temp main^ &&\n+\ttest_cmp_rev main^ refs/heads/temp &&\n \techo refs/heads/temp >expected-branch &&\n \tgit symbolic-ref HEAD >actual-branch &&\n \ttest_cmp expected-branch actual-branch\n '\n \n test_expect_success 'force create branch from HEAD' '\n-\ttest_when_finished git switch master &&\n-\tgit switch --detach master &&\n+\ttest_when_finished git switch main &&\n+\tgit switch --detach main &&\n \ttest_must_fail git switch -c temp &&\n \tgit switch -C temp &&\n-\ttest_cmp_rev master refs/heads/temp &&\n+\ttest_cmp_rev main refs/heads/temp &&\n \techo refs/heads/temp >expected-branch &&\n \tgit symbolic-ref HEAD >actual-branch &&\n \ttest_cmp expected-branch actual-branch\n '\n \n test_expect_success 'new orphan branch from empty' '\n-\ttest_when_finished git switch master &&\n+\ttest_when_finished git switch main &&\n \ttest_must_fail git switch --orphan new-orphan HEAD &&\n \tgit switch --orphan new-orphan &&\n \ttest_commit orphan &&\n@@ -69,7 +69,7 @@ test_expect_success 'new orphan branch from empty' '\n '\n \n test_expect_success 'orphan branch works with --discard-changes' '\n-\ttest_when_finished git switch master &&\n+\ttest_when_finished git switch main &&\n \techo foo >foo.txt &&\n \tgit switch --discard-changes --orphan new-orphan2 &&\n \tgit ls-files >tracked-files &&\n@@ -77,7 +77,7 @@ test_expect_success 'orphan branch works with --discard-changes' '\n '\n \n test_expect_success 'switching ignores file of same branch name' '\n-\ttest_when_finished git switch master &&\n+\ttest_when_finished git switch main &&\n \t: >first-branch &&\n \tgit switch first-branch &&\n \techo refs/heads/first-branch >expected &&\n@@ -86,7 +86,7 @@ test_expect_success 'switching ignores file of same branch name' '\n '\n \n test_expect_success 'guess and create branch' '\n-\ttest_when_finished git switch master &&\n+\ttest_when_finished git switch main &&\n \ttest_must_fail git switch --no-guess foo &&\n \ttest_config checkout.guess false &&\n \ttest_must_fail git switch foo &&\ndiff --git a/t/t2070-restore.sh b/t/t2070-restore.sh\nindex 89e5a142c9..46e27212d6 100755\n--- a/t/t2070-restore.sh\n+++ b/t/t2070-restore.sh\n@@ -15,7 +15,7 @@ test_expect_success 'setup' '\n \techo ignored >ignored &&\n \techo /ignored >.gitignore &&\n \tgit add one two .gitignore &&\n-\tgit update-ref refs/heads/one master\n+\tgit update-ref refs/heads/one main\n '\n \n test_expect_success 'restore without pathspec is not ok' '\n@@ -91,7 +91,7 @@ test_expect_success 'restore --ignore-unmerged ignores unmerged entries' '\n \t\tgit switch -c first &&\n \t\techo first >unmerged &&\n \t\tgit commit -am first &&\n-\t\tgit switch -c second master &&\n+\t\tgit switch -c second main &&\n \t\techo second >unmerged &&\n \t\tgit commit -am second &&\n \t\ttest_must_fail git merge first &&\ndiff --git a/t/t2106-update-index-assume-unchanged.sh b/t/t2106-update-index-assume-unchanged.sh\nindex 99d858c6b7..2b923824c9 100755\n--- a/t/t2106-update-index-assume-unchanged.sh\n+++ b/t/t2106-update-index-assume-unchanged.sh\n@@ -19,6 +19,6 @@ test_expect_success 'do not switch branches with dirty file' \\\n \t git checkout other &&\n \t echo dirt >file &&\n \t git update-index --assume-unchanged file &&\n-\t test_must_fail git checkout master'\n+\t test_must_fail git checkout main'\n \n test_done\ndiff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh\nindex 5a7495474a..deca7b0271 100755\n--- a/t/t2400-worktree-add.sh\n+++ b/t/t2400-worktree-add.sh\n@@ -12,12 +12,12 @@ test_expect_success 'setup' '\n \n test_expect_success '\"add\" an existing worktree' '\n \tmkdir -p existing/subtree &&\n-\ttest_must_fail git worktree add --detach existing master\n+\ttest_must_fail git worktree add --detach existing main\n '\n \n test_expect_success '\"add\" an existing empty worktree' '\n \tmkdir existing_empty &&\n-\tgit worktree add --detach existing_empty master\n+\tgit worktree add --detach existing_empty main\n '\n \n test_expect_success '\"add\" using shorthand - fails when no previous branch' '\n@@ -29,7 +29,7 @@ test_expect_success '\"add\" using - shorthand' '\n \techo hello >myworld &&\n \tgit add myworld &&\n \tgit commit -m myworld &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit worktree add short-hand - &&\n \techo refs/heads/newbranch >expect &&\n \tgit -C short-hand rev-parse --symbolic-full-name HEAD >actual &&\n@@ -37,7 +37,7 @@ test_expect_success '\"add\" using - shorthand' '\n '\n \n test_expect_success '\"add\" refuses to checkout locked branch' '\n-\ttest_must_fail git worktree add zere master &&\n+\ttest_must_fail git worktree add zere main &&\n \t! test -d zere &&\n \t! test -d .git/worktrees/zere\n '\n@@ -46,13 +46,13 @@ test_expect_success 'checking out paths not complaining about linked checkouts'\n \t(\n \tcd existing_empty &&\n \techo dirty >>init.t &&\n-\tgit checkout master -- init.t\n+\tgit checkout main -- init.t\n \t)\n '\n \n test_expect_success '\"add\" worktree' '\n \tgit rev-parse HEAD >expect &&\n-\tgit worktree add --detach here master &&\n+\tgit worktree add --detach here main &&\n \t(\n \t\tcd here &&\n \t\ttest_cmp ../init.t init.t &&\n@@ -65,7 +65,7 @@ test_expect_success '\"add\" worktree' '\n \n test_expect_success '\"add\" worktree with lock' '\n \tgit rev-parse HEAD >expect &&\n-\tgit worktree add --detach --lock here-with-lock master &&\n+\tgit worktree add --detach --lock here-with-lock main &&\n \ttest -f .git/worktrees/here-with-lock/locked\n '\n \n@@ -73,7 +73,7 @@ test_expect_success '\"add\" worktree from a subdir' '\n \t(\n \t\tmkdir sub &&\n \t\tcd sub &&\n-\t\tgit worktree add --detach here master &&\n+\t\tgit worktree add --detach here main &&\n \t\tcd here &&\n \t\ttest_cmp ../../init.t init.t\n \t)\n@@ -82,19 +82,19 @@ test_expect_success '\"add\" worktree from a subdir' '\n test_expect_success '\"add\" from a linked checkout' '\n \t(\n \t\tcd here &&\n-\t\tgit worktree add --detach nested-here master &&\n+\t\tgit worktree add --detach nested-here main &&\n \t\tcd nested-here &&\n \t\tgit fsck\n \t)\n '\n \n test_expect_success '\"add\" worktree creating new branch' '\n-\tgit worktree add -b newmaster there master &&\n+\tgit worktree add -b newmain there main &&\n \t(\n \t\tcd there &&\n \t\ttest_cmp ../init.t init.t &&\n \t\tgit symbolic-ref HEAD >actual &&\n-\t\techo refs/heads/newmaster >expect &&\n+\t\techo refs/heads/newmain >expect &&\n \t\ttest_cmp expect actual &&\n \t\tgit fsck\n \t)\n@@ -103,7 +103,7 @@ test_expect_success '\"add\" worktree creating new branch' '\n test_expect_success 'die the same branch is already checked out' '\n \t(\n \t\tcd here &&\n-\t\ttest_must_fail git checkout newmaster\n+\t\ttest_must_fail git checkout newmain\n \t)\n '\n \n@@ -112,20 +112,20 @@ test_expect_success SYMLINKS 'die the same branch is already checked out (symlin\n \tref=$(git -C there symbolic-ref HEAD) &&\n \trm \"$head\" &&\n \tln -s \"$ref\" \"$head\" &&\n-\ttest_must_fail git -C here checkout newmaster\n+\ttest_must_fail git -C here checkout newmain\n '\n \n test_expect_success 'not die the same branch is already checked out' '\n \t(\n \t\tcd here &&\n-\t\tgit worktree add --force anothernewmaster newmaster\n+\t\tgit worktree add --force anothernewmain newmain\n \t)\n '\n \n test_expect_success 'not die on re-checking out current branch' '\n \t(\n \t\tcd there &&\n-\t\tgit checkout newmaster\n+\t\tgit checkout newmain\n \t)\n '\n \n@@ -133,14 +133,14 @@ test_expect_success '\"add\" from a bare repo' '\n \t(\n \t\tgit clone --bare . bare &&\n \t\tcd bare &&\n-\t\tgit worktree add -b bare-master ../there2 master\n+\t\tgit worktree add -b bare-main ../there2 main\n \t)\n '\n \n test_expect_success 'checkout from a bare repo without \"add\"' '\n \t(\n \t\tcd bare &&\n-\t\ttest_must_fail git checkout master\n+\t\ttest_must_fail git checkout main\n \t)\n '\n \n@@ -148,7 +148,7 @@ test_expect_success '\"add\" default branch of a bare repo' '\n \t(\n \t\tgit clone --bare . bare2 &&\n \t\tcd bare2 &&\n-\t\tgit worktree add ../there3 master\n+\t\tgit worktree add ../there3 main\n \t)\n '\n \n@@ -165,7 +165,7 @@ test_expect_success 'checkout with grafts' '\n \tEOF\n \tgit log --format=%s -2 >actual &&\n \ttest_cmp expected actual &&\n-\tgit worktree add --detach grafted master &&\n+\tgit worktree add --detach grafted main &&\n \tgit --git-dir=grafted/.git log --format=%s -2 >actual &&\n \ttest_cmp expected actual\n '\n@@ -226,34 +226,34 @@ test_expect_success '\"add\" no auto-vivify with --detach and <branch> omitted' '\n '\n \n test_expect_success '\"add\" -b/-B mutually exclusive' '\n-\ttest_must_fail git worktree add -b poodle -B poodle bamboo master\n+\ttest_must_fail git worktree add -b poodle -B poodle bamboo main\n '\n \n test_expect_success '\"add\" -b/--detach mutually exclusive' '\n-\ttest_must_fail git worktree add -b poodle --detach bamboo master\n+\ttest_must_fail git worktree add -b poodle --detach bamboo main\n '\n \n test_expect_success '\"add\" -B/--detach mutually exclusive' '\n-\ttest_must_fail git worktree add -B poodle --detach bamboo master\n+\ttest_must_fail git worktree add -B poodle --detach bamboo main\n '\n \n test_expect_success '\"add -B\" fails if the branch is checked out' '\n-\tgit rev-parse newmaster >before &&\n-\ttest_must_fail git worktree add -B newmaster bamboo master &&\n-\tgit rev-parse newmaster >after &&\n+\tgit rev-parse newmain >before &&\n+\ttest_must_fail git worktree add -B newmain bamboo main &&\n+\tgit rev-parse newmain >after &&\n \ttest_cmp before after\n '\n \n test_expect_success 'add -B' '\n-\tgit worktree add -B poodle bamboo2 master^ &&\n+\tgit worktree add -B poodle bamboo2 main^ &&\n \tgit -C bamboo2 symbolic-ref HEAD >actual &&\n \techo refs/heads/poodle >expected &&\n \ttest_cmp expected actual &&\n-\ttest_cmp_rev master^ poodle\n+\ttest_cmp_rev main^ poodle\n '\n \n test_expect_success 'add --quiet' '\n-\tgit worktree add --quiet another-worktree master 2>actual &&\n+\tgit worktree add --quiet another-worktree main 2>actual &&\n \ttest_must_be_empty actual\n '\n \n@@ -348,24 +348,24 @@ test_branch_upstream () {\n \n test_expect_success '--track sets up tracking' '\n \ttest_when_finished rm -rf track &&\n-\tgit worktree add --track -b track track master &&\n-\ttest_branch_upstream track . master\n+\tgit worktree add --track -b track track main &&\n+\ttest_branch_upstream track . main\n '\n \n # setup remote repository $1 and repository $2 with $1 set up as\n-# remote.  The remote has two branches, master and foo.\n+# remote.  The remote has two branches, main and foo.\n setup_remote_repo () {\n \tgit init $1 &&\n \t(\n \t\tcd $1 &&\n-\t\ttest_commit $1_master &&\n+\t\ttest_commit $1_main &&\n \t\tgit checkout -b foo &&\n \t\ttest_commit upstream_foo\n \t) &&\n \tgit init $2 &&\n \t(\n \t\tcd $2 &&\n-\t\ttest_commit $2_master &&\n+\t\ttest_commit $2_main &&\n \t\tgit remote add $1 ../$1 &&\n \t\tgit config remote.$1.fetch \\\n \t\t\t\"refs/heads/*:refs/remotes/$1/*\" &&\ndiff --git a/t/t2401-worktree-prune.sh b/t/t2401-worktree-prune.sh\nindex a6ce7f590b..7a2ff04f44 100755\n--- a/t/t2401-worktree-prune.sh\n+++ b/t/t2401-worktree-prune.sh\n@@ -87,7 +87,7 @@ test_expect_success 'not prune recent checkouts' '\n \n test_expect_success 'not prune proper checkouts' '\n \ttest_when_finished rm -r .git/worktrees &&\n-\tgit worktree add --detach \"$PWD/nop\" master &&\n+\tgit worktree add --detach \"$PWD/nop\" main &&\n \tgit worktree prune &&\n \ttest -d .git/worktrees/nop\n '\ndiff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh\nindex 795ddca2e4..03603d0dd0 100755\n--- a/t/t2402-worktree-list.sh\n+++ b/t/t2402-worktree-list.sh\n@@ -21,7 +21,7 @@ test_expect_success 'rev-parse --git-common-dir on main worktree' '\n test_expect_success 'rev-parse --git-path objects linked worktree' '\n \techo \"$(git rev-parse --show-toplevel)/.git/objects\" >expect &&\n \ttest_when_finished \"rm -rf linked-tree actual expect && git worktree prune\" &&\n-\tgit worktree add --detach linked-tree master &&\n+\tgit worktree add --detach linked-tree main &&\n \tgit -C linked-tree rev-parse --git-path objects >actual &&\n \ttest_cmp expect actual\n '\n@@ -29,7 +29,7 @@ test_expect_success 'rev-parse --git-path objects linked worktree' '\n test_expect_success '\"list\" all worktrees from main' '\n \techo \"$(git rev-parse --show-toplevel) $(git rev-parse --short HEAD) [$(git symbolic-ref --short HEAD)]\" >expect &&\n \ttest_when_finished \"rm -rf here out actual expect && git worktree prune\" &&\n-\tgit worktree add --detach here master &&\n+\tgit worktree add --detach here main &&\n \techo \"$(git -C here rev-parse --show-toplevel) $(git rev-parse --short HEAD) (detached HEAD)\" >>expect &&\n \tgit worktree list >out &&\n \tsed \"s/  */ /g\" <out >actual &&\n@@ -39,7 +39,7 @@ test_expect_success '\"list\" all worktrees from main' '\n test_expect_success '\"list\" all worktrees from linked' '\n \techo \"$(git rev-parse --show-toplevel) $(git rev-parse --short HEAD) [$(git symbolic-ref --short HEAD)]\" >expect &&\n \ttest_when_finished \"rm -rf here out actual expect && git worktree prune\" &&\n-\tgit worktree add --detach here master &&\n+\tgit worktree add --detach here main &&\n \techo \"$(git -C here rev-parse --show-toplevel) $(git rev-parse --short HEAD) (detached HEAD)\" >>expect &&\n \tgit -C here worktree list >out &&\n \tsed \"s/  */ /g\" <out >actual &&\n@@ -52,7 +52,7 @@ test_expect_success '\"list\" all worktrees --porcelain' '\n \techo \"branch $(git symbolic-ref HEAD)\" >>expect &&\n \techo >>expect &&\n \ttest_when_finished \"rm -rf here actual expect && git worktree prune\" &&\n-\tgit worktree add --detach here master &&\n+\tgit worktree add --detach here main &&\n \techo \"worktree $(git -C here rev-parse --show-toplevel)\" >>expect &&\n \techo \"HEAD $(git rev-parse HEAD)\" >>expect &&\n \techo \"detached\" >>expect &&\n@@ -63,8 +63,8 @@ test_expect_success '\"list\" all worktrees --porcelain' '\n \n test_expect_success '\"list\" all worktrees with locked annotation' '\n \ttest_when_finished \"rm -rf locked unlocked out && git worktree prune\" &&\n-\tgit worktree add --detach locked master &&\n-\tgit worktree add --detach unlocked master &&\n+\tgit worktree add --detach locked main &&\n+\tgit worktree add --detach unlocked main &&\n \tgit worktree lock locked &&\n \tgit worktree list >out &&\n \tgrep \"/locked  *[0-9a-f].* locked$\" out &&\n@@ -76,13 +76,13 @@ test_expect_success 'bare repo setup' '\n \techo \"data\" >file1 &&\n \tgit add file1 &&\n \tgit commit -m\"File1: add data\" &&\n-\tgit push bare1 master &&\n+\tgit push bare1 main &&\n \tgit reset --hard HEAD^\n '\n \n test_expect_success '\"list\" all worktrees from bare main' '\n \ttest_when_finished \"rm -rf there out actual expect && git -C bare1 worktree prune\" &&\n-\tgit -C bare1 worktree add --detach ../there master &&\n+\tgit -C bare1 worktree add --detach ../there main &&\n \techo \"$(pwd)/bare1 (bare)\" >expect &&\n \techo \"$(git -C there rev-parse --show-toplevel) $(git -C there rev-parse --short HEAD) (detached HEAD)\" >>expect &&\n \tgit -C bare1 worktree list >out &&\n@@ -92,7 +92,7 @@ test_expect_success '\"list\" all worktrees from bare main' '\n \n test_expect_success '\"list\" all worktrees --porcelain from bare main' '\n \ttest_when_finished \"rm -rf there actual expect && git -C bare1 worktree prune\" &&\n-\tgit -C bare1 worktree add --detach ../there master &&\n+\tgit -C bare1 worktree add --detach ../there main &&\n \techo \"worktree $(pwd)/bare1\" >expect &&\n \techo \"bare\" >>expect &&\n \techo >>expect &&\n@@ -106,7 +106,7 @@ test_expect_success '\"list\" all worktrees --porcelain from bare main' '\n \n test_expect_success '\"list\" all worktrees from linked with a bare main' '\n \ttest_when_finished \"rm -rf there out actual expect && git -C bare1 worktree prune\" &&\n-\tgit -C bare1 worktree add --detach ../there master &&\n+\tgit -C bare1 worktree add --detach ../there main &&\n \techo \"$(pwd)/bare1 (bare)\" >expect &&\n \techo \"$(git -C there rev-parse --show-toplevel) $(git -C there rev-parse --short HEAD) (detached HEAD)\" >>expect &&\n \tgit -C there worktree list >out &&\ndiff --git a/t/t2405-worktree-submodule.sh b/t/t2405-worktree-submodule.sh\nindex e1b2bfd87e..ccc47fae97 100755\n--- a/t/t2405-worktree-submodule.sh\n+++ b/t/t2405-worktree-submodule.sh\n@@ -31,7 +31,7 @@ test_expect_success 'add superproject worktree' '\n '\n \n test_expect_failure 'submodule is checked out just after worktree add' '\n-\tgit -C worktree diff --submodule master\"^!\" >out &&\n+\tgit -C worktree diff --submodule main\"^!\" >out &&\n \tgrep \"file1 updated\" out\n '\n \n@@ -41,7 +41,7 @@ test_expect_success 'add superproject worktree and initialize submodules' '\n '\n \n test_expect_success 'submodule is checked out just after submodule update in linked worktree' '\n-\tgit -C worktree-submodule-update diff --submodule master\"^!\" >out &&\n+\tgit -C worktree-submodule-update diff --submodule main\"^!\" >out &&\n \tgrep \"file1 updated\" out\n '\n \n@@ -51,7 +51,7 @@ test_expect_success 'add superproject worktree and manually add submodule worktr\n '\n \n test_expect_success 'submodule is checked out after manually adding submodule worktree' '\n-\tgit -C linked_submodule diff --submodule master\"^!\" >out &&\n+\tgit -C linked_submodule diff --submodule main\"^!\" >out &&\n \tgrep \"file1 updated\" out\n '\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 126004e342..3bb6675390 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,7 +257,7 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-[01]*)\n+[0-2]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410113","messageId":"b8fa037791683b50c3efb01aa6ac0d3f7b888a2b.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 02/27] t[01]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:02Z","receivedAt":"2020-11-17T16:12:59Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -e 's/naster/nain/g' -- t[01]*.sh)\n\nNote that t5533 contains a variation of the name `master` (`naster`)\nthat we rename here, too.\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nHelped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t0002-gitfile.sh                   |  6 +--\n t/t0020-crlf.sh                      |  8 ++--\n t/t0021-conversion.sh                | 40 ++++++++--------\n t/t0027-auto-crlf.sh                 |  4 +-\n t/t0028-working-tree-encoding.sh     |  4 +-\n t/t0041-usage.sh                     | 10 ++--\n t/t0050-filesystem.sh                |  6 +--\n t/t0060-path-utils.sh                |  4 +-\n t/t0100-previous.sh                  | 18 ++++----\n t/t1004-read-tree-m-u-wf.sh          | 40 ++++++++--------\n t/t1008-read-tree-overlay.sh         |  2 +-\n t/t1009-read-tree-new-index.sh       |  4 +-\n t/t1011-read-tree-sparse-checkout.sh |  2 +-\n t/t1021-rerere-in-workdir.sh         |  2 +-\n t/t1090-sparse-checkout-scope.sh     | 10 ++--\n t/t1091-sparse-checkout-builtin.sh   |  2 +-\n t/t1300-config.sh                    |  8 ++--\n t/t1301-shared-repo.sh               |  4 +-\n t/t1305-config-include.sh            |  2 +-\n t/t1309-early-config.sh              |  4 +-\n t/t1400-update-ref.sh                | 68 ++++++++++++++--------------\n t/t1402-check-ref-format.sh          | 32 ++++++-------\n t/t1403-show-ref.sh                  | 18 ++++----\n t/t1405-main-ref-store.sh            | 42 ++++++++---------\n t/t1406-submodule-ref-store.sh       | 30 ++++++------\n t/t1407-worktree-ref-store.sh        | 32 ++++++-------\n t/t1408-packed-refs.sh               | 12 ++---\n t/t1410-reflog.sh                    | 56 +++++++++++------------\n t/t1411-reflog-show.sh               |  2 +-\n t/t1413-reflog-detach.sh             | 24 +++++-----\n t/t1414-reflog-walk.sh               | 12 ++---\n t/t1416-ref-transaction-hooks.sh     | 10 ++--\n t/t1430-bad-ref-name.sh              | 52 ++++++++++-----------\n t/t1450-fsck.sh                      |  2 +-\n t/t1500-rev-parse.sh                 |  4 +-\n t/t1503-rev-parse-verify.sh          | 28 ++++++------\n t/t1505-rev-parse-last.sh            |  8 ++--\n t/t1506-rev-parse-diagnosis.sh       |  4 +-\n t/t1507-rev-parse-upstream.sh        | 40 ++++++++--------\n t/t1508-at-combinations.sh           | 10 ++--\n t/t1511-rev-parse-caret.sh           | 26 +++++------\n t/t1512-rev-parse-disambiguation.sh  |  2 +-\n t/t1513-rev-parse-prefix.sh          |  4 +-\n t/t1514-rev-parse-push.sh            | 16 +++----\n t/t1700-split-index.sh               |  2 +-\n t/test-lib.sh                        |  7 +++\n 46 files changed, 365 insertions(+), 358 deletions(-)\n\ndiff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh\nindex 960ed150cb..bbcfc8a0b5 100755\n--- a/t/t0002-gitfile.sh\n+++ b/t/t0002-gitfile.sh\n@@ -96,7 +96,7 @@ test_expect_success 'enter_repo non-strict mode' '\n \tgit ls-remote enter_repo >actual &&\n \tcat >expected <<-EOF &&\n \t$head\tHEAD\n-\t$head\trefs/heads/master\n+\t$head\trefs/heads/main\n \t$head\trefs/tags/foo\n \tEOF\n \ttest_cmp expected actual\n@@ -111,7 +111,7 @@ test_expect_success 'enter_repo linked checkout' '\n \tgit ls-remote foo >actual &&\n \tcat >expected <<-EOF &&\n \t$head\tHEAD\n-\t$head\trefs/heads/master\n+\t$head\trefs/heads/main\n \t$head\trefs/tags/foo\n \tEOF\n \ttest_cmp expected actual\n@@ -122,7 +122,7 @@ test_expect_success 'enter_repo strict mode' '\n \tgit ls-remote --upload-pack=\"git upload-pack --strict\" foo/.git >actual &&\n \tcat >expected <<-EOF &&\n \t$head\tHEAD\n-\t$head\trefs/heads/master\n+\t$head\trefs/heads/main\n \t$head\trefs/tags/foo\n \tEOF\n \ttest_cmp expected actual\ndiff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh\nindex b63ba62e5d..04bf4b1e82 100755\n--- a/t/t0020-crlf.sh\n+++ b/t/t0020-crlf.sh\n@@ -318,8 +318,8 @@ test_expect_success 'checkout with existing .gitattributes' '\n \tgit add .gitattributes .file &&\n \tgit commit -m second &&\n \n-\tgit checkout master~1 &&\n-\tgit checkout master &&\n+\tgit checkout main~1 &&\n+\tgit checkout main &&\n \ttest \"$(git diff-files --raw)\" = \"\"\n \n '\n@@ -331,8 +331,8 @@ test_expect_success 'checkout when deleting .gitattributes' '\n \tgit add .file2 &&\n \tgit commit -m third &&\n \n-\tgit checkout master~1 &&\n-\tgit checkout master &&\n+\tgit checkout main~1 &&\n+\tgit checkout main &&\n \thas_cr .file2\n \n '\ndiff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh\nindex f6deaf498b..d0eeca4556 100755\n--- a/t/t0021-conversion.sh\n+++ b/t/t0021-conversion.sh\n@@ -378,8 +378,8 @@ test_expect_success PERL 'required process filter should filter data' '\n \t\ttest_cmp_count expected.log debug.log &&\n \n \t\tgit commit -m \"test commit 2\" &&\n-\t\tMASTER=$(git rev-parse --verify master) &&\n-\t\tMETA=\"ref=refs/heads/master treeish=$MASTER\" &&\n+\t\tMAIN=$(git rev-parse --verify main) &&\n+\t\tMETA=\"ref=refs/heads/main treeish=$MAIN\" &&\n \t\trm -f test2.r \"testsubdir/test3 '\\''sq'\\'',\\$x=.r\" &&\n \n \t\tfilter_git checkout --quiet --no-progress . &&\n@@ -404,7 +404,7 @@ test_expect_success PERL 'required process filter should filter data' '\n \t\tEOF\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n-\t\tfilter_git checkout --quiet --no-progress master &&\n+\t\tfilter_git checkout --quiet --no-progress main &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -436,15 +436,15 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\tM3=$(git hash-object \"testsubdir/test3 '\\''sq'\\'',\\$x=.r\") &&\n \t\tEMPTY=$(git hash-object /dev/null) &&\n \n-\t\tMASTER=$(git rev-parse --verify master) &&\n+\t\tMAIN=$(git rev-parse --verify main) &&\n \n \t\tcp \"$TEST_ROOT/test.o\" test5.r &&\n \t\tgit add test5.r &&\n \t\tgit commit -m \"test commit 3\" &&\n \t\tgit checkout empty-branch &&\n-\t\tfilter_git rebase --onto empty-branch master^^ master &&\n-\t\tMASTER2=$(git rev-parse --verify master) &&\n-\t\tMETA=\"ref=refs/heads/master treeish=$MASTER2\" &&\n+\t\tfilter_git rebase --onto empty-branch main^^ main &&\n+\t\tMAIN2=$(git rev-parse --verify main) &&\n+\t\tMETA=\"ref=refs/heads/main treeish=$MAIN2\" &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -458,8 +458,8 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n \t\tgit reset --hard empty-branch &&\n-\t\tfilter_git reset --hard $MASTER &&\n-\t\tMETA=\"treeish=$MASTER\" &&\n+\t\tfilter_git reset --hard $MAIN &&\n+\t\tMETA=\"treeish=$MAIN\" &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -471,10 +471,10 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\tEOF\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n-\t\tgit branch old-master $MASTER &&\n+\t\tgit branch old-main $MAIN &&\n \t\tgit reset --hard empty-branch &&\n-\t\tfilter_git reset --hard old-master &&\n-\t\tMETA=\"ref=refs/heads/old-master treeish=$MASTER\" &&\n+\t\tfilter_git reset --hard old-main &&\n+\t\tMETA=\"ref=refs/heads/old-main treeish=$MAIN\" &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -487,9 +487,9 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n \t\tgit checkout -b merge empty-branch &&\n-\t\tgit branch -f master $MASTER2 &&\n-\t\tfilter_git merge master &&\n-\t\tMETA=\"treeish=$MASTER2\" &&\n+\t\tgit branch -f main $MAIN2 &&\n+\t\tfilter_git merge main &&\n+\t\tMETA=\"treeish=$MAIN2\" &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -502,8 +502,8 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\tEOF\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n-\t\tfilter_git archive master >/dev/null &&\n-\t\tMETA=\"ref=refs/heads/master treeish=$MASTER2\" &&\n+\t\tfilter_git archive main >/dev/null &&\n+\t\tMETA=\"ref=refs/heads/main treeish=$MAIN2\" &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -516,7 +516,7 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\tEOF\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n-\t\tTREE=\"$(git rev-parse $MASTER2^{tree})\" &&\n+\t\tTREE=\"$(git rev-parse $MAIN2^{tree})\" &&\n \t\tfilter_git archive $TREE >/dev/null &&\n \t\tMETA=\"treeish=$TREE\" &&\n \t\tcat >expected.log <<-EOF &&\n@@ -856,8 +856,8 @@ test_expect_success PERL 'delayed checkout in process filter' '\n \t) &&\n \n \tS=$(test_file_size \"$TEST_ROOT/test.o\") &&\n-\tPM=\"ref=refs/heads/master treeish=$(git -C repo rev-parse --verify master) \" &&\n-\tM=\"${PM}blob=$(git -C repo rev-parse --verify master:test.a)\" &&\n+\tPM=\"ref=refs/heads/main treeish=$(git -C repo rev-parse --verify main) \" &&\n+\tM=\"${PM}blob=$(git -C repo rev-parse --verify main:test.a)\" &&\n \tcat >a.exp <<-EOF &&\n \t\tSTART\n \t\tinit handshake complete\ndiff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh\nindex 9fcd56fab3..51f74a3ddf 100755\n--- a/t/t0027-auto-crlf.sh\n+++ b/t/t0027-auto-crlf.sh\n@@ -368,9 +368,9 @@ test_expect_success 'ls-files --eol -o Text/Binary' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'setup master' '\n+test_expect_success 'setup main' '\n \techo >.gitattributes &&\n-\tgit checkout -b master &&\n+\tgit checkout -b main &&\n \tgit add .gitattributes &&\n \tgit commit -m \"add .gitattributes\" . &&\n \tprintf \"\\$Id: 0000000000000000000000000000000000000000 \\$\\nLINEONE\\nLINETWO\\nLINETHREE\"     >LF &&\ndiff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh\nindex bfc4fb9af5..9c48037884 100755\n--- a/t/t0028-working-tree-encoding.sh\n+++ b/t/t0028-working-tree-encoding.sh\n@@ -215,7 +215,7 @@ test_expect_success 'error if encoding round trip is not the same during refresh\n \tTEST_HASH=$(git hash-object --no-filters -w nonsense.utf16le) &&\n \tgit update-index --add --cacheinfo 100644 $TEST_HASH nonsense.utf16le &&\n \tCOMMIT=$(git commit-tree -p $(git rev-parse HEAD) -m \"plain commit\" $(git write-tree)) &&\n-\tgit update-ref refs/heads/master $COMMIT &&\n+\tgit update-ref refs/heads/main $COMMIT &&\n \n \ttest_must_fail git checkout HEAD^ 2>err.out &&\n \ttest_i18ngrep \"error: .* overwritten by checkout:\" err.out\n@@ -231,7 +231,7 @@ test_expect_success 'error if encoding garbage is already in Git' '\n \tTEST_HASH=$(git hash-object --no-filters -w nonsense.utf16) &&\n \tgit update-index --add --cacheinfo 100644 $TEST_HASH nonsense.utf16 &&\n \tCOMMIT=$(git commit-tree -p $(git rev-parse HEAD) -m \"plain commit\" $(git write-tree)) &&\n-\tgit update-ref refs/heads/master $COMMIT &&\n+\tgit update-ref refs/heads/main $COMMIT &&\n \n \tgit diff 2>err.out &&\n \ttest_i18ngrep \"error: BOM is required\" err.out\ndiff --git a/t/t0041-usage.sh b/t/t0041-usage.sh\nindex 5b927b76fe..6f93450597 100755\n--- a/t/t0041-usage.sh\n+++ b/t/t0041-usage.sh\n@@ -41,8 +41,8 @@ test_expect_success 'tag usage error' '\n '\n \n test_expect_success 'branch --contains <existent_commit>' '\n-\tgit branch --contains \"master\" >actual 2>actual.err &&\n-\ttest_i18ngrep \"master\" actual &&\n+\tgit branch --contains \"main\" >actual 2>actual.err &&\n+\ttest_i18ngrep \"main\" actual &&\n \ttest_line_count = 0 actual.err\n '\n \n@@ -54,7 +54,7 @@ test_expect_success 'branch --contains <inexistent_commit>' '\n '\n \n test_expect_success 'branch --no-contains <existent_commit>' '\n-\tgit branch --no-contains \"master\" >actual 2>actual.err &&\n+\tgit branch --no-contains \"main\" >actual 2>actual.err &&\n \ttest_line_count = 0 actual &&\n \ttest_line_count = 0 actual.err\n '\n@@ -73,7 +73,7 @@ test_expect_success 'branch usage error' '\n '\n \n test_expect_success 'for-each-ref --contains <existent_object>' '\n-\tgit for-each-ref --contains \"master\" >actual 2>actual.err &&\n+\tgit for-each-ref --contains \"main\" >actual 2>actual.err &&\n \ttest_line_count = 2 actual &&\n \ttest_line_count = 0 actual.err\n '\n@@ -86,7 +86,7 @@ test_expect_success 'for-each-ref --contains <inexistent_object>' '\n '\n \n test_expect_success 'for-each-ref --no-contains <existent_object>' '\n-\tgit for-each-ref --no-contains \"master\" >actual 2>actual.err &&\n+\tgit for-each-ref --no-contains \"main\" >actual 2>actual.err &&\n \ttest_line_count = 0 actual &&\n \ttest_line_count = 0 actual.err\n '\ndiff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh\nindex 608673fb77..e3412b896b 100755\n--- a/t/t0050-filesystem.sh\n+++ b/t/t0050-filesystem.sh\n@@ -65,7 +65,7 @@ test_expect_success \"setup case tests\" '\n \tgit mv camelcase tmp &&\n \tgit mv tmp CamelCase &&\n \tgit commit -m \"rename\" &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'rename (case change)' '\n@@ -118,7 +118,7 @@ test_expect_success \"setup unicode normalization tests\" '\n \tgit mv $aumlcdiar tmp &&\n \tgit mv tmp \"$auml\" &&\n \tgit commit -m rename &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n $test_unicode 'rename (silent unicode normalization)' '\n@@ -147,7 +147,7 @@ test_expect_success CASE_INSENSITIVE_FS 'checkout with no pathspec and a case in\n \t\tgit add gitweb &&\n \t\tgit commit -m \"add gitweb/subdir/file\" &&\n \n-\t\tgit checkout master\n+\t\tgit checkout main\n \t)\n '\n \ndiff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh\nindex 928eebbdc0..fab077b6f7 100755\n--- a/t/t0060-path-utils.sh\n+++ b/t/t0060-path-utils.sh\n@@ -312,8 +312,8 @@ test_git_path GIT_COMMON_DIR=bar info/sparse-checkout     .git/info/sparse-check\n test_git_path GIT_COMMON_DIR=bar info//sparse-checkout    .git/info//sparse-checkout\n test_git_path GIT_COMMON_DIR=bar remotes/bar              bar/remotes/bar\n test_git_path GIT_COMMON_DIR=bar branches/bar             bar/branches/bar\n-test_git_path GIT_COMMON_DIR=bar logs/refs/heads/master     bar/logs/refs/heads/master\n-test_git_path GIT_COMMON_DIR=bar refs/heads/master          bar/refs/heads/master\n+test_git_path GIT_COMMON_DIR=bar logs/refs/heads/main     bar/logs/refs/heads/main\n+test_git_path GIT_COMMON_DIR=bar refs/heads/main          bar/refs/heads/main\n test_git_path GIT_COMMON_DIR=bar refs/bisect/foo          .git/refs/bisect/foo\n test_git_path GIT_COMMON_DIR=bar hooks/me                 bar/hooks/me\n test_git_path GIT_COMMON_DIR=bar config                   bar/config\ndiff --git a/t/t0100-previous.sh b/t/t0100-previous.sh\nindex 58c0b7e9b6..dfb367b720 100755\n--- a/t/t0100-previous.sh\n+++ b/t/t0100-previous.sh\n@@ -8,7 +8,7 @@ test_expect_success 'branch -d @{-1}' '\n \ttest_commit A &&\n \tgit checkout -b junk &&\n \tgit checkout - &&\n-\ttest \"$(git symbolic-ref HEAD)\" = refs/heads/master &&\n+\ttest \"$(git symbolic-ref HEAD)\" = refs/heads/main &&\n \tgit branch -d @{-1} &&\n \ttest_must_fail git rev-parse --verify refs/heads/junk\n '\n@@ -17,9 +17,9 @@ test_expect_success 'branch -d @{-12} when there is not enough switches yet' '\n \tgit reflog expire --expire=now &&\n \tgit checkout -b junk2 &&\n \tgit checkout - &&\n-\ttest \"$(git symbolic-ref HEAD)\" = refs/heads/master &&\n+\ttest \"$(git symbolic-ref HEAD)\" = refs/heads/main &&\n \ttest_must_fail git branch -d @{-12} &&\n-\tgit rev-parse --verify refs/heads/master\n+\tgit rev-parse --verify refs/heads/main\n '\n \n test_expect_success 'merge @{-1}' '\n@@ -28,19 +28,19 @@ test_expect_success 'merge @{-1}' '\n \tgit checkout A &&\n \ttest_commit C &&\n \ttest_commit D &&\n-\tgit branch -f master B &&\n+\tgit branch -f main B &&\n \tgit branch -f other &&\n \tgit checkout other &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge @{-1} &&\n \tgit cat-file commit HEAD | grep \"Merge branch '\\''other'\\''\"\n '\n \n test_expect_success 'merge @{-1}~1' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard B &&\n \tgit checkout other &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge @{-1}~1 &&\n \tgit cat-file commit HEAD >actual &&\n \tgrep \"Merge branch '\\''other'\\''\" actual\n@@ -48,11 +48,11 @@ test_expect_success 'merge @{-1}~1' '\n \n test_expect_success 'merge @{-100} before checking out that many branches yet' '\n \tgit reflog expire --expire=now &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard B &&\n \tgit branch -f other C &&\n \tgit checkout other &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git merge @{-100}\n '\n \ndiff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh\nindex 181956b241..c8a81f180f 100755\n--- a/t/t1004-read-tree-m-u-wf.sh\n+++ b/t/t1004-read-tree-m-u-wf.sh\n@@ -20,17 +20,17 @@ test_expect_success 'two-way setup' '\n \tgit branch side &&\n \tgit tag -f branch-point &&\n \n-\techo file2 is not tracked on the master branch anymore &&\n+\techo file2 is not tracked on the main branch anymore &&\n \trm -f file2 subdir/file2 &&\n \tgit update-index --remove file2 subdir/file2 &&\n-\tgit commit -a -m \"master removes file2 and subdir/file2\"\n+\tgit commit -a -m \"main removes file2 and subdir/file2\"\n '\n \n test_expect_success 'two-way not clobbering' '\n \n-\techo >file2 master creates untracked file2 &&\n-\techo >subdir/file2 master creates untracked subdir/file2 &&\n-\tif err=$(read_tree_u_must_succeed -m -u master side 2>&1)\n+\techo >file2 main creates untracked file2 &&\n+\techo >subdir/file2 main creates untracked subdir/file2 &&\n+\tif err=$(read_tree_u_must_succeed -m -u main side 2>&1)\n \tthen\n \t\techo should have complained\n \t\tfalse\n@@ -43,7 +43,7 @@ echo file2 >.gitignore\n \n test_expect_success 'two-way with incorrect --exclude-per-directory (1)' '\n \n-\tif err=$(read_tree_u_must_succeed -m --exclude-per-directory=.gitignore master side 2>&1)\n+\tif err=$(read_tree_u_must_succeed -m --exclude-per-directory=.gitignore main side 2>&1)\n \tthen\n \t\techo should have complained\n \t\tfalse\n@@ -54,7 +54,7 @@ test_expect_success 'two-way with incorrect --exclude-per-directory (1)' '\n \n test_expect_success 'two-way with incorrect --exclude-per-directory (2)' '\n \n-\tif err=$(read_tree_u_must_succeed -m -u --exclude-per-directory=foo --exclude-per-directory=.gitignore master side 2>&1)\n+\tif err=$(read_tree_u_must_succeed -m -u --exclude-per-directory=foo --exclude-per-directory=.gitignore main side 2>&1)\n \tthen\n \t\techo should have complained\n \t\tfalse\n@@ -65,7 +65,7 @@ test_expect_success 'two-way with incorrect --exclude-per-directory (2)' '\n \n test_expect_success 'two-way clobbering a ignored file' '\n \n-\tread_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore master side\n+\tread_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore main side\n '\n \n rm -f .gitignore\n@@ -81,21 +81,21 @@ test_expect_success 'three-way not complaining on an untracked path in both' '\n \tgit update-index --add file3 subdir/file3 &&\n \tgit commit -a -m \"side adds file3 and removes file2\" &&\n \n-\tgit checkout master &&\n-\techo >file2 file two is untracked on the master side &&\n-\techo >subdir/file2 file two is untracked on the master side &&\n+\tgit checkout main &&\n+\techo >file2 file two is untracked on the main side &&\n+\techo >subdir/file2 file two is untracked on the main side &&\n \n-\tread_tree_u_must_succeed -m -u branch-point master side\n+\tread_tree_u_must_succeed -m -u branch-point main side\n '\n \n test_expect_success 'three-way not clobbering a working tree file' '\n \n \tgit reset --hard &&\n \trm -f file2 subdir/file2 file3 subdir/file3 &&\n-\tgit checkout master &&\n-\techo >file3 file three created in master, untracked &&\n-\techo >subdir/file3 file three created in master, untracked &&\n-\tif err=$(read_tree_u_must_succeed -m -u branch-point master side 2>&1)\n+\tgit checkout main &&\n+\techo >file3 file three created in main, untracked &&\n+\techo >subdir/file3 file three created in main, untracked &&\n+\tif err=$(read_tree_u_must_succeed -m -u branch-point main side 2>&1)\n \tthen\n \t\techo should have complained\n \t\tfalse\n@@ -110,11 +110,11 @@ test_expect_success 'three-way not complaining on an untracked file' '\n \n \tgit reset --hard &&\n \trm -f file2 subdir/file2 file3 subdir/file3 &&\n-\tgit checkout master &&\n-\techo >file3 file three created in master, untracked &&\n-\techo >subdir/file3 file three created in master, untracked &&\n+\tgit checkout main &&\n+\techo >file3 file three created in main, untracked &&\n+\techo >subdir/file3 file three created in main, untracked &&\n \n-\tread_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore branch-point master side\n+\tread_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore branch-point main side\n '\n \n test_expect_success '3-way not overwriting local changes (setup)' '\ndiff --git a/t/t1008-read-tree-overlay.sh b/t/t1008-read-tree-overlay.sh\nindex cf96016844..2a757bd6d5 100755\n--- a/t/t1008-read-tree-overlay.sh\n+++ b/t/t1008-read-tree-overlay.sh\n@@ -22,7 +22,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'multi-read' '\n-\tread_tree_must_succeed initial master side &&\n+\tread_tree_must_succeed initial main side &&\n \ttest_write_lines a b/c >expect &&\n \tgit ls-files >actual &&\n \ttest_cmp expect actual\ndiff --git a/t/t1009-read-tree-new-index.sh b/t/t1009-read-tree-new-index.sh\nindex 59b3aa4bc4..7302adfb20 100755\n--- a/t/t1009-read-tree-new-index.sh\n+++ b/t/t1009-read-tree-new-index.sh\n@@ -12,13 +12,13 @@ test_expect_success setup '\n \n test_expect_success 'non-existent index file' '\n \trm -f new-index &&\n-\tGIT_INDEX_FILE=new-index git read-tree master\n+\tGIT_INDEX_FILE=new-index git read-tree main\n '\n \n test_expect_success 'empty index file' '\n \trm -f new-index &&\n \t> new-index &&\n-\tGIT_INDEX_FILE=new-index git read-tree master\n+\tGIT_INDEX_FILE=new-index git read-tree main\n '\n \n test_done\ndiff --git a/t/t1011-read-tree-sparse-checkout.sh b/t/t1011-read-tree-sparse-checkout.sh\nindex 140f459977..dfe9794a74 100755\n--- a/t/t1011-read-tree-sparse-checkout.sh\n+++ b/t/t1011-read-tree-sparse-checkout.sh\n@@ -2,7 +2,7 @@\n \n test_description='sparse checkout tests\n \n-* (tag: removed, master) removed\n+* (tag: removed, main) removed\n | D\tsub/added\n * (HEAD, tag: top) modified and added\n | M\tinit.t\ndiff --git a/t/t1021-rerere-in-workdir.sh b/t/t1021-rerere-in-workdir.sh\nindex 301e071ff7..a32b4a50e0 100755\n--- a/t/t1021-rerere-in-workdir.sh\n+++ b/t/t1021-rerere-in-workdir.sh\n@@ -19,7 +19,7 @@ test_expect_success SYMLINKS setup '\n \ttest_tick &&\n \tgit commit -a -m goodbye &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success SYMLINKS 'rerere in workdir' '\ndiff --git a/t/t1090-sparse-checkout-scope.sh b/t/t1090-sparse-checkout-scope.sh\nindex f35a73dd20..6c253fd526 100755\n--- a/t/t1090-sparse-checkout-scope.sh\n+++ b/t/t1090-sparse-checkout-scope.sh\n@@ -20,18 +20,18 @@ test_expect_success 'create feature branch' '\n \tgit commit -m \"modification\"\n '\n \n-test_expect_success 'perform sparse checkout of master' '\n+test_expect_success 'perform sparse checkout of main' '\n \tgit config --local --bool core.sparsecheckout true &&\n \techo \"!/*\" >.git/info/sparse-checkout &&\n \techo \"/a\" >>.git/info/sparse-checkout &&\n \techo \"/c\" >>.git/info/sparse-checkout &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_path_is_file a &&\n \ttest_path_is_missing b &&\n \ttest_path_is_file c\n '\n \n-test_expect_success 'merge feature branch into sparse checkout of master' '\n+test_expect_success 'merge feature branch into sparse checkout of main' '\n \tgit merge feature &&\n \ttest_path_is_file a &&\n \ttest_path_is_missing b &&\n@@ -39,10 +39,10 @@ test_expect_success 'merge feature branch into sparse checkout of master' '\n \ttest \"$(cat c)\" = \"modified\"\n '\n \n-test_expect_success 'return to full checkout of master' '\n+test_expect_success 'return to full checkout of main' '\n \tgit checkout feature &&\n \techo \"/*\" >.git/info/sparse-checkout &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_path_is_file a &&\n \ttest_path_is_file b &&\n \ttest_path_is_file c &&\ndiff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh\nindex 84acfc48b6..4ee16805bb 100755\n--- a/t/t1091-sparse-checkout-builtin.sh\n+++ b/t/t1091-sparse-checkout-builtin.sh\n@@ -117,7 +117,7 @@ test_expect_success 'interaction with clone --no-checkout (unborn index)' '\n \ttest_path_is_missing clone_no_checkout/.git/index &&\n \n \t# No branch is checked out until we manually switch to one\n-\tgit -C clone_no_checkout switch master &&\n+\tgit -C clone_no_checkout switch main &&\n \ttest_path_is_file clone_no_checkout/.git/index &&\n \tcheck_files clone_no_checkout a folder1\n '\ndiff --git a/t/t1300-config.sh b/t/t1300-config.sh\nindex 825d9a184f..11a8e641da 100755\n--- a/t/t1300-config.sh\n+++ b/t/t1300-config.sh\n@@ -1054,8 +1054,8 @@ test_expect_success 'check split_cmdline return' \"\n \techo foo > foo &&\n \tgit add foo &&\n \tgit commit -m 'initial commit' &&\n-\tgit config branch.master.mergeoptions 'echo \\\"' &&\n-\ttest_must_fail git merge master\n+\tgit config branch.main.mergeoptions 'echo \\\"' &&\n+\ttest_must_fail git merge main\n \"\n \n test_expect_success 'git -c \"key=value\" support' '\n@@ -1769,11 +1769,11 @@ test_expect_success '--show-origin blob' '\n \n test_expect_success '--show-origin blob ref' '\n \tcat >expect <<-\\EOF &&\n-\tblob:master:custom.conf\tuser.custom=true\n+\tblob:main:custom.conf\tuser.custom=true\n \tEOF\n \tgit add \"$CUSTOM_CONFIG_FILE\" &&\n \tgit commit -m \"new config file\" &&\n-\tgit config --blob=master:\"$CUSTOM_CONFIG_FILE\" --show-origin --list >output &&\n+\tgit config --blob=main:\"$CUSTOM_CONFIG_FILE\" --show-origin --list >output &&\n \ttest_cmp expect output\n '\n \ndiff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh\nindex 2dc853d1be..b0236ffe4a 100755\n--- a/t/t1301-shared-repo.sh\n+++ b/t/t1301-shared-repo.sh\n@@ -115,13 +115,13 @@ test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '\n \tumask 077 &&\n \tgit config core.sharedRepository group &&\n \tgit reflog expire --all &&\n-\tactual=\"$(ls -l .git/logs/refs/heads/master)\" &&\n+\tactual=\"$(ls -l .git/logs/refs/heads/main)\" &&\n \tcase \"$actual\" in\n \t-rw-rw-*)\n \t\t: happy\n \t\t;;\n \t*)\n-\t\techo Ooops, .git/logs/refs/heads/master is not 0662 [$actual]\n+\t\techo Ooops, .git/logs/refs/heads/main is not 0662 [$actual]\n \t\tfalse\n \t\t;;\n \tesac\ndiff --git a/t/t1305-config-include.sh b/t/t1305-config-include.sh\nindex f1e1b289f9..938ca17d78 100755\n--- a/t/t1305-config-include.sh\n+++ b/t/t1305-config-include.sh\n@@ -312,7 +312,7 @@ test_expect_success SYMLINKS 'conditional include, gitdir matching symlink, icas\n test_expect_success 'conditional include, onbranch' '\n \techo \"[includeIf \\\"onbranch:foo-branch\\\"]path=bar9\" >>.git/config &&\n \techo \"[test]nine=9\" >.git/bar9 &&\n-\tgit checkout -b master &&\n+\tgit checkout -b main &&\n \ttest_must_fail git config test.nine &&\n \tgit checkout -b foo-branch &&\n \techo 9 >expect &&\ndiff --git a/t/t1309-early-config.sh b/t/t1309-early-config.sh\nindex ebb8e1aecb..598e62eb4c 100755\n--- a/t/t1309-early-config.sh\n+++ b/t/t1309-early-config.sh\n@@ -91,11 +91,11 @@ test_expect_failure 'ignore .git/ with invalid config' '\n \n test_expect_success 'early config and onbranch' '\n \techo \"[broken\" >broken &&\n-\ttest_with_config \"[includeif \\\"onbranch:master\\\"]path=../broken\"\n+\ttest_with_config \"[includeif \\\"onbranch:main\\\"]path=../broken\"\n '\n \n test_expect_success 'onbranch config outside of git repo' '\n-\ttest_config_global includeIf.onbranch:master.path non-existent &&\n+\ttest_config_global includeIf.onbranch:main.path non-existent &&\n \tnongit git help\n '\n \ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex 4c01e08551..3265a8c58e 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -8,7 +8,7 @@ test_description='Test git update-ref and basic ref logging'\n \n Z=$ZERO_OID\n \n-m=refs/heads/master\n+m=refs/heads/main\n n_dir=refs/heads/gu\n n=$n_dir/fixes\n outside=refs/foo\n@@ -258,7 +258,7 @@ test_expect_success \"(not) changed .git/$m\" '\n \t! test $B = $(git show-ref -s --verify $m)\n '\n \n-rm -f .git/logs/refs/heads/master\n+rm -f .git/logs/refs/heads/main\n test_expect_success \"create $m (logged by touch)\" '\n \ttest_config core.logAllRefUpdates false &&\n \tGIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n@@ -294,7 +294,7 @@ test_expect_success 'symref empty directory removal' '\n \tgit branch e1/e2/r1 HEAD &&\n \tgit branch e1/r2 HEAD &&\n \tgit checkout e1/e2/r1 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_path_is_file .git/refs/heads/e1/e2/r1 &&\n \ttest_path_is_file .git/logs/refs/heads/e1/e2/r1 &&\n \tgit update-ref -d HEAD &&\n@@ -358,68 +358,68 @@ test_expect_success 'set up for querying the reflog' '\n ed=\"Thu, 26 May 2005 18:32:00 -0500\"\n gd=\"Thu, 26 May 2005 18:33:00 -0500\"\n ld=\"Thu, 26 May 2005 18:43:00 -0500\"\n-test_expect_success 'Query \"master@{May 25 2005}\" (before history)' '\n+test_expect_success 'Query \"main@{May 25 2005}\" (before history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{May 25 2005}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{May 25 2005}\" >o 2>e &&\n \techo \"$C\" >expect &&\n \ttest_cmp expect o &&\n-\techo \"warning: log for '\\''master'\\'' only goes back to $ed\" >expect &&\n+\techo \"warning: log for '\\''main'\\'' only goes back to $ed\" >expect &&\n \ttest_i18ncmp expect e\n '\n-test_expect_success 'Query master@{2005-05-25} (before history)' '\n+test_expect_success 'Query main@{2005-05-25} (before history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify master@{2005-05-25} >o 2>e &&\n+\tgit rev-parse --verify main@{2005-05-25} >o 2>e &&\n \techo \"$C\" >expect &&\n \ttest_cmp expect o &&\n-\techo \"warning: log for '\\''master'\\'' only goes back to $ed\" >expect &&\n+\techo \"warning: log for '\\''main'\\'' only goes back to $ed\" >expect &&\n \ttest_i18ncmp expect e\n '\n-test_expect_success 'Query \"master@{May 26 2005 23:31:59}\" (1 second before history)' '\n+test_expect_success 'Query \"main@{May 26 2005 23:31:59}\" (1 second before history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{May 26 2005 23:31:59}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{May 26 2005 23:31:59}\" >o 2>e &&\n \techo \"$C\" >expect &&\n \ttest_cmp expect o &&\n-\techo \"warning: log for '\\''master'\\'' only goes back to $ed\" >expect &&\n+\techo \"warning: log for '\\''main'\\'' only goes back to $ed\" >expect &&\n \ttest_i18ncmp expect e\n '\n-test_expect_success 'Query \"master@{May 26 2005 23:32:00}\" (exactly history start)' '\n+test_expect_success 'Query \"main@{May 26 2005 23:32:00}\" (exactly history start)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{May 26 2005 23:32:00}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{May 26 2005 23:32:00}\" >o 2>e &&\n \techo \"$C\" >expect &&\n \ttest_cmp expect o &&\n \ttest_must_be_empty e\n '\n-test_expect_success 'Query \"master@{May 26 2005 23:32:30}\" (first non-creation change)' '\n+test_expect_success 'Query \"main@{May 26 2005 23:32:30}\" (first non-creation change)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{May 26 2005 23:32:30}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{May 26 2005 23:32:30}\" >o 2>e &&\n \techo \"$A\" >expect &&\n \ttest_cmp expect o &&\n \ttest_must_be_empty e\n '\n-test_expect_success 'Query \"master@{2005-05-26 23:33:01}\" (middle of history with gap)' '\n+test_expect_success 'Query \"main@{2005-05-26 23:33:01}\" (middle of history with gap)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{2005-05-26 23:33:01}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{2005-05-26 23:33:01}\" >o 2>e &&\n \techo \"$B\" >expect &&\n \ttest_cmp expect o &&\n \ttest_i18ngrep -F \"warning: log for ref $m has gap after $gd\" e\n '\n-test_expect_success 'Query \"master@{2005-05-26 23:38:00}\" (middle of history)' '\n+test_expect_success 'Query \"main@{2005-05-26 23:38:00}\" (middle of history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{2005-05-26 23:38:00}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{2005-05-26 23:38:00}\" >o 2>e &&\n \techo \"$Z\" >expect &&\n \ttest_cmp expect o &&\n \ttest_must_be_empty e\n '\n-test_expect_success 'Query \"master@{2005-05-26 23:43:00}\" (exact end of history)' '\n+test_expect_success 'Query \"main@{2005-05-26 23:43:00}\" (exact end of history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{2005-05-26 23:43:00}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{2005-05-26 23:43:00}\" >o 2>e &&\n \techo \"$E\" >expect &&\n \ttest_cmp expect o &&\n \ttest_must_be_empty e\n '\n-test_expect_success 'Query \"master@{2005-05-28}\" (past end of history)' '\n+test_expect_success 'Query \"main@{2005-05-28}\" (past end of history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{2005-05-28}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{2005-05-28}\" >o 2>e &&\n \techo \"$D\" >expect &&\n \ttest_cmp expect o &&\n \ttest_i18ngrep -F \"warning: log for ref $m unexpectedly ended on $ld\" e\n@@ -461,14 +461,14 @@ test_expect_success 'git commit logged updates' '\n '\n unset h_TEST h_OTHER h_FIXED h_MERGED\n \n-test_expect_success 'git cat-file blob master:F (expect OTHER)' '\n-\ttest OTHER = $(git cat-file blob master:F)\n+test_expect_success 'git cat-file blob main:F (expect OTHER)' '\n+\ttest OTHER = $(git cat-file blob main:F)\n '\n-test_expect_success 'git cat-file blob master@{2005-05-26 23:30}:F (expect TEST)' '\n-\ttest TEST = $(git cat-file blob \"master@{2005-05-26 23:30}:F\")\n+test_expect_success 'git cat-file blob main@{2005-05-26 23:30}:F (expect TEST)' '\n+\ttest TEST = $(git cat-file blob \"main@{2005-05-26 23:30}:F\")\n '\n-test_expect_success 'git cat-file blob master@{2005-05-26 23:42}:F (expect OTHER)' '\n-\ttest OTHER = $(git cat-file blob \"master@{2005-05-26 23:42}:F\")\n+test_expect_success 'git cat-file blob main@{2005-05-26 23:42}:F (expect OTHER)' '\n+\ttest OTHER = $(git cat-file blob \"main@{2005-05-26 23:42}:F\")\n '\n \n # Test adding and deleting pseudorefs\n@@ -580,9 +580,9 @@ test_expect_success 'stdin fails on unknown command' '\n '\n \n test_expect_success 'stdin fails on unbalanced quotes' '\n-\techo \"create $a \\\"master\" >stdin &&\n+\techo \"create $a \\\"main\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n-\tgrep \"fatal: badly quoted argument: \\\\\\\"master\" err\n+\tgrep \"fatal: badly quoted argument: \\\\\\\"main\" err\n '\n \n test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin fails on invalid escape' '\n@@ -592,9 +592,9 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin fails on invalid escape' '\n '\n \n test_expect_success 'stdin fails on junk after quoted argument' '\n-\techo \"create \\\"$a\\\"master\" >stdin &&\n+\techo \"create \\\"$a\\\"main\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n-\tgrep \"fatal: unexpected character after quoted argument: \\\\\\\"$a\\\\\\\"master\" err\n+\tgrep \"fatal: unexpected character after quoted argument: \\\\\\\"$a\\\\\\\"main\" err\n '\n \n test_expect_success 'stdin fails create with no ref' '\ndiff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh\nindex 98e4a8613b..cabc516ae9 100755\n--- a/t/t1402-check-ref-format.sh\n+++ b/t/t1402-check-ref-format.sh\n@@ -134,18 +134,18 @@ valid_ref !MINGW \"$ref\" '--refspec-pattern --allow-onelevel --normalize'\n test_expect_success \"check-ref-format --branch @{-1}\" '\n \tT=$(git write-tree) &&\n \tsha1=$(echo A | git commit-tree $T) &&\n-\tgit update-ref refs/heads/master $sha1 &&\n-\tgit update-ref refs/remotes/origin/master $sha1 &&\n-\tgit checkout master &&\n-\tgit checkout origin/master &&\n-\tgit checkout master &&\n+\tgit update-ref refs/heads/main $sha1 &&\n+\tgit update-ref refs/remotes/origin/main $sha1 &&\n+\tgit checkout main &&\n+\tgit checkout origin/main &&\n+\tgit checkout main &&\n \trefname=$(git check-ref-format --branch @{-1}) &&\n \ttest \"$refname\" = \"$sha1\" &&\n \trefname2=$(git check-ref-format --branch @{-2}) &&\n-\ttest \"$refname2\" = master'\n+\ttest \"$refname2\" = main'\n \n-test_expect_success 'check-ref-format --branch -naster' '\n-\ttest_must_fail git check-ref-format --branch -naster >actual &&\n+test_expect_success 'check-ref-format --branch -nain' '\n+\ttest_must_fail git check-ref-format --branch -nain >actual &&\n \ttest_must_be_empty actual\n '\n \n@@ -154,11 +154,11 @@ test_expect_success 'check-ref-format --branch from subdir' '\n \n \tT=$(git write-tree) &&\n \tsha1=$(echo A | git commit-tree $T) &&\n-\tgit update-ref refs/heads/master $sha1 &&\n-\tgit update-ref refs/remotes/origin/master $sha1 &&\n-\tgit checkout master &&\n-\tgit checkout origin/master &&\n-\tgit checkout master &&\n+\tgit update-ref refs/heads/main $sha1 &&\n+\tgit update-ref refs/remotes/origin/main $sha1 &&\n+\tgit checkout main &&\n+\tgit checkout origin/main &&\n+\tgit checkout main &&\n \trefname=$(\n \t\tcd subdir &&\n \t\tgit check-ref-format --branch @{-1}\n@@ -171,9 +171,9 @@ test_expect_success 'check-ref-format --branch @{-1} from non-repo' '\n \ttest_must_be_empty actual\n '\n \n-test_expect_success 'check-ref-format --branch master from non-repo' '\n-\techo master >expect &&\n-\tnongit git check-ref-format --branch master >actual &&\n+test_expect_success 'check-ref-format --branch main from non-repo' '\n+\techo main >expect &&\n+\tnongit git check-ref-format --branch main >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t1403-show-ref.sh b/t/t1403-show-ref.sh\nindex 5d955c3bff..681b7022c3 100755\n--- a/t/t1403-show-ref.sh\n+++ b/t/t1403-show-ref.sh\n@@ -9,7 +9,7 @@ test_expect_success setup '\n \tgit checkout -b side &&\n \ttest_commit B &&\n \tgit tag -f -a -m \"annotated B\" B &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit C &&\n \tgit branch B A^0\n '\n@@ -92,23 +92,23 @@ test_expect_success 'show-ref -d' '\n \tgit show-ref --verify -d refs/tags/A refs/tags/C >actual &&\n \ttest_cmp expect actual &&\n \n-\techo $(git rev-parse refs/heads/master) refs/heads/master >expect &&\n-\tgit show-ref -d master >actual &&\n+\techo $(git rev-parse refs/heads/main) refs/heads/main >expect &&\n+\tgit show-ref -d main >actual &&\n \ttest_cmp expect actual &&\n \n-\tgit show-ref -d heads/master >actual &&\n+\tgit show-ref -d heads/main >actual &&\n \ttest_cmp expect actual &&\n \n-\tgit show-ref -d refs/heads/master >actual &&\n+\tgit show-ref -d refs/heads/main >actual &&\n \ttest_cmp expect actual &&\n \n-\tgit show-ref -d --verify refs/heads/master >actual &&\n+\tgit show-ref -d --verify refs/heads/main >actual &&\n \ttest_cmp expect actual &&\n \n-\ttest_must_fail git show-ref -d --verify master >actual &&\n+\ttest_must_fail git show-ref -d --verify main >actual &&\n \ttest_must_be_empty actual &&\n \n-\ttest_must_fail git show-ref -d --verify heads/master >actual &&\n+\ttest_must_fail git show-ref -d --verify heads/main >actual &&\n \ttest_must_be_empty actual &&\n \n \ttest_must_fail git show-ref --verify -d A C >actual &&\n@@ -120,7 +120,7 @@ test_expect_success 'show-ref -d' '\n '\n \n test_expect_success 'show-ref --heads, --tags, --head, pattern' '\n-\tfor branch in B master side\n+\tfor branch in B main side\n \tdo\n \t\techo $(git rev-parse refs/heads/$branch) refs/heads/$branch\n \tdone >expect.heads &&\ndiff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh\nindex 74af927fba..5661df799b 100755\n--- a/t/t1405-main-ref-store.sh\n+++ b/t/t1405-main-ref-store.sh\n@@ -21,9 +21,9 @@ test_expect_success 'peel_ref(new-tag)' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'create_symref(FOO, refs/heads/master)' '\n-\t$RUN create-symref FOO refs/heads/master nothing &&\n-\techo refs/heads/master >expected &&\n+test_expect_success 'create_symref(FOO, refs/heads/main)' '\n+\t$RUN create-symref FOO refs/heads/main nothing &&\n+\techo refs/heads/main >expected &&\n \tgit symbolic-ref FOO >actual &&\n \ttest_cmp expected actual\n '\n@@ -31,7 +31,7 @@ test_expect_success 'create_symref(FOO, refs/heads/master)' '\n test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' '\n \tgit rev-parse FOO -- &&\n \tgit rev-parse refs/tags/new-tag -- &&\n-\tm=$(git rev-parse master) &&\n+\tm=$(git rev-parse main) &&\n \tREF_NO_DEREF=1 &&\n \t$RUN delete-refs $REF_NO_DEREF nothing FOO refs/tags/new-tag &&\n \ttest_must_fail git rev-parse --symbolic-full-name FOO &&\n@@ -39,19 +39,19 @@ test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' '\n \ttest_must_fail git rev-parse refs/tags/new-tag --\n '\n \n-test_expect_success 'rename_refs(master, new-master)' '\n-\tgit rev-parse master >expected &&\n-\t$RUN rename-ref refs/heads/master refs/heads/new-master &&\n-\tgit rev-parse new-master >actual &&\n+test_expect_success 'rename_refs(main, new-main)' '\n+\tgit rev-parse main >expected &&\n+\t$RUN rename-ref refs/heads/main refs/heads/new-main &&\n+\tgit rev-parse new-main >actual &&\n \ttest_cmp expected actual &&\n-\ttest_commit recreate-master\n+\ttest_commit recreate-main\n '\n \n test_expect_success 'for_each_ref(refs/heads/)' '\n \t$RUN for-each-ref refs/heads/ | cut -d\" \" -f 2- >actual &&\n \tcat >expected <<-\\EOF &&\n-\tmaster 0x0\n-\tnew-master 0x0\n+\tmain 0x0\n+\tnew-main 0x0\n \tEOF\n \ttest_cmp expected actual\n '\n@@ -62,23 +62,23 @@ test_expect_success 'for_each_ref() is sorted' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'resolve_ref(new-master)' '\n-\tSHA1=`git rev-parse new-master` &&\n-\techo \"$SHA1 refs/heads/new-master 0x0\" >expected &&\n-\t$RUN resolve-ref refs/heads/new-master 0 >actual &&\n+test_expect_success 'resolve_ref(new-main)' '\n+\tSHA1=`git rev-parse new-main` &&\n+\techo \"$SHA1 refs/heads/new-main 0x0\" >expected &&\n+\t$RUN resolve-ref refs/heads/new-main 0 >actual &&\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'verify_ref(new-master)' '\n-\t$RUN verify-ref refs/heads/new-master\n+test_expect_success 'verify_ref(new-main)' '\n+\t$RUN verify-ref refs/heads/new-main\n '\n \n test_expect_success 'for_each_reflog()' '\n \t$RUN for-each-reflog | sort -k2 | cut -d\" \" -f 2- >actual &&\n \tcat >expected <<-\\EOF &&\n \tHEAD 0x1\n-\trefs/heads/master 0x0\n-\trefs/heads/new-master 0x0\n+\trefs/heads/main 0x0\n+\trefs/heads/new-main 0x0\n \tEOF\n \ttest_cmp expected actual\n '\n@@ -86,12 +86,12 @@ test_expect_success 'for_each_reflog()' '\n test_expect_success 'for_each_reflog_ent()' '\n \t$RUN for-each-reflog-ent HEAD >actual &&\n \thead -n1 actual | grep one &&\n-\ttail -n2 actual | head -n1 | grep recreate-master\n+\ttail -n2 actual | head -n1 | grep recreate-main\n '\n \n test_expect_success 'for_each_reflog_ent_reverse()' '\n \t$RUN for-each-reflog-ent-reverse HEAD >actual &&\n-\thead -n1 actual | grep recreate-master &&\n+\thead -n1 actual | grep recreate-main &&\n \ttail -n2 actual | head -n1 | grep one\n '\n \ndiff --git a/t/t1406-submodule-ref-store.sh b/t/t1406-submodule-ref-store.sh\nindex 36b7ef5046..e3e3b9c84c 100755\n--- a/t/t1406-submodule-ref-store.sh\n+++ b/t/t1406-submodule-ref-store.sh\n@@ -11,7 +11,7 @@ test_expect_success 'setup' '\n \t(\n \t\tcd sub &&\n \t\ttest_commit first &&\n-\t\tgit checkout -b new-master\n+\t\tgit checkout -b new-main\n \t)\n '\n \n@@ -27,7 +27,7 @@ test_expect_success 'peel_ref(new-tag)' '\n '\n \n test_expect_success 'create_symref() not allowed' '\n-\ttest_must_fail $RUN create-symref FOO refs/heads/master nothing\n+\ttest_must_fail $RUN create-symref FOO refs/heads/main nothing\n '\n \n test_expect_success 'delete_refs() not allowed' '\n@@ -35,14 +35,14 @@ test_expect_success 'delete_refs() not allowed' '\n '\n \n test_expect_success 'rename_refs() not allowed' '\n-\ttest_must_fail $RUN rename-ref refs/heads/master refs/heads/new-master\n+\ttest_must_fail $RUN rename-ref refs/heads/main refs/heads/new-main\n '\n \n test_expect_success 'for_each_ref(refs/heads/)' '\n \t$RUN for-each-ref refs/heads/ | cut -d\" \" -f 2- >actual &&\n \tcat >expected <<-\\EOF &&\n-\tmaster 0x0\n-\tnew-master 0x0\n+\tmain 0x0\n+\tnew-main 0x0\n \tEOF\n \ttest_cmp expected actual\n '\n@@ -53,23 +53,23 @@ test_expect_success 'for_each_ref() is sorted' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'resolve_ref(master)' '\n-\tSHA1=`git -C sub rev-parse master` &&\n-\techo \"$SHA1 refs/heads/master 0x0\" >expected &&\n-\t$RUN resolve-ref refs/heads/master 0 >actual &&\n+test_expect_success 'resolve_ref(main)' '\n+\tSHA1=`git -C sub rev-parse main` &&\n+\techo \"$SHA1 refs/heads/main 0x0\" >expected &&\n+\t$RUN resolve-ref refs/heads/main 0 >actual &&\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'verify_ref(new-master)' '\n-\t$RUN verify-ref refs/heads/new-master\n+test_expect_success 'verify_ref(new-main)' '\n+\t$RUN verify-ref refs/heads/new-main\n '\n \n test_expect_success 'for_each_reflog()' '\n \t$RUN for-each-reflog | sort | cut -d\" \" -f 2- >actual &&\n \tcat >expected <<-\\EOF &&\n \tHEAD 0x1\n-\trefs/heads/master 0x0\n-\trefs/heads/new-master 0x0\n+\trefs/heads/main 0x0\n+\trefs/heads/new-main 0x0\n \tEOF\n \ttest_cmp expected actual\n '\n@@ -77,12 +77,12 @@ test_expect_success 'for_each_reflog()' '\n test_expect_success 'for_each_reflog_ent()' '\n \t$RUN for-each-reflog-ent HEAD >actual &&\n \thead -n1 actual | grep first &&\n-\ttail -n2 actual | head -n1 | grep master.to.new\n+\ttail -n2 actual | head -n1 | grep main.to.new\n '\n \n test_expect_success 'for_each_reflog_ent_reverse()' '\n \t$RUN for-each-reflog-ent-reverse HEAD >actual &&\n-\thead -n1 actual | grep master.to.new &&\n+\thead -n1 actual | grep main.to.new &&\n \ttail -n2 actual | head -n1 | grep first\n '\n \ndiff --git a/t/t1407-worktree-ref-store.sh b/t/t1407-worktree-ref-store.sh\nindex 9a84858118..71059cb254 100755\n--- a/t/t1407-worktree-ref-store.sh\n+++ b/t/t1407-worktree-ref-store.sh\n@@ -9,7 +9,7 @@ RMAIN=\"test-tool ref-store worktree:main\"\n \n test_expect_success 'setup' '\n \ttest_commit first &&\n-\tgit worktree add -b wt-master wt &&\n+\tgit worktree add -b wt-main wt &&\n \t(\n \t\tcd wt &&\n \t\ttest_commit second\n@@ -17,34 +17,34 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'resolve_ref(<shared-ref>)' '\n-\tSHA1=`git rev-parse master` &&\n-\techo \"$SHA1 refs/heads/master 0x0\" >expected &&\n-\t$RWT resolve-ref refs/heads/master 0 >actual &&\n+\tSHA1=`git rev-parse main` &&\n+\techo \"$SHA1 refs/heads/main 0x0\" >expected &&\n+\t$RWT resolve-ref refs/heads/main 0 >actual &&\n \ttest_cmp expected actual &&\n-\t$RMAIN resolve-ref refs/heads/master 0 >actual &&\n+\t$RMAIN resolve-ref refs/heads/main 0 >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'resolve_ref(<per-worktree-ref>)' '\n \tSHA1=`git -C wt rev-parse HEAD` &&\n-\techo \"$SHA1 refs/heads/wt-master 0x1\" >expected &&\n+\techo \"$SHA1 refs/heads/wt-main 0x1\" >expected &&\n \t$RWT resolve-ref HEAD 0 >actual &&\n \ttest_cmp expected actual &&\n \n \tSHA1=`git rev-parse HEAD` &&\n-\techo \"$SHA1 refs/heads/master 0x1\" >expected &&\n+\techo \"$SHA1 refs/heads/main 0x1\" >expected &&\n \t$RMAIN resolve-ref HEAD 0 >actual &&\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'create_symref(FOO, refs/heads/master)' '\n-\t$RWT create-symref FOO refs/heads/master nothing &&\n-\techo refs/heads/master >expected &&\n+test_expect_success 'create_symref(FOO, refs/heads/main)' '\n+\t$RWT create-symref FOO refs/heads/main nothing &&\n+\techo refs/heads/main >expected &&\n \tgit -C wt symbolic-ref FOO >actual &&\n \ttest_cmp expected actual &&\n \n-\t$RMAIN create-symref FOO refs/heads/wt-master nothing &&\n-\techo refs/heads/wt-master >expected &&\n+\t$RMAIN create-symref FOO refs/heads/wt-main nothing &&\n+\techo refs/heads/wt-main >expected &&\n \tgit symbolic-ref FOO >actual &&\n \ttest_cmp expected actual\n '\n@@ -63,8 +63,8 @@ test_expect_success 'for_each_reflog()' '\n \tHEAD 0x1\n \tPSEUDO-WT 0x0\n \trefs/bisect/wt-random 0x0\n-\trefs/heads/master 0x0\n-\trefs/heads/wt-master 0x0\n+\trefs/heads/main 0x0\n+\trefs/heads/wt-main 0x0\n \tEOF\n \ttest_cmp expected actual &&\n \n@@ -73,8 +73,8 @@ test_expect_success 'for_each_reflog()' '\n \tHEAD 0x1\n \tPSEUDO-MAIN 0x0\n \trefs/bisect/random 0x0\n-\trefs/heads/master 0x0\n-\trefs/heads/wt-master 0x0\n+\trefs/heads/main 0x0\n+\trefs/heads/wt-main 0x0\n \tEOF\n \ttest_cmp expected actual\n '\ndiff --git a/t/t1408-packed-refs.sh b/t/t1408-packed-refs.sh\nindex 1e44a17eea..f40e7af8ce 100755\n--- a/t/t1408-packed-refs.sh\n+++ b/t/t1408-packed-refs.sh\n@@ -9,32 +9,32 @@ test_expect_success setup '\n \tgit commit --allow-empty -m one &&\n \tone=$(git rev-parse HEAD) &&\n \tgit for-each-ref >actual &&\n-\techo \"$one commit\trefs/heads/master\" >expect &&\n+\techo \"$one commit\trefs/heads/main\" >expect &&\n \ttest_cmp expect actual &&\n \n \tgit pack-refs --all &&\n \tgit for-each-ref >actual &&\n-\techo \"$one commit\trefs/heads/master\" >expect &&\n+\techo \"$one commit\trefs/heads/main\" >expect &&\n \ttest_cmp expect actual &&\n \n \tgit checkout --orphan another &&\n \ttest_tick &&\n \tgit commit --allow-empty -m two &&\n \ttwo=$(git rev-parse HEAD) &&\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tgit branch -D another &&\n \n \tgit for-each-ref >actual &&\n-\techo \"$two commit\trefs/heads/master\" >expect &&\n+\techo \"$two commit\trefs/heads/main\" >expect &&\n \ttest_cmp expect actual &&\n \n \tgit reflog expire --expire=now --all &&\n \tgit prune &&\n-\tgit tag -m v1.0 v1.0 master\n+\tgit tag -m v1.0 v1.0 main\n '\n \n test_expect_success 'no error from stale entry in packed-refs' '\n-\tgit describe master >actual 2>&1 &&\n+\tgit describe main >actual 2>&1 &&\n \techo \"v1.0\" >expect &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh\nindex 730a43d9dd..8553141434 100755\n--- a/t/t1410-reflog.sh\n+++ b/t/t1410-reflog.sh\n@@ -99,7 +99,7 @@ test_expect_success setup '\n \n \tcheck_fsck &&\n \n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 4 output\n '\n \n@@ -116,7 +116,7 @@ test_expect_success rewind '\n \n \tcheck_have A B C D E F G H I J K L &&\n \n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 5 output\n '\n \n@@ -135,7 +135,7 @@ test_expect_success 'reflog expire --dry-run should not touch reflog' '\n \t\t--stale-fix \\\n \t\t--all &&\n \n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 5 output &&\n \n \tcheck_fsck \"missing blob $F\"\n@@ -149,7 +149,7 @@ test_expect_success 'reflog expire' '\n \t\t--stale-fix \\\n \t\t--all &&\n \n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 2 output &&\n \n \tcheck_fsck \"dangling commit $K\"\n@@ -186,29 +186,29 @@ test_expect_success 'delete' '\n \tgit commit -m tiger C &&\n \n \tHEAD_entry_count=$(git reflog | wc -l) &&\n-\tmaster_entry_count=$(git reflog show master | wc -l) &&\n+\tmain_entry_count=$(git reflog show main | wc -l) &&\n \n \ttest $HEAD_entry_count = 5 &&\n-\ttest $master_entry_count = 5 &&\n+\ttest $main_entry_count = 5 &&\n \n \n-\tgit reflog delete master@{1} &&\n-\tgit reflog show master > output &&\n-\ttest_line_count = $(($master_entry_count - 1)) output &&\n+\tgit reflog delete main@{1} &&\n+\tgit reflog show main > output &&\n+\ttest_line_count = $(($main_entry_count - 1)) output &&\n \ttest $HEAD_entry_count = $(git reflog | wc -l) &&\n \t! grep ox < output &&\n \n-\tmaster_entry_count=$(wc -l < output) &&\n+\tmain_entry_count=$(wc -l < output) &&\n \n \tgit reflog delete HEAD@{1} &&\n \ttest $(($HEAD_entry_count -1)) = $(git reflog | wc -l) &&\n-\ttest $master_entry_count = $(git reflog show master | wc -l) &&\n+\ttest $main_entry_count = $(git reflog show main | wc -l) &&\n \n \tHEAD_entry_count=$(git reflog | wc -l) &&\n \n-\tgit reflog delete master@{07.04.2005.15:15:00.-0700} &&\n-\tgit reflog show master > output &&\n-\ttest_line_count = $(($master_entry_count - 1)) output &&\n+\tgit reflog delete main@{07.04.2005.15:15:00.-0700} &&\n+\tgit reflog show main > output &&\n+\ttest_line_count = $(($main_entry_count - 1)) output &&\n \t! grep dragon < output\n \n '\n@@ -216,7 +216,7 @@ test_expect_success 'delete' '\n test_expect_success 'rewind2' '\n \n \ttest_tick && git reset --hard HEAD~2 &&\n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 4 output\n '\n \n@@ -226,7 +226,7 @@ test_expect_success '--expire=never' '\n \t\t--expire=never \\\n \t\t--expire-unreachable=never \\\n \t\t--all &&\n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 4 output\n '\n \n@@ -237,7 +237,7 @@ test_expect_success 'gc.reflogexpire=never' '\n \tgit reflog expire --verbose --all >output &&\n \ttest_line_count = 9 output &&\n \n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 4 output\n '\n \n@@ -246,7 +246,7 @@ test_expect_success 'gc.reflogexpire=false' '\n \ttest_config gc.reflogexpireunreachable false &&\n \n \tgit reflog expire --verbose --all &&\n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 4 output\n \n '\n@@ -255,33 +255,33 @@ test_expect_success 'git reflog expire unknown reference' '\n \ttest_config gc.reflogexpire never &&\n \ttest_config gc.reflogexpireunreachable never &&\n \n-\ttest_must_fail git reflog expire master@{123} 2>stderr &&\n+\ttest_must_fail git reflog expire main@{123} 2>stderr &&\n \ttest_i18ngrep \"points nowhere\" stderr &&\n \ttest_must_fail git reflog expire does-not-exist 2>stderr &&\n \ttest_i18ngrep \"points nowhere\" stderr\n '\n \n test_expect_success 'checkout should not delete log for packed ref' '\n-\ttest $(git reflog master | wc -l) = 4 &&\n+\ttest $(git reflog main | wc -l) = 4 &&\n \tgit branch foo &&\n \tgit pack-refs --all &&\n \tgit checkout foo &&\n-\ttest $(git reflog master | wc -l) = 4\n+\ttest $(git reflog main | wc -l) = 4\n '\n \n test_expect_success 'stale dirs do not cause d/f conflicts (reflogs on)' '\n \ttest_when_finished \"git branch -d one || git branch -d one/two\" &&\n \n-\tgit branch one/two master &&\n-\techo \"one/two@{0} branch: Created from master\" >expect &&\n+\tgit branch one/two main &&\n+\techo \"one/two@{0} branch: Created from main\" >expect &&\n \tgit log -g --format=\"%gd %gs\" one/two >actual &&\n \ttest_cmp expect actual &&\n \tgit branch -d one/two &&\n \n \t# now logs/refs/heads/one is a stale directory, but\n \t# we should move it out of the way to create \"one\" reflog\n-\tgit branch one master &&\n-\techo \"one@{0} branch: Created from master\" >expect &&\n+\tgit branch one main &&\n+\techo \"one@{0} branch: Created from main\" >expect &&\n \tgit log -g --format=\"%gd %gs\" one >actual &&\n \ttest_cmp expect actual\n '\n@@ -289,15 +289,15 @@ test_expect_success 'stale dirs do not cause d/f conflicts (reflogs on)' '\n test_expect_success 'stale dirs do not cause d/f conflicts (reflogs off)' '\n \ttest_when_finished \"git branch -d one || git branch -d one/two\" &&\n \n-\tgit branch one/two master &&\n-\techo \"one/two@{0} branch: Created from master\" >expect &&\n+\tgit branch one/two main &&\n+\techo \"one/two@{0} branch: Created from main\" >expect &&\n \tgit log -g --format=\"%gd %gs\" one/two >actual &&\n \ttest_cmp expect actual &&\n \tgit branch -d one/two &&\n \n \t# same as before, but we only create a reflog for \"one\" if\n \t# it already exists, which it does not\n-\tgit -c core.logallrefupdates=false branch one master &&\n+\tgit -c core.logallrefupdates=false branch one main &&\n \tgit log -g --format=\"%gd %gs\" one >actual &&\n \ttest_must_be_empty actual\n '\ndiff --git a/t/t1411-reflog-show.sh b/t/t1411-reflog-show.sh\nindex 985daf1def..333b35aebc 100755\n--- a/t/t1411-reflog-show.sh\n+++ b/t/t1411-reflog-show.sh\n@@ -167,7 +167,7 @@ test_expect_success 'git log -g -p shows diffs vs. parents' '\n '\n \n test_expect_success 'reflog exists works' '\n-\tgit reflog exists refs/heads/master &&\n+\tgit reflog exists refs/heads/main &&\n \t! git reflog exists refs/heads/nonexistent\n '\n \ndiff --git a/t/t1413-reflog-detach.sh b/t/t1413-reflog-detach.sh\nindex c730600d8a..b1f7f35fe9 100755\n--- a/t/t1413-reflog-detach.sh\n+++ b/t/t1413-reflog-detach.sh\n@@ -4,7 +4,7 @@ test_description='Test reflog interaction with detached HEAD'\n . ./test-lib.sh\n \n reset_state () {\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcp saved_reflog .git/logs/HEAD\n }\n \n@@ -19,14 +19,14 @@ test_expect_success setup '\n \n test_expect_success baseline '\n \treset_state &&\n-\tgit rev-parse master master^ >expect &&\n+\tgit rev-parse main main^ >expect &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'switch to branch' '\n \treset_state &&\n-\tgit rev-parse side master master^ >expect &&\n+\tgit rev-parse side main main^ >expect &&\n \tgit checkout side &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\n@@ -34,34 +34,34 @@ test_expect_success 'switch to branch' '\n \n test_expect_success 'detach to other' '\n \treset_state &&\n-\tgit rev-parse master side master master^ >expect &&\n+\tgit rev-parse main side main main^ >expect &&\n \tgit checkout side &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'detach to self' '\n \treset_state &&\n-\tgit rev-parse master master master^ >expect &&\n-\tgit checkout master^0 &&\n+\tgit rev-parse main main main^ >expect &&\n+\tgit checkout main^0 &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'attach to self' '\n \treset_state &&\n-\tgit rev-parse master master master master^ >expect &&\n-\tgit checkout master^0 &&\n-\tgit checkout master &&\n+\tgit rev-parse main main main main^ >expect &&\n+\tgit checkout main^0 &&\n+\tgit checkout main &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'attach to other' '\n \treset_state &&\n-\tgit rev-parse side master master master^ >expect &&\n-\tgit checkout master^0 &&\n+\tgit rev-parse side main main main^ >expect &&\n+\tgit checkout main^0 &&\n \tgit checkout side &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\ndiff --git a/t/t1414-reflog-walk.sh b/t/t1414-reflog-walk.sh\nindex 1181a9fb28..89458b7158 100755\n--- a/t/t1414-reflog-walk.sh\n+++ b/t/t1414-reflog-walk.sh\n@@ -8,7 +8,7 @@ test_expect_success 'set up some reflog entries' '\n \ttest_commit two &&\n \tgit checkout -b side HEAD^ &&\n \ttest_commit three &&\n-\tgit merge --no-commit master &&\n+\tgit merge --no-commit main &&\n \techo evil-merge-content >>one.t &&\n \ttest_tick &&\n \tgit commit --no-edit -a\n@@ -20,9 +20,9 @@ do_walk () {\n \n test_expect_success 'set up expected reflog' '\n \tcat >expect.all <<-EOF\n-\tHEAD@{0} commit (merge): Merge branch ${SQ}master${SQ} into side\n+\tHEAD@{0} commit (merge): Merge branch ${SQ}main${SQ} into side\n \tHEAD@{1} commit: three\n-\tHEAD@{2} checkout: moving from master to side\n+\tHEAD@{2} checkout: moving from main to side\n \tHEAD@{3} commit: two\n \tHEAD@{4} commit (initial): one\n \tEOF\n@@ -73,15 +73,15 @@ test_expect_success 'walking multiple reflogs shows all' '\n \t#      sort ignores the bits after the timestamp.\n \t#\n \t#   2. POSIX leaves undefined whether this is a stable sort or not. So\n-\t#      we use \"-k 1\" to ensure that we see HEAD before master before\n+\t#      we use \"-k 1\" to ensure that we see HEAD before main before\n \t#      side when breaking ties.\n \t{\n \t\tdo_walk --date=unix HEAD &&\n \t\tdo_walk --date=unix side &&\n-\t\tdo_walk --date=unix master\n+\t\tdo_walk --date=unix main\n \t} >expect.raw &&\n \tsort -t \"{\" -k 2nr -k 1 <expect.raw >expect &&\n-\tdo_walk --date=unix HEAD master side >actual &&\n+\tdo_walk --date=unix HEAD main side >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t1416-ref-transaction-hooks.sh b/t/t1416-ref-transaction-hooks.sh\nindex f6e741c6c0..4cabc07c86 100755\n--- a/t/t1416-ref-transaction-hooks.sh\n+++ b/t/t1416-ref-transaction-hooks.sh\n@@ -53,11 +53,11 @@ test_expect_success 'hook gets all queued updates in prepared state' '\n \tEOF\n \tcat >expect <<-EOF &&\n \t\t$ZERO_OID $POST_OID HEAD\n-\t\t$ZERO_OID $POST_OID refs/heads/master\n+\t\t$ZERO_OID $POST_OID refs/heads/main\n \tEOF\n \tgit update-ref HEAD POST <<-EOF &&\n \t\tupdate HEAD $ZERO_OID $POST_OID\n-\t\tupdate refs/heads/master $ZERO_OID $POST_OID\n+\t\tupdate refs/heads/main $ZERO_OID $POST_OID\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -76,7 +76,7 @@ test_expect_success 'hook gets all queued updates in committed state' '\n \tEOF\n \tcat >expect <<-EOF &&\n \t\t$ZERO_OID $POST_OID HEAD\n-\t\t$ZERO_OID $POST_OID refs/heads/master\n+\t\t$ZERO_OID $POST_OID refs/heads/main\n \tEOF\n \tgit update-ref HEAD POST &&\n \ttest_cmp expect actual\n@@ -96,12 +96,12 @@ test_expect_success 'hook gets all queued updates in aborted state' '\n \tEOF\n \tcat >expect <<-EOF &&\n \t\t$ZERO_OID $POST_OID HEAD\n-\t\t$ZERO_OID $POST_OID refs/heads/master\n+\t\t$ZERO_OID $POST_OID refs/heads/main\n \tEOF\n \tgit update-ref --stdin <<-EOF &&\n \t\tstart\n \t\tupdate HEAD POST $ZERO_OID\n-\t\tupdate refs/heads/master POST $ZERO_OID\n+\t\tupdate refs/heads/main POST $ZERO_OID\n \t\tabort\n \tEOF\n \ttest_cmp expect actual\ndiff --git a/t/t1430-bad-ref-name.sh b/t/t1430-bad-ref-name.sh\nindex c7878a60ed..fcc0194d7e 100755\n--- a/t/t1430-bad-ref-name.sh\n+++ b/t/t1430-bad-ref-name.sh\n@@ -17,7 +17,7 @@ test_expect_success 'fast-import: fail on invalid branch name \".badbranchname\"'\n \t\tcorrupt\n \t\tCOMMIT\n \n-\t\tfrom refs/heads/master\n+\t\tfrom refs/heads/main\n \n \tINPUT_END\n \ttest_must_fail git fast-import <input\n@@ -32,14 +32,14 @@ test_expect_success 'fast-import: fail on invalid branch name \"bad[branch]name\"'\n \t\tcorrupt\n \t\tCOMMIT\n \n-\t\tfrom refs/heads/master\n+\t\tfrom refs/heads/main\n \n \tINPUT_END\n \ttest_must_fail git fast-import <input\n '\n \n test_expect_success 'git branch shows badly named ref as warning' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch >output 2>error &&\n \ttest_i18ngrep -e \"ignoring ref with broken name refs/heads/broken\\.\\.\\.ref\" error &&\n@@ -47,7 +47,7 @@ test_expect_success 'git branch shows badly named ref as warning' '\n '\n \n test_expect_success 'branch -d can delete badly named ref' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch -d broken...ref &&\n \tgit branch >output 2>error &&\n@@ -56,7 +56,7 @@ test_expect_success 'branch -d can delete badly named ref' '\n '\n \n test_expect_success 'branch -D can delete badly named ref' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch -D broken...ref &&\n \tgit branch >output 2>error &&\n@@ -98,17 +98,17 @@ test_expect_success 'branch -m cannot rename to a bad ref name' '\n \ttest_might_fail git branch -D goodref &&\n \tgit branch goodref &&\n \ttest_must_fail git branch -m goodref broken...ref &&\n-\ttest_cmp_rev master goodref &&\n+\ttest_cmp_rev main goodref &&\n \tgit branch >output 2>error &&\n \t! grep -e \"broken\\.\\.\\.ref\" error &&\n \t! grep -e \"broken\\.\\.\\.ref\" output\n '\n \n test_expect_failure 'branch -m can rename from a bad ref name' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch -m broken...ref renamed &&\n-\ttest_cmp_rev master renamed &&\n+\ttest_cmp_rev main renamed &&\n \tgit branch >output 2>error &&\n \t! grep -e \"broken\\.\\.\\.ref\" error &&\n \t! grep -e \"broken\\.\\.\\.ref\" output\n@@ -135,7 +135,7 @@ test_expect_failure C_LOCALE_OUTPUT 'push --mirror can delete badly named ref' '\n \t\tcd dest &&\n \t\ttest_commit two &&\n \t\tgit checkout --detach &&\n-\t\tcp .git/refs/heads/master .git/refs/heads/broken...ref\n+\t\tcp .git/refs/heads/main .git/refs/heads/broken...ref\n \t) &&\n \tgit -C src push --mirror \"file://$top/dest\" &&\n \tgit -C dest branch >output 2>error &&\n@@ -146,7 +146,7 @@ test_expect_failure C_LOCALE_OUTPUT 'push --mirror can delete badly named ref' '\n test_expect_success 'rev-parse skips symref pointing to broken name' '\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch shadow one &&\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \tprintf \"ref: refs/heads/broken...ref\\n\" >.git/refs/tags/shadow &&\n \ttest_when_finished \"rm -f .git/refs/tags/shadow\" &&\n \tgit rev-parse --verify one >expect &&\n@@ -156,11 +156,11 @@ test_expect_success 'rev-parse skips symref pointing to broken name' '\n '\n \n test_expect_success 'for-each-ref emits warnings for broken names' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tprintf \"ref: refs/heads/broken...ref\\n\" >.git/refs/heads/badname &&\n \ttest_when_finished \"rm -f .git/refs/heads/badname\" &&\n-\tprintf \"ref: refs/heads/master\\n\" >.git/refs/heads/broken...symref &&\n+\tprintf \"ref: refs/heads/main\\n\" >.git/refs/heads/broken...symref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...symref\" &&\n \tgit for-each-ref >output 2>error &&\n \t! grep -e \"broken\\.\\.\\.ref\" output &&\n@@ -172,7 +172,7 @@ test_expect_success 'for-each-ref emits warnings for broken names' '\n '\n \n test_expect_success 'update-ref -d can delete broken name' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit update-ref -d refs/heads/broken...ref >output 2>error &&\n \ttest_must_be_empty output &&\n@@ -183,7 +183,7 @@ test_expect_success 'update-ref -d can delete broken name' '\n '\n \n test_expect_success 'branch -d can delete broken name' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch -d broken...ref >output 2>error &&\n \ttest_i18ngrep \"Deleted branch broken...ref (was broken)\" output &&\n@@ -194,7 +194,7 @@ test_expect_success 'branch -d can delete broken name' '\n '\n \n test_expect_success 'update-ref --no-deref -d can delete symref to broken name' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tprintf \"ref: refs/heads/broken...ref\\n\" >.git/refs/heads/badname &&\n \ttest_when_finished \"rm -f .git/refs/heads/badname\" &&\n@@ -205,7 +205,7 @@ test_expect_success 'update-ref --no-deref -d can delete symref to broken name'\n '\n \n test_expect_success 'branch -d can delete symref to broken name' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tprintf \"ref: refs/heads/broken...ref\\n\" >.git/refs/heads/badname &&\n \ttest_when_finished \"rm -f .git/refs/heads/badname\" &&\n@@ -234,7 +234,7 @@ test_expect_success 'branch -d can delete dangling symref to broken name' '\n '\n \n test_expect_success 'update-ref -d can delete broken name through symref' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tprintf \"ref: refs/heads/broken...ref\\n\" >.git/refs/heads/badname &&\n \ttest_when_finished \"rm -f .git/refs/heads/badname\" &&\n@@ -245,7 +245,7 @@ test_expect_success 'update-ref -d can delete broken name through symref' '\n '\n \n test_expect_success 'update-ref --no-deref -d can delete symref with broken name' '\n-\tprintf \"ref: refs/heads/master\\n\" >.git/refs/heads/broken...symref &&\n+\tprintf \"ref: refs/heads/main\\n\" >.git/refs/heads/broken...symref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...symref\" &&\n \tgit update-ref --no-deref -d refs/heads/broken...symref >output 2>error &&\n \ttest_path_is_missing .git/refs/heads/broken...symref &&\n@@ -254,11 +254,11 @@ test_expect_success 'update-ref --no-deref -d can delete symref with broken name\n '\n \n test_expect_success 'branch -d can delete symref with broken name' '\n-\tprintf \"ref: refs/heads/master\\n\" >.git/refs/heads/broken...symref &&\n+\tprintf \"ref: refs/heads/main\\n\" >.git/refs/heads/broken...symref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...symref\" &&\n \tgit branch -d broken...symref >output 2>error &&\n \ttest_path_is_missing .git/refs/heads/broken...symref &&\n-\ttest_i18ngrep \"Deleted branch broken...symref (was refs/heads/master)\" output &&\n+\ttest_i18ngrep \"Deleted branch broken...symref (was refs/heads/main)\" output &&\n \ttest_must_be_empty error\n '\n \n@@ -296,37 +296,37 @@ test_expect_success 'update-ref -d cannot delete absolute path' '\n '\n \n test_expect_success 'update-ref --stdin fails create with bad ref name' '\n-\techo \"create ~a refs/heads/master\" >stdin &&\n+\techo \"create ~a refs/heads/main\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a\" err\n '\n \n test_expect_success 'update-ref --stdin fails update with bad ref name' '\n-\techo \"update ~a refs/heads/master\" >stdin &&\n+\techo \"update ~a refs/heads/main\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a\" err\n '\n \n test_expect_success 'update-ref --stdin fails delete with bad ref name' '\n-\techo \"delete ~a refs/heads/master\" >stdin &&\n+\techo \"delete ~a refs/heads/main\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a\" err\n '\n \n test_expect_success 'update-ref --stdin -z fails create with bad ref name' '\n-\tprintf \"%s\\0\" \"create ~a \" refs/heads/master >stdin &&\n+\tprintf \"%s\\0\" \"create ~a \" refs/heads/main >stdin &&\n \ttest_must_fail git update-ref -z --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a \" err\n '\n \n test_expect_success 'update-ref --stdin -z fails update with bad ref name' '\n-\tprintf \"%s\\0\" \"update ~a\" refs/heads/master \"\" >stdin &&\n+\tprintf \"%s\\0\" \"update ~a\" refs/heads/main \"\" >stdin &&\n \ttest_must_fail git update-ref -z --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a\" err\n '\n \n test_expect_success 'update-ref --stdin -z fails delete with bad ref name' '\n-\tprintf \"%s\\0\" \"delete ~a\" refs/heads/master >stdin &&\n+\tprintf \"%s\\0\" \"delete ~a\" refs/heads/main >stdin &&\n \ttest_must_fail git update-ref -z --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a\" err\n '\ndiff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh\nindex b17f5c21fb..a30fc5f74a 100755\n--- a/t/t1450-fsck.sh\n+++ b/t/t1450-fsck.sh\n@@ -3,7 +3,7 @@\n test_description='git fsck random collection of tests\n \n * (HEAD) B\n-* (master) A\n+* (main) A\n '\n \n . ./test-lib.sh\ndiff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh\nindex 408b97d5af..a85692ffff 100755\n--- a/t/t1500-rev-parse.sh\n+++ b/t/t1500-rev-parse.sh\n@@ -174,8 +174,8 @@ test_expect_success 'showing the superproject correctly' '\n \ttest_commit -C super/dir/sub branch1_commit &&\n \tgit -C super add dir/sub &&\n \ttest_commit -C super branch1_commit &&\n-\tgit -C super checkout -b branch2 master &&\n-\tgit -C super/dir/sub checkout -b branch2 master &&\n+\tgit -C super checkout -b branch2 main &&\n+\tgit -C super/dir/sub checkout -b branch2 main &&\n \ttest_commit -C super/dir/sub branch2_commit &&\n \tgit -C super add dir/sub &&\n \ttest_commit -C super branch2_commit &&\ndiff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh\nindex dc9fe3cbf1..de63186587 100755\n--- a/t/t1503-rev-parse-verify.sh\n+++ b/t/t1503-rev-parse-verify.sh\n@@ -51,8 +51,8 @@ test_expect_success 'works with one good rev' '\n \ttest \"$rev_hash3\" = \"$HASH3\" &&\n \trev_hash4=$(git rev-parse --verify $HASH4) &&\n \ttest \"$rev_hash4\" = \"$HASH4\" &&\n-\trev_master=$(git rev-parse --verify master) &&\n-\ttest \"$rev_master\" = \"$HASH4\" &&\n+\trev_main=$(git rev-parse --verify main) &&\n+\ttest \"$rev_main\" = \"$HASH4\" &&\n \trev_head=$(git rev-parse --verify HEAD) &&\n \ttest \"$rev_head\" = \"$HASH4\"\n '\n@@ -116,27 +116,27 @@ test_expect_success 'no stdout output on error' '\n '\n \n test_expect_success 'use --default' '\n-\tgit rev-parse --verify --default master &&\n-\tgit rev-parse --verify --default master HEAD &&\n-\tgit rev-parse --default master --verify &&\n-\tgit rev-parse --default master --verify HEAD &&\n-\tgit rev-parse --verify HEAD --default master &&\n-\ttest_must_fail git rev-parse --verify foo --default master &&\n+\tgit rev-parse --verify --default main &&\n+\tgit rev-parse --verify --default main HEAD &&\n+\tgit rev-parse --default main --verify &&\n+\tgit rev-parse --default main --verify HEAD &&\n+\tgit rev-parse --verify HEAD --default main &&\n+\ttest_must_fail git rev-parse --verify foo --default main &&\n \ttest_must_fail git rev-parse --default HEAD --verify bar &&\n \ttest_must_fail git rev-parse --verify --default HEAD baz &&\n \ttest_must_fail git rev-parse --default foo --verify &&\n \ttest_must_fail git rev-parse --verify --default bar\n '\n \n-test_expect_success 'master@{n} for various n' '\n+test_expect_success 'main@{n} for various n' '\n \tN=$(git reflog | wc -l) &&\n \tNm1=$(($N-1)) &&\n \tNp1=$(($N+1)) &&\n-\tgit rev-parse --verify master@{0} &&\n-\tgit rev-parse --verify master@{1} &&\n-\tgit rev-parse --verify master@{$Nm1} &&\n-\ttest_must_fail git rev-parse --verify master@{$N} &&\n-\ttest_must_fail git rev-parse --verify master@{$Np1}\n+\tgit rev-parse --verify main@{0} &&\n+\tgit rev-parse --verify main@{1} &&\n+\tgit rev-parse --verify main@{$Nm1} &&\n+\ttest_must_fail git rev-parse --verify main@{$N} &&\n+\ttest_must_fail git rev-parse --verify main@{$Np1}\n '\n \n test_expect_success SYMLINKS 'ref resolution not confused by broken symlinks' '\ndiff --git a/t/t1505-rev-parse-last.sh b/t/t1505-rev-parse-last.sh\nindex 4969edb314..a64cd4ce14 100755\n--- a/t/t1505-rev-parse-last.sh\n+++ b/t/t1505-rev-parse-last.sh\n@@ -20,12 +20,12 @@ test_expect_success 'setup' '\n \tmake_commit 3 &&\n \tgit checkout side &&\n \tmake_commit 4 &&\n-\tgit merge master &&\n-\tgit checkout master\n+\tgit merge main &&\n+\tgit checkout main\n \n '\n \n-# 1 -- 2 -- 3 master\n+# 1 -- 2 -- 3 main\n #  \\         \\\n #   \\         \\\n #    --- 4 --- 5 side\n@@ -49,7 +49,7 @@ test_expect_success '@{-1}@{1} works' '\n '\n \n test_expect_success '@{-2} works' '\n-\ttest_cmp_rev master @{-2}\n+\ttest_cmp_rev main @{-2}\n '\n \n test_expect_success '@{-3} fails' '\ndiff --git a/t/t1506-rev-parse-diagnosis.sh b/t/t1506-rev-parse-diagnosis.sh\nindex e2ae15a2cf..8b183f1de1 100755\n--- a/t/t1506-rev-parse-diagnosis.sh\n+++ b/t/t1506-rev-parse-diagnosis.sh\n@@ -137,10 +137,10 @@ test_expect_success 'incorrect file in :path and :N:path' '\n '\n \n test_expect_success 'invalid @{n} reference' '\n-\ttest_must_fail git rev-parse master@{99999} >output 2>error &&\n+\ttest_must_fail git rev-parse main@{99999} >output 2>error &&\n \ttest_must_be_empty output &&\n \ttest_i18ngrep \"log for [^ ]* only has [0-9][0-9]* entries\" error  &&\n-\ttest_must_fail git rev-parse --verify master@{99999} >output 2>error &&\n+\ttest_must_fail git rev-parse --verify main@{99999} >output 2>error &&\n \ttest_must_be_empty output &&\n \ttest_i18ngrep \"log for [^ ]* only has [0-9][0-9]* entries\" error\n '\ndiff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh\nindex dfc0d96d8a..d49998ceb6 100755\n--- a/t/t1507-rev-parse-upstream.sh\n+++ b/t/t1507-rev-parse-upstream.sh\n@@ -10,20 +10,20 @@ test_expect_success 'setup' '\n \ttest_commit 1 &&\n \tgit checkout -b side &&\n \ttest_commit 2 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit clone . clone &&\n \ttest_commit 3 &&\n \t(cd clone &&\n \t test_commit 4 &&\n \t git branch --track my-side origin/side &&\n-\t git branch --track local-master master &&\n+\t git branch --track local-main main &&\n \t git branch --track fun@ny origin/side &&\n \t git branch --track @funny origin/side &&\n \t git branch --track funny@ origin/side &&\n-\t git remote add -t master master-only .. &&\n-\t git fetch master-only &&\n+\t git remote add -t main main-only .. &&\n+\t git fetch main-only &&\n \t git branch bad-upstream &&\n-\t git config branch.bad-upstream.remote master-only &&\n+\t git config branch.bad-upstream.remote main-only &&\n \t git config branch.bad-upstream.merge refs/heads/side\n \t)\n '\n@@ -39,7 +39,7 @@ error_message () {\n }\n \n test_expect_success '@{upstream} resolves to correct full name' '\n-\techo refs/remotes/origin/master >expect &&\n+\techo refs/remotes/origin/main >expect &&\n \tgit -C clone rev-parse --symbolic-full-name @{upstream} >actual &&\n \ttest_cmp expect actual &&\n \tgit -C clone rev-parse --symbolic-full-name @{UPSTREAM} >actual &&\n@@ -49,7 +49,7 @@ test_expect_success '@{upstream} resolves to correct full name' '\n '\n \n test_expect_success '@{u} resolves to correct full name' '\n-\techo refs/remotes/origin/master >expect &&\n+\techo refs/remotes/origin/main >expect &&\n \tgit -C clone rev-parse --symbolic-full-name @{u} >actual &&\n \ttest_cmp expect actual &&\n \tgit -C clone rev-parse --symbolic-full-name @{U} >actual &&\n@@ -132,7 +132,7 @@ test_expect_success 'checkout -b new my-side@{u} forks from the same' '\n test_expect_success 'merge my-side@{u} records the correct name' '\n (\n \tcd clone &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_might_fail git branch -D new &&\n \tgit branch -t new my-side@{u} &&\n \tgit merge -s ours new@{u} &&\n@@ -143,24 +143,24 @@ test_expect_success 'merge my-side@{u} records the correct name' '\n '\n \n test_expect_success 'branch -d other@{u}' '\n-\tgit checkout -t -b other master &&\n+\tgit checkout -t -b other main &&\n \tgit branch -d @{u} &&\n-\tgit for-each-ref refs/heads/master >actual &&\n+\tgit for-each-ref refs/heads/main >actual &&\n \ttest_must_be_empty actual\n '\n \n test_expect_success 'checkout other@{u}' '\n-\tgit branch -f master HEAD &&\n-\tgit checkout -t -b another master &&\n+\tgit branch -f main HEAD &&\n+\tgit checkout -t -b another main &&\n \tgit checkout @{u} &&\n \tgit symbolic-ref HEAD >actual &&\n-\techo refs/heads/master >expect &&\n+\techo refs/heads/main >expect &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'branch@{u} works when tracking a local branch' '\n-\techo refs/heads/master >expect &&\n-\tgit -C clone rev-parse --symbolic-full-name local-master@{u} >actual &&\n+\techo refs/heads/main >expect &&\n+\tgit -C clone rev-parse --symbolic-full-name local-main@{u} >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -174,7 +174,7 @@ test_expect_success 'branch@{u} error message when no upstream' '\n \n test_expect_success '@{u} error message when no upstream' '\n \tcat >expect <<-EOF &&\n-\tfatal: no upstream configured for branch ${SQ}master${SQ}\n+\tfatal: no upstream configured for branch ${SQ}main${SQ}\n \tEOF\n \ttest_must_fail git rev-parse --verify @{u} 2>actual &&\n \ttest_i18ncmp expect actual\n@@ -208,14 +208,14 @@ test_expect_success 'branch@{u} error message if upstream branch not fetched' '\n test_expect_success 'pull works when tracking a local branch' '\n (\n \tcd clone &&\n-\tgit checkout local-master &&\n+\tgit checkout local-main &&\n \tgit pull\n )\n '\n \n # makes sense if the previous one succeeded\n test_expect_success '@{u} works when tracking a local branch' '\n-\techo refs/heads/master >expect &&\n+\techo refs/heads/main >expect &&\n \tgit -C clone rev-parse --symbolic-full-name @{u} >actual &&\n \ttest_cmp expect actual\n '\n@@ -224,7 +224,7 @@ test_expect_success 'log -g other@{u}' '\n \tcommit=$(git rev-parse HEAD) &&\n \tcat >expect <<-EOF &&\n \tcommit $commit\n-\tReflog: master@{0} (C O Mitter <committer@example.com>)\n+\tReflog: main@{0} (C O Mitter <committer@example.com>)\n \tReflog message: branch: Created from HEAD\n \tAuthor: A U Thor <author@example.com>\n \tDate:   Thu Apr 7 15:15:13 2005 -0700\n@@ -239,7 +239,7 @@ test_expect_success 'log -g other@{u}@{now}' '\n \tcommit=$(git rev-parse HEAD) &&\n \tcat >expect <<-EOF &&\n \tcommit $commit\n-\tReflog: master@{Thu Apr 7 15:17:13 2005 -0700} (C O Mitter <committer@example.com>)\n+\tReflog: main@{Thu Apr 7 15:17:13 2005 -0700} (C O Mitter <committer@example.com>)\n \tReflog message: branch: Created from HEAD\n \tAuthor: A U Thor <author@example.com>\n \tDate:   Thu Apr 7 15:15:13 2005 -0700\ndiff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh\nindex 4a9964e9dc..bda6e7900c 100755\n--- a/t/t1508-at-combinations.sh\n+++ b/t/t1508-at-combinations.sh\n@@ -30,8 +30,8 @@ fail() {\n }\n \n test_expect_success 'setup' '\n-\ttest_commit master-one &&\n-\ttest_commit master-two &&\n+\ttest_commit main-one &&\n+\ttest_commit main-two &&\n \tgit checkout -b upstream-branch &&\n \ttest_commit upstream-one &&\n \ttest_commit upstream-two &&\n@@ -47,7 +47,7 @@ test_expect_success 'setup' '\n \tgit checkout -b new-branch &&\n \ttest_commit new-one &&\n \ttest_commit new-two &&\n-\tgit branch -u master old-branch &&\n+\tgit branch -u main old-branch &&\n \tgit branch -u upstream-branch new-branch\n '\n \n@@ -62,8 +62,8 @@ check \"@{-1}@{1}\" commit old-one\n check \"@{u}\" ref refs/heads/upstream-branch\n check \"HEAD@{u}\" ref refs/heads/upstream-branch\n check \"@{u}@{1}\" commit upstream-one\n-check \"@{-1}@{u}\" ref refs/heads/master\n-check \"@{-1}@{u}@{1}\" commit master-one\n+check \"@{-1}@{u}\" ref refs/heads/main\n+check \"@{-1}@{u}@{1}\" commit main-one\n check \"@\" commit new-two\n check \"@@{u}\" ref refs/heads/upstream-branch\n check \"@@/at-test\" ref refs/heads/@@/at-test\ndiff --git a/t/t1511-rev-parse-caret.sh b/t/t1511-rev-parse-caret.sh\nindex e0a49a651f..cc324bea52 100755\n--- a/t/t1511-rev-parse-caret.sh\n+++ b/t/t1511-rev-parse-caret.sh\n@@ -15,7 +15,7 @@ test_expect_success 'setup' '\n \tgit commit -m Initial &&\n \tgit tag -a -m commit commit-tag &&\n \tgit branch ref &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo modified >>a-blob &&\n \tgit add -u &&\n \tgit commit -m Modified &&\n@@ -73,52 +73,52 @@ test_expect_success 'ref^{tag}' '\n '\n \n test_expect_success 'ref^{/.}' '\n-\tgit rev-parse master >expected &&\n-\tgit rev-parse master^{/.} >actual &&\n+\tgit rev-parse main >expected &&\n+\tgit rev-parse main^{/.} >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'ref^{/non-existent}' '\n-\ttest_must_fail git rev-parse master^{/non-existent}\n+\ttest_must_fail git rev-parse main^{/non-existent}\n '\n \n test_expect_success 'ref^{/Initial}' '\n \tgit rev-parse ref >expected &&\n-\tgit rev-parse master^{/Initial} >actual &&\n+\tgit rev-parse main^{/Initial} >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'ref^{/!Exp}' '\n-\ttest_must_fail git rev-parse master^{/!Exp}\n+\ttest_must_fail git rev-parse main^{/!Exp}\n '\n \n test_expect_success 'ref^{/!}' '\n-\ttest_must_fail git rev-parse master^{/!}\n+\ttest_must_fail git rev-parse main^{/!}\n '\n \n test_expect_success 'ref^{/!!Exp}' '\n \tgit rev-parse expref >expected &&\n-\tgit rev-parse master^{/!!Exp} >actual &&\n+\tgit rev-parse main^{/!!Exp} >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'ref^{/!-}' '\n-\ttest_must_fail git rev-parse master^{/!-}\n+\ttest_must_fail git rev-parse main^{/!-}\n '\n \n test_expect_success 'ref^{/!-.}' '\n-\ttest_must_fail git rev-parse master^{/!-.}\n+\ttest_must_fail git rev-parse main^{/!-.}\n '\n \n test_expect_success 'ref^{/!-non-existent}' '\n-\tgit rev-parse master >expected &&\n-\tgit rev-parse master^{/!-non-existent} >actual &&\n+\tgit rev-parse main >expected &&\n+\tgit rev-parse main^{/!-non-existent} >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'ref^{/!-Changed}' '\n \tgit rev-parse expref >expected &&\n-\tgit rev-parse master^{/!-Changed} >actual &&\n+\tgit rev-parse main^{/!-Changed} >actual &&\n \ttest_cmp expected actual\n '\n \ndiff --git a/t/t1512-rev-parse-disambiguation.sh b/t/t1512-rev-parse-disambiguation.sh\nindex 18fa6cf40d..6b4481d36b 100755\n--- a/t/t1512-rev-parse-disambiguation.sh\n+++ b/t/t1512-rev-parse-disambiguation.sh\n@@ -212,7 +212,7 @@ test_expect_success 'more history' '\n \tside=$(git rev-parse HEAD) &&\n \n \t# commit 000000000066\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \t# If you use recursive, merge will fail and you will need to\n \t# clean up a0blgqsjc as well.  If you use resolve, merge will\ndiff --git a/t/t1513-rev-parse-prefix.sh b/t/t1513-rev-parse-prefix.sh\nindex 87ec3ae714..f77e59121c 100755\n--- a/t/t1513-rev-parse-prefix.sh\n+++ b/t/t1513-rev-parse-prefix.sh\n@@ -76,9 +76,9 @@ test_expect_success 'disambiguate path with valid prefix' '\n '\n \n test_expect_success 'file and refs with prefix' '\n-\tgit rev-parse --prefix sub1/ master file1 >actual &&\n+\tgit rev-parse --prefix sub1/ main file1 >actual &&\n \tcat <<-EOF >expected &&\n-\t$(git rev-parse master)\n+\t$(git rev-parse main)\n \tsub1/file1\n \tEOF\n \ttest_cmp expected actual\ndiff --git a/t/t1514-rev-parse-push.sh b/t/t1514-rev-parse-push.sh\nindex 788cc91e45..e85b222e99 100755\n--- a/t/t1514-rev-parse-push.sh\n+++ b/t/t1514-rev-parse-push.sh\n@@ -16,24 +16,24 @@ test_expect_success 'setup' '\n \tgit remote add other other.git &&\n \ttest_commit base &&\n \tgit push origin HEAD &&\n-\tgit branch --set-upstream-to=origin/master master &&\n-\tgit branch --track topic origin/master &&\n+\tgit branch --set-upstream-to=origin/main main &&\n+\tgit branch --track topic origin/main &&\n \tgit push origin topic &&\n \tgit push other topic\n '\n \n test_expect_success '@{push} with default=nothing' '\n \ttest_config push.default nothing &&\n-\ttest_must_fail git rev-parse master@{push} &&\n-\ttest_must_fail git rev-parse master@{PUSH} &&\n-\ttest_must_fail git rev-parse master@{PuSH}\n+\ttest_must_fail git rev-parse main@{push} &&\n+\ttest_must_fail git rev-parse main@{PUSH} &&\n+\ttest_must_fail git rev-parse main@{PuSH}\n '\n \n test_expect_success '@{push} with default=simple' '\n \ttest_config push.default simple &&\n-\tresolve master@{push} refs/remotes/origin/master &&\n-\tresolve master@{PUSH} refs/remotes/origin/master &&\n-\tresolve master@{pUSh} refs/remotes/origin/master\n+\tresolve main@{push} refs/remotes/origin/main &&\n+\tresolve main@{PUSH} refs/remotes/origin/main &&\n+\tresolve main@{pUSh} refs/remotes/origin/main\n '\n \n test_expect_success 'triangular @{push} fails with default=simple' '\ndiff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh\nindex 12a5568844..f3309045fe 100755\n--- a/t/t1700-split-index.sh\n+++ b/t/t1700-split-index.sh\n@@ -496,7 +496,7 @@ test_expect_success 'do not refresh null base index' '\n \t\ttest_commit initial &&\n \t\tgit checkout -b side-branch &&\n \t\ttest_commit extra &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit update-index --split-index &&\n \t\ttest_commit more &&\n \t\t# must not write a new shareindex, or we wont catch the problem\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex a863ccee7e..126004e342 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -256,6 +256,13 @@ case \"$TRASH_DIRECTORY\" in\n  *) TRASH_DIRECTORY=\"$TEST_OUTPUT_DIRECTORY/$TRASH_DIRECTORY\" ;;\n esac\n \n+case \"$TEST_NUMBER\" in\n+[01]*)\n+\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n+\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\t;;\n+esac\n+\n # If --stress was passed, run this test repeatedly in several parallel loops.\n if test \"$GIT_TEST_STRESS_STARTED\" = \"done\"\n then\n-- \ngitgitgadget\n\n"},{"id":"410090","messageId":"6ff4594a28f6b7d5b31d6f0eaa4af814c7e85ce4.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 09/27] t5323: prepare centered comment for `master` -> `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:09Z","receivedAt":"2020-11-17T16:13:00Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe are about to search-and-replace all mentions of `master` in t5323 by\n`main`, which is two characters shorter. To prepare for that, let's add\npadding to centered lines that will make them briefly uncentered, but\nwill be re-centered in the commit that performs that rename.\n\nDoing it this way (instead of padding after replacing) makes it easier\nto verify the validity of the patch that replaces `master` by `main`.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5323-pack-redundant.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh\nindex 6b4d1ca353..3903148926 100755\n--- a/t/t5323-pack-redundant.sh\n+++ b/t/t5323-pack-redundant.sh\n@@ -312,7 +312,7 @@ test_expect_success 'shared: all packs are redundant, but no output without --al\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================ master.git ===============\n+#     ================= master.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------+\n #     ----+--------------------------------------             |\n #     P1  | x x x x x x x                       x             |\n@@ -394,7 +394,7 @@ test_expect_success 'shared: no redundant without --alt-odb' '\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================ master.git ===============\n+#     ================= master.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------------+\n #     ----+--------------------------------------                   |\n #     P1  | x x x x x x x                       x                   |\n@@ -426,7 +426,7 @@ test_expect_success 'shared: one pack is redundant with --alt-odb' '\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================ master.git ===============\n+#     ================= master.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------------+\n #     ----+--------------------------------------                   |\n #     P1  | x x x x x x x                       x                   |\n-- \ngitgitgadget\n\n"},{"id":"410092","messageId":"aee29a0528462137af6811d22da50dfcad585b84.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 04/27] t3[0-3]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:04Z","receivedAt":"2020-11-17T16:13:00Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t3[0-3]*.sh t3206/*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3040-subprojects-basic.sh          |   2 +-\n t/t3200-branch.sh                     | 242 +++++++++++++-------------\n t/t3201-branch-contains.sh            |  80 ++++-----\n t/t3202-show-branch-octopus.sh        |   2 +-\n t/t3203-branch-output.sh              |  38 ++--\n t/t3204-branch-name-interpretation.sh |   6 +-\n t/t3205-branch-color.sh               |   6 +-\n t/t3206-range-diff.sh                 |  40 ++---\n t/t3206/history.export                |   2 +-\n t/t3210-pack-refs.sh                  |   4 +-\n t/t3211-peel-ref.sh                   |   4 +-\n t/t3301-notes.sh                      |   6 +-\n t/t3302-notes-index-expensive.sh      |   2 +-\n t/t3303-notes-subtrees.sh             |   8 +-\n t/t3304-notes-mixed.sh                |   8 +-\n t/t3308-notes-merge.sh                |   2 +-\n t/t3320-notes-merge-worktrees.sh      |   4 +-\n t/test-lib.sh                         |   2 +-\n 18 files changed, 229 insertions(+), 229 deletions(-)\n\ndiff --git a/t/t3040-subprojects-basic.sh b/t/t3040-subprojects-basic.sh\nindex b81eb5fd6f..f3ea8dcf58 100755\n--- a/t/t3040-subprojects-basic.sh\n+++ b/t/t3040-subprojects-basic.sh\n@@ -80,6 +80,6 @@ test_expect_success 'checkout in superproject' '\n '\n \n # just interesting what happened...\n-# git diff --name-status -M save master\n+# git diff --name-status -M save main\n \n test_done\ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex a0b832d59e..63036e0369 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -28,7 +28,7 @@ test_expect_success 'branch -h in broken repository' '\n \t(\n \t\tcd broken &&\n \t\tgit init &&\n-\t\t>.git/refs/heads/master &&\n+\t\t>.git/refs/heads/main &&\n \t\ttest_expect_code 129 git branch -h >usage 2>&1\n \t) &&\n \ttest_i18ngrep \"[Uu]sage\" broken/usage\n@@ -42,8 +42,8 @@ test_expect_success 'git branch a/b/c should create a branch' '\n \tgit branch a/b/c && test_path_is_file .git/refs/heads/a/b/c\n '\n \n-test_expect_success 'git branch mb master... should create a branch' '\n-\tgit branch mb master... && test_path_is_file .git/refs/heads/mb\n+test_expect_success 'git branch mb main... should create a branch' '\n+\tgit branch mb main... && test_path_is_file .git/refs/heads/mb\n '\n \n test_expect_success 'git branch HEAD should fail' '\n@@ -51,7 +51,7 @@ test_expect_success 'git branch HEAD should fail' '\n '\n \n cat >expect <<EOF\n-$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tbranch: Created from master\n+$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tbranch: Created from main\n EOF\n test_expect_success 'git branch --create-reflog d/e/f should create a branch and a log' '\n \tGIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n@@ -110,7 +110,7 @@ test_expect_success 'git branch -m n/n n should work' '\n \n test_expect_success 'git branch -m bbb should rename checked out branch' '\n \ttest_when_finished git branch -D bbb &&\n-\ttest_when_finished git checkout master &&\n+\ttest_when_finished git checkout main &&\n \tgit checkout -b aaa &&\n \tgit commit --allow-empty -m \"a new commit\" &&\n \tgit rev-parse aaa@{0} >expect &&\n@@ -124,7 +124,7 @@ test_expect_success 'git branch -m bbb should rename checked out branch' '\n \n test_expect_success 'renaming checked out branch works with d/f conflict' '\n \ttest_when_finished \"git branch -D foo/bar || git branch -D foo\" &&\n-\ttest_when_finished git checkout master &&\n+\ttest_when_finished git checkout main &&\n \tgit checkout -b foo &&\n \tgit branch -m foo/bar &&\n \tgit symbolic-ref HEAD >actual &&\n@@ -185,7 +185,7 @@ test_expect_success 'git branch -M should leave orphaned HEAD alone' '\n \t\tgit checkout --orphan lonely &&\n \t\tgrep lonely .git/HEAD &&\n \t\ttest_path_is_missing .git/refs/head/lonely &&\n-\t\tgit branch -M master mistress &&\n+\t\tgit branch -M main mistress &&\n \t\tgrep lonely .git/HEAD\n \t)\n '\n@@ -201,7 +201,7 @@ test_expect_success 'resulting reflog can be shown by log -g' '\n '\n \n test_expect_success 'git branch -M baz bam should succeed when baz is checked out as linked working tree' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit worktree add -b baz bazdir &&\n \tgit worktree add -f bazdir2 baz &&\n \tgit branch -M baz bam &&\n@@ -224,18 +224,18 @@ test_expect_success 'git branch -M baz bam should succeed within a worktree in w\n \tgit worktree prune\n '\n \n-test_expect_success 'git branch -M master should work when master is checked out' '\n-\tgit checkout master &&\n-\tgit branch -M master\n+test_expect_success 'git branch -M main should work when main is checked out' '\n+\tgit checkout main &&\n+\tgit branch -M main\n '\n \n-test_expect_success 'git branch -M master master should work when master is checked out' '\n-\tgit checkout master &&\n-\tgit branch -M master master\n+test_expect_success 'git branch -M main main should work when main is checked out' '\n+\tgit checkout main &&\n+\tgit branch -M main main\n '\n \n-test_expect_success 'git branch -M topic topic should work when master is checked out' '\n-\tgit checkout master &&\n+test_expect_success 'git branch -M topic topic should work when main is checked out' '\n+\tgit checkout main &&\n \tgit branch topic &&\n \tgit branch -M topic topic\n '\n@@ -292,8 +292,8 @@ test_expect_success 'bare main worktree has HEAD at branch deleted by secondary\n \tgit init nonbare &&\n \ttest_commit -C nonbare x &&\n \tgit clone --bare nonbare bare &&\n-\tgit -C bare worktree add --detach ../secondary master &&\n-\tgit -C secondary branch -D master\n+\tgit -C bare worktree add --detach ../secondary main &&\n+\tgit -C secondary branch -D main\n '\n \n test_expect_success 'git branch --list -v with --abbrev' '\n@@ -345,7 +345,7 @@ test_expect_success 'git branch --column with an extremely long branch name' '\n   j/k\n   l\n   m/m\n-* master\n+* main\n   mb\n   n\n   o/o\n@@ -388,7 +388,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch -v with column.ui ignore\n   j/k\n   l\n   m/m\n-* master\n+* main\n   mb\n   n\n   o/o\n@@ -427,8 +427,8 @@ test_expect_success 'config information was renamed, too' '\n '\n \n test_expect_success 'git branch -m correctly renames multiple config sections' '\n-\ttest_when_finished \"git checkout master\" &&\n-\tgit checkout -b source master &&\n+\ttest_when_finished \"git checkout main\" &&\n+\tgit checkout -b source main &&\n \n \t# Assert that a config file with multiple config sections has\n \t# those sections preserved...\n@@ -587,18 +587,18 @@ test_expect_success 'git branch -C c1 c2 should never touch HEAD' '\n \t! grep \"$msg$\" .git/logs/HEAD\n '\n \n-test_expect_success 'git branch -C master should work when master is checked out' '\n-\tgit checkout master &&\n-\tgit branch -C master\n+test_expect_success 'git branch -C main should work when main is checked out' '\n+\tgit checkout main &&\n+\tgit branch -C main\n '\n \n-test_expect_success 'git branch -C master master should work when master is checked out' '\n-\tgit checkout master &&\n-\tgit branch -C master master\n+test_expect_success 'git branch -C main main should work when main is checked out' '\n+\tgit checkout main &&\n+\tgit branch -C main main\n '\n \n-test_expect_success 'git branch -C main5 main5 should work when master is checked out' '\n-\tgit checkout master &&\n+test_expect_success 'git branch -C main5 main5 should work when main is checked out' '\n+\tgit checkout main &&\n \tgit branch main5 &&\n \tgit branch -C main5 main5\n '\n@@ -620,8 +620,8 @@ test_expect_success 'git branch -C ab cd should overwrite existing config for cd\n test_expect_success 'git branch -c correctly copies multiple config sections' '\n \tFOO=1 &&\n \texport FOO &&\n-\ttest_when_finished \"git checkout master\" &&\n-\tgit checkout -b source2 master &&\n+\ttest_when_finished \"git checkout main\" &&\n+\tgit checkout -b source2 main &&\n \n \t# Assert that a config file with multiple config sections has\n \t# those sections preserved...\n@@ -711,10 +711,10 @@ test_expect_success 'deleting a self-referential symref' '\n '\n \n test_expect_success 'renaming a symref is not allowed' '\n-\tgit symbolic-ref refs/heads/topic refs/heads/master &&\n+\tgit symbolic-ref refs/heads/topic refs/heads/main &&\n \ttest_must_fail git branch -m topic new-topic &&\n \tgit symbolic-ref refs/heads/topic &&\n-\ttest_path_is_file .git/refs/heads/master &&\n+\ttest_path_is_file .git/refs/heads/main &&\n \ttest_path_is_missing .git/refs/heads/new-topic\n '\n \n@@ -728,27 +728,27 @@ test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for\n test_expect_success 'test tracking setup via --track' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track my1 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track my1 local/main &&\n \ttest $(git config branch.my1.remote) = local &&\n-\ttest $(git config branch.my1.merge) = refs/heads/master\n+\ttest $(git config branch.my1.merge) = refs/heads/main\n '\n \n test_expect_success 'test tracking setup (non-wildcard, matching)' '\n \tgit config remote.local.url . &&\n-\tgit config remote.local.fetch refs/heads/master:refs/remotes/local/master &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track my4 local/master &&\n+\tgit config remote.local.fetch refs/heads/main:refs/remotes/local/main &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track my4 local/main &&\n \ttest $(git config branch.my4.remote) = local &&\n-\ttest $(git config branch.my4.merge) = refs/heads/master\n+\ttest $(git config branch.my4.merge) = refs/heads/main\n '\n \n test_expect_success 'tracking setup fails on non-matching refspec' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit config remote.local.fetch refs/heads/s:refs/remotes/local/s &&\n-\ttest_must_fail git branch --track my5 local/master &&\n+\ttest_must_fail git branch --track my5 local/main &&\n \ttest_must_fail git config branch.my5.remote &&\n \ttest_must_fail git config branch.my5.merge\n '\n@@ -757,21 +757,21 @@ test_expect_success 'test tracking setup via config' '\n \tgit config branch.autosetupmerge true &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch my3 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch my3 local/main &&\n \ttest $(git config branch.my3.remote) = local &&\n-\ttest $(git config branch.my3.merge) = refs/heads/master\n+\ttest $(git config branch.my3.merge) = refs/heads/main\n '\n \n test_expect_success 'test overriding tracking setup via --no-track' '\n \tgit config branch.autosetupmerge true &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track my2 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track my2 local/main &&\n \tgit config branch.autosetupmerge false &&\n \t! test \"$(git config branch.my2.remote)\" = local &&\n-\t! test \"$(git config branch.my2.merge)\" = refs/heads/master\n+\t! test \"$(git config branch.my2.merge)\" = refs/heads/main\n '\n \n test_expect_success 'no tracking without .fetch entries' '\n@@ -836,26 +836,26 @@ test_expect_success 'branch from tag w/--track causes failure' '\n \n test_expect_success '--set-upstream-to fails on multiple branches' '\n \techo \"fatal: too many arguments to set new upstream\" >expect &&\n-\ttest_must_fail git branch --set-upstream-to master a b c 2>err &&\n+\ttest_must_fail git branch --set-upstream-to main a b c 2>err &&\n \ttest_i18ncmp expect err\n '\n \n test_expect_success '--set-upstream-to fails on detached HEAD' '\n \tgit checkout HEAD^{} &&\n \ttest_when_finished git checkout - &&\n-\techo \"fatal: could not set upstream of HEAD to master when it does not point to any branch.\" >expect &&\n-\ttest_must_fail git branch --set-upstream-to master 2>err &&\n+\techo \"fatal: could not set upstream of HEAD to main when it does not point to any branch.\" >expect &&\n+\ttest_must_fail git branch --set-upstream-to main 2>err &&\n \ttest_i18ncmp expect err\n '\n \n test_expect_success '--set-upstream-to fails on a missing dst branch' '\n \techo \"fatal: branch '\"'\"'does-not-exist'\"'\"' does not exist\" >expect &&\n-\ttest_must_fail git branch --set-upstream-to master does-not-exist 2>err &&\n+\ttest_must_fail git branch --set-upstream-to main does-not-exist 2>err &&\n \ttest_i18ncmp expect err\n '\n \n test_expect_success '--set-upstream-to fails on a missing src branch' '\n-\ttest_must_fail git branch --set-upstream-to does-not-exist master 2>err &&\n+\ttest_must_fail git branch --set-upstream-to does-not-exist main 2>err &&\n \ttest_i18ngrep \"the requested upstream branch '\"'\"'does-not-exist'\"'\"' does not exist\" err\n '\n \n@@ -874,20 +874,20 @@ test_expect_success '--set-upstream-to fails on locked config' '\n '\n \n test_expect_success 'use --set-upstream-to modify HEAD' '\n-\ttest_config branch.master.remote foo &&\n-\ttest_config branch.master.merge foo &&\n+\ttest_config branch.main.remote foo &&\n+\ttest_config branch.main.merge foo &&\n \tgit branch my12 &&\n \tgit branch --set-upstream-to my12 &&\n-\ttest \"$(git config branch.master.remote)\" = \".\" &&\n-\ttest \"$(git config branch.master.merge)\" = \"refs/heads/my12\"\n+\ttest \"$(git config branch.main.remote)\" = \".\" &&\n+\ttest \"$(git config branch.main.merge)\" = \"refs/heads/my12\"\n '\n \n test_expect_success 'use --set-upstream-to modify a particular branch' '\n \tgit branch my13 &&\n-\tgit branch --set-upstream-to master my13 &&\n+\tgit branch --set-upstream-to main my13 &&\n \ttest_when_finished \"git branch --unset-upstream my13\" &&\n \ttest \"$(git config branch.my13.remote)\" = \".\" &&\n-\ttest \"$(git config branch.my13.merge)\" = \"refs/heads/master\"\n+\ttest \"$(git config branch.my13.merge)\" = \"refs/heads/main\"\n '\n \n test_expect_success '--unset-upstream should fail if given a non-existent branch' '\n@@ -906,14 +906,14 @@ test_expect_success '--unset-upstream should fail if config is locked' '\n \n test_expect_success 'test --unset-upstream on HEAD' '\n \tgit branch my14 &&\n-\ttest_config branch.master.remote foo &&\n-\ttest_config branch.master.merge foo &&\n+\ttest_config branch.main.remote foo &&\n+\ttest_config branch.main.merge foo &&\n \tgit branch --set-upstream-to my14 &&\n \tgit branch --unset-upstream &&\n-\ttest_must_fail git config branch.master.remote &&\n-\ttest_must_fail git config branch.master.merge &&\n+\ttest_must_fail git config branch.main.remote &&\n+\ttest_must_fail git config branch.main.merge &&\n \t# fail for a branch without upstream set\n-\techo \"fatal: Branch '\"'\"'master'\"'\"' has no upstream information\" >expect &&\n+\techo \"fatal: Branch '\"'\"'main'\"'\"' has no upstream information\" >expect &&\n \ttest_must_fail git branch --unset-upstream 2>err &&\n \ttest_i18ncmp expect err\n '\n@@ -934,14 +934,14 @@ test_expect_success '--unset-upstream should fail on detached HEAD' '\n \n test_expect_success 'test --unset-upstream on a particular branch' '\n \tgit branch my15 &&\n-\tgit branch --set-upstream-to master my14 &&\n+\tgit branch --set-upstream-to main my14 &&\n \tgit branch --unset-upstream my14 &&\n \ttest_must_fail git config branch.my14.remote &&\n \ttest_must_fail git config branch.my14.merge\n '\n \n test_expect_success 'disabled option --set-upstream fails' '\n-\ttest_must_fail git branch --set-upstream origin/master\n+\ttest_must_fail git branch --set-upstream origin/main\n '\n \n test_expect_success '--set-upstream-to notices an error to set branch as own upstream' '\n@@ -956,32 +956,32 @@ test_expect_success '--set-upstream-to notices an error to set branch as own ups\n \n # Keep this test last, as it changes the current branch\n cat >expect <<EOF\n-$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tbranch: Created from master\n+$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tbranch: Created from main\n EOF\n test_expect_success 'git checkout -b g/h/i -l should create a branch and a log' '\n \tGIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n-\tgit checkout -b g/h/i -l master &&\n+\tgit checkout -b g/h/i -l main &&\n \ttest_path_is_file .git/refs/heads/g/h/i &&\n \ttest_path_is_file .git/logs/refs/heads/g/h/i &&\n \ttest_cmp expect .git/logs/refs/heads/g/h/i\n '\n \n test_expect_success 'checkout -b makes reflog by default' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config --unset core.logAllRefUpdates &&\n \tgit checkout -b alpha &&\n \tgit rev-parse --verify alpha@{0}\n '\n \n test_expect_success 'checkout -b does not make reflog when core.logAllRefUpdates = false' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config core.logAllRefUpdates false &&\n \tgit checkout -b beta &&\n \ttest_must_fail git rev-parse --verify beta@{0}\n '\n \n test_expect_success 'checkout -b with -l makes reflog when core.logAllRefUpdates = false' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -lb gamma &&\n \tgit config --unset core.logAllRefUpdates &&\n \tgit rev-parse --verify gamma@{0}\n@@ -990,10 +990,10 @@ test_expect_success 'checkout -b with -l makes reflog when core.logAllRefUpdates\n test_expect_success 'avoid ambiguous track' '\n \tgit config branch.autosetupmerge true &&\n \tgit config remote.ambi1.url lalala &&\n-\tgit config remote.ambi1.fetch refs/heads/lalala:refs/heads/master &&\n+\tgit config remote.ambi1.fetch refs/heads/lalala:refs/heads/main &&\n \tgit config remote.ambi2.url lilili &&\n-\tgit config remote.ambi2.fetch refs/heads/lilili:refs/heads/master &&\n-\ttest_must_fail git branch all1 master &&\n+\tgit config remote.ambi2.fetch refs/heads/lilili:refs/heads/main &&\n+\ttest_must_fail git branch all1 main &&\n \ttest -z \"$(git config branch.all1.merge)\"\n '\n \n@@ -1049,10 +1049,10 @@ test_expect_success 'autosetuprebase local on a tracked remote branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n \tgit config branch.autosetuprebase local &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track myr5 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track myr5 local/main &&\n \ttest \"$(git config branch.myr5.remote)\" = local &&\n-\ttest \"$(git config branch.myr5.merge)\" = refs/heads/master &&\n+\ttest \"$(git config branch.myr5.merge)\" = refs/heads/main &&\n \t! test \"$(git config branch.myr5.rebase)\" = true\n '\n \n@@ -1060,10 +1060,10 @@ test_expect_success 'autosetuprebase never on a tracked remote branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n \tgit config branch.autosetuprebase never &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track myr6 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track myr6 local/main &&\n \ttest \"$(git config branch.myr6.remote)\" = local &&\n-\ttest \"$(git config branch.myr6.merge)\" = refs/heads/master &&\n+\ttest \"$(git config branch.myr6.merge)\" = refs/heads/main &&\n \t! test \"$(git config branch.myr6.rebase)\" = true\n '\n \n@@ -1071,10 +1071,10 @@ test_expect_success 'autosetuprebase remote on a tracked remote branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n \tgit config branch.autosetuprebase remote &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track myr7 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track myr7 local/main &&\n \ttest \"$(git config branch.myr7.remote)\" = local &&\n-\ttest \"$(git config branch.myr7.merge)\" = refs/heads/master &&\n+\ttest \"$(git config branch.myr7.merge)\" = refs/heads/main &&\n \ttest \"$(git config branch.myr7.rebase)\" = true\n '\n \n@@ -1082,10 +1082,10 @@ test_expect_success 'autosetuprebase always on a tracked remote branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n \tgit config branch.autosetuprebase remote &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track myr8 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track myr8 local/main &&\n \ttest \"$(git config branch.myr8.remote)\" = local &&\n-\ttest \"$(git config branch.myr8.merge)\" = refs/heads/master &&\n+\ttest \"$(git config branch.myr8.merge)\" = refs/heads/main &&\n \ttest \"$(git config branch.myr8.rebase)\" = true\n '\n \n@@ -1093,10 +1093,10 @@ test_expect_success 'autosetuprebase unconfigured on a tracked remote branch' '\n \tgit config --unset branch.autosetuprebase &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track myr9 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track myr9 local/main &&\n \ttest \"$(git config branch.myr9.remote)\" = local &&\n-\ttest \"$(git config branch.myr9.merge)\" = refs/heads/master &&\n+\ttest \"$(git config branch.myr9.merge)\" = refs/heads/main &&\n \ttest \"z$(git config branch.myr9.rebase)\" = z\n '\n \n@@ -1114,7 +1114,7 @@ test_expect_success 'autosetuprebase unconfigured on a tracked local branch' '\n test_expect_success 'autosetuprebase unconfigured on untracked local branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit branch --no-track myr11 mybase2 &&\n \ttest \"z$(git config branch.myr11.remote)\" = z &&\n \ttest \"z$(git config branch.myr11.merge)\" = z &&\n@@ -1124,8 +1124,8 @@ test_expect_success 'autosetuprebase unconfigured on untracked local branch' '\n test_expect_success 'autosetuprebase unconfigured on untracked remote branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track myr12 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track myr12 local/main &&\n \ttest \"z$(git config branch.myr12.remote)\" = z &&\n \ttest \"z$(git config branch.myr12.merge)\" = z &&\n \ttest \"z$(git config branch.myr12.rebase)\" = z\n@@ -1135,7 +1135,7 @@ test_expect_success 'autosetuprebase never on an untracked local branch' '\n \tgit config branch.autosetuprebase never &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit branch --no-track myr13 mybase2 &&\n \ttest \"z$(git config branch.myr13.remote)\" = z &&\n \ttest \"z$(git config branch.myr13.merge)\" = z &&\n@@ -1146,7 +1146,7 @@ test_expect_success 'autosetuprebase local on an untracked local branch' '\n \tgit config branch.autosetuprebase local &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit branch --no-track myr14 mybase2 &&\n \ttest \"z$(git config branch.myr14.remote)\" = z &&\n \ttest \"z$(git config branch.myr14.merge)\" = z &&\n@@ -1157,7 +1157,7 @@ test_expect_success 'autosetuprebase remote on an untracked local branch' '\n \tgit config branch.autosetuprebase remote &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit branch --no-track myr15 mybase2 &&\n \ttest \"z$(git config branch.myr15.remote)\" = z &&\n \ttest \"z$(git config branch.myr15.merge)\" = z &&\n@@ -1168,7 +1168,7 @@ test_expect_success 'autosetuprebase always on an untracked local branch' '\n \tgit config branch.autosetuprebase always &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit branch --no-track myr16 mybase2 &&\n \ttest \"z$(git config branch.myr16.remote)\" = z &&\n \ttest \"z$(git config branch.myr16.merge)\" = z &&\n@@ -1179,8 +1179,8 @@ test_expect_success 'autosetuprebase never on an untracked remote branch' '\n \tgit config branch.autosetuprebase never &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track myr17 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track myr17 local/main &&\n \ttest \"z$(git config branch.myr17.remote)\" = z &&\n \ttest \"z$(git config branch.myr17.merge)\" = z &&\n \ttest \"z$(git config branch.myr17.rebase)\" = z\n@@ -1190,8 +1190,8 @@ test_expect_success 'autosetuprebase local on an untracked remote branch' '\n \tgit config branch.autosetuprebase local &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track myr18 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track myr18 local/main &&\n \ttest \"z$(git config branch.myr18.remote)\" = z &&\n \ttest \"z$(git config branch.myr18.merge)\" = z &&\n \ttest \"z$(git config branch.myr18.rebase)\" = z\n@@ -1201,8 +1201,8 @@ test_expect_success 'autosetuprebase remote on an untracked remote branch' '\n \tgit config branch.autosetuprebase remote &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track myr19 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track myr19 local/main &&\n \ttest \"z$(git config branch.myr19.remote)\" = z &&\n \ttest \"z$(git config branch.myr19.merge)\" = z &&\n \ttest \"z$(git config branch.myr19.rebase)\" = z\n@@ -1212,8 +1212,8 @@ test_expect_success 'autosetuprebase always on an untracked remote branch' '\n \tgit config branch.autosetuprebase always &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track myr20 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track myr20 local/main &&\n \ttest \"z$(git config branch.myr20.remote)\" = z &&\n \ttest \"z$(git config branch.myr20.merge)\" = z &&\n \ttest \"z$(git config branch.myr20.rebase)\" = z\n@@ -1221,7 +1221,7 @@ test_expect_success 'autosetuprebase always on an untracked remote branch' '\n \n test_expect_success 'autosetuprebase always on detached HEAD' '\n \tgit config branch.autosetupmerge always &&\n-\ttest_when_finished git checkout master &&\n+\ttest_when_finished git checkout main &&\n \tgit checkout HEAD^0 &&\n \tgit branch my11 &&\n \ttest -z \"$(git config branch.my11.remote)\" &&\n@@ -1249,18 +1249,18 @@ test_expect_success 'attempt to delete a branch without base and unmerged to HEA\n test_expect_success 'attempt to delete a branch merged to its base' '\n \t# we are on my9 which is the initial commit; traditionally\n \t# we would not have allowed deleting my8 that is not merged\n-\t# to my9, but it is set to track master that already has my8\n-\tgit config branch.my8.merge refs/heads/master &&\n+\t# to my9, but it is set to track main that already has my8\n+\tgit config branch.my8.merge refs/heads/main &&\n \tgit branch -d my8\n '\n \n test_expect_success 'attempt to delete a branch merged to its base' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo Third >>A &&\n \tgit commit -m \"Third commit\" A &&\n \tgit branch -t my10 my9 &&\n \tgit branch -f my10 HEAD^ &&\n-\t# we are on master which is at the third commit, and my10\n+\t# we are on main which is at the third commit, and my10\n \t# is behind us, so traditionally we would have allowed deleting\n \t# it; but my10 is set to track my9 that is further behind.\n \ttest_must_fail git branch -d my10\n@@ -1287,7 +1287,7 @@ test_expect_success 'detect typo in branch name when using --edit-description' '\n '\n \n test_expect_success 'refuse --edit-description on unborn branch for now' '\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \twrite_script editor <<-\\EOF &&\n \t\techo \"New contents\" >\"$1\"\n \tEOF\n@@ -1301,18 +1301,18 @@ test_expect_success '--merged catches invalid object names' '\n \n test_expect_success '--list during rebase' '\n \ttest_when_finished \"reset_rebase\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tFAKE_LINES=\"1 edit 2\" &&\n \texport FAKE_LINES &&\n \tset_fake_editor &&\n \tgit rebase -i HEAD~2 &&\n \tgit branch --list >actual &&\n-\ttest_i18ngrep \"rebasing master\" actual\n+\ttest_i18ngrep \"rebasing main\" actual\n '\n \n test_expect_success '--list during rebase from detached HEAD' '\n-\ttest_when_finished \"reset_rebase && git checkout master\" &&\n-\tgit checkout master^0 &&\n+\ttest_when_finished \"reset_rebase && git checkout main\" &&\n+\tgit checkout main^0 &&\n \toid=$(git rev-parse --short HEAD) &&\n \tFAKE_LINES=\"1 edit 2\" &&\n \texport FAKE_LINES &&\n@@ -1348,11 +1348,11 @@ test_expect_success 'tracking with unexpected .fetch refspec' '\n \t\tgit remote add c ../c &&\n \t\tgit config remote.c.fetch \"+refs/remotes/*:refs/remotes/*\" &&\n \t\tgit fetch c &&\n-\t\tgit branch --track local/a/master remotes/a/master &&\n-\t\ttest \"$(git config branch.local/a/master.remote)\" = \"c\" &&\n-\t\ttest \"$(git config branch.local/a/master.merge)\" = \"refs/remotes/a/master\" &&\n+\t\tgit branch --track local/a/main remotes/a/main &&\n+\t\ttest \"$(git config branch.local/a/main.remote)\" = \"c\" &&\n+\t\ttest \"$(git config branch.local/a/main.merge)\" = \"refs/remotes/a/main\" &&\n \t\tgit rev-parse --verify a >expect &&\n-\t\tgit rev-parse --verify local/a/master >actual &&\n+\t\tgit rev-parse --verify local/a/main >actual &&\n \t\ttest_cmp expect actual\n \t)\n '\n@@ -1371,7 +1371,7 @@ test_expect_success 'configured committerdate sort' '\n \t\ttest_commit b &&\n \t\tgit branch >actual &&\n \t\tcat >expect <<-\\EOF &&\n-\t\t  master\n+\t\t  main\n \t\t  a\n \t\t  c\n \t\t* b\n@@ -1389,7 +1389,7 @@ test_expect_success 'option override configured sort' '\n \t\t  a\n \t\t* b\n \t\t  c\n-\t\t  master\n+\t\t  main\n \t\tEOF\n \t\ttest_cmp expect actual\n \t)\ndiff --git a/t/t3201-branch-contains.sh b/t/t3201-branch-contains.sh\nindex 3733cd0091..110cfef820 100755\n--- a/t/t3201-branch-contains.sh\n+++ b/t/t3201-branch-contains.sh\n@@ -14,47 +14,47 @@ test_expect_success setup '\n \n \techo 1 >file &&\n \ttest_tick &&\n-\tgit commit -a -m \"second on master\" &&\n+\tgit commit -a -m \"second on main\" &&\n \n \tgit checkout side &&\n \techo 1 >file &&\n \ttest_tick &&\n \tgit commit -a -m \"second on side\" &&\n \n-\tgit merge master\n+\tgit merge main\n \n '\n \n-test_expect_success 'branch --contains=master' '\n+test_expect_success 'branch --contains=main' '\n \n-\tgit branch --contains=master >actual &&\n+\tgit branch --contains=main >actual &&\n \t{\n-\t\techo \"  master\" && echo \"* side\"\n+\t\techo \"  main\" && echo \"* side\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n '\n \n-test_expect_success 'branch --contains master' '\n+test_expect_success 'branch --contains main' '\n \n-\tgit branch --contains master >actual &&\n+\tgit branch --contains main >actual &&\n \t{\n-\t\techo \"  master\" && echo \"* side\"\n+\t\techo \"  main\" && echo \"* side\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n '\n \n-test_expect_success 'branch --no-contains=master' '\n+test_expect_success 'branch --no-contains=main' '\n \n-\tgit branch --no-contains=master >actual &&\n+\tgit branch --no-contains=main >actual &&\n \ttest_must_be_empty actual\n \n '\n \n-test_expect_success 'branch --no-contains master' '\n+test_expect_success 'branch --no-contains main' '\n \n-\tgit branch --no-contains master >actual &&\n+\tgit branch --no-contains main >actual &&\n \ttest_must_be_empty actual\n \n '\n@@ -73,7 +73,7 @@ test_expect_success 'branch --no-contains=side' '\n \n \tgit branch --no-contains=side >actual &&\n \t{\n-\t\techo \"  master\"\n+\t\techo \"  main\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n@@ -81,9 +81,9 @@ test_expect_success 'branch --no-contains=side' '\n \n test_expect_success 'branch --contains with pattern implies --list' '\n \n-\tgit branch --contains=master master >actual &&\n+\tgit branch --contains=main main >actual &&\n \t{\n-\t\techo \"  master\"\n+\t\techo \"  main\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n@@ -91,7 +91,7 @@ test_expect_success 'branch --contains with pattern implies --list' '\n \n test_expect_success 'branch --no-contains with pattern implies --list' '\n \n-\tgit branch --no-contains=master master >actual &&\n+\tgit branch --no-contains=main main >actual &&\n \ttest_must_be_empty actual\n \n '\n@@ -100,7 +100,7 @@ test_expect_success 'side: branch --merged' '\n \n \tgit branch --merged >actual &&\n \t{\n-\t\techo \"  master\" &&\n+\t\techo \"  main\" &&\n \t\techo \"* side\"\n \t} >expect &&\n \ttest_cmp expect actual\n@@ -109,9 +109,9 @@ test_expect_success 'side: branch --merged' '\n \n test_expect_success 'branch --merged with pattern implies --list' '\n \n-\tgit branch --merged=side master >actual &&\n+\tgit branch --merged=side main >actual &&\n \t{\n-\t\techo \"  master\"\n+\t\techo \"  main\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n@@ -124,18 +124,18 @@ test_expect_success 'side: branch --no-merged' '\n \n '\n \n-test_expect_success 'master: branch --merged' '\n+test_expect_success 'main: branch --merged' '\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch --merged >actual &&\n \t{\n-\t\techo \"* master\"\n+\t\techo \"* main\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n '\n \n-test_expect_success 'master: branch --no-merged' '\n+test_expect_success 'main: branch --no-merged' '\n \n \tgit branch --no-merged >actual &&\n \t{\n@@ -147,22 +147,22 @@ test_expect_success 'master: branch --no-merged' '\n \n test_expect_success 'branch --no-merged with pattern implies --list' '\n \n-\tgit branch --no-merged=master master >actual &&\n+\tgit branch --no-merged=main main >actual &&\n \ttest_must_be_empty actual\n \n '\n \n test_expect_success 'implicit --list conflicts with modification options' '\n \n-\ttest_must_fail git branch --contains=master -d &&\n-\ttest_must_fail git branch --contains=master -m foo &&\n-\ttest_must_fail git branch --no-contains=master -d &&\n-\ttest_must_fail git branch --no-contains=master -m foo\n+\ttest_must_fail git branch --contains=main -d &&\n+\ttest_must_fail git branch --contains=main -m foo &&\n+\ttest_must_fail git branch --no-contains=main -d &&\n+\ttest_must_fail git branch --no-contains=main -m foo\n \n '\n \n test_expect_success 'Assert that --contains only works on commits, not trees & blobs' '\n-\ttest_must_fail git branch --contains master^{tree} &&\n+\ttest_must_fail git branch --contains main^{tree} &&\n \tblob=$(git hash-object -w --stdin <<-\\EOF\n \tSome blob\n \tEOF\n@@ -172,11 +172,11 @@ test_expect_success 'Assert that --contains only works on commits, not trees & b\n '\n \n test_expect_success 'multiple branch --contains' '\n-\tgit checkout -b side2 master &&\n+\tgit checkout -b side2 main &&\n \t>feature &&\n \tgit add feature &&\n \tgit commit -m \"add feature\" &&\n-\tgit checkout -b next master &&\n+\tgit checkout -b next main &&\n \tgit merge side &&\n \tgit branch --contains side --contains side2 >actual &&\n \tcat >expect <<-\\EOF &&\n@@ -188,9 +188,9 @@ test_expect_success 'multiple branch --contains' '\n '\n \n test_expect_success 'multiple branch --merged' '\n-\tgit branch --merged next --merged master >actual &&\n+\tgit branch --merged next --merged main >actual &&\n \tcat >expect <<-\\EOF &&\n-\t  master\n+\t  main\n \t* next\n \t  side\n \tEOF\n@@ -200,13 +200,13 @@ test_expect_success 'multiple branch --merged' '\n test_expect_success 'multiple branch --no-contains' '\n \tgit branch --no-contains side --no-contains side2 >actual &&\n \tcat >expect <<-\\EOF &&\n-\t  master\n+\t  main\n \tEOF\n \ttest_cmp expect actual\n '\n \n test_expect_success 'multiple branch --no-merged' '\n-\tgit branch --no-merged next --no-merged master >actual &&\n+\tgit branch --no-merged next --no-merged main >actual &&\n \tcat >expect <<-\\EOF &&\n \t  side2\n \tEOF\n@@ -214,7 +214,7 @@ test_expect_success 'multiple branch --no-merged' '\n '\n \n test_expect_success 'branch --contains combined with --no-contains' '\n-\tgit checkout -b seen master &&\n+\tgit checkout -b seen main &&\n \tgit merge side &&\n \tgit merge side2 &&\n \tgit branch --contains side --no-contains side2 >actual &&\n@@ -239,17 +239,17 @@ test_expect_success 'branch --merged combined with --no-merged' '\n # that the latter walk does not mess up our flag to see if it was\n # merged).\n #\n-# Here \"topic\" tracks \"master\" with one extra commit, and \"zzz\" points to the\n-# same tip as master The name \"zzz\" must come alphabetically after \"topic\"\n+# Here \"topic\" tracks \"main\" with one extra commit, and \"zzz\" points to the\n+# same tip as main The name \"zzz\" must come alphabetically after \"topic\"\n # as we process them in that order.\n test_expect_success PREPARE_FOR_MAIN_BRANCH 'branch --merged with --verbose' '\n-\tgit branch --track topic master &&\n+\tgit branch --track topic main &&\n \tgit branch zzz topic &&\n \tgit checkout topic &&\n \ttest_commit foo &&\n \tgit branch --merged topic >actual &&\n \tcat >expect <<-\\EOF &&\n-\t  master\n+\t  main\n \t* topic\n \t  zzz\n \tEOF\ndiff --git a/t/t3202-show-branch-octopus.sh b/t/t3202-show-branch-octopus.sh\nindex 6adf47869c..97551016ad 100755\n--- a/t/t3202-show-branch-octopus.sh\n+++ b/t/t3202-show-branch-octopus.sh\n@@ -15,7 +15,7 @@ test_expect_success 'setup' '\n \n \tfor i in $numbers\n \tdo\n-\t\tgit checkout -b branch$i master &&\n+\t\tgit checkout -b branch$i main &&\n \t\t> file$i &&\n \t\tgit add file$i &&\n \t\ttest_tick &&\ndiff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh\nindex d65586541d..727c9d9caa 100755\n--- a/t/t3203-branch-output.sh\n+++ b/t/t3203-branch-output.sh\n@@ -26,7 +26,7 @@ test_expect_success 'make remote branches' '\n cat >expect <<'EOF'\n   branch-one\n   branch-two\n-* master\n+* main\n EOF\n test_expect_success 'git branch shows local branches' '\n \tgit branch >actual &&\n@@ -60,7 +60,7 @@ test_expect_success 'git branch -r shows remote branches' '\n cat >expect <<'EOF'\n   branch-one\n   branch-two\n-* master\n+* main\n   remotes/origin/HEAD -> origin/branch-one\n   remotes/origin/branch-one\n   remotes/origin/branch-two\n@@ -152,7 +152,7 @@ test_expect_success 'git branch shows detached HEAD properly' '\n * (HEAD detached at $(git rev-parse --short HEAD^0))\n   branch-one\n   branch-two\n-  master\n+  main\n EOF\n \tgit checkout HEAD^0 &&\n \tgit branch >actual &&\n@@ -160,12 +160,12 @@ EOF\n '\n \n test_expect_success 'git branch shows detached HEAD properly after checkout --detach' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcat >expect <<EOF &&\n * (HEAD detached at $(git rev-parse --short HEAD^0))\n   branch-one\n   branch-two\n-  master\n+  main\n EOF\n \tgit checkout --detach &&\n \tgit branch >actual &&\n@@ -177,7 +177,7 @@ test_expect_success 'git branch shows detached HEAD properly after moving' '\n * (HEAD detached from $(git rev-parse --short HEAD))\n   branch-one\n   branch-two\n-  master\n+  main\n EOF\n \tgit reset --hard HEAD^1 &&\n \tgit branch >actual &&\n@@ -189,9 +189,9 @@ test_expect_success 'git branch shows detached HEAD properly from tag' '\n * (HEAD detached at fromtag)\n   branch-one\n   branch-two\n-  master\n+  main\n EOF\n-\tgit tag fromtag master &&\n+\tgit tag fromtag main &&\n \tgit checkout fromtag &&\n \tgit branch >actual &&\n \ttest_i18ncmp expect actual\n@@ -202,7 +202,7 @@ test_expect_success 'git branch shows detached HEAD properly after moving from t\n * (HEAD detached from fromtag)\n   branch-one\n   branch-two\n-  master\n+  main\n EOF\n \tgit reset --hard HEAD^1 &&\n \tgit branch >actual &&\n@@ -214,7 +214,7 @@ test_expect_success 'git branch `--sort` option' '\n \t* (HEAD detached from fromtag)\n \t  branch-two\n \t  branch-one\n-\t  master\n+\t  main\n \tEOF\n \tgit branch --sort=objectsize >actual &&\n \ttest_i18ncmp expect actual\n@@ -223,7 +223,7 @@ test_expect_success 'git branch `--sort` option' '\n test_expect_success 'git branch --points-at option' '\n \tcat >expect <<-\\EOF &&\n \t  branch-one\n-\t  master\n+\t  main\n \tEOF\n \tgit branch --points-at=branch-one >actual &&\n \ttest_cmp expect actual\n@@ -260,14 +260,14 @@ test_expect_success 'sort branches, ignore case' '\n \t\tcat >expected <<-\\EOF &&\n \t\tBRANCH-two\n \t\tbranch-one\n-\t\tmaster\n+\t\tmain\n \t\tEOF\n \t\ttest_cmp expected actual &&\n \t\tgit branch --list -i | awk \"{print \\$NF}\" >actual &&\n \t\tcat >expected <<-\\EOF &&\n \t\tbranch-one\n \t\tBRANCH-two\n-\t\tmaster\n+\t\tmain\n \t\tEOF\n \t\ttest_cmp expected actual\n \t)\n@@ -279,7 +279,7 @@ test_expect_success 'git branch --format option' '\n \tRefname is refs/heads/ambiguous\n \tRefname is refs/heads/branch-one\n \tRefname is refs/heads/branch-two\n-\tRefname is refs/heads/master\n+\tRefname is refs/heads/main\n \tRefname is refs/heads/ref-to-branch\n \tRefname is refs/heads/ref-to-remote\n \tEOF\n@@ -293,7 +293,7 @@ test_expect_success 'worktree colors correct' '\n \t  ambiguous<RESET>\n \t  branch-one<RESET>\n \t+ <CYAN>branch-two<RESET>\n-\t  master<RESET>\n+\t  main<RESET>\n \t  ref-to-branch<RESET> -> branch-one\n \t  ref-to-remote<RESET> -> origin/branch-one\n \tEOF\n@@ -306,9 +306,9 @@ test_expect_success 'worktree colors correct' '\n '\n \n test_expect_success \"set up color tests\" '\n-\techo \"<RED>master<RESET>\" >expect.color &&\n-\techo \"master\" >expect.bare &&\n-\tcolor_args=\"--format=%(color:red)%(refname:short) --list master\"\n+\techo \"<RED>main<RESET>\" >expect.color &&\n+\techo \"main\" >expect.bare &&\n+\tcolor_args=\"--format=%(color:red)%(refname:short) --list main\"\n '\n \n test_expect_success '%(color) omitted without tty' '\n@@ -331,7 +331,7 @@ test_expect_success '--color overrides auto-color' '\n \n test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output lists worktree path' '\n \tone=$(git rev-parse --short HEAD) &&\n-\ttwo=$(git rev-parse --short master) &&\n+\ttwo=$(git rev-parse --short main) &&\n \tcat >expect <<-EOF &&\n \t* (HEAD detached from fromtag) $one one\n \t  ambiguous                    $one one\ndiff --git a/t/t3204-branch-name-interpretation.sh b/t/t3204-branch-name-interpretation.sh\nindex 698d9cc4f3..e527e0b0c9 100755\n--- a/t/t3204-branch-name-interpretation.sh\n+++ b/t/t3204-branch-name-interpretation.sh\n@@ -28,7 +28,7 @@ test_expect_success 'update branch via @{-1}' '\n \tgit branch previous one &&\n \n \tgit checkout previous &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit branch -f @{-1} two &&\n \texpect_branch previous two\n@@ -58,7 +58,7 @@ test_expect_success 'delete branch via @{-1}' '\n \tgit branch previous-del &&\n \n \tgit checkout previous-del &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit branch -D @{-1} &&\n \texpect_deleted previous-del\n@@ -98,7 +98,7 @@ test_expect_success 'disallow deleting remote branch via @{-1}' '\n \tgit update-ref refs/remotes/origin/previous one &&\n \n \tgit checkout -b origin/previous two &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \ttest_must_fail git branch -r -D @{-1} &&\n \texpect_branch refs/remotes/origin/previous one &&\ndiff --git a/t/t3205-branch-color.sh b/t/t3205-branch-color.sh\nindex 289625c464..9f2fb785d2 100755\n--- a/t/t3205-branch-color.sh\n+++ b/t/t3205-branch-color.sh\n@@ -5,7 +5,7 @@ test_description='basic branch output coloring'\n \n test_expect_success 'set up some sample branches' '\n \ttest_commit foo &&\n-\tgit update-ref refs/remotes/origin/master HEAD &&\n+\tgit update-ref refs/remotes/origin/main HEAD &&\n \tgit update-ref refs/heads/other HEAD\n '\n \n@@ -19,9 +19,9 @@ test_expect_success 'set up some color config' '\n \n test_expect_success 'regular output shows colors' '\n \tcat >expect <<-\\EOF &&\n-\t* <CYAN>master<RESET>\n+\t* <CYAN>main<RESET>\n \t  <BLUE>other<RESET>\n-\t  <YELLOW>remotes/origin/master<RESET>\n+\t  <YELLOW>remotes/origin/main<RESET>\n \tEOF\n \tgit branch --color -a >actual.raw &&\n \ttest_decode_color <actual.raw >actual &&\ndiff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh\nindex 6eb344be03..2813a362c7 100755\n--- a/t/t3206-range-diff.sh\n+++ b/t/t3206-range-diff.sh\n@@ -127,7 +127,7 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'simple A..B A..C (unmodified)' '\n-\tgit range-diff --no-color master..topic master..unmodified \\\n+\tgit range-diff --no-color main..topic main..unmodified \\\n \t\t>actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid u1) s/5/A/\n@@ -145,13 +145,13 @@ test_expect_success 'simple B...C (unmodified)' '\n '\n \n test_expect_success 'simple A B C (unmodified)' '\n-\tgit range-diff --no-color master topic unmodified >actual &&\n+\tgit range-diff --no-color main topic unmodified >actual &&\n \t# same \"expect\" as above\n \ttest_cmp expect actual\n '\n \n test_expect_success 'trivial reordering' '\n-\tgit range-diff --no-color master topic reordered >actual &&\n+\tgit range-diff --no-color main topic reordered >actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid r1) s/5/A/\n \t3:  $(test_oid t3) = 2:  $(test_oid r2) s/11/B/\n@@ -162,7 +162,7 @@ test_expect_success 'trivial reordering' '\n '\n \n test_expect_success 'removed a commit' '\n-\tgit range-diff --no-color master topic removed >actual &&\n+\tgit range-diff --no-color main topic removed >actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid d1) s/5/A/\n \t2:  $(test_oid t2) < -:  $(test_oid __) s/4/A/\n@@ -173,7 +173,7 @@ test_expect_success 'removed a commit' '\n '\n \n test_expect_success 'added a commit' '\n-\tgit range-diff --no-color master topic added >actual &&\n+\tgit range-diff --no-color main topic added >actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid a1) s/5/A/\n \t2:  $(test_oid t2) = 2:  $(test_oid a2) s/4/A/\n@@ -185,7 +185,7 @@ test_expect_success 'added a commit' '\n '\n \n test_expect_success 'new base, A B C' '\n-\tgit range-diff --no-color master topic rebased >actual &&\n+\tgit range-diff --no-color main topic rebased >actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid b1) s/5/A/\n \t2:  $(test_oid t2) = 2:  $(test_oid b2) s/4/A/\n@@ -196,7 +196,7 @@ test_expect_success 'new base, A B C' '\n '\n \n test_expect_success 'new base, B...C' '\n-\t# this syntax includes the commits from master!\n+\t# this syntax includes the commits from main!\n \tgit range-diff --no-color topic...rebased >actual &&\n \tcat >expect <<-EOF &&\n \t-:  $(test_oid __) > 1:  $(test_oid b5) unrelated\n@@ -420,7 +420,7 @@ test_expect_success 'file added and later removed' '\n \n test_expect_success 'no commits on one side' '\n \tgit commit --amend -m \"new message\" &&\n-\tgit range-diff master HEAD@{1} HEAD\n+\tgit range-diff main HEAD@{1} HEAD\n '\n \n test_expect_success 'changed message' '\n@@ -482,11 +482,11 @@ test_expect_success 'dual-coloring' '\n \ttest_cmp expect actual\n '\n \n-for prev in topic master..topic\n+for prev in topic main..topic\n do\n \ttest_expect_success \"format-patch --range-diff=$prev\" '\n \t\tgit format-patch --cover-letter --range-diff=$prev \\\n-\t\t\tmaster..unmodified >actual &&\n+\t\t\tmain..unmodified >actual &&\n \t\ttest_when_finished \"rm 000?-*\" &&\n \t\ttest_line_count = 5 actual &&\n \t\ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\n@@ -511,19 +511,19 @@ test_expect_success 'range-diff overrides diff.noprefix internally' '\n \n test_expect_success 'basic with modified format.pretty with suffix' '\n \tgit -c format.pretty=\"format:commit %H%d%n\" range-diff \\\n-\t\tmaster..topic master..unmodified\n+\t\tmain..topic main..unmodified\n '\n \n test_expect_success 'basic with modified format.pretty without \"commit \"' '\n \tgit -c format.pretty=\"format:%H%n\" range-diff \\\n-\t\tmaster..topic master..unmodified\n+\t\tmain..topic main..unmodified\n '\n \n test_expect_success 'range-diff compares notes by default' '\n \tgit notes add -m \"topic note\" topic &&\n \tgit notes add -m \"unmodified note\" unmodified &&\n \ttest_when_finished git notes remove topic unmodified &&\n-\tgit range-diff --no-color master..topic master..unmodified \\\n+\tgit range-diff --no-color main..topic main..unmodified \\\n \t\t>actual &&\n \tsed s/Z/\\ /g >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid u1) s/5/A/\n@@ -547,7 +547,7 @@ test_expect_success 'range-diff with --no-notes' '\n \tgit notes add -m \"topic note\" topic &&\n \tgit notes add -m \"unmodified note\" unmodified &&\n \ttest_when_finished git notes remove topic unmodified &&\n-\tgit range-diff --no-color --no-notes master..topic master..unmodified \\\n+\tgit range-diff --no-color --no-notes main..topic main..unmodified \\\n \t\t>actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid u1) s/5/A/\n@@ -565,7 +565,7 @@ test_expect_success 'range-diff with multiple --notes' '\n \tgit notes --ref=note2 add -m \"topic note2\" topic &&\n \tgit notes --ref=note2 add -m \"unmodified note2\" unmodified &&\n \ttest_when_finished git notes --ref=note2 remove topic unmodified &&\n-\tgit range-diff --no-color --notes=note1 --notes=note2 master..topic master..unmodified \\\n+\tgit range-diff --no-color --notes=note1 --notes=note2 main..topic main..unmodified \\\n \t\t>actual &&\n \tsed s/Z/\\ /g >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid u1) s/5/A/\n@@ -595,7 +595,7 @@ test_expect_success 'format-patch --range-diff does not compare notes by default\n \tgit notes add -m \"unmodified note\" unmodified &&\n \ttest_when_finished git notes remove topic unmodified &&\n \tgit format-patch --cover-letter --range-diff=$prev \\\n-\t\tmaster..unmodified >actual &&\n+\t\tmain..unmodified >actual &&\n \ttest_when_finished \"rm 000?-*\" &&\n \ttest_line_count = 5 actual &&\n \ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\n@@ -612,7 +612,7 @@ test_expect_success 'format-patch --range-diff with --no-notes' '\n \tgit notes add -m \"unmodified note\" unmodified &&\n \ttest_when_finished git notes remove topic unmodified &&\n \tgit format-patch --no-notes --cover-letter --range-diff=$prev \\\n-\t\tmaster..unmodified >actual &&\n+\t\tmain..unmodified >actual &&\n \ttest_when_finished \"rm 000?-*\" &&\n \ttest_line_count = 5 actual &&\n \ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\n@@ -629,7 +629,7 @@ test_expect_success 'format-patch --range-diff with --notes' '\n \tgit notes add -m \"unmodified note\" unmodified &&\n \ttest_when_finished git notes remove topic unmodified &&\n \tgit format-patch --notes --cover-letter --range-diff=$prev \\\n-\t\tmaster..unmodified >actual &&\n+\t\tmain..unmodified >actual &&\n \ttest_when_finished \"rm 000?-*\" &&\n \ttest_line_count = 5 actual &&\n \ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\n@@ -658,7 +658,7 @@ test_expect_success 'format-patch --range-diff with format.notes config' '\n \ttest_when_finished git notes remove topic unmodified &&\n \ttest_config format.notes true &&\n \tgit format-patch --cover-letter --range-diff=$prev \\\n-\t\tmaster..unmodified >actual &&\n+\t\tmain..unmodified >actual &&\n \ttest_when_finished \"rm 000?-*\" &&\n \ttest_line_count = 5 actual &&\n \ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\n@@ -689,7 +689,7 @@ test_expect_success 'format-patch --range-diff with multiple notes' '\n \tgit notes --ref=note2 add -m \"unmodified note2\" unmodified &&\n \ttest_when_finished git notes --ref=note2 remove topic unmodified &&\n \tgit format-patch --notes=note1 --notes=note2 --cover-letter --range-diff=$prev \\\n-\t\tmaster..unmodified >actual &&\n+\t\tmain..unmodified >actual &&\n \ttest_when_finished \"rm 000?-*\" &&\n \ttest_line_count = 5 actual &&\n \ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\ndiff --git a/t/t3206/history.export b/t/t3206/history.export\nindex 4c808e5b3b..4485adc37b 100644\n--- a/t/t3206/history.export\n+++ b/t/t3206/history.export\n@@ -168,7 +168,7 @@ mark :11\n data 10\n unrelated\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :12\n author Thomas Rast <trast@inf.ethz.ch> 1374485127 +0200\n committer Thomas Rast <trast@inf.ethz.ch> 1374485127 +0200\ndiff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh\nindex f41b2afb99..a0b188fa4d 100755\n--- a/t/t3210-pack-refs.sh\n+++ b/t/t3210-pack-refs.sh\n@@ -135,7 +135,7 @@ test_expect_success 'delete ref with dangling packed version' '\n \tgit commit --allow-empty -m \"future garbage\" &&\n \tgit pack-refs --all &&\n \tgit reset --hard HEAD^ &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reflog expire --expire=all --all &&\n \tgit prune --expire=all &&\n \tgit branch -d lamb 2>result &&\n@@ -240,7 +240,7 @@ test_expect_success 'retry acquiring packed-refs.lock' '\n \n test_expect_success SYMLINKS 'pack symlinked packed-refs' '\n \t# First make sure that symlinking works when reading:\n-\tgit update-ref refs/heads/lossy refs/heads/master &&\n+\tgit update-ref refs/heads/lossy refs/heads/main &&\n \tgit for-each-ref >all-refs-before &&\n \tmv .git/packed-refs .git/my-deviant-packed-refs &&\n \tln -s my-deviant-packed-refs .git/packed-refs &&\ndiff --git a/t/t3211-peel-ref.sh b/t/t3211-peel-ref.sh\nindex 3b7caca421..73a914d194 100755\n--- a/t/t3211-peel-ref.sh\n+++ b/t/t3211-peel-ref.sh\n@@ -19,7 +19,7 @@ print_ref() {\n \n test_expect_success 'set up expected show-ref output' '\n \t{\n-\t\tprint_ref \"refs/heads/master\" &&\n+\t\tprint_ref \"refs/heads/main\" &&\n \t\tprint_ref \"refs/outside/foo\" &&\n \t\tprint_ref \"refs/outside/foo^{}\" &&\n \t\tprint_ref \"refs/tags/base\" &&\n@@ -47,7 +47,7 @@ test_expect_success 'create old-style pack-refs without fully-peeled' '\n \t# know we are emulating exactly what an older git would have written.\n \t{\n \t\techo \"# pack-refs with: peeled \" &&\n-\t\tprint_ref \"refs/heads/master\" &&\n+\t\tprint_ref \"refs/heads/main\" &&\n \t\tprint_ref \"refs/outside/foo\" &&\n \t\tprint_ref \"refs/tags/base\" &&\n \t\tprint_ref \"refs/tags/foo\" &&\ndiff --git a/t/t3301-notes.sh b/t/t3301-notes.sh\nindex 8f43303007..2b685580b6 100755\n--- a/t/t3301-notes.sh\n+++ b/t/t3301-notes.sh\n@@ -1295,11 +1295,11 @@ test_expect_success 'git notes copy diagnoses too many or too few parameters' '\n \ttest_i18ngrep \"too many parameters\" error\n '\n \n-test_expect_success 'git notes get-ref expands refs/heads/master to refs/notes/refs/heads/master' '\n+test_expect_success 'git notes get-ref expands refs/heads/main to refs/notes/refs/heads/main' '\n \ttest_unconfig core.notesRef &&\n \tsane_unset GIT_NOTES_REF &&\n-\techo refs/notes/refs/heads/master >expect &&\n-\tgit notes --ref=refs/heads/master get-ref >actual &&\n+\techo refs/notes/refs/heads/main >expect &&\n+\tgit notes --ref=refs/heads/main get-ref >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t3302-notes-index-expensive.sh b/t/t3302-notes-index-expensive.sh\nindex 7217c5e222..1c1490ca68 100755\n--- a/t/t3302-notes-index-expensive.sh\n+++ b/t/t3302-notes-index-expensive.sh\n@@ -20,7 +20,7 @@ create_repo () {\n \t\t\tnotemark=$(($mark+1))\n \t\t\ttest_tick &&\n \t\t\tcat <<-INPUT_END &&\n-\t\t\tcommit refs/heads/master\n+\t\t\tcommit refs/heads/main\n \t\t\tmark :$mark\n \t\t\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \t\t\tdata <<COMMIT\ndiff --git a/t/t3303-notes-subtrees.sh b/t/t3303-notes-subtrees.sh\nindex 704aee81ef..d994492469 100755\n--- a/t/t3303-notes-subtrees.sh\n+++ b/t/t3303-notes-subtrees.sh\n@@ -40,7 +40,7 @@ test_expect_success \"setup: create $number_of_commits commits\" '\n \t\t\tnr=$(($nr+1)) &&\n \t\t\ttest_tick &&\n \t\t\tcat <<INPUT_END\n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n commit #$nr\n@@ -75,7 +75,7 @@ test_sha1_based () {\n \t(\n \t\tstart_note_commit &&\n \t\tnr=$number_of_commits &&\n-\t\tgit rev-list refs/heads/master |\n+\t\tgit rev-list refs/heads/main |\n \t\twhile read sha1; do\n \t\t\tnote_path=$(echo \"$sha1\" | sed \"$1\")\n \t\t\tcat <<INPUT_END &&\n@@ -105,7 +105,7 @@ test_same_notes () {\n \t(\n \t\tstart_note_commit &&\n \t\tnr=$number_of_commits &&\n-\t\tgit rev-list refs/heads/master |\n+\t\tgit rev-list refs/heads/main |\n \t\twhile read sha1; do\n \t\t\tfirst_note_path=$(echo \"$sha1\" | sed \"$1\")\n \t\t\tsecond_note_path=$(echo \"$sha1\" | sed \"$2\")\n@@ -144,7 +144,7 @@ test_concatenated_notes () {\n \t(\n \t\tstart_note_commit &&\n \t\tnr=$number_of_commits &&\n-\t\tgit rev-list refs/heads/master |\n+\t\tgit rev-list refs/heads/main |\n \t\twhile read sha1; do\n \t\t\tfirst_note_path=$(echo \"$sha1\" | sed \"$1\")\n \t\t\tsecond_note_path=$(echo \"$sha1\" | sed \"$2\")\ndiff --git a/t/t3304-notes-mixed.sh b/t/t3304-notes-mixed.sh\nindex 1709e8c00b..802e004016 100755\n--- a/t/t3304-notes-mixed.sh\n+++ b/t/t3304-notes-mixed.sh\n@@ -36,7 +36,7 @@ test_expect_success \"setup: create a couple of commits\" '\n \n \ttest_tick &&\n \tcat <<INPUT_END >input &&\n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n commit #1\n@@ -51,7 +51,7 @@ INPUT_END\n \n \ttest_tick &&\n \tcat <<INPUT_END >>input &&\n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n commit #2\n@@ -68,8 +68,8 @@ INPUT_END\n \n test_expect_success \"create a notes tree with both notes and non-notes\" '\n \n-\tcommit1=$(git rev-parse refs/heads/master^) &&\n-\tcommit2=$(git rev-parse refs/heads/master) &&\n+\tcommit1=$(git rev-parse refs/heads/main^) &&\n+\tcommit2=$(git rev-parse refs/heads/main) &&\n \ttest_tick &&\n \tcat <<INPUT_END >input &&\n commit refs/notes/commits\ndiff --git a/t/t3308-notes-merge.sh b/t/t3308-notes-merge.sh\nindex d69c84c640..202702be1a 100755\n--- a/t/t3308-notes-merge.sh\n+++ b/t/t3308-notes-merge.sh\n@@ -108,7 +108,7 @@ test_expect_success 'fail to merge into various non-notes refs' '\n \tgit update-ref refs/notes/dir/foo HEAD &&\n \ttest_must_fail git -c \"core.notesRef=refs/notes/dir\" notes merge x &&\n \ttest_must_fail git -c \"core.notesRef=refs/notes/dir/\" notes merge x &&\n-\ttest_must_fail git -c \"core.notesRef=refs/heads/master\" notes merge x &&\n+\ttest_must_fail git -c \"core.notesRef=refs/heads/main\" notes merge x &&\n \ttest_must_fail git -c \"core.notesRef=refs/notes/y:\" notes merge x &&\n \ttest_must_fail git -c \"core.notesRef=refs/notes/y:foo\" notes merge x &&\n \ttest_must_fail git -c \"core.notesRef=refs/notes/foo^{bar\" notes merge x\ndiff --git a/t/t3320-notes-merge-worktrees.sh b/t/t3320-notes-merge-worktrees.sh\nindex 823fdbda1f..465145c487 100755\n--- a/t/t3320-notes-merge-worktrees.sh\n+++ b/t/t3320-notes-merge-worktrees.sh\n@@ -36,8 +36,8 @@ test_expect_success 'modify notes ref ourselves (x)' '\n '\n \n test_expect_success 'create some new worktrees' '\n-\tgit worktree add -b newbranch worktree master &&\n-\tgit worktree add -b newbranch2 worktree2 master\n+\tgit worktree add -b newbranch worktree main &&\n+\tgit worktree add -b newbranch2 worktree2 main\n '\n \n test_expect_success 'merge z into y fails and sets NOTES_MERGE_REF' '\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 3bb6675390..c464f8dcc8 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,7 +257,7 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-[0-2]*)\n+[0-2]*|3[0-3]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410093","messageId":"be29e0789259b6b4ac51bdd7432fce5cf7204bbd.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 10/27] t5[0-4]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:10Z","receivedAt":"2020-11-17T16:13:00Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t5310, which is developed independently of the\ncurrent patch series at the time of writing, we now use `main` as\ndefault branch in t5[0-4]*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t5[0-4]*.sh &&\n\t   git checkout HEAD -- t5310\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5150-request-pull.sh                | 34 ++++++-------\n t/t5304-prune.sh                       |  2 +-\n t/t5305-include-tag.sh                 |  2 +-\n t/t5312-prune-corruption.sh            | 16 +++----\n t/t5317-pack-objects-filter-objects.sh |  2 +-\n t/t5322-pack-objects-sparse.sh         |  2 +-\n t/t5323-pack-redundant.sh              | 66 +++++++++++++-------------\n t/t5400-send-pack.sh                   | 60 +++++++++++------------\n t/t5401-update-hooks.sh                | 24 +++++-----\n t/t5402-post-merge-hook.sh             |  2 +-\n t/t5403-post-checkout-hook.sh          |  6 +--\n t/t5404-tracking-branches.sh           |  8 ++--\n t/t5405-send-pack-rewind.sh            |  6 +--\n t/t5407-post-rewrite-hook.sh           |  2 +-\n t/t5410-receive-pack-alternates.sh     |  4 +-\n t/test-lib.sh                          |  4 +-\n 16 files changed, 120 insertions(+), 120 deletions(-)\n\ndiff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh\nindex c1811ea0f4..4fa71961a6 100755\n--- a/t/t5150-request-pull.sh\n+++ b/t/t5150-request-pull.sh\n@@ -31,13 +31,13 @@ test_expect_success 'setup' '\n \t\ttest_tick &&\n \t\tgit commit -m \"\\\"Thirty days\\\", a reminder of month lengths\" &&\n \t\tgit tag -m \"version 1\" -a initial &&\n-\t\tgit push --tags origin master\n+\t\tgit push --tags origin main\n \t) &&\n \t(\n \t\tcd local &&\n \t\tgit remote add upstream \"$trash_url/upstream.git\" &&\n \t\tgit fetch upstream &&\n-\t\tgit pull upstream master &&\n+\t\tgit pull upstream main &&\n \t\tcat <<-\\EOT >>mnemonic.txt &&\n \t\tOf twyecescore-eightt is but eine,\n \t\tAnd all the remnante be thrycescore-eine.\n@@ -59,7 +59,7 @@ test_expect_success 'setup' '\n \t\tgit commit -a -m \"Adapt to use modern, simpler English\n \n But keep the old version, too, in case some people prefer it.\" &&\n-\t\tgit checkout master\n+\t\tgit checkout main\n \t)\n \n '\n@@ -129,7 +129,7 @@ test_expect_success 'pull request when forgot to push' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n+\t\tgit merge --ff-only main &&\n \t\ttest_must_fail git request-pull initial \"$downstream_url\" \\\n \t\t\t2>../err\n \t) &&\n@@ -145,9 +145,9 @@ test_expect_success 'pull request after push' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n-\t\tgit push origin master:for-upstream &&\n-\t\tgit request-pull initial origin master:for-upstream >../request\n+\t\tgit merge --ff-only main &&\n+\t\tgit push origin main:for-upstream &&\n+\t\tgit request-pull initial origin main:for-upstream >../request\n \t) &&\n \tsed -nf read-request.sed <request >digest &&\n \t{\n@@ -172,9 +172,9 @@ test_expect_success 'request asks HEAD to be pulled' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n-\t\tgit push --tags origin master simplify &&\n-\t\tgit push origin master:for-upstream &&\n+\t\tgit merge --ff-only main &&\n+\t\tgit push --tags origin main simplify &&\n+\t\tgit push origin main:for-upstream &&\n \t\tgit request-pull initial \"$downstream_url\" >../request\n \t) &&\n \tsed -nf read-request.sed <request >digest &&\n@@ -215,7 +215,7 @@ test_expect_success 'pull request format' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n+\t\tgit merge --ff-only main &&\n \t\tgit push origin tags/full &&\n \t\tgit request-pull initial \"$downstream_url\" tags/full >../request\n \t) &&\n@@ -243,9 +243,9 @@ test_expect_success 'request-pull ignores OPTIONS_KEEPDASHDASH poison' '\n \t\tOPTIONS_KEEPDASHDASH=Yes &&\n \t\texport OPTIONS_KEEPDASHDASH &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n-\t\tgit push origin master:for-upstream &&\n-\t\tgit request-pull -- initial \"$downstream_url\" master:for-upstream >../request\n+\t\tgit merge --ff-only main &&\n+\t\tgit push origin main:for-upstream &&\n+\t\tgit request-pull -- initial \"$downstream_url\" main:for-upstream >../request\n \t)\n \n '\n@@ -257,7 +257,7 @@ test_expect_success 'request-pull quotes regex metacharacters properly' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n+\t\tgit merge --ff-only main &&\n \t\tgit tag -mrelease v2.0 &&\n \t\tgit push origin refs/tags/v2.0:refs/tags/v2-0 &&\n \t\ttest_must_fail git request-pull initial \"$downstream_url\" tags/v2.0 \\\n@@ -275,7 +275,7 @@ test_expect_success 'pull request with mismatched object' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n+\t\tgit merge --ff-only main &&\n \t\tgit push origin HEAD:refs/tags/full &&\n \t\ttest_must_fail git request-pull initial \"$downstream_url\" tags/full \\\n \t\t\t2>../err\n@@ -292,7 +292,7 @@ test_expect_success 'pull request with stale object' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n+\t\tgit merge --ff-only main &&\n \t\tgit push origin refs/tags/full &&\n \t\tgit tag -f -m\"Thirty-one days\" full &&\n \t\ttest_must_fail git request-pull initial \"$downstream_url\" tags/full \\\ndiff --git a/t/t5304-prune.sh b/t/t5304-prune.sh\nindex df60f18fb8..7391f95c7e 100755\n--- a/t/t5304-prune.sh\n+++ b/t/t5304-prune.sh\n@@ -119,7 +119,7 @@ test_expect_success 'prune: do not prune detached HEAD with no reflog' '\n test_expect_success 'prune: prune former HEAD after checking out branch' '\n \n \thead_oid=$(git rev-parse HEAD) &&\n-\tgit checkout --quiet master &&\n+\tgit checkout --quiet main &&\n \tgit prune -v >prune_actual &&\n \tgrep \"$head_oid\" prune_actual\n \ndiff --git a/t/t5305-include-tag.sh b/t/t5305-include-tag.sh\nindex a5eca210b8..69233574b8 100755\n--- a/t/t5305-include-tag.sh\n+++ b/t/t5305-include-tag.sh\n@@ -111,7 +111,7 @@ test_expect_success 'check unpacked result (have all objects)' '\n \n test_expect_success 'single-branch clone can transfer tag' '\n \trm -rf clone.git &&\n-\tgit clone --no-local --single-branch -b master . clone.git &&\n+\tgit clone --no-local --single-branch -b main . clone.git &&\n \tgit -C clone.git fsck\n '\n \ndiff --git a/t/t5312-prune-corruption.sh b/t/t5312-prune-corruption.sh\nindex da9d59940d..8ca3823f23 100755\n--- a/t/t5312-prune-corruption.sh\n+++ b/t/t5312-prune-corruption.sh\n@@ -16,7 +16,7 @@ test_expect_success 'disable reflogs' '\n '\n \n test_expect_success 'create history reachable only from a bogus-named ref' '\n-\ttest_tick && git commit --allow-empty -m master &&\n+\ttest_tick && git commit --allow-empty -m main &&\n \tbase=$(git rev-parse HEAD) &&\n \ttest_tick && git commit --allow-empty -m bogus &&\n \tbogus=$(git rev-parse HEAD) &&\n@@ -51,7 +51,7 @@ test_expect_success 'clean up bogus ref' '\n '\n \n # We create two new objects here, \"one\" and \"two\". Our\n-# master branch points to \"two\", which is deleted,\n+# main branch points to \"two\", which is deleted,\n # corrupting the repository. But we'd like to make sure\n # that the otherwise unreachable \"one\" is not pruned\n # (since it is the user's best bet for recovering\n@@ -81,7 +81,7 @@ test_expect_success 'pruning with a corrupted tip does not drop history' '\n test_expect_success 'pack-refs does not silently delete broken loose ref' '\n \tgit pack-refs --all --prune &&\n \techo $missing >expect &&\n-\tgit rev-parse refs/heads/master >actual &&\n+\tgit rev-parse refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -89,25 +89,25 @@ test_expect_success 'pack-refs does not silently delete broken loose ref' '\n # actually pack it, as it is perfectly reasonable to\n # skip processing a broken ref\n test_expect_success 'create packed-refs file with broken ref' '\n-\trm -f .git/refs/heads/master &&\n+\trm -f .git/refs/heads/main &&\n \tcat >.git/packed-refs <<-EOF &&\n-\t$missing refs/heads/master\n+\t$missing refs/heads/main\n \t$recoverable refs/heads/other\n \tEOF\n \techo $missing >expect &&\n-\tgit rev-parse refs/heads/master >actual &&\n+\tgit rev-parse refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'pack-refs does not silently delete broken packed ref' '\n \tgit pack-refs --all --prune &&\n-\tgit rev-parse refs/heads/master >actual &&\n+\tgit rev-parse refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'pack-refs does not drop broken refs during deletion' '\n \tgit update-ref -d refs/heads/other &&\n-\tgit rev-parse refs/heads/master >actual &&\n+\tgit rev-parse refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t5317-pack-objects-filter-objects.sh b/t/t5317-pack-objects-filter-objects.sh\nindex dc0446574b..6ee66d58ce 100755\n--- a/t/t5317-pack-objects-filter-objects.sh\n+++ b/t/t5317-pack-objects-filter-objects.sh\n@@ -382,7 +382,7 @@ test_expect_success 'verify sparse:oid=oid-ish' '\n \tawk -f print_2.awk ls_files_result |\n \tsort >expected &&\n \n-\tgit -C r4 pack-objects --revs --stdout --filter=sparse:oid=master:pattern >filter.pack <<-EOF &&\n+\tgit -C r4 pack-objects --revs --stdout --filter=sparse:oid=main:pattern >filter.pack <<-EOF &&\n \tHEAD\n \tEOF\n \tgit -C r4 index-pack ../filter.pack &&\ndiff --git a/t/t5322-pack-objects-sparse.sh b/t/t5322-pack-objects-sparse.sh\nindex a581eaf529..99bdab0610 100755\n--- a/t/t5322-pack-objects-sparse.sh\n+++ b/t/t5322-pack-objects-sparse.sh\n@@ -18,7 +18,7 @@ test_expect_success 'setup repo' '\n \tgit commit -m \"Initialized trees\" &&\n \tfor i in $(test_seq 1 3)\n \tdo\n-\t\tgit checkout -b topic$i master &&\n+\t\tgit checkout -b topic$i main &&\n \t\techo change-$i >f$i/f$i/data.txt &&\n \t\tgit commit -a -m \"Changed f$i/f$i/data.txt\"\n \tdone &&\ndiff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh\nindex 3903148926..89c8688647 100755\n--- a/t/t5323-pack-redundant.sh\n+++ b/t/t5323-pack-redundant.sh\n@@ -6,7 +6,7 @@\n test_description='Test git pack-redundant\n \n In order to test git-pack-redundant, we will create a number of objects and\n-packs in the repository `master.git`. The relationship between packs (P1-P8)\n+packs in the repository `main.git`. The relationship between packs (P1-P8)\n and objects (T, A-R) is showed in the following chart. Objects of a pack will\n be marked with letter x, while objects of redundant packs will be marked with\n exclamation point, and redundant pack itself will be marked with asterisk.\n@@ -25,7 +25,7 @@ exclamation point, and redundant pack itself will be marked with asterisk.\n     ALL | x x x x x x x x x x x x x x x x x x x\n \n Another repository `shared.git` has unique objects (X-Z), while other objects\n-(marked with letter s) are shared through alt-odb (of `master.git`). The\n+(marked with letter s) are shared through alt-odb (of `main.git`). The\n relationship between packs and objects is as follows:\n \n \t| T A B C D E F G H I J K L M N O P Q R   X Y Z\n@@ -36,7 +36,7 @@ relationship between packs and objects is as follows:\n \n . ./test-lib.sh\n \n-master_repo=master.git\n+main_repo=main.git\n shared_repo=shared.git\n \n # Create commits in <repo> and assign each commit's oid to shell variables\n@@ -69,7 +69,7 @@ create_commits_in () {\n \t\tshift ||\n \t\treturn 1\n \tdone &&\n-\tgit -C \"$repo\" update-ref refs/heads/master $oid\n+\tgit -C \"$repo\" update-ref refs/heads/main $oid\n }\n \n # Create pack in <repo> and assign pack id to variable given in the 2nd argument\n@@ -107,9 +107,9 @@ format_packfiles () {\n \tsort\n }\n \n-test_expect_success 'setup master repo' '\n-\tgit init --bare \"$master_repo\" &&\n-\tcreate_commits_in \"$master_repo\" A B C D E F G H I J K L M N O P Q R\n+test_expect_success 'setup main repo' '\n+\tgit init --bare \"$main_repo\" &&\n+\tcreate_commits_in \"$main_repo\" A B C D E F G H I J K L M N O P Q R\n '\n \n #############################################################################\n@@ -124,8 +124,8 @@ test_expect_success 'setup master repo' '\n #     ALL | x x x x x x x x x x x x x x         x\n #\n #############################################################################\n-test_expect_success 'master: no redundant for pack 1, 2, 3' '\n-\tcreate_pack_in \"$master_repo\" P1 <<-EOF &&\n+test_expect_success 'main: no redundant for pack 1, 2, 3' '\n+\tcreate_pack_in \"$main_repo\" P1 <<-EOF &&\n \t\t$T\n \t\t$A\n \t\t$B\n@@ -135,7 +135,7 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '\n \t\t$F\n \t\t$R\n \t\tEOF\n-\tcreate_pack_in \"$master_repo\" P2 <<-EOF &&\n+\tcreate_pack_in \"$main_repo\" P2 <<-EOF &&\n \t\t$B\n \t\t$C\n \t\t$D\n@@ -144,7 +144,7 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '\n \t\t$H\n \t\t$I\n \t\tEOF\n-\tcreate_pack_in \"$master_repo\" P3 <<-EOF &&\n+\tcreate_pack_in \"$main_repo\" P3 <<-EOF &&\n \t\t$F\n \t\t$I\n \t\t$J\n@@ -153,7 +153,7 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '\n \t\t$M\n \t\tEOF\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tgit pack-redundant --all >out &&\n \t\ttest_must_be_empty out\n \t)\n@@ -173,22 +173,22 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '\n #     ALL | x x x x x x x x x x x x x x x x x   x\n #\n #############################################################################\n-test_expect_success 'master: one of pack-2/pack-3 is redundant' '\n-\tcreate_pack_in \"$master_repo\" P4 <<-EOF &&\n+test_expect_success 'main: one of pack-2/pack-3 is redundant' '\n+\tcreate_pack_in \"$main_repo\" P4 <<-EOF &&\n \t\t$J\n \t\t$K\n \t\t$L\n \t\t$M\n \t\t$P\n \t\tEOF\n-\tcreate_pack_in \"$master_repo\" P5 <<-EOF &&\n+\tcreate_pack_in \"$main_repo\" P5 <<-EOF &&\n \t\t$G\n \t\t$H\n \t\t$N\n \t\t$O\n \t\tEOF\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tcat >expect <<-EOF &&\n \t\t\tP3:$P3\n \t\t\tEOF\n@@ -214,18 +214,18 @@ test_expect_success 'master: one of pack-2/pack-3 is redundant' '\n #     ALL | x x x x x x x x x x x x x x x x x x x\n #\n #############################################################################\n-test_expect_success 'master: pack 2, 4, and 6 are redundant' '\n-\tcreate_pack_in \"$master_repo\" P6 <<-EOF &&\n+test_expect_success 'main: pack 2, 4, and 6 are redundant' '\n+\tcreate_pack_in \"$main_repo\" P6 <<-EOF &&\n \t\t$N\n \t\t$O\n \t\t$Q\n \t\tEOF\n-\tcreate_pack_in \"$master_repo\" P7 <<-EOF &&\n+\tcreate_pack_in \"$main_repo\" P7 <<-EOF &&\n \t\t$P\n \t\t$Q\n \t\tEOF\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tcat >expect <<-EOF &&\n \t\t\tP2:$P2\n \t\t\tP4:$P4\n@@ -254,12 +254,12 @@ test_expect_success 'master: pack 2, 4, and 6 are redundant' '\n #     ALL | x x x x x x x x x x x x x x x x x x x\n #\n #############################################################################\n-test_expect_success 'master: pack-8 (subset of pack-1) is also redundant' '\n-\tcreate_pack_in \"$master_repo\" P8 <<-EOF &&\n+test_expect_success 'main: pack-8 (subset of pack-1) is also redundant' '\n+\tcreate_pack_in \"$main_repo\" P8 <<-EOF &&\n \t\t$A\n \t\tEOF\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tcat >expect <<-EOF &&\n \t\t\tP2:$P2\n \t\t\tP4:$P4\n@@ -272,18 +272,18 @@ test_expect_success 'master: pack-8 (subset of pack-1) is also redundant' '\n \t)\n '\n \n-test_expect_success 'master: clean loose objects' '\n+test_expect_success 'main: clean loose objects' '\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tgit prune-packed &&\n \t\tfind objects -type f | sed -e \"/objects\\/pack\\//d\" >out &&\n \t\ttest_must_be_empty out\n \t)\n '\n \n-test_expect_success 'master: remove redundant packs and pass fsck' '\n+test_expect_success 'main: remove redundant packs and pass fsck' '\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tgit pack-redundant --all | xargs rm &&\n \t\tgit fsck &&\n \t\tgit pack-redundant --all >out &&\n@@ -292,12 +292,12 @@ test_expect_success 'master: remove redundant packs and pass fsck' '\n '\n \n # The following test cases will execute inside `shared.git`, instead of\n-# inside `master.git`.\n+# inside `main.git`.\n test_expect_success 'setup shared.git' '\n-\tgit clone --mirror \"$master_repo\" \"$shared_repo\" &&\n+\tgit clone --mirror \"$main_repo\" \"$shared_repo\" &&\n \t(\n \t\tcd \"$shared_repo\" &&\n-\t\tprintf \"../../$master_repo/objects\\n\" >objects/info/alternates\n+\t\tprintf \"../../$main_repo/objects\\n\" >objects/info/alternates\n \t)\n '\n \n@@ -312,7 +312,7 @@ test_expect_success 'shared: all packs are redundant, but no output without --al\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================= master.git ================\n+#     ================= main.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------+\n #     ----+--------------------------------------             |\n #     P1  | x x x x x x x                       x             |\n@@ -394,7 +394,7 @@ test_expect_success 'shared: no redundant without --alt-odb' '\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================= master.git ================\n+#     ================= main.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------------+\n #     ----+--------------------------------------                   |\n #     P1  | x x x x x x x                       x                   |\n@@ -426,7 +426,7 @@ test_expect_success 'shared: one pack is redundant with --alt-odb' '\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================= master.git ================\n+#     ================= main.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------------+\n #     ----+--------------------------------------                   |\n #     P1  | x x x x x x x                       x                   |\ndiff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh\nindex cc86ef213e..e50ca0d8c6 100755\n--- a/t/t5400-send-pack.sh\n+++ b/t/t5400-send-pack.sh\n@@ -66,20 +66,20 @@ test_expect_success 'pack the destination repository' '\n '\n \n test_expect_success 'refuse pushing rewound head without --force' '\n-\tpushed_head=$(git rev-parse --verify master) &&\n-\tvictim_orig=$(cd victim && git rev-parse --verify master) &&\n-\ttest_must_fail git send-pack ./victim master &&\n-\tvictim_head=$(cd victim && git rev-parse --verify master) &&\n+\tpushed_head=$(git rev-parse --verify main) &&\n+\tvictim_orig=$(cd victim && git rev-parse --verify main) &&\n+\ttest_must_fail git send-pack ./victim main &&\n+\tvictim_head=$(cd victim && git rev-parse --verify main) &&\n \ttest \"$victim_head\" = \"$victim_orig\" &&\n \t# this should update\n-\tgit send-pack --force ./victim master &&\n-\tvictim_head=$(cd victim && git rev-parse --verify master) &&\n+\tgit send-pack --force ./victim main &&\n+\tvictim_head=$(cd victim && git rev-parse --verify main) &&\n \ttest \"$victim_head\" = \"$pushed_head\"\n '\n \n test_expect_success 'push can be used to delete a ref' '\n-\t( cd victim && git branch extra master ) &&\n-\tgit send-pack ./victim :extra master &&\n+\t( cd victim && git branch extra main ) &&\n+\tgit send-pack ./victim :extra main &&\n \t( cd victim &&\n \t  test_must_fail git rev-parse --verify extra )\n '\n@@ -89,9 +89,9 @@ test_expect_success 'refuse deleting push with denyDeletes' '\n \t\tcd victim &&\n \t\ttest_might_fail git branch -D extra &&\n \t\tgit config receive.denyDeletes true &&\n-\t\tgit branch extra master\n+\t\tgit branch extra main\n \t) &&\n-\ttest_must_fail git send-pack ./victim :extra master\n+\ttest_must_fail git send-pack ./victim :extra main\n '\n \n test_expect_success 'cannot override denyDeletes with git -c send-pack' '\n@@ -99,10 +99,10 @@ test_expect_success 'cannot override denyDeletes with git -c send-pack' '\n \t\tcd victim &&\n \t\ttest_might_fail git branch -D extra &&\n \t\tgit config receive.denyDeletes true &&\n-\t\tgit branch extra master\n+\t\tgit branch extra main\n \t) &&\n \ttest_must_fail git -c receive.denyDeletes=false \\\n-\t\t\t\t\tsend-pack ./victim :extra master\n+\t\t\t\t\tsend-pack ./victim :extra main\n '\n \n test_expect_success 'override denyDeletes with git -c receive-pack' '\n@@ -110,11 +110,11 @@ test_expect_success 'override denyDeletes with git -c receive-pack' '\n \t\tcd victim &&\n \t\ttest_might_fail git branch -D extra &&\n \t\tgit config receive.denyDeletes true &&\n-\t\tgit branch extra master\n+\t\tgit branch extra main\n \t) &&\n \tgit send-pack \\\n \t\t--receive-pack=\"git -c receive.denyDeletes=false receive-pack\" \\\n-\t\t./victim :extra master\n+\t\t./victim :extra main\n '\n \n test_expect_success 'denyNonFastforwards trumps --force' '\n@@ -123,9 +123,9 @@ test_expect_success 'denyNonFastforwards trumps --force' '\n \t\ttest_might_fail git branch -D extra &&\n \t\tgit config receive.denyNonFastforwards true\n \t) &&\n-\tvictim_orig=$(cd victim && git rev-parse --verify master) &&\n-\ttest_must_fail git send-pack --force ./victim master^:master &&\n-\tvictim_head=$(cd victim && git rev-parse --verify master) &&\n+\tvictim_orig=$(cd victim && git rev-parse --verify main) &&\n+\ttest_must_fail git send-pack --force ./victim main^:main &&\n+\tvictim_head=$(cd victim && git rev-parse --verify main) &&\n \ttest \"$victim_orig\" = \"$victim_head\"\n '\n \n@@ -210,41 +210,41 @@ rewound_push_setup() {\n \n test_expect_success 'pushing explicit refspecs respects forcing' '\n \trewound_push_setup &&\n-\tparent_orig=$(cd parent && git rev-parse --verify master) &&\n+\tparent_orig=$(cd parent && git rev-parse --verify main) &&\n \t(\n \t\tcd child &&\n \t\ttest_must_fail git send-pack ../parent \\\n-\t\t\trefs/heads/master:refs/heads/master\n+\t\t\trefs/heads/main:refs/heads/main\n \t) &&\n-\tparent_head=$(cd parent && git rev-parse --verify master) &&\n+\tparent_head=$(cd parent && git rev-parse --verify main) &&\n \ttest \"$parent_orig\" = \"$parent_head\" &&\n \t(\n \t\tcd child &&\n \t\tgit send-pack ../parent \\\n-\t\t\t+refs/heads/master:refs/heads/master\n+\t\t\t+refs/heads/main:refs/heads/main\n \t) &&\n-\tparent_head=$(cd parent && git rev-parse --verify master) &&\n-\tchild_head=$(cd child && git rev-parse --verify master) &&\n+\tparent_head=$(cd parent && git rev-parse --verify main) &&\n+\tchild_head=$(cd child && git rev-parse --verify main) &&\n \ttest \"$parent_head\" = \"$child_head\"\n '\n \n test_expect_success 'pushing wildcard refspecs respects forcing' '\n \trewound_push_setup &&\n-\tparent_orig=$(cd parent && git rev-parse --verify master) &&\n+\tparent_orig=$(cd parent && git rev-parse --verify main) &&\n \t(\n \t\tcd child &&\n \t\ttest_must_fail git send-pack ../parent \\\n \t\t\t\"refs/heads/*:refs/heads/*\"\n \t) &&\n-\tparent_head=$(cd parent && git rev-parse --verify master) &&\n+\tparent_head=$(cd parent && git rev-parse --verify main) &&\n \ttest \"$parent_orig\" = \"$parent_head\" &&\n \t(\n \t\tcd child &&\n \t\tgit send-pack ../parent \\\n \t\t\t\"+refs/heads/*:refs/heads/*\"\n \t) &&\n-\tparent_head=$(cd parent && git rev-parse --verify master) &&\n-\tchild_head=$(cd child && git rev-parse --verify master) &&\n+\tparent_head=$(cd parent && git rev-parse --verify main) &&\n+\tchild_head=$(cd child && git rev-parse --verify main) &&\n \ttest \"$parent_head\" = \"$child_head\"\n '\n \n@@ -252,7 +252,7 @@ test_expect_success 'deny pushing to delete current branch' '\n \trewound_push_setup &&\n \t(\n \t\tcd child &&\n-\t\ttest_must_fail git send-pack ../parent :refs/heads/master 2>errs\n+\t\ttest_must_fail git send-pack ../parent :refs/heads/main 2>errs\n \t)\n '\n \n@@ -283,9 +283,9 @@ test_expect_success 'receive-pack de-dupes .have lines' '\n \tlocal=$(git -C fork rev-parse HEAD) &&\n \tshared=$(git -C shared rev-parse only-shared) &&\n \tcat >expect <<-EOF &&\n-\t$local refs/heads/master\n+\t$local refs/heads/main\n \t$local refs/remotes/origin/HEAD\n-\t$local refs/remotes/origin/master\n+\t$local refs/remotes/origin/main\n \t$shared .have\n \tEOF\n \ndiff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh\nindex 956d69f5b1..6012cc8172 100755\n--- a/t/t5401-update-hooks.sh\n+++ b/t/t5401-update-hooks.sh\n@@ -15,11 +15,11 @@ test_expect_success setup '\n \tgit update-index a &&\n \ttree1=$(git write-tree) &&\n \tcommit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&\n-\tgit update-ref refs/heads/master $commit0 &&\n+\tgit update-ref refs/heads/main $commit0 &&\n \tgit update-ref refs/heads/tofail $commit1 &&\n \tgit clone --bare ./. victim.git &&\n \tGIT_DIR=victim.git git update-ref refs/heads/tofail $commit1 &&\n-\tgit update-ref refs/heads/master $commit1 &&\n+\tgit update-ref refs/heads/main $commit1 &&\n \tgit update-ref refs/heads/tofail $commit0\n '\n \n@@ -38,7 +38,7 @@ echo \"$@\" >>$GIT_DIR/update.args\n read x; printf %s \"$x\" >$GIT_DIR/update.stdin\n echo STDOUT update $1\n echo STDERR update $1 >&2\n-test \"$1\" = refs/heads/master || exit\n+test \"$1\" = refs/heads/main || exit\n EOF\n chmod u+x victim.git/hooks/update\n \n@@ -62,11 +62,11 @@ chmod u+x victim.git/hooks/post-update\n \n test_expect_success push '\n \ttest_must_fail git send-pack --force ./victim.git \\\n-\t\tmaster tofail >send.out 2>send.err\n+\t\tmain tofail >send.out 2>send.err\n '\n \n test_expect_success 'updated as expected' '\n-\ttest $(GIT_DIR=victim.git git rev-parse master) = $commit1 &&\n+\ttest $(GIT_DIR=victim.git git rev-parse main) = $commit1 &&\n \ttest $(GIT_DIR=victim.git git rev-parse tofail) = $commit1\n '\n \n@@ -82,24 +82,24 @@ test_expect_success 'hooks ran' '\n '\n \n test_expect_success 'pre-receive hook input' '\n-\t(echo $commit0 $commit1 refs/heads/master &&\n+\t(echo $commit0 $commit1 refs/heads/main &&\n \t echo $commit1 $commit0 refs/heads/tofail\n \t) | test_cmp - victim.git/pre-receive.stdin\n '\n \n test_expect_success 'update hook arguments' '\n-\t(echo refs/heads/master $commit0 $commit1 &&\n+\t(echo refs/heads/main $commit0 $commit1 &&\n \t echo refs/heads/tofail $commit1 $commit0\n \t) | test_cmp - victim.git/update.args\n '\n \n test_expect_success 'post-receive hook input' '\n-\techo $commit0 $commit1 refs/heads/master |\n+\techo $commit0 $commit1 refs/heads/main |\n \ttest_cmp - victim.git/post-receive.stdin\n '\n \n test_expect_success 'post-update hook arguments' '\n-\techo refs/heads/master |\n+\techo refs/heads/main |\n \ttest_cmp - victim.git/post-update.args\n '\n \n@@ -120,8 +120,8 @@ test_expect_success 'send-pack produced no output' '\n cat <<EOF >expect\n remote: STDOUT pre-receive\n remote: STDERR pre-receive\n-remote: STDOUT update refs/heads/master\n-remote: STDERR update refs/heads/master\n+remote: STDOUT update refs/heads/main\n+remote: STDERR update refs/heads/main\n remote: STDOUT update refs/heads/tofail\n remote: STDERR update refs/heads/tofail\n remote: error: hook declined to update refs/heads/tofail\n@@ -143,7 +143,7 @@ test_expect_success 'pre-receive hook that forgets to read its input' '\n \n \tfor v in $(test_seq 100 999)\n \tdo\n-\t\tgit branch branch_$v master || return\n+\t\tgit branch branch_$v main || return\n \tdone &&\n \tgit push ./victim.git \"+refs/heads/*:refs/heads/*\"\n '\ndiff --git a/t/t5402-post-merge-hook.sh b/t/t5402-post-merge-hook.sh\nindex 4aeea8f5b7..26c800e60b 100755\n--- a/t/t5402-post-merge-hook.sh\n+++ b/t/t5402-post-merge-hook.sh\n@@ -15,7 +15,7 @@ test_expect_success setup '\n \tgit update-index a &&\n \ttree1=$(git write-tree) &&\n \tcommit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&\n-\tgit update-ref refs/heads/master $commit0 &&\n+\tgit update-ref refs/heads/main $commit0 &&\n \tgit clone ./. clone1 &&\n \tGIT_DIR=clone1/.git git update-index --add a &&\n \tgit clone ./. clone2 &&\ndiff --git a/t/t5403-post-checkout-hook.sh b/t/t5403-post-checkout-hook.sh\nindex a39b3b5c78..867dec8862 100755\n--- a/t/t5403-post-checkout-hook.sh\n+++ b/t/t5403-post-checkout-hook.sh\n@@ -20,7 +20,7 @@ test_expect_success setup '\n \n test_expect_success 'post-checkout receives the right arguments with HEAD unchanged ' '\n \ttest_when_finished \"rm -f .git/post-checkout.args\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tread old new flag <.git/post-checkout.args &&\n \ttest $old = $new && test $flag = 1\n '\n@@ -41,14 +41,14 @@ test_expect_success 'post-checkout receives the right args with HEAD changed ' '\n \n test_expect_success 'post-checkout receives the right args when not switching branches ' '\n \ttest_when_finished \"rm -f .git/post-checkout.args\" &&\n-\tgit checkout master -- three.t &&\n+\tgit checkout main -- three.t &&\n \tread old new flag <.git/post-checkout.args &&\n \ttest $old = $new && test $flag = 0\n '\n \n test_expect_success 'post-checkout is triggered on rebase' '\n \ttest_when_finished \"rm -f .git/post-checkout.args\" &&\n-\tgit checkout -b rebase-test master &&\n+\tgit checkout -b rebase-test main &&\n \trm -f .git/post-checkout.args &&\n \tgit rebase rebase-on-me &&\n \tread old new flag <.git/post-checkout.args &&\ndiff --git a/t/t5404-tracking-branches.sh b/t/t5404-tracking-branches.sh\nindex 2762f420bc..83751e68d0 100755\n--- a/t/t5404-tracking-branches.sh\n+++ b/t/t5404-tracking-branches.sh\n@@ -30,9 +30,9 @@ test_expect_success 'prepare pushable branches' '\n \tgit checkout -b b2 origin/b2 &&\n \techo aa-b2 >>file &&\n \tgit commit -a -m aa-b2 &&\n-\tgit checkout master &&\n-\techo aa-master >>file &&\n-\tgit commit -a -m aa-master\n+\tgit checkout main &&\n+\techo aa-main >>file &&\n+\tgit commit -a -m aa-main\n '\n \n test_expect_success 'mixed-success push returns error' '\n@@ -40,7 +40,7 @@ test_expect_success 'mixed-success push returns error' '\n '\n \n test_expect_success 'check tracking branches updated correctly after push' '\n-\ttest \"$(git rev-parse origin/master)\" = \"$(git rev-parse master)\"\n+\ttest \"$(git rev-parse origin/main)\" = \"$(git rev-parse main)\"\n '\n \n test_expect_success 'check tracking branches not updated for failed refs' '\ndiff --git a/t/t5405-send-pack-rewind.sh b/t/t5405-send-pack-rewind.sh\nindex 235fb7686a..8792e74682 100755\n--- a/t/t5405-send-pack-rewind.sh\n+++ b/t/t5405-send-pack-rewind.sh\n@@ -13,7 +13,7 @@ test_expect_success setup '\n \tmkdir another && (\n \t\tcd another &&\n \t\tgit init &&\n-\t\tgit fetch --update-head-ok .. master:master\n+\t\tgit fetch --update-head-ok .. main:main\n \t) &&\n \n \t>file2 && git add file2 && test_tick &&\n@@ -25,7 +25,7 @@ test_expect_success 'non forced push should die not segfault' '\n \n \t(\n \t\tcd another &&\n-\t\ttest_must_fail git push .. master:master\n+\t\ttest_must_fail git push .. main:main\n \t)\n \n '\n@@ -34,7 +34,7 @@ test_expect_success 'forced push should succeed' '\n \n \t(\n \t\tcd another &&\n-\t\tgit push .. +master:master\n+\t\tgit push .. +main:main\n \t)\n \n '\ndiff --git a/t/t5407-post-rewrite-hook.sh b/t/t5407-post-rewrite-hook.sh\nindex 80750a817e..27bc159acf 100755\n--- a/t/t5407-post-rewrite-hook.sh\n+++ b/t/t5407-post-rewrite-hook.sh\n@@ -14,7 +14,7 @@ test_expect_success 'setup' '\n \tgit checkout A^0 &&\n \ttest_commit E bar E &&\n \ttest_commit F foo F &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n mkdir .git/hooks\ndiff --git a/t/t5410-receive-pack-alternates.sh b/t/t5410-receive-pack-alternates.sh\nindex f00d0da860..cb6fffe611 100755\n--- a/t/t5410-receive-pack-alternates.sh\n+++ b/t/t5410-receive-pack-alternates.sh\n@@ -7,9 +7,9 @@ test_description='git receive-pack with alternate ref filtering'\n test_expect_success 'setup' '\n \ttest_commit base &&\n \tgit clone -s --bare . fork &&\n-\tgit checkout -b public/branch master &&\n+\tgit checkout -b public/branch main &&\n \ttest_commit public &&\n-\tgit checkout -b private/branch master &&\n+\tgit checkout -b private/branch main &&\n \ttest_commit private\n '\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex b783629348..155bfad454 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,13 +257,13 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-3404|4013)\n+3404|4013|5310)\n \t# Avoid conflicts with patch series that are cooking at the same time\n \t# as the patch series changing the default of `init.defaultBranch`.\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-4]*)\n+[0-4]*|5[0-4]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410096","messageId":"2f62b3f4694096b38deba3359c7705296b4209fd.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 06/27] t34*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:06Z","receivedAt":"2020-11-17T16:13:00Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t3404, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in\nt34*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t34*.sh &&\n\t   git checkout HEAD -- t34\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3400-rebase.sh                 | 60 +++++++++++++++----------------\n t/t3402-rebase-merge.sh           | 44 +++++++++++------------\n t/t3403-rebase-skip.sh            |  6 ++--\n t/t3405-rebase-malformed.sh       |  8 ++---\n t/t3406-rebase-message.sh         | 24 ++++++-------\n t/t3407-rebase-abort.sh           | 18 +++++-----\n t/t3408-rebase-multi-line.sh      |  2 +-\n t/t3409-rebase-preserve-merges.sh | 10 +++---\n t/t3412-rebase-root.sh            | 28 +++++++--------\n t/t3413-rebase-hook.sh            | 42 +++++++++++-----------\n t/t3415-rebase-autosquash.sh      |  2 +-\n t/t3416-rebase-onto-threedots.sh  | 54 ++++++++++++++--------------\n t/t3418-rebase-continue.sh        | 24 ++++++-------\n t/t3419-rebase-patch-id.sh        | 12 +++----\n t/t3420-rebase-autostash.sh       |  8 ++---\n t/t3423-rebase-reword.sh          |  6 ++--\n t/t3427-rebase-subtree.sh         | 20 +++++------\n t/t3430-rebase-merges.sh          | 16 ++++-----\n t/t3431-rebase-fork-point.sh      | 32 ++++++++---------\n t/t3432-rebase-fast-forward.sh    | 34 +++++++++---------\n t/t3434-rebase-i18n.sh            |  8 ++---\n t/t3435-rebase-gpg-sign.sh        |  4 +--\n t/t3436-rebase-more-options.sh    |  2 +-\n t/test-lib.sh                     |  8 ++++-\n 24 files changed, 239 insertions(+), 233 deletions(-)\n\ndiff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\nindex 40d2975995..cdfc7e083a 100755\n--- a/t/t3400-rebase.sh\n+++ b/t/t3400-rebase.sh\n@@ -24,15 +24,15 @@ test_expect_success 'prepare repository with topic branches' '\n \tgit update-index --add Y &&\n \tgit commit -m \"Add Y.\" &&\n \tgit checkout -b filemove &&\n-\tgit reset --soft master &&\n+\tgit reset --soft main &&\n \tmkdir D &&\n \tgit mv A D/A &&\n \tgit commit -m \"Move A.\" &&\n-\tgit checkout -b my-topic-branch master &&\n+\tgit checkout -b my-topic-branch main &&\n \techo Second >B &&\n \tgit update-index --add B &&\n \tgit commit -m \"Add B.\" &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \techo Third >>A &&\n \tgit update-index A &&\n \tgit commit -m \"Modify A.\" &&\n@@ -46,23 +46,23 @@ test_expect_success 'prepare repository with topic branches' '\n \n test_expect_success 'rebase on dirty worktree' '\n \techo dirty >>A &&\n-\ttest_must_fail git rebase master\n+\ttest_must_fail git rebase main\n '\n \n test_expect_success 'rebase on dirty cache' '\n \tgit add A &&\n-\ttest_must_fail git rebase master\n+\ttest_must_fail git rebase main\n '\n \n-test_expect_success 'rebase against master' '\n+test_expect_success 'rebase against main' '\n \tgit reset --hard HEAD &&\n-\tgit rebase master\n+\tgit rebase main\n '\n \n test_expect_success 'rebase sets ORIG_HEAD to pre-rebase state' '\n \tgit checkout -b orig-head topic &&\n \tpre=\"$(git rev-parse --verify HEAD)\" &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \ttest_cmp_rev \"$pre\" ORIG_HEAD &&\n \ttest_cmp_rev ! \"$pre\" HEAD\n '\n@@ -93,19 +93,19 @@ test_expect_success 'HEAD was detached during rebase' '\n \n test_expect_success 'rebase from ambiguous branch name' '\n \tgit checkout -b topic side &&\n-\tgit rebase master\n+\tgit rebase main\n '\n \n test_expect_success 'rebase off of the previous branch using \"-\"' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout HEAD^ &&\n \tgit rebase @{-1} >expect.messages &&\n-\tgit merge-base master HEAD >expect.forkpoint &&\n+\tgit merge-base main HEAD >expect.forkpoint &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout HEAD^ &&\n \tgit rebase - >actual.messages &&\n-\tgit merge-base master HEAD >actual.forkpoint &&\n+\tgit merge-base main HEAD >actual.forkpoint &&\n \n \ttest_cmp expect.forkpoint actual.forkpoint &&\n \t# the next one is dubious---we may want to say \"-\",\n@@ -114,7 +114,7 @@ test_expect_success 'rebase off of the previous branch using \"-\"' '\n '\n \n test_expect_success 'rebase a single mode change' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -D topic &&\n \techo 1 >X &&\n \tgit add X &&\n@@ -126,7 +126,7 @@ test_expect_success 'rebase a single mode change' '\n \ttest_chmod +x A &&\n \ttest_tick &&\n \tgit commit -m modechange &&\n-\tGIT_TRACE=1 git rebase master\n+\tGIT_TRACE=1 git rebase main\n '\n \n test_expect_success 'rebase is not broken by diff.renames' '\n@@ -162,11 +162,11 @@ test_expect_success 'fail when upstream arg is missing and not configured' '\n test_expect_success 'rebase works with format.useAutoBase' '\n \ttest_config format.useAutoBase true &&\n \tgit checkout topic &&\n-\tgit rebase master\n+\tgit rebase main\n '\n \n test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg (--merge)' '\n-\tgit checkout -b default-base master &&\n+\tgit checkout -b default-base main &&\n \tgit checkout -b default topic &&\n \tgit config branch.default.remote . &&\n \tgit config branch.default.merge refs/heads/default-base &&\n@@ -184,7 +184,7 @@ test_expect_success 'default to common base in @{upstream}s reflog if no upstrea\n '\n \n test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg (--apply)' '\n-\tgit checkout -B default-base master &&\n+\tgit checkout -B default-base main &&\n \tgit checkout -B default topic &&\n \tgit config branch.default.remote . &&\n \tgit config branch.default.merge refs/heads/default-base &&\n@@ -226,13 +226,13 @@ test_expect_success 'cherry-picked commits and fork-point work together' '\n \n test_expect_success 'rebase --apply -q is quiet' '\n \tgit checkout -b quiet topic &&\n-\tgit rebase --apply -q master >output.out 2>&1 &&\n+\tgit rebase --apply -q main >output.out 2>&1 &&\n \ttest_must_be_empty output.out\n '\n \n test_expect_success 'rebase --merge -q is quiet' '\n \tgit checkout -B quiet topic &&\n-\tgit rebase --merge -q master >output.out 2>&1 &&\n+\tgit rebase --merge -q main >output.out 2>&1 &&\n \ttest_must_be_empty output.out\n '\n \n@@ -294,7 +294,7 @@ test_expect_success 'rebase commit with an ancient timestamp' '\n '\n \n test_expect_success 'rebase with \"From \" line in commit message' '\n-\tgit checkout -b preserve-from master~1 &&\n+\tgit checkout -b preserve-from main~1 &&\n \tcat >From_.msg <<EOF &&\n Somebody embedded an mbox in a commit message\n \n@@ -310,7 +310,7 @@ EOF\n \t>From_ &&\n \tgit add From_ &&\n \tgit commit -F From_.msg &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \tgit log -1 --pretty=format:%B >out &&\n \ttest_cmp From_.msg out\n '\n@@ -357,12 +357,12 @@ test_expect_success 'rebase --apply and .gitattributes' '\n \t\tgit cherry-pick test &&\n \n \t\tgit checkout test &&\n-\t\tgit rebase master &&\n+\t\tgit rebase main &&\n \t\tgrep \"smudged\" a.txt &&\n \n \t\tgit checkout removal &&\n \t\tgit reset --hard &&\n-\t\tgit rebase master &&\n+\t\tgit rebase main &&\n \t\tgrep \"clean\" a.txt\n \t)\n '\n@@ -402,20 +402,20 @@ test_expect_success 'rebase -c rebase.useBuiltin=false warning' '\n '\n \n test_expect_success 'switch to branch checked out here' '\n-\tgit checkout master &&\n-\tgit rebase master master\n+\tgit checkout main &&\n+\tgit rebase main main\n '\n \n test_expect_success 'switch to branch not checked out' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch other &&\n-\tgit rebase master other\n+\tgit rebase main other\n '\n \n test_expect_success 'refuse to switch to branch checked out elsewhere' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit worktree add wt &&\n-\ttest_must_fail git -C wt rebase master master 2>err &&\n+\ttest_must_fail git -C wt rebase main main 2>err &&\n \ttest_i18ngrep \"already checked out\" err\n '\n \ndiff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh\nindex 6e032716a6..ed7fcb5a6c 100755\n--- a/t/t3402-rebase-merge.sh\n+++ b/t/t3402-rebase-merge.sh\n@@ -19,10 +19,10 @@ test_expect_success setup '\n \tgit commit -m\"initial\" &&\n \tgit branch side &&\n \techo \"11 $T\" >>original &&\n-\tgit commit -a -m\"master updates a bit.\" &&\n+\tgit commit -a -m\"main updates a bit.\" &&\n \n \techo \"12 $T\" >>original &&\n-\tgit commit -a -m\"master updates a bit more.\" &&\n+\tgit commit -a -m\"main updates a bit more.\" &&\n \n \tgit checkout side &&\n \t(echo \"0 $T\" && cat original) >renamed &&\n@@ -47,13 +47,13 @@ test_expect_success setup '\n '\n \n test_expect_success 'reference merge' '\n-\tgit merge -s recursive -m \"reference merge\" master\n+\tgit merge -s recursive -m \"reference merge\" main\n '\n \n PRE_REBASE=$(git rev-parse test-rebase)\n test_expect_success rebase '\n \tgit checkout test-rebase &&\n-\tGIT_TRACE=1 git rebase --merge master\n+\tGIT_TRACE=1 git rebase --merge main\n '\n \n test_expect_success 'test-rebase@{1} is pre rebase' '\n@@ -72,24 +72,24 @@ test_expect_success 'merge and rebase should match' '\n '\n \n test_expect_success 'rebase the other way' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit rebase --merge side\n '\n \n test_expect_success 'rebase -Xtheirs' '\n-\tgit checkout -b conflicting master~2 &&\n+\tgit checkout -b conflicting main~2 &&\n \techo \"AB $T\" >> original &&\n \tgit commit -mconflicting original &&\n-\tgit rebase -Xtheirs master &&\n+\tgit rebase -Xtheirs main &&\n \tgrep AB original &&\n \t! grep 11 original\n '\n \n test_expect_success 'rebase -Xtheirs from orphan' '\n-\tgit checkout --orphan orphan-conflicting master~2 &&\n+\tgit checkout --orphan orphan-conflicting main~2 &&\n \techo \"AB $T\" >> original &&\n \tgit commit -morphan-conflicting original &&\n-\tgit rebase -Xtheirs master &&\n+\tgit rebase -Xtheirs main &&\n \tgrep AB original &&\n \t! grep 11 original\n '\n@@ -107,9 +107,9 @@ test_expect_success 'merge and rebase should match' '\n \n test_expect_success 'picking rebase' '\n \tgit reset --hard side &&\n-\tgit rebase --merge --onto master side^^ &&\n-\tmb=$(git merge-base master HEAD) &&\n-\tif test \"$mb\" = \"$(git rev-parse master)\"\n+\tgit rebase --merge --onto main side^^ &&\n+\tmb=$(git merge-base main HEAD) &&\n+\tif test \"$mb\" = \"$(git rev-parse main)\"\n \tthen\n \t\techo happy\n \telse\n@@ -140,11 +140,11 @@ test_expect_success 'rebase -s funny -Xopt' '\n \tEOF\n \tchmod +x test-bin/git-merge-funny &&\n \tgit reset --hard &&\n-\tgit checkout -b test-funny master^ &&\n+\tgit checkout -b test-funny main^ &&\n \ttest_commit funny &&\n \t(\n \t\tPATH=./test-bin:$PATH &&\n-\t\tgit rebase -s funny -Xopt master\n+\t\tgit rebase -s funny -Xopt main\n \t) &&\n \ttest -f funny.was.run\n '\n@@ -165,7 +165,7 @@ test_expect_success 'rebase --skip works with two conflicts in a row' '\n test_expect_success '--reapply-cherry-picks' '\n \tgit init repo &&\n \n-\t# O(1-10) -- O(1-11) -- O(0-10) master\n+\t# O(1-10) -- O(1-11) -- O(0-10) main\n \t#        \\\n \t#         -- O(1-11) -- O(1-12) otherbranch\n \n@@ -187,18 +187,18 @@ test_expect_success '--reapply-cherry-picks' '\n \tgit -C repo commit -a -m \"add 12 in another branch\" &&\n \n \t# Regular rebase fails, because the 1-11 commit is deduplicated\n-\ttest_must_fail git -C repo rebase --merge master 2> err &&\n+\ttest_must_fail git -C repo rebase --merge main 2> err &&\n \ttest_i18ngrep \"error: could not apply.*add 12 in another branch\" err &&\n \tgit -C repo rebase --abort &&\n \n \t# With --reapply-cherry-picks, it works\n-\tgit -C repo rebase --merge --reapply-cherry-picks master\n+\tgit -C repo rebase --merge --reapply-cherry-picks main\n '\n \n test_expect_success '--reapply-cherry-picks refrains from reading unneeded blobs' '\n \tgit init server &&\n \n-\t# O(1-10) -- O(1-11) -- O(1-12) master\n+\t# O(1-10) -- O(1-11) -- O(1-12) main\n \t#        \\\n \t#         -- O(0-10) otherbranch\n \n@@ -220,18 +220,18 @@ test_expect_success '--reapply-cherry-picks refrains from reading unneeded blobs\n \ttest_config -C server uploadpack.allowanysha1inwant 1 &&\n \n \tgit clone --filter=blob:none \"file://$(pwd)/server\" client &&\n-\tgit -C client checkout origin/master &&\n+\tgit -C client checkout origin/main &&\n \tgit -C client checkout origin/otherbranch &&\n \n \t# Sanity check to ensure that the blobs from the merge base and \"add\n \t# 11\" are missing\n \tgit -C client rev-list --objects --all --missing=print >missing_list &&\n-\tMERGE_BASE_BLOB=$(git -C server rev-parse master^^:file.txt) &&\n-\tADD_11_BLOB=$(git -C server rev-parse master^:file.txt) &&\n+\tMERGE_BASE_BLOB=$(git -C server rev-parse main^^:file.txt) &&\n+\tADD_11_BLOB=$(git -C server rev-parse main^:file.txt) &&\n \tgrep \"[?]$MERGE_BASE_BLOB\" missing_list &&\n \tgrep \"[?]$ADD_11_BLOB\" missing_list &&\n \n-\tgit -C client rebase --merge --reapply-cherry-picks origin/master &&\n+\tgit -C client rebase --merge --reapply-cherry-picks origin/main &&\n \n \t# The blob from the merge base had to be fetched, but not \"add 11\"\n \tgit -C client rev-list --objects --all --missing=print >missing_list &&\ndiff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh\nindex a927774910..360b46adef 100755\n--- a/t/t3403-rebase-skip.sh\n+++ b/t/t3403-rebase-skip.sh\n@@ -48,7 +48,7 @@ test_expect_success setup '\n \t'\n \n test_expect_success 'rebase with git am -3 (default)' '\n-\ttest_must_fail git rebase master\n+\ttest_must_fail git rebase main\n '\n \n test_expect_success 'rebase --skip can not be used with other options' '\n@@ -64,7 +64,7 @@ test_expect_success 'rebase moves back to skip-reference' '\n \ttest refs/heads/skip-reference = $(git symbolic-ref HEAD) &&\n \tgit branch post-rebase &&\n \tgit reset --hard pre-rebase &&\n-\ttest_must_fail git rebase master &&\n+\ttest_must_fail git rebase main &&\n \techo \"hello\" > hello &&\n \tgit add hello &&\n \tgit rebase --continue &&\n@@ -75,7 +75,7 @@ test_expect_success 'rebase moves back to skip-reference' '\n test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge'\n \n test_expect_success 'rebase with --merge' '\n-\ttest_must_fail git rebase --merge master\n+\ttest_must_fail git rebase --merge main\n '\n \n test_expect_success 'rebase --skip with --merge' '\ndiff --git a/t/t3405-rebase-malformed.sh b/t/t3405-rebase-malformed.sh\nindex 860e63e444..7ef8bfa0ac 100755\n--- a/t/t3405-rebase-malformed.sh\n+++ b/t/t3405-rebase-malformed.sh\n@@ -52,7 +52,7 @@ test_expect_success setup '\n \tgit add file3 &&\n \tgit commit --allow-empty-message -m \"\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \techo One >file1 &&\n \ttest_tick &&\n@@ -62,7 +62,7 @@ test_expect_success setup '\n \n test_expect_success 'rebase commit with multi-line subject' '\n \n-\tgit rebase master multi-line-subject &&\n+\tgit rebase main multi-line-subject &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >F1 &&\n \n \ttest_cmp F0 F1 &&\n@@ -70,14 +70,14 @@ test_expect_success 'rebase commit with multi-line subject' '\n '\n \n test_expect_success 'rebase commit with diff in message' '\n-\tgit rebase master diff-in-message &&\n+\tgit rebase main diff-in-message &&\n \tgit cat-file commit HEAD | sed -e \"1,/^$/d\" >G1 &&\n \ttest_cmp G0 G1 &&\n \ttest_cmp G G0\n '\n \n test_expect_success 'rebase -m commit with empty message' '\n-\tgit rebase -m master empty-message-merge\n+\tgit rebase -m main empty-message-merge\n '\n \n test_expect_success 'rebase -i commit with empty message' '\ndiff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh\nindex 4afc528165..00e271fb36 100755\n--- a/t/t3406-rebase-message.sh\n+++ b/t/t3406-rebase-message.sh\n@@ -18,27 +18,27 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'rebase -m' '\n-\tgit rebase -m master >actual &&\n+\tgit rebase -m main >actual &&\n \ttest_must_be_empty actual\n '\n \n-test_expect_success 'rebase against master twice' '\n-\tgit rebase --apply master >out &&\n+test_expect_success 'rebase against main twice' '\n+\tgit rebase --apply main >out &&\n \ttest_i18ngrep \"Current branch topic is up to date\" out\n '\n \n-test_expect_success 'rebase against master twice with --force' '\n-\tgit rebase --force-rebase --apply master >out &&\n+test_expect_success 'rebase against main twice with --force' '\n+\tgit rebase --force-rebase --apply main >out &&\n \ttest_i18ngrep \"Current branch topic is up to date, rebase forced\" out\n '\n \n-test_expect_success 'rebase against master twice from another branch' '\n+test_expect_success 'rebase against main twice from another branch' '\n \tgit checkout topic^ &&\n-\tgit rebase --apply master topic >out &&\n+\tgit rebase --apply main topic >out &&\n \ttest_i18ngrep \"Current branch topic is up to date\" out\n '\n \n-test_expect_success 'rebase fast-forward to master' '\n+test_expect_success 'rebase fast-forward to main' '\n \tgit checkout topic^ &&\n \tgit rebase --apply topic >out &&\n \ttest_i18ngrep \"Fast-forwarded HEAD to topic\" out\n@@ -46,21 +46,21 @@ test_expect_success 'rebase fast-forward to master' '\n \n test_expect_success 'rebase --stat' '\n \tgit reset --hard start &&\n-\tgit rebase --stat master >diffstat.txt &&\n+\tgit rebase --stat main >diffstat.txt &&\n \tgrep \"^ fileX |  *1 +$\" diffstat.txt\n '\n \n test_expect_success 'rebase w/config rebase.stat' '\n \tgit reset --hard start &&\n \tgit config rebase.stat true &&\n-\tgit rebase master >diffstat.txt &&\n+\tgit rebase main >diffstat.txt &&\n \tgrep \"^ fileX |  *1 +$\" diffstat.txt\n '\n \n test_expect_success 'rebase -n overrides config rebase.stat config' '\n \tgit reset --hard start &&\n \tgit config rebase.stat true &&\n-\tgit rebase -n master >diffstat.txt &&\n+\tgit rebase -n main >diffstat.txt &&\n \t! grep \"^ fileX |  *1 +$\" diffstat.txt\n '\n \n@@ -113,7 +113,7 @@ test_expect_success 'rebase -i onto unrelated history' '\n \tgit init unrelated &&\n \ttest_commit -C unrelated 1 &&\n \tgit -C unrelated remote add -f origin \"$PWD\" &&\n-\tgit -C unrelated branch --set-upstream-to=origin/master &&\n+\tgit -C unrelated branch --set-upstream-to=origin/main &&\n \tgit -C unrelated -c core.editor=true rebase -i -v --stat >actual &&\n \ttest_i18ngrep \"Changes to \" actual &&\n \ttest_i18ngrep \"5 files changed\" actual\ndiff --git a/t/t3407-rebase-abort.sh b/t/t3407-rebase-abort.sh\nindex 97efea0f56..2c2a5b9c10 100755\n--- a/t/t3407-rebase-abort.sh\n+++ b/t/t3407-rebase-abort.sh\n@@ -37,7 +37,7 @@ testrebase() {\n \t\tcd \"$work_dir\" &&\n \t\t# Clean up the state from the previous one\n \t\tgit reset --hard pre-rebase &&\n-\t\ttest_must_fail git rebase$type master &&\n+\t\ttest_must_fail git rebase$type main &&\n \t\ttest_path_is_dir \"$dotest\" &&\n \t\tgit rebase --abort &&\n \t\ttest $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&\n@@ -48,10 +48,10 @@ testrebase() {\n \t\tcd \"$work_dir\" &&\n \t\t# Clean up the state from the previous one\n \t\tgit reset --hard pre-rebase &&\n-\t\ttest_must_fail git rebase$type master &&\n+\t\ttest_must_fail git rebase$type main &&\n \t\ttest_path_is_dir \"$dotest\" &&\n \t\ttest_must_fail git rebase --skip &&\n-\t\ttest $(git rev-parse HEAD) = $(git rev-parse master) &&\n+\t\ttest $(git rev-parse HEAD) = $(git rev-parse main) &&\n \t\tgit rebase --abort &&\n \t\ttest $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&\n \t\ttest ! -d \"$dotest\"\n@@ -61,13 +61,13 @@ testrebase() {\n \t\tcd \"$work_dir\" &&\n \t\t# Clean up the state from the previous one\n \t\tgit reset --hard pre-rebase &&\n-\t\ttest_must_fail git rebase$type master &&\n+\t\ttest_must_fail git rebase$type main &&\n \t\ttest_path_is_dir \"$dotest\" &&\n \t\techo c > a &&\n \t\techo d >> a &&\n \t\tgit add a &&\n \t\ttest_must_fail git rebase --continue &&\n-\t\ttest $(git rev-parse HEAD) != $(git rev-parse master) &&\n+\t\ttest $(git rev-parse HEAD) != $(git rev-parse main) &&\n \t\tgit rebase --abort &&\n \t\ttest $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&\n \t\ttest ! -d \"$dotest\"\n@@ -78,7 +78,7 @@ testrebase() {\n \t\t# Clean up the state from the previous one\n \t\tgit reset --hard pre-rebase &&\n \t\tgit reflog show to-rebase > reflog_before &&\n-\t\ttest_must_fail git rebase$type master &&\n+\t\ttest_must_fail git rebase$type main &&\n \t\tgit rebase --abort &&\n \t\tgit reflog show to-rebase > reflog_after &&\n \t\ttest_cmp reflog_before reflog_after &&\n@@ -89,7 +89,7 @@ testrebase() {\n \t\tcd \"$work_dir\" &&\n \t\t# Clean up the state from the previous one\n \t\tgit reset --hard pre-rebase &&\n-\t\ttest_must_fail git rebase$type master &&\n+\t\ttest_must_fail git rebase$type main &&\n \t\ttest_must_fail git rebase -v --abort &&\n \t\ttest_must_fail git rebase --abort -v &&\n \t\tgit rebase --abort\n@@ -103,7 +103,7 @@ test_expect_success 'rebase --apply --quit' '\n \tcd \"$work_dir\" &&\n \t# Clean up the state from the previous one\n \tgit reset --hard pre-rebase &&\n-\ttest_must_fail git rebase --apply master &&\n+\ttest_must_fail git rebase --apply main &&\n \ttest_path_is_dir .git/rebase-apply &&\n \thead_before=$(git rev-parse HEAD) &&\n \tgit rebase --quit &&\n@@ -115,7 +115,7 @@ test_expect_success 'rebase --merge --quit' '\n \tcd \"$work_dir\" &&\n \t# Clean up the state from the previous one\n \tgit reset --hard pre-rebase &&\n-\ttest_must_fail git rebase --merge master &&\n+\ttest_must_fail git rebase --merge main &&\n \ttest_path_is_dir .git/rebase-merge &&\n \thead_before=$(git rev-parse HEAD) &&\n \tgit rebase --quit &&\ndiff --git a/t/t3408-rebase-multi-line.sh b/t/t3408-rebase-multi-line.sh\nindex d2bd7c17b0..1cba82f001 100755\n--- a/t/t3408-rebase-multi-line.sh\n+++ b/t/t3408-rebase-multi-line.sh\n@@ -46,7 +46,7 @@ But otherwise with a sane description.\" side2 &&\n test_expect_success rebase '\n \n \tgit checkout side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n \tgit cat-file commit side@{1} | sed -e \"1,/^\\$/d\" >expect &&\n \ttest_cmp expect actual\ndiff --git a/t/t3409-rebase-preserve-merges.sh b/t/t3409-rebase-preserve-merges.sh\nindex 3b340f1ece..b078985b95 100755\n--- a/t/t3409-rebase-preserve-merges.sh\n+++ b/t/t3409-rebase-preserve-merges.sh\n@@ -18,7 +18,7 @@ export GIT_AUTHOR_EMAIL\n \n # Clone 2 (conflicting merge):\n #\n-# A1--A2--B3   <-- origin/master\n+# A1--A2--B3   <-- origin/main\n #  \\       \\\n #   B1------M  <-- topic\n #    \\\n@@ -26,7 +26,7 @@ export GIT_AUTHOR_EMAIL\n #\n # Clone 3 (no-ff merge):\n #\n-# A1--A2--B3   <-- origin/master\n+# A1--A2--B3   <-- origin/main\n #  \\\n #   B1------M  <-- topic\n #    \\     /\n@@ -44,7 +44,7 @@ test_expect_success 'setup for merge-preserving rebase' \\\n \techo Second > B &&\n \tgit add B &&\n \tgit commit -m \"Add B1\" &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \techo Third >> A &&\n \tgit commit -a -m \"Modify A2\" &&\n \techo Fifth > B &&\n@@ -55,10 +55,10 @@ test_expect_success 'setup for merge-preserving rebase' \\\n \t(\n \t\tcd clone2 &&\n \t\tgit checkout -b topic origin/topic &&\n-\t\ttest_must_fail git merge origin/master &&\n+\t\ttest_must_fail git merge origin/main &&\n \t\techo Resolved >B &&\n \t\tgit add B &&\n-\t\tgit commit -m \"Merge origin/master into topic\"\n+\t\tgit commit -m \"Merge origin/main into topic\"\n \t) &&\n \n \tgit clone ./. clone3 &&\ndiff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh\nindex 21632a984e..120315ac0e 100755\n--- a/t/t3412-rebase-root.sh\n+++ b/t/t3412-rebase-root.sh\n@@ -24,7 +24,7 @@ test_expect_success 'prepare repository' '\n \n test_expect_success 'rebase --root fails with too many args' '\n \tgit checkout -B fail other &&\n-\ttest_must_fail git rebase --onto master --root fail fail\n+\ttest_must_fail git rebase --onto main --root fail fail\n '\n \n test_expect_success 'setup pre-rebase hook' '\n@@ -44,7 +44,7 @@ EOF\n \n test_expect_success 'rebase --root --onto <newbase>' '\n \tgit checkout -b work other &&\n-\tgit rebase --root --onto master &&\n+\tgit rebase --root --onto main &&\n \tgit log --pretty=tformat:\"%s\" > rebased &&\n \ttest_cmp expect rebased\n '\n@@ -55,7 +55,7 @@ test_expect_success 'pre-rebase got correct input (1)' '\n \n test_expect_success 'rebase --root --onto <newbase> <branch>' '\n \tgit branch work2 other &&\n-\tgit rebase --root --onto master work2 &&\n+\tgit rebase --root --onto main work2 &&\n \tgit log --pretty=tformat:\"%s\" > rebased2 &&\n \ttest_cmp expect rebased2\n '\n@@ -66,7 +66,7 @@ test_expect_success 'pre-rebase got correct input (2)' '\n \n test_expect_success 'rebase -i --root --onto <newbase>' '\n \tgit checkout -b work3 other &&\n-\tgit rebase -i --root --onto master &&\n+\tgit rebase -i --root --onto main &&\n \tgit log --pretty=tformat:\"%s\" > rebased3 &&\n \ttest_cmp expect rebased3\n '\n@@ -77,7 +77,7 @@ test_expect_success 'pre-rebase got correct input (3)' '\n \n test_expect_success 'rebase -i --root --onto <newbase> <branch>' '\n \tgit branch work4 other &&\n-\tgit rebase -i --root --onto master work4 &&\n+\tgit rebase -i --root --onto main work4 &&\n \tgit log --pretty=tformat:\"%s\" > rebased4 &&\n \ttest_cmp expect rebased4\n '\n@@ -88,7 +88,7 @@ test_expect_success 'pre-rebase got correct input (4)' '\n \n test_expect_success REBASE_P 'rebase -i -p with linear history' '\n \tgit checkout -b work5 other &&\n-\tgit rebase -i -p --root --onto master &&\n+\tgit rebase -i -p --root --onto main &&\n \tgit log --pretty=tformat:\"%s\" > rebased5 &&\n \ttest_cmp expect rebased5\n '\n@@ -122,7 +122,7 @@ EOF\n \n test_expect_success REBASE_P 'rebase -i -p with merge' '\n \tgit checkout -b work6 other &&\n-\tgit rebase -i -p --root --onto master &&\n+\tgit rebase -i -p --root --onto main &&\n \tlog_with_names work6 > rebased6 &&\n \ttest_cmp expect-side rebased6\n '\n@@ -157,7 +157,7 @@ EOF\n \n test_expect_success REBASE_P 'rebase -i -p with two roots' '\n \tgit checkout -b work7 other &&\n-\tgit rebase -i -p --root --onto master &&\n+\tgit rebase -i -p --root --onto main &&\n \tlog_with_names work7 > rebased7 &&\n \ttest_cmp expect-third rebased7\n '\n@@ -173,14 +173,14 @@ EOF\n \n test_expect_success 'pre-rebase hook stops rebase' '\n \tgit checkout -b stops1 other &&\n-\ttest_must_fail git rebase --root --onto master &&\n+\ttest_must_fail git rebase --root --onto main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/stops1 &&\n \ttest 0 = $(git rev-list other...stops1 | wc -l)\n '\n \n test_expect_success 'pre-rebase hook stops rebase -i' '\n \tgit checkout -b stops2 other &&\n-\ttest_must_fail git rebase --root --onto master &&\n+\ttest_must_fail git rebase --root --onto main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/stops2 &&\n \ttest 0 = $(git rev-list other...stops2 | wc -l)\n '\n@@ -190,7 +190,7 @@ test_expect_success 'remove pre-rebase hook' '\n '\n \n test_expect_success 'set up a conflict' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo conflict > B &&\n \tgit add B &&\n \tgit commit -m conflict\n@@ -198,7 +198,7 @@ test_expect_success 'set up a conflict' '\n \n test_expect_success 'rebase --root with conflict (first part)' '\n \tgit checkout -b conflict1 other &&\n-\ttest_must_fail git rebase --root --onto master &&\n+\ttest_must_fail git rebase --root --onto main &&\n \tgit ls-files -u | grep \"B$\"\n '\n \n@@ -225,7 +225,7 @@ test_expect_success 'rebase --root with conflict (second part)' '\n \n test_expect_success 'rebase -i --root with conflict (first part)' '\n \tgit checkout -b conflict2 other &&\n-\ttest_must_fail git rebase -i --root --onto master &&\n+\ttest_must_fail git rebase -i --root --onto main &&\n \tgit ls-files -u | grep \"B$\"\n '\n \n@@ -263,7 +263,7 @@ EOF\n \n test_expect_success REBASE_P 'rebase -i -p --root with conflict (first part)' '\n \tgit checkout -b conflict3 other &&\n-\ttest_must_fail git rebase -i -p --root --onto master &&\n+\ttest_must_fail git rebase -i -p --root --onto main &&\n \tgit ls-files -u | grep \"B$\"\n '\n \ndiff --git a/t/t3413-rebase-hook.sh b/t/t3413-rebase-hook.sh\nindex b6833e9a5f..b5b8d3556e 100755\n--- a/t/t3413-rebase-hook.sh\n+++ b/t/t3413-rebase-hook.sh\n@@ -18,7 +18,7 @@ test_expect_success setup '\n \tgit add git &&\n \ttest_tick &&\n \tgit commit -m side &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit log --pretty=oneline --abbrev-commit --graph --all &&\n \tgit branch test side\n '\n@@ -26,14 +26,14 @@ test_expect_success setup '\n test_expect_success 'rebase' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \ttest \"z$(cat git)\" = zworld\n '\n \n test_expect_success 'rebase -i' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tEDITOR=true git rebase -i master &&\n+\tEDITOR=true git rebase -i main &&\n \ttest \"z$(cat git)\" = zworld\n '\n \n@@ -49,53 +49,53 @@ EOF\n test_expect_success 'pre-rebase hook gets correct input (1)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,\n \n '\n \n test_expect_success 'pre-rebase hook gets correct input (2)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit rebase master test &&\n+\tgit rebase main test &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,test\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,test\n '\n \n test_expect_success 'pre-rebase hook gets correct input (3)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit checkout master &&\n-\tgit rebase master test &&\n+\tgit checkout main &&\n+\tgit rebase main test &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,test\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,test\n '\n \n test_expect_success 'pre-rebase hook gets correct input (4)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tEDITOR=true git rebase -i master &&\n+\tEDITOR=true git rebase -i main &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,\n \n '\n \n test_expect_success 'pre-rebase hook gets correct input (5)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tEDITOR=true git rebase -i master test &&\n+\tEDITOR=true git rebase -i main test &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,test\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,test\n '\n \n test_expect_success 'pre-rebase hook gets correct input (6)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit checkout master &&\n-\tEDITOR=true git rebase -i master test &&\n+\tgit checkout main &&\n+\tEDITOR=true git rebase -i main test &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,test\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,test\n '\n \n test_expect_success 'setup pre-rebase hook that fails' '\n@@ -110,7 +110,7 @@ EOF\n test_expect_success 'pre-rebase hook stops rebase (1)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\ttest_must_fail git rebase master &&\n+\ttest_must_fail git rebase main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/test &&\n \ttest 0 = $(git rev-list HEAD...side | wc -l)\n '\n@@ -118,7 +118,7 @@ test_expect_success 'pre-rebase hook stops rebase (1)' '\n test_expect_success 'pre-rebase hook stops rebase (2)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\ttest_must_fail env EDITOR=: git rebase -i master &&\n+\ttest_must_fail env EDITOR=: git rebase -i main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/test &&\n \ttest 0 = $(git rev-list HEAD...side | wc -l)\n '\n@@ -126,7 +126,7 @@ test_expect_success 'pre-rebase hook stops rebase (2)' '\n test_expect_success 'rebase --no-verify overrides pre-rebase (1)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit rebase --no-verify master &&\n+\tgit rebase --no-verify main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/test &&\n \ttest \"z$(cat git)\" = zworld\n '\n@@ -134,7 +134,7 @@ test_expect_success 'rebase --no-verify overrides pre-rebase (1)' '\n test_expect_success 'rebase --no-verify overrides pre-rebase (2)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tEDITOR=true git rebase --no-verify -i master &&\n+\tEDITOR=true git rebase --no-verify -i main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/test &&\n \ttest \"z$(cat git)\" = zworld\n '\ndiff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh\nindex 7bab6000dc..40bb7ac649 100755\n--- a/t/t3415-rebase-autosquash.sh\n+++ b/t/t3415-rebase-autosquash.sh\n@@ -407,7 +407,7 @@ test_expect_success 'wrapped original subject' '\n \n test_expect_success 'abort last squash' '\n \ttest_when_finished \"test_might_fail git rebase --abort\" &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \n \tgit checkout -b some-squashes &&\n \tgit commit --allow-empty -m first &&\ndiff --git a/t/t3416-rebase-onto-threedots.sh b/t/t3416-rebase-onto-threedots.sh\nindex 1f37adf56b..2360a1e37a 100755\n--- a/t/t3416-rebase-onto-threedots.sh\n+++ b/t/t3416-rebase-onto-threedots.sh\n@@ -5,14 +5,14 @@ test_description='git rebase --onto A...B'\n . ./test-lib.sh\n . \"$TEST_DIRECTORY/lib-rebase.sh\"\n \n-# Rebase only the tip commit of \"topic\" on merge base between \"master\"\n-# and \"topic\".  Cannot do this for \"side\" with \"master\" because there\n+# Rebase only the tip commit of \"topic\" on merge base between \"main\"\n+# and \"topic\".  Cannot do this for \"side\" with \"main\" because there\n # is no single merge base.\n #\n #\n #\t    F---G topic                             G'\n #\t   /                                       /\n-# A---B---C---D---E master        -->       A---B---C---D---E\n+# A---B---C---D---E main        -->       A---B---C---D---E\n #      \\   \\ /\n #\t\\   x\n #\t \\ / \\\n@@ -26,7 +26,7 @@ test_expect_success setup '\n \tgit branch topic &&\n \tgit checkout side &&\n \ttest_commit H &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit merge H &&\n \tgit tag D &&\n@@ -42,83 +42,83 @@ test_expect_success setup '\n \ttest_commit K\n '\n \n-test_expect_success 'rebase --onto master...topic' '\n+test_expect_success 'rebase --onto main...topic' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \n-\tgit rebase --onto master...topic F &&\n+\tgit rebase --onto main...topic F &&\n \tgit rev-parse HEAD^1 >actual &&\n \tgit rev-parse C^0 >expect &&\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase --onto master...' '\n+test_expect_success 'rebase --onto main...' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \n-\tgit rebase --onto master... F &&\n+\tgit rebase --onto main... F &&\n \tgit rev-parse HEAD^1 >actual &&\n \tgit rev-parse C^0 >expect &&\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase --onto master...side' '\n+test_expect_success 'rebase --onto main...side' '\n \tgit reset --hard &&\n \tgit checkout side &&\n \tgit reset --hard K &&\n \n-\ttest_must_fail git rebase --onto master...side J\n+\ttest_must_fail git rebase --onto main...side J\n '\n \n-test_expect_success 'rebase -i --onto master...topic' '\n+test_expect_success 'rebase -i --onto main...topic' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \tset_fake_editor &&\n-\tEXPECT_COUNT=1 git rebase -i --onto master...topic F &&\n+\tEXPECT_COUNT=1 git rebase -i --onto main...topic F &&\n \tgit rev-parse HEAD^1 >actual &&\n \tgit rev-parse C^0 >expect &&\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase -i --onto master...' '\n+test_expect_success 'rebase -i --onto main...' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \tset_fake_editor &&\n-\tEXPECT_COUNT=1 git rebase -i --onto master... F &&\n+\tEXPECT_COUNT=1 git rebase -i --onto main... F &&\n \tgit rev-parse HEAD^1 >actual &&\n \tgit rev-parse C^0 >expect &&\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase -i --onto master...side' '\n+test_expect_success 'rebase -i --onto main...side' '\n \tgit reset --hard &&\n \tgit checkout side &&\n \tgit reset --hard K &&\n \n \tset_fake_editor &&\n-\ttest_must_fail git rebase -i --onto master...side J\n+\ttest_must_fail git rebase -i --onto main...side J\n '\n \n test_expect_success 'rebase --keep-base --onto incompatible' '\n-\ttest_must_fail git rebase --keep-base --onto master...\n+\ttest_must_fail git rebase --keep-base --onto main...\n '\n \n test_expect_success 'rebase --keep-base --root incompatible' '\n \ttest_must_fail git rebase --keep-base --root\n '\n \n-test_expect_success 'rebase --keep-base master from topic' '\n+test_expect_success 'rebase --keep-base main from topic' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \n-\tgit rebase --keep-base master &&\n+\tgit rebase --keep-base main &&\n \tgit rev-parse C >base.expect &&\n-\tgit merge-base master HEAD >base.actual &&\n+\tgit merge-base main HEAD >base.actual &&\n \ttest_cmp base.expect base.actual &&\n \n \tgit rev-parse HEAD~2 >actual &&\n@@ -126,23 +126,23 @@ test_expect_success 'rebase --keep-base master from topic' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase --keep-base master from side' '\n+test_expect_success 'rebase --keep-base main from side' '\n \tgit reset --hard &&\n \tgit checkout side &&\n \tgit reset --hard K &&\n \n-\ttest_must_fail git rebase --keep-base master\n+\ttest_must_fail git rebase --keep-base main\n '\n \n-test_expect_success 'rebase -i --keep-base master from topic' '\n+test_expect_success 'rebase -i --keep-base main from topic' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \n \tset_fake_editor &&\n-\tEXPECT_COUNT=2 git rebase -i --keep-base master &&\n+\tEXPECT_COUNT=2 git rebase -i --keep-base main &&\n \tgit rev-parse C >base.expect &&\n-\tgit merge-base master HEAD >base.actual &&\n+\tgit merge-base main HEAD >base.actual &&\n \ttest_cmp base.expect base.actual &&\n \n \tgit rev-parse HEAD~2 >actual &&\n@@ -150,13 +150,13 @@ test_expect_success 'rebase -i --keep-base master from topic' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase -i --keep-base master from side' '\n+test_expect_success 'rebase -i --keep-base main from side' '\n \tgit reset --hard &&\n \tgit checkout side &&\n \tgit reset --hard K &&\n \n \tset_fake_editor &&\n-\ttest_must_fail git rebase -i --keep-base master\n+\ttest_must_fail git rebase -i --keep-base main\n '\n \n test_done\ndiff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh\nindex 7a2da972fd..b9e059e168 100755\n--- a/t/t3418-rebase-continue.sh\n+++ b/t/t3418-rebase-continue.sh\n@@ -15,13 +15,13 @@ test_expect_success 'setup' '\n \tgit checkout -b topic HEAD^ &&\n \ttest_commit \"commit-new-file-F2-on-topic-branch\" F2 22 &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'interactive rebase --continue works with touched file' '\n \trm -fr .git/rebase-* &&\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tFAKE_LINES=\"edit 1\" git rebase -i HEAD^ &&\n \ttest-tool chmtime =-60 F1 &&\n@@ -31,9 +31,9 @@ test_expect_success 'interactive rebase --continue works with touched file' '\n test_expect_success 'non-interactive rebase --continue works with touched file' '\n \trm -fr .git/rebase-* &&\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n-\ttest_must_fail git rebase --onto master master topic &&\n+\ttest_must_fail git rebase --onto main main topic &&\n \techo \"Resolved\" >F2 &&\n \tgit add F2 &&\n \ttest-tool chmtime =-60 F1 &&\n@@ -61,7 +61,7 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '\n \tchmod +x test-bin/git-merge-funny &&\n \t(\n \t\tPATH=./test-bin:$PATH &&\n-\t\ttest_must_fail git rebase -s funny -Xopt master topic\n+\t\ttest_must_fail git rebase -s funny -Xopt main topic\n \t) &&\n \ttest -f funny.was.run &&\n \trm funny.was.run &&\n@@ -93,7 +93,7 @@ test_expect_success 'rebase -i --continue handles merge strategy and options' '\n \tchmod +x test-bin/git-merge-funny &&\n \t(\n \t\tPATH=./test-bin:$PATH &&\n-\t\ttest_must_fail git rebase -i -s funny -Xopt -Xfoo master topic\n+\t\ttest_must_fail git rebase -i -s funny -Xopt -Xfoo main topic\n \t) &&\n \ttest -f funny.was.run &&\n \trm funny.was.run &&\n@@ -188,11 +188,11 @@ test_expect_success '--skip after failed fixup cleans commit message' '\n test_expect_success 'setup rerere database' '\n \trm -fr .git/rebase-* &&\n \tgit reset --hard commit-new-file-F3-on-topic-branch &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit \"commit-new-file-F3\" F3 3 &&\n \ttest_config rerere.enabled true &&\n \tgit update-ref refs/heads/topic commit-new-file-F3-on-topic-branch &&\n-\ttest_must_fail git rebase -m master topic &&\n+\ttest_must_fail git rebase -m main topic &&\n \techo \"Resolved\" >F2 &&\n \tcp F2 expected-F2 &&\n \tgit add F2 &&\n@@ -207,7 +207,7 @@ test_expect_success 'setup rerere database' '\n prepare () {\n \trm -fr .git/rebase-* &&\n \tgit reset --hard commit-new-file-F3-on-topic-branch &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_config rerere.enabled true\n }\n \n@@ -215,7 +215,7 @@ test_rerere_autoupdate () {\n \taction=$1 &&\n \ttest_expect_success \"rebase $action --continue remembers --rerere-autoupdate\" '\n \t\tprepare &&\n-\t\ttest_must_fail git rebase $action --rerere-autoupdate master topic &&\n+\t\ttest_must_fail git rebase $action --rerere-autoupdate main topic &&\n \t\ttest_cmp expected-F2 F2 &&\n \t\tgit diff-files --quiet &&\n \t\ttest_must_fail git rebase --continue &&\n@@ -227,7 +227,7 @@ test_rerere_autoupdate () {\n \ttest_expect_success \"rebase $action --continue honors rerere.autoUpdate\" '\n \t\tprepare &&\n \t\ttest_config rerere.autoupdate true &&\n-\t\ttest_must_fail git rebase $action master topic &&\n+\t\ttest_must_fail git rebase $action main topic &&\n \t\ttest_cmp expected-F2 F2 &&\n \t\tgit diff-files --quiet &&\n \t\ttest_must_fail git rebase --continue &&\n@@ -239,7 +239,7 @@ test_rerere_autoupdate () {\n \ttest_expect_success \"rebase $action --continue remembers --no-rerere-autoupdate\" '\n \t\tprepare &&\n \t\ttest_config rerere.autoupdate true &&\n-\t\ttest_must_fail git rebase $action --no-rerere-autoupdate master topic &&\n+\t\ttest_must_fail git rebase $action --no-rerere-autoupdate main topic &&\n \t\ttest_cmp expected-F2 F2 &&\n \t\ttest_must_fail git diff-files --quiet &&\n \t\tgit add F2 &&\ndiff --git a/t/t3419-rebase-patch-id.sh b/t/t3419-rebase-patch-id.sh\nindex 1f32faa4a4..29fa76be4d 100755\n--- a/t/t3419-rebase-patch-id.sh\n+++ b/t/t3419-rebase-patch-id.sh\n@@ -24,7 +24,7 @@ test_expect_success 'setup' '\n \n test_expect_success 'setup: 500 lines' '\n \trm -f .gitattributes &&\n-\tgit checkout -q -f master &&\n+\tgit checkout -q -f main &&\n \tgit reset --hard root &&\n \ttest_seq 500 >file &&\n \tgit add file &&\n@@ -40,7 +40,7 @@ test_expect_success 'setup: 500 lines' '\n \tgit add newfile &&\n \tgit commit -q -m \"add small file\" &&\n \n-\tgit cherry-pick master >/dev/null 2>&1\n+\tgit cherry-pick main >/dev/null 2>&1\n '\n \n test_expect_success 'setup attributes' '\n@@ -48,18 +48,18 @@ test_expect_success 'setup attributes' '\n '\n \n test_expect_success 'detect upstream patch' '\n-\tgit checkout -q master &&\n+\tgit checkout -q main &&\n \tscramble file &&\n \tgit add file &&\n \tgit commit -q -m \"change big file again\" &&\n \tgit checkout -q other^{} &&\n-\tgit rebase master &&\n-\tgit rev-list master...HEAD~ >revs &&\n+\tgit rebase main &&\n+\tgit rev-list main...HEAD~ >revs &&\n \ttest_must_be_empty revs\n '\n \n test_expect_success 'do not drop patch' '\n-\tgit branch -f squashed master &&\n+\tgit branch -f squashed main &&\n \tgit checkout -q -f squashed &&\n \tgit reset -q --soft HEAD~2 &&\n \tgit commit -q -m squashed &&\ndiff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh\nindex ca331733fb..b1263e5a47 100755\n--- a/t/t3420-rebase-autostash.sh\n+++ b/t/t3420-rebase-autostash.sh\n@@ -21,12 +21,12 @@ test_expect_success setup '\n \tgit add . &&\n \ttest_tick &&\n \tgit commit -m \"third commit\" &&\n-\tgit checkout -b unrelated-onto-branch master &&\n+\tgit checkout -b unrelated-onto-branch main &&\n \techo unrelated >file4 &&\n \tgit add . &&\n \ttest_tick &&\n \tgit commit -m \"unrelated commit\" &&\n-\tgit checkout -b related-onto-branch master &&\n+\tgit checkout -b related-onto-branch main &&\n \techo conflicting-change >file2 &&\n \tgit add . &&\n \ttest_tick &&\n@@ -305,7 +305,7 @@ test_expect_success 'autostash is saved on editor failure with conflict' '\n '\n \n test_expect_success 'autostash with dirty submodules' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \tgit checkout -b with-submodule &&\n \tgit submodule add ./ sub &&\n \ttest_tick &&\n@@ -324,7 +324,7 @@ test_expect_success 'branch is left alone when possible' '\n \n test_expect_success 'never change active branch' '\n \tgit checkout -b not-the-feature-branch unrelated-onto-branch &&\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \techo changed >file0 &&\n \tgit rebase --autostash not-the-feature-branch feature-branch &&\n \ttest_cmp_rev not-the-feature-branch unrelated-onto-branch\ndiff --git a/t/t3423-rebase-reword.sh b/t/t3423-rebase-reword.sh\nindex 6963750794..4859bb8f72 100755\n--- a/t/t3423-rebase-reword.sh\n+++ b/t/t3423-rebase-reword.sh\n@@ -7,7 +7,7 @@ test_description='git rebase interactive with rewording'\n . \"$TEST_DIRECTORY\"/lib-rebase.sh\n \n test_expect_success 'setup' '\n-\ttest_commit master file-1 test &&\n+\ttest_commit main file-1 test &&\n \n \tgit checkout -b stuff &&\n \n@@ -22,7 +22,7 @@ test_expect_success 'reword without issues functions as intended' '\n \n \tset_fake_editor &&\n \tFAKE_LINES=\"pick 1 reword 2\" FAKE_COMMIT_MESSAGE=\"feature_b_reworded\" \\\n-\t\tgit rebase -i -v master &&\n+\t\tgit rebase -i -v main &&\n \n \ttest \"$(git log -1 --format=%B)\" = \"feature_b_reworded\" &&\n \ttest $(git rev-list --count HEAD) = 3\n@@ -35,7 +35,7 @@ test_expect_success 'reword after a conflict preserves commit' '\n \n \tset_fake_editor &&\n \ttest_must_fail env FAKE_LINES=\"reword 2\" \\\n-\t\tgit rebase -i -v master &&\n+\t\tgit rebase -i -v main &&\n \n \tgit checkout --theirs file-2 &&\n \tgit add file-2 &&\ndiff --git a/t/t3427-rebase-subtree.sh b/t/t3427-rebase-subtree.sh\nindex 5839719ba1..265856ece6 100755\n--- a/t/t3427-rebase-subtree.sh\n+++ b/t/t3427-rebase-subtree.sh\n@@ -17,7 +17,7 @@ commit_message() {\n #\n # topic_1 - topic_2 - topic_3\n #                             \\\n-# README ---------------------- Add subproject master - topic_4 - files_subtree/topic_5\n+# README ---------------------- Add subproject main - topic_4 - files_subtree/topic_5\n #\n # Where the merge moves the files topic_[123].t into the subdirectory\n # files_subtree/ and topic_4 as well as files_subtree/topic_5 add files to that\n@@ -28,7 +28,7 @@ commit_message() {\n # an empty commit is added on top. The pre-rebase commit history looks like\n # this:\n #\n-# Add subproject master - topic_4 - files_subtree/topic_5 - Empty commit\n+# Add subproject main - topic_4 - files_subtree/topic_5 - Empty commit\n #\n # where the root commit adds three files: topic_1.t, topic_2.t and topic_3.t.\n #\n@@ -48,11 +48,11 @@ test_expect_success 'setup' '\n \ttest_commit -C files topic_3 &&\n \n \t: perform subtree merge into files_subtree/ &&\n-\tgit fetch files refs/heads/master:refs/heads/files-master &&\n+\tgit fetch files refs/heads/main:refs/heads/files-main &&\n \tgit merge -s ours --no-commit --allow-unrelated-histories \\\n-\t\tfiles-master &&\n-\tgit read-tree --prefix=files_subtree -u files-master &&\n-\tgit commit -m \"Add subproject master\" &&\n+\t\tfiles-main &&\n+\tgit read-tree --prefix=files_subtree -u files-main &&\n+\tgit commit -m \"Add subproject main\" &&\n \n \t: add two extra commits to rebase &&\n \ttest_commit -C files_subtree topic_4 &&\n@@ -70,7 +70,7 @@ test_expect_success 'setup' '\n test_expect_failure REBASE_P 'Rebase -Xsubtree --preserve-merges --onto commit' '\n \treset_rebase &&\n \tgit checkout -b rebase-preserve-merges to-rebase &&\n-\tgit rebase -Xsubtree=files_subtree --preserve-merges --onto files-master master &&\n+\tgit rebase -Xsubtree=files_subtree --preserve-merges --onto files-main main &&\n \tverbose test \"$(commit_message HEAD~)\" = \"topic_4\" &&\n \tverbose test \"$(commit_message HEAD)\" = \"files_subtree/topic_5\"\n '\n@@ -79,7 +79,7 @@ test_expect_failure REBASE_P 'Rebase -Xsubtree --preserve-merges --onto commit'\n test_expect_failure REBASE_P 'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit' '\n \treset_rebase &&\n \tgit checkout -b rebase-keep-empty to-rebase &&\n-\tgit rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-master master &&\n+\tgit rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-main main &&\n \tverbose test \"$(commit_message HEAD~2)\" = \"topic_4\" &&\n \tverbose test \"$(commit_message HEAD~)\" = \"files_subtree/topic_5\" &&\n \tverbose test \"$(commit_message HEAD)\" = \"Empty commit\"\n@@ -88,7 +88,7 @@ test_expect_failure REBASE_P 'Rebase -Xsubtree --keep-empty --preserve-merges --\n test_expect_success 'Rebase -Xsubtree --empty=ask --onto commit' '\n \treset_rebase &&\n \tgit checkout -b rebase-onto to-rebase &&\n-\ttest_must_fail git rebase -Xsubtree=files_subtree --empty=ask --onto files-master master &&\n+\ttest_must_fail git rebase -Xsubtree=files_subtree --empty=ask --onto files-main main &&\n \t: first pick results in no changes &&\n \tgit rebase --skip &&\n \tverbose test \"$(commit_message HEAD~2)\" = \"topic_4\" &&\n@@ -99,7 +99,7 @@ test_expect_success 'Rebase -Xsubtree --empty=ask --onto commit' '\n test_expect_success 'Rebase -Xsubtree --empty=ask --rebase-merges --onto commit' '\n \treset_rebase &&\n \tgit checkout -b rebase-merges-onto to-rebase &&\n-\ttest_must_fail git rebase -Xsubtree=files_subtree --empty=ask --rebase-merges --onto files-master --root &&\n+\ttest_must_fail git rebase -Xsubtree=files_subtree --empty=ask --rebase-merges --onto files-main --root &&\n \t: first pick results in no changes &&\n \tgit rebase --skip &&\n \tverbose test \"$(commit_message HEAD~2)\" = \"topic_4\" &&\ndiff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh\nindex b454f400eb..3cc99693af 100755\n--- a/t/t3430-rebase-merges.sh\n+++ b/t/t3430-rebase-merges.sh\n@@ -12,7 +12,7 @@ Initial setup:\n \n     -- B --                   (first)\n    /       \\\n- A - C - D - E - H            (master)\n+ A - C - D - E - H            (main)\n    \\    \\       /\n     \\    F - G                (second)\n      \\\n@@ -37,7 +37,7 @@ test_expect_success 'setup' '\n \tgit checkout -b first &&\n \ttest_commit B &&\n \tb=$(git rev-parse --short HEAD) &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit C &&\n \tc=$(git rev-parse --short HEAD) &&\n \ttest_commit D &&\n@@ -52,7 +52,7 @@ test_expect_success 'setup' '\n \tf=$(git rev-parse --short HEAD) &&\n \ttest_commit G &&\n \tg=$(git rev-parse --short HEAD) &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge --no-commit G &&\n \ttest_tick &&\n \tgit commit -m H &&\n@@ -82,7 +82,7 @@ test_expect_success 'create completely different structure' '\n \tEOF\n \ttest_config sequence.editor \\\"\"$PWD\"/replace-editor.sh\\\" &&\n \ttest_tick &&\n-\tgit rebase -i -r A master &&\n+\tgit rebase -i -r A main &&\n \ttest_cmp_graph <<-\\EOF\n \t*   Merge the topic branch '\\''onebranch'\\''\n \t|\\\n@@ -183,7 +183,7 @@ test_expect_success 'fast-forward merge -c still rewords' '\n '\n \n test_expect_success 'with a branch tip that was cherry-picked already' '\n-\tgit checkout -b already-upstream master &&\n+\tgit checkout -b already-upstream main &&\n \tbase=\"$(git rev-parse --verify HEAD)\" &&\n \n \ttest_commit A1 &&\n@@ -211,7 +211,7 @@ test_expect_success 'with a branch tip that was cherry-picked already' '\n '\n \n test_expect_success 'do not rebase cousins unless asked for' '\n-\tgit checkout -b cousins master &&\n+\tgit checkout -b cousins main &&\n \tbefore=\"$(git rev-parse --verify HEAD)\" &&\n \ttest_tick &&\n \tgit rebase -r HEAD^ &&\n@@ -340,7 +340,7 @@ test_expect_success 'a \"merge\" into a root commit is a fast-forward' '\n test_expect_success 'A root commit can be a cousin, treat it that way' '\n \tgit checkout --orphan khnum &&\n \ttest_commit yama &&\n-\tgit checkout -b asherah master &&\n+\tgit checkout -b asherah main &&\n \ttest_commit shamkat &&\n \tgit merge --allow-unrelated-histories khnum &&\n \ttest_tick &&\n@@ -367,7 +367,7 @@ test_expect_success 'labels that are object IDs are rewritten' '\n \tgit checkout -b third B &&\n \ttest_commit I &&\n \tthird=$(git rev-parse HEAD) &&\n-\tgit checkout -b labels master &&\n+\tgit checkout -b labels main &&\n \tgit merge --no-commit third &&\n \ttest_tick &&\n \tgit commit -m \"Merge commit '\\''$third'\\'' into labels\" &&\ndiff --git a/t/t3431-rebase-fork-point.sh b/t/t3431-rebase-fork-point.sh\nindex 172562789e..d5d9b2304d 100755\n--- a/t/t3431-rebase-fork-point.sh\n+++ b/t/t3431-rebase-fork-point.sh\n@@ -7,11 +7,11 @@ test_description='git rebase --fork-point test'\n \n . ./test-lib.sh\n \n-# A---B---D---E    (master)\n+# A---B---D---E    (main)\n #      \\\n #       C*---F---G (side)\n #\n-# C was formerly part of master but master was rewound to remove C\n+# C was formerly part of main but main was rewound to remove C\n #\n test_expect_success setup '\n \ttest_commit A &&\n@@ -30,7 +30,7 @@ test_rebase () {\n \texpected=\"$1\" &&\n \tshift &&\n \ttest_expect_success \"git rebase $*\" \"\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit reset --hard E &&\n \t\tgit checkout side &&\n \t\tgit reset --hard G &&\n@@ -48,26 +48,26 @@ test_rebase 'G F C E D B A' --no-fork-point\n test_rebase 'G F C D B A' --no-fork-point --onto D\n test_rebase 'G F C B A' --no-fork-point --keep-base\n \n-test_rebase 'G F E D B A' --fork-point refs/heads/master\n-test_rebase 'G F E D B A' --fork-point master\n+test_rebase 'G F E D B A' --fork-point refs/heads/main\n+test_rebase 'G F E D B A' --fork-point main\n \n-test_rebase 'G F D B A' --fork-point --onto D refs/heads/master\n-test_rebase 'G F D B A' --fork-point --onto D master\n+test_rebase 'G F D B A' --fork-point --onto D refs/heads/main\n+test_rebase 'G F D B A' --fork-point --onto D main\n \n-test_rebase 'G F B A' --fork-point --keep-base refs/heads/master\n-test_rebase 'G F B A' --fork-point --keep-base master\n+test_rebase 'G F B A' --fork-point --keep-base refs/heads/main\n+test_rebase 'G F B A' --fork-point --keep-base main\n \n-test_rebase 'G F C E D B A' refs/heads/master\n-test_rebase 'G F C E D B A' master\n+test_rebase 'G F C E D B A' refs/heads/main\n+test_rebase 'G F C E D B A' main\n \n-test_rebase 'G F C D B A' --onto D refs/heads/master\n-test_rebase 'G F C D B A' --onto D master\n+test_rebase 'G F C D B A' --onto D refs/heads/main\n+test_rebase 'G F C D B A' --onto D main\n \n-test_rebase 'G F C B A' --keep-base refs/heads/master\n-test_rebase 'G F C B A' --keep-base master\n+test_rebase 'G F C B A' --keep-base refs/heads/main\n+test_rebase 'G F C B A' --keep-base main\n \n test_expect_success 'git rebase --fork-point with ambigous refname' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -b one &&\n \tgit checkout side &&\n \tgit tag one &&\ndiff --git a/t/t3432-rebase-fast-forward.sh b/t/t3432-rebase-fast-forward.sh\nindex a29eda87e9..b87537ca7d 100755\n--- a/t/t3432-rebase-fast-forward.sh\n+++ b/t/t3432-rebase-fast-forward.sh\n@@ -84,19 +84,19 @@ test_rebase_same_head_ () {\n \n changes='no changes'\n test_rebase_same_head success noop same success work same\n-test_rebase_same_head success noop same success work same master\n+test_rebase_same_head success noop same success work same main\n test_rebase_same_head success noop same success work diff --onto B B\n test_rebase_same_head success noop same success work diff --onto B... B\n-test_rebase_same_head success noop same success work same --onto master... master\n-test_rebase_same_head success noop same success work same --keep-base master\n+test_rebase_same_head success noop same success work same --onto main... main\n+test_rebase_same_head success noop same success work same --keep-base main\n test_rebase_same_head success noop same success work same --keep-base\n test_rebase_same_head success noop same success work same --no-fork-point\n test_rebase_same_head success noop same success work same --keep-base --no-fork-point\n-test_rebase_same_head success noop same success work same --fork-point master\n+test_rebase_same_head success noop same success work same --fork-point main\n test_rebase_same_head success noop same success work diff --fork-point --onto B B\n test_rebase_same_head success noop same success work diff --fork-point --onto B... B\n-test_rebase_same_head success noop same success work same --fork-point --onto master... master\n-test_rebase_same_head success noop same success work same --keep-base --keep-base master\n+test_rebase_same_head success noop same success work same --fork-point --onto main... main\n+test_rebase_same_head success noop same success work same --keep-base --keep-base main\n \n test_expect_success 'add work same to side' '\n \ttest_commit E\n@@ -104,22 +104,22 @@ test_expect_success 'add work same to side' '\n \n changes='our changes'\n test_rebase_same_head success noop same success work same\n-test_rebase_same_head success noop same success work same master\n+test_rebase_same_head success noop same success work same main\n test_rebase_same_head success noop same success work diff --onto B B\n test_rebase_same_head success noop same success work diff --onto B... B\n-test_rebase_same_head success noop same success work same --onto master... master\n-test_rebase_same_head success noop same success work same --keep-base master\n+test_rebase_same_head success noop same success work same --onto main... main\n+test_rebase_same_head success noop same success work same --keep-base main\n test_rebase_same_head success noop same success work same --keep-base\n test_rebase_same_head success noop same success work same --no-fork-point\n test_rebase_same_head success noop same success work same --keep-base --no-fork-point\n-test_rebase_same_head success noop same success work same --fork-point master\n+test_rebase_same_head success noop same success work same --fork-point main\n test_rebase_same_head success noop same success work diff --fork-point --onto B B\n test_rebase_same_head success noop same success work diff --fork-point --onto B... B\n-test_rebase_same_head success noop same success work same --fork-point --onto master... master\n-test_rebase_same_head success noop same success work same --fork-point --keep-base master\n+test_rebase_same_head success noop same success work same --fork-point --onto main... main\n+test_rebase_same_head success noop same success work same --fork-point --keep-base main\n \n test_expect_success 'add work same to upstream' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit F &&\n \tgit checkout side\n '\n@@ -127,12 +127,12 @@ test_expect_success 'add work same to upstream' '\n changes='our and their changes'\n test_rebase_same_head success noop same success work diff --onto B B\n test_rebase_same_head success noop same success work diff --onto B... B\n-test_rebase_same_head success noop same success work diff --onto master... master\n-test_rebase_same_head success noop same success work diff --keep-base master\n+test_rebase_same_head success noop same success work diff --onto main... main\n+test_rebase_same_head success noop same success work diff --keep-base main\n test_rebase_same_head success noop same success work diff --keep-base\n test_rebase_same_head failure work same success work diff --fork-point --onto B B\n test_rebase_same_head failure work same success work diff --fork-point --onto B... B\n-test_rebase_same_head success noop same success work diff --fork-point --onto master... master\n-test_rebase_same_head success noop same success work diff --fork-point --keep-base master\n+test_rebase_same_head success noop same success work diff --fork-point --onto main... main\n+test_rebase_same_head success noop same success work diff --fork-point --keep-base main\n \n test_done\ndiff --git a/t/t3434-rebase-i18n.sh b/t/t3434-rebase-i18n.sh\nindex c7c835cde9..a252908d02 100755\n--- a/t/t3434-rebase-i18n.sh\n+++ b/t/t3434-rebase-i18n.sh\n@@ -7,7 +7,7 @@ test_description='rebase with changing encoding\n \n Initial setup:\n \n-1 - 2              master\n+1 - 2              main\n  \\\n   3 - 4            first\n    \\\n@@ -41,7 +41,7 @@ test_expect_success 'rebase --rebase-merges update encoding eucJP to UTF-8' '\n \tgit config i18n.commitencoding eucJP &&\n \tgit merge -F \"$TEST_DIRECTORY/t3434/eucJP.txt\" second &&\n \tgit config i18n.commitencoding UTF-8 &&\n-\tgit rebase --rebase-merges master &&\n+\tgit rebase --rebase-merges main &&\n \tcompare_msg eucJP.txt eucJP UTF-8\n '\n \n@@ -50,7 +50,7 @@ test_expect_success 'rebase --rebase-merges update encoding eucJP to ISO-2022-JP\n \tgit config i18n.commitencoding eucJP &&\n \tgit merge -F \"$TEST_DIRECTORY/t3434/eucJP.txt\" second &&\n \tgit config i18n.commitencoding ISO-2022-JP &&\n-\tgit rebase --rebase-merges master &&\n+\tgit rebase --rebase-merges main &&\n \tcompare_msg eucJP.txt eucJP ISO-2022-JP\n '\n \n@@ -66,7 +66,7 @@ test_rebase_continue_update_encode () {\n \t\tgit config i18n.commitencoding $old &&\n \t\tgit commit -F \"$TEST_DIRECTORY/t3434/$msgfile\" &&\n \t\tgit config i18n.commitencoding $new &&\n-\t\ttest_must_fail git rebase -m master &&\n+\t\ttest_must_fail git rebase -m main &&\n \t\ttest -f .git/rebase-merge/message &&\n \t\tgit stripspace <.git/rebase-merge/message >two.t &&\n \t\tgit add two.t &&\ndiff --git a/t/t3435-rebase-gpg-sign.sh b/t/t3435-rebase-gpg-sign.sh\nindex 54120b09d6..aab2b3aab8 100755\n--- a/t/t3435-rebase-gpg-sign.sh\n+++ b/t/t3435-rebase-gpg-sign.sh\n@@ -46,7 +46,7 @@ test_expect_success 'setup: merge commit' '\n \ttest_commit fork-point &&\n \tgit switch -c side &&\n \ttest_commit three &&\n-\tgit switch master &&\n+\tgit switch main &&\n \tgit merge --no-ff side &&\n \tgit tag merged\n '\n@@ -64,7 +64,7 @@ test_rebase_gpg_sign   false -i --no-gpg-sign --gpg-sign\n test_expect_failure 'rebase -p --no-gpg-sign override commit.gpgsign' '\n \tgit reset --hard merged &&\n \tgit config commit.gpgsign true &&\n-\tgit rebase -p --no-gpg-sign --onto=one fork-point master &&\n+\tgit rebase -p --no-gpg-sign --onto=one fork-point main &&\n \ttest_must_fail git verify-commit HEAD\n '\n \ndiff --git a/t/t3436-rebase-more-options.sh b/t/t3436-rebase-more-options.sh\nindex eaaf4c8d1d..4d106642ba 100755\n--- a/t/t3436-rebase-more-options.sh\n+++ b/t/t3436-rebase-more-options.sh\n@@ -28,7 +28,7 @@ test_expect_success 'setup' '\n \ttest_commit commit2 foo foo2 &&\n \ttest_commit commit3 foo foo3 &&\n \n-\tgit checkout --orphan master &&\n+\tgit checkout --orphan main &&\n \trm foo &&\n \ttest_write_lines \"line 1\" \"        line 2\" \"line 3\" >file &&\n \tgit commit -am \"add file\" &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex c464f8dcc8..4ae87a5c4e 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,7 +257,13 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-[0-2]*|3[0-3]*)\n+3404)\n+\t# Avoid conflicts with patch series that are cooking at the same time\n+\t# as the patch series changing the default of `init.defaultBranch`.\n+\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\t;;\n+[0-2]*|3[0-4]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410094","messageId":"332677cbf9dd889242b4e4105272988cd40a7758.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 12/27] t550*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:12Z","receivedAt":"2020-11-17T16:13:01Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t550*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5500-fetch-pack.sh            |  28 +++----\n t/t5501-fetch-push-alternates.sh |   4 +-\n t/t5502-quickfetch.sh            |   6 +-\n t/t5503-tagfollow.sh             |  12 +--\n t/t5504-fetch-receive-strict.sh  |  20 ++---\n t/t5505-remote.sh                | 140 +++++++++++++++----------------\n t/t5506-remote-groups.sh         |   4 +-\n t/t5509-fetch-push-namespaces.sh |  30 +++----\n t/test-lib.sh                    |   2 +-\n 9 files changed, 123 insertions(+), 123 deletions(-)\n\ndiff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh\nindex 3557374312..70e41ada01 100755\n--- a/t/t5500-fetch-pack.sh\n+++ b/t/t5500-fetch-pack.sh\n@@ -407,14 +407,14 @@ test_expect_success 'in_vain resetted upon ACK' '\n \trm -rf myserver myclient &&\n \tgit init myserver &&\n \n-\t# Linked list of commits on master. The first is common; the rest are\n+\t# Linked list of commits on main. The first is common; the rest are\n \t# not.\n-\ttest_commit -C myserver first_master_commit &&\n+\ttest_commit -C myserver first_main_commit &&\n \tgit clone \"file://$(pwd)/myserver\" myclient &&\n \ttest_commit_bulk -C myclient 255 &&\n \n \t# Another linked list of commits on anotherbranch with no connection to\n-\t# master. The first is common; the rest are not.\n+\t# main. The first is common; the rest are not.\n \tgit -C myserver checkout --orphan anotherbranch &&\n \ttest_commit -C myserver first_anotherbranch_commit &&\n \tgit -C myclient fetch origin anotherbranch:refs/heads/anotherbranch &&\n@@ -422,14 +422,14 @@ test_expect_success 'in_vain resetted upon ACK' '\n \ttest_commit_bulk -C myclient 255 &&\n \n \t# The new commit that the client wants to fetch.\n-\tgit -C myserver checkout master &&\n+\tgit -C myserver checkout main &&\n \ttest_commit -C myserver to_fetch &&\n \n \t# The client will send (as \"have\"s) all 256 commits in anotherbranch\n \t# first. The 256th commit is common between the client and the server,\n \t# and should reset in_vain. This allows negotiation to continue until\n \t# the client reports that first_anotherbranch_commit is common.\n-\tgit -C myclient fetch --progress origin master 2>log &&\n+\tgit -C myclient fetch --progress origin main 2>log &&\n \ttest_i18ngrep \"Total 3 \" log\n '\n \n@@ -637,7 +637,7 @@ test_expect_success 'shallow fetch with tags does not break the repository' '\n \t\tmkdir repo2 &&\n \t\tcd repo2 &&\n \t\tgit init &&\n-\t\tgit fetch --depth=2 ../.git master:branch &&\n+\t\tgit fetch --depth=2 ../.git main:branch &&\n \t\tgit fsck\n \t)\n '\n@@ -662,7 +662,7 @@ test_expect_success 'fetch-pack can fetch a raw sha1 that is advertised as a ref\n \n \tgit init client &&\n \tgit -C client fetch-pack ../server \\\n-\t\t$(git -C server rev-parse refs/heads/master)\n+\t\t$(git -C server rev-parse refs/heads/main)\n '\n \n test_expect_success 'fetch-pack can fetch a raw sha1 overlapping a named ref' '\n@@ -688,7 +688,7 @@ test_expect_success 'fetch-pack cannot fetch a raw sha1 that is not advertised a\n \t# Some protocol versions (e.g. 2) support fetching\n \t# unadvertised objects, so restrict this test to v0.\n \ttest_must_fail env GIT_TEST_PROTOCOL_VERSION=0 git -C client fetch-pack ../server \\\n-\t\t$(git -C server rev-parse refs/heads/master^) 2>err &&\n+\t\t$(git -C server rev-parse refs/heads/main^) 2>err &&\n \ttest_i18ngrep \"Server does not allow request for unadvertised object\" err\n '\n \n@@ -822,7 +822,7 @@ test_expect_success 'clone shallow since ...' '\n \n test_expect_success 'fetch shallow since ...' '\n \tgit -C shallow11 fetch --shallow-since \"200000000 +0700\" origin &&\n-\tgit -C shallow11 log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C shallow11 log --pretty=tformat:%s origin/main >actual &&\n \tcat >expected <<-\\EOF &&\n \tthree\n \ttwo\n@@ -863,7 +863,7 @@ test_expect_success 'shallow since with commit graph and already-seen commit' '\n \t(\n \tcd shallow-since-graph &&\n \ttest_commit base &&\n-\ttest_commit master &&\n+\ttest_commit main &&\n \tgit checkout -b other HEAD^ &&\n \ttest_commit other &&\n \tgit commit-graph write --reachable &&\n@@ -874,7 +874,7 @@ test_expect_success 'shallow since with commit graph and already-seen commit' '\n \t$(echo \"object-format=$(test_oid algo)\" | packetize)\n \t00010013deepen-since 1\n \t$(echo \"want $(git rev-parse other)\" | packetize)\n-\t$(echo \"have $(git rev-parse master)\" | packetize)\n+\t$(echo \"have $(git rev-parse main)\" | packetize)\n \t0000\n \tEOF\n \t)\n@@ -896,7 +896,7 @@ test_expect_success 'shallow clone exclude tag two' '\n \n test_expect_success 'fetch exclude tag one' '\n \tgit -C shallow12 fetch --shallow-exclude one origin &&\n-\tgit -C shallow12 log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C shallow12 log --pretty=tformat:%s origin/main >actual &&\n \ttest_write_lines three two >expected &&\n \ttest_cmp expected actual\n '\n@@ -910,11 +910,11 @@ test_expect_success 'fetching deepen' '\n \ttest_commit three &&\n \tgit clone --depth 1 \"file://$(pwd)/.\" deepen &&\n \ttest_commit four &&\n-\tgit -C deepen log --pretty=tformat:%s master >actual &&\n+\tgit -C deepen log --pretty=tformat:%s main >actual &&\n \techo three >expected &&\n \ttest_cmp expected actual &&\n \tgit -C deepen fetch --deepen=1 &&\n-\tgit -C deepen log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C deepen log --pretty=tformat:%s origin/main >actual &&\n \tcat >expected <<-\\EOF &&\n \tfour\n \tthree\ndiff --git a/t/t5501-fetch-push-alternates.sh b/t/t5501-fetch-push-alternates.sh\nindex 1bc57ac03f..0054163ce4 100755\n--- a/t/t5501-fetch-push-alternates.sh\n+++ b/t/t5501-fetch-push-alternates.sh\n@@ -45,7 +45,7 @@ test_expect_success setup '\n test_expect_success 'pushing into a repository with the same alternate' '\n \t(\n \t\tcd one &&\n-\t\tgit push ../receiver master:refs/heads/it\n+\t\tgit push ../receiver main:refs/heads/it\n \t) &&\n \t(\n \t\tcd receiver &&\n@@ -57,7 +57,7 @@ test_expect_success 'pushing into a repository with the same alternate' '\n test_expect_success 'fetching from a repository with the same alternate' '\n \t(\n \t\tcd fetcher &&\n-\t\tgit fetch ../one master:refs/heads/it &&\n+\t\tgit fetch ../one main:refs/heads/it &&\n \t\tcount_objects >../fetcher.count\n \t) &&\n \ttest_cmp one.count fetcher.count\ndiff --git a/t/t5502-quickfetch.sh b/t/t5502-quickfetch.sh\nindex 7a46cbdbe6..b163787a05 100755\n--- a/t/t5502-quickfetch.sh\n+++ b/t/t5502-quickfetch.sh\n@@ -108,14 +108,14 @@ test_expect_success 'quickfetch should not copy from alternate' '\n \t\t\t\tq\n \t\t\t}\"\n \t) ) &&\n-\torigin_master=$( (\n+\torigin_main=$( (\n \t\tcd quickclone &&\n-\t\tgit rev-parse origin/master\n+\t\tgit rev-parse origin/main\n \t) ) &&\n \techo \"loose objects: $obj_cnt, packfiles: $pck_cnt\" &&\n \ttest $obj_cnt -eq 0 &&\n \ttest $pck_cnt -eq 0 &&\n-\ttest z$origin_master = z$(git rev-parse master)\n+\ttest z$origin_main = z$(git rev-parse main)\n \n '\n \ndiff --git a/t/t5503-tagfollow.sh b/t/t5503-tagfollow.sh\nindex 6dafbe4543..b3e5f810e0 100755\n--- a/t/t5503-tagfollow.sh\n+++ b/t/t5503-tagfollow.sh\n@@ -11,7 +11,7 @@ test_description='test automatic tag following'\n #   L - A ------ O ------ B\n #    \\   \\                 \\\n #     \\   C - origin/cat    \\\n-#      origin/master           master\n+#      origin/main           main\n \n test_expect_success setup '\n \ttest_tick &&\n@@ -57,7 +57,7 @@ test_expect_success 'fetch A (new commit : 1 connection)' '\n \t(\n \t\tcd cloned &&\n \t\tGIT_TRACE_PACKET=$UPATH git fetch &&\n-\t\ttest $A = $(git rev-parse --verify origin/master)\n+\t\ttest $A = $(git rev-parse --verify origin/main)\n \t) &&\n \tget_needs $U >actual &&\n \ttest_cmp expect actual\n@@ -72,7 +72,7 @@ test_expect_success \"create tag T on A, create C on branch cat\" '\n \tgit add file &&\n \tgit commit -m C &&\n \tC=$(git rev-parse --verify HEAD) &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'setup expect' '\n@@ -123,7 +123,7 @@ test_expect_success 'fetch B, S (commit and tag : 1 connection)' '\n \t(\n \t\tcd cloned &&\n \t\tGIT_TRACE_PACKET=$UPATH git fetch &&\n-\t\ttest $B = $(git rev-parse --verify origin/master) &&\n+\t\ttest $B = $(git rev-parse --verify origin/main) &&\n \t\ttest $B = $(git rev-parse --verify tag2^0) &&\n \t\ttest $S = $(git rev-parse --verify tag2)\n \t) &&\n@@ -138,7 +138,7 @@ want $S\n EOF\n '\n \n-test_expect_success 'new clone fetch master and tags' '\n+test_expect_success 'new clone fetch main and tags' '\n \ttest_might_fail git branch -D cat &&\n \trm -f $U &&\n \t(\n@@ -147,7 +147,7 @@ test_expect_success 'new clone fetch master and tags' '\n \t\tgit init &&\n \t\tgit remote add origin .. &&\n \t\tGIT_TRACE_PACKET=$UPATH git fetch &&\n-\t\ttest $B = $(git rev-parse --verify origin/master) &&\n+\t\ttest $B = $(git rev-parse --verify origin/main) &&\n \t\ttest $S = $(git rev-parse --verify tag2) &&\n \t\ttest $B = $(git rev-parse --verify tag2^0) &&\n \t\ttest $T = $(git rev-parse --verify tag1) &&\ndiff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh\nindex 1a16ac4c0d..d2ba19ce68 100755\n--- a/t/t5504-fetch-receive-strict.sh\n+++ b/t/t5504-fetch-receive-strict.sh\n@@ -25,7 +25,7 @@ test_expect_success 'fetch without strict' '\n \t\tcd dst &&\n \t\tgit config fetch.fsckobjects false &&\n \t\tgit config transfer.fsckobjects false &&\n-\t\ttest_must_fail git fetch ../.git master\n+\t\ttest_must_fail git fetch ../.git main\n \t)\n '\n \n@@ -36,7 +36,7 @@ test_expect_success 'fetch with !fetch.fsckobjects' '\n \t\tcd dst &&\n \t\tgit config fetch.fsckobjects false &&\n \t\tgit config transfer.fsckobjects true &&\n-\t\ttest_must_fail git fetch ../.git master\n+\t\ttest_must_fail git fetch ../.git main\n \t)\n '\n \n@@ -47,7 +47,7 @@ test_expect_success 'fetch with fetch.fsckobjects' '\n \t\tcd dst &&\n \t\tgit config fetch.fsckobjects true &&\n \t\tgit config transfer.fsckobjects false &&\n-\t\ttest_must_fail git fetch ../.git master\n+\t\ttest_must_fail git fetch ../.git main\n \t)\n '\n \n@@ -57,13 +57,13 @@ test_expect_success 'fetch with transfer.fsckobjects' '\n \t(\n \t\tcd dst &&\n \t\tgit config transfer.fsckobjects true &&\n-\t\ttest_must_fail git fetch ../.git master\n+\t\ttest_must_fail git fetch ../.git main\n \t)\n '\n \n cat >exp <<EOF\n To dst\n-!\trefs/heads/master:refs/heads/test\t[remote rejected] (missing necessary objects)\n+!\trefs/heads/main:refs/heads/test\t[remote rejected] (missing necessary objects)\n Done\n EOF\n \n@@ -75,7 +75,7 @@ test_expect_success 'push without strict' '\n \t\tgit config fetch.fsckobjects false &&\n \t\tgit config transfer.fsckobjects false\n \t) &&\n-\ttest_must_fail git push --porcelain dst master:refs/heads/test >act &&\n+\ttest_must_fail git push --porcelain dst main:refs/heads/test >act &&\n \ttest_cmp exp act\n '\n \n@@ -87,13 +87,13 @@ test_expect_success 'push with !receive.fsckobjects' '\n \t\tgit config receive.fsckobjects false &&\n \t\tgit config transfer.fsckobjects true\n \t) &&\n-\ttest_must_fail git push --porcelain dst master:refs/heads/test >act &&\n+\ttest_must_fail git push --porcelain dst main:refs/heads/test >act &&\n \ttest_cmp exp act\n '\n \n cat >exp <<EOF\n To dst\n-!\trefs/heads/master:refs/heads/test\t[remote rejected] (unpacker error)\n+!\trefs/heads/main:refs/heads/test\t[remote rejected] (unpacker error)\n EOF\n \n test_expect_success 'push with receive.fsckobjects' '\n@@ -104,7 +104,7 @@ test_expect_success 'push with receive.fsckobjects' '\n \t\tgit config receive.fsckobjects true &&\n \t\tgit config transfer.fsckobjects false\n \t) &&\n-\ttest_must_fail git push --porcelain dst master:refs/heads/test >act &&\n+\ttest_must_fail git push --porcelain dst main:refs/heads/test >act &&\n \ttest_cmp exp act\n '\n \n@@ -115,7 +115,7 @@ test_expect_success 'push with transfer.fsckobjects' '\n \t\tcd dst &&\n \t\tgit config transfer.fsckobjects true\n \t) &&\n-\ttest_must_fail git push --porcelain dst master:refs/heads/test >act &&\n+\ttest_must_fail git push --porcelain dst main:refs/heads/test >act &&\n \ttest_cmp exp act\n '\n \ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex eaa6e90220..540d65aa22 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -17,7 +17,7 @@ setup_repository () {\n \tgit add elif &&\n \ttest_tick &&\n \tgit commit -m \"Second\" &&\n-\tgit checkout master\n+\tgit checkout main\n \t)\n }\n \n@@ -60,8 +60,8 @@ test_expect_success C_LOCALE_OUTPUT 'remote information for the origin' '\n \t(\n \t\tcd test &&\n \t\ttokens_match origin \"$(git remote)\" &&\n-\t\tcheck_remote_track origin master side &&\n-\t\tcheck_tracking_branch origin HEAD master side\n+\t\tcheck_remote_track origin main side &&\n+\t\tcheck_tracking_branch origin HEAD main side\n \t)\n '\n \n@@ -70,7 +70,7 @@ test_expect_success 'add another remote' '\n \t\tcd test &&\n \t\tgit remote add -f second ../two &&\n \t\ttokens_match \"origin second\" \"$(git remote)\" &&\n-\t\tcheck_tracking_branch second master side another &&\n+\t\tcheck_tracking_branch second main side another &&\n \t\tgit for-each-ref \"--format=%(refname)\" refs/remotes |\n \t\tsed -e \"/^refs\\/remotes\\/origin\\//d\" \\\n \t\t    -e \"/^refs\\/remotes\\/second\\//d\" >actual &&\n@@ -81,8 +81,8 @@ test_expect_success 'add another remote' '\n test_expect_success C_LOCALE_OUTPUT 'check remote-tracking' '\n \t(\n \t\tcd test &&\n-\t\tcheck_remote_track origin master side &&\n-\t\tcheck_remote_track second master side another\n+\t\tcheck_remote_track origin main side &&\n+\t\tcheck_remote_track second main side another\n \t)\n '\n \n@@ -99,7 +99,7 @@ test_expect_success 'remote forces tracking branches' '\n test_expect_success 'remove remote' '\n \t(\n \t\tcd test &&\n-\t\tgit symbolic-ref refs/remotes/second/HEAD refs/remotes/second/master &&\n+\t\tgit symbolic-ref refs/remotes/second/HEAD refs/remotes/second/main &&\n \t\tgit remote rm second\n \t)\n '\n@@ -108,7 +108,7 @@ test_expect_success C_LOCALE_OUTPUT 'remove remote' '\n \t(\n \t\tcd test &&\n \t\ttokens_match origin \"$(git remote)\" &&\n-\t\tcheck_remote_track origin master side &&\n+\t\tcheck_remote_track origin main side &&\n \t\tgit for-each-ref \"--format=%(refname)\" refs/remotes |\n \t\tsed -e \"/^refs\\/remotes\\/origin\\//d\" >actual &&\n \t\ttest_must_be_empty actual\n@@ -121,13 +121,13 @@ test_expect_success 'remove remote protects local branches' '\n \t\tcat >expect1 <<-\\EOF &&\n \t\tNote: A branch outside the refs/remotes/ hierarchy was not removed;\n \t\tto delete it, use:\n-\t\t  git branch -d master\n+\t\t  git branch -d main\n \t\tEOF\n \t\tcat >expect2 <<-\\EOF &&\n \t\tNote: Some branches outside the refs/remotes/ hierarchy were not removed;\n \t\tto delete them, use:\n \t\t  git branch -d foobranch\n-\t\t  git branch -d master\n+\t\t  git branch -d main\n \t\tEOF\n \t\tgit tag footag &&\n \t\tgit config --add remote.oops.fetch \"+refs/*:refs/*\" &&\n@@ -153,7 +153,7 @@ test_expect_success 'remove errors out early when deleting non-existent branch'\n \n test_expect_success 'remove remote with a branch without configured merge' '\n \ttest_when_finished \"(\n-\t\tgit -C test checkout master;\n+\t\tgit -C test checkout main;\n \t\tgit -C test branch -D two;\n \t\tgit -C test config --remove-section remote.two;\n \t\tgit -C test config --remove-section branch.second;\n@@ -163,9 +163,9 @@ test_expect_success 'remove remote with a branch without configured merge' '\n \t\tcd test &&\n \t\tgit remote add two ../two &&\n \t\tgit fetch two &&\n-\t\tgit checkout -b second two/master^0 &&\n+\t\tgit checkout -b second two/main^0 &&\n \t\tgit config branch.second.remote two &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit remote rm two\n \t)\n '\n@@ -211,7 +211,7 @@ cat >test/expect <<EOF\n * remote origin\n   Fetch URL: $(pwd)/one\n   Push  URL: $(pwd)/one\n-  HEAD branch: master\n+  HEAD branch: main\n   Remote branches:\n     main new (next fetch will store in remotes/origin)\n     side tracked\n@@ -221,14 +221,14 @@ cat >test/expect <<EOF\n     octopus  merges with remote topic-a\n                 and with remote topic-b\n                 and with remote topic-c\n-    rebase  rebases onto remote master\n+    rebase  rebases onto remote main\n   Local refs configured for 'git push':\n     main pushes to main     (local out of date)\n     main pushes to upstream (create)\n * remote two\n   Fetch URL: ../two\n   Push  URL: ../three\n-  HEAD branch: master\n+  HEAD branch: main\n   Local refs configured for 'git push':\n     ahead forces to main    (fast-forwardable)\n     main  pushes to another (up to date)\n@@ -237,16 +237,16 @@ EOF\n test_expect_success PREPARE_FOR_MAIN_BRANCH 'show' '\n \t(\n \t\tcd test &&\n-\t\tgit config --add remote.origin.fetch refs/heads/master:refs/heads/upstream &&\n+\t\tgit config --add remote.origin.fetch refs/heads/main:refs/heads/upstream &&\n \t\tgit fetch &&\n-\t\tgit checkout -b ahead origin/master &&\n+\t\tgit checkout -b ahead origin/main &&\n \t\techo 1 >>file &&\n \t\ttest_tick &&\n \t\tgit commit -m update file &&\n-\t\tgit checkout master &&\n-\t\tgit branch --track octopus origin/master &&\n-\t\tgit branch --track rebase origin/master &&\n-\t\tgit branch -d -r origin/master &&\n+\t\tgit checkout main &&\n+\t\tgit branch --track octopus origin/main &&\n+\t\tgit branch --track rebase origin/main &&\n+\t\tgit branch -d -r origin/main &&\n \t\tgit config --add remote.two.url ../two &&\n \t\tgit config --add remote.two.pushurl ../three &&\n \t\tgit config branch.rebase.rebase true &&\n@@ -258,10 +258,10 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'show' '\n \t\t\tgit commit -m update file\n \t\t) &&\n \t\tgit config --add remote.origin.push : &&\n-\t\tgit config --add remote.origin.push refs/heads/master:refs/heads/upstream &&\n+\t\tgit config --add remote.origin.push refs/heads/main:refs/heads/upstream &&\n \t\tgit config --add remote.origin.push +refs/tags/lastbackup &&\n-\t\tgit config --add remote.two.push +refs/heads/ahead:refs/heads/master &&\n-\t\tgit config --add remote.two.push refs/heads/master:refs/heads/another &&\n+\t\tgit config --add remote.two.push +refs/heads/ahead:refs/heads/main &&\n+\t\tgit config --add remote.two.push refs/heads/main:refs/heads/another &&\n \t\tgit remote show origin two >output &&\n \t\tgit branch -d rebase octopus &&\n \t\ttest_i18ncmp expect output\n@@ -274,7 +274,7 @@ cat >test/expect <<EOF\n   Push  URL: $(pwd)/one\n   HEAD branch: (not queried)\n   Remote branches: (status not queried)\n-    master\n+    main\n     side\n   Local branches configured for 'git pull':\n     ahead merges with remote main\n@@ -322,7 +322,7 @@ test_expect_success 'set-head --auto' '\n \t(\n \t\tcd test &&\n \t\tgit remote set-head --auto origin &&\n-\t\techo refs/remotes/origin/master >expect &&\n+\t\techo refs/remotes/origin/main >expect &&\n \t\tgit symbolic-ref refs/remotes/origin/HEAD >output &&\n \t\ttest_cmp expect output\n \t)\n@@ -333,7 +333,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'set-head --auto has no problem w/mu\n \t\tcd test &&\n \t\tgit fetch two \"refs/heads/*:refs/remotes/two/*\" &&\n \t\tgit remote set-head --auto two >output 2>&1 &&\n-\t\techo \"two/HEAD set to master\" >expect &&\n+\t\techo \"two/HEAD set to main\" >expect &&\n \t\ttest_i18ncmp expect output\n \t)\n '\n@@ -347,7 +347,7 @@ test_expect_success 'set-head explicit' '\n \t\tcd test &&\n \t\tgit remote set-head origin side2 &&\n \t\tgit symbolic-ref refs/remotes/origin/HEAD >output &&\n-\t\tgit remote set-head origin master &&\n+\t\tgit remote set-head origin main &&\n \t\ttest_cmp expect output\n \t)\n '\n@@ -410,7 +410,7 @@ test_expect_success 'fetch mirrors act as mirrors during fetch' '\n \t(\n \t\tcd mirror-fetch/parent &&\n \t\tgit branch new &&\n-\t\tgit branch -m master renamed\n+\t\tgit branch -m main renamed\n \t) &&\n \t(\n \t\tcd mirror-fetch/child &&\n@@ -424,7 +424,7 @@ test_expect_success 'fetch mirrors can prune' '\n \t(\n \t\tcd mirror-fetch/child &&\n \t\tgit remote prune parent &&\n-\t\ttest_must_fail git rev-parse --verify refs/heads/master\n+\t\ttest_must_fail git rev-parse --verify refs/heads/main\n \t)\n '\n \n@@ -477,14 +477,14 @@ test_expect_success 'push mirrors act as mirrors during push' '\n \t(\n \t\tcd mirror-push/private &&\n \t\tgit branch new &&\n-\t\tgit branch -m master renamed &&\n+\t\tgit branch -m main renamed &&\n \t\tgit push public\n \t) &&\n \t(\n \t\tcd mirror-push/private &&\n \t\tgit rev-parse --verify refs/heads/new &&\n \t\tgit rev-parse --verify refs/heads/renamed &&\n-\t\ttest_must_fail git rev-parse --verify refs/heads/master\n+\t\ttest_must_fail git rev-parse --verify refs/heads/main\n \t)\n '\n \n@@ -610,10 +610,10 @@ test_expect_success 'reject --no-no-tags' '\n '\n \n cat >one/expect <<\\EOF\n-  apis/master\n+  apis/main\n   apis/side\n   drosophila/another\n-  drosophila/master\n+  drosophila/main\n   drosophila/side\n EOF\n \n@@ -630,11 +630,11 @@ test_expect_success 'update' '\n \n cat >one/expect <<\\EOF\n   drosophila/another\n-  drosophila/master\n+  drosophila/main\n   drosophila/side\n-  manduca/master\n+  manduca/main\n   manduca/side\n-  megaloprepus/master\n+  megaloprepus/main\n   megaloprepus/side\n EOF\n \n@@ -673,11 +673,11 @@ test_expect_success 'update --prune' '\n '\n \n cat >one/expect <<-\\EOF\n-  apis/master\n+  apis/main\n   apis/side\n-  manduca/master\n+  manduca/main\n   manduca/side\n-  megaloprepus/master\n+  megaloprepus/main\n   megaloprepus/side\n EOF\n \n@@ -697,7 +697,7 @@ test_expect_success 'update default' '\n \n cat >one/expect <<\\EOF\n   drosophila/another\n-  drosophila/master\n+  drosophila/main\n   drosophila/side\n EOF\n \n@@ -751,14 +751,14 @@ test_expect_success 'rename a remote' '\n \tgit clone one four &&\n \t(\n \t\tcd four &&\n-\t\tgit config branch.master.pushRemote origin &&\n+\t\tgit config branch.main.pushRemote origin &&\n \t\tgit remote rename origin upstream &&\n \t\ttest -z \"$(git for-each-ref refs/remotes/origin)\" &&\n-\t\ttest \"$(git symbolic-ref refs/remotes/upstream/HEAD)\" = \"refs/remotes/upstream/master\" &&\n-\t\ttest \"$(git rev-parse upstream/master)\" = \"$(git rev-parse master)\" &&\n+\t\ttest \"$(git symbolic-ref refs/remotes/upstream/HEAD)\" = \"refs/remotes/upstream/main\" &&\n+\t\ttest \"$(git rev-parse upstream/main)\" = \"$(git rev-parse main)\" &&\n \t\ttest \"$(git config remote.upstream.fetch)\" = \"+refs/heads/*:refs/remotes/upstream/*\" &&\n-\t\ttest \"$(git config branch.master.remote)\" = \"upstream\" &&\n-\t\ttest \"$(git config branch.master.pushRemote)\" = \"upstream\" &&\n+\t\ttest \"$(git config branch.main.remote)\" = \"upstream\" &&\n+\t\ttest \"$(git config branch.main.pushRemote)\" = \"upstream\" &&\n \t\ttest \"$(git config --global remote.pushDefault)\" = \"origin\"\n \t)\n '\n@@ -804,7 +804,7 @@ test_expect_success 'rename does not update a non-default fetch refspec' '\n \t\tgit config remote.origin.fetch +refs/heads/*:refs/heads/origin/* &&\n \t\tgit remote rename origin upstream &&\n \t\ttest \"$(git config remote.upstream.fetch)\" = \"+refs/heads/*:refs/heads/origin/*\" &&\n-\t\tgit rev-parse -q origin/master\n+\t\tgit rev-parse -q origin/main\n \t)\n '\n \n@@ -824,7 +824,7 @@ test_expect_success 'rename a remote with name prefix of other remote' '\n \t\tcd four.three &&\n \t\tgit remote add o git://example.com/repo.git &&\n \t\tgit remote rename o upstream &&\n-\t\ttest \"$(git rev-parse origin/master)\" = \"$(git rev-parse master)\"\n+\t\ttest \"$(git rev-parse origin/main)\" = \"$(git rev-parse main)\"\n \t)\n '\n \n@@ -840,11 +840,11 @@ test_expect_success 'remove a remote' '\n \tgit clone one four.five &&\n \t(\n \t\tcd four.five &&\n-\t\tgit config branch.master.pushRemote origin &&\n+\t\tgit config branch.main.pushRemote origin &&\n \t\tgit remote remove origin &&\n \t\ttest -z \"$(git for-each-ref refs/remotes/origin)\" &&\n-\t\ttest_must_fail git config branch.master.remote &&\n-\t\ttest_must_fail git config branch.master.pushRemote &&\n+\t\ttest_must_fail git config branch.main.remote &&\n+\t\ttest_must_fail git config branch.main.pushRemote &&\n \t\ttest \"$(git config --global remote.pushDefault)\" = \"origin\"\n \t)\n '\n@@ -885,9 +885,9 @@ test_expect_success 'remove a remote removes repo remote.pushDefault but keeps g\n \n cat >remotes_origin <<EOF\n URL: $(pwd)/one\n-Push: refs/heads/master:refs/heads/upstream\n+Push: refs/heads/main:refs/heads/upstream\n Push: refs/heads/next:refs/heads/upstream2\n-Pull: refs/heads/master:refs/heads/origin\n+Pull: refs/heads/main:refs/heads/origin\n Pull: refs/heads/next:refs/heads/origin2\n EOF\n \n@@ -903,11 +903,11 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '\n \t\ttest_path_is_missing .git/remotes/origin &&\n \t\ttest \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n \t\tcat >push_expected <<-\\EOF &&\n-\t\trefs/heads/master:refs/heads/upstream\n+\t\trefs/heads/main:refs/heads/upstream\n \t\trefs/heads/next:refs/heads/upstream2\n \t\tEOF\n \t\tcat >fetch_expected <<-\\EOF &&\n-\t\trefs/heads/master:refs/heads/origin\n+\t\trefs/heads/main:refs/heads/origin\n \t\trefs/heads/next:refs/heads/origin2\n \t\tEOF\n \t\tgit config --get-all remote.origin.push >push_actual &&\n@@ -927,8 +927,8 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '\n \t\tgit remote rename origin origin &&\n \t\ttest_path_is_missing .git/branches/origin &&\n \t\ttest \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n-\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\" &&\n-\t\ttest \"$(git config remote.origin.push)\" = \"HEAD:refs/heads/master\"\n+\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/main:refs/heads/origin\" &&\n+\t\ttest \"$(git config remote.origin.push)\" = \"HEAD:refs/heads/main\"\n \t)\n '\n \n@@ -951,7 +951,7 @@ test_expect_success 'remote prune to cause a dangling symref' '\n \t(\n \t\tcd one &&\n \t\tgit checkout side2 &&\n-\t\tgit branch -D master\n+\t\tgit branch -D main\n \t) &&\n \t(\n \t\tcd eight &&\n@@ -994,22 +994,22 @@ test_expect_success 'remote set-branches' '\n \tEOF\n \tsort <<-\\EOF >expect.replace &&\n \t+refs/heads/maint:refs/remotes/scratch/maint\n-\t+refs/heads/master:refs/remotes/scratch/master\n+\t+refs/heads/main:refs/remotes/scratch/main\n \t+refs/heads/next:refs/remotes/scratch/next\n \tEOF\n \tsort <<-\\EOF >expect.add-two &&\n \t+refs/heads/maint:refs/remotes/scratch/maint\n-\t+refs/heads/master:refs/remotes/scratch/master\n+\t+refs/heads/main:refs/remotes/scratch/main\n \t+refs/heads/next:refs/remotes/scratch/next\n \t+refs/heads/seen:refs/remotes/scratch/seen\n \t+refs/heads/t/topic:refs/remotes/scratch/t/topic\n \tEOF\n \tsort <<-\\EOF >expect.setup-ffonly &&\n-\trefs/heads/master:refs/remotes/scratch/master\n+\trefs/heads/main:refs/remotes/scratch/main\n \t+refs/heads/next:refs/remotes/scratch/next\n \tEOF\n \tsort <<-\\EOF >expect.respect-ffonly &&\n-\trefs/heads/master:refs/remotes/scratch/master\n+\trefs/heads/main:refs/remotes/scratch/main\n \t+refs/heads/next:refs/remotes/scratch/next\n \t+refs/heads/seen:refs/remotes/scratch/seen\n \tEOF\n@@ -1025,7 +1025,7 @@ test_expect_success 'remote set-branches' '\n \t\tgit config --get-all remote.scratch.fetch >config-result &&\n \t\tsort <config-result >../actual.add &&\n \n-\t\tgit remote set-branches scratch maint master next &&\n+\t\tgit remote set-branches scratch maint main next &&\n \t\tgit config --get-all remote.scratch.fetch >config-result &&\n \t\tsort <config-result >../actual.replace &&\n \n@@ -1035,7 +1035,7 @@ test_expect_success 'remote set-branches' '\n \n \t\tgit config --unset-all remote.scratch.fetch &&\n \t\tgit config remote.scratch.fetch \\\n-\t\t\trefs/heads/master:refs/remotes/scratch/master &&\n+\t\t\trefs/heads/main:refs/remotes/scratch/main &&\n \t\tgit config --add remote.scratch.fetch \\\n \t\t\t+refs/heads/next:refs/remotes/scratch/next &&\n \t\tgit config --get-all remote.scratch.fetch >config-result &&\n@@ -1055,14 +1055,14 @@ test_expect_success 'remote set-branches' '\n \n test_expect_success 'remote set-branches with --mirror' '\n \techo \"+refs/*:refs/*\" >expect.initial &&\n-\techo \"+refs/heads/master:refs/heads/master\" >expect.replace &&\n+\techo \"+refs/heads/main:refs/heads/main\" >expect.replace &&\n \tgit clone --mirror .git/ setbranches-mirror &&\n \t(\n \t\tcd setbranches-mirror &&\n \t\tgit remote rename origin scratch &&\n \t\tgit config --get-all remote.scratch.fetch >../actual.initial &&\n \n-\t\tgit remote set-branches scratch heads/master &&\n+\t\tgit remote set-branches scratch heads/main &&\n \t\tgit config --get-all remote.scratch.fetch >../actual.replace\n \t) &&\n \ttest_cmp expect.initial actual.initial &&\n@@ -1308,7 +1308,7 @@ test_extra_arg () {\n test_extra_arg add nick url\n test_extra_arg rename origin newname\n test_extra_arg remove origin\n-test_extra_arg set-head origin master\n+test_extra_arg set-head origin main\n # set-branches takes any number of args\n test_extra_arg get-url origin newurl\n test_extra_arg set-url origin newurl oldurl\n@@ -1325,7 +1325,7 @@ test_expect_success 'unqualified <dst> refspec DWIM and advice' '\n \ttest_when_finished \"(cd test && git tag -d some-tag)\" &&\n \t(\n \t\tcd test &&\n-\t\tgit tag -a -m \"Some tag\" some-tag master &&\n+\t\tgit tag -a -m \"Some tag\" some-tag main &&\n \t\texit_with=true &&\n \t\tfor type in commit tag tree blob\n \t\tdo\n@@ -1351,7 +1351,7 @@ test_expect_success 'unqualified <dst> refspec DWIM and advice' '\n test_expect_success PREPARE_FOR_MAIN_BRANCH 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '\n \t(\n \t\tcd two &&\n-\t\tgit tag -a -m \"Some tag\" my-tag master &&\n+\t\tgit tag -a -m \"Some tag\" my-tag main &&\n \t\tgit update-ref refs/trees/my-head-tree HEAD^{tree} &&\n \t\tgit update-ref refs/blobs/my-file-blob HEAD:file\n \t) &&\ndiff --git a/t/t5506-remote-groups.sh b/t/t5506-remote-groups.sh\nindex 83d5558c0e..f2df3944e0 100755\n--- a/t/t5506-remote-groups.sh\n+++ b/t/t5506-remote-groups.sh\n@@ -31,8 +31,8 @@ repo_fetched() {\n test_expect_success 'setup' '\n \tmkdir one && (cd one && git init) &&\n \tmkdir two && (cd two && git init) &&\n-\tgit remote add -m master one one &&\n-\tgit remote add -m master two two\n+\tgit remote add -m main one one &&\n+\tgit remote add -m main two two\n '\n \n test_expect_success 'no group updates all' '\ndiff --git a/t/t5509-fetch-push-namespaces.sh b/t/t5509-fetch-push-namespaces.sh\nindex a67f792adf..ad4a3f5c6e 100755\n--- a/t/t5509-fetch-push-namespaces.sh\n+++ b/t/t5509-fetch-push-namespaces.sh\n@@ -27,9 +27,9 @@ test_expect_success setup '\n test_expect_success 'pushing into a repository using a ref namespace' '\n \t(\n \t\tcd original &&\n-\t\tgit push pushee-namespaced master &&\n+\t\tgit push pushee-namespaced main &&\n \t\tgit ls-remote pushee-namespaced >actual &&\n-\t\tprintf \"$commit1\\trefs/heads/master\\n\" >expected &&\n+\t\tprintf \"$commit1\\trefs/heads/main\\n\" >expected &&\n \t\ttest_cmp expected actual &&\n \t\tgit push pushee-namespaced --tags &&\n \t\tgit ls-remote pushee-namespaced >actual &&\n@@ -56,7 +56,7 @@ test_expect_success 'pulling from a repository using a ref namespace' '\n \t\tcd puller &&\n \t\tgit remote add -f pushee-namespaced \"ext::git --namespace=namespace %s ../pushee\" &&\n \t\tgit for-each-ref refs/ >actual &&\n-\t\tprintf \"$commit1 commit\\trefs/remotes/pushee-namespaced/master\\n\" >expected &&\n+\t\tprintf \"$commit1 commit\\trefs/remotes/pushee-namespaced/main\\n\" >expected &&\n \t\tprintf \"$commit0 commit\\trefs/tags/0\\n\" >>expected &&\n \t\tprintf \"$commit1 commit\\trefs/tags/1\\n\" >>expected &&\n \t\ttest_cmp expected actual\n@@ -76,7 +76,7 @@ test_expect_success 'mirroring a repository using a ref namespace' '\n \t(\n \t\tcd mirror &&\n \t\tgit for-each-ref refs/ >actual &&\n-\t\tprintf \"$commit1 commit\\trefs/namespaces/namespace/refs/heads/master\\n\" >expected &&\n+\t\tprintf \"$commit1 commit\\trefs/namespaces/namespace/refs/heads/main\\n\" >expected &&\n \t\tprintf \"$commit0 commit\\trefs/namespaces/namespace/refs/tags/0\\n\" >>expected &&\n \t\tprintf \"$commit1 commit\\trefs/namespaces/namespace/refs/tags/1\\n\" >>expected &&\n \t\ttest_cmp expected actual\n@@ -87,7 +87,7 @@ test_expect_success 'hide namespaced refs with transfer.hideRefs' '\n \tGIT_NAMESPACE=namespace \\\n \t\tgit -C pushee -c transfer.hideRefs=refs/tags \\\n \t\tls-remote \"ext::git %s .\" >actual &&\n-\tprintf \"$commit1\\trefs/heads/master\\n\" >expected &&\n+\tprintf \"$commit1\\trefs/heads/main\\n\" >expected &&\n \ttest_cmp expected actual\n '\n \n@@ -95,7 +95,7 @@ test_expect_success 'check that transfer.hideRefs does not match unstripped refs\n \tGIT_NAMESPACE=namespace \\\n \t\tgit -C pushee -c transfer.hideRefs=refs/namespaces/namespace/refs/tags \\\n \t\tls-remote \"ext::git %s .\" >actual &&\n-\tprintf \"$commit1\\trefs/heads/master\\n\" >expected &&\n+\tprintf \"$commit1\\trefs/heads/main\\n\" >expected &&\n \tprintf \"$commit0\\trefs/tags/0\\n\" >>expected &&\n \tprintf \"$commit1\\trefs/tags/1\\n\" >>expected &&\n \ttest_cmp expected actual\n@@ -105,23 +105,23 @@ test_expect_success 'hide full refs with transfer.hideRefs' '\n \tGIT_NAMESPACE=namespace \\\n \t\tgit -C pushee -c transfer.hideRefs=\"^refs/namespaces/namespace/refs/tags\" \\\n \t\tls-remote \"ext::git %s .\" >actual &&\n-\tprintf \"$commit1\\trefs/heads/master\\n\" >expected &&\n+\tprintf \"$commit1\\trefs/heads/main\\n\" >expected &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'try to update a hidden ref' '\n-\ttest_config -C pushee transfer.hideRefs refs/heads/master &&\n-\ttest_must_fail git -C original push pushee-namespaced master\n+\ttest_config -C pushee transfer.hideRefs refs/heads/main &&\n+\ttest_must_fail git -C original push pushee-namespaced main\n '\n \n test_expect_success 'try to update a ref that is not hidden' '\n-\ttest_config -C pushee transfer.hideRefs refs/namespaces/namespace/refs/heads/master &&\n-\tgit -C original push pushee-namespaced master\n+\ttest_config -C pushee transfer.hideRefs refs/namespaces/namespace/refs/heads/main &&\n+\tgit -C original push pushee-namespaced main\n '\n \n test_expect_success 'try to update a hidden full ref' '\n-\ttest_config -C pushee transfer.hideRefs \"^refs/namespaces/namespace/refs/heads/master\" &&\n-\ttest_must_fail git -C original push pushee-namespaced master\n+\ttest_config -C pushee transfer.hideRefs \"^refs/namespaces/namespace/refs/heads/main\" &&\n+\ttest_must_fail git -C original push pushee-namespaced main\n '\n \n test_expect_success 'set up ambiguous HEAD' '\n@@ -157,9 +157,9 @@ test_expect_success 'denyCurrentBranch and unborn branch with ref namespace' '\n \t\tcd original &&\n \t\tgit init unborn &&\n \t\tgit remote add unborn-namespaced \"ext::git --namespace=namespace %s unborn\" &&\n-\t\ttest_must_fail git push unborn-namespaced HEAD:master &&\n+\t\ttest_must_fail git push unborn-namespaced HEAD:main &&\n \t\tgit -C unborn config receive.denyCurrentBranch updateInstead &&\n-\t\tgit push unborn-namespaced HEAD:master\n+\t\tgit push unborn-namespaced HEAD:main\n \t)\n '\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 155bfad454..ca86f666e6 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-4]*|5[0-4]*)\n+[0-4]*|5[0-4]*|550*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410099","messageId":"cf6c1d1d83fc7665167229304f5ba110656da310.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 08/27] t4*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:08Z","receivedAt":"2020-11-17T16:13:01Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t4013, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in t4*.\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t4*.sh t4211/*.export &&\n\t   git checkout HEAD -- t4013\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t4014-format-patch.sh              | 176 +++++++++++++--------------\n t/t4015-diff-whitespace.sh           |   2 +-\n t/t4017-diff-retval.sh               |   2 +-\n t/t4038-diff-combined.sh             |  14 +--\n t/t4041-diff-submodule-option.sh     |   2 +-\n t/t4048-diff-combined-binary.sh      |  10 +-\n t/t4052-stat-output.sh               |   4 +-\n t/t4056-diff-order.sh                |   2 +-\n t/t4057-diff-combined-paths.sh       |  20 +--\n t/t4061-diff-indent.sh               |  24 ++--\n t/t4066-diff-emit-delay.sh           |   2 +-\n t/t4068-diff-symmetric-merge-base.sh |  48 ++++----\n t/t4103-apply-binary.sh              |  36 +++---\n t/t4108-apply-threeway.sh            |  14 +--\n t/t4121-apply-diffs.sh               |   2 +-\n t/t4122-apply-symlink-inside.sh      |   6 +-\n t/t4150-am.sh                        |  26 ++--\n t/t4200-rerere.sh                    |  20 +--\n t/t4201-shortlog.sh                  |   2 +-\n t/t4202-log.sh                       | 106 ++++++++--------\n t/t4203-mailmap.sh                   |   2 +-\n t/t4204-patch-id.sh                  |  26 ++--\n t/t4207-log-decoration-colors.sh     |   6 +-\n t/t4208-log-magic-pathspec.sh        |   4 +-\n t/t4211/history.export               |   2 +-\n t/t4214-log-graph-octopus.sh         |   2 +-\n t/t4216-log-bloom.sh                 |   4 +-\n t/t4253-am-keep-cr-dos.sh            |  20 +--\n t/t4257-am-interactive.sh            |   2 +-\n t/test-lib.sh                        |   4 +-\n 30 files changed, 295 insertions(+), 295 deletions(-)\n\ndiff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh\nindex c5e5e0da3f..636d028b5d 100755\n--- a/t/t4014-format-patch.sh\n+++ b/t/t4014-format-patch.sh\n@@ -32,11 +32,11 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m \"Side changes #3 with \\\\n backslash-n in it.\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit diff-tree -p C2 >patch &&\n \tgit apply --index <patch &&\n \ttest_tick &&\n-\tgit commit -m \"Master accepts moral equivalent of #2\" &&\n+\tgit commit -m \"Main accepts moral equivalent of #2\" &&\n \n \tgit checkout side &&\n \tgit checkout -b patchid &&\n@@ -56,39 +56,39 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m \"patchid 3\" &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'format-patch --ignore-if-in-upstream' '\n-\tgit format-patch --stdout master..side >patch0 &&\n+\tgit format-patch --stdout main..side >patch0 &&\n \tgrep \"^From \" patch0 >from0 &&\n \ttest_line_count = 3 from0\n '\n \n test_expect_success 'format-patch --ignore-if-in-upstream' '\n \tgit format-patch --stdout \\\n-\t\t--ignore-if-in-upstream master..side >patch1 &&\n+\t\t--ignore-if-in-upstream main..side >patch1 &&\n \tgrep \"^From \" patch1 >from1 &&\n \ttest_line_count = 2 from1\n '\n \n test_expect_success 'format-patch --ignore-if-in-upstream handles tags' '\n \tgit tag -a v1 -m tag side &&\n-\tgit tag -a v2 -m tag master &&\n+\tgit tag -a v2 -m tag main &&\n \tgit format-patch --stdout --ignore-if-in-upstream v2..v1 >patch1 &&\n \tgrep \"^From \" patch1 >from1 &&\n \ttest_line_count = 2 from1\n '\n \n test_expect_success \"format-patch doesn't consider merge commits\" '\n-\tgit checkout -b feature master &&\n+\tgit checkout -b feature main &&\n \techo \"Another line\" >>file &&\n \ttest_tick &&\n \tgit commit -am \"Feature branch change #1\" &&\n \techo \"Yet another line\" >>file &&\n \ttest_tick &&\n \tgit commit -am \"Feature branch change #2\" &&\n-\tgit checkout -b merger master &&\n+\tgit checkout -b merger main &&\n \ttest_tick &&\n \tgit merge --no-ff feature &&\n \tgit format-patch -3 --stdout >patch &&\n@@ -97,16 +97,16 @@ test_expect_success \"format-patch doesn't consider merge commits\" '\n '\n \n test_expect_success 'format-patch result applies' '\n-\tgit checkout -b rebuild-0 master &&\n+\tgit checkout -b rebuild-0 main &&\n \tgit am -3 patch0 &&\n-\tgit rev-list master.. >list &&\n+\tgit rev-list main.. >list &&\n \ttest_line_count = 2 list\n '\n \n test_expect_success 'format-patch --ignore-if-in-upstream result applies' '\n-\tgit checkout -b rebuild-1 master &&\n+\tgit checkout -b rebuild-1 main &&\n \tgit am -3 patch1 &&\n-\tgit rev-list master.. >list &&\n+\tgit rev-list main.. >list &&\n \ttest_line_count = 2 list\n '\n \n@@ -130,7 +130,7 @@ test_expect_success 'extra headers' '\n \" &&\n \tgit config --add format.headers \"Cc: S E Cipient <scipient@example.com>\n \" &&\n-\tgit format-patch --stdout master..side >patch2 &&\n+\tgit format-patch --stdout main..side >patch2 &&\n \tsed -e \"/^\\$/q\" patch2 >hdrs2 &&\n \tgrep \"^To: R E Cipient <rcipient@example.com>\\$\" hdrs2 &&\n \tgrep \"^Cc: S E Cipient <scipient@example.com>\\$\" hdrs2\n@@ -139,7 +139,7 @@ test_expect_success 'extra headers' '\n test_expect_success 'extra headers without newlines' '\n \tgit config --replace-all format.headers \"To: R E Cipient <rcipient@example.com>\" &&\n \tgit config --add format.headers \"Cc: S E Cipient <scipient@example.com>\" &&\n-\tgit format-patch --stdout master..side >patch3 &&\n+\tgit format-patch --stdout main..side >patch3 &&\n \tsed -e \"/^\\$/q\" patch3 >hdrs3 &&\n \tgrep \"^To: R E Cipient <rcipient@example.com>\\$\" hdrs3 &&\n \tgrep \"^Cc: S E Cipient <scipient@example.com>\\$\" hdrs3\n@@ -148,7 +148,7 @@ test_expect_success 'extra headers without newlines' '\n test_expect_success 'extra headers with multiple To:s' '\n \tgit config --replace-all format.headers \"To: R E Cipient <rcipient@example.com>\" &&\n \tgit config --add format.headers \"To: S E Cipient <scipient@example.com>\" &&\n-\tgit format-patch --stdout master..side >patch4 &&\n+\tgit format-patch --stdout main..side >patch4 &&\n \tsed -e \"/^\\$/q\" patch4 >hdrs4 &&\n \tgrep \"^To: R E Cipient <rcipient@example.com>,\\$\" hdrs4 &&\n \tgrep \"^ *S E Cipient <scipient@example.com>\\$\" hdrs4\n@@ -156,7 +156,7 @@ test_expect_success 'extra headers with multiple To:s' '\n \n test_expect_success 'additional command line cc (ascii)' '\n \tgit config --replace-all format.headers \"Cc: R E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --cc=\"S E Cipient <scipient@example.com>\" --stdout master..side >patch5 &&\n+\tgit format-patch --cc=\"S E Cipient <scipient@example.com>\" --stdout main..side >patch5 &&\n \tsed -e \"/^\\$/q\" patch5 >hdrs5 &&\n \tgrep \"^Cc: R E Cipient <rcipient@example.com>,\\$\" hdrs5 &&\n \tgrep \"^ *S E Cipient <scipient@example.com>\\$\" hdrs5\n@@ -164,7 +164,7 @@ test_expect_success 'additional command line cc (ascii)' '\n \n test_expect_failure 'additional command line cc (rfc822)' '\n \tgit config --replace-all format.headers \"Cc: R E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --cc=\"S. E. Cipient <scipient@example.com>\" --stdout master..side >patch5 &&\n+\tgit format-patch --cc=\"S. E. Cipient <scipient@example.com>\" --stdout main..side >patch5 &&\n \tsed -e \"/^\\$/q\" patch5 >hdrs5 &&\n \tgrep \"^Cc: R E Cipient <rcipient@example.com>,\\$\" hdrs5 &&\n \tgrep \"^ *\\\"S. E. Cipient\\\" <scipient@example.com>\\$\" hdrs5\n@@ -172,14 +172,14 @@ test_expect_failure 'additional command line cc (rfc822)' '\n \n test_expect_success 'command line headers' '\n \tgit config --unset-all format.headers &&\n-\tgit format-patch --add-header=\"Cc: R E Cipient <rcipient@example.com>\" --stdout master..side >patch6 &&\n+\tgit format-patch --add-header=\"Cc: R E Cipient <rcipient@example.com>\" --stdout main..side >patch6 &&\n \tsed -e \"/^\\$/q\" patch6 >hdrs6 &&\n \tgrep \"^Cc: R E Cipient <rcipient@example.com>\\$\" hdrs6\n '\n \n test_expect_success 'configuration headers and command line headers' '\n \tgit config --replace-all format.headers \"Cc: R E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --add-header=\"Cc: S E Cipient <scipient@example.com>\" --stdout master..side >patch7 &&\n+\tgit format-patch --add-header=\"Cc: S E Cipient <scipient@example.com>\" --stdout main..side >patch7 &&\n \tsed -e \"/^\\$/q\" patch7 >hdrs7 &&\n \tgrep \"^Cc: R E Cipient <rcipient@example.com>,\\$\" hdrs7 &&\n \tgrep \"^ *S E Cipient <scipient@example.com>\\$\" hdrs7\n@@ -187,40 +187,40 @@ test_expect_success 'configuration headers and command line headers' '\n \n test_expect_success 'command line To: header (ascii)' '\n \tgit config --unset-all format.headers &&\n-\tgit format-patch --to=\"R E Cipient <rcipient@example.com>\" --stdout master..side >patch8 &&\n+\tgit format-patch --to=\"R E Cipient <rcipient@example.com>\" --stdout main..side >patch8 &&\n \tsed -e \"/^\\$/q\" patch8 >hdrs8 &&\n \tgrep \"^To: R E Cipient <rcipient@example.com>\\$\" hdrs8\n '\n \n test_expect_failure 'command line To: header (rfc822)' '\n-\tgit format-patch --to=\"R. E. Cipient <rcipient@example.com>\" --stdout master..side >patch8 &&\n+\tgit format-patch --to=\"R. E. Cipient <rcipient@example.com>\" --stdout main..side >patch8 &&\n \tsed -e \"/^\\$/q\" patch8 >hdrs8 &&\n \tgrep \"^To: \\\"R. E. Cipient\\\" <rcipient@example.com>\\$\" hdrs8\n '\n \n test_expect_failure 'command line To: header (rfc2047)' '\n-\tgit format-patch --to=\"R Ä Cipient <rcipient@example.com>\" --stdout master..side >patch8 &&\n+\tgit format-patch --to=\"R Ä Cipient <rcipient@example.com>\" --stdout main..side >patch8 &&\n \tsed -e \"/^\\$/q\" patch8 >hdrs8 &&\n \tgrep \"^To: =?UTF-8?q?R=20=C3=84=20Cipient?= <rcipient@example.com>\\$\" hdrs8\n '\n \n test_expect_success 'configuration To: header (ascii)' '\n \tgit config format.to \"R E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --stdout master..side >patch9 &&\n+\tgit format-patch --stdout main..side >patch9 &&\n \tsed -e \"/^\\$/q\" patch9 >hdrs9 &&\n \tgrep \"^To: R E Cipient <rcipient@example.com>\\$\" hdrs9\n '\n \n test_expect_failure 'configuration To: header (rfc822)' '\n \tgit config format.to \"R. E. Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --stdout master..side >patch9 &&\n+\tgit format-patch --stdout main..side >patch9 &&\n \tsed -e \"/^\\$/q\" patch9 >hdrs9 &&\n \tgrep \"^To: \\\"R. E. Cipient\\\" <rcipient@example.com>\\$\" hdrs9\n '\n \n test_expect_failure 'configuration To: header (rfc2047)' '\n \tgit config format.to \"R Ä Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --stdout master..side >patch9 &&\n+\tgit format-patch --stdout main..side >patch9 &&\n \tsed -e \"/^\\$/q\" patch9 >hdrs9 &&\n \tgrep \"^To: =?UTF-8?q?R=20=C3=84=20Cipient?= <rcipient@example.com>\\$\" hdrs9\n '\n@@ -234,35 +234,35 @@ check_patch () {\n }\n \n test_expect_success 'format.from=false' '\n-\tgit -c format.from=false format-patch --stdout master..side >patch &&\n+\tgit -c format.from=false format-patch --stdout main..side >patch &&\n \tsed -e \"/^\\$/q\" patch >hdrs &&\n \tcheck_patch patch &&\n \t! grep \"^From: C O Mitter <committer@example.com>\\$\" hdrs\n '\n \n test_expect_success 'format.from=true' '\n-\tgit -c format.from=true format-patch --stdout master..side >patch &&\n+\tgit -c format.from=true format-patch --stdout main..side >patch &&\n \tsed -e \"/^\\$/q\" patch >hdrs &&\n \tcheck_patch hdrs &&\n \tgrep \"^From: C O Mitter <committer@example.com>\\$\" hdrs\n '\n \n test_expect_success 'format.from with address' '\n-\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --stdout master..side >patch &&\n+\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --stdout main..side >patch &&\n \tsed -e \"/^\\$/q\" patch >hdrs &&\n \tcheck_patch hdrs &&\n \tgrep \"^From: F R Om <from@example.com>\\$\" hdrs\n '\n \n test_expect_success '--no-from overrides format.from' '\n-\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --no-from --stdout master..side >patch &&\n+\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --no-from --stdout main..side >patch &&\n \tsed -e \"/^\\$/q\" patch >hdrs &&\n \tcheck_patch hdrs &&\n \t! grep \"^From: F R Om <from@example.com>\\$\" hdrs\n '\n \n test_expect_success '--from overrides format.from' '\n-\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --from --stdout master..side >patch &&\n+\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --from --stdout main..side >patch &&\n \tsed -e \"/^\\$/q\" patch >hdrs &&\n \tcheck_patch hdrs &&\n \t! grep \"^From: F R Om <from@example.com>\\$\" hdrs\n@@ -271,7 +271,7 @@ test_expect_success '--from overrides format.from' '\n test_expect_success '--no-to overrides config.to' '\n \tgit config --replace-all format.to \\\n \t\t\"R E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --no-to --stdout master..side >patch10 &&\n+\tgit format-patch --no-to --stdout main..side >patch10 &&\n \tsed -e \"/^\\$/q\" patch10 >hdrs10 &&\n \tcheck_patch hdrs10 &&\n \t! grep \"^To: R E Cipient <rcipient@example.com>\\$\" hdrs10\n@@ -281,7 +281,7 @@ test_expect_success '--no-to and --to replaces config.to' '\n \tgit config --replace-all format.to \\\n \t\t\"Someone <someone@out.there>\" &&\n \tgit format-patch --no-to --to=\"Someone Else <else@out.there>\" \\\n-\t\t--stdout master..side >patch11 &&\n+\t\t--stdout main..side >patch11 &&\n \tsed -e \"/^\\$/q\" patch11 >hdrs11 &&\n \tcheck_patch hdrs11 &&\n \t! grep \"^To: Someone <someone@out.there>\\$\" hdrs11 &&\n@@ -291,7 +291,7 @@ test_expect_success '--no-to and --to replaces config.to' '\n test_expect_success '--no-cc overrides config.cc' '\n \tgit config --replace-all format.cc \\\n \t\t\"C E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --no-cc --stdout master..side >patch12 &&\n+\tgit format-patch --no-cc --stdout main..side >patch12 &&\n \tsed -e \"/^\\$/q\" patch12 >hdrs12 &&\n \tcheck_patch hdrs12 &&\n \t! grep \"^Cc: C E Cipient <rcipient@example.com>\\$\" hdrs12\n@@ -300,7 +300,7 @@ test_expect_success '--no-cc overrides config.cc' '\n test_expect_success '--no-add-header overrides config.headers' '\n \tgit config --replace-all format.headers \\\n \t\t\"Header1: B E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --no-add-header --stdout master..side >patch13 &&\n+\tgit format-patch --no-add-header --stdout main..side >patch13 &&\n \tsed -e \"/^\\$/q\" patch13 >hdrs13 &&\n \tcheck_patch hdrs13 &&\n \t! grep \"^Header1: B E Cipient <rcipient@example.com>\\$\" hdrs13\n@@ -309,7 +309,7 @@ test_expect_success '--no-add-header overrides config.headers' '\n test_expect_success 'multiple files' '\n \trm -rf patches/ &&\n \tgit checkout side &&\n-\tgit format-patch -o patches/ master &&\n+\tgit format-patch -o patches/ main &&\n \tls patches/0001-Side-changes-1.patch patches/0002-Side-changes-2.patch patches/0003-Side-changes-3-with-n-backslash-n-in-it.patch\n '\n \n@@ -369,7 +369,7 @@ test_expect_success 'filename limit applies only to basename' '\n \n test_expect_success 'reroll count' '\n \trm -fr patches &&\n-\tgit format-patch -o patches --cover-letter --reroll-count 4 master..side >list &&\n+\tgit format-patch -o patches --cover-letter --reroll-count 4 main..side >list &&\n \t! grep -v \"^patches/v4-000[0-3]-\" list &&\n \tsed -n -e \"/^Subject: /p\" $(cat list) >subjects &&\n \t! grep -v \"^Subject: \\[PATCH v4 [0-3]/3\\] \" subjects\n@@ -377,7 +377,7 @@ test_expect_success 'reroll count' '\n \n test_expect_success 'reroll count (-v)' '\n \trm -fr patches &&\n-\tgit format-patch -o patches --cover-letter -v4 master..side >list &&\n+\tgit format-patch -o patches --cover-letter -v4 main..side >list &&\n \t! grep -v \"^patches/v4-000[0-3]-\" list &&\n \tsed -n -e \"/^Subject: /p\" $(cat list) >subjects &&\n \t! grep -v \"^Subject: \\[PATCH v4 [0-3]/3\\] \" subjects\n@@ -413,7 +413,7 @@ EOF\n \n test_expect_success 'no threading' '\n \tgit checkout side &&\n-\tcheck_threading expect.no-threading master\n+\tcheck_threading expect.no-threading main\n '\n \n cat >expect.thread <<EOF\n@@ -430,7 +430,7 @@ References: <0>\n EOF\n \n test_expect_success 'thread' '\n-\tcheck_threading expect.thread --thread master\n+\tcheck_threading expect.thread --thread main\n '\n \n cat >expect.in-reply-to <<EOF\n@@ -450,7 +450,7 @@ EOF\n \n test_expect_success 'thread in-reply-to' '\n \tcheck_threading expect.in-reply-to --in-reply-to=\"<test.message>\" \\\n-\t\t--thread master\n+\t\t--thread main\n '\n \n cat >expect.cover-letter <<EOF\n@@ -471,7 +471,7 @@ References: <0>\n EOF\n \n test_expect_success 'thread cover-letter' '\n-\tcheck_threading expect.cover-letter --cover-letter --thread master\n+\tcheck_threading expect.cover-letter --cover-letter --thread main\n '\n \n cat >expect.cl-irt <<EOF\n@@ -498,12 +498,12 @@ EOF\n \n test_expect_success 'thread cover-letter in-reply-to' '\n \tcheck_threading expect.cl-irt --cover-letter \\\n-\t\t--in-reply-to=\"<test.message>\" --thread master\n+\t\t--in-reply-to=\"<test.message>\" --thread main\n '\n \n test_expect_success 'thread explicit shallow' '\n \tcheck_threading expect.cl-irt --cover-letter \\\n-\t\t--in-reply-to=\"<test.message>\" --thread=shallow master\n+\t\t--in-reply-to=\"<test.message>\" --thread=shallow main\n '\n \n cat >expect.deep <<EOF\n@@ -521,7 +521,7 @@ References: <0>\n EOF\n \n test_expect_success 'thread deep' '\n-\tcheck_threading expect.deep --thread=deep master\n+\tcheck_threading expect.deep --thread=deep main\n '\n \n cat >expect.deep-irt <<EOF\n@@ -544,7 +544,7 @@ EOF\n \n test_expect_success 'thread deep in-reply-to' '\n \tcheck_threading expect.deep-irt  --thread=deep \\\n-\t\t--in-reply-to=\"<test.message>\" master\n+\t\t--in-reply-to=\"<test.message>\" main\n '\n \n cat >expect.deep-cl <<EOF\n@@ -568,7 +568,7 @@ References: <0>\n EOF\n \n test_expect_success 'thread deep cover-letter' '\n-\tcheck_threading expect.deep-cl --cover-letter --thread=deep master\n+\tcheck_threading expect.deep-cl --cover-letter --thread=deep main\n '\n \n cat >expect.deep-cl-irt <<EOF\n@@ -598,27 +598,27 @@ EOF\n \n test_expect_success 'thread deep cover-letter in-reply-to' '\n \tcheck_threading expect.deep-cl-irt --cover-letter \\\n-\t\t--in-reply-to=\"<test.message>\" --thread=deep master\n+\t\t--in-reply-to=\"<test.message>\" --thread=deep main\n '\n \n test_expect_success 'thread via config' '\n \ttest_config format.thread true &&\n-\tcheck_threading expect.thread master\n+\tcheck_threading expect.thread main\n '\n \n test_expect_success 'thread deep via config' '\n \ttest_config format.thread deep &&\n-\tcheck_threading expect.deep master\n+\tcheck_threading expect.deep main\n '\n \n test_expect_success 'thread config + override' '\n \ttest_config format.thread deep &&\n-\tcheck_threading expect.thread --thread master\n+\tcheck_threading expect.thread --thread main\n '\n \n test_expect_success 'thread config + --no-thread' '\n \ttest_config format.thread deep &&\n-\tcheck_threading expect.no-threading --no-thread master\n+\tcheck_threading expect.no-threading --no-thread main\n '\n \n test_expect_success 'excessive subject' '\n@@ -631,7 +631,7 @@ test_expect_success 'excessive subject' '\n \tafter=$(git rev-parse --short $after) &&\n \tgit update-index file &&\n \tgit commit -m \"This is an excessively long subject line for a message due to the habit some projects have of not having a short, one-line subject at the start of the commit message, but rather sticking a whole paragraph right at the start as the only thing in the commit message. It had better not become the filename for the patch.\" &&\n-\tgit format-patch -o patches/ master..side &&\n+\tgit format-patch -o patches/ main..side &&\n \tls patches/0004-This-is-an-excessively-long-subject-line-for-a-messa.patch\n '\n \n@@ -893,13 +893,13 @@ test_expect_success 'options no longer allowed for format-patch' '\n '\n \n test_expect_success 'format-patch --numstat should produce a patch' '\n-\tgit format-patch --numstat --stdout master..side >output &&\n+\tgit format-patch --numstat --stdout main..side >output &&\n \tgrep \"^diff --git a/\" output >diff &&\n \ttest_line_count = 5 diff\n '\n \n test_expect_success 'format-patch -- <path>' '\n-\tgit format-patch master..side -- file 2>error &&\n+\tgit format-patch main..side -- file 2>error &&\n \t! grep \"Use .--\" error\n '\n \n@@ -1673,9 +1673,9 @@ test_expect_success 'cover letter with invalid --cover-from-description and conf\n \ttest_config branch.rebuild-1.description \"config subject\n \n body\" &&\n-\ttest_must_fail git format-patch --cover-letter --cover-from-description garbage master &&\n+\ttest_must_fail git format-patch --cover-letter --cover-from-description garbage main &&\n \ttest_config format.coverFromDescription garbage &&\n-\ttest_must_fail git format-patch --cover-letter master\n+\ttest_must_fail git format-patch --cover-letter main\n '\n \n test_expect_success 'cover letter with format.coverFromDescription = default' '\n@@ -1684,7 +1684,7 @@ test_expect_success 'cover letter with format.coverFromDescription = default' '\n body\" &&\n \ttest_config format.coverFromDescription default &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^config subject$\" actual &&\n@@ -1696,7 +1696,7 @@ test_expect_success 'cover letter with --cover-from-description default' '\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description default master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description default main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^config subject$\" actual &&\n@@ -1709,7 +1709,7 @@ test_expect_success 'cover letter with format.coverFromDescription = none' '\n body\" &&\n \ttest_config format.coverFromDescription none &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \tgrep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1721,7 +1721,7 @@ test_expect_success 'cover letter with --cover-from-description none' '\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description none master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description none main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \tgrep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1734,7 +1734,7 @@ test_expect_success 'cover letter with format.coverFromDescription = message' '\n body\" &&\n \ttest_config format.coverFromDescription message &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^config subject$\" actual &&\n@@ -1746,7 +1746,7 @@ test_expect_success 'cover letter with --cover-from-description message' '\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description message master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description message main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^config subject$\" actual &&\n@@ -1759,7 +1759,7 @@ test_expect_success 'cover letter with format.coverFromDescription = subject' '\n body\" &&\n \ttest_config format.coverFromDescription subject &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] config subject$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1771,7 +1771,7 @@ test_expect_success 'cover letter with --cover-from-description subject' '\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description subject master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description subject main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] config subject$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1784,7 +1784,7 @@ test_expect_success 'cover letter with format.coverFromDescription = auto (short\n body\" &&\n \ttest_config format.coverFromDescription auto &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] config subject$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1796,7 +1796,7 @@ test_expect_success 'cover letter with --cover-from-description auto (short subj\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description auto master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description auto main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] config subject$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1809,7 +1809,7 @@ test_expect_success 'cover letter with format.coverFromDescription = auto (long\n body\" &&\n \ttest_config format.coverFromDescription auto &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^this is a really long first line and it is over 100 characters long which is the threshold for long subjects$\" actual &&\n@@ -1821,7 +1821,7 @@ test_expect_success 'cover letter with --cover-from-description auto (long subje\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description auto master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description auto main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^this is a really long first line and it is over 100 characters long which is the threshold for long subjects$\" actual &&\n@@ -1834,7 +1834,7 @@ test_expect_success 'cover letter with command-line --cover-from-description ove\n body\" &&\n \ttest_config format.coverFromDescription none &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description subject master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description subject main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] config subject$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1844,7 +1844,7 @@ body\" &&\n test_expect_success 'cover letter using branch description (1)' '\n \tgit checkout rebuild-1 &&\n \ttest_config branch.rebuild-1.description hello &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep hello actual\n '\n \n@@ -1858,14 +1858,14 @@ test_expect_success 'cover letter using branch description (2)' '\n test_expect_success 'cover letter using branch description (3)' '\n \tgit checkout rebuild-1 &&\n \ttest_config branch.rebuild-1.description hello &&\n-\tgit format-patch --stdout --cover-letter ^master rebuild-1 >actual &&\n+\tgit format-patch --stdout --cover-letter ^main rebuild-1 >actual &&\n \tgrep hello actual\n '\n \n test_expect_success 'cover letter using branch description (4)' '\n \tgit checkout rebuild-1 &&\n \ttest_config branch.rebuild-1.description hello &&\n-\tgit format-patch --stdout --cover-letter master.. >actual &&\n+\tgit format-patch --stdout --cover-letter main.. >actual &&\n \tgrep hello actual\n '\n \n@@ -1932,8 +1932,8 @@ test_expect_success 'From line has expected format' '\n \n test_expect_success 'format-patch -o with no leading directories' '\n \trm -fr patches &&\n-\tgit format-patch -o patches master..side &&\n-\tcount=$(git rev-list --count master..side) &&\n+\tgit format-patch -o patches main..side &&\n+\tcount=$(git rev-list --count main..side) &&\n \tls patches >list &&\n \ttest_line_count = $count list\n '\n@@ -1941,16 +1941,16 @@ test_expect_success 'format-patch -o with no leading directories' '\n test_expect_success 'format-patch -o with leading existing directories' '\n \trm -rf existing-dir &&\n \tmkdir existing-dir &&\n-\tgit format-patch -o existing-dir/patches master..side &&\n-\tcount=$(git rev-list --count master..side) &&\n+\tgit format-patch -o existing-dir/patches main..side &&\n+\tcount=$(git rev-list --count main..side) &&\n \tls existing-dir/patches >list &&\n \ttest_line_count = $count list\n '\n \n test_expect_success 'format-patch -o with leading non-existing directories' '\n \trm -rf non-existing-dir &&\n-\tgit format-patch -o non-existing-dir/patches master..side &&\n-\tcount=$(git rev-list --count master..side) &&\n+\tgit format-patch -o non-existing-dir/patches main..side &&\n+\tcount=$(git rev-list --count main..side) &&\n \ttest_path_is_dir non-existing-dir &&\n \tls non-existing-dir/patches >list &&\n \ttest_line_count = $count list\n@@ -1959,8 +1959,8 @@ test_expect_success 'format-patch -o with leading non-existing directories' '\n test_expect_success 'format-patch format.outputDirectory option' '\n \ttest_config format.outputDirectory patches &&\n \trm -fr patches &&\n-\tgit format-patch master..side &&\n-\tcount=$(git rev-list --count master..side) &&\n+\tgit format-patch main..side &&\n+\tcount=$(git rev-list --count main..side) &&\n \tls patches >list &&\n \ttest_line_count = $count list\n '\n@@ -1968,7 +1968,7 @@ test_expect_success 'format-patch format.outputDirectory option' '\n test_expect_success 'format-patch -o overrides format.outputDirectory' '\n \ttest_config format.outputDirectory patches &&\n \trm -fr patches patchset &&\n-\tgit format-patch master..side -o patchset &&\n+\tgit format-patch main..side -o patchset &&\n \ttest_path_is_missing patches &&\n \ttest_path_is_dir patchset\n '\n@@ -2065,14 +2065,14 @@ test_expect_success 'format-patch --base errors out when base commit is not ance\n \t#\t  ------------W\n \t#\n \t# If \"format-patch Z..X\" is given, P and Z can not be specified as the base commit\n-\tgit checkout -b topic1 master &&\n+\tgit checkout -b topic1 main &&\n \tgit rev-parse HEAD >commit-id-base &&\n \ttest_commit P &&\n \tgit rev-parse HEAD >commit-id-P &&\n \ttest_commit Z &&\n \tgit rev-parse HEAD >commit-id-Z &&\n \ttest_commit Y &&\n-\tgit checkout -b topic2 master &&\n+\tgit checkout -b topic2 main &&\n \ttest_commit W &&\n \tgit merge topic1 &&\n \ttest_commit X &&\n@@ -2085,7 +2085,7 @@ test_expect_success 'format-patch --base errors out when base commit is not ance\n '\n \n test_expect_success 'format-patch --base=auto' '\n-\tgit checkout -b upstream master &&\n+\tgit checkout -b upstream main &&\n \tgit checkout -b local upstream &&\n \tgit branch --set-upstream-to=upstream &&\n \ttest_commit N1 &&\n@@ -2106,11 +2106,11 @@ test_expect_success 'format-patch errors out when history involves criss-cross'\n \t#  \\ / \\\n \t#   C---M2---E\n \t#\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit A &&\n-\tgit checkout -b xb master &&\n+\tgit checkout -b xb main &&\n \ttest_commit B &&\n-\tgit checkout -b xc master &&\n+\tgit checkout -b xc main &&\n \ttest_commit C &&\n \tgit checkout -b xbc xb -- &&\n \tgit merge xc &&\n@@ -2230,7 +2230,7 @@ test_expect_success 'format-patch --pretty=mboxrd' '\n '\n \n test_expect_success 'interdiff: setup' '\n-\tgit checkout -b boop master &&\n+\tgit checkout -b boop main &&\n \ttest_commit fnorp blorp &&\n \ttest_commit fleep blorp\n '\ndiff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh\nindex 8bdaa0a693..899fad379e 100755\n--- a/t/t4015-diff-whitespace.sh\n+++ b/t/t4015-diff-whitespace.sh\n@@ -883,7 +883,7 @@ test_expect_success 'combined diff with autocrlf conversion' '\n \techo >x goodbye &&\n \tgit commit -m \"the other side\" x &&\n \tgit config core.autocrlf true &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \n \tgit diff >actual.raw &&\n \tsed -e \"1,/^@@@/d\" actual.raw >actual &&\ndiff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh\nindex 95a7ca7070..484d847749 100755\n--- a/t/t4017-diff-retval.sh\n+++ b/t/t4017-diff-retval.sh\n@@ -111,7 +111,7 @@ test_expect_success 'check detects leftover conflict markers' '\n \tgit checkout HEAD^ &&\n \techo binary >>b &&\n \tgit commit -m \"side\" b &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit add b &&\n \ttest_expect_code 2 git --no-pager diff --cached --check >test.out &&\n \ttest 3 = $(grep \"conflict marker\" test.out | wc -l) &&\ndiff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh\nindex 94680836ce..5eb36907c1 100755\n--- a/t/t4038-diff-combined.sh\n+++ b/t/t4038-diff-combined.sh\n@@ -115,7 +115,7 @@ test_expect_success 'check --cc --raw with forty trees' '\n '\n \n test_expect_success 'setup combined ignore spaces' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \t>test &&\n \tgit add test &&\n \tgit commit -m initial &&\n@@ -143,7 +143,7 @@ test_expect_success 'setup combined ignore spaces' '\n \tEOF\n \tgit commit -m \"test other space changes\" -a &&\n \n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttr -d Q <<-\\EOF >test &&\n \teol spaces Q\n \tspace  change\n@@ -404,7 +404,7 @@ test_expect_success 'combine diff missing delete bug' '\n test_expect_success 'combine diff gets tree sorting right' '\n \t# create a directory and a file that sort differently in trees\n \t# versus byte-wise (implied \"/\" sorts after \".\")\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tmkdir foo &&\n \techo base >foo/one &&\n \techo base >foo/two &&\n@@ -414,9 +414,9 @@ test_expect_success 'combine diff gets tree sorting right' '\n \n \t# one side modifies a file in the directory, along with the root\n \t# file...\n-\techo master >foo/one &&\n-\techo master >foo.ext &&\n-\tgit commit -a -m master &&\n+\techo main >foo/one &&\n+\techo main >foo.ext &&\n+\tgit commit -a -m main &&\n \n \t# the other side modifies the other file in the directory\n \tgit checkout -b other HEAD^ &&\n@@ -426,7 +426,7 @@ test_expect_success 'combine diff gets tree sorting right' '\n \t# And now we merge. The files in the subdirectory will resolve cleanly,\n \t# meaning that a combined diff will not find them interesting. But it\n \t# will find the tree itself interesting, because it had to be merged.\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge other &&\n \n \tprintf \"MM\\tfoo\\n\" >expect &&\ndiff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh\nindex f852136585..23701e0e8a 100755\n--- a/t/t4041-diff-submodule-option.sh\n+++ b/t/t4041-diff-submodule-option.sh\n@@ -538,7 +538,7 @@ test_expect_success 'diff --submodule with objects referenced by alternates' '\n \t(cd super &&\n \t\t(cd sub &&\n \t\t\tgit fetch &&\n-\t\t\tgit checkout origin/master\n+\t\t\tgit checkout origin/main\n \t\t) &&\n \t\tgit diff --submodule > ../actual\n \t) &&\ndiff --git a/t/t4048-diff-combined-binary.sh b/t/t4048-diff-combined-binary.sh\nindex 7f9ad9fa3d..f23824c2b6 100755\n--- a/t/t4048-diff-combined-binary.sh\n+++ b/t/t4048-diff-combined-binary.sh\n@@ -14,7 +14,7 @@ test_expect_success 'setup binary merge conflict' '\n \techo threeQ3 | q_to_nul >binary &&\n \tgit commit -a -m three &&\n \tthree=$(git rev-parse --short HEAD:binary) &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \techo resolvedQhooray | q_to_nul >binary &&\n \tgit commit -a -m resolved &&\n \tres=$(git rev-parse --short HEAD:binary)\n@@ -62,14 +62,14 @@ test_expect_success 'diff --cc indicates binary-ness' '\n '\n \n test_expect_success 'setup non-binary with binary attribute' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit one text &&\n \ttest_commit two text &&\n \ttwo=$(git rev-parse --short HEAD:text) &&\n \tgit checkout -b branch-text HEAD^ &&\n \ttest_commit three text &&\n \tthree=$(git rev-parse --short HEAD:text) &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest_commit resolved text &&\n \tres=$(git rev-parse --short HEAD:text) &&\n \techo text -diff >.gitattributes\n@@ -206,11 +206,11 @@ index $three,$two..0000000\n  +THREE\n ++=======\n + TWO\n-++>>>>>>> MASTER\n+++>>>>>>> MAIN\n EOF\n test_expect_success 'diff --cc respects textconv on worktree file' '\n \tgit reset --hard HEAD^ &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit diff >actual &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh\nindex 28c053849a..e747a26cbd 100755\n--- a/t/t4052-stat-output.sh\n+++ b/t/t4052-stat-output.sh\n@@ -353,7 +353,7 @@ cat >expect <<'EOF'\n EOF\n test_expect_success 'merge --stat respects COLUMNS (big change)' '\n \tgit checkout -b branch HEAD^^ &&\n-\tCOLUMNS=100 git merge --stat --no-ff master^ >output &&\n+\tCOLUMNS=100 git merge --stat --no-ff main^ >output &&\n \tgrep \" | \" output >actual &&\n \ttest_cmp expect actual\n '\n@@ -362,7 +362,7 @@ cat >expect <<'EOF'\n  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++\n EOF\n test_expect_success 'merge --stat respects COLUMNS (long filename)' '\n-\tCOLUMNS=100 git merge --stat --no-ff master >output &&\n+\tCOLUMNS=100 git merge --stat --no-ff main >output &&\n \tgrep \" | \" output >actual &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t4056-diff-order.sh b/t/t4056-diff-order.sh\nindex 43dd474a12..07fcee31f4 100755\n--- a/t/t4056-diff-order.sh\n+++ b/t/t4056-diff-order.sh\n@@ -106,7 +106,7 @@ done\n test_expect_success 'setup for testing combine-diff order' '\n \tgit checkout -b tmp HEAD~ &&\n \tcreate_files 3 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge --no-commit -s ours tmp &&\n \tcreate_files 5\n '\ndiff --git a/t/t4057-diff-combined-paths.sh b/t/t4057-diff-combined-paths.sh\nindex 0b78573733..918b86fb63 100755\n--- a/t/t4057-diff-combined-paths.sh\n+++ b/t/t4057-diff-combined-paths.sh\n@@ -24,9 +24,9 @@ test_expect_success 'trivial merge - combine-diff empty' '\n \t\techo $i/2 >>$i.txt\n \tdone &&\n \tgit commit -a -m \"side 2-9\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo 1/2 >1.txt &&\n-\tgit commit -a -m \"master 1\" &&\n+\tgit commit -a -m \"main 1\" &&\n \tgit merge side &&\n \t>diffc.expect &&\n \tdiffc_verify\n@@ -41,19 +41,19 @@ test_expect_success 'only one truly conflicting path' '\n \tdone &&\n \techo \"4side\" >>4.txt &&\n \tgit commit -a -m \"side 2-9 +4\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tfor i in $(test_seq 1 9)\n \tdo\n \t\techo $i/3 >>$i.txt\n \tdone &&\n-\techo \"4master\" >>4.txt &&\n-\tgit commit -a -m \"master 1-9 +4\" &&\n+\techo \"4main\" >>4.txt &&\n+\tgit commit -a -m \"main 1-9 +4\" &&\n \ttest_must_fail git merge side &&\n \tcat <<-\\EOF >4.txt &&\n \t4\n \t4/2\n \t4/3\n-\t4master\n+\t4main\n \t4side\n \tEOF\n \tgit add 4.txt &&\n@@ -69,12 +69,12 @@ test_expect_success 'merge introduces new file' '\n \t\techo $i/4 >>$i.txt\n \tdone &&\n \tgit commit -a -m \"side 5-9\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tfor i in $(test_seq 1 3)\n \tdo\n \t\techo $i/4 >>$i.txt\n \tdone &&\n-\tgit commit -a -m \"master 1-3 +4hello\" &&\n+\tgit commit -a -m \"main 1-3 +4hello\" &&\n \tgit merge side &&\n \techo \"Hello World\" >4hello.txt &&\n \tgit add 4hello.txt &&\n@@ -90,12 +90,12 @@ test_expect_success 'merge removed a file' '\n \t\techo $i/5 >>$i.txt\n \tdone &&\n \tgit commit -a -m \"side 5-9\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tfor i in $(test_seq 1 3)\n \tdo\n \t\techo $i/4 >>$i.txt\n \tdone &&\n-\tgit commit -a -m \"master 1-3\" &&\n+\tgit commit -a -m \"main 1-3\" &&\n \tgit merge side &&\n \tgit rm 4.txt &&\n \tgit commit --amend &&\ndiff --git a/t/t4061-diff-indent.sh b/t/t4061-diff-indent.sh\nindex 0f7a6d97a8..5efdc34d51 100755\n--- a/t/t4061-diff-indent.sh\n+++ b/t/t4061-diff-indent.sh\n@@ -266,7 +266,7 @@ test_expect_success 'diff-index: nice spaces with --indent-heuristic' '\n \tgit reset --soft HEAD~ &&\n \tgit diff-index --indent-heuristic -p old -- spaces.txt >out-diff-index-compacted &&\n \tcompare_diff spaces-compacted-expect out-diff-index-compacted &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-index: nice spaces with diff.indentHeuristic=true' '\n@@ -274,7 +274,7 @@ test_expect_success 'diff-index: nice spaces with diff.indentHeuristic=true' '\n \tgit reset --soft HEAD~ &&\n \tgit -c diff.indentHeuristic=true diff-index -p old -- spaces.txt >out-diff-index-compacted2 &&\n \tcompare_diff spaces-compacted-expect out-diff-index-compacted2 &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-index: ugly spaces with --no-indent-heuristic' '\n@@ -282,7 +282,7 @@ test_expect_success 'diff-index: ugly spaces with --no-indent-heuristic' '\n \tgit reset --soft HEAD~ &&\n \tgit diff-index --no-indent-heuristic -p old -- spaces.txt >out-diff-index &&\n \tcompare_diff spaces-expect out-diff-index &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-index: ugly spaces with diff.indentHeuristic=false' '\n@@ -290,7 +290,7 @@ test_expect_success 'diff-index: ugly spaces with diff.indentHeuristic=false' '\n \tgit reset --soft HEAD~ &&\n \tgit -c diff.indentHeuristic=false diff-index -p old -- spaces.txt >out-diff-index2 &&\n \tcompare_diff spaces-expect out-diff-index2 &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-index: --indent-heuristic overrides config' '\n@@ -298,7 +298,7 @@ test_expect_success 'diff-index: --indent-heuristic overrides config' '\n \tgit reset --soft HEAD~ &&\n \tgit -c diff.indentHeuristic=false diff-index --indent-heuristic -p old -- spaces.txt >out-diff-index-compacted3 &&\n \tcompare_diff spaces-compacted-expect out-diff-index-compacted3 &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-index: --no-indent-heuristic overrides config' '\n@@ -306,7 +306,7 @@ test_expect_success 'diff-index: --no-indent-heuristic overrides config' '\n \tgit reset --soft HEAD~ &&\n \tgit -c diff.indentHeuristic=true diff-index --no-indent-heuristic -p old -- spaces.txt >out-diff-index3 &&\n \tcompare_diff spaces-expect out-diff-index3 &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n # --- diff-files tests ----------------------------------------------------\n@@ -317,7 +317,7 @@ test_expect_success 'diff-files: nice spaces with --indent-heuristic' '\n \tgit diff-files --indent-heuristic -p spaces.txt >out-diff-files-raw &&\n \tgrep -v index out-diff-files-raw >out-diff-files-compacted &&\n \tcompare_diff spaces-compacted-expect out-diff-files-compacted &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-files: nice spaces with diff.indentHeuristic=true' '\n@@ -326,7 +326,7 @@ test_expect_success 'diff-files: nice spaces with diff.indentHeuristic=true' '\n \tgit -c diff.indentHeuristic=true diff-files -p spaces.txt >out-diff-files-raw2 &&\n \tgrep -v index out-diff-files-raw2 >out-diff-files-compacted2 &&\n \tcompare_diff spaces-compacted-expect out-diff-files-compacted2 &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-files: ugly spaces with --no-indent-heuristic' '\n@@ -335,7 +335,7 @@ test_expect_success 'diff-files: ugly spaces with --no-indent-heuristic' '\n \tgit diff-files --no-indent-heuristic -p spaces.txt >out-diff-files-raw &&\n \tgrep -v index out-diff-files-raw >out-diff-files &&\n \tcompare_diff spaces-expect out-diff-files &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-files: ugly spaces with diff.indentHeuristic=false' '\n@@ -344,7 +344,7 @@ test_expect_success 'diff-files: ugly spaces with diff.indentHeuristic=false' '\n \tgit -c diff.indentHeuristic=false diff-files -p spaces.txt >out-diff-files-raw2 &&\n \tgrep -v index out-diff-files-raw2 >out-diff-files &&\n \tcompare_diff spaces-expect out-diff-files &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-files: --indent-heuristic overrides config' '\n@@ -353,7 +353,7 @@ test_expect_success 'diff-files: --indent-heuristic overrides config' '\n \tgit -c diff.indentHeuristic=false diff-files --indent-heuristic -p spaces.txt >out-diff-files-raw3 &&\n \tgrep -v index out-diff-files-raw3 >out-diff-files-compacted &&\n \tcompare_diff spaces-compacted-expect out-diff-files-compacted &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-files: --no-indent-heuristic overrides config' '\n@@ -362,7 +362,7 @@ test_expect_success 'diff-files: --no-indent-heuristic overrides config' '\n \tgit -c diff.indentHeuristic=true diff-files --no-indent-heuristic -p spaces.txt >out-diff-files-raw4 &&\n \tgrep -v index out-diff-files-raw4 >out-diff-files &&\n \tcompare_diff spaces-expect out-diff-files &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_done\ndiff --git a/t/t4066-diff-emit-delay.sh b/t/t4066-diff-emit-delay.sh\nindex 6331f63b12..fcd54fa3eb 100755\n--- a/t/t4066-diff-emit-delay.sh\n+++ b/t/t4066-diff-emit-delay.sh\n@@ -13,7 +13,7 @@ test_expect_success 'set up history with a merge' '\n \ttest_commit B &&\n \tgit checkout -b side HEAD^ &&\n \ttest_commit C &&\n-\tgit merge -m M master &&\n+\tgit merge -m M main &&\n \ttest_commit D\n '\n \ndiff --git a/t/t4068-diff-symmetric-merge-base.sh b/t/t4068-diff-symmetric-merge-base.sh\nindex 03487cc945..ccd4da4fe9 100755\n--- a/t/t4068-diff-symmetric-merge-base.sh\n+++ b/t/t4068-diff-symmetric-merge-base.sh\n@@ -6,10 +6,10 @@ test_description='behavior of diff with symmetric-diff setups and --merge-base'\n \n # build these situations:\n #  - normal merge with one merge base (br1...b2r);\n-#  - criss-cross merge ie 2 merge bases (br1...master);\n-#  - disjoint subgraph (orphan branch, br3...master).\n+#  - criss-cross merge ie 2 merge bases (br1...main);\n+#  - disjoint subgraph (orphan branch, br3...main).\n #\n-#     B---E   <-- master\n+#     B---E   <-- main\n #    / \\ /\n #   A   X\n #    \\ / \\\n@@ -32,9 +32,9 @@ test_expect_success setup '\n \tgit add c &&\n \tgit commit -m C &&\n \tgit tag commit-C &&\n-\tgit merge -m D master &&\n+\tgit merge -m D main &&\n \tgit tag commit-D &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge -m E commit-C &&\n \tgit checkout -b br2 commit-C &&\n \techo f >f &&\n@@ -58,7 +58,7 @@ test_expect_success 'diff with one merge base' '\n # It should have one of those two, which comes out\n # to seven lines.\n test_expect_success 'diff with two merge bases' '\n-\tgit diff br1...master >tmp 2>err &&\n+\tgit diff br1...main >tmp 2>err &&\n \ttest_line_count = 7 tmp &&\n \ttest_line_count = 1 err\n '\n@@ -69,22 +69,22 @@ test_expect_success 'diff with no merge bases' '\n '\n \n test_expect_success 'diff with too many symmetric differences' '\n-\ttest_must_fail git diff br1...master br2...br3 2>err &&\n+\ttest_must_fail git diff br1...main br2...br3 2>err &&\n \ttest_i18ngrep \"usage\" err\n '\n \n test_expect_success 'diff with symmetric difference and extraneous arg' '\n-\ttest_must_fail git diff master br1...master 2>err &&\n+\ttest_must_fail git diff main br1...main 2>err &&\n \ttest_i18ngrep \"usage\" err\n '\n \n test_expect_success 'diff with two ranges' '\n-\ttest_must_fail git diff master br1..master br2..br3 2>err &&\n+\ttest_must_fail git diff main br1..main br2..br3 2>err &&\n \ttest_i18ngrep \"usage\" err\n '\n \n test_expect_success 'diff with ranges and extra arg' '\n-\ttest_must_fail git diff master br1..master commit-D 2>err &&\n+\ttest_must_fail git diff main br1..main commit-D 2>err &&\n \ttest_i18ngrep \"usage\" err\n '\n \n@@ -93,21 +93,21 @@ test_expect_success 'diff --merge-base with no commits' '\n '\n \n test_expect_success 'diff --merge-base with three commits' '\n-\ttest_must_fail git diff --merge-base br1 br2 master 2>err &&\n+\ttest_must_fail git diff --merge-base br1 br2 main 2>err &&\n \ttest_i18ngrep \"usage\" err\n '\n \n for cmd in diff-index diff\n do\n \ttest_expect_success \"$cmd --merge-base with one commit\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit $cmd commit-C >expect &&\n \t\tgit $cmd --merge-base br2 >actual &&\n \t\ttest_cmp expect actual\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with one commit and unstaged changes\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_when_finished git reset --hard &&\n \t\techo unstaged >>c &&\n \t\tgit $cmd commit-C >expect &&\n@@ -116,7 +116,7 @@ do\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with one commit and staged and unstaged changes\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_when_finished git reset --hard &&\n \t\techo staged >>c &&\n \t\tgit add c &&\n@@ -127,7 +127,7 @@ do\n \t'\n \n \ttest_expect_success \"$cmd --merge-base --cached with one commit and staged and unstaged changes\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_when_finished git reset --hard &&\n \t\techo staged >>c &&\n \t\tgit add c &&\n@@ -138,19 +138,19 @@ do\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with non-commit\" '\n-\t\tgit checkout master &&\n-\t\ttest_must_fail git $cmd --merge-base master^{tree} 2>err &&\n+\t\tgit checkout main &&\n+\t\ttest_must_fail git $cmd --merge-base main^{tree} 2>err &&\n \t\ttest_i18ngrep \"fatal: --merge-base only works with commits\" err\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with no merge bases and one commit\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_must_fail git $cmd --merge-base br3 2>err &&\n \t\ttest_i18ngrep \"fatal: no merge base found\" err\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with multiple merge bases and one commit\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_must_fail git $cmd --merge-base br1 2>err &&\n \t\ttest_i18ngrep \"fatal: multiple merge bases found\" err\n \t'\n@@ -159,13 +159,13 @@ done\n for cmd in diff-tree diff\n do\n \ttest_expect_success \"$cmd --merge-base with two commits\" '\n-\t\tgit $cmd commit-C master >expect &&\n-\t\tgit $cmd --merge-base br2 master >actual &&\n+\t\tgit $cmd commit-C main >expect &&\n+\t\tgit $cmd --merge-base br2 main >actual &&\n \t\ttest_cmp expect actual\n \t'\n \n \ttest_expect_success \"$cmd --merge-base commit and non-commit\" '\n-\t\ttest_must_fail git $cmd --merge-base br2 master^{tree} 2>err &&\n+\t\ttest_must_fail git $cmd --merge-base br2 main^{tree} 2>err &&\n \t\ttest_i18ngrep \"fatal: --merge-base only works with commits\" err\n \t'\n \n@@ -175,13 +175,13 @@ do\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with multiple merge bases and two commits\" '\n-\t\ttest_must_fail git $cmd --merge-base master br1 2>err &&\n+\t\ttest_must_fail git $cmd --merge-base main br1 2>err &&\n \t\ttest_i18ngrep \"fatal: multiple merge bases found\" err\n \t'\n done\n \n test_expect_success 'diff-tree --merge-base with one commit' '\n-\ttest_must_fail git diff-tree --merge-base master 2>err &&\n+\ttest_must_fail git diff-tree --merge-base main 2>err &&\n \ttest_i18ngrep \"fatal: --merge-base only works with two commits\" err\n '\n \ndiff --git a/t/t4103-apply-binary.sh b/t/t4103-apply-binary.sh\nindex 1b420e3b5f..b5a68cfe78 100755\n--- a/t/t4103-apply-binary.sh\n+++ b/t/t4103-apply-binary.sh\n@@ -31,64 +31,64 @@ test_expect_success 'setup' '\n \tgit update-index --add --remove file1 file2 file3 file4 &&\n \tgit commit -m \"Second Version\" &&\n \n-\tgit diff-tree -p master binary >B.diff &&\n-\tgit diff-tree -p -C master binary >C.diff &&\n+\tgit diff-tree -p main binary >B.diff &&\n+\tgit diff-tree -p -C main binary >C.diff &&\n \n-\tgit diff-tree -p --binary master binary >BF.diff &&\n-\tgit diff-tree -p --binary -C master binary >CF.diff &&\n+\tgit diff-tree -p --binary main binary >BF.diff &&\n+\tgit diff-tree -p --binary -C main binary >CF.diff &&\n \n-\tgit diff-tree -p --full-index master binary >B-index.diff &&\n-\tgit diff-tree -p -C --full-index master binary >C-index.diff &&\n+\tgit diff-tree -p --full-index main binary >B-index.diff &&\n+\tgit diff-tree -p -C --full-index main binary >C-index.diff &&\n \n-\tgit diff-tree -p --binary --no-prefix master binary -- file3 >B0.diff &&\n+\tgit diff-tree -p --binary --no-prefix main binary -- file3 >B0.diff &&\n \n \tgit init other-repo &&\n \t(\n \t\tcd other-repo &&\n-\t\tgit fetch .. master &&\n+\t\tgit fetch .. main &&\n \t\tgit reset --hard FETCH_HEAD\n \t)\n '\n \n test_expect_success 'stat binary diff -- should not fail.' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t git apply --stat --summary B.diff'\n \n test_expect_success 'stat binary -p0 diff -- should not fail.' '\n-\t git checkout master &&\n+\t git checkout main &&\n \t git apply --stat -p0 B0.diff\n '\n \n test_expect_success 'stat binary diff (copy) -- should not fail.' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t git apply --stat --summary C.diff'\n \n test_expect_success 'check binary diff -- should fail.' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t test_must_fail git apply --check B.diff'\n \n test_expect_success 'check binary diff (copy) -- should fail.' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t test_must_fail git apply --check C.diff'\n \n test_expect_success \\\n \t'check incomplete binary diff with replacement -- should fail.' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git apply --check --allow-binary-replacement B.diff\n '\n \n test_expect_success \\\n     'check incomplete binary diff with replacement (copy) -- should fail.' '\n-\t git checkout master &&\n+\t git checkout main &&\n \t test_must_fail git apply --check --allow-binary-replacement C.diff\n '\n \n test_expect_success 'check binary diff with replacement.' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t git apply --check --allow-binary-replacement BF.diff'\n \n test_expect_success 'check binary diff with replacement (copy).' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t git apply --check --allow-binary-replacement CF.diff'\n \n # Now we start applying them.\n@@ -96,7 +96,7 @@ test_expect_success 'check binary diff with replacement (copy).' \\\n do_reset () {\n \trm -f file? &&\n \tgit reset --hard &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n }\n \n test_expect_success 'apply binary diff -- should fail.' \\\ndiff --git a/t/t4108-apply-threeway.sh b/t/t4108-apply-threeway.sh\nindex d7349ced6b..f073df1792 100755\n--- a/t/t4108-apply-threeway.sh\n+++ b/t/t4108-apply-threeway.sh\n@@ -24,14 +24,14 @@ test_expect_success setup '\n \ttest_tick &&\n \ttest_write_lines 1 two 3 4 5 six 7 >one &&\n \ttest_write_lines 1 two 3 4 5 6 7 >two &&\n-\tgit commit -a -m master &&\n+\tgit commit -a -m main &&\n \n \tgit checkout side &&\n \ttest_write_lines 1 2 3 4 five 6 7 >one &&\n \ttest_write_lines 1 2 3 4 five 6 7 >two &&\n \tgit commit -a -m side &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'apply without --3way' '\n@@ -39,7 +39,7 @@ test_expect_success 'apply without --3way' '\n \n \t# should fail to apply\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git apply --index P.diff &&\n \t# should leave things intact\n \tgit diff-files --exit-code &&\n@@ -52,14 +52,14 @@ test_apply_with_3way () {\n \n \t# The corresponding conflicted merge\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git merge --no-commit side &&\n \tgit ls-files -s >expect.ls &&\n \tprint_sanitized_conflicted_diff >expect.diff &&\n \n \t# should fail to apply\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git apply --index --3way P.diff &&\n \tgit ls-files -s >actual.ls &&\n \tprint_sanitized_conflicted_diff >actual.diff &&\n@@ -86,7 +86,7 @@ test_expect_success 'apply with --3way with rerere enabled' '\n \n \t# The corresponding conflicted merge\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git merge --no-commit side &&\n \n \t# Manually resolve and record the resolution\n@@ -96,7 +96,7 @@ test_expect_success 'apply with --3way with rerere enabled' '\n \n \t# should fail to apply\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git apply --index --3way P.diff &&\n \n \t# but rerere should have replayed the recorded resolution\ndiff --git a/t/t4121-apply-diffs.sh b/t/t4121-apply-diffs.sh\nindex 66368effd5..ff2257fef1 100755\n--- a/t/t4121-apply-diffs.sh\n+++ b/t/t4121-apply-diffs.sh\n@@ -23,7 +23,7 @@ test_expect_success 'setup' \\\n \tgit commit -a -q -m 2 &&\n \techo 9 >>file &&\n \tgit commit -a -q -m 3 &&\n-\tgit checkout master'\n+\tgit checkout main'\n \n test_expect_success \\\n \t'check if contextually independent diffs for the same file apply' \\\ndiff --git a/t/t4122-apply-symlink-inside.sh b/t/t4122-apply-symlink-inside.sh\nindex 4acb3f336e..36562677c4 100755\n--- a/t/t4122-apply-symlink-inside.sh\n+++ b/t/t4122-apply-symlink-inside.sh\n@@ -35,11 +35,11 @@ test_expect_success apply '\n \n test_expect_success 'check result' '\n \n-\tgit diff --exit-code master &&\n-\tgit diff --exit-code --cached master &&\n+\tgit diff --exit-code main &&\n+\tgit diff --exit-code --cached main &&\n \ttest_tick &&\n \tgit commit -m replay &&\n-\tT1=$(git rev-parse \"master^{tree}\") &&\n+\tT1=$(git rev-parse \"main^{tree}\") &&\n \tT2=$(git rev-parse \"HEAD^{tree}\") &&\n \ttest \"z$T1\" = \"z$T2\"\n \ndiff --git a/t/t4150-am.sh b/t/t4150-am.sh\nindex 3ecbef6f8e..2514341522 100755\n--- a/t/t4150-am.sh\n+++ b/t/t4150-am.sh\n@@ -179,8 +179,8 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m \"added another file\" &&\n \n-\tgit format-patch --stdout master >lorem-move.patch &&\n-\tgit format-patch --no-prefix --stdout master >lorem-zero.patch &&\n+\tgit format-patch --stdout main >lorem-move.patch &&\n+\tgit format-patch --no-prefix --stdout main >lorem-zero.patch &&\n \n \tgit checkout -b rename &&\n \tgit mv file renamed &&\n@@ -453,11 +453,11 @@ test_expect_success 'am changes committer and keeps author' '\n \tgit checkout first &&\n \tgit am patch2 &&\n \ttest_path_is_missing .git/rebase-apply &&\n-\ttest \"$(git rev-parse master^^)\" = \"$(git rev-parse HEAD^^)\" &&\n-\tgit diff --exit-code master..HEAD &&\n-\tgit diff --exit-code master^..HEAD^ &&\n-\tcompare author master HEAD &&\n-\tcompare author master^ HEAD^ &&\n+\ttest \"$(git rev-parse main^^)\" = \"$(git rev-parse HEAD^^)\" &&\n+\tgit diff --exit-code main..HEAD &&\n+\tgit diff --exit-code main^..HEAD^ &&\n+\tcompare author main HEAD &&\n+\tcompare author main^ HEAD^ &&\n \ttest \"$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>\" = \\\n \t     \"$(git log -1 --pretty=format:\"%cn <%ce>\" HEAD)\"\n '\n@@ -759,7 +759,7 @@ test_expect_success 'am takes patches from a Pine mailbox' '\n \tgit checkout first &&\n \tcat pine patch1 | git am &&\n \ttest_path_is_missing .git/rebase-apply &&\n-\tgit diff --exit-code master^..HEAD\n+\tgit diff --exit-code main^..HEAD\n '\n \n test_expect_success 'am fails on mail without patch' '\n@@ -1112,21 +1112,21 @@ test_expect_success 'am and .gitattibutes' '\n \t\ttest_commit sixth &&\n \n \t\tgit checkout test &&\n-\t\tgit format-patch --stdout master..HEAD >patches &&\n-\t\tgit reset --hard master &&\n+\t\tgit format-patch --stdout main..HEAD >patches &&\n+\t\tgit reset --hard main &&\n \t\tgit am patches &&\n \t\tgrep \"smudged\" a.txt &&\n \n \t\tgit checkout removal &&\n \t\tgit reset --hard &&\n-\t\tgit format-patch --stdout master..HEAD >patches &&\n-\t\tgit reset --hard master &&\n+\t\tgit format-patch --stdout main..HEAD >patches &&\n+\t\tgit reset --hard main &&\n \t\tgit am patches &&\n \t\tgrep \"clean\" a.txt &&\n \n \t\tgit checkout conflict &&\n \t\tgit reset --hard &&\n-\t\tgit format-patch --stdout master..HEAD >patches &&\n+\t\tgit format-patch --stdout main..HEAD >patches &&\n \t\tgit reset --hard fourth &&\n \t\ttest_must_fail git am -3 patches &&\n \t\tgrep \"<<<<<<<<<<\" a.txt\ndiff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh\nindex b12b43e9e9..a6222b84bb 100755\n--- a/t/t4200-rerere.sh\n+++ b/t/t4200-rerere.sh\n@@ -8,7 +8,7 @@ test_description='git rerere\n ! [fifth] version1\n  ! [first] first\n   ! [fourth] version1\n-   ! [master] initial\n+   ! [main] initial\n     ! [second] prefer first over second\n      ! [third] version2\n ------\n@@ -19,7 +19,7 @@ test_description='git rerere\n     -  [second] prefer first over second\n  +  +  [first] first\n     +  [second^] second\n-++++++ [master] initial\n+++++++ [main] initial\n '\n \n . ./test-lib.sh\n@@ -57,7 +57,7 @@ test_expect_success 'setup' '\n \ttest_tick &&\n \tgit commit -q -a -m first &&\n \n-\tgit checkout -b second master &&\n+\tgit checkout -b second main &&\n \tgit show first:a1 |\n \tsed -e \"s/To die, t/To die! T/\" -e \"s/Some title/Some Title/\" >a1 &&\n \techo \"* END *\" >>a1 &&\n@@ -168,7 +168,7 @@ test_expect_success 'first postimage wins' '\n \n \toldmtimepost=$(test-tool chmtime --get -60 $rr/postimage) &&\n \n-\tgit checkout -b third master &&\n+\tgit checkout -b third main &&\n \tgit show second^:a1 | sed \"s/To die: t/To die! T/\" >a1 &&\n \tgit commit -q -a -m third &&\n \n@@ -580,13 +580,13 @@ test_expect_success 'multiple identical conflicts' '\n test_expect_success 'rerere with unexpected conflict markers does not crash' '\n \tgit reset --hard &&\n \n-\tgit checkout -b branch-1 master &&\n+\tgit checkout -b branch-1 main &&\n \techo \"bar\" >test &&\n \tgit add test &&\n \tgit commit -q -m two &&\n \n \tgit reset --hard &&\n-\tgit checkout -b branch-2 master &&\n+\tgit checkout -b branch-2 main &&\n \techo \"foo\" >test &&\n \tgit add test &&\n \tgit commit -q -a -m one &&\n@@ -601,7 +601,7 @@ test_expect_success 'rerere with unexpected conflict markers does not crash' '\n test_expect_success 'rerere with inner conflict markers' '\n \tgit reset --hard &&\n \n-\tgit checkout -b A master &&\n+\tgit checkout -b A main &&\n \techo \"bar\" >test &&\n \tgit add test &&\n \tgit commit -q -m two &&\n@@ -610,7 +610,7 @@ test_expect_success 'rerere with inner conflict markers' '\n \tgit commit -q -m three &&\n \n \tgit reset --hard &&\n-\tgit checkout -b B master &&\n+\tgit checkout -b B main &&\n \techo \"foo\" >test &&\n \tgit add test &&\n \tgit commit -q -a -m one &&\n@@ -651,11 +651,11 @@ test_expect_success 'setup simple stage 1 handling' '\n \t\tgit add original &&\n \t\tgit commit -m original &&\n \n-\t\tgit checkout -b A master &&\n+\t\tgit checkout -b A main &&\n \t\tgit mv original A &&\n \t\tgit commit -m \"rename to A\" &&\n \n-\t\tgit checkout -b B master &&\n+\t\tgit checkout -b B main &&\n \t\tgit mv original B &&\n \t\tgit commit -m \"rename to B\"\n \t)\ndiff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh\nindex 3d5c4a2086..005fff4c2c 100755\n--- a/t/t4201-shortlog.sh\n+++ b/t/t4201-shortlog.sh\n@@ -191,7 +191,7 @@ test_expect_success 'shortlog with revision pseudo options' '\n '\n \n test_expect_success 'shortlog with --output=<file>' '\n-\tgit shortlog --output=shortlog -1 master >output &&\n+\tgit shortlog --output=shortlog -1 main >output &&\n \ttest_must_be_empty output &&\n \ttest_line_count = 3 shortlog\n '\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex 56d34ed465..93b72ad85e 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -478,7 +478,7 @@ test_expect_success 'set up merge history' '\n \tgit checkout -b side HEAD~4 &&\n \ttest_commit side-1 1 1 &&\n \ttest_commit side-2 2 2 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge side\n '\n \n@@ -541,17 +541,17 @@ test_expect_success 'log --graph with merge with log.graphColors' '\n '\n \n test_expect_success 'log --raw --graph -m with merge' '\n-\tgit log --raw --graph --oneline -m master | head -n 500 >actual &&\n+\tgit log --raw --graph --oneline -m main | head -n 500 >actual &&\n \tgrep \"initial\" actual\n '\n \n test_expect_success 'diff-tree --graph' '\n-\tgit diff-tree --graph master^ | head -n 500 >actual &&\n+\tgit diff-tree --graph main^ | head -n 500 >actual &&\n \tgrep \"one\" actual\n '\n \n cat > expect <<\\EOF\n-*   commit master\n+*   commit main\n |\\  Merge: A B\n | | Author: A U Thor <author@example.com>\n | |\n@@ -567,22 +567,22 @@ cat > expect <<\\EOF\n | |\n | |     side-1\n | |\n-* | commit master~1\n+* | commit main~1\n | | Author: A U Thor <author@example.com>\n | |\n | |     Second\n | |\n-* | commit master~2\n+* | commit main~2\n | | Author: A U Thor <author@example.com>\n | |\n | |     sixth\n | |\n-* | commit master~3\n+* | commit main~3\n | | Author: A U Thor <author@example.com>\n | |\n | |     fifth\n | |\n-* | commit master~4\n+* | commit main~4\n |/  Author: A U Thor <author@example.com>\n |\n |       fourth\n@@ -613,19 +613,19 @@ test_expect_success 'log --graph with full output' '\n test_expect_success 'set up more tangled history' '\n \tgit checkout -b tangle HEAD~6 &&\n \ttest_commit tangle-a tangle-a a &&\n-\tgit merge master~3 &&\n+\tgit merge main~3 &&\n \tgit merge side~1 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge tangle &&\n \tgit checkout -b reach &&\n \ttest_commit reach &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -b octopus-a &&\n \ttest_commit octopus-a &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -b octopus-b &&\n \ttest_commit octopus-b &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit seventh &&\n \tgit merge octopus-a octopus-b &&\n \tgit merge reach\n@@ -650,7 +650,7 @@ cat > expect <<\\EOF\n |\\\n | *   Merge branch 'side' (early part) into tangle\n | |\\\n-| * \\   Merge branch 'master' (early part) into tangle\n+| * \\   Merge branch 'main' (early part) into tangle\n | |\\ \\\n | * | | tangle-a\n * | | |   Merge branch 'side'\n@@ -794,7 +794,7 @@ test_expect_success 'multiple decorate-refs' '\n \n test_expect_success 'decorate-refs-exclude with glob' '\n \tcat >expect.decorate <<-\\EOF &&\n-\tMerge-tag-reach (HEAD -> master)\n+\tMerge-tag-reach (HEAD -> main)\n \tMerge-tags-octopus-a-and-octopus-b\n \tseventh (tag: seventh)\n \toctopus-b (tag: octopus-b)\n@@ -811,7 +811,7 @@ test_expect_success 'decorate-refs-exclude with glob' '\n \n test_expect_success 'decorate-refs-exclude without globs' '\n \tcat >expect.decorate <<-\\EOF &&\n-\tMerge-tag-reach (HEAD -> master)\n+\tMerge-tag-reach (HEAD -> main)\n \tMerge-tags-octopus-a-and-octopus-b\n \tseventh (tag: seventh)\n \toctopus-b (tag: octopus-b, octopus-b)\n@@ -828,7 +828,7 @@ test_expect_success 'decorate-refs-exclude without globs' '\n \n test_expect_success 'multiple decorate-refs-exclude' '\n \tcat >expect.decorate <<-\\EOF &&\n-\tMerge-tag-reach (HEAD -> master)\n+\tMerge-tag-reach (HEAD -> main)\n \tMerge-tags-octopus-a-and-octopus-b\n \tseventh (tag: seventh)\n \toctopus-b (tag: octopus-b)\n@@ -851,7 +851,7 @@ test_expect_success 'multiple decorate-refs-exclude' '\n \n test_expect_success 'decorate-refs and decorate-refs-exclude' '\n \tcat >expect.no-decorate <<-\\EOF &&\n-\tMerge-tag-reach (master)\n+\tMerge-tag-reach (main)\n \tMerge-tags-octopus-a-and-octopus-b\n \tseventh\n \toctopus-b\n@@ -866,7 +866,7 @@ test_expect_success 'decorate-refs and decorate-refs-exclude' '\n \n test_expect_success 'deocrate-refs and log.excludeDecoration' '\n \tcat >expect.decorate <<-\\EOF &&\n-\tMerge-tag-reach (master)\n+\tMerge-tag-reach (main)\n \tMerge-tags-octopus-a-and-octopus-b\n \tseventh\n \toctopus-b (octopus-b)\n@@ -881,7 +881,7 @@ test_expect_success 'deocrate-refs and log.excludeDecoration' '\n \n test_expect_success 'decorate-refs-exclude and simplify-by-decoration' '\n \tcat >expect.decorate <<-\\EOF &&\n-\tMerge-tag-reach (HEAD -> master)\n+\tMerge-tag-reach (HEAD -> main)\n \treach (tag: reach, reach)\n \tseventh (tag: seventh)\n \tMerge-branch-tangle\n@@ -1080,7 +1080,7 @@ cat >expect <<\\EOF\n | |\\ \\  Merge: MERGE_PARENTS\n | | | | Author: A U Thor <author@example.com>\n | | | |\n-| | | |     Merge branch 'master' (early part) into tangle\n+| | | |     Merge branch 'main' (early part) into tangle\n | | | |\n | * | | commit COMMIT_OBJECT_NAME\n | | | | Author: A U Thor <author@example.com>\n@@ -1355,7 +1355,7 @@ cat >expect <<\\EOF\n *** | |\\ \\  Merge: MERGE_PARENTS\n *** | | | | Author: A U Thor <author@example.com>\n *** | | | |\n-*** | | | |     Merge branch 'master' (early part) into tangle\n+*** | | | |     Merge branch 'main' (early part) into tangle\n *** | | | |\n *** | * | | commit COMMIT_OBJECT_NAME\n *** | | | | Author: A U Thor <author@example.com>\n@@ -1588,24 +1588,24 @@ test_expect_success 'dotdot is a parent directory' '\n '\n \n test_expect_success GPG 'setup signed branch' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b signed master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b signed main &&\n \techo foo >foo &&\n \tgit add foo &&\n \tgit commit -S -m signed_commit\n '\n \n test_expect_success GPG 'setup signed branch with subkey' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b signed-subkey master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b signed-subkey main &&\n \techo foo >foo &&\n \tgit add foo &&\n \tgit commit -SB7227189 -m signed_commit\n '\n \n test_expect_success GPGSM 'setup signed branch x509' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b signed-x509 master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b signed-x509 main &&\n \techo foo >foo &&\n \tgit add foo &&\n \ttest_config gpg.format x509 &&\n@@ -1638,12 +1638,12 @@ test_expect_success GPGSM 'log --graph --show-signature x509' '\n '\n \n test_expect_success GPG 'log --graph --show-signature for merged tag' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b plain master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b plain main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged master &&\n+\tgit checkout -b tagged main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1657,12 +1657,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag' '\n '\n \n test_expect_success GPG 'log --graph --show-signature for merged tag in shallow clone' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b plain-shallow master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b plain-shallow main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout --detach master &&\n+\tgit checkout --detach main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1677,12 +1677,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag in shallow\n '\n \n test_expect_success GPG 'log --graph --show-signature for merged tag with missing key' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b plain-nokey master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b plain-nokey main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-nokey master &&\n+\tgit checkout -b tagged-nokey main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1696,12 +1696,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag with missin\n '\n \n test_expect_success GPG 'log --graph --show-signature for merged tag with bad signature' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b plain-bad master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b plain-bad main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-bad master &&\n+\tgit checkout -b tagged-bad main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1718,12 +1718,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag with bad si\n '\n \n test_expect_success GPG 'log --show-signature for merged tag with GPG failure' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b plain-fail master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b plain-fail main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-fail master &&\n+\tgit checkout -b tagged-fail main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1737,14 +1737,14 @@ test_expect_success GPG 'log --show-signature for merged tag with GPG failure' '\n '\n \n test_expect_success GPGSM 'log --graph --show-signature for merged tag x509' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \ttest_config gpg.format x509 &&\n \ttest_config user.signingkey $GIT_COMMITTER_EMAIL &&\n-\tgit checkout -b plain-x509 master &&\n+\tgit checkout -b plain-x509 main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-x509 master &&\n+\tgit checkout -b tagged-x509 main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1758,14 +1758,14 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509' '\n '\n \n test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 missing key' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \ttest_config gpg.format x509 &&\n \ttest_config user.signingkey $GIT_COMMITTER_EMAIL &&\n-\tgit checkout -b plain-x509-nokey master &&\n+\tgit checkout -b plain-x509-nokey main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-x509-nokey master &&\n+\tgit checkout -b tagged-x509-nokey main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1778,14 +1778,14 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 miss\n '\n \n test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 bad signature' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \ttest_config gpg.format x509 &&\n \ttest_config user.signingkey $GIT_COMMITTER_EMAIL &&\n-\tgit checkout -b plain-x509-bad master &&\n+\tgit checkout -b plain-x509-bad main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-x509-bad master &&\n+\tgit checkout -b tagged-x509-bad main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1835,7 +1835,7 @@ test_expect_success 'log diagnoses bogus HEAD' '\n \tgit init empty &&\n \ttest_must_fail git -C empty log 2>stderr &&\n \ttest_i18ngrep does.not.have.any.commits stderr &&\n-\techo 1234abcd >empty/.git/refs/heads/master &&\n+\techo 1234abcd >empty/.git/refs/heads/main &&\n \ttest_must_fail git -C empty log 2>stderr &&\n \ttest_i18ngrep broken stderr &&\n \techo \"ref: refs/heads/invalid.lock\" >empty/.git/HEAD &&\ndiff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh\nindex 586c3a86b1..2127b1652d 100755\n--- a/t/t4203-mailmap.sh\n+++ b/t/t4203-mailmap.sh\n@@ -194,7 +194,7 @@ test_expect_success 'No mailmap files, but configured' '\n \n test_expect_success 'setup mailmap blob tests' '\n \tgit checkout -b map &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tcat >just-bugs <<- EOF &&\n \tBlob Guy <bugs@company.xx>\n \tEOF\ndiff --git a/t/t4204-patch-id.sh b/t/t4204-patch-id.sh\nindex 8ff8bd84c7..3808dce5c7 100755\n--- a/t/t4204-patch-id.sh\n+++ b/t/t4204-patch-id.sh\n@@ -13,9 +13,9 @@ test_expect_success 'setup' '\n \ttest_write_lines $as b >foo &&\n \ttest_write_lines $as b >bar &&\n \tgit commit -a -m first &&\n-\tgit checkout -b same master &&\n+\tgit checkout -b same main &&\n \tgit commit --amend -m same-msg &&\n-\tgit checkout -b notsame master &&\n+\tgit checkout -b notsame main &&\n \techo c >foo &&\n \techo c >bar &&\n \tgit commit --amend -a -m notsame-msg &&\n@@ -46,31 +46,31 @@ get_patch_id () {\n }\n \n test_expect_success 'patch-id detects equality' '\n-\tget_patch_id master &&\n+\tget_patch_id main &&\n \tget_patch_id same &&\n-\ttest_cmp patch-id_master patch-id_same\n+\ttest_cmp patch-id_main patch-id_same\n '\n \n test_expect_success 'patch-id detects inequality' '\n-\tget_patch_id master &&\n+\tget_patch_id main &&\n \tget_patch_id notsame &&\n-\t! test_cmp patch-id_master patch-id_notsame\n+\t! test_cmp patch-id_main patch-id_notsame\n '\n \n test_expect_success 'patch-id supports git-format-patch output' '\n-\tget_patch_id master &&\n+\tget_patch_id main &&\n \tgit checkout same &&\n \tgit format-patch -1 --stdout | calc_patch_id same &&\n-\ttest_cmp patch-id_master patch-id_same &&\n+\ttest_cmp patch-id_main patch-id_same &&\n \tset $(git format-patch -1 --stdout | git patch-id) &&\n \ttest \"$2\" = $(git rev-parse HEAD)\n '\n \n test_expect_success 'whitespace is irrelevant in footer' '\n-\tget_patch_id master &&\n+\tget_patch_id main &&\n \tgit checkout same &&\n \tgit format-patch -1 --stdout | sed \"s/ \\$//\" | calc_patch_id same &&\n-\ttest_cmp patch-id_master patch-id_same\n+\ttest_cmp patch-id_main patch-id_same\n '\n \n cmp_patch_id () {\n@@ -88,7 +88,7 @@ test_patch_id_file_order () {\n \tshift\n \tname=\"order-${1}-$relevant\"\n \tshift\n-\tget_top_diff \"master\" | calc_patch_id \"$name\" \"$@\" &&\n+\tget_top_diff \"main\" | calc_patch_id \"$name\" \"$@\" &&\n \tgit checkout same &&\n \tgit format-patch -1 --stdout -O foo-then-bar |\n \t\tcalc_patch_id \"ordered-$name\" \"$@\" &&\n@@ -137,10 +137,10 @@ test_expect_success '--stable overrides patchid.stable = false' '\n '\n \n test_expect_success 'patch-id supports git-format-patch MIME output' '\n-\tget_patch_id master &&\n+\tget_patch_id main &&\n \tgit checkout same &&\n \tgit format-patch -1 --attach --stdout | calc_patch_id same &&\n-\ttest_cmp patch-id_master patch-id_same\n+\ttest_cmp patch-id_main patch-id_same\n '\n \n test_expect_success 'patch-id respects config from subdir' '\ndiff --git a/t/t4207-log-decoration-colors.sh b/t/t4207-log-decoration-colors.sh\nindex 60f040cab8..b6793064dc 100755\n--- a/t/t4207-log-decoration-colors.sh\n+++ b/t/t4207-log-decoration-colors.sh\n@@ -40,13 +40,13 @@ test_expect_success setup '\n \n cat >expected <<EOF\n ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD ->\\\n- ${c_reset}${c_branch}master${c_reset}${c_commit},\\\n+ ${c_reset}${c_branch}main${c_reset}${c_commit},\\\n  ${c_reset}${c_tag}tag: v1.0${c_reset}${c_commit},\\\n  ${c_reset}${c_tag}tag: B${c_reset}${c_commit})${c_reset} B\n ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A1${c_reset}${c_commit},\\\n- ${c_reset}${c_remoteBranch}other/master${c_reset}${c_commit})${c_reset} A1\n+ ${c_reset}${c_remoteBranch}other/main${c_reset}${c_commit})${c_reset} A1\n ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_stash}refs/stash${c_reset}${c_commit})${c_reset}\\\n- On master: Changes to A.t\n+ On main: Changes to A.t\n ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A${c_reset}${c_commit})${c_reset} A\n EOF\n \ndiff --git a/t/t4208-log-magic-pathspec.sh b/t/t4208-log-magic-pathspec.sh\nindex 6cdbe4747a..58b928dbf3 100755\n--- a/t/t4208-log-magic-pathspec.sh\n+++ b/t/t4208-log-magic-pathspec.sh\n@@ -26,7 +26,7 @@ test_expect_success '\"git log :/a -- \" should not be ambiguous' '\n '\n \n test_expect_success '\"git log :/detached -- \" should find a commit only in HEAD' '\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit checkout --detach &&\n \t# Must manually call `test_tick` instead of using `test_commit`,\n \t# because the latter additionally creates a tag, which would make\n@@ -119,7 +119,7 @@ test_expect_success 'command line pathspec parsing for \"git log\"' '\n \tgit checkout HEAD^ &&\n \techo 2 >a &&\n \tgit commit -a -m \"update a to 2\" &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit add a &&\n \tgit log --merge -- a\n '\ndiff --git a/t/t4211/history.export b/t/t4211/history.export\nindex f9f41e211e..006972a1f2 100644\n--- a/t/t4211/history.export\n+++ b/t/t4211/history.export\n@@ -316,7 +316,7 @@ long f(long x)\n \treturn s;\n }\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :19\n author Thomas Rast <trast@student.ethz.ch> 1362045024 +0100\n committer Thomas Rast <trast@student.ethz.ch> 1362045024 +0100\ndiff --git a/t/t4214-log-graph-octopus.sh b/t/t4214-log-graph-octopus.sh\nindex a080325098..d4e07cb0ba 100755\n--- a/t/t4214-log-graph-octopus.sh\n+++ b/t/t4214-log-graph-octopus.sh\n@@ -17,7 +17,7 @@ test_cmp_colored_graph () {\n test_expect_success 'set up merge history' '\n \ttest_commit initial &&\n \tfor i in 1 2 3 4 ; do\n-\t\tgit checkout master -b $i || return $?\n+\t\tgit checkout main -b $i || return $?\n \t\t# Make tag name different from branch name, to avoid\n \t\t# ambiguity error when calling checkout.\n \t\ttest_commit $i $i $i tag$i || return $?\ndiff --git a/t/t4216-log-bloom.sh b/t/t4216-log-bloom.sh\nindex d11040ce41..95a9bae4de 100755\n--- a/t/t4216-log-bloom.sh\n+++ b/t/t4216-log-bloom.sh\n@@ -21,7 +21,7 @@ test_expect_success 'setup test - repo, commits, commit graph, log outputs' '\n \ttest_commit c10 file_to_be_deleted &&\n \tgit checkout -b side HEAD~4 &&\n \ttest_commit side-1 file4 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge side &&\n \ttest_commit c11 file5 &&\n \tmv file5 file5_renamed &&\n@@ -94,7 +94,7 @@ do\n \t\t      \"--topo-order\" \\\n \t\t      \"--date-order\" \\\n \t\t      \"--author-date-order\" \\\n-\t\t      \"--ancestry-path side..master\"\n+\t\t      \"--ancestry-path side..main\"\n \tdo\n \t\ttest_expect_success \"git log option: $option for path: $path\" '\n \t\t\ttest_bloom_filters_used \"$option -- $path\" &&\ndiff --git a/t/t4253-am-keep-cr-dos.sh b/t/t4253-am-keep-cr-dos.sh\nindex 6e1b73ec3a..cf51efa2ee 100755\n--- a/t/t4253-am-keep-cr-dos.sh\n+++ b/t/t4253-am-keep-cr-dos.sh\n@@ -43,7 +43,7 @@ test_expect_success 'setup repository with dos files' '\n \n test_expect_success 'am with dos files without --keep-cr' '\n \tgit checkout -b dosfiles initial &&\n-\tgit format-patch -k initial..master &&\n+\tgit format-patch -k initial..main &&\n \ttest_must_fail git am -k -3 000*.patch &&\n \tgit am --abort &&\n \trm -rf .git/rebase-apply 000*.patch\n@@ -51,23 +51,23 @@ test_expect_success 'am with dos files without --keep-cr' '\n \n test_expect_success 'am with dos files with --keep-cr' '\n \tgit checkout -b dosfiles-keep-cr initial &&\n-\tgit format-patch -k --stdout initial..master >output &&\n+\tgit format-patch -k --stdout initial..main >output &&\n \tgit am --keep-cr -k -3 output &&\n-\tgit diff --exit-code master\n+\tgit diff --exit-code main\n '\n \n test_expect_success 'am with dos files config am.keepcr' '\n \tgit config am.keepcr 1 &&\n \tgit checkout -b dosfiles-conf-keepcr initial &&\n-\tgit format-patch -k --stdout initial..master >output &&\n+\tgit format-patch -k --stdout initial..main >output &&\n \tgit am -k -3 output &&\n-\tgit diff --exit-code master\n+\tgit diff --exit-code main\n '\n \n test_expect_success 'am with dos files config am.keepcr overridden by --no-keep-cr' '\n \tgit config am.keepcr 1 &&\n \tgit checkout -b dosfiles-conf-keepcr-override initial &&\n-\tgit format-patch -k initial..master &&\n+\tgit format-patch -k initial..main &&\n \ttest_must_fail git am -k -3 --no-keep-cr 000*.patch &&\n \tgit am --abort &&\n \trm -rf .git/rebase-apply 000*.patch\n@@ -75,14 +75,14 @@ test_expect_success 'am with dos files config am.keepcr overridden by --no-keep-\n \n test_expect_success 'am with dos files with --keep-cr continue' '\n \tgit checkout -b dosfiles-keep-cr-continue initial &&\n-\tgit format-patch -k initial..master &&\n+\tgit format-patch -k initial..main &&\n \tappend_cr <file1a >file &&\n \tgit commit -m \"different patch\" file &&\n \ttest_must_fail git am --keep-cr -k -3 000*.patch &&\n \tappend_cr <file2 >file &&\n \tgit add file &&\n \tgit am -3 --resolved &&\n-\tgit diff --exit-code master\n+\tgit diff --exit-code main\n '\n \n test_expect_success 'am with unix files config am.keepcr overridden by --no-keep-cr' '\n@@ -90,9 +90,9 @@ test_expect_success 'am with unix files config am.keepcr overridden by --no-keep\n \tgit checkout -b unixfiles-conf-keepcr-override initial &&\n \tcp -f file1 file &&\n \tgit commit -m \"line ending to unix\" file &&\n-\tgit format-patch -k initial..master &&\n+\tgit format-patch -k initial..main &&\n \tgit am -k -3 --no-keep-cr 000*.patch &&\n-\tgit diff --exit-code -w master\n+\tgit diff --exit-code -w main\n '\n \n test_done\ndiff --git a/t/t4257-am-interactive.sh b/t/t4257-am-interactive.sh\nindex 5344bd248a..aed8f4de3d 100755\n--- a/t/t4257-am-interactive.sh\n+++ b/t/t4257-am-interactive.sh\n@@ -10,7 +10,7 @@ test_expect_success 'set up patches to apply' '\n \tgit format-patch --stdout -2 >mbox &&\n \n \tgit reset --hard unrelated &&\n-\ttest_commit conflict-master file master base\n+\ttest_commit conflict-main file main base\n '\n \n # Sanity check our setup.\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 76ab747b53..b783629348 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,13 +257,13 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-3404)\n+3404|4013)\n \t# Avoid conflicts with patch series that are cooking at the same time\n \t# as the patch series changing the default of `init.defaultBranch`.\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-3]*)\n+[0-4]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410107","messageId":"0cf754646e13bcbe117834addbf7d281f66a7955.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 07/27] t3[5-9]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:07Z","receivedAt":"2020-11-17T16:13:01Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t3[5-9]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3500-cherry.sh                   | 12 ++++-----\n t/t3501-revert-cherry-pick.sh       |  4 +--\n t/t3502-cherry-pick-merge.sh        |  2 +-\n t/t3503-cherry-pick-root.sh         | 10 ++++----\n t/t3504-cherry-pick-rerere.sh       | 24 ++++++++---------\n t/t3505-cherry-pick-empty.sh        | 24 ++++++++---------\n t/t3506-cherry-pick-ff.sh           |  8 +++---\n t/t3507-cherry-pick-conflict.sh     |  2 +-\n t/t3508-cherry-pick-many-commits.sh | 38 +++++++++++++--------------\n t/t3509-cherry-pick-merge-df.sh     |  2 +-\n t/t3512-cherry-pick-submodule.sh    |  2 +-\n t/t3600-rm.sh                       | 10 ++++----\n t/t3701-add-interactive.sh          |  4 +--\n t/t3901-i18n-patch.sh               | 40 ++++++++++++++---------------\n t/t3903-stash.sh                    | 32 +++++++++++------------\n t/t3910-mac-os-precompose.sh        |  6 ++---\n t/test-lib.sh                       |  2 +-\n 17 files changed, 111 insertions(+), 111 deletions(-)\n\ndiff --git a/t/t3500-cherry.sh b/t/t3500-cherry.sh\nindex 2b8d9cb38e..2528e773a6 100755\n--- a/t/t3500-cherry.sh\n+++ b/t/t3500-cherry.sh\n@@ -5,7 +5,7 @@\n \n test_description='git cherry should detect patches integrated upstream\n \n-This test cherry-picks one local change of two into master branch, and\n+This test cherry-picks one local change of two into main branch, and\n checks that git cherry only returns the second patch in the local branch\n '\n . ./test-lib.sh\n@@ -32,7 +32,7 @@ test_expect_success \\\n      test_tick &&\n      git commit -m \"Add C.\" &&\n \n-     git checkout -f master &&\n+     git checkout -f main &&\n      rm -f B C &&\n \n      echo Third >> A &&\n@@ -40,19 +40,19 @@ test_expect_success \\\n      test_tick &&\n      git commit -m \"Modify A.\" &&\n \n-     expr \"$(echo $(git cherry master my-topic-branch) )\" : \"+ [^ ]* + .*\"\n+     expr \"$(echo $(git cherry main my-topic-branch) )\" : \"+ [^ ]* + .*\"\n '\n \n test_expect_success \\\n     'check that cherry with limit returns only the top patch'\\\n-    'expr \"$(echo $(git cherry master my-topic-branch my-topic-branch^1) )\" : \"+ [^ ]*\"\n+    'expr \"$(echo $(git cherry main my-topic-branch my-topic-branch^1) )\" : \"+ [^ ]*\"\n '\n \n test_expect_success \\\n     'cherry-pick one of the 2 patches, and check cherry recognized one and only one as new' \\\n     'git cherry-pick my-topic-branch^0 &&\n-     echo $(git cherry master my-topic-branch) &&\n-     expr \"$(echo $(git cherry master my-topic-branch) )\" : \"+ [^ ]* - .*\"\n+     echo $(git cherry main my-topic-branch) &&\n+     expr \"$(echo $(git cherry main my-topic-branch) )\" : \"+ [^ ]* - .*\"\n '\n \n test_expect_success 'cherry ignores whitespace' '\ndiff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh\nindex 3669dfb1be..0adfdb4b6c 100755\n--- a/t/t3501-revert-cherry-pick.sh\n+++ b/t/t3501-revert-cherry-pick.sh\n@@ -112,7 +112,7 @@ test_expect_success 'cherry-pick on unborn branch' '\n test_expect_success 'cherry-pick \"-\" to pick from previous branch' '\n \tgit checkout unborn &&\n \ttest_commit to-pick actual content &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit cherry-pick - &&\n \techo content >expect &&\n \ttest_cmp expect actual\n@@ -132,7 +132,7 @@ test_expect_success 'cherry-pick \"-\" is meaningless without checkout' '\n test_expect_success 'cherry-pick \"-\" works with arguments' '\n \tgit checkout -b side-branch &&\n \ttest_commit change actual change &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit cherry-pick -s - &&\n \techo \"Signed-off-by: C O Mitter <committer@example.com>\" >expect &&\n \tgit cat-file commit HEAD | grep ^Signed-off-by: >signoff &&\ndiff --git a/t/t3502-cherry-pick-merge.sh b/t/t3502-cherry-pick-merge.sh\nindex 8b635a196d..4d6ff14eb6 100755\n--- a/t/t3502-cherry-pick-merge.sh\n+++ b/t/t3502-cherry-pick-merge.sh\n@@ -25,7 +25,7 @@ test_expect_success setup '\n \techo new line >B &&\n \tgit commit -m \"add line to B\" B &&\n \tgit tag b &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge side &&\n \tgit tag c\n \ndiff --git a/t/t3503-cherry-pick-root.sh b/t/t3503-cherry-pick-root.sh\nindex e27f39d1e5..59496a56b7 100755\n--- a/t/t3503-cherry-pick-root.sh\n+++ b/t/t3503-cherry-pick-root.sh\n@@ -30,7 +30,7 @@ test_expect_success setup '\n test_expect_success 'cherry-pick a root commit' '\n \n \tgit checkout second^0 &&\n-\tgit cherry-pick master &&\n+\tgit cherry-pick main &&\n \techo first >expect &&\n \ttest_cmp expect file1\n \n@@ -38,14 +38,14 @@ test_expect_success 'cherry-pick a root commit' '\n \n test_expect_success 'revert a root commit' '\n \n-\tgit revert master &&\n+\tgit revert main &&\n \ttest_path_is_missing file1\n \n '\n \n test_expect_success 'cherry-pick a root commit with an external strategy' '\n \n-\tgit cherry-pick --strategy=resolve master &&\n+\tgit cherry-pick --strategy=resolve main &&\n \techo first >expect &&\n \ttest_cmp expect file1\n \n@@ -53,7 +53,7 @@ test_expect_success 'cherry-pick a root commit with an external strategy' '\n \n test_expect_success 'revert a root commit with an external strategy' '\n \n-\tgit revert --strategy=resolve master &&\n+\tgit revert --strategy=resolve main &&\n \ttest_path_is_missing file1\n \n '\n@@ -65,7 +65,7 @@ test_expect_success 'cherry-pick two root commits' '\n \techo third >expect.file3 &&\n \n \tgit checkout second^0 &&\n-\tgit cherry-pick master third &&\n+\tgit cherry-pick main third &&\n \n \ttest_cmp expect.file1 file1 &&\n \ttest_cmp expect.file2 file2 &&\ndiff --git a/t/t3504-cherry-pick-rerere.sh b/t/t3504-cherry-pick-rerere.sh\nindex 80a0d08706..3804527e2e 100755\n--- a/t/t3504-cherry-pick-rerere.sh\n+++ b/t/t3504-cherry-pick-rerere.sh\n@@ -6,8 +6,8 @@ test_description='cherry-pick should rerere for conflicts'\n \n test_expect_success setup '\n \ttest_commit foo &&\n-\ttest_commit foo-master foo &&\n-\ttest_commit bar-master bar &&\n+\ttest_commit foo-main foo &&\n+\ttest_commit bar-main bar &&\n \n \tgit checkout -b dev foo &&\n \ttest_commit foo-dev foo &&\n@@ -16,7 +16,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'conflicting merge' '\n-\ttest_must_fail git merge master\n+\ttest_must_fail git merge main\n '\n \n test_expect_success 'fixup' '\n@@ -29,7 +29,7 @@ test_expect_success 'fixup' '\n '\n \n test_expect_success 'cherry-pick conflict with --rerere-autoupdate' '\n-\ttest_must_fail git cherry-pick --rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --rerere-autoupdate foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \tgit diff-files --quiet &&\n \ttest_must_fail git cherry-pick --continue &&\n@@ -41,7 +41,7 @@ test_expect_success 'cherry-pick conflict with --rerere-autoupdate' '\n \n test_expect_success 'cherry-pick conflict repsects rerere.autoUpdate' '\n \ttest_config rerere.autoUpdate true &&\n-\ttest_must_fail git cherry-pick foo..bar-master &&\n+\ttest_must_fail git cherry-pick foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \tgit diff-files --quiet &&\n \ttest_must_fail git cherry-pick --continue &&\n@@ -53,7 +53,7 @@ test_expect_success 'cherry-pick conflict repsects rerere.autoUpdate' '\n \n test_expect_success 'cherry-pick conflict with --no-rerere-autoupdate' '\n \ttest_config rerere.autoUpdate true &&\n-\ttest_must_fail git cherry-pick --no-rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --no-rerere-autoupdate foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \ttest_must_fail git diff-files --quiet &&\n \tgit add foo &&\n@@ -66,7 +66,7 @@ test_expect_success 'cherry-pick conflict with --no-rerere-autoupdate' '\n '\n \n test_expect_success 'cherry-pick --continue rejects --rerere-autoupdate' '\n-\ttest_must_fail git cherry-pick --rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --rerere-autoupdate foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \tgit diff-files --quiet &&\n \ttest_must_fail git cherry-pick --continue --rerere-autoupdate >actual 2>&1 &&\n@@ -79,25 +79,25 @@ test_expect_success 'cherry-pick --continue rejects --rerere-autoupdate' '\n '\n \n test_expect_success 'cherry-pick --rerere-autoupdate more than once' '\n-\ttest_must_fail git cherry-pick --rerere-autoupdate --rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --rerere-autoupdate --rerere-autoupdate foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \tgit diff-files --quiet &&\n \tgit cherry-pick --abort &&\n-\ttest_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \tgit diff-files --quiet &&\n \tgit cherry-pick --abort &&\n-\ttest_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate foo..bar-main &&\n \ttest_must_fail git diff-files --quiet &&\n \tgit cherry-pick --abort\n '\n \n test_expect_success 'cherry-pick conflict without rerere' '\n \ttest_config rerere.enabled false &&\n-\ttest_must_fail git cherry-pick foo-master &&\n+\ttest_must_fail git cherry-pick foo-main &&\n \tgrep ===== foo &&\n \tgrep foo-dev foo &&\n-\tgrep foo-master foo\n+\tgrep foo-main foo\n '\n \n test_done\ndiff --git a/t/t3505-cherry-pick-empty.sh b/t/t3505-cherry-pick-empty.sh\nindex 5f911bb529..07419a4e4a 100755\n--- a/t/t3505-cherry-pick-empty.sh\n+++ b/t/t3505-cherry-pick-empty.sh\n@@ -17,7 +17,7 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit --allow-empty-message -m \"\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -b empty-change-branch &&\n \ttest_tick &&\n \tgit commit --allow-empty -m \"empty\"\n@@ -25,7 +25,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'cherry-pick an empty commit' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_expect_code 1 git cherry-pick empty-change-branch\n '\n \n@@ -35,7 +35,7 @@ test_expect_success 'index lockfile was removed' '\n \n test_expect_success 'cherry-pick a commit with an empty message' '\n \ttest_when_finished \"git reset --hard empty-message-branch~1\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit cherry-pick empty-message-branch\n '\n \n@@ -44,12 +44,12 @@ test_expect_success 'index lockfile was removed' '\n '\n \n test_expect_success 'cherry-pick a commit with an empty message with --allow-empty-message' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit cherry-pick --allow-empty-message empty-message-branch\n '\n \n test_expect_success 'cherry pick an empty non-ff commit without --allow-empty' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo fourth >>file2 &&\n \tgit add file2 &&\n \tgit commit -m \"fourth\" &&\n@@ -57,22 +57,22 @@ test_expect_success 'cherry pick an empty non-ff commit without --allow-empty' '\n '\n \n test_expect_success 'cherry pick an empty non-ff commit with --allow-empty' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit cherry-pick --allow-empty empty-change-branch\n '\n \n test_expect_success 'cherry pick with --keep-redundant-commits' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit cherry-pick --keep-redundant-commits HEAD^\n '\n \n test_expect_success 'cherry-pick a commit that becomes no-op (prep)' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch fork &&\n \techo foo >file2 &&\n \tgit add file2 &&\n \ttest_tick &&\n-\tgit commit -m \"add file2 on master\" &&\n+\tgit commit -m \"add file2 on main\" &&\n \n \tgit checkout fork &&\n \techo foo >file2 &&\n@@ -84,15 +84,15 @@ test_expect_success 'cherry-pick a commit that becomes no-op (prep)' '\n test_expect_success 'cherry-pick a no-op without --keep-redundant' '\n \tgit reset --hard &&\n \tgit checkout fork^0 &&\n-\ttest_must_fail git cherry-pick master\n+\ttest_must_fail git cherry-pick main\n '\n \n test_expect_success 'cherry-pick a no-op with --keep-redundant' '\n \tgit reset --hard &&\n \tgit checkout fork^0 &&\n-\tgit cherry-pick --keep-redundant-commits master &&\n+\tgit cherry-pick --keep-redundant-commits main &&\n \tgit show -s --format=%s >actual &&\n-\techo \"add file2 on master\" >expect &&\n+\techo \"add file2 on main\" >expect &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t3506-cherry-pick-ff.sh b/t/t3506-cherry-pick-ff.sh\nindex 9d5adbc130..08b461dfcf 100755\n--- a/t/t3506-cherry-pick-ff.sh\n+++ b/t/t3506-cherry-pick-ff.sh\n@@ -24,7 +24,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'cherry-pick using --ff fast forwards' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick --ff second &&\n@@ -32,7 +32,7 @@ test_expect_success 'cherry-pick using --ff fast forwards' '\n '\n \n test_expect_success 'cherry-pick not using --ff does not fast forwards' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick second &&\n@@ -49,7 +49,7 @@ test_expect_success 'cherry-pick not using --ff does not fast forwards' '\n # (This has been taken from t3502-cherry-pick-merge.sh)\n #\n test_expect_success 'merge setup' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard first &&\n \techo new line >A &&\n \tgit add A &&\n@@ -62,7 +62,7 @@ test_expect_success 'merge setup' '\n \ttest_tick &&\n \tgit commit -m \"add line to B\" B &&\n \tgit tag B &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge side &&\n \tgit tag C &&\n \tgit checkout -b new A\ndiff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh\nindex a21adcf0e4..e0f77ba6ad 100755\n--- a/t/t3507-cherry-pick-conflict.sh\n+++ b/t/t3507-cherry-pick-conflict.sh\n@@ -29,7 +29,7 @@ test_expect_success setup '\n \ttest_commit redundant-pick foo c redundant &&\n \tgit commit --allow-empty --allow-empty-message &&\n \tgit tag empty &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config advice.detachedhead false\n \n '\ndiff --git a/t/t3508-cherry-pick-many-commits.sh b/t/t3508-cherry-pick-many-commits.sh\nindex 23070a7b73..bdb995235f 100755\n--- a/t/t3508-cherry-pick-many-commits.sh\n+++ b/t/t3508-cherry-pick-many-commits.sh\n@@ -31,7 +31,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'cherry-pick first..fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick first..fourth &&\n@@ -45,7 +45,7 @@ test_expect_success 'cherry-pick three one two works' '\n \ttest_commit one &&\n \ttest_commit two &&\n \ttest_commit three &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \tgit cherry-pick three one two &&\n \tgit diff --quiet three &&\n@@ -56,28 +56,28 @@ two\"\n '\n \n test_expect_success 'cherry-pick three one two: fails' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_must_fail git cherry-pick three one two:\n '\n \n test_expect_success 'output to keep user entertained during multi-pick' '\n \tcat <<-\\EOF >expected &&\n-\t[master OBJID] second\n+\t[main OBJID] second\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:14:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n-\t[master OBJID] third\n+\t[main OBJID] third\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:15:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n-\t[master OBJID] fourth\n+\t[main OBJID] fourth\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:16:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n \tEOF\n \n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick first..fourth >actual &&\n@@ -87,7 +87,7 @@ test_expect_success 'output to keep user entertained during multi-pick' '\n '\n \n test_expect_success 'cherry-pick --strategy resolve first..fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick --strategy resolve first..fourth &&\n@@ -99,23 +99,23 @@ test_expect_success 'cherry-pick --strategy resolve first..fourth works' '\n test_expect_success 'output during multi-pick indicates merge strategy' '\n \tcat <<-\\EOF >expected &&\n \tTrying simple merge.\n-\t[master OBJID] second\n+\t[main OBJID] second\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:14:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n \tTrying simple merge.\n-\t[master OBJID] third\n+\t[main OBJID] third\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:15:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n \tTrying simple merge.\n-\t[master OBJID] fourth\n+\t[main OBJID] fourth\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:16:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n \tEOF\n \n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick --strategy resolve first..fourth >actual &&\n@@ -124,7 +124,7 @@ test_expect_success 'output during multi-pick indicates merge strategy' '\n '\n \n test_expect_success 'cherry-pick --ff first..fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick --ff first..fourth &&\n@@ -134,7 +134,7 @@ test_expect_success 'cherry-pick --ff first..fourth works' '\n '\n \n test_expect_success 'cherry-pick -n first..fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick -n first..fourth &&\n@@ -144,7 +144,7 @@ test_expect_success 'cherry-pick -n first..fourth works' '\n '\n \n test_expect_success 'revert first..fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard fourth &&\n \ttest_tick &&\n \tgit revert first..fourth &&\n@@ -154,7 +154,7 @@ test_expect_success 'revert first..fourth works' '\n '\n \n test_expect_success 'revert ^first fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard fourth &&\n \ttest_tick &&\n \tgit revert ^first fourth &&\n@@ -164,7 +164,7 @@ test_expect_success 'revert ^first fourth works' '\n '\n \n test_expect_success 'revert fourth fourth~1 fourth~2 works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard fourth &&\n \ttest_tick &&\n \tgit revert fourth fourth~1 fourth~2 &&\n@@ -174,7 +174,7 @@ test_expect_success 'revert fourth fourth~1 fourth~2 works' '\n '\n \n test_expect_success 'cherry-pick -3 fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick -3 fourth &&\n@@ -184,7 +184,7 @@ test_expect_success 'cherry-pick -3 fourth works' '\n '\n \n test_expect_success 'cherry-pick --stdin works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit rev-list --reverse first..fourth | git cherry-pick --stdin &&\ndiff --git a/t/t3509-cherry-pick-merge-df.sh b/t/t3509-cherry-pick-merge-df.sh\nindex 1e5b3948df..dfc5e9f914 100755\n--- a/t/t3509-cherry-pick-merge-df.sh\n+++ b/t/t3509-cherry-pick-merge-df.sh\n@@ -28,7 +28,7 @@ test_expect_success 'Setup rename across paths each below D/F conflicts' '\n \n test_expect_success 'Cherry-pick succeeds with rename across D/F conflicts' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit cherry-pick branch\n '\n \ndiff --git a/t/t3512-cherry-pick-submodule.sh b/t/t3512-cherry-pick-submodule.sh\nindex 6ece1d8573..ec09d7d8a8 100755\n--- a/t/t3512-cherry-pick-submodule.sh\n+++ b/t/t3512-cherry-pick-submodule.sh\n@@ -35,7 +35,7 @@ test_expect_success 'unrelated submodule/file conflict is ignored' '\n \t\tgit add a_file &&\n \t\tgit commit -m \"modify a file\" &&\n \n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \n \t\tgit submodule add ../sub sub &&\n \t\tgit submodule update sub &&\ndiff --git a/t/t3600-rm.sh b/t/t3600-rm.sh\nindex efec8d13b6..243087d9c6 100755\n--- a/t/t3600-rm.sh\n+++ b/t/t3600-rm.sh\n@@ -483,16 +483,16 @@ test_expect_success 'setup submodule conflict' '\n \techo 1 >nitfol &&\n \tgit add nitfol &&\n \tgit commit -m \"added nitfol 1\" &&\n-\tgit checkout -b branch2 master &&\n+\tgit checkout -b branch2 main &&\n \techo 2 >nitfol &&\n \tgit add nitfol &&\n \tgit commit -m \"added nitfol 2\" &&\n-\tgit checkout -b conflict1 master &&\n+\tgit checkout -b conflict1 main &&\n \tgit -C submod fetch &&\n \tgit -C submod checkout branch1 &&\n \tgit add submod &&\n \tgit commit -m \"submod 1\" &&\n-\tgit checkout -b conflict2 master &&\n+\tgit checkout -b conflict2 main &&\n \tgit -C submod checkout branch2 &&\n \tgit add submod &&\n \tgit commit -m \"submod 2\"\n@@ -604,7 +604,7 @@ test_expect_success 'rm of a conflicted unpopulated submodule succeeds' '\n '\n \n test_expect_success 'rm of a populated submodule with a .git directory migrates git dir' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard &&\n \tgit submodule update &&\n \t(\n@@ -717,7 +717,7 @@ test_expect_success 'checking out a commit after submodule removal needs manual\n \tgit checkout HEAD^ &&\n \tgit submodule update &&\n \tgit checkout -q HEAD^ &&\n-\tgit checkout -q master 2>actual &&\n+\tgit checkout -q main 2>actual &&\n \ttest_i18ngrep \"^warning: unable to rmdir '\\''submod'\\'':\" actual &&\n \tgit status -s submod >actual &&\n \techo \"?? submod/\" >expected &&\ndiff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh\nindex ca04fac417..4abaa9be02 100755\n--- a/t/t3701-add-interactive.sh\n+++ b/t/t3701-add-interactive.sh\n@@ -549,8 +549,8 @@ test_expect_success 'patch mode ignores unmerged entries' '\n \ttest_commit non-conflict &&\n \tgit checkout -b side &&\n \ttest_commit side conflict.t &&\n-\tgit checkout master &&\n-\ttest_commit master conflict.t &&\n+\tgit checkout main &&\n+\ttest_commit main conflict.t &&\n \ttest_must_fail git merge side &&\n \techo changed >non-conflict.t &&\n \techo y | git add -p >output &&\ndiff --git a/t/t3901-i18n-patch.sh b/t/t3901-i18n-patch.sh\nindex 923eb01f0e..6a96959e06 100755\n--- a/t/t3901-i18n-patch.sh\n+++ b/t/t3901-i18n-patch.sh\n@@ -45,7 +45,7 @@ test_expect_success setup '\n \n \t# the first commit on the side branch is UTF-8\n \ttest_tick &&\n-\tgit checkout -b side master^ &&\n+\tgit checkout -b side main^ &&\n \techo Another file >yours &&\n \tgit add yours &&\n \tgit commit -s -m \"Second on side\" &&\n@@ -69,7 +69,7 @@ test_expect_success setup '\n test_expect_success 'format-patch output (ISO-8859-1)' '\n \tgit config i18n.logoutputencoding ISO8859-1 &&\n \n-\tgit format-patch --stdout master..HEAD^ >out-l1 &&\n+\tgit format-patch --stdout main..HEAD^ >out-l1 &&\n \tgit format-patch --stdout HEAD^ >out-l2 &&\n \tgrep \"^Content-Type: text/plain; charset=ISO8859-1\" out-l1 &&\n \tgrep \"^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=\" out-l1 &&\n@@ -80,7 +80,7 @@ test_expect_success 'format-patch output (ISO-8859-1)' '\n test_expect_success 'format-patch output (UTF-8)' '\n \tgit config i18n.logoutputencoding UTF-8 &&\n \n-\tgit format-patch --stdout master..HEAD^ >out-u1 &&\n+\tgit format-patch --stdout main..HEAD^ >out-u1 &&\n \tgit format-patch --stdout HEAD^ >out-u2 &&\n \tgrep \"^Content-Type: text/plain; charset=UTF-8\" out-u1 &&\n \tgrep \"^From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?=\" out-u1 &&\n@@ -102,7 +102,7 @@ test_expect_success 'rebase (U/U)' '\n \t# we want UTF-8 encoded name.\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \tgit checkout -b test &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \n \tcheck_encoding 2\n '\n@@ -113,7 +113,7 @@ test_expect_success 'rebase (U/L)' '\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \n \tcheck_encoding 2\n '\n@@ -125,7 +125,7 @@ test_expect_success !MINGW 'rebase (L/L)' '\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \n \tcheck_encoding 2 8859\n '\n@@ -138,7 +138,7 @@ test_expect_success !MINGW 'rebase (L/U)' '\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \n \tcheck_encoding 2 8859\n '\n@@ -150,7 +150,7 @@ test_expect_success 'cherry-pick(U/U)' '\n \tgit config i18n.logoutputencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit cherry-pick side^ &&\n \tgit cherry-pick side &&\n \tgit revert HEAD &&\n@@ -165,7 +165,7 @@ test_expect_success !MINGW 'cherry-pick(L/L)' '\n \tgit config i18n.logoutputencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit cherry-pick side^ &&\n \tgit cherry-pick side &&\n \tgit revert HEAD &&\n@@ -180,7 +180,7 @@ test_expect_success 'cherry-pick(U/L)' '\n \tgit config i18n.logoutputencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit cherry-pick side^ &&\n \tgit cherry-pick side &&\n \tgit revert HEAD &&\n@@ -196,7 +196,7 @@ test_expect_success !MINGW 'cherry-pick(L/U)' '\n \tgit config i18n.logoutputencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit cherry-pick side^ &&\n \tgit cherry-pick side &&\n \tgit revert HEAD &&\n@@ -210,7 +210,7 @@ test_expect_success 'rebase --merge (U/U)' '\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase --merge master &&\n+\tgit rebase --merge main &&\n \n \tcheck_encoding 2\n '\n@@ -221,7 +221,7 @@ test_expect_success 'rebase --merge (U/L)' '\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase --merge master &&\n+\tgit rebase --merge main &&\n \n \tcheck_encoding 2\n '\n@@ -233,7 +233,7 @@ test_expect_success 'rebase --merge (L/L)' '\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase --merge master &&\n+\tgit rebase --merge main &&\n \n \tcheck_encoding 2 8859\n '\n@@ -246,7 +246,7 @@ test_expect_success 'rebase --merge (L/U)' '\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase --merge master &&\n+\tgit rebase --merge main &&\n \n \tcheck_encoding 2 8859\n '\n@@ -256,7 +256,7 @@ test_expect_success 'am (U/U)' '\n \tgit config i18n.commitencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit am out-u1 out-u2 &&\n \n \tcheck_encoding 2\n@@ -267,7 +267,7 @@ test_expect_success !MINGW 'am (L/L)' '\n \tgit config i18n.commitencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit am out-l1 out-l2 &&\n \n \tcheck_encoding 2 8859\n@@ -277,7 +277,7 @@ test_expect_success 'am (U/L)' '\n \t# Apply ISO-8859-1 patches with UTF-8 commitencoding\n \tgit config i18n.commitencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \n \t# am specifies --utf8 by default.\n \tgit am out-l1 out-l2 &&\n@@ -290,7 +290,7 @@ test_expect_success 'am --no-utf8 (U/L)' '\n \tgit config i18n.commitencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit am --no-utf8 out-l1 out-l2 2>err &&\n \n \t# commit-tree will warn that the commit message does not contain valid UTF-8\n@@ -305,7 +305,7 @@ test_expect_success !MINGW 'am (L/U)' '\n \tgit config i18n.commitencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \t# mailinfo will re-code the commit message to the charset specified by\n \t# i18n.commitencoding\n \tgit am out-u1 out-u2 &&\ndiff --git a/t/t3903-stash.sh b/t/t3903-stash.sh\nindex 9f7ca98967..97374f393a 100755\n--- a/t/t3903-stash.sh\n+++ b/t/t3903-stash.sh\n@@ -220,14 +220,14 @@ test_expect_success 'stash branch' '\n \tgit commit file -m second &&\n \tgit stash branch stashbranch &&\n \ttest refs/heads/stashbranch = $(git symbolic-ref HEAD) &&\n-\ttest $(git rev-parse HEAD) = $(git rev-parse master^) &&\n+\ttest $(git rev-parse HEAD) = $(git rev-parse main^) &&\n \tgit diff --cached >output &&\n \tdiff_cmp expect output &&\n \tgit diff >output &&\n \tdiff_cmp expect1 output &&\n \tgit add file &&\n \tgit commit -m alternate\\ second &&\n-\tgit diff master..stashbranch >output &&\n+\tgit diff main..stashbranch >output &&\n \tdiff_cmp output expect2 &&\n \ttest 0 = $(git stash list | wc -l)\n '\n@@ -520,7 +520,7 @@ test_expect_success 'stash branch - no stashes on stack, stash-like argument' '\n \tSTASH_ID=$(git stash create) &&\n \tgit reset --hard &&\n \tgit stash branch stash-branch ${STASH_ID} &&\n-\ttest_when_finished \"git reset --hard HEAD && git checkout master &&\n+\ttest_when_finished \"git reset --hard HEAD && git checkout main &&\n \tgit branch -D stash-branch\" &&\n \ttest $(git ls-files --modified | wc -l) -eq 1\n '\n@@ -536,7 +536,7 @@ test_expect_success 'stash branch - stashes on stack, stash-like argument' '\n \tSTASH_ID=$(git stash create) &&\n \tgit reset --hard &&\n \tgit stash branch stash-branch ${STASH_ID} &&\n-\ttest_when_finished \"git reset --hard HEAD && git checkout master &&\n+\ttest_when_finished \"git reset --hard HEAD && git checkout main &&\n \tgit branch -D stash-branch\" &&\n \ttest $(git ls-files --modified | wc -l) -eq 1\n '\n@@ -738,7 +738,7 @@ test_expect_success 'valid ref of the form \"n\", n < N' '\n \tgit stash &&\n \tgit stash show 0 &&\n \tgit stash branch tmp 0 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit stash &&\n \tgit stash apply 0 &&\n \tgit reset --hard &&\n@@ -755,7 +755,7 @@ test_expect_success 'branch: do not drop the stash if the branch exists' '\n \tgit commit -m initial &&\n \techo bar >file &&\n \tgit stash &&\n-\ttest_must_fail git stash branch master stash@{0} &&\n+\ttest_must_fail git stash branch main stash@{0} &&\n \tgit rev-parse stash@{0} --\n '\n \n@@ -768,7 +768,7 @@ test_expect_success 'branch: should not drop the stash if the apply fails' '\n \techo bar >file &&\n \tgit stash &&\n \techo baz >file &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_must_fail git stash branch new_branch stash@{0} &&\n \tgit rev-parse stash@{0} --\n '\n@@ -902,7 +902,7 @@ test_expect_success 'push -m shows right message' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push -m \"test message\" &&\n-\techo \"stash@{0}: On master: test message\" >expect &&\n+\techo \"stash@{0}: On main: test message\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -911,7 +911,7 @@ test_expect_success 'push -m also works without space' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push -m\"unspaced test message\" &&\n-\techo \"stash@{0}: On master: unspaced test message\" >expect &&\n+\techo \"stash@{0}: On main: unspaced test message\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -968,7 +968,7 @@ test_expect_success 'push -mfoo uses right message' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push -m\"test mfoo\" &&\n-\techo \"stash@{0}: On master: test mfoo\" >expect &&\n+\techo \"stash@{0}: On main: test mfoo\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -977,7 +977,7 @@ test_expect_success 'push --message foo is synonym for -mfoo' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push --message \"test message foo\" &&\n-\techo \"stash@{0}: On master: test message foo\" >expect &&\n+\techo \"stash@{0}: On main: test message foo\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -986,7 +986,7 @@ test_expect_success 'push --message=foo is synonym for -mfoo' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push --message=\"test message=foo\" &&\n-\techo \"stash@{0}: On master: test message=foo\" >expect &&\n+\techo \"stash@{0}: On main: test message=foo\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -995,7 +995,7 @@ test_expect_success 'push -m shows right message' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push -m \"test m foo\" &&\n-\techo \"stash@{0}: On master: test m foo\" >expect &&\n+\techo \"stash@{0}: On main: test m foo\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -1004,7 +1004,7 @@ test_expect_success 'create stores correct message' '\n \t>foo &&\n \tgit add foo &&\n \tSTASH_ID=$(git stash create \"create test message\") &&\n-\techo \"On master: create test message\" >expect &&\n+\techo \"On main: create test message\" >expect &&\n \tgit show --pretty=%s -s ${STASH_ID} >actual &&\n \ttest_cmp expect actual\n '\n@@ -1013,13 +1013,13 @@ test_expect_success 'create with multiple arguments for the message' '\n \t>foo &&\n \tgit add foo &&\n \tSTASH_ID=$(git stash create test untracked) &&\n-\techo \"On master: test untracked\" >expect &&\n+\techo \"On main: test untracked\" >expect &&\n \tgit show --pretty=%s -s ${STASH_ID} >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'create in a detached state' '\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit checkout HEAD~1 &&\n \t>foo &&\n \tgit add foo &&\ndiff --git a/t/t3910-mac-os-precompose.sh b/t/t3910-mac-os-precompose.sh\nindex 54ce19e353..7e03823537 100755\n--- a/t/t3910-mac-os-precompose.sh\n+++ b/t/t3910-mac-os-precompose.sh\n@@ -151,7 +151,7 @@ test_expect_success \"git checkout link nfd\" '\n \tgit checkout l.$Odiarnfd\n '\n test_expect_success \"setup case mac2\" '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard &&\n \tgit checkout -b mac_os_2\n '\n@@ -163,7 +163,7 @@ test_expect_success \"commit file d2.Adiarnfd/f.Adiarnfd\" '\n \tgit commit -m \"add d2.$Adiarnfd/f.$Adiarnfd\" -- d2.$Adiarnfd/f.$Adiarnfd\n '\n test_expect_success \"setup for long decomposed filename\" '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard &&\n \tgit checkout -b mac_os_long_nfd_fn\n '\n@@ -173,7 +173,7 @@ test_expect_success \"Add long decomposed filename\" '\n \tgit commit -m \"Long filename\"\n '\n test_expect_success \"setup for long precomposed filename\" '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard &&\n \tgit checkout -b mac_os_long_nfc_fn\n '\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 4ae87a5c4e..76ab747b53 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-2]*|3[0-4]*)\n+[0-3]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410112","messageId":"b7333ef2012b2bdfc03054c8ad2cc7222cb6aaae.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 13/27] t551*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:13Z","receivedAt":"2020-11-17T16:13:01Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t551*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5510-fetch.sh             | 158 +++++------\n t/t5511-refspec.sh           |  12 +-\n t/t5512-ls-remote.sh         |  26 +-\n t/t5514-fetch-multiple.sh    |  30 +--\n t/t5516-fetch-push.sh        | 500 +++++++++++++++++------------------\n t/t5517-push-mirror.sh       | 124 ++++-----\n t/t5518-fetch-exit-status.sh |   6 +-\n t/t5519-push-alternates.sh   |  12 +-\n t/test-lib.sh                |   2 +-\n 9 files changed, 435 insertions(+), 435 deletions(-)\n\ndiff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh\nindex 5d673358f9..206e3be695 100755\n--- a/t/t5510-fetch.sh\n+++ b/t/t5510-fetch.sh\n@@ -37,19 +37,19 @@ test_expect_success \"clone and setup child repos\" '\n \tgit clone . two &&\n \t(\n \t\tcd two &&\n-\t\tgit config branch.master.remote one &&\n+\t\tgit config branch.main.remote one &&\n \t\tgit config remote.one.url ../one/.git/ &&\n-\t\tgit config remote.one.fetch refs/heads/master:refs/heads/one\n+\t\tgit config remote.one.fetch refs/heads/main:refs/heads/one\n \t) &&\n \tgit clone . three &&\n \t(\n \t\tcd three &&\n-\t\tgit config branch.master.remote two &&\n-\t\tgit config branch.master.merge refs/heads/one &&\n+\t\tgit config branch.main.remote two &&\n+\t\tgit config branch.main.merge refs/heads/one &&\n \t\tmkdir -p .git/remotes &&\n \t\t{\n \t\t\techo \"URL: ../two/.git/\"\n-\t\t\techo \"Pull: refs/heads/master:refs/heads/two\"\n+\t\t\techo \"Pull: refs/heads/main:refs/heads/two\"\n \t\t\techo \"Pull: refs/heads/one:refs/heads/one\"\n \t\t} >.git/remotes/two\n \t) &&\n@@ -65,7 +65,7 @@ test_expect_success \"fetch test\" '\n \tgit fetch &&\n \tgit rev-parse --verify refs/heads/one &&\n \tmine=$(git rev-parse refs/heads/one) &&\n-\this=$(cd ../one && git rev-parse refs/heads/master) &&\n+\this=$(cd ../one && git rev-parse refs/heads/main) &&\n \ttest \"z$mine\" = \"z$his\"\n '\n \n@@ -75,11 +75,11 @@ test_expect_success \"fetch test for-merge\" '\n \tgit fetch &&\n \tgit rev-parse --verify refs/heads/two &&\n \tgit rev-parse --verify refs/heads/one &&\n-\tmaster_in_two=$(cd ../two && git rev-parse master) &&\n+\tmain_in_two=$(cd ../two && git rev-parse main) &&\n \tone_in_two=$(cd ../two && git rev-parse one) &&\n \t{\n \t\techo \"$one_in_two\t\"\n-\t\techo \"$master_in_two\tnot-for-merge\"\n+\t\techo \"$main_in_two\tnot-for-merge\"\n \t} >expected &&\n \tcut -f -2 .git/FETCH_HEAD >actual &&\n \ttest_cmp expected actual'\n@@ -88,7 +88,7 @@ test_expect_success 'fetch --prune on its own works as expected' '\n \tcd \"$D\" &&\n \tgit clone . prune &&\n \tcd prune &&\n-\tgit update-ref refs/remotes/origin/extrabranch master &&\n+\tgit update-ref refs/remotes/origin/extrabranch main &&\n \n \tgit fetch --prune origin &&\n \ttest_must_fail git rev-parse origin/extrabranch\n@@ -98,9 +98,9 @@ test_expect_success 'fetch --prune with a branch name keeps branches' '\n \tcd \"$D\" &&\n \tgit clone . prune-branch &&\n \tcd prune-branch &&\n-\tgit update-ref refs/remotes/origin/extrabranch master &&\n+\tgit update-ref refs/remotes/origin/extrabranch main &&\n \n-\tgit fetch --prune origin master &&\n+\tgit fetch --prune origin main &&\n \tgit rev-parse origin/extrabranch\n '\n \n@@ -110,18 +110,18 @@ test_expect_success 'fetch --prune with a namespace keeps other namespaces' '\n \tcd prune-namespace &&\n \n \tgit fetch --prune origin refs/heads/a/*:refs/remotes/origin/a/* &&\n-\tgit rev-parse origin/master\n+\tgit rev-parse origin/main\n '\n \n test_expect_success 'fetch --prune handles overlapping refspecs' '\n \tcd \"$D\" &&\n-\tgit update-ref refs/pull/42/head master &&\n+\tgit update-ref refs/pull/42/head main &&\n \tgit clone . prune-overlapping &&\n \tcd prune-overlapping &&\n \tgit config --add remote.origin.fetch refs/pull/*/head:refs/remotes/origin/pr/* &&\n \n \tgit fetch --prune origin &&\n-\tgit rev-parse origin/master &&\n+\tgit rev-parse origin/main &&\n \tgit rev-parse origin/pr/42 &&\n \n \tgit config --unset-all remote.origin.fetch &&\n@@ -129,7 +129,7 @@ test_expect_success 'fetch --prune handles overlapping refspecs' '\n \tgit config --add remote.origin.fetch refs/heads/*:refs/remotes/origin/* &&\n \n \tgit fetch --prune origin &&\n-\tgit rev-parse origin/master &&\n+\tgit rev-parse origin/main &&\n \tgit rev-parse origin/pr/42\n '\n \n@@ -137,13 +137,13 @@ test_expect_success 'fetch --prune --tags prunes branches but not tags' '\n \tcd \"$D\" &&\n \tgit clone . prune-tags &&\n \tcd prune-tags &&\n-\tgit tag sometag master &&\n+\tgit tag sometag main &&\n \t# Create what looks like a remote-tracking branch from an earlier\n \t# fetch that has since been deleted from the remote:\n-\tgit update-ref refs/remotes/origin/fake-remote master &&\n+\tgit update-ref refs/remotes/origin/fake-remote main &&\n \n \tgit fetch --prune --tags origin &&\n-\tgit rev-parse origin/master &&\n+\tgit rev-parse origin/main &&\n \ttest_must_fail git rev-parse origin/fake-remote &&\n \tgit rev-parse sometag\n '\n@@ -152,10 +152,10 @@ test_expect_success 'fetch --prune --tags with branch does not prune other thing\n \tcd \"$D\" &&\n \tgit clone . prune-tags-branch &&\n \tcd prune-tags-branch &&\n-\tgit tag sometag master &&\n-\tgit update-ref refs/remotes/origin/extrabranch master &&\n+\tgit tag sometag main &&\n+\tgit update-ref refs/remotes/origin/extrabranch main &&\n \n-\tgit fetch --prune --tags origin master &&\n+\tgit fetch --prune --tags origin main &&\n \tgit rev-parse origin/extrabranch &&\n \tgit rev-parse sometag\n '\n@@ -164,9 +164,9 @@ test_expect_success 'fetch --prune --tags with refspec prunes based on refspec'\n \tcd \"$D\" &&\n \tgit clone . prune-tags-refspec &&\n \tcd prune-tags-refspec &&\n-\tgit tag sometag master &&\n-\tgit update-ref refs/remotes/origin/foo/otherbranch master &&\n-\tgit update-ref refs/remotes/origin/extrabranch master &&\n+\tgit tag sometag main &&\n+\tgit update-ref refs/remotes/origin/foo/otherbranch main &&\n+\tgit update-ref refs/remotes/origin/extrabranch main &&\n \n \tgit fetch --prune --tags origin refs/heads/foo/*:refs/remotes/origin/foo/* &&\n \ttest_must_fail git rev-parse refs/remotes/origin/foo/otherbranch &&\n@@ -177,20 +177,20 @@ test_expect_success 'fetch --prune --tags with refspec prunes based on refspec'\n test_expect_success '--refmap=\"\" ignores configured refspec' '\n \tcd \"$TRASH_DIRECTORY\" &&\n \tgit clone \"$D\" remote-refs &&\n-\tgit -C remote-refs rev-parse remotes/origin/master >old &&\n-\tgit -C remote-refs update-ref refs/remotes/origin/master master~1 &&\n-\tgit -C remote-refs rev-parse remotes/origin/master >new &&\n+\tgit -C remote-refs rev-parse remotes/origin/main >old &&\n+\tgit -C remote-refs update-ref refs/remotes/origin/main main~1 &&\n+\tgit -C remote-refs rev-parse remotes/origin/main >new &&\n \tgit -C remote-refs fetch --refmap= origin \"+refs/heads/*:refs/hidden/origin/*\" &&\n-\tgit -C remote-refs rev-parse remotes/origin/master >actual &&\n+\tgit -C remote-refs rev-parse remotes/origin/main >actual &&\n \ttest_cmp new actual &&\n \tgit -C remote-refs fetch origin &&\n-\tgit -C remote-refs rev-parse remotes/origin/master >actual &&\n+\tgit -C remote-refs rev-parse remotes/origin/main >actual &&\n \ttest_cmp old actual\n '\n \n test_expect_success '--refmap=\"\" and --prune' '\n-\tgit -C remote-refs update-ref refs/remotes/origin/foo/otherbranch master &&\n-\tgit -C remote-refs update-ref refs/hidden/foo/otherbranch master &&\n+\tgit -C remote-refs update-ref refs/remotes/origin/foo/otherbranch main &&\n+\tgit -C remote-refs update-ref refs/hidden/foo/otherbranch main &&\n \tgit -C remote-refs fetch --prune --refmap=\"\" origin +refs/heads/*:refs/hidden/* &&\n \tgit -C remote-refs rev-parse remotes/origin/foo/otherbranch &&\n \ttest_must_fail git -C remote-refs rev-parse refs/hidden/foo/otherbranch &&\n@@ -250,7 +250,7 @@ test_expect_success 'fetch uses remote ref names to describe new refs' '\n \t\ttest_i18ngrep \"new tag.* -> descriptive-tag$\" actual &&\n \t\ttest_i18ngrep \"new ref.* -> crazy$\" actual\n \t) &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'fetch must not resolve short tag name' '\n@@ -281,7 +281,7 @@ test_expect_success 'create bundle 1' '\n \tcd \"$D\" &&\n \techo >file updated again by origin &&\n \tgit commit -a -m \"tip\" &&\n-\tgit bundle create --version=3 bundle1 master^..master\n+\tgit bundle create --version=3 bundle1 main^..main\n '\n \n test_expect_success 'header of bundle looks right' '\n@@ -289,7 +289,7 @@ test_expect_success 'header of bundle looks right' '\n \t# v3 git bundle\n \t@object-format=$(test_oid algo)\n \t-OID updated by origin\n-\tOID refs/heads/master\n+\tOID refs/heads/main\n \n \tEOF\n \tsed -e \"s/$OID_REGEX/OID/g\" -e \"5q\" \"$D\"/bundle1 >actual &&\n@@ -298,13 +298,13 @@ test_expect_success 'header of bundle looks right' '\n \n test_expect_success 'create bundle 2' '\n \tcd \"$D\" &&\n-\tgit bundle create bundle2 master~2..master\n+\tgit bundle create bundle2 main~2..main\n '\n \n test_expect_success 'unbundle 1' '\n \tcd \"$D/bundle\" &&\n \tgit checkout -b some-branch &&\n-\ttest_must_fail git fetch \"$D/bundle1\" master:master\n+\ttest_must_fail git fetch \"$D/bundle1\" main:main\n '\n \n \n@@ -317,8 +317,8 @@ test_expect_success 'bundle 1 has only 3 files ' '\n \n test_expect_success 'unbundle 2' '\n \tcd \"$D/bundle\" &&\n-\tgit fetch ../bundle2 master:master &&\n-\ttest \"tip\" = \"$(git log -1 --pretty=oneline master | cut -d\" \" -f2)\"\n+\tgit fetch ../bundle2 main:main &&\n+\ttest \"tip\" = \"$(git log -1 --pretty=oneline main | cut -d\" \" -f2)\"\n '\n \n test_expect_success 'bundle does not prerequisite objects' '\n@@ -335,14 +335,14 @@ test_expect_success 'bundle does not prerequisite objects' '\n test_expect_success 'bundle should be able to create a full history' '\n \n \tcd \"$D\" &&\n-\tgit tag -a -m \"1.0\" v1.0 master &&\n+\tgit tag -a -m \"1.0\" v1.0 main &&\n \tgit bundle create bundle4 v1.0\n \n '\n \n test_expect_success 'fetch with a non-applying branch.<name>.merge' '\n-\tgit config branch.master.remote yeti &&\n-\tgit config branch.master.merge refs/heads/bigfoot &&\n+\tgit config branch.main.remote yeti &&\n+\tgit config branch.main.merge refs/heads/bigfoot &&\n \tgit config remote.blub.url one &&\n \tgit config remote.blub.fetch \"refs/heads/*:refs/remotes/one/*\" &&\n \tgit fetch blub\n@@ -362,8 +362,8 @@ test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge\n # the merge spec matches the branch the remote HEAD points to\n test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge [2]' '\n \tone_ref=$(cd one && git symbolic-ref HEAD) &&\n-\tgit config branch.master.remote blub &&\n-\tgit config branch.master.merge \"$one_ref\" &&\n+\tgit config branch.main.remote blub &&\n+\tgit config branch.main.merge \"$one_ref\" &&\n \tgit update-ref -d FETCH_HEAD &&\n \tgit fetch one &&\n \ttest $one_head = \"$(git rev-parse --verify FETCH_HEAD)\" &&\n@@ -373,7 +373,7 @@ test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge\n # URL supplied to fetch matches the url of the configured branch's remote, but\n # the merge spec does not match the branch the remote HEAD points to\n test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge [3]' '\n-\tgit config branch.master.merge \"${one_ref}_not\" &&\n+\tgit config branch.main.merge \"${one_ref}_not\" &&\n \tgit update-ref -d FETCH_HEAD &&\n \tgit fetch one &&\n \ttest $one_head = \"$(git rev-parse --verify FETCH_HEAD)\" &&\n@@ -389,9 +389,9 @@ test_expect_success 'quoting of a strangely named repo' '\n test_expect_success 'bundle should record HEAD correctly' '\n \n \tcd \"$D\" &&\n-\tgit bundle create bundle5 HEAD master &&\n+\tgit bundle create bundle5 HEAD main &&\n \tgit bundle list-heads bundle5 >actual &&\n-\tfor h in HEAD refs/heads/master\n+\tfor h in HEAD refs/heads/main\n \tdo\n \t\techo \"$(git rev-parse --verify $h) $h\"\n \tdone >expect &&\n@@ -399,10 +399,10 @@ test_expect_success 'bundle should record HEAD correctly' '\n \n '\n \n-test_expect_success 'mark initial state of origin/master' '\n+test_expect_success 'mark initial state of origin/main' '\n \t(\n \t\tcd three &&\n-\t\tgit tag base-origin-master refs/remotes/origin/master\n+\t\tgit tag base-origin-main refs/remotes/origin/main\n \t)\n '\n \n@@ -412,10 +412,10 @@ test_expect_success 'explicit fetch should update tracking' '\n \tgit branch -f side &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n-\t\tgit fetch origin master &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n+\t\tgit fetch origin main &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" != \"$n\" &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/origin/side\n \t)\n@@ -427,10 +427,10 @@ test_expect_success 'explicit pull should update tracking' '\n \tgit branch -f side &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n-\t\tgit pull origin master &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n+\t\tgit pull origin main &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" != \"$n\" &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/origin/side\n \t)\n@@ -449,13 +449,13 @@ test_expect_success 'explicit --refmap option overrides remote.*.fetch' '\n \tgit branch -f side &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n-\t\tgit fetch --refmap=\"refs/heads/*:refs/remotes/other/*\" origin master &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n+\t\tgit fetch --refmap=\"refs/heads/*:refs/remotes/other/*\" origin main &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" = \"$n\" &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/origin/side &&\n-\t\tgit rev-parse --verify refs/remotes/other/master\n+\t\tgit rev-parse --verify refs/remotes/other/main\n \t)\n '\n \n@@ -464,10 +464,10 @@ test_expect_success 'explicitly empty --refmap option disables remote.*.fetch' '\n \tgit branch -f side &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n-\t\tgit fetch --refmap=\"\" origin master &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n+\t\tgit fetch --refmap=\"\" origin main &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" = \"$n\" &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/origin/side\n \t)\n@@ -479,10 +479,10 @@ test_expect_success 'configured fetch updates tracking' '\n \tgit branch -f side &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\tgit fetch origin &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" != \"$n\" &&\n \t\tgit rev-parse --verify refs/remotes/origin/side\n \t)\n@@ -493,12 +493,12 @@ test_expect_success 'non-matching refspecs do not confuse tracking update' '\n \tgit update-ref refs/odd/location HEAD &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n \t\tgit config --add remote.origin.fetch \\\n \t\t\trefs/odd/location:refs/remotes/origin/odd &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n-\t\tgit fetch origin master &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n+\t\tgit fetch origin main &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" != \"$n\" &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/origin/odd\n \t)\n@@ -524,7 +524,7 @@ test_expect_success 'auto tag following fetches minimum' '\n \t\t\tgit tag -a -m $i excess-$i || exit 1\n \t\tdone\n \t) &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \t(\n \t\tcd follow &&\n \t\tgit fetch\n@@ -533,13 +533,13 @@ test_expect_success 'auto tag following fetches minimum' '\n \n test_expect_success 'refuse to fetch into the current branch' '\n \n-\ttest_must_fail git fetch . side:master\n+\ttest_must_fail git fetch . side:main\n \n '\n \n test_expect_success 'fetch into the current branch with --update-head-ok' '\n \n-\tgit fetch --update-head-ok . side:master\n+\tgit fetch --update-head-ok . side:main\n \n '\n \n@@ -568,7 +568,7 @@ test_expect_success \"should be able to fetch with duplicate refspecs\" '\n \t(\n \t\tcd dups &&\n \t\tgit init &&\n-\t\tgit config branch.master.remote three &&\n+\t\tgit config branch.main.remote three &&\n \t\tgit config remote.three.url ../three/.git &&\n \t\tgit config remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&\n \t\tgit config --add remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&\n@@ -877,11 +877,11 @@ test_expect_success 'all boundary commits are excluded' '\n \ttest_commit oneside &&\n \tgit checkout HEAD^ &&\n \ttest_commit otherside &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit merge otherside &&\n \tad=$(git log --no-walk --format=%ad HEAD) &&\n-\tgit bundle create twoside-boundary.bdl master --since=\"$ad\" &&\n+\tgit bundle create twoside-boundary.bdl main --since=\"$ad\" &&\n \tconvert_bundle_to_pack <twoside-boundary.bdl >twoside-boundary.pack &&\n \tpack=$(git index-pack --fix-thin --stdin <twoside-boundary.pack) &&\n \ttest_bundle_object_count .git/objects/pack/pack-${pack##pack\t}.pack 3\n@@ -1017,7 +1017,7 @@ setup_negotiation_tip () {\n \tfi &&\n \n \ttest_commit -C \"$SERVER\" beta_s &&\n-\tgit -C \"$SERVER\" checkout master &&\n+\tgit -C \"$SERVER\" checkout main &&\n \ttest_commit -C \"$SERVER\" alpha_s &&\n \tgit -C \"$SERVER\" tag -d alpha_1 alpha_2 beta_1 beta_2\n }\ndiff --git a/t/t5511-refspec.sh b/t/t5511-refspec.sh\nindex f541f30bc2..847a9d4c27 100755\n--- a/t/t5511-refspec.sh\n+++ b/t/t5511-refspec.sh\n@@ -33,7 +33,7 @@ test_refspec fetch '::'\t\t\t\t\t\tinvalid\n test_refspec push 'refs/heads/*:refs/remotes/frotz/*'\n test_refspec push 'refs/heads/*:refs/remotes/frotz'\t\tinvalid\n test_refspec push 'refs/heads:refs/remotes/frotz/*'\t\tinvalid\n-test_refspec push 'refs/heads/master:refs/remotes/frotz/xyzzy'\n+test_refspec push 'refs/heads/main:refs/remotes/frotz/xyzzy'\n \n \n # These have invalid LHS, but we do not have a formal \"valid sha-1\n@@ -41,18 +41,18 @@ test_refspec push 'refs/heads/master:refs/remotes/frotz/xyzzy'\n # code.  They will be caught downstream anyway, but we may want to\n # have tighter check later...\n \n-: test_refspec push 'refs/heads/master::refs/remotes/frotz/xyzzy'\tinvalid\n+: test_refspec push 'refs/heads/main::refs/remotes/frotz/xyzzy'\tinvalid\n : test_refspec push 'refs/heads/maste :refs/remotes/frotz/xyzzy'\tinvalid\n \n test_refspec fetch 'refs/heads/*:refs/remotes/frotz/*'\n test_refspec fetch 'refs/heads/*:refs/remotes/frotz'\t\tinvalid\n test_refspec fetch 'refs/heads:refs/remotes/frotz/*'\t\tinvalid\n-test_refspec fetch 'refs/heads/master:refs/remotes/frotz/xyzzy'\n-test_refspec fetch 'refs/heads/master::refs/remotes/frotz/xyzzy'\tinvalid\n+test_refspec fetch 'refs/heads/main:refs/remotes/frotz/xyzzy'\n+test_refspec fetch 'refs/heads/main::refs/remotes/frotz/xyzzy'\tinvalid\n test_refspec fetch 'refs/heads/maste :refs/remotes/frotz/xyzzy'\tinvalid\n \n-test_refspec push 'master~1:refs/remotes/frotz/backup'\n-test_refspec fetch 'master~1:refs/remotes/frotz/backup'\t\tinvalid\n+test_refspec push 'main~1:refs/remotes/frotz/backup'\n+test_refspec fetch 'main~1:refs/remotes/frotz/backup'\t\tinvalid\n test_refspec push 'HEAD~4:refs/remotes/frotz/new'\n test_refspec fetch 'HEAD~4:refs/remotes/frotz/new'\t\tinvalid\n \ndiff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh\nindex e98c3a0174..fb122fb7b8 100755\n--- a/t/t5512-ls-remote.sh\n+++ b/t/t5512-ls-remote.sh\n@@ -118,7 +118,7 @@ test_expect_success 'use branch.<name>.remote if possible' '\n \techo \"From $URL\" >exp_err &&\n \n \tgit remote add other $URL &&\n-\tgit config branch.master.remote other &&\n+\tgit config branch.main.remote other &&\n \n \tgit ls-remote 2>actual_err >actual &&\n \ttest_cmp exp_err actual_err &&\n@@ -129,9 +129,9 @@ test_expect_success 'confuses pattern as remote when no remote specified' '\n \tif test_have_prereq MINGW\n \tthen\n \t\t# Windows does not like asterisks in pathname\n-\t\tdoes_not_exist=master\n+\t\tdoes_not_exist=main\n \telse\n-\t\tdoes_not_exist=\"refs*master\"\n+\t\tdoes_not_exist=\"refs*main\"\n \tfi &&\n \tcat >exp <<-EOF &&\n \tfatal: '\\''$does_not_exist'\\'' does not appear to be a git repository\n@@ -144,7 +144,7 @@ test_expect_success 'confuses pattern as remote when no remote specified' '\n \t# Do not expect \"git ls-remote <pattern>\" to work; ls-remote needs\n \t# <remote> if you want to feed <pattern>, just like you cannot say\n \t# fetch <branch>.\n-\t# We could just as easily have used \"master\"; the \"*\" emphasizes its\n+\t# We could just as easily have used \"main\"; the \"*\" emphasizes its\n \t# role as a pattern.\n \ttest_must_fail git ls-remote \"$does_not_exist\" >actual 2>&1 &&\n \ttest_i18ncmp exp actual\n@@ -217,14 +217,14 @@ test_expect_success 'protocol v2 supports hiderefs' '\n \n test_expect_success 'ls-remote --symref' '\n \tgit fetch origin &&\n-\techo \"ref: refs/heads/master\tHEAD\" >expect &&\n+\techo \"ref: refs/heads/main\tHEAD\" >expect &&\n \tgenerate_references \\\n \t\tHEAD \\\n-\t\trefs/heads/master >>expect &&\n+\t\trefs/heads/main >>expect &&\n \toid=$(git rev-parse HEAD) &&\n \techo \"$oid\trefs/remotes/origin/HEAD\" >>expect &&\n \tgenerate_references \\\n-\t\trefs/remotes/origin/master \\\n+\t\trefs/remotes/origin/main \\\n \t\trefs/tags/mark \\\n \t\trefs/tags/mark1.1 \\\n \t\trefs/tags/mark1.10 \\\n@@ -238,7 +238,7 @@ test_expect_success 'ls-remote --symref' '\n test_expect_success 'ls-remote with filtered symref (refname)' '\n \trev=$(git rev-parse HEAD) &&\n \tcat >expect <<-EOF &&\n-\tref: refs/heads/master\tHEAD\n+\tref: refs/heads/main\tHEAD\n \t$rev\tHEAD\n \tEOF\n \t# Protocol v2 supports sending symrefs for refs other than HEAD, so use\n@@ -252,7 +252,7 @@ test_expect_failure 'ls-remote with filtered symref (--heads)' '\n \tcat >expect <<-EOF &&\n \tref: refs/tags/mark\trefs/heads/foo\n \t$rev\trefs/heads/foo\n-\t$rev\trefs/heads/master\n+\t$rev\trefs/heads/main\n \tEOF\n \t# Protocol v2 supports sending symrefs for refs other than HEAD, so use\n \t# protocol v0 here.\n@@ -263,7 +263,7 @@ test_expect_failure 'ls-remote with filtered symref (--heads)' '\n test_expect_success 'ls-remote --symref omits filtered-out matches' '\n \tcat >expect <<-EOF &&\n \t$rev\trefs/heads/foo\n-\t$rev\trefs/heads/master\n+\t$rev\trefs/heads/main\n \tEOF\n \t# Protocol v2 supports sending symrefs for refs other than HEAD, so use\n \t# protocol v0 here.\n@@ -330,10 +330,10 @@ test_expect_success 'ls-remote --sort fails gracefully outside repository' '\n \n test_expect_success 'ls-remote patterns work with all protocol versions' '\n \tgit for-each-ref --format=\"%(objectname)\t%(refname)\" \\\n-\t\trefs/heads/master refs/remotes/origin/master >expect &&\n-\tgit -c protocol.version=1 ls-remote . master >actual.v1 &&\n+\t\trefs/heads/main refs/remotes/origin/main >expect &&\n+\tgit -c protocol.version=1 ls-remote . main >actual.v1 &&\n \ttest_cmp expect actual.v1 &&\n-\tgit -c protocol.version=2 ls-remote . master >actual.v2 &&\n+\tgit -c protocol.version=2 ls-remote . main >actual.v2 &&\n \ttest_cmp expect actual.v2\n '\n \ndiff --git a/t/t5514-fetch-multiple.sh b/t/t5514-fetch-multiple.sh\nindex bd202ec6f3..1b0560f901 100755\n--- a/t/t5514-fetch-multiple.sh\n+++ b/t/t5514-fetch-multiple.sh\n@@ -17,7 +17,7 @@ setup_repository () {\n \tgit add elif &&\n \ttest_tick &&\n \tgit commit -m \"Second\" &&\n-\tgit checkout master\n+\tgit checkout main\n \t)\n }\n \n@@ -32,16 +32,16 @@ test_expect_success setup '\n '\n \n cat > test/expect << EOF\n-  one/master\n+  one/main\n   one/side\n-  origin/HEAD -> origin/master\n-  origin/master\n+  origin/HEAD -> origin/main\n+  origin/main\n   origin/side\n   three/another\n-  three/master\n+  three/main\n   three/side\n   two/another\n-  two/master\n+  two/main\n   two/side\n EOF\n \n@@ -70,15 +70,15 @@ test_expect_success 'git fetch --all should continue if a remote has errors' '\n test_expect_success 'git fetch --all does not allow non-option arguments' '\n \t(cd test &&\n \t test_must_fail git fetch --all origin &&\n-\t test_must_fail git fetch --all origin master)\n+\t test_must_fail git fetch --all origin main)\n '\n \n cat > expect << EOF\n-  origin/HEAD -> origin/master\n-  origin/master\n+  origin/HEAD -> origin/main\n+  origin/main\n   origin/side\n   three/another\n-  three/master\n+  three/main\n   three/side\n EOF\n \n@@ -92,10 +92,10 @@ test_expect_success 'git fetch --multiple (but only one remote)' '\n '\n \n cat > expect << EOF\n-  one/master\n+  one/main\n   one/side\n   two/another\n-  two/master\n+  two/main\n   two/side\n EOF\n \n@@ -133,13 +133,13 @@ test_expect_success 'git fetch --all (skipFetchAll)' '\n '\n \n cat > expect << EOF\n-  one/master\n+  one/main\n   one/side\n   three/another\n-  three/master\n+  three/main\n   three/side\n   two/another\n-  two/master\n+  two/main\n   two/side\n EOF\n \ndiff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh\nindex d11382f769..522cee7aa6 100755\n--- a/t/t5516-fetch-push.sh\n+++ b/t/t5516-fetch-push.sh\n@@ -120,13 +120,13 @@ test_expect_success setup '\n \tgit add path1 &&\n \ttest_tick &&\n \tgit commit -a -m repo &&\n-\tthe_first_commit=$(git show-ref -s --verify refs/heads/master) &&\n+\tthe_first_commit=$(git show-ref -s --verify refs/heads/main) &&\n \n \t>path2 &&\n \tgit add path2 &&\n \ttest_tick &&\n \tgit commit -a -m second &&\n-\tthe_commit=$(git show-ref -s --verify refs/heads/master)\n+\tthe_commit=$(git show-ref -s --verify refs/heads/main)\n \n '\n \n@@ -134,9 +134,9 @@ test_expect_success 'fetch without wildcard' '\n \tmk_empty testrepo &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit fetch .. refs/heads/master:refs/remotes/origin/master &&\n+\t\tgit fetch .. refs/heads/main:refs/remotes/origin/main &&\n \n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -150,7 +150,7 @@ test_expect_success 'fetch with wildcard' '\n \t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n \t\tgit fetch up &&\n \n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -166,7 +166,7 @@ test_expect_success 'fetch with insteadOf' '\n \t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n \t\tgit fetch up &&\n \n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -182,7 +182,7 @@ test_expect_success 'fetch with pushInsteadOf (should not rewrite)' '\n \t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n \t\tgit fetch up &&\n \n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -191,10 +191,10 @@ test_expect_success 'fetch with pushInsteadOf (should not rewrite)' '\n test_expect_success 'push without wildcard' '\n \tmk_empty testrepo &&\n \n-\tgit push testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -206,7 +206,7 @@ test_expect_success 'push with wildcard' '\n \tgit push testrepo \"refs/heads/*:refs/remotes/origin/*\" &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -216,10 +216,10 @@ test_expect_success 'push with insteadOf' '\n \tmk_empty testrepo &&\n \tTRASH=\"$(pwd)/\" &&\n \ttest_config \"url.$TRASH.insteadOf\" trash/ &&\n-\tgit push trash/testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push trash/testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -229,10 +229,10 @@ test_expect_success 'push with pushInsteadOf' '\n \tmk_empty testrepo &&\n \tTRASH=\"$(pwd)/\" &&\n \ttest_config \"url.$TRASH.pushInsteadOf\" trash/ &&\n-\tgit push trash/testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push trash/testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -244,10 +244,10 @@ test_expect_success 'push with pushInsteadOf and explicit pushurl (pushInsteadOf\n \ttest_config \"url.trash3/.pushInsteadOf\" trash/wrong &&\n \ttest_config remote.r.url trash/wrong &&\n \ttest_config remote.r.pushurl \"testrepo/\" &&\n-\tgit push r refs/heads/master:refs/remotes/origin/master &&\n+\tgit push r refs/heads/main:refs/remotes/origin/main &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -255,101 +255,101 @@ test_expect_success 'push with pushInsteadOf and explicit pushurl (pushInsteadOf\n \n test_expect_success 'push with matching heads' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tgit push testrepo : &&\n-\tcheck_push_result testrepo $the_commit heads/master\n+\tcheck_push_result testrepo $the_commit heads/main\n \n '\n \n test_expect_success 'push with matching heads on the command line' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tgit push testrepo : &&\n-\tcheck_push_result testrepo $the_commit heads/master\n+\tcheck_push_result testrepo $the_commit heads/main\n \n '\n \n test_expect_success 'failed (non-fast-forward) push with matching heads' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tgit push testrepo : &&\n \tgit commit --amend -massaged &&\n \ttest_must_fail git push testrepo &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n \tgit reset --hard $the_commit\n \n '\n \n test_expect_success 'push --force with matching heads' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tgit push testrepo : &&\n \tgit commit --amend -massaged &&\n \tgit push --force testrepo : &&\n-\t! check_push_result testrepo $the_commit heads/master &&\n+\t! check_push_result testrepo $the_commit heads/main &&\n \tgit reset --hard $the_commit\n \n '\n \n test_expect_success 'push with matching heads and forced update' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tgit push testrepo : &&\n \tgit commit --amend -massaged &&\n \tgit push testrepo +: &&\n-\t! check_push_result testrepo $the_commit heads/master &&\n+\t! check_push_result testrepo $the_commit heads/main &&\n \tgit reset --hard $the_commit\n \n '\n \n test_expect_success 'push with no ambiguity (1)' '\n \n-\tmk_test testrepo heads/master &&\n-\tgit push testrepo master:master &&\n-\tcheck_push_result testrepo $the_commit heads/master\n+\tmk_test testrepo heads/main &&\n+\tgit push testrepo main:main &&\n+\tcheck_push_result testrepo $the_commit heads/main\n \n '\n \n test_expect_success 'push with no ambiguity (2)' '\n \n-\tmk_test testrepo remotes/origin/master &&\n-\tgit push testrepo master:origin/master &&\n-\tcheck_push_result testrepo $the_commit remotes/origin/master\n+\tmk_test testrepo remotes/origin/main &&\n+\tgit push testrepo main:origin/main &&\n+\tcheck_push_result testrepo $the_commit remotes/origin/main\n \n '\n \n test_expect_success 'push with colon-less refspec, no ambiguity' '\n \n-\tmk_test testrepo heads/master heads/t/master &&\n-\tgit branch -f t/master master &&\n-\tgit push testrepo master &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n-\tcheck_push_result testrepo $the_first_commit heads/t/master\n+\tmk_test testrepo heads/main heads/t/main &&\n+\tgit branch -f t/main main &&\n+\tgit push testrepo main &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n+\tcheck_push_result testrepo $the_first_commit heads/t/main\n \n '\n \n test_expect_success 'push with weak ambiguity (1)' '\n \n-\tmk_test testrepo heads/master remotes/origin/master &&\n-\tgit push testrepo master:master &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n-\tcheck_push_result testrepo $the_first_commit remotes/origin/master\n+\tmk_test testrepo heads/main remotes/origin/main &&\n+\tgit push testrepo main:main &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n+\tcheck_push_result testrepo $the_first_commit remotes/origin/main\n \n '\n \n test_expect_success 'push with weak ambiguity (2)' '\n \n-\tmk_test testrepo heads/master remotes/origin/master remotes/another/master &&\n-\tgit push testrepo master:master &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n-\tcheck_push_result testrepo $the_first_commit remotes/origin/master remotes/another/master\n+\tmk_test testrepo heads/main remotes/origin/main remotes/another/main &&\n+\tgit push testrepo main:main &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n+\tcheck_push_result testrepo $the_first_commit remotes/origin/main remotes/another/main\n \n '\n \n test_expect_success 'push with ambiguity' '\n \n \tmk_test testrepo heads/frotz tags/frotz &&\n-\ttest_must_fail git push testrepo master:frotz &&\n+\ttest_must_fail git push testrepo main:frotz &&\n \tcheck_push_result testrepo $the_first_commit heads/frotz tags/frotz\n \n '\n@@ -357,7 +357,7 @@ test_expect_success 'push with ambiguity' '\n test_expect_success 'push with colon-less refspec (1)' '\n \n \tmk_test testrepo heads/frotz tags/frotz &&\n-\tgit branch -f frotz master &&\n+\tgit branch -f frotz main &&\n \tgit push testrepo frotz &&\n \tcheck_push_result testrepo $the_commit heads/frotz &&\n \tcheck_push_result testrepo $the_first_commit tags/frotz\n@@ -385,7 +385,7 @@ test_expect_success 'push with colon-less refspec (3)' '\n \tthen\n \t\tgit tag -d frotz\n \tfi &&\n-\tgit branch -f frotz master &&\n+\tgit branch -f frotz main &&\n \tgit push testrepo frotz &&\n \tcheck_push_result testrepo $the_commit heads/frotz &&\n \ttest 1 = $( cd testrepo && git show-ref | wc -l )\n@@ -408,7 +408,7 @@ test_expect_success 'push with colon-less refspec (4)' '\n test_expect_success 'push head with non-existent, incomplete dest' '\n \n \tmk_test testrepo &&\n-\tgit push testrepo master:branch &&\n+\tgit push testrepo main:branch &&\n \tcheck_push_result testrepo $the_commit heads/branch\n \n '\n@@ -425,42 +425,42 @@ test_expect_success 'push tag with non-existent, incomplete dest' '\n test_expect_success 'push sha1 with non-existent, incomplete dest' '\n \n \tmk_test testrepo &&\n-\ttest_must_fail git push testrepo $(git rev-parse master):foo\n+\ttest_must_fail git push testrepo $(git rev-parse main):foo\n \n '\n \n test_expect_success 'push ref expression with non-existent, incomplete dest' '\n \n \tmk_test testrepo &&\n-\ttest_must_fail git push testrepo master^:branch\n+\ttest_must_fail git push testrepo main^:branch\n \n '\n \n test_expect_success 'push with HEAD' '\n \n-\tmk_test testrepo heads/master &&\n-\tgit checkout master &&\n+\tmk_test testrepo heads/main &&\n+\tgit checkout main &&\n \tgit push testrepo HEAD &&\n-\tcheck_push_result testrepo $the_commit heads/master\n+\tcheck_push_result testrepo $the_commit heads/main\n \n '\n \n test_expect_success 'push with HEAD nonexisting at remote' '\n \n-\tmk_test testrepo heads/master &&\n-\tgit checkout -b local master &&\n+\tmk_test testrepo heads/main &&\n+\tgit checkout -b local main &&\n \tgit push testrepo HEAD &&\n \tcheck_push_result testrepo $the_commit heads/local\n '\n \n test_expect_success 'push with +HEAD' '\n \n-\tmk_test testrepo heads/master &&\n-\tgit checkout master &&\n+\tmk_test testrepo heads/main &&\n+\tgit checkout main &&\n \tgit branch -D local &&\n \tgit checkout -b local &&\n-\tgit push testrepo master local &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n+\tgit push testrepo main local &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n \tcheck_push_result testrepo $the_commit heads/local &&\n \n \t# Without force rewinding should fail\n@@ -477,7 +477,7 @@ test_expect_success 'push with +HEAD' '\n test_expect_success 'push HEAD with non-existent, incomplete dest' '\n \n \tmk_test testrepo &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit push testrepo HEAD:branch &&\n \tcheck_push_result testrepo $the_commit heads/branch\n \n@@ -486,7 +486,7 @@ test_expect_success 'push HEAD with non-existent, incomplete dest' '\n test_expect_success 'push with config remote.*.push = HEAD' '\n \n \tmk_test testrepo heads/local &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -f local $the_commit &&\n \t(\n \t\tcd testrepo &&\n@@ -495,166 +495,166 @@ test_expect_success 'push with config remote.*.push = HEAD' '\n \t) &&\n \ttest_config remote.there.url testrepo &&\n \ttest_config remote.there.push HEAD &&\n-\ttest_config branch.master.remote there &&\n+\ttest_config branch.main.remote there &&\n \tgit push &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n \tcheck_push_result testrepo $the_first_commit heads/local\n '\n \n test_expect_success 'push with remote.pushdefault' '\n-\tmk_test up_repo heads/master &&\n-\tmk_test down_repo heads/master &&\n+\tmk_test up_repo heads/main &&\n+\tmk_test down_repo heads/main &&\n \ttest_config remote.up.url up_repo &&\n \ttest_config remote.down.url down_repo &&\n-\ttest_config branch.master.remote up &&\n+\ttest_config branch.main.remote up &&\n \ttest_config remote.pushdefault down &&\n \ttest_config push.default matching &&\n \tgit push &&\n-\tcheck_push_result up_repo $the_first_commit heads/master &&\n-\tcheck_push_result down_repo $the_commit heads/master\n+\tcheck_push_result up_repo $the_first_commit heads/main &&\n+\tcheck_push_result down_repo $the_commit heads/main\n '\n \n test_expect_success 'push with config remote.*.pushurl' '\n \n-\tmk_test testrepo heads/master &&\n-\tgit checkout master &&\n+\tmk_test testrepo heads/main &&\n+\tgit checkout main &&\n \ttest_config remote.there.url test2repo &&\n \ttest_config remote.there.pushurl testrepo &&\n \tgit push there : &&\n-\tcheck_push_result testrepo $the_commit heads/master\n+\tcheck_push_result testrepo $the_commit heads/main\n '\n \n test_expect_success 'push with config branch.*.pushremote' '\n-\tmk_test up_repo heads/master &&\n-\tmk_test side_repo heads/master &&\n-\tmk_test down_repo heads/master &&\n+\tmk_test up_repo heads/main &&\n+\tmk_test side_repo heads/main &&\n+\tmk_test down_repo heads/main &&\n \ttest_config remote.up.url up_repo &&\n \ttest_config remote.pushdefault side_repo &&\n \ttest_config remote.down.url down_repo &&\n-\ttest_config branch.master.remote up &&\n-\ttest_config branch.master.pushremote down &&\n+\ttest_config branch.main.remote up &&\n+\ttest_config branch.main.pushremote down &&\n \ttest_config push.default matching &&\n \tgit push &&\n-\tcheck_push_result up_repo $the_first_commit heads/master &&\n-\tcheck_push_result side_repo $the_first_commit heads/master &&\n-\tcheck_push_result down_repo $the_commit heads/master\n+\tcheck_push_result up_repo $the_first_commit heads/main &&\n+\tcheck_push_result side_repo $the_first_commit heads/main &&\n+\tcheck_push_result down_repo $the_commit heads/main\n '\n \n test_expect_success 'branch.*.pushremote config order is irrelevant' '\n-\tmk_test one_repo heads/master &&\n-\tmk_test two_repo heads/master &&\n+\tmk_test one_repo heads/main &&\n+\tmk_test two_repo heads/main &&\n \ttest_config remote.one.url one_repo &&\n \ttest_config remote.two.url two_repo &&\n-\ttest_config branch.master.pushremote two_repo &&\n+\ttest_config branch.main.pushremote two_repo &&\n \ttest_config remote.pushdefault one_repo &&\n \ttest_config push.default matching &&\n \tgit push &&\n-\tcheck_push_result one_repo $the_first_commit heads/master &&\n-\tcheck_push_result two_repo $the_commit heads/master\n+\tcheck_push_result one_repo $the_first_commit heads/main &&\n+\tcheck_push_result two_repo $the_commit heads/main\n '\n \n test_expect_success 'push with dry-run' '\n \n-\tmk_test testrepo heads/master &&\n-\told_commit=$(git -C testrepo show-ref -s --verify refs/heads/master) &&\n+\tmk_test testrepo heads/main &&\n+\told_commit=$(git -C testrepo show-ref -s --verify refs/heads/main) &&\n \tgit push --dry-run testrepo : &&\n-\tcheck_push_result testrepo $old_commit heads/master\n+\tcheck_push_result testrepo $old_commit heads/main\n '\n \n test_expect_success 'push updates local refs' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child &&\n \t(\n \t\tcd child &&\n-\t\tgit pull .. master &&\n+\t\tgit pull .. main &&\n \t\tgit push &&\n-\t\ttest $(git rev-parse master) = \\\n-\t\t\t$(git rev-parse remotes/origin/master)\n+\t\ttest $(git rev-parse main) = \\\n+\t\t\t$(git rev-parse remotes/origin/main)\n \t)\n \n '\n \n test_expect_success 'push updates up-to-date local refs' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child1 &&\n \tmk_child testrepo child2 &&\n-\t(cd child1 && git pull .. master && git push) &&\n+\t(cd child1 && git pull .. main && git push) &&\n \t(\n \t\tcd child2 &&\n-\t\tgit pull ../child1 master &&\n+\t\tgit pull ../child1 main &&\n \t\tgit push &&\n-\t\ttest $(git rev-parse master) = \\\n-\t\t\t$(git rev-parse remotes/origin/master)\n+\t\ttest $(git rev-parse main) = \\\n+\t\t\t$(git rev-parse remotes/origin/main)\n \t)\n \n '\n \n test_expect_success 'push preserves up-to-date packed refs' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child &&\n \t(\n \t\tcd child &&\n \t\tgit push &&\n-\t\t! test -f .git/refs/remotes/origin/master\n+\t\t! test -f .git/refs/remotes/origin/main\n \t)\n \n '\n \n test_expect_success 'push does not update local refs on failure' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child &&\n \tmkdir testrepo/.git/hooks &&\n \techo \"#!/no/frobnication/today\" >testrepo/.git/hooks/pre-receive &&\n \tchmod +x testrepo/.git/hooks/pre-receive &&\n \t(\n \t\tcd child &&\n-\t\tgit pull .. master &&\n+\t\tgit pull .. main &&\n \t\ttest_must_fail git push &&\n-\t\ttest $(git rev-parse master) != \\\n-\t\t\t$(git rev-parse remotes/origin/master)\n+\t\ttest $(git rev-parse main) != \\\n+\t\t\t$(git rev-parse remotes/origin/main)\n \t)\n \n '\n \n test_expect_success 'allow deleting an invalid remote ref' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -f testrepo/.git/objects/??/* &&\n-\tgit push testrepo :refs/heads/master &&\n-\t(cd testrepo && test_must_fail git rev-parse --verify refs/heads/master)\n+\tgit push testrepo :refs/heads/main &&\n+\t(cd testrepo && test_must_fail git rev-parse --verify refs/heads/main)\n \n '\n \n test_expect_success 'pushing valid refs triggers post-receive and post-update hooks' '\n-\tmk_test_with_hooks testrepo heads/master heads/next &&\n-\torgmaster=$(cd testrepo && git show-ref -s --verify refs/heads/master) &&\n-\tnewmaster=$(git show-ref -s --verify refs/heads/master) &&\n+\tmk_test_with_hooks testrepo heads/main heads/next &&\n+\torgmain=$(cd testrepo && git show-ref -s --verify refs/heads/main) &&\n+\tnewmain=$(git show-ref -s --verify refs/heads/main) &&\n \torgnext=$(cd testrepo && git show-ref -s --verify refs/heads/next) &&\n \tnewnext=$ZERO_OID &&\n-\tgit push testrepo refs/heads/master:refs/heads/master :refs/heads/next &&\n+\tgit push testrepo refs/heads/main:refs/heads/main :refs/heads/next &&\n \t(\n \t\tcd testrepo/.git &&\n \t\tcat >pre-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\t$orgnext $newnext refs/heads/next\n \t\tEOF\n \n \t\tcat >update.expect <<-EOF &&\n-\t\trefs/heads/master $orgmaster $newmaster\n+\t\trefs/heads/main $orgmain $newmain\n \t\trefs/heads/next $orgnext $newnext\n \t\tEOF\n \n \t\tcat >post-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\t$orgnext $newnext refs/heads/next\n \t\tEOF\n \n \t\tcat >post-update.expect <<-EOF &&\n-\t\trefs/heads/master\n+\t\trefs/heads/main\n \t\trefs/heads/next\n \t\tEOF\n \n@@ -666,25 +666,25 @@ test_expect_success 'pushing valid refs triggers post-receive and post-update ho\n '\n \n test_expect_success 'deleting dangling ref triggers hooks with correct args' '\n-\tmk_test_with_hooks testrepo heads/master &&\n+\tmk_test_with_hooks testrepo heads/main &&\n \trm -f testrepo/.git/objects/??/* &&\n-\tgit push testrepo :refs/heads/master &&\n+\tgit push testrepo :refs/heads/main &&\n \t(\n \t\tcd testrepo/.git &&\n \t\tcat >pre-receive.expect <<-EOF &&\n-\t\t$ZERO_OID $ZERO_OID refs/heads/master\n+\t\t$ZERO_OID $ZERO_OID refs/heads/main\n \t\tEOF\n \n \t\tcat >update.expect <<-EOF &&\n-\t\trefs/heads/master $ZERO_OID $ZERO_OID\n+\t\trefs/heads/main $ZERO_OID $ZERO_OID\n \t\tEOF\n \n \t\tcat >post-receive.expect <<-EOF &&\n-\t\t$ZERO_OID $ZERO_OID refs/heads/master\n+\t\t$ZERO_OID $ZERO_OID refs/heads/main\n \t\tEOF\n \n \t\tcat >post-update.expect <<-EOF &&\n-\t\trefs/heads/master\n+\t\trefs/heads/main\n \t\tEOF\n \n \t\ttest_cmp pre-receive.expect pre-receive.actual &&\n@@ -695,28 +695,28 @@ test_expect_success 'deleting dangling ref triggers hooks with correct args' '\n '\n \n test_expect_success 'deletion of a non-existent ref is not fed to post-receive and post-update hooks' '\n-\tmk_test_with_hooks testrepo heads/master &&\n-\torgmaster=$(cd testrepo && git show-ref -s --verify refs/heads/master) &&\n-\tnewmaster=$(git show-ref -s --verify refs/heads/master) &&\n-\tgit push testrepo master :refs/heads/nonexistent &&\n+\tmk_test_with_hooks testrepo heads/main &&\n+\torgmain=$(cd testrepo && git show-ref -s --verify refs/heads/main) &&\n+\tnewmain=$(git show-ref -s --verify refs/heads/main) &&\n+\tgit push testrepo main :refs/heads/nonexistent &&\n \t(\n \t\tcd testrepo/.git &&\n \t\tcat >pre-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\t$ZERO_OID $ZERO_OID refs/heads/nonexistent\n \t\tEOF\n \n \t\tcat >update.expect <<-EOF &&\n-\t\trefs/heads/master $orgmaster $newmaster\n+\t\trefs/heads/main $orgmain $newmain\n \t\trefs/heads/nonexistent $ZERO_OID $ZERO_OID\n \t\tEOF\n \n \t\tcat >post-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\tEOF\n \n \t\tcat >post-update.expect <<-EOF &&\n-\t\trefs/heads/master\n+\t\trefs/heads/main\n \t\tEOF\n \n \t\ttest_cmp pre-receive.expect pre-receive.actual &&\n@@ -727,7 +727,7 @@ test_expect_success 'deletion of a non-existent ref is not fed to post-receive a\n '\n \n test_expect_success 'deletion of a non-existent ref alone does trigger post-receive and post-update hooks' '\n-\tmk_test_with_hooks testrepo heads/master &&\n+\tmk_test_with_hooks testrepo heads/main &&\n \tgit push testrepo :refs/heads/nonexistent &&\n \t(\n \t\tcd testrepo/.git &&\n@@ -747,40 +747,40 @@ test_expect_success 'deletion of a non-existent ref alone does trigger post-rece\n '\n \n test_expect_success 'mixed ref updates, deletes, invalid deletes trigger hooks with correct input' '\n-\tmk_test_with_hooks testrepo heads/master heads/next heads/seen &&\n-\torgmaster=$(cd testrepo && git show-ref -s --verify refs/heads/master) &&\n-\tnewmaster=$(git show-ref -s --verify refs/heads/master) &&\n+\tmk_test_with_hooks testrepo heads/main heads/next heads/seen &&\n+\torgmain=$(cd testrepo && git show-ref -s --verify refs/heads/main) &&\n+\tnewmain=$(git show-ref -s --verify refs/heads/main) &&\n \torgnext=$(cd testrepo && git show-ref -s --verify refs/heads/next) &&\n \tnewnext=$ZERO_OID &&\n \torgseen=$(cd testrepo && git show-ref -s --verify refs/heads/seen) &&\n-\tnewseen=$(git show-ref -s --verify refs/heads/master) &&\n-\tgit push testrepo refs/heads/master:refs/heads/master \\\n-\t    refs/heads/master:refs/heads/seen :refs/heads/next \\\n+\tnewseen=$(git show-ref -s --verify refs/heads/main) &&\n+\tgit push testrepo refs/heads/main:refs/heads/main \\\n+\t    refs/heads/main:refs/heads/seen :refs/heads/next \\\n \t    :refs/heads/nonexistent &&\n \t(\n \t\tcd testrepo/.git &&\n \t\tcat >pre-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\t$orgnext $newnext refs/heads/next\n \t\t$orgseen $newseen refs/heads/seen\n \t\t$ZERO_OID $ZERO_OID refs/heads/nonexistent\n \t\tEOF\n \n \t\tcat >update.expect <<-EOF &&\n-\t\trefs/heads/master $orgmaster $newmaster\n+\t\trefs/heads/main $orgmain $newmain\n \t\trefs/heads/next $orgnext $newnext\n \t\trefs/heads/seen $orgseen $newseen\n \t\trefs/heads/nonexistent $ZERO_OID $ZERO_OID\n \t\tEOF\n \n \t\tcat >post-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\t$orgnext $newnext refs/heads/next\n \t\t$orgseen $newseen refs/heads/seen\n \t\tEOF\n \n \t\tcat >post-update.expect <<-EOF &&\n-\t\trefs/heads/master\n+\t\trefs/heads/main\n \t\trefs/heads/next\n \t\trefs/heads/seen\n \t\tEOF\n@@ -793,15 +793,15 @@ test_expect_success 'mixed ref updates, deletes, invalid deletes trigger hooks w\n '\n \n test_expect_success 'allow deleting a ref using --delete' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \t(cd testrepo && git config receive.denyDeleteCurrent warn) &&\n-\tgit push testrepo --delete master &&\n-\t(cd testrepo && test_must_fail git rev-parse --verify refs/heads/master)\n+\tgit push testrepo --delete main &&\n+\t(cd testrepo && test_must_fail git rev-parse --verify refs/heads/main)\n '\n \n test_expect_success 'allow deleting a tag using --delete' '\n-\tmk_test testrepo heads/master &&\n-\tgit tag -a -m dummy_message deltag heads/master &&\n+\tmk_test testrepo heads/main &&\n+\tgit tag -a -m dummy_message deltag heads/main &&\n \tgit push testrepo --tags &&\n \t(cd testrepo && git rev-parse --verify -q refs/tags/deltag) &&\n \tgit push testrepo --delete tag deltag &&\n@@ -809,56 +809,56 @@ test_expect_success 'allow deleting a tag using --delete' '\n '\n \n test_expect_success 'push --delete without args aborts' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \ttest_must_fail git push testrepo --delete\n '\n \n test_expect_success 'push --delete refuses src:dest refspecs' '\n-\tmk_test testrepo heads/master &&\n-\ttest_must_fail git push testrepo --delete master:foo\n+\tmk_test testrepo heads/main &&\n+\ttest_must_fail git push testrepo --delete main:foo\n '\n \n test_expect_success 'warn on push to HEAD of non-bare repository' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit config receive.denyCurrentBranch warn\n \t) &&\n-\tgit push testrepo master 2>stderr &&\n+\tgit push testrepo main 2>stderr &&\n \tgrep \"warning: updating the current branch\" stderr\n '\n \n test_expect_success 'deny push to HEAD of non-bare repository' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit config receive.denyCurrentBranch true\n \t) &&\n-\ttest_must_fail git push testrepo master\n+\ttest_must_fail git push testrepo main\n '\n \n test_expect_success 'allow push to HEAD of bare repository (bare)' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit config receive.denyCurrentBranch true &&\n \t\tgit config core.bare true\n \t) &&\n-\tgit push testrepo master 2>stderr &&\n+\tgit push testrepo main 2>stderr &&\n \t! grep \"warning: updating the current branch\" stderr\n '\n \n test_expect_success 'allow push to HEAD of non-bare repository (config)' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit config receive.denyCurrentBranch false\n \t) &&\n-\tgit push testrepo master 2>stderr &&\n+\tgit push testrepo main 2>stderr &&\n \t! grep \"warning: updating the current branch\" stderr\n '\n \n@@ -874,7 +874,7 @@ test_expect_success 'fetch with branches' '\n \t\tgit for-each-ref refs/heads >actual &&\n \t\ttest_cmp expect actual\n \t) &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'fetch with branches containing #' '\n@@ -887,7 +887,7 @@ test_expect_success 'fetch with branches containing #' '\n \t\tgit for-each-ref refs/heads >actual &&\n \t\ttest_cmp expect actual\n \t) &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'push with branches' '\n@@ -897,7 +897,7 @@ test_expect_success 'push with branches' '\n \tgit push branch1 &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_first_commit commit\trefs/heads/master\" >expect &&\n+\t\techo \"$the_first_commit commit\trefs/heads/main\" >expect &&\n \t\tgit for-each-ref refs/heads >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -913,11 +913,11 @@ test_expect_success 'push with branches containing #' '\n \t\tgit for-each-ref refs/heads >actual &&\n \t\ttest_cmp expect actual\n \t) &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'push into aliased refs (consistent)' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child1 &&\n \tmk_child testrepo child2 &&\n \t(\n@@ -939,7 +939,7 @@ test_expect_success 'push into aliased refs (consistent)' '\n '\n \n test_expect_success 'push into aliased refs (inconsistent)' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child1 &&\n \tmk_child testrepo child2 &&\n \t(\n@@ -970,7 +970,7 @@ test_force_push_tag () {\n \ttag_args=$2\n \n \ttest_expect_success \"force pushing required to update $tag_type_description\" \"\n-\t\tmk_test testrepo heads/master &&\n+\t\tmk_test testrepo heads/main &&\n \t\tmk_child testrepo child1 &&\n \t\tmk_child testrepo child2 &&\n \t\t(\n@@ -1016,7 +1016,7 @@ test_force_fetch_tag () {\n \ttag_args=$2\n \n \ttest_expect_success \"fetch will not clobber an existing $tag_type_description without --force\" \"\n-\t\tmk_test testrepo heads/master &&\n+\t\tmk_test testrepo heads/main &&\n \t\tmk_child testrepo child1 &&\n \t\tmk_child testrepo child2 &&\n \t\t(\n@@ -1039,12 +1039,12 @@ test_force_fetch_tag \"annotated tag\" \"-f -a -m'tag message'\"\n test_expect_success 'push --porcelain' '\n \tmk_empty testrepo &&\n \techo >.git/foo  \"To testrepo\" &&\n-\techo >>.git/foo \"*\trefs/heads/master:refs/remotes/origin/master\t[new reference]\"  &&\n+\techo >>.git/foo \"*\trefs/heads/main:refs/remotes/origin/main\t[new reference]\"  &&\n \techo >>.git/foo \"Done\" &&\n-\tgit push >.git/bar --porcelain  testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push >.git/bar --porcelain  testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t) &&\n@@ -1053,52 +1053,52 @@ test_expect_success 'push --porcelain' '\n \n test_expect_success 'push --porcelain bad url' '\n \tmk_empty testrepo &&\n-\ttest_must_fail git push >.git/bar --porcelain asdfasdfasd refs/heads/master:refs/remotes/origin/master &&\n+\ttest_must_fail git push >.git/bar --porcelain asdfasdfasd refs/heads/main:refs/remotes/origin/main &&\n \t! grep -q Done .git/bar\n '\n \n test_expect_success 'push --porcelain rejected' '\n \tmk_empty testrepo &&\n-\tgit push testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(cd testrepo &&\n-\t\tgit reset --hard origin/master^ &&\n+\t\tgit reset --hard origin/main^ &&\n \t\tgit config receive.denyCurrentBranch true) &&\n \n \techo >.git/foo  \"To testrepo\"  &&\n-\techo >>.git/foo \"!\trefs/heads/master:refs/heads/master\t[remote rejected] (branch is currently checked out)\" &&\n+\techo >>.git/foo \"!\trefs/heads/main:refs/heads/main\t[remote rejected] (branch is currently checked out)\" &&\n \techo >>.git/foo \"Done\" &&\n \n-\ttest_must_fail git push >.git/bar --porcelain  testrepo refs/heads/master:refs/heads/master &&\n+\ttest_must_fail git push >.git/bar --porcelain  testrepo refs/heads/main:refs/heads/main &&\n \ttest_cmp .git/foo .git/bar\n '\n \n test_expect_success 'push --porcelain --dry-run rejected' '\n \tmk_empty testrepo &&\n-\tgit push testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(cd testrepo &&\n-\t\tgit reset --hard origin/master &&\n+\t\tgit reset --hard origin/main &&\n \t\tgit config receive.denyCurrentBranch true) &&\n \n \techo >.git/foo  \"To testrepo\"  &&\n-\techo >>.git/foo \"!\trefs/heads/master^:refs/heads/master\t[rejected] (non-fast-forward)\" &&\n+\techo >>.git/foo \"!\trefs/heads/main^:refs/heads/main\t[rejected] (non-fast-forward)\" &&\n \techo >>.git/foo \"Done\" &&\n \n-\ttest_must_fail git push >.git/bar --porcelain  --dry-run testrepo refs/heads/master^:refs/heads/master &&\n+\ttest_must_fail git push >.git/bar --porcelain  --dry-run testrepo refs/heads/main^:refs/heads/main &&\n \ttest_cmp .git/foo .git/bar\n '\n \n test_expect_success 'push --prune' '\n-\tmk_test testrepo heads/master heads/second heads/foo heads/bar &&\n+\tmk_test testrepo heads/main heads/second heads/foo heads/bar &&\n \tgit push --prune testrepo : &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n \tcheck_push_result testrepo $the_first_commit heads/second &&\n \t! check_push_result testrepo $the_first_commit heads/foo heads/bar\n '\n \n test_expect_success 'push --prune refspec' '\n-\tmk_test testrepo tmp/master tmp/second tmp/foo tmp/bar &&\n+\tmk_test testrepo tmp/main tmp/second tmp/foo tmp/bar &&\n \tgit push --prune testrepo \"refs/heads/*:refs/tmp/*\" &&\n-\tcheck_push_result testrepo $the_commit tmp/master &&\n+\tcheck_push_result testrepo $the_commit tmp/main &&\n \tcheck_push_result testrepo $the_first_commit tmp/second &&\n \t! check_push_result testrepo $the_first_commit tmp/foo tmp/bar\n '\n@@ -1106,18 +1106,18 @@ test_expect_success 'push --prune refspec' '\n for configsection in transfer receive\n do\n \ttest_expect_success \"push to update a ref hidden by $configsection.hiderefs\" '\n-\t\tmk_test testrepo heads/master hidden/one hidden/two hidden/three &&\n+\t\tmk_test testrepo heads/main hidden/one hidden/two hidden/three &&\n \t\t(\n \t\t\tcd testrepo &&\n \t\t\tgit config $configsection.hiderefs refs/hidden\n \t\t) &&\n \n \t\t# push to unhidden ref succeeds normally\n-\t\tgit push testrepo master:refs/heads/master &&\n-\t\tcheck_push_result testrepo $the_commit heads/master &&\n+\t\tgit push testrepo main:refs/heads/main &&\n+\t\tcheck_push_result testrepo $the_commit heads/main &&\n \n \t\t# push to update a hidden ref should fail\n-\t\ttest_must_fail git push testrepo master:refs/hidden/one &&\n+\t\ttest_must_fail git push testrepo main:refs/hidden/one &&\n \t\tcheck_push_result testrepo $the_first_commit hidden/one &&\n \n \t\t# push to delete a hidden ref should fail\n@@ -1131,8 +1131,8 @@ do\n done\n \n test_expect_success 'fetch exact SHA1' '\n-\tmk_test testrepo heads/master hidden/one &&\n-\tgit push testrepo master:refs/hidden/one &&\n+\tmk_test testrepo heads/main hidden/one &&\n+\tgit push testrepo main:refs/hidden/one &&\n \t(\n \t\tcd testrepo &&\n \t\tgit config transfer.hiderefs refs/hidden\n@@ -1163,7 +1163,7 @@ test_expect_success 'fetch exact SHA1' '\n \t\t\tgit config uploadpack.allowtipsha1inwant true\n \t\t) &&\n \n-\t\tgit fetch -v ../testrepo $the_commit:refs/heads/copy master:refs/heads/extra &&\n+\t\tgit fetch -v ../testrepo $the_commit:refs/heads/copy main:refs/heads/extra &&\n \t\tcat >expect <<-EOF &&\n \t\t$the_commit\n \t\t$the_first_commit\n@@ -1177,8 +1177,8 @@ test_expect_success 'fetch exact SHA1' '\n '\n \n test_expect_success 'fetch exact SHA1 in protocol v2' '\n-\tmk_test testrepo heads/master hidden/one &&\n-\tgit push testrepo master:refs/hidden/one &&\n+\tmk_test testrepo heads/main hidden/one &&\n+\tgit push testrepo main:refs/hidden/one &&\n \tgit -C testrepo config transfer.hiderefs refs/hidden &&\n \tcheck_push_result testrepo $the_commit hidden/one &&\n \n@@ -1260,17 +1260,17 @@ do\n done\n \n test_expect_success 'fetch follows tags by default' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit tag -m \"annotated\" tag &&\n \t\tgit for-each-ref >tmp1 &&\n \t\t(\n \t\t\tcat tmp1\n-\t\t\tsed -n \"s|refs/heads/master$|refs/remotes/origin/master|p\" tmp1\n+\t\t\tsed -n \"s|refs/heads/main$|refs/remotes/origin/main|p\" tmp1\n \t\t) |\n \t\tsort -k 3 >../expect\n \t) &&\n@@ -1278,8 +1278,8 @@ test_expect_success 'fetch follows tags by default' '\n \t(\n \t\tcd dst &&\n \t\tgit remote add origin ../src &&\n-\t\tgit config branch.master.remote origin &&\n-\t\tgit config branch.master.merge refs/heads/master &&\n+\t\tgit config branch.main.remote origin &&\n+\t\tgit config branch.main.merge refs/heads/main &&\n \t\tgit pull &&\n \t\tgit for-each-ref >../actual\n \t) &&\n@@ -1298,74 +1298,74 @@ test_expect_success 'peeled advertisements are not considered ref tips' '\n '\n \n test_expect_success 'pushing a specific ref applies remote.$name.push as refmap' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \tgit init --bare dst &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit branch next &&\n \t\tgit config remote.dst.url ../dst &&\n \t\tgit config remote.dst.push \"+refs/heads/*:refs/remotes/src/*\" &&\n-\t\tgit push dst master &&\n-\t\tgit show-ref refs/heads/master |\n+\t\tgit push dst main &&\n+\t\tgit show-ref refs/heads/main |\n \t\tsed -e \"s|refs/heads/|refs/remotes/src/|\" >../dst/expect\n \t) &&\n \t(\n \t\tcd dst &&\n \t\ttest_must_fail git show-ref refs/heads/next &&\n-\t\ttest_must_fail git show-ref refs/heads/master &&\n-\t\tgit show-ref refs/remotes/src/master >actual\n+\t\ttest_must_fail git show-ref refs/heads/main &&\n+\t\tgit show-ref refs/remotes/src/main >actual\n \t) &&\n \ttest_cmp dst/expect dst/actual\n '\n \n test_expect_success 'with no remote.$name.push, it is not used as refmap' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \tgit init --bare dst &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit branch next &&\n \t\tgit config remote.dst.url ../dst &&\n \t\tgit config push.default matching &&\n-\t\tgit push dst master &&\n-\t\tgit show-ref refs/heads/master >../dst/expect\n+\t\tgit push dst main &&\n+\t\tgit show-ref refs/heads/main >../dst/expect\n \t) &&\n \t(\n \t\tcd dst &&\n \t\ttest_must_fail git show-ref refs/heads/next &&\n-\t\tgit show-ref refs/heads/master >actual\n+\t\tgit show-ref refs/heads/main >actual\n \t) &&\n \ttest_cmp dst/expect dst/actual\n '\n \n test_expect_success 'with no remote.$name.push, upstream mapping is used' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \tgit init --bare dst &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit branch next &&\n \t\tgit config remote.dst.url ../dst &&\n \t\tgit config remote.dst.fetch \"+refs/heads/*:refs/remotes/dst/*\" &&\n \t\tgit config push.default upstream &&\n \n-\t\tgit config branch.master.merge refs/heads/trunk &&\n-\t\tgit config branch.master.remote dst &&\n+\t\tgit config branch.main.merge refs/heads/trunk &&\n+\t\tgit config branch.main.remote dst &&\n \n-\t\tgit push dst master &&\n-\t\tgit show-ref refs/heads/master |\n-\t\tsed -e \"s|refs/heads/master|refs/heads/trunk|\" >../dst/expect\n+\t\tgit push dst main &&\n+\t\tgit show-ref refs/heads/main |\n+\t\tsed -e \"s|refs/heads/main|refs/heads/trunk|\" >../dst/expect\n \t) &&\n \t(\n \t\tcd dst &&\n-\t\ttest_must_fail git show-ref refs/heads/master &&\n+\t\ttest_must_fail git show-ref refs/heads/main &&\n \t\ttest_must_fail git show-ref refs/heads/next &&\n \t\tgit show-ref refs/heads/trunk >actual\n \t) &&\n@@ -1373,20 +1373,20 @@ test_expect_success 'with no remote.$name.push, upstream mapping is used' '\n '\n \n test_expect_success 'push does not follow tags by default' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \tgit init --bare dst &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit tag -m \"annotated\" tag &&\n \t\tgit checkout -b another &&\n \t\tgit commit --allow-empty -m \"future commit\" &&\n \t\tgit tag -m \"future\" future &&\n-\t\tgit checkout master &&\n-\t\tgit for-each-ref refs/heads/master >../expect &&\n-\t\tgit push ../dst master\n+\t\tgit checkout main &&\n+\t\tgit for-each-ref refs/heads/main >../expect &&\n+\t\tgit push ../dst main\n \t) &&\n \t(\n \t\tcd dst &&\n@@ -1396,20 +1396,20 @@ test_expect_success 'push does not follow tags by default' '\n '\n \n test_expect_success 'push --follow-tags only pushes relevant tags' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \tgit init --bare dst &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit tag -m \"annotated\" tag &&\n \t\tgit checkout -b another &&\n \t\tgit commit --allow-empty -m \"future commit\" &&\n \t\tgit tag -m \"future\" future &&\n-\t\tgit checkout master &&\n-\t\tgit for-each-ref refs/heads/master refs/tags/tag >../expect &&\n-\t\tgit push --follow-tags ../dst master\n+\t\tgit checkout main &&\n+\t\tgit for-each-ref refs/heads/main refs/tags/tag >../expect &&\n+\t\tgit push --follow-tags ../dst main\n \t) &&\n \t(\n \t\tcd dst &&\n@@ -1427,12 +1427,12 @@ EOF\n \tgit commit -am initial &&\n \tgit init no-thin &&\n \tgit --git-dir=no-thin/.git config receive.unpacklimit 0 &&\n-\tgit push no-thin/.git refs/heads/master:refs/heads/foo &&\n+\tgit push no-thin/.git refs/heads/main:refs/heads/foo &&\n \techo modified >> path1 &&\n \tgit commit -am modified &&\n \tgit repack -adf &&\n \trcvpck=\"git receive-pack --reject-thin-pack-for-testing\" &&\n-\tgit push --no-thin --receive-pack=\"$rcvpck\" no-thin/.git refs/heads/master:refs/heads/foo\n+\tgit push --no-thin --receive-pack=\"$rcvpck\" no-thin/.git refs/heads/main:refs/heads/foo\n '\n \n test_expect_success 'pushing a tag pushes the tagged object' '\n@@ -1455,12 +1455,12 @@ test_expect_success 'push into bare respects core.logallrefupdates' '\n \n \t# double push to test both with and without\n \t# the actual pack transfer\n-\tgit push dst.git master:one &&\n+\tgit push dst.git main:one &&\n \techo \"one@{0} push\" >expect &&\n \tgit -C dst.git log -g --format=\"%gd %gs\" one >actual &&\n \ttest_cmp expect actual &&\n \n-\tgit push dst.git master:two &&\n+\tgit push dst.git main:two &&\n \techo \"two@{0} push\" >expect &&\n \tgit -C dst.git log -g --format=\"%gd %gs\" two >actual &&\n \ttest_cmp expect actual\n@@ -1475,20 +1475,20 @@ test_expect_success 'fetch into bare respects core.logallrefupdates' '\n \n \t\t# as above, we double-fetch to test both\n \t\t# with and without pack transfer\n-\t\tgit fetch .. master:one &&\n-\t\techo \"one@{0} fetch .. master:one: storing head\" >expect &&\n+\t\tgit fetch .. main:one &&\n+\t\techo \"one@{0} fetch .. main:one: storing head\" >expect &&\n \t\tgit log -g --format=\"%gd %gs\" one >actual &&\n \t\ttest_cmp expect actual &&\n \n-\t\tgit fetch .. master:two &&\n-\t\techo \"two@{0} fetch .. master:two: storing head\" >expect &&\n+\t\tgit fetch .. main:two &&\n+\t\techo \"two@{0} fetch .. main:two: storing head\" >expect &&\n \t\tgit log -g --format=\"%gd %gs\" two >actual &&\n \t\ttest_cmp expect actual\n \t)\n '\n \n test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n-\tgit push testrepo master &&\n+\tgit push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\tgit reset --hard &&\n@@ -1497,7 +1497,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \ttest_commit third path2 &&\n \n \t# Try pushing into a repository with pristine working tree\n-\tgit push testrepo master &&\n+\tgit push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\tgit update-index -q --refresh &&\n@@ -1514,7 +1514,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\ttest $(git -C .. rev-parse HEAD^) = $(git rev-parse HEAD) &&\n \t\ttest-tool chmtime +100 path1\n \t) &&\n-\tgit push testrepo master &&\n+\tgit push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\tgit update-index -q --refresh &&\n@@ -1534,7 +1534,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\tcd testrepo &&\n \t\techo changed >path1\n \t) &&\n-\ttest_must_fail git push testrepo master &&\n+\ttest_must_fail git push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest $(git -C .. rev-parse HEAD^) = $(git rev-parse HEAD) &&\n@@ -1548,7 +1548,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\techo changed >path1 &&\n \t\tgit add path1\n \t) &&\n-\ttest_must_fail git push testrepo master &&\n+\ttest_must_fail git push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest $(git -C .. rev-parse HEAD^) = $(git rev-parse HEAD) &&\n@@ -1565,7 +1565,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\tgit reset --hard &&\n \t\techo changed >path3\n \t) &&\n-\ttest_must_fail git push testrepo master &&\n+\ttest_must_fail git push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest $(git -C .. rev-parse HEAD^^) = $(git rev-parse HEAD) &&\n@@ -1581,7 +1581,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\techo fifth >path3 &&\n \t\tgit add path3\n \t) &&\n-\ttest_must_fail git push testrepo master &&\n+\ttest_must_fail git push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest $(git -C .. rev-parse HEAD^^) = $(git rev-parse HEAD) &&\n@@ -1596,17 +1596,17 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\tcd void &&\n \t\tgit config receive.denyCurrentBranch updateInstead\n \t) &&\n-\tgit push void master &&\n+\tgit push void main &&\n \t(\n \t\tcd void &&\n-\t\ttest $(git -C .. rev-parse master) = $(git rev-parse HEAD) &&\n+\t\ttest $(git -C .. rev-parse main) = $(git rev-parse HEAD) &&\n \t\tgit diff --quiet &&\n \t\tgit diff --cached --quiet\n \t) &&\n \n \t# (6) updateInstead intervened by fast-forward check\n-\ttest_must_fail git push void master^:master &&\n-\ttest $(git -C void rev-parse HEAD) = $(git rev-parse master) &&\n+\ttest_must_fail git push void main^:main &&\n+\ttest $(git -C void rev-parse HEAD) = $(git rev-parse main) &&\n \tgit -C void diff --quiet &&\n \tgit -C void diff --cached --quiet\n '\n@@ -1616,7 +1616,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '\n \tgit init testrepo &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit pull .. master &&\n+\t\tgit pull .. main &&\n \t\tgit reset --hard HEAD^^ &&\n \t\tgit tag initial &&\n \t\tgit config receive.denyCurrentBranch updateInstead &&\n@@ -1634,7 +1634,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '\n \t) &&\n \n \t# Try pushing into a pristine\n-\tgit push testrepo master &&\n+\tgit push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\tgit diff --quiet &&\n@@ -1648,7 +1648,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '\n \t\tgit reset --hard initial &&\n \t\techo conflicting >path2\n \t) &&\n-\ttest_must_fail git push testrepo master &&\n+\ttest_must_fail git push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest $(git rev-parse initial) = $(git rev-parse HEAD) &&\n@@ -1664,7 +1664,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '\n \t\techo irrelevant >path5 &&\n \t\tgit add path5\n \t) &&\n-\tgit push testrepo master &&\n+\tgit push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest \"$(cat path1)\" = unrelated &&\n@@ -1704,7 +1704,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '\n \t\tEOF\n \t) &&\n \n-\tgit push void master &&\n+\tgit push void main &&\n \t(\n \t\tcd void &&\n \t\tgit diff --quiet &&\ndiff --git a/t/t5517-push-mirror.sh b/t/t5517-push-mirror.sh\nindex e4edd56404..a4b11495c6 100755\n--- a/t/t5517-push-mirror.sh\n+++ b/t/t5517-push-mirror.sh\n@@ -15,16 +15,16 @@ invert () {\n }\n \n mk_repo_pair () {\n-\trm -rf master mirror &&\n+\trm -rf main mirror &&\n \tmkdir mirror &&\n \t(\n \t\tcd mirror &&\n \t\tgit init &&\n \t\tgit config receive.denyCurrentBranch warn\n \t) &&\n-\tmkdir master &&\n+\tmkdir main &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\tgit init &&\n \t\tgit remote add $1 up ../mirror\n \t)\n@@ -36,13 +36,13 @@ test_expect_success 'push mirror creates new branches' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/heads/master) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/heads/main) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/heads/main) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -50,15 +50,15 @@ test_expect_success 'push mirror updates existing branches' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit push --mirror up &&\n \t\techo two >foo && git add foo && git commit -m two &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/heads/master) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/heads/main) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/heads/main) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -66,7 +66,7 @@ test_expect_success 'push mirror force updates existing branches' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit push --mirror up &&\n \t\techo two >foo && git add foo && git commit -m two &&\n@@ -74,9 +74,9 @@ test_expect_success 'push mirror force updates existing branches' '\n \t\tgit reset --hard HEAD^ &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/heads/master) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/heads/main) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/heads/main) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -84,9 +84,9 @@ test_expect_success 'push mirror removes branches' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit branch remove master &&\n+\t\tgit branch remove main &&\n \t\tgit push --mirror up &&\n \t\tgit branch -D remove &&\n \t\tgit push --mirror up\n@@ -102,21 +102,21 @@ test_expect_success 'push mirror adds, updates and removes branches together' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit branch remove master &&\n+\t\tgit branch remove main &&\n \t\tgit push --mirror up &&\n \t\tgit branch -D remove &&\n-\t\tgit branch add master &&\n+\t\tgit branch add main &&\n \t\techo two >foo && git add foo && git commit -m two &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/heads/master) &&\n-\tmaster_add=$(cd master && git show-ref -s --verify refs/heads/add) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&\n+\tmain_main=$(cd main && git show-ref -s --verify refs/heads/main) &&\n+\tmain_add=$(cd main && git show-ref -s --verify refs/heads/add) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/heads/main) &&\n \tmirror_add=$(cd mirror && git show-ref -s --verify refs/heads/add) &&\n-\ttest \"$master_master\" = \"$mirror_master\" &&\n-\ttest \"$master_add\" = \"$mirror_add\" &&\n+\ttest \"$main_main\" = \"$mirror_main\" &&\n+\ttest \"$main_add\" = \"$mirror_add\" &&\n \t(\n \t\tcd mirror &&\n \t\tinvert git show-ref -s --verify refs/heads/remove\n@@ -130,14 +130,14 @@ test_expect_success 'push mirror creates new tags' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/tags/tmain) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/tags/tmain) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -145,17 +145,17 @@ test_expect_success 'push mirror updates existing tags' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up &&\n \t\techo two >foo && git add foo && git commit -m two &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/tags/tmain) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/tags/tmain) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -163,20 +163,20 @@ test_expect_success 'push mirror force updates existing tags' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up &&\n \t\techo two >foo && git add foo && git commit -m two &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up &&\n \t\tgit reset --hard HEAD^ &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/tags/tmain) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/tags/tmain) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -184,9 +184,9 @@ test_expect_success 'push mirror removes tags' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit tag -f tremove master &&\n+\t\tgit tag -f tremove main &&\n \t\tgit push --mirror up &&\n \t\tgit tag -d tremove &&\n \t\tgit push --mirror up\n@@ -202,23 +202,23 @@ test_expect_success 'push mirror adds, updates and removes tags together' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit tag -f tmaster master &&\n-\t\tgit tag -f tremove master &&\n+\t\tgit tag -f tmain main &&\n+\t\tgit tag -f tremove main &&\n \t\tgit push --mirror up &&\n \t\tgit tag -d tremove &&\n-\t\tgit tag tadd master &&\n+\t\tgit tag tadd main &&\n \t\techo two >foo && git add foo && git commit -m two &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&\n-\tmaster_add=$(cd master && git show-ref -s --verify refs/tags/tadd) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&\n+\tmain_main=$(cd main && git show-ref -s --verify refs/tags/tmain) &&\n+\tmain_add=$(cd main && git show-ref -s --verify refs/tags/tadd) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/tags/tmain) &&\n \tmirror_add=$(cd mirror && git show-ref -s --verify refs/tags/tadd) &&\n-\ttest \"$master_master\" = \"$mirror_master\" &&\n-\ttest \"$master_add\" = \"$mirror_add\" &&\n+\ttest \"$main_main\" = \"$mirror_main\" &&\n+\ttest \"$main_add\" = \"$mirror_add\" &&\n \t(\n \t\tcd mirror &&\n \t\tinvert git show-ref -s --verify refs/tags/tremove\n@@ -230,10 +230,10 @@ test_expect_success 'remote.foo.mirror adds and removes branches' '\n \n \tmk_repo_pair --mirror &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit branch keep master &&\n-\t\tgit branch remove master &&\n+\t\tgit branch keep main &&\n+\t\tgit branch remove main &&\n \t\tgit push up &&\n \t\tgit branch -D remove &&\n \t\tgit push up\n@@ -250,10 +250,10 @@ test_expect_success 'remote.foo.mirror=no has no effect' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit config --add remote.up.mirror no &&\n-\t\tgit branch keep master &&\n+\t\tgit branch keep main &&\n \t\tgit push --mirror up &&\n \t\tgit branch -D keep &&\n \t\tgit push up :\n@@ -268,10 +268,10 @@ test_expect_success 'remote.foo.mirror=no has no effect' '\n test_expect_success 'push to mirrored repository with refspec fails' '\n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit config --add remote.up.mirror true &&\n-\t\ttest_must_fail git push up master\n+\t\ttest_must_fail git push up main\n \t)\n '\n \ndiff --git a/t/t5518-fetch-exit-status.sh b/t/t5518-fetch-exit-status.sh\nindex c2060bb870..78ba5c290a 100755\n--- a/t/t5518-fetch-exit-status.sh\n+++ b/t/t5518-fetch-exit-status.sh\n@@ -17,20 +17,20 @@ test_expect_success setup '\n \techo side >file &&\n \tgit commit -a -m side &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo next >file &&\n \tgit commit -a -m next\n '\n \n test_expect_success 'non-fast-forward fetch' '\n \n-\ttest_must_fail git fetch . master:side\n+\ttest_must_fail git fetch . main:side\n \n '\n \n test_expect_success 'forced update' '\n \n-\tgit fetch . +master:side\n+\tgit fetch . +main:side\n \n '\n \ndiff --git a/t/t5519-push-alternates.sh b/t/t5519-push-alternates.sh\nindex 11fcd37700..1696eb5125 100755\n--- a/t/t5519-push-alternates.sh\n+++ b/t/t5519-push-alternates.sh\n@@ -17,7 +17,7 @@ test_expect_success setup '\n \t\t>file &&\n \t\tgit add . &&\n \t\tgit commit -m initial &&\n-\t\tgit push ../alice-pub master\n+\t\tgit push ../alice-pub main\n \t) &&\n \n \t# Project Bob is a fork of project Alice\n@@ -31,7 +31,7 @@ test_expect_success setup '\n \tgit clone alice-pub bob-work &&\n \t(\n \t\tcd bob-work &&\n-\t\tgit push ../bob-pub master\n+\t\tgit push ../bob-pub main\n \t)\n '\n \n@@ -54,7 +54,7 @@ test_expect_success 'bob fetches from alice, works and pushes' '\n \t\t# has at her public repository are available to it\n \t\t# via its alternates.\n \t\tcd bob-work &&\n-\t\tgit pull ../alice-pub master &&\n+\t\tgit pull ../alice-pub main &&\n \t\techo more bob >file &&\n \t\tgit commit -a -m third &&\n \t\tgit push ../bob-pub :\n@@ -93,7 +93,7 @@ test_expect_success 'alice works and pushes again' '\n test_expect_success 'bob works and pushes' '\n \t(\n \t\t# This time Bob does not pull from Alice, and\n-\t\t# the master branch at her public repository points\n+\t\t# the main branch at her public repository points\n \t\t# at a commit Bob does not know about.  This should\n \t\t# not prevent the push by Bob from succeeding.\n \t\tcd bob-work &&\n@@ -122,11 +122,11 @@ test_expect_success 'alice works and pushes yet again' '\n test_expect_success 'bob works and pushes again' '\n \t(\n \t\tcd alice-pub &&\n-\t\tgit cat-file commit master >../bob-work/commit\n+\t\tgit cat-file commit main >../bob-work/commit\n \t) &&\n \t(\n \t\t# This time Bob does not pull from Alice, and\n-\t\t# the master branch at her public repository points\n+\t\t# the main branch at her public repository points\n \t\t# at a commit Bob does not fully know about, but\n \t\t# he happens to have the commit object (but not the\n \t\t# necessary tree) in his repository from Alice.\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex ca86f666e6..a12a1993d0 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-4]*|5[0-4]*|550*)\n+[0-4]*|5[0-4]*|55[01]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410095","messageId":"dda6ce098c94d118adf92119df8714fc2ce4f20a.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 16/27] t5[6-9]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:16Z","receivedAt":"2020-11-17T16:13:02Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t5[6-9]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5601-clone.sh                    |  4 +-\n t/t5604-clone-reference.sh          | 12 +++---\n t/t5605-clone-local.sh              | 10 ++---\n t/t5606-clone-options.sh            |  8 ++--\n t/t5607-clone-bundle.sh             | 14 +++----\n t/t5608-clone-2gb.sh                |  2 +-\n t/t5609-clone-branch.sh             |  6 +--\n t/t5610-clone-detached.sh           |  4 +-\n t/t5611-clone-config.sh             | 16 ++++----\n t/t5612-clone-refspec.sh            | 42 ++++++++++-----------\n t/t5614-clone-submodules-shallow.sh |  2 +-\n t/t5616-partial-clone.sh            | 50 ++++++++++++-------------\n t/t5617-clone-submodules-remote.sh  |  6 +--\n t/t5700-protocol-v1.sh              | 16 ++++----\n t/t5701-git-serve.sh                | 16 ++++----\n t/t5702-protocol-v2.sh              | 50 ++++++++++++-------------\n t/t5703-upload-pack-ref-in-want.sh  | 58 ++++++++++++++---------------\n t/t5801-remote-helpers.sh           | 24 ++++++------\n t/test-lib.sh                       |  2 +-\n 19 files changed, 171 insertions(+), 171 deletions(-)\n\ndiff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\nindex 7df3c5373a..f5058be718 100755\n--- a/t/t5601-clone.sh\n+++ b/t/t5601-clone.sh\n@@ -217,7 +217,7 @@ test_expect_success 'clone respects global branch.autosetuprebase' '\n \t\trm -fr dst &&\n \t\tgit clone src dst &&\n \t\tcd dst &&\n-\t\tactual=\"z$(git config branch.master.rebase)\" &&\n+\t\tactual=\"z$(git config branch.main.rebase)\" &&\n \t\ttest ztrue = $actual\n \t)\n '\n@@ -591,7 +591,7 @@ test_expect_success 'clone from a repository with two identical branches' '\n \n \t(\n \t\tcd src &&\n-\t\tgit checkout -b another master\n+\t\tgit checkout -b another main\n \t) &&\n \tgit clone src target-11 &&\n \ttest \"z$( cd target-11 && git symbolic-ref HEAD )\" = zrefs/heads/another\ndiff --git a/t/t5604-clone-reference.sh b/t/t5604-clone-reference.sh\nindex 2f7be23044..db86a84af9 100755\n--- a/t/t5604-clone-reference.sh\n+++ b/t/t5604-clone-reference.sh\n@@ -49,7 +49,7 @@ test_expect_success 'existence of info/alternates' '\n '\n \n test_expect_success 'pulling from reference' '\n-\tgit -C C pull ../B master\n+\tgit -C C pull ../B main\n '\n \n test_expect_success 'that reference gets used' '\n@@ -70,7 +70,7 @@ test_expect_success 'existence of info/alternates' '\n '\n \n test_expect_success 'pulling from reference' '\n-\tgit -C D pull ../B master\n+\tgit -C D pull ../B main\n '\n \n test_expect_success 'that reference gets used' '\n@@ -136,11 +136,11 @@ test_expect_success 'prepare branched repository' '\n \tgit clone A J &&\n \t(\n \t\tcd J &&\n-\t\tgit checkout -b other master^ &&\n+\t\tgit checkout -b other main^ &&\n \t\techo other >otherfile &&\n \t\tgit add otherfile &&\n \t\tgit commit -m other &&\n-\t\tgit checkout master\n+\t\tgit checkout main\n \t)\n '\n \n@@ -152,9 +152,9 @@ test_expect_success 'fetch with incomplete alternates' '\n \t\tgit remote add J \"file://$base_dir/J\" &&\n \t\tGIT_TRACE_PACKET=$U.K git fetch J\n \t) &&\n-\tmaster_object=$(cd A && git for-each-ref --format=\"%(objectname)\" refs/heads/master) &&\n+\tmain_object=$(cd A && git for-each-ref --format=\"%(objectname)\" refs/heads/main) &&\n \ttest -s \"$U.K\" &&\n-\t! grep \" want $master_object\" \"$U.K\" &&\n+\t! grep \" want $main_object\" \"$U.K\" &&\n \ttag_object=$(cd A && git for-each-ref --format=\"%(objectname)\" refs/tags/HEAD) &&\n \t! grep \" want $tag_object\" \"$U.K\"\n '\ndiff --git a/t/t5605-clone-local.sh b/t/t5605-clone-local.sh\nindex af23419ebf..a7756e9622 100755\n--- a/t/t5605-clone-local.sh\n+++ b/t/t5605-clone-local.sh\n@@ -15,7 +15,7 @@ test_expect_success 'preparing origin repository' '\n \ttest \"$(cd a.git && git config --bool core.bare)\" = true &&\n \ttest \"$(cd x && git config --bool core.bare)\" = true &&\n \tgit bundle create b1.bundle --all &&\n-\tgit bundle create b2.bundle master &&\n+\tgit bundle create b2.bundle main &&\n \tmkdir dir &&\n \tcp b1.bundle dir/b3 &&\n \tcp b1.bundle b4\n@@ -84,7 +84,7 @@ test_expect_success 'bundle clone with nonexistent HEAD' '\n \tgit clone b2.bundle b2 &&\n \t(cd b2 &&\n \tgit fetch &&\n-\ttest_must_fail git rev-parse --verify refs/heads/master)\n+\ttest_must_fail git rev-parse --verify refs/heads/main)\n '\n \n test_expect_success 'clone empty repository' '\n@@ -98,9 +98,9 @@ test_expect_success 'clone empty repository' '\n \t echo \"content\" >> foo &&\n \t git add foo &&\n \t git commit -m \"Initial commit\" &&\n-\t git push origin master &&\n-\t expected=$(git rev-parse master) &&\n-\t actual=$(git --git-dir=../empty/.git rev-parse master) &&\n+\t git push origin main &&\n+\t expected=$(git rev-parse main) &&\n+\t actual=$(git --git-dir=../empty/.git rev-parse main) &&\n \t test $actual = $expected)\n '\n \ndiff --git a/t/t5606-clone-options.sh b/t/t5606-clone-options.sh\nindex 7f082fb23b..80caff9266 100755\n--- a/t/t5606-clone-options.sh\n+++ b/t/t5606-clone-options.sh\n@@ -15,7 +15,7 @@ test_expect_success 'setup' '\n test_expect_success 'clone -o' '\n \n \tgit clone -o foo parent clone-o &&\n-\tgit -C clone-o rev-parse --verify refs/remotes/foo/master\n+\tgit -C clone-o rev-parse --verify refs/remotes/foo/main\n \n '\n \n@@ -45,7 +45,7 @@ test_expect_success 'disallows --bare with --separate-git-dir' '\n test_expect_success 'uses \"origin\" for default remote name' '\n \n \tgit clone parent clone-default-origin &&\n-\tgit -C clone-default-origin rev-parse --verify refs/remotes/origin/master\n+\tgit -C clone-default-origin rev-parse --verify refs/remotes/origin/main\n \n '\n \n@@ -74,14 +74,14 @@ test_expect_success 'prefers config \"clone.defaultRemoteName\" over default' '\n \n \ttest_config_global clone.defaultRemoteName from_config &&\n \tgit clone parent clone-config-origin &&\n-\tgit -C clone-config-origin rev-parse --verify refs/remotes/from_config/master\n+\tgit -C clone-config-origin rev-parse --verify refs/remotes/from_config/main\n \n '\n \n test_expect_success 'prefers --origin over -c config' '\n \n \tgit clone -c clone.defaultRemoteName=inline --origin from_option parent clone-o-and-inline-config &&\n-\tgit -C clone-o-and-inline-config rev-parse --verify refs/remotes/from_option/master\n+\tgit -C clone-o-and-inline-config rev-parse --verify refs/remotes/from_option/main\n \n '\n \ndiff --git a/t/t5607-clone-bundle.sh b/t/t5607-clone-bundle.sh\nindex 26985f4b44..4f2db37981 100755\n--- a/t/t5607-clone-bundle.sh\n+++ b/t/t5607-clone-bundle.sh\n@@ -19,7 +19,7 @@ test_expect_success 'setup' '\n '\n \n test_expect_success '\"verify\" needs a worktree' '\n-\tgit bundle create tip.bundle -1 master &&\n+\tgit bundle create tip.bundle -1 main &&\n \tnongit test_must_fail git bundle verify ../tip.bundle 2>err &&\n \ttest_i18ngrep \"need a repository\" err\n '\n@@ -39,15 +39,15 @@ test_expect_success 'die if bundle file cannot be created' '\n '\n \n test_expect_failure 'bundle --stdin' '\n-\techo master | git bundle create stdin-bundle.bdl --stdin &&\n+\techo main | git bundle create stdin-bundle.bdl --stdin &&\n \tgit ls-remote stdin-bundle.bdl >output &&\n-\tgrep master output\n+\tgrep main output\n '\n \n test_expect_failure 'bundle --stdin <rev-list options>' '\n-\techo master | git bundle create hybrid-bundle.bdl --stdin tag &&\n+\techo main | git bundle create hybrid-bundle.bdl --stdin tag &&\n \tgit ls-remote hybrid-bundle.bdl >output &&\n-\tgrep master output\n+\tgrep main output\n '\n \n test_expect_success 'empty bundle file is rejected' '\n@@ -83,14 +83,14 @@ test_expect_success 'prerequisites with an empty commit message' '\n \n test_expect_success 'failed bundle creation does not leave cruft' '\n \t# This fails because the bundle would be empty.\n-\ttest_must_fail git bundle create fail.bundle master..master &&\n+\ttest_must_fail git bundle create fail.bundle main..main &&\n \ttest_path_is_missing fail.bundle.lock\n '\n \n test_expect_success 'fetch SHA-1 from bundle' '\n \ttest_create_repo foo &&\n \ttest_commit -C foo x &&\n-\tgit -C foo bundle create tip.bundle -1 master &&\n+\tgit -C foo bundle create tip.bundle -1 main &&\n \tgit -C foo rev-parse HEAD >hash &&\n \n \t# Exercise to ensure that fetching a SHA-1 from a bundle works with no\ndiff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\nindex 4c476d2fa1..87a8cd9f98 100755\n--- a/t/t5608-clone-2gb.sh\n+++ b/t/t5608-clone-2gb.sh\n@@ -26,7 +26,7 @@ test_expect_success 'setup' '\n \t\ti=$(($i+1)) ||\n \t\techo $? > exit-status\n \t done &&\n-\t echo \"commit refs/heads/master\" &&\n+\t echo \"commit refs/heads/main\" &&\n \t echo \"author A U Thor <author@email.com> 123456789 +0000\" &&\n \t echo \"committer C O Mitter <committer@email.com> 123456789 +0000\" &&\n \t echo \"data 5\" &&\ndiff --git a/t/t5609-clone-branch.sh b/t/t5609-clone-branch.sh\nindex 6e7a7be052..2652dbe4e4 100755\n--- a/t/t5609-clone-branch.sh\n+++ b/t/t5609-clone-branch.sh\n@@ -20,7 +20,7 @@ test_expect_success 'setup' '\n \t echo one >file && git add file && git commit -m one &&\n \t git checkout -b two &&\n \t echo two >file && git add file && git commit -m two &&\n-\t git checkout master) &&\n+\t git checkout main) &&\n \tmkdir empty &&\n \t(cd empty && git init)\n '\n@@ -28,7 +28,7 @@ test_expect_success 'setup' '\n test_expect_success 'vanilla clone chooses HEAD' '\n \tgit clone parent clone &&\n \t(cd clone &&\n-\t check_HEAD master &&\n+\t check_HEAD main &&\n \t check_file one\n \t)\n '\n@@ -53,7 +53,7 @@ test_expect_success 'clone -b sets up tracking' '\n \n test_expect_success 'clone -b does not munge remotes/origin/HEAD' '\n \t(cd clone-two &&\n-\t echo refs/remotes/origin/master >expect &&\n+\t echo refs/remotes/origin/main >expect &&\n \t git symbolic-ref refs/remotes/origin/HEAD >actual &&\n \t test_cmp expect actual\n \t)\ndiff --git a/t/t5610-clone-detached.sh b/t/t5610-clone-detached.sh\nindex 8b0d607df1..985f0d7303 100755\n--- a/t/t5610-clone-detached.sh\n+++ b/t/t5610-clone-detached.sh\n@@ -20,7 +20,7 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'clone repo (detached HEAD points to branch)' '\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit clone \"file://$PWD\" detached-branch\n '\n test_expect_success 'cloned HEAD matches' '\n@@ -59,7 +59,7 @@ test_expect_success 'cloned HEAD is detached' '\n '\n \n test_expect_success 'clone repo (orphan detached HEAD)' '\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \techo four >file &&\n \tgit commit -a -m four &&\n \tgit clone \"file://$PWD\" detached-orphan\ndiff --git a/t/t5611-clone-config.sh b/t/t5611-clone-config.sh\nindex 8e0fd39823..6e10ac9a9f 100755\n--- a/t/t5611-clone-config.sh\n+++ b/t/t5611-clone-config.sh\n@@ -47,16 +47,16 @@ test_expect_success 'clone -c config is available during clone' '\n \n test_expect_success 'clone -c remote.origin.fetch=<refspec> works' '\n \trm -rf child &&\n-\tgit update-ref refs/grab/it refs/heads/master &&\n-\tgit update-ref refs/leave/out refs/heads/master &&\n+\tgit update-ref refs/grab/it refs/heads/main &&\n+\tgit update-ref refs/leave/out refs/heads/main &&\n \tgit clone -c \"remote.origin.fetch=+refs/grab/*:refs/grab/*\" . child &&\n \tgit -C child for-each-ref --format=\"%(refname)\" >actual &&\n \n \tcat >expect <<-\\EOF &&\n \trefs/grab/it\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/remotes/origin/HEAD\n-\trefs/remotes/origin/master\n+\trefs/remotes/origin/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -68,9 +68,9 @@ test_expect_success 'git -c remote.origin.fetch=<refspec> clone works' '\n \n \tcat >expect <<-\\EOF &&\n \trefs/grab/it\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/remotes/origin/HEAD\n-\trefs/remotes/origin/master\n+\trefs/remotes/origin/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -85,9 +85,9 @@ test_expect_success 'clone -c remote.<remote>.fetch=<refspec> --origin=<name>' '\n \n \tcat >expect <<-\\EOF &&\n \trefs/grab/it\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/remotes/upstream/HEAD\n-\trefs/remotes/upstream/master\n+\trefs/remotes/upstream/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5612-clone-refspec.sh b/t/t5612-clone-refspec.sh\nindex e3b436d8ae..c045aba0fd 100755\n--- a/t/t5612-clone-refspec.sh\n+++ b/t/t5612-clone-refspec.sh\n@@ -4,7 +4,7 @@ test_description='test refspec written by clone-command'\n . ./test-lib.sh\n \n test_expect_success 'setup' '\n-\t# Make two branches, \"master\" and \"side\"\n+\t# Make two branches, \"main\" and \"side\"\n \techo one >file &&\n \tgit add file &&\n \tgit commit -m one &&\n@@ -16,7 +16,7 @@ test_expect_success 'setup' '\n \tgit checkout -b side &&\n \techo four >file &&\n \tgit commit -a -m four &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag five &&\n \n \t# default clone\n@@ -25,18 +25,18 @@ test_expect_success 'setup' '\n \t# default clone --no-tags\n \tgit clone --no-tags . dir_all_no_tags &&\n \n-\t# default --single that follows HEAD=master\n-\tgit clone --single-branch . dir_master &&\n+\t# default --single that follows HEAD=main\n+\tgit clone --single-branch . dir_main &&\n \n-\t# default --single that follows HEAD=master with no tags\n-\tgit clone --single-branch --no-tags . dir_master_no_tags &&\n+\t# default --single that follows HEAD=main with no tags\n+\tgit clone --single-branch --no-tags . dir_main_no_tags &&\n \n \t# default --single that follows HEAD=side\n \tgit checkout side &&\n \tgit clone --single-branch . dir_side &&\n \n \t# explicit --single that follows side\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit clone --single-branch --branch side . dir_side2 &&\n \n \t# default --single with --mirror\n@@ -55,11 +55,11 @@ test_expect_success 'setup' '\n \t# explicit --single with tag and --no-tags\n \tgit clone --single-branch --no-tags --branch two . dir_tag_no_tags &&\n \n-\t# advance both \"master\" and \"side\" branches\n+\t# advance both \"main\" and \"side\" branches\n \tgit checkout side &&\n \techo five >file &&\n \tgit commit -a -m five &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo six >file &&\n \tgit commit -a -m six &&\n \n@@ -75,7 +75,7 @@ test_expect_success 'by default all branches will be kept updated' '\n \t\tsed -e \"/HEAD$/d\" \\\n \t\t    -e \"s|/remotes/origin/|/heads/|\" refs >../actual\n \t) &&\n-\t# follow both master and side\n+\t# follow both main and side\n \tgit for-each-ref refs/heads >expect &&\n \ttest_cmp expect actual\n '\n@@ -100,20 +100,20 @@ test_expect_success 'clone with --no-tags' '\n \ttest_must_be_empty actual\n '\n \n-test_expect_success '--single-branch while HEAD pointing at master' '\n+test_expect_success '--single-branch while HEAD pointing at main' '\n \t(\n-\t\tcd dir_master &&\n+\t\tcd dir_main &&\n \t\tgit fetch --force &&\n \t\tgit for-each-ref refs/remotes/origin >refs &&\n \t\tsed -e \"/HEAD$/d\" \\\n \t\t    -e \"s|/remotes/origin/|/heads/|\" refs >../actual\n \t) &&\n-\t# only follow master\n-\tgit for-each-ref refs/heads/master >expect &&\n+\t# only follow main\n+\tgit for-each-ref refs/heads/main >expect &&\n \t# get & check latest tags\n \ttest_cmp expect actual &&\n \t(\n-\t\tcd dir_master &&\n+\t\tcd dir_main &&\n \t\tgit fetch --tags --force &&\n \t\tgit for-each-ref refs/tags >../actual\n \t) &&\n@@ -122,20 +122,20 @@ test_expect_success '--single-branch while HEAD pointing at master' '\n \ttest_line_count = 2 actual\n '\n \n-test_expect_success '--single-branch while HEAD pointing at master and --no-tags' '\n+test_expect_success '--single-branch while HEAD pointing at main and --no-tags' '\n \t(\n-\t\tcd dir_master_no_tags &&\n+\t\tcd dir_main_no_tags &&\n \t\tgit fetch &&\n \t\tgit for-each-ref refs/remotes/origin >refs &&\n \t\tsed -e \"/HEAD$/d\" \\\n \t\t    -e \"s|/remotes/origin/|/heads/|\" refs >../actual\n \t) &&\n-\t# only follow master\n-\tgit for-each-ref refs/heads/master >expect &&\n+\t# only follow main\n+\tgit for-each-ref refs/heads/main >expect &&\n \ttest_cmp expect actual &&\n \t# get tags (noop)\n \t(\n-\t\tcd dir_master_no_tags &&\n+\t\tcd dir_main_no_tags &&\n \t\tgit fetch &&\n \t\tgit for-each-ref refs/tags >../actual\n \t) &&\n@@ -143,7 +143,7 @@ test_expect_success '--single-branch while HEAD pointing at master and --no-tags\n \ttest_line_count = 0 actual &&\n \t# get tags with --tags overrides tagOpt\n \t(\n-\t\tcd dir_master_no_tags &&\n+\t\tcd dir_main_no_tags &&\n \t\tgit fetch --tags &&\n \t\tgit for-each-ref refs/tags >../actual\n \t) &&\ndiff --git a/t/t5614-clone-submodules-shallow.sh b/t/t5614-clone-submodules-shallow.sh\nindex e4e6ea4d52..5504b519c7 100755\n--- a/t/t5614-clone-submodules-shallow.sh\n+++ b/t/t5614-clone-submodules-shallow.sh\n@@ -7,7 +7,7 @@ test_description='Test shallow cloning of repos with submodules'\n pwd=$(pwd)\n \n test_expect_success 'setup' '\n-\tgit checkout -b master &&\n+\tgit checkout -b main &&\n \ttest_commit commit1 &&\n \ttest_commit commit2 &&\n \tmkdir sub &&\ndiff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh\nindex f4d49d8335..273c0183e2 100755\n--- a/t/t5616-partial-clone.sh\n+++ b/t/t5616-partial-clone.sh\n@@ -51,14 +51,14 @@ test_expect_success 'verify that .promisor file contains refs fetched' '\n \ttest_line_count = 1 promisorlist &&\n \tgit -C srv.bare rev-parse --verify HEAD >headhash &&\n \tgrep \"$(cat headhash) HEAD\" $(cat promisorlist) &&\n-\tgrep \"$(cat headhash) refs/heads/master\" $(cat promisorlist)\n+\tgrep \"$(cat headhash) refs/heads/main\" $(cat promisorlist)\n '\n \n-# checkout master to force dynamic object fetch of blobs at HEAD.\n+# checkout main to force dynamic object fetch of blobs at HEAD.\n test_expect_success 'verify checkout with dynamic object fetch' '\n \tgit -C pc1 rev-list --quiet --objects --missing=print HEAD >observed &&\n \ttest_line_count = 4 observed &&\n-\tgit -C pc1 checkout master &&\n+\tgit -C pc1 checkout main &&\n \tgit -C pc1 rev-list --quiet --objects --missing=print HEAD >observed &&\n \ttest_line_count = 0 observed\n '\n@@ -73,8 +73,8 @@ test_expect_success 'push new commits to server' '\n \t\tgit -C src add file.1.txt\n \t\tgit -C src commit -m \"mod $x\"\n \tdone &&\n-\tgit -C src blame master -- file.1.txt >expect.blame &&\n-\tgit -C src push -u srv master\n+\tgit -C src blame main -- file.1.txt >expect.blame &&\n+\tgit -C src push -u srv main\n '\n \n # (partial) fetch in the partial clone repo from the promisor remote.\n@@ -83,26 +83,26 @@ test_expect_success 'push new commits to server' '\n test_expect_success 'partial fetch inherits filter settings' '\n \tgit -C pc1 fetch origin &&\n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\tmaster..origin/master >observed &&\n+\t\tmain..origin/main >observed &&\n \ttest_line_count = 5 observed\n '\n \n # force dynamic object fetch using diff.\n-# we should only get 1 new blob (for the file in origin/master).\n+# we should only get 1 new blob (for the file in origin/main).\n test_expect_success 'verify diff causes dynamic object fetch' '\n-\tgit -C pc1 diff master..origin/master -- file.1.txt &&\n+\tgit -C pc1 diff main..origin/main -- file.1.txt &&\n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\t master..origin/master >observed &&\n+\t\t main..origin/main >observed &&\n \ttest_line_count = 4 observed\n '\n \n # force full dynamic object fetch of the file's history using blame.\n # we should get the intermediate blobs for the file.\n test_expect_success 'verify blame causes dynamic object fetch' '\n-\tgit -C pc1 blame origin/master -- file.1.txt >observed.blame &&\n+\tgit -C pc1 blame origin/main -- file.1.txt >observed.blame &&\n \ttest_cmp expect.blame observed.blame &&\n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\tmaster..origin/master >observed &&\n+\t\tmain..origin/main >observed &&\n \ttest_line_count = 0 observed\n '\n \n@@ -115,7 +115,7 @@ test_expect_success 'push new commits to server for file.2.txt' '\n \t\tgit -C src add file.2.txt\n \t\tgit -C src commit -m \"mod $x\"\n \tdone &&\n-\tgit -C src push -u srv master\n+\tgit -C src push -u srv main\n '\n \n # Do FULL fetch by disabling inherited filter-spec using --no-filter.\n@@ -123,7 +123,7 @@ test_expect_success 'push new commits to server for file.2.txt' '\n test_expect_success 'override inherited filter-spec using --no-filter' '\n \tgit -C pc1 fetch --no-filter origin &&\n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\tmaster..origin/master >observed &&\n+\t\tmain..origin/main >observed &&\n \ttest_line_count = 0 observed\n '\n \n@@ -136,7 +136,7 @@ test_expect_success 'push new commits to server for file.3.txt' '\n \t\tgit -C src add file.3.txt\n \t\tgit -C src commit -m \"mod $x\"\n \tdone &&\n-\tgit -C src push -u srv master\n+\tgit -C src push -u srv main\n '\n \n # Do a partial fetch and then try to manually fetch the missing objects.\n@@ -146,7 +146,7 @@ test_expect_success 'manual prefetch of missing objects' '\n \tgit -C pc1 fetch --filter=blob:none origin &&\n \n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\t master..origin/master >revs &&\n+\t\t main..origin/main >revs &&\n \tawk -f print_1.awk revs |\n \tsed \"s/?//\" |\n \tsort >observed.oids &&\n@@ -155,7 +155,7 @@ test_expect_success 'manual prefetch of missing objects' '\n \tgit -C pc1 fetch-pack --stdin \"file://$(pwd)/srv.bare\" <observed.oids &&\n \n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\tmaster..origin/master >revs &&\n+\t\tmain..origin/main >revs &&\n \tawk -f print_1.awk revs |\n \tsed \"s/?//\" |\n \tsort >observed.oids &&\n@@ -196,7 +196,7 @@ test_expect_success 'use fsck before and after manually fetching a missing subtr\n \techo \"in dir\" >src/dir/file.txt &&\n \tgit -C src add dir/file.txt &&\n \tgit -C src commit -m \"file in dir\" &&\n-\tgit -C src push -u srv master &&\n+\tgit -C src push -u srv main &&\n \tSUBTREE=$(git -C src rev-parse HEAD:dir) &&\n \n \trm -rf dst &&\n@@ -204,7 +204,7 @@ test_expect_success 'use fsck before and after manually fetching a missing subtr\n \tgit -C dst fsck &&\n \n \t# Make sure we only have commits, and all trees and blobs are missing.\n-\tgit -C dst rev-list --missing=allow-any --objects master \\\n+\tgit -C dst rev-list --missing=allow-any --objects main \\\n \t\t>fetched_objects &&\n \tawk -f print_1.awk fetched_objects |\n \txargs -n1 git -C dst cat-file -t >fetched_types &&\n@@ -221,7 +221,7 @@ test_expect_success 'use fsck before and after manually fetching a missing subtr\n \tgit -C dst fsck &&\n \n \t# Auto-fetch all remaining trees and blobs with --missing=error\n-\tgit -C dst rev-list --missing=error --objects master >fetched_objects &&\n+\tgit -C dst rev-list --missing=error --objects main >fetched_objects &&\n \ttest_line_count = 70 fetched_objects &&\n \n \tawk -f print_1.awk fetched_objects |\n@@ -331,7 +331,7 @@ test_expect_success 'setup src repo for sparse filter' '\n test_expect_success 'partial clone with sparse filter succeeds' '\n \trm -rf dst.git &&\n \tgit clone --no-local --bare \\\n-\t\t  --filter=sparse:oid=master:only-one \\\n+\t\t  --filter=sparse:oid=main:only-one \\\n \t\t  sparse-src dst.git &&\n \t(\n \t\tcd dst.git &&\n@@ -344,11 +344,11 @@ test_expect_success 'partial clone with sparse filter succeeds' '\n test_expect_success 'partial clone with unresolvable sparse filter fails cleanly' '\n \trm -rf dst.git &&\n \ttest_must_fail git clone --no-local --bare \\\n-\t\t\t\t --filter=sparse:oid=master:no-such-name \\\n+\t\t\t\t --filter=sparse:oid=main:no-such-name \\\n \t\t\t\t sparse-src dst.git 2>err &&\n-\ttest_i18ngrep \"unable to access sparse blob in .master:no-such-name\" err &&\n+\ttest_i18ngrep \"unable to access sparse blob in .main:no-such-name\" err &&\n \ttest_must_fail git clone --no-local --bare \\\n-\t\t\t\t --filter=sparse:oid=master \\\n+\t\t\t\t --filter=sparse:oid=main \\\n \t\t\t\t sparse-src dst.git 2>err &&\n \ttest_i18ngrep \"unable to parse sparse filter data in\" err\n '\n@@ -403,7 +403,7 @@ test_expect_success 'fetch lazy-fetches only to resolve deltas' '\n \t# promisor remote other than for the big tree (because it needs to\n \t# resolve the delta).\n \tGIT_TRACE_PACKET=\"$(pwd)/trace\" git -C client \\\n-\t\tfetch \"file://$(pwd)/server\" master &&\n+\t\tfetch \"file://$(pwd)/server\" main &&\n \n \t# Verify the assumption that the client needed to fetch the delta base\n \t# to resolve the delta.\n@@ -422,7 +422,7 @@ test_expect_success 'fetch lazy-fetches only to resolve deltas, protocol v2' '\n \t# promisor remote other than for the big blob (because it needs to\n \t# resolve the delta).\n \tGIT_TRACE_PACKET=\"$(pwd)/trace\" git -C client \\\n-\t\tfetch \"file://$(pwd)/server\" master &&\n+\t\tfetch \"file://$(pwd)/server\" main &&\n \n \t# Verify that protocol version 2 was used.\n \tgrep \"fetch< version 2\" trace &&\ndiff --git a/t/t5617-clone-submodules-remote.sh b/t/t5617-clone-submodules-remote.sh\nindex 1a041df10b..abab358119 100755\n--- a/t/t5617-clone-submodules-remote.sh\n+++ b/t/t5617-clone-submodules-remote.sh\n@@ -7,7 +7,7 @@ test_description='Test cloning repos with submodules using remote-tracking branc\n pwd=$(pwd)\n \n test_expect_success 'setup' '\n-\tgit checkout -b master &&\n+\tgit checkout -b main &&\n \ttest_commit commit1 &&\n \tmkdir sub &&\n \t(\n@@ -39,7 +39,7 @@ test_expect_success 'clone with --remote-submodules' '\n \tgit clone --recurse-submodules --remote-submodules \"file://$pwd/.\" super_clone &&\n \t(\n \t\tcd super_clone/sub &&\n-\t\tgit diff --exit-code remotes/origin/master\n+\t\tgit diff --exit-code remotes/origin/main\n \t)\n '\n \n@@ -57,7 +57,7 @@ test_expect_success 'clone with --single-branch' '\n \tgit clone --recurse-submodules --single-branch \"file://$pwd/.\" super_clone &&\n \t(\n \t\tcd super_clone/sub &&\n-\t\tgit rev-parse --verify origin/master &&\n+\t\tgit rev-parse --verify origin/main &&\n \t\ttest_must_fail git rev-parse --verify origin/other\n \t)\n '\ndiff --git a/t/t5700-protocol-v1.sh b/t/t5700-protocol-v1.sh\nindex 022901b9eb..bfa7e3379a 100755\n--- a/t/t5700-protocol-v1.sh\n+++ b/t/t5700-protocol-v1.sh\n@@ -41,7 +41,7 @@ test_expect_success 'fetch with git:// using protocol v1' '\n \tGIT_TRACE_PACKET=1 git -C daemon_child -c protocol.version=1 \\\n \t\tfetch 2>log &&\n \n-\tgit -C daemon_child log -1 --format=%s origin/master >actual &&\n+\tgit -C daemon_child log -1 --format=%s origin/main >actual &&\n \tgit -C \"$daemon_parent\" log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -69,7 +69,7 @@ test_expect_success 'push with git:// using protocol v1' '\n \ttest_commit -C daemon_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=1 git -C daemon_child -c protocol.version=1 \\\n \t\tpush origin HEAD:client_branch 2>log &&\n \n@@ -110,7 +110,7 @@ test_expect_success 'fetch with file:// using protocol v1' '\n \tGIT_TRACE_PACKET=1 git -C file_child -c protocol.version=1 \\\n \t\tfetch 2>log &&\n \n-\tgit -C file_child log -1 --format=%s origin/master >actual &&\n+\tgit -C file_child log -1 --format=%s origin/main >actual &&\n \tgit -C file_parent log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -134,7 +134,7 @@ test_expect_success 'push with file:// using protocol v1' '\n \ttest_commit -C file_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=1 git -C file_child -c protocol.version=1 \\\n \t\tpush origin HEAD:client_branch 2>log &&\n \n@@ -188,7 +188,7 @@ test_expect_success 'fetch with ssh:// using protocol v1' '\n \t\tfetch 2>log &&\n \texpect_ssh git-upload-pack &&\n \n-\tgit -C ssh_child log -1 --format=%s origin/master >actual &&\n+\tgit -C ssh_child log -1 --format=%s origin/main >actual &&\n \tgit -C ssh_parent log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -213,7 +213,7 @@ test_expect_success 'push with ssh:// using protocol v1' '\n \ttest_commit -C ssh_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=1 git -C ssh_child -c protocol.version=1 \\\n \t\tpush origin HEAD:client_branch 2>log &&\n \texpect_ssh git-receive-pack &&\n@@ -257,7 +257,7 @@ test_expect_success 'fetch with http:// using protocol v1' '\n \tGIT_TRACE_PACKET=1 git -C http_child -c protocol.version=1 \\\n \t\tfetch 2>log &&\n \n-\tgit -C http_child log -1 --format=%s origin/master >actual &&\n+\tgit -C http_child log -1 --format=%s origin/main >actual &&\n \tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH/http_parent\" log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -281,7 +281,7 @@ test_expect_success 'push with http:// using protocol v1' '\n \ttest_commit -C http_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=1 git -C http_child -c protocol.version=1 \\\n \t\tpush origin HEAD:client_branch && #2>log &&\n \ndiff --git a/t/t5701-git-serve.sh b/t/t5701-git-serve.sh\nindex a1f5fdc9fd..3a04a56c2c 100755\n--- a/t/t5701-git-serve.sh\n+++ b/t/t5701-git-serve.sh\n@@ -83,9 +83,9 @@ test_expect_success 'wrong object-format' '\n #\n test_expect_success 'setup some refs and tags' '\n \ttest_commit one &&\n-\tgit branch dev master &&\n+\tgit branch dev main &&\n \ttest_commit two &&\n-\tgit symbolic-ref refs/heads/release refs/heads/master &&\n+\tgit symbolic-ref refs/heads/release refs/heads/main &&\n \tgit tag -a -m \"annotated tag\" annotated-tag\n '\n \n@@ -99,7 +99,7 @@ test_expect_success 'basics of ls-refs' '\n \tcat >expect <<-EOF &&\n \t$(git rev-parse HEAD) HEAD\n \t$(git rev-parse refs/heads/dev) refs/heads/dev\n-\t$(git rev-parse refs/heads/master) refs/heads/master\n+\t$(git rev-parse refs/heads/main) refs/heads/main\n \t$(git rev-parse refs/heads/release) refs/heads/release\n \t$(git rev-parse refs/tags/annotated-tag) refs/tags/annotated-tag\n \t$(git rev-parse refs/tags/one) refs/tags/one\n@@ -117,13 +117,13 @@ test_expect_success 'basic ref-prefixes' '\n \tcommand=ls-refs\n \tobject-format=$(test_oid algo)\n \t0001\n-\tref-prefix refs/heads/master\n+\tref-prefix refs/heads/main\n \tref-prefix refs/tags/one\n \t0000\n \tEOF\n \n \tcat >expect <<-EOF &&\n-\t$(git rev-parse refs/heads/master) refs/heads/master\n+\t$(git rev-parse refs/heads/main) refs/heads/main\n \t$(git rev-parse refs/tags/one) refs/tags/one\n \t0000\n \tEOF\n@@ -144,7 +144,7 @@ test_expect_success 'refs/heads prefix' '\n \n \tcat >expect <<-EOF &&\n \t$(git rev-parse refs/heads/dev) refs/heads/dev\n-\t$(git rev-parse refs/heads/master) refs/heads/master\n+\t$(git rev-parse refs/heads/main) refs/heads/main\n \t$(git rev-parse refs/heads/release) refs/heads/release\n \t0000\n \tEOF\n@@ -188,8 +188,8 @@ test_expect_success 'symrefs parameter' '\n \n \tcat >expect <<-EOF &&\n \t$(git rev-parse refs/heads/dev) refs/heads/dev\n-\t$(git rev-parse refs/heads/master) refs/heads/master\n-\t$(git rev-parse refs/heads/release) refs/heads/release symref-target:refs/heads/master\n+\t$(git rev-parse refs/heads/main) refs/heads/main\n+\t$(git rev-parse refs/heads/release) refs/heads/release symref-target:refs/heads/main\n \t0000\n \tEOF\n \ndiff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh\nindex 7d5b17909b..1aeb6b6dd7 100755\n--- a/t/t5702-protocol-v2.sh\n+++ b/t/t5702-protocol-v2.sh\n@@ -36,10 +36,10 @@ test_expect_success 'ref advertisement is filtered with ls-remote using protocol\n \ttest_when_finished \"rm -f log\" &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -c protocol.version=2 \\\n-\t\tls-remote \"$GIT_DAEMON_URL/parent\" master >actual &&\n+\t\tls-remote \"$GIT_DAEMON_URL/parent\" main >actual &&\n \n \tcat >expect <<-EOF &&\n-\t$(git -C \"$daemon_parent\" rev-parse refs/heads/master)$(printf \"\\t\")refs/heads/master\n+\t$(git -C \"$daemon_parent\" rev-parse refs/heads/main)$(printf \"\\t\")refs/heads/main\n \tEOF\n \n \ttest_cmp expect actual\n@@ -69,7 +69,7 @@ test_expect_success 'fetch with git:// using protocol v2' '\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C daemon_child -c protocol.version=2 \\\n \t\tfetch &&\n \n-\tgit -C daemon_child log -1 --format=%s origin/master >actual &&\n+\tgit -C daemon_child log -1 --format=%s origin/main >actual &&\n \tgit -C \"$daemon_parent\" log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -118,7 +118,7 @@ test_expect_success 'push with git:// and a config of v2 does not request v2' '\n \ttest_commit -C daemon_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C daemon_child -c protocol.version=2 \\\n \t\tpush origin HEAD:client_branch &&\n \n@@ -158,10 +158,10 @@ test_expect_success 'ref advertisement is filtered with ls-remote using protocol\n \ttest_when_finished \"rm -f log\" &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -c protocol.version=2 \\\n-\t\tls-remote \"file://$(pwd)/file_parent\" master >actual &&\n+\t\tls-remote \"file://$(pwd)/file_parent\" main >actual &&\n \n \tcat >expect <<-EOF &&\n-\t$(git -C file_parent rev-parse refs/heads/master)$(printf \"\\t\")refs/heads/master\n+\t$(git -C file_parent rev-parse refs/heads/main)$(printf \"\\t\")refs/heads/main\n \tEOF\n \n \ttest_cmp expect actual\n@@ -171,10 +171,10 @@ test_expect_success 'server-options are sent when using ls-remote' '\n \ttest_when_finished \"rm -f log\" &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -c protocol.version=2 \\\n-\t\tls-remote -o hello -o world \"file://$(pwd)/file_parent\" master >actual &&\n+\t\tls-remote -o hello -o world \"file://$(pwd)/file_parent\" main >actual &&\n \n \tcat >expect <<-EOF &&\n-\t$(git -C file_parent rev-parse refs/heads/master)$(printf \"\\t\")refs/heads/master\n+\t$(git -C file_parent rev-parse refs/heads/main)$(printf \"\\t\")refs/heads/main\n \tEOF\n \n \ttest_cmp expect actual &&\n@@ -184,7 +184,7 @@ test_expect_success 'server-options are sent when using ls-remote' '\n \n test_expect_success 'warn if using server-option with ls-remote with legacy protocol' '\n \ttest_must_fail env GIT_TEST_PROTOCOL_VERSION=0 git -c protocol.version=0 \\\n-\t\tls-remote -o hello -o world \"file://$(pwd)/file_parent\" master 2>err &&\n+\t\tls-remote -o hello -o world \"file://$(pwd)/file_parent\" main 2>err &&\n \n \ttest_i18ngrep \"see protocol.version in\" err &&\n \ttest_i18ngrep \"server options require protocol version 2 or later\" err\n@@ -217,7 +217,7 @@ test_expect_success 'fetch with file:// using protocol v2' '\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C file_child -c protocol.version=2 \\\n \t\tfetch origin &&\n \n-\tgit -C file_child log -1 --format=%s origin/master >actual &&\n+\tgit -C file_child log -1 --format=%s origin/main >actual &&\n \tgit -C file_parent log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -232,13 +232,13 @@ test_expect_success 'ref advertisement is filtered during fetch using protocol v\n \tgit -C file_parent branch unwanted-branch three &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C file_child -c protocol.version=2 \\\n-\t\tfetch origin master &&\n+\t\tfetch origin main &&\n \n-\tgit -C file_child log -1 --format=%s origin/master >actual &&\n+\tgit -C file_child log -1 --format=%s origin/main >actual &&\n \tgit -C file_parent log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n-\tgrep \"refs/heads/master\" log &&\n+\tgrep \"refs/heads/main\" log &&\n \t! grep \"refs/heads/unwanted-branch\" log\n '\n \n@@ -248,9 +248,9 @@ test_expect_success 'server-options are sent when fetching' '\n \ttest_commit -C file_parent four &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C file_child -c protocol.version=2 \\\n-\t\tfetch -o hello -o world origin master &&\n+\t\tfetch -o hello -o world origin main &&\n \n-\tgit -C file_child log -1 --format=%s origin/master >actual &&\n+\tgit -C file_child log -1 --format=%s origin/main >actual &&\n \tgit -C file_parent log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -264,7 +264,7 @@ test_expect_success 'warn if using server-option with fetch with legacy protocol\n \tgit init temp_child &&\n \n \ttest_must_fail env GIT_TEST_PROTOCOL_VERSION=0 git -C temp_child -c protocol.version=0 \\\n-\t\tfetch -o hello -o world \"file://$(pwd)/file_parent\" master 2>err &&\n+\t\tfetch -o hello -o world \"file://$(pwd)/file_parent\" main 2>err &&\n \n \ttest_i18ngrep \"see protocol.version in\" err &&\n \ttest_i18ngrep \"server options require protocol version 2 or later\" err\n@@ -325,7 +325,7 @@ test_expect_success 'partial clone' '\n \tgrep \"version 2\" trace &&\n \n \t# Ensure that the old version of the file is missing\n-\tgit -C client rev-list --quiet --objects --missing=print master \\\n+\tgit -C client rev-list --quiet --objects --missing=print main \\\n \t\t>observed.oids &&\n \tgrep \"$(git -C server rev-parse message1:a.txt)\" observed.oids &&\n \n@@ -350,7 +350,7 @@ test_expect_success 'partial fetch' '\n \tSERVER=\"file://$(pwd)/server\" &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/trace\" git -C client -c protocol.version=2 \\\n-\t\tfetch --filter=blob:none \"$SERVER\" master:refs/heads/other &&\n+\t\tfetch --filter=blob:none \"$SERVER\" main:refs/heads/other &&\n \tgrep \"version 2\" trace &&\n \n \t# Ensure that the old version of the file is missing\n@@ -395,7 +395,7 @@ test_expect_success 'even with handcrafted request, filter does not work if not\n \tcommand=fetch\n \tobject-format=$(test_oid algo)\n \t0001\n-\twant $(git -C server rev-parse master)\n+\twant $(git -C server rev-parse main)\n \tfilter blob:none\n \t0000\n \tEOF\n@@ -539,7 +539,7 @@ test_expect_success 'deepen-relative' '\n \ttest_commit -C server four &&\n \n \t# Sanity check that only \"three\" is downloaded\n-\tgit -C client log --pretty=tformat:%s master >actual &&\n+\tgit -C client log --pretty=tformat:%s main >actual &&\n \techo three >expected &&\n \ttest_cmp expected actual &&\n \n@@ -548,7 +548,7 @@ test_expect_success 'deepen-relative' '\n \t# Ensure that protocol v2 is used\n \tgrep \"fetch< version 2\" trace &&\n \n-\tgit -C client log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C client log --pretty=tformat:%s origin/main >actual &&\n \tcat >expected <<-\\EOF &&\n \tfour\n \tthree\n@@ -670,7 +670,7 @@ test_expect_success 'fetch with http:// using protocol v2' '\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C http_child -c protocol.version=2 \\\n \t\tfetch &&\n \n-\tgit -C http_child log -1 --format=%s origin/master >actual &&\n+\tgit -C http_child log -1 --format=%s origin/main >actual &&\n \tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH/http_parent\" log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -698,11 +698,11 @@ test_expect_success 'fetch from namespaced repo respects namespaces' '\n \ttest_commit -C \"$HTTPD_DOCUMENT_ROOT_PATH/nsrepo\" one &&\n \ttest_commit -C \"$HTTPD_DOCUMENT_ROOT_PATH/nsrepo\" two &&\n \tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH/nsrepo\" \\\n-\t\tupdate-ref refs/namespaces/ns/refs/heads/master one &&\n+\t\tupdate-ref refs/namespaces/ns/refs/heads/main one &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C http_child -c protocol.version=2 \\\n \t\tfetch \"$HTTPD_URL/smart_namespace/nsrepo\" \\\n-\t\trefs/heads/master:refs/heads/theirs &&\n+\t\trefs/heads/main:refs/heads/theirs &&\n \n \t# Server responded using protocol v2\n \tgrep \"fetch< version 2\" log &&\n@@ -733,7 +733,7 @@ test_expect_success 'push with http:// and a config of v2 does not request v2' '\n \ttest_commit -C http_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C http_child -c protocol.version=2 \\\n \t\tpush origin HEAD:client_branch &&\n \ndiff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\nindex b46940b725..bbf03a8f66 100755\n--- a/t/t5703-upload-pack-ref-in-want.sh\n+++ b/t/t5703-upload-pack-ref-in-want.sh\n@@ -38,7 +38,7 @@ write_command () {\n \n # c(o/foo) d(o/bar)\n #        \\ /\n-#         b   e(baz)  f(master)\n+#         b   e(baz)  f(main)\n #          \\__  |  __/\n #             \\ | /\n #               a\n@@ -51,7 +51,7 @@ test_expect_success 'setup repository' '\n \ttest_commit d &&\n \tgit checkout -b baz a &&\n \ttest_commit e &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit f\n '\n \n@@ -88,7 +88,7 @@ test_expect_success 'invalid want-ref line' '\n test_expect_success 'basic want-ref' '\n \toid=$(git rev-parse f) &&\n \tcat >expected_refs <<-EOF &&\n-\t$oid refs/heads/master\n+\t$oid refs/heads/main\n \tEOF\n \tgit rev-parse f >expected_commits &&\n \n@@ -97,7 +97,7 @@ test_expect_success 'basic want-ref' '\n \t$(write_command fetch)\n \t0001\n \tno-progress\n-\twant-ref refs/heads/master\n+\twant-ref refs/heads/main\n \thave $oid\n \tdone\n \t0000\n@@ -135,7 +135,7 @@ test_expect_success 'multiple want-ref lines' '\n test_expect_success 'mix want and want-ref' '\n \toid=$(git rev-parse f) &&\n \tcat >expected_refs <<-EOF &&\n-\t$oid refs/heads/master\n+\t$oid refs/heads/main\n \tEOF\n \tgit rev-parse e f >expected_commits &&\n \n@@ -143,7 +143,7 @@ test_expect_success 'mix want and want-ref' '\n \t$(write_command fetch)\n \t0001\n \tno-progress\n-\twant-ref refs/heads/master\n+\twant-ref refs/heads/main\n \twant $(git rev-parse e)\n \thave $(git rev-parse a)\n \tdone\n@@ -182,7 +182,7 @@ LOCAL_PRISTINE=\"$(pwd)/local_pristine\"\n # $REPO\n # c(o/foo) d(o/bar)\n #        \\ /\n-#         b   e(baz)  f(master)\n+#         b   e(baz)  f(main)\n #          \\__  |  __/\n #             \\ | /\n #               a\n@@ -193,7 +193,7 @@ LOCAL_PRISTINE=\"$(pwd)/local_pristine\"\n #\t\t.\n #\t\t.\n #\t\t|\n-#\t\ta(master)\n+#\t\ta(main)\n test_expect_success 'setup repos for fetching with ref-in-want tests' '\n \t(\n \t\tgit init \"$REPO\" &&\n@@ -209,7 +209,7 @@ test_expect_success 'setup repos for fetching with ref-in-want tests' '\n \t\ttest_commit_bulk --id=s 33 &&\n \n \t\t# Add novel commits to upstream\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tcd \"$REPO\" &&\n \t\tgit checkout -b o/foo &&\n \t\ttest_commit b &&\n@@ -218,7 +218,7 @@ test_expect_success 'setup repos for fetching with ref-in-want tests' '\n \t\ttest_commit d &&\n \t\tgit checkout -b baz a &&\n \t\ttest_commit e &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit f\n \t) &&\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant true &&\n@@ -245,12 +245,12 @@ test_expect_success 'fetching multiple refs' '\n \n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C local fetch origin master baz &&\n+\tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C local fetch origin main baz &&\n \n-\tgit -C \"$REPO\" rev-parse \"master\" \"baz\" >expected &&\n-\tgit -C local rev-parse refs/remotes/origin/master refs/remotes/origin/baz >actual &&\n+\tgit -C \"$REPO\" rev-parse \"main\" \"baz\" >expected &&\n+\tgit -C local rev-parse refs/remotes/origin/main refs/remotes/origin/baz >actual &&\n \ttest_cmp expected actual &&\n-\tgrep \"want-ref refs/heads/master\" log &&\n+\tgrep \"want-ref refs/heads/main\" log &&\n \tgrep \"want-ref refs/heads/baz\" log\n '\n \n@@ -261,13 +261,13 @@ test_expect_success 'fetching ref and exact OID' '\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n \toid=$(git -C \"$REPO\" rev-parse b) &&\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C local fetch origin \\\n-\t\tmaster \"$oid\":refs/heads/actual &&\n+\t\tmain \"$oid\":refs/heads/actual &&\n \n-\tgit -C \"$REPO\" rev-parse \"master\" \"b\" >expected &&\n-\tgit -C local rev-parse refs/remotes/origin/master refs/heads/actual >actual &&\n+\tgit -C \"$REPO\" rev-parse \"main\" \"b\" >expected &&\n+\tgit -C local rev-parse refs/remotes/origin/main refs/heads/actual >actual &&\n \ttest_cmp expected actual &&\n \tgrep \"want $oid\" log &&\n-\tgrep \"want-ref refs/heads/master\" log\n+\tgrep \"want-ref refs/heads/main\" log\n '\n \n test_expect_success 'fetching with wildcard that does not match any refs' '\n@@ -316,7 +316,7 @@ test_expect_success 'setup repos for change-while-negotiating test' '\n \t\ttest_commit_bulk --id=s 33 &&\n \n \t\t# Add novel commits to upstream\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tcd \"$REPO\" &&\n \t\ttest_commit m2 &&\n \t\ttest_commit m3 &&\n@@ -342,7 +342,7 @@ test_expect_success 'server is initially ahead - no ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant false &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tinconsistency master $(test_oid numeric) &&\n+\tinconsistency main $(test_oid numeric) &&\n \ttest_must_fail git -C local fetch 2>err &&\n \ttest_i18ngrep \"fatal: remote error: upload-pack: not our ref\" err\n '\n@@ -351,11 +351,11 @@ test_expect_success 'server is initially ahead - ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant true &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tinconsistency master $(test_oid numeric) &&\n+\tinconsistency main $(test_oid numeric) &&\n \tgit -C local fetch &&\n \n-\tgit -C \"$REPO\" rev-parse --verify master >expected &&\n-\tgit -C local rev-parse --verify refs/remotes/origin/master >actual &&\n+\tgit -C \"$REPO\" rev-parse --verify main >expected &&\n+\tgit -C local rev-parse --verify refs/remotes/origin/main >actual &&\n \ttest_cmp expected actual\n '\n \n@@ -363,11 +363,11 @@ test_expect_success 'server is initially behind - no ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant false &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tinconsistency master \"master^\" &&\n+\tinconsistency main \"main^\" &&\n \tgit -C local fetch &&\n \n-\tgit -C \"$REPO\" rev-parse --verify \"master^\" >expected &&\n-\tgit -C local rev-parse --verify refs/remotes/origin/master >actual &&\n+\tgit -C \"$REPO\" rev-parse --verify \"main^\" >expected &&\n+\tgit -C local rev-parse --verify refs/remotes/origin/main >actual &&\n \ttest_cmp expected actual\n '\n \n@@ -375,11 +375,11 @@ test_expect_success 'server is initially behind - ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant true &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tinconsistency master \"master^\" &&\n+\tinconsistency main \"main^\" &&\n \tgit -C local fetch &&\n \n-\tgit -C \"$REPO\" rev-parse --verify \"master\" >expected &&\n-\tgit -C local rev-parse --verify refs/remotes/origin/master >actual &&\n+\tgit -C \"$REPO\" rev-parse --verify \"main\" >expected &&\n+\tgit -C local rev-parse --verify refs/remotes/origin/main >actual &&\n \ttest_cmp expected actual\n '\n \ndiff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh\nindex 0f04b6cddb..306fe9e5e1 100755\n--- a/t/t5801-remote-helpers.sh\n+++ b/t/t5801-remote-helpers.sh\n@@ -71,18 +71,18 @@ test_expect_success 'fetch multiple branches' '\n \t(cd local &&\n \t git fetch\n \t) &&\n-\tcompare_refs server master local refs/remotes/origin/master &&\n+\tcompare_refs server main local refs/remotes/origin/main &&\n \tcompare_refs server new local refs/remotes/origin/new\n '\n \n test_expect_success 'push when remote has extra refs' '\n \t(cd local &&\n-\t git reset --hard origin/master &&\n+\t git reset --hard origin/main &&\n \t echo content >>file &&\n \t git commit -a -m six &&\n \t git push\n \t) &&\n-\tcompare_refs local master server master\n+\tcompare_refs local main server main\n '\n \n test_expect_success 'push new branch by name' '\n@@ -174,7 +174,7 @@ test_expect_failure 'pushing without marks' '\n \n test_expect_success 'push all with existing object' '\n \t(cd local &&\n-\tgit branch dup2 master &&\n+\tgit branch dup2 main &&\n \tgit push origin --all\n \t) &&\n \tcompare_refs local dup2 server dup2\n@@ -182,7 +182,7 @@ test_expect_success 'push all with existing object' '\n \n test_expect_success 'push ref with existing object' '\n \t(cd local &&\n-\tgit branch dup master &&\n+\tgit branch dup main &&\n \tgit push origin dup\n \t) &&\n \tcompare_refs local dup server dup\n@@ -190,7 +190,7 @@ test_expect_success 'push ref with existing object' '\n \n test_expect_success GPG 'push signed tag' '\n \t(cd local &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag -s -m signed-tag signed-tag &&\n \tgit push origin signed-tag\n \t) &&\n@@ -200,7 +200,7 @@ test_expect_success GPG 'push signed tag' '\n \n test_expect_success GPG 'push signed tag with signed-tags capability' '\n \t(cd local &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag -s -m signed-tag signed-tag-2 &&\n \tGIT_REMOTE_TESTGIT_SIGNED_TAGS=1 git push origin signed-tag-2\n \t) &&\n@@ -209,7 +209,7 @@ test_expect_success GPG 'push signed tag with signed-tags capability' '\n \n test_expect_success 'push update refs' '\n \t(cd local &&\n-\tgit checkout -b update master &&\n+\tgit checkout -b update main &&\n \techo update >>file &&\n \tgit commit -a -m update &&\n \tgit push origin update &&\n@@ -260,7 +260,7 @@ test_expect_success 'proper failure checks for fetching' '\n test_expect_success 'proper failure checks for pushing' '\n \ttest_when_finished \"rm -rf local/git.marks local/testgit.marks\" &&\n \t(cd local &&\n-\tgit checkout -b crash master &&\n+\tgit checkout -b crash main &&\n \techo crash >>file &&\n \tgit commit -a -m crash &&\n \ttest_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 git push --all &&\n@@ -272,7 +272,7 @@ test_expect_success 'proper failure checks for pushing' '\n \n test_expect_success 'push messages' '\n \t(cd local &&\n-\tgit checkout -b new_branch master &&\n+\tgit checkout -b new_branch main &&\n \techo new >>file &&\n \tgit commit -a -m new &&\n \tgit push origin new_branch &&\n@@ -286,7 +286,7 @@ test_expect_success 'push messages' '\n \n test_expect_success 'fetch HEAD' '\n \t(cd server &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo more >>file &&\n \tgit commit -a -m more\n \t) &&\n@@ -298,7 +298,7 @@ test_expect_success 'fetch HEAD' '\n \n test_expect_success 'fetch url' '\n \t(cd server &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo more >>file &&\n \tgit commit -a -m more\n \t) &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 3e0c9413f1..11e02d615a 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-4]*|5[0-5]*)\n+[0-5]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410097","messageId":"c37d97c2d829a7a366742c7bf78eec461bb10d5d.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 15/27] t55[4-9]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:15Z","receivedAt":"2020-11-17T16:13:02Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -e 's/retsam/niam/g' \\\n\t\t-- t55[4-9]*.sh t556x*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nNote that t5541 uses the reversed `master` name: `retsam`. We replace it\nby the equivalent for `main`: `niam`.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5540-http-push-webdav.sh          |  8 +--\n t/t5541-http-push-smart.sh           | 40 +++++++-------\n t/t5542-push-http-shallow.sh         |  8 +--\n t/t5543-atomic-push.sh               | 80 +++++++++++++--------------\n t/t5545-push-options.sh              | 62 ++++++++++-----------\n t/t5548-push-porcelain.sh            | 64 +++++++++++-----------\n t/t5550-http-fetch-dumb.sh           | 20 +++----\n t/t5551-http-fetch-smart.sh          | 20 +++----\n t/t5552-skipping-fetch-negotiator.sh |  2 +-\n t/t5553-set-upstream.sh              | 82 ++++++++++++++--------------\n t/t5561-http-backend.sh              |  4 +-\n t/t556x_common                       |  8 +--\n t/t5570-git-daemon.sh                | 16 +++---\n t/t5571-pre-push-hook.sh             |  4 +-\n t/t5572-pull-submodule.sh            |  4 +-\n t/t5580-unc-paths.sh                 |  2 +-\n t/t5581-http-curl-verbose.sh         |  2 +-\n t/t5582-fetch-negative-refspec.sh    | 22 ++++----\n t/test-lib.sh                        |  2 +-\n 19 files changed, 225 insertions(+), 225 deletions(-)\n\ndiff --git a/t/t5540-http-push-webdav.sh b/t/t5540-http-push-webdav.sh\nindex 450321fddb..1973d8bb32 100755\n--- a/t/t5540-http-push-webdav.sh\n+++ b/t/t5540-http-push-webdav.sh\n@@ -71,7 +71,7 @@ test_expect_success 'push already up-to-date' '\n test_expect_success 'push to remote repository with unpacked refs' '\n \t(cd \"$HTTPD_DOCUMENT_ROOT_PATH\"/test_repo.git &&\n \t rm packed-refs &&\n-\t git update-ref refs/heads/master $ORIG_HEAD &&\n+\t git update-ref refs/heads/main $ORIG_HEAD &&\n \t git --bare update-server-info) &&\n \tgit push &&\n \t(cd \"$HTTPD_DOCUMENT_ROOT_PATH\"/test_repo.git &&\n@@ -91,7 +91,7 @@ test_expect_success 'http-push fetches unpacked objects' '\n \t git remote rm origin &&\n \t git reflog expire --expire=0 --all &&\n \t git prune &&\n-\t git push -f -v $HTTPD_URL/dumb/test_repo_unpacked.git master)\n+\t git push -f -v $HTTPD_URL/dumb/test_repo_unpacked.git main)\n '\n \n test_expect_success 'http-push fetches packed objects' '\n@@ -111,7 +111,7 @@ test_expect_success 'http-push fetches packed objects' '\n \t git remote remove origin &&\n \t git reflog expire --expire=0 --all &&\n \t git prune &&\n-\t git push -f -v $HTTPD_URL/dumb/test_repo_packed.git master)\n+\t git push -f -v $HTTPD_URL/dumb/test_repo_packed.git main)\n '\n \n test_expect_success 'create and delete remote branch' '\n@@ -163,7 +163,7 @@ test_expect_success 'PUT and MOVE sends object to URLs with SHA-1 hash suffix' '\n '\n \n test_http_push_nonff \"$HTTPD_DOCUMENT_ROOT_PATH\"/test_repo.git \\\n-\t\"$ROOT_PATH\"/test_repo_clone master\n+\t\"$ROOT_PATH\"/test_repo_clone main\n \n test_expect_success 'push to password-protected repository (user in URL)' '\n \ttest_commit pw-user &&\ndiff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh\nindex 187454f5dd..ae90ed230b 100755\n--- a/t/t5541-http-push-smart.sh\n+++ b/t/t5541-http-push-smart.sh\n@@ -142,23 +142,23 @@ test_expect_success 'used receive-pack service' '\n '\n \n test_http_push_nonff \"$HTTPD_DOCUMENT_ROOT_PATH\"/test_repo.git \\\n-\t\"$ROOT_PATH\"/test_repo_clone master \t\tsuccess\n+\t\"$ROOT_PATH\"/test_repo_clone main \t\tsuccess\n \n test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper' '\n \t# create a dissimilarly-named remote ref so that git is unable to match the\n \t# two refs (viz. local, remote) unless an explicit refspec is provided.\n-\tgit push origin master:retsam &&\n+\tgit push origin main:niam &&\n \n \techo \"change changed\" > path2 &&\n \tgit commit -a -m path2 --amend &&\n \n-\t# push master too; this ensures there is at least one '\"'push'\"' command to\n+\t# push main too; this ensures there is at least one '\"'push'\"' command to\n \t# the remote helper and triggers interaction with the helper.\n-\ttest_must_fail git push -v origin +master master:retsam >output 2>&1'\n+\ttest_must_fail git push -v origin +main main:niam >output 2>&1'\n \n test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper: remote output' '\n-\tgrep \"^ + [a-f0-9]*\\.\\.\\.[a-f0-9]* *master -> master (forced update)$\" output &&\n-\tgrep \"^ ! \\[rejected\\] *master -> retsam (non-fast-forward)$\" output\n+\tgrep \"^ + [a-f0-9]*\\.\\.\\.[a-f0-9]* *main -> main (forced update)$\" output &&\n+\tgrep \"^ ! \\[rejected\\] *main -> niam (non-fast-forward)$\" output\n '\n \n test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper: our output' '\n@@ -167,7 +167,7 @@ test_expect_success 'push fails for non-fast-forward refs unmatched by remote he\n '\n \n test_expect_success 'push (chunked)' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit commit path3 &&\n \tHEAD=$(git rev-parse --verify HEAD) &&\n \ttest_config http.postbuffer 4 &&\n@@ -177,9 +177,9 @@ test_expect_success 'push (chunked)' '\n \t test $HEAD = $(git rev-parse --verify HEAD))\n '\n \n-## References of remote: atomic1(1)            master(2) collateral(2) other(2)\n-## References of local :            atomic2(2) master(1) collateral(3) other(2) collateral1(3) atomic(1)\n-## Atomic push         :                       master(1) collateral(3)                         atomic(1)\n+## References of remote: atomic1(1)            main(2) collateral(2) other(2)\n+## References of local :            atomic2(2) main(1) collateral(3) other(2) collateral1(3) atomic(1)\n+## Atomic push         :                       main(1) collateral(3)                         atomic(1)\n test_expect_success 'push --atomic also prevents branch creation, reports collateral' '\n \t# Setup upstream repo - empty for now\n \td=$HTTPD_DOCUMENT_ROOT_PATH/atomic-branches.git &&\n@@ -192,15 +192,15 @@ test_expect_success 'push --atomic also prevents branch creation, reports collat\n \ttest_commit atomic2 &&\n \tgit branch collateral &&\n \tgit branch other &&\n-\tgit push \"$up\" atomic1 master collateral other &&\n+\tgit push \"$up\" atomic1 main collateral other &&\n \tgit tag -d atomic1 &&\n \n \t# collateral is a valid push, but should be failed by atomic push\n \tgit checkout collateral &&\n \ttest_commit collateral1 &&\n \n-\t# Make master incompatible with upstream to provoke atomic\n-\tgit checkout master &&\n+\t# Make main incompatible with upstream to provoke atomic\n+\tgit checkout main &&\n \tgit reset --hard HEAD^ &&\n \n \t# Add a new branch which should be failed by atomic push. This is a\n@@ -208,7 +208,7 @@ test_expect_success 'push --atomic also prevents branch creation, reports collat\n \tgit branch atomic &&\n \n \t# --atomic should cause entire push to be rejected\n-\ttest_must_fail git push --atomic \"$up\" master atomic collateral 2>output &&\n+\ttest_must_fail git push --atomic \"$up\" main atomic collateral 2>output &&\n \n \t# the new branch should not have been created upstream\n \ttest_must_fail git -C \"$d\" show-ref --verify refs/heads/atomic &&\n@@ -216,15 +216,15 @@ test_expect_success 'push --atomic also prevents branch creation, reports collat\n \t# upstream should still reflect atomic2, the last thing we pushed\n \t# successfully\n \tgit rev-parse atomic2 >expected &&\n-\t# on master...\n-\tgit -C \"$d\" rev-parse refs/heads/master >actual &&\n+\t# on main...\n+\tgit -C \"$d\" rev-parse refs/heads/main >actual &&\n \ttest_cmp expected actual &&\n \t# ...and collateral.\n \tgit -C \"$d\" rev-parse refs/heads/collateral >actual &&\n \ttest_cmp expected actual &&\n \n \t# the failed refs should be indicated to the user\n-\tgrep \"^ ! .*rejected.* master -> master\" output &&\n+\tgrep \"^ ! .*rejected.* main -> main\" output &&\n \n \t# the collateral failure refs should be indicated to the user\n \tgrep \"^ ! .*rejected.* atomic -> atomic .*atomic push failed\" output &&\n@@ -472,9 +472,9 @@ test_expect_success 'clone/fetch scrubs password from reflogs' '\n \ttest_commit prepare-for-force-fetch &&\n \tgit switch -c away &&\n \tgit fetch \"$HTTPD_URL_USER_PASS/smart/test_repo.git\" \\\n-\t\t+master:master &&\n+\t\t+main:main &&\n \t# should have been scrubbed down to vanilla URL\n-\tgit log -g master >reflog &&\n+\tgit log -g main >reflog &&\n \tgrep \"$HTTPD_URL\" reflog &&\n \t! grep \"$HTTPD_URL_USER_PASS\" reflog\n '\n@@ -498,7 +498,7 @@ test_expect_success 'colorize errors/hints' '\n \tcd \"$ROOT_PATH\"/test_repo_clone &&\n \ttest_must_fail git -c color.transport=always -c color.advice=always \\\n \t\t-c color.push=always \\\n-\t\tpush origin origin/master^:master 2>act &&\n+\t\tpush origin origin/main^:main 2>act &&\n \ttest_decode_color <act >decoded &&\n \ttest_i18ngrep \"<RED>.*rejected.*<RESET>\" decoded &&\n \ttest_i18ngrep \"<RED>error: failed to push some refs\" decoded &&\ndiff --git a/t/t5542-push-http-shallow.sh b/t/t5542-push-http-shallow.sh\nindex ddc1db722d..0d8f5219da 100755\n--- a/t/t5542-push-http-shallow.sh\n+++ b/t/t5542-push-http-shallow.sh\n@@ -51,12 +51,12 @@ test_expect_success 'push to shallow repo via http' '\n \t(\n \tcd full &&\n \tcommit 9 &&\n-\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master\n+\tgit push $HTTPD_URL/smart/repo.git +main:refs/remotes/top/main\n \t) &&\n \t(\n \tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n \tgit fsck &&\n-\tgit log --format=%s top/master >actual &&\n+\tgit log --format=%s top/main >actual &&\n \tcat <<EOF >expect &&\n 9\n 4\n@@ -74,11 +74,11 @@ test_expect_success 'push from shallow repo via http' '\n \tgit config http.receivepack true\n \t) &&\n \tcommit 10 &&\n-\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master &&\n+\tgit push $HTTPD_URL/smart/repo.git +main:refs/remotes/top/main &&\n \t(\n \tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n \tgit fsck &&\n-\tgit log --format=%s top/master >actual &&\n+\tgit log --format=%s top/main >actual &&\n \tcat <<EOF >expect &&\n 10\n 4\ndiff --git a/t/t5543-atomic-push.sh b/t/t5543-atomic-push.sh\nindex 620c30d58f..01a9a6e9e0 100755\n--- a/t/t5543-atomic-push.sh\n+++ b/t/t5543-atomic-push.sh\n@@ -40,9 +40,9 @@ test_expect_success 'atomic push works for a single branch' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit push --atomic up master\n+\t\tgit push --atomic up main\n \t) &&\n-\ttest_refs master master\n+\ttest_refs main main\n '\n \n test_expect_success 'atomic push works for two branches' '\n@@ -55,9 +55,9 @@ test_expect_success 'atomic push works for two branches' '\n \t\ttest_commit two &&\n \t\tgit checkout second &&\n \t\ttest_commit three &&\n-\t\tgit push --atomic up master second\n+\t\tgit push --atomic up main second\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \ttest_refs second second\n '\n \n@@ -70,7 +70,7 @@ test_expect_success 'atomic push works in combination with --mirror' '\n \t\ttest_commit two &&\n \t\tgit push --atomic --mirror up\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \ttest_refs second second\n '\n \n@@ -79,7 +79,7 @@ test_expect_success 'atomic push works in combination with --force' '\n \t(\n \t\tcd workbench &&\n \t\ttest_commit one &&\n-\t\tgit branch second master &&\n+\t\tgit branch second main &&\n \t\ttest_commit two_a &&\n \t\tgit checkout second &&\n \t\ttest_commit two_b &&\n@@ -87,36 +87,36 @@ test_expect_success 'atomic push works in combination with --force' '\n \t\ttest_commit four &&\n \t\tgit push --mirror up &&\n \t\t# The actual test is below\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit three_a &&\n \t\tgit checkout second &&\n \t\tgit reset --hard HEAD^ &&\n-\t\tgit push --force --atomic up master second\n+\t\tgit push --force --atomic up main second\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \ttest_refs second second\n '\n \n-# set up two branches where master can be pushed but second can not\n+# set up two branches where main can be pushed but second can not\n # (non-fast-forward). Since second can not be pushed the whole operation\n-# will fail and leave master untouched.\n+# will fail and leave main untouched.\n test_expect_success 'atomic push fails if one branch fails' '\n \tmk_repo_pair &&\n \t(\n \t\tcd workbench &&\n \t\ttest_commit one &&\n-\t\tgit checkout -b second master &&\n+\t\tgit checkout -b second main &&\n \t\ttest_commit two &&\n \t\ttest_commit three &&\n \t\ttest_commit four &&\n \t\tgit push --mirror up &&\n \t\tgit reset --hard HEAD~2 &&\n \t\ttest_commit five &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit six &&\n \t\ttest_must_fail git push --atomic --all up\n \t) &&\n-\ttest_refs master HEAD@{7} &&\n+\ttest_refs main HEAD@{7} &&\n \ttest_refs second HEAD@{4}\n '\n \n@@ -126,7 +126,7 @@ test_expect_success 'atomic push fails if one tag fails remotely' '\n \t(\n \t\tcd workbench &&\n \t\ttest_commit one &&\n-\t\tgit checkout -b second master &&\n+\t\tgit checkout -b second main &&\n \t\ttest_commit two &&\n \t\tgit push --mirror up\n \t) &&\n@@ -139,14 +139,14 @@ test_expect_success 'atomic push fails if one tag fails remotely' '\n \t# see if we can now push both branches.\n \t(\n \t\tcd workbench &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit three &&\n \t\tgit checkout second &&\n \t\ttest_commit four &&\n \t\tgit tag test_tag &&\n-\t\ttest_must_fail git push --tags --atomic up master second\n+\t\ttest_must_fail git push --tags --atomic up main second\n \t) &&\n-\ttest_refs master HEAD@{3} &&\n+\ttest_refs main HEAD@{3} &&\n \ttest_refs second HEAD@{1}\n '\n \n@@ -155,7 +155,7 @@ test_expect_success 'atomic push obeys update hook preventing a branch to be pus\n \t(\n \t\tcd workbench &&\n \t\ttest_commit one &&\n-\t\tgit checkout -b second master &&\n+\t\tgit checkout -b second main &&\n \t\ttest_commit two &&\n \t\tgit push --mirror up\n \t) &&\n@@ -165,19 +165,19 @@ test_expect_success 'atomic push obeys update hook preventing a branch to be pus\n \t\tHOOK=\"$HOOKDIR/update\" &&\n \t\tmkdir -p \"$HOOKDIR\" &&\n \t\twrite_script \"$HOOK\" <<-\\EOF\n-\t\t\t# only allow update to master from now on\n-\t\t\ttest \"$1\" = \"refs/heads/master\"\n+\t\t\t# only allow update to main from now on\n+\t\t\ttest \"$1\" = \"refs/heads/main\"\n \t\tEOF\n \t) &&\n \t(\n \t\tcd workbench &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit three &&\n \t\tgit checkout second &&\n \t\ttest_commit four &&\n-\t\ttest_must_fail git push --atomic up master second\n+\t\ttest_must_fail git push --atomic up main second\n \t) &&\n-\ttest_refs master HEAD@{3} &&\n+\ttest_refs main HEAD@{3} &&\n \ttest_refs second HEAD@{1}\n '\n \n@@ -192,21 +192,21 @@ test_expect_success 'atomic push is not advertised if configured' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\ttest_must_fail git push --atomic up master\n+\t\ttest_must_fail git push --atomic up main\n \t) &&\n-\ttest_refs master HEAD@{1}\n+\ttest_refs main HEAD@{1}\n '\n \n-# References in upstream : master(1) one(1) foo(1)\n-# References in workbench: master(2)        foo(1) two(2) bar(2)\n-# Atomic push            : master(2)               two(2) bar(2)\n+# References in upstream : main(1) one(1) foo(1)\n+# References in workbench: main(2)        foo(1) two(2) bar(2)\n+# Atomic push            : main(2)               two(2) bar(2)\n test_expect_success 'atomic push reports (reject by update hook)' '\n \tmk_repo_pair &&\n \t(\n \t\tcd workbench &&\n \t\ttest_commit one &&\n \t\tgit branch foo &&\n-\t\tgit push up master one foo &&\n+\t\tgit push up main one foo &&\n \t\tgit tag -d one\n \t) &&\n \t(\n@@ -228,19 +228,19 @@ test_expect_success 'atomic push reports (reject by update hook)' '\n \t\tgit branch bar\n \t) &&\n \ttest_must_fail git -C workbench \\\n-\t\tpush --atomic up master two bar >out 2>&1 &&\n+\t\tpush --atomic up main two bar >out 2>&1 &&\n \tfmt_status_report <out >actual &&\n \tcat >expect <<-EOF &&\n \tTo ../upstream\n-\t ! [remote rejected] master -> master (atomic push failure)\n+\t ! [remote rejected] main -> main (atomic push failure)\n \t ! [remote rejected] two -> two (atomic push failure)\n \t ! [remote rejected] bar -> bar (hook declined)\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# References in upstream : master(1) one(1) foo(1)\n-# References in workbench: master(2)        foo(1) two(2) bar(2)\n+# References in upstream : main(1) one(1) foo(1)\n+# References in workbench: main(2)        foo(1) two(2) bar(2)\n test_expect_success 'atomic push reports (mirror, but reject by update hook)' '\n \t(\n \t\tcd workbench &&\n@@ -252,7 +252,7 @@ test_expect_success 'atomic push reports (mirror, but reject by update hook)' '\n \tfmt_status_report <out >actual &&\n \tcat >expect <<-EOF &&\n \tTo ../upstream\n-\t ! [remote rejected] master -> master (atomic push failure)\n+\t ! [remote rejected] main -> main (atomic push failure)\n \t ! [remote rejected] one (atomic push failure)\n \t ! [remote rejected] bar -> bar (hook declined)\n \t ! [remote rejected] two -> two (atomic push failure)\n@@ -260,21 +260,21 @@ test_expect_success 'atomic push reports (mirror, but reject by update hook)' '\n \ttest_cmp expect actual\n '\n \n-# References in upstream : master(2) one(1) foo(1)\n-# References in workbench: master(1)        foo(1) two(2) bar(2)\n+# References in upstream : main(2) one(1) foo(1)\n+# References in workbench: main(1)        foo(1) two(2) bar(2)\n test_expect_success 'atomic push reports (reject by non-ff)' '\n \trm upstream/.git/hooks/update &&\n \t(\n \t\tcd workbench &&\n-\t\tgit push up master &&\n+\t\tgit push up main &&\n \t\tgit reset --hard HEAD^\n \t) &&\n \ttest_must_fail git -C workbench \\\n-\t\tpush --atomic up master foo bar >out 2>&1 &&\n+\t\tpush --atomic up main foo bar >out 2>&1 &&\n \tfmt_status_report <out >actual &&\n \tcat >expect <<-EOF &&\n \tTo ../upstream\n-\t ! [rejected] master -> master (non-fast-forward)\n+\t ! [rejected] main -> main (non-fast-forward)\n \t ! [rejected] bar -> bar (atomic push failed)\n \tEOF\n \ttest_cmp expect actual\ndiff --git a/t/t5545-push-options.sh b/t/t5545-push-options.sh\nindex 38e6f7340e..a1276bbc33 100755\n--- a/t/t5545-push-options.sh\n+++ b/t/t5545-push-options.sh\n@@ -63,9 +63,9 @@ test_expect_success 'one push option works for a single branch' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit push --push-option=asdf up master\n+\t\tgit push --push-option=asdf up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \techo \"asdf\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -79,9 +79,9 @@ test_expect_success 'push option denied by remote' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\ttest_must_fail git push --push-option=asdf up master\n+\t\ttest_must_fail git push --push-option=asdf up main\n \t) &&\n-\ttest_refs master HEAD@{1}\n+\ttest_refs main HEAD@{1}\n '\n \n test_expect_success 'two push options work' '\n@@ -92,9 +92,9 @@ test_expect_success 'two push options work' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit push --push-option=asdf --push-option=\"more structured text\" up master\n+\t\tgit push --push-option=asdf --push-option=\"more structured text\" up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \tprintf \"asdf\\nmore structured text\\n\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -123,14 +123,14 @@ test_expect_success 'push options and submodules' '\n \n \tgit -C parent push \\\n \t\t--push-option=asdf --push-option=\"more structured text\" \\\n-\t\t--recurse-submodules=on-demand up master &&\n+\t\t--recurse-submodules=on-demand up main &&\n \n-\tgit -C upstream rev-parse --verify master >expect &&\n-\tgit -C parent/workbench rev-parse --verify master >actual &&\n+\tgit -C upstream rev-parse --verify main >expect &&\n+\tgit -C parent/workbench rev-parse --verify main >actual &&\n \ttest_cmp expect actual &&\n \n-\tgit -C parent_upstream rev-parse --verify master >expect &&\n-\tgit -C parent rev-parse --verify master >actual &&\n+\tgit -C parent_upstream rev-parse --verify main >expect &&\n+\tgit -C parent rev-parse --verify main >actual &&\n \ttest_cmp expect actual &&\n \n \tprintf \"asdf\\nmore structured text\\n\" >expect &&\n@@ -148,9 +148,9 @@ test_expect_success 'default push option' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit -c push.pushOption=default push up master\n+\t\tgit -c push.pushOption=default push up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \techo \"default\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -164,9 +164,9 @@ test_expect_success 'two default push options' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit -c push.pushOption=default1 -c push.pushOption=default2 push up master\n+\t\tgit -c push.pushOption=default1 -c push.pushOption=default2 push up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \tprintf \"default1\\ndefault2\\n\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -180,9 +180,9 @@ test_expect_success 'push option from command line overrides from-config push op\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit -c push.pushOption=default push --push-option=manual up master\n+\t\tgit -c push.pushOption=default push --push-option=manual up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \techo \"manual\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -196,9 +196,9 @@ test_expect_success 'empty value of push.pushOption in config clears the list' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit -c push.pushOption=default1 -c push.pushOption= -c push.pushOption=default2 push up master\n+\t\tgit -c push.pushOption=default1 -c push.pushOption= -c push.pushOption=default2 push up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \techo \"default2\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -212,16 +212,16 @@ test_expect_success 'invalid push option in config' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\ttest_must_fail git -c push.pushOption push up master\n+\t\ttest_must_fail git -c push.pushOption push up main\n \t) &&\n-\ttest_refs master HEAD@{1}\n+\ttest_refs main HEAD@{1}\n '\n \n test_expect_success 'push options keep quoted characters intact (direct)' '\n \tmk_repo_pair &&\n \tgit -C upstream config receive.advertisePushOptions true &&\n \ttest_commit -C workbench one &&\n-\tgit -C workbench push --push-option=\"\\\"embedded quotes\\\"\" up master &&\n+\tgit -C workbench push --push-option=\"\\\"embedded quotes\\\"\" up main &&\n \techo \"\\\"embedded quotes\\\"\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options\n '\n@@ -244,28 +244,28 @@ mk_http_pair () {\n test_expect_success 'push option denied properly by http server' '\n \tmk_http_pair false &&\n \ttest_commit -C test_http_clone one &&\n-\ttest_must_fail git -C test_http_clone push --push-option=asdf origin master 2>actual &&\n+\ttest_must_fail git -C test_http_clone push --push-option=asdf origin main 2>actual &&\n \ttest_i18ngrep \"the receiving end does not support push options\" actual &&\n-\tgit -C test_http_clone push origin master\n+\tgit -C test_http_clone push origin main\n '\n \n test_expect_success 'push options work properly across http' '\n \tmk_http_pair true &&\n \n \ttest_commit -C test_http_clone one &&\n-\tgit -C test_http_clone push origin master &&\n-\tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git rev-parse --verify master >expect &&\n-\tgit -C test_http_clone rev-parse --verify master >actual &&\n+\tgit -C test_http_clone push origin main &&\n+\tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git rev-parse --verify main >expect &&\n+\tgit -C test_http_clone rev-parse --verify main >actual &&\n \ttest_cmp expect actual &&\n \n \ttest_commit -C test_http_clone two &&\n-\tgit -C test_http_clone push --push-option=asdf --push-option=\"more structured text\" origin master &&\n+\tgit -C test_http_clone push --push-option=asdf --push-option=\"more structured text\" origin main &&\n \tprintf \"asdf\\nmore structured text\\n\" >expect &&\n \ttest_cmp expect \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git/hooks/post-receive.push_options &&\n \n-\tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git rev-parse --verify master >expect &&\n-\tgit -C test_http_clone rev-parse --verify master >actual &&\n+\tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git rev-parse --verify main >expect &&\n+\tgit -C test_http_clone rev-parse --verify main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -273,7 +273,7 @@ test_expect_success 'push options keep quoted characters intact (http)' '\n \tmk_http_pair true &&\n \n \ttest_commit -C test_http_clone one &&\n-\tgit -C test_http_clone push --push-option=\"\\\"embedded quotes\\\"\" origin master &&\n+\tgit -C test_http_clone push --push-option=\"\\\"embedded quotes\\\"\" origin main &&\n \techo \"\\\"embedded quotes\\\"\" >expect &&\n \ttest_cmp expect \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git/hooks/pre-receive.push_options\n '\ndiff --git a/t/t5548-push-porcelain.sh b/t/t5548-push-porcelain.sh\nindex 1b19b3ef55..5a761f3642 100755\n--- a/t/t5548-push-porcelain.sh\n+++ b/t/t5548-push-porcelain.sh\n@@ -36,7 +36,7 @@ create_commits_in () {\n \t\tshift ||\n \t\treturn 1\n \tdone &&\n-\tgit -C \"$repo\" update-ref refs/heads/master $oid\n+\tgit -C \"$repo\" update-ref refs/heads/main $oid\n }\n \n # Format the output of git-push, git-show-ref and other commands to make a\n@@ -57,8 +57,8 @@ make_user_friendly_and_stable_output () {\n }\n \n setup_upstream_and_workbench () {\n-\t# Upstream  after setup : master(B)  foo(A)  bar(A)  baz(A)\n-\t# Workbench after setup : master(A)\n+\t# Upstream  after setup : main(B)  foo(A)  bar(A)  baz(A)\n+\t# Workbench after setup : main(A)\n \ttest_expect_success \"setup upstream repository and workbench\" '\n \t\trm -rf upstream.git workbench &&\n \t\tgit init --bare upstream.git &&\n@@ -70,9 +70,9 @@ setup_upstream_and_workbench () {\n \t\t\t# this fixed-width oid will be replaced with \"<OID>\".\n \t\t\tgit config core.abbrev 7 &&\n \t\t\tgit remote add origin ../upstream.git &&\n-\t\t\tgit update-ref refs/heads/master $A &&\n+\t\t\tgit update-ref refs/heads/main $A &&\n \t\t\tgit push origin \\\n-\t\t\t\t$B:refs/heads/master \\\n+\t\t\t\t$B:refs/heads/main \\\n \t\t\t\t$A:refs/heads/foo \\\n \t\t\t\t$A:refs/heads/bar \\\n \t\t\t\t$A:refs/heads/baz\n@@ -94,17 +94,17 @@ run_git_push_porcelain_output_test() {\n \t\t;;\n \tesac\n \n-\t# Refs of upstream : master(B)  foo(A)  bar(A)  baz(A)\n-\t# Refs of workbench: master(A)                  baz(A)  next(A)\n-\t# git-push         : master(A)  NULL    (B)     baz(A)  next(A)\n+\t# Refs of upstream : main(B)  foo(A)  bar(A)  baz(A)\n+\t# Refs of workbench: main(A)                  baz(A)  next(A)\n+\t# git-push         : main(A)  NULL    (B)     baz(A)  next(A)\n \ttest_expect_success \"porcelain output of successful git-push ($PROTOCOL)\" '\n \t\t(\n \t\t\tcd workbench &&\n-\t\t\tgit update-ref refs/heads/master $A &&\n+\t\t\tgit update-ref refs/heads/main $A &&\n \t\t\tgit update-ref refs/heads/baz $A &&\n \t\t\tgit update-ref refs/heads/next $A &&\n \t\t\tgit push --porcelain --force origin \\\n-\t\t\t\tmaster \\\n+\t\t\t\tmain \\\n \t\t\t\t:refs/heads/foo \\\n \t\t\t\t$B:bar \\\n \t\t\t\tbaz \\\n@@ -116,7 +116,7 @@ run_git_push_porcelain_output_test() {\n \t\t=    refs/heads/baz:refs/heads/baz    [up to date]\n \t\t     <COMMIT-B>:refs/heads/bar    <OID-A>..<OID-B>\n \t\t-    :refs/heads/foo    [deleted]\n-\t\t+    refs/heads/master:refs/heads/master    <OID-B>...<OID-A> (forced update)\n+\t\t+    refs/heads/main:refs/heads/main    <OID-B>...<OID-A> (forced update)\n \t\t*    refs/heads/next:refs/heads/next    [new branch]\n \t\tDone\n \t\tEOF\n@@ -127,22 +127,22 @@ run_git_push_porcelain_output_test() {\n \t\tcat >expect <<-EOF &&\n \t\t<COMMIT-B> refs/heads/bar\n \t\t<COMMIT-A> refs/heads/baz\n-\t\t<COMMIT-A> refs/heads/master\n+\t\t<COMMIT-A> refs/heads/main\n \t\t<COMMIT-A> refs/heads/next\n \t\tEOF\n \t\ttest_cmp expect actual\n \t'\n \n-\t# Refs of upstream : master(A)  bar(B)  baz(A)  next(A)\n-\t# Refs of workbench: master(B)  bar(A)  baz(A)  next(A)\n-\t# git-push         : master(B)  bar(A)  NULL    next(A)\n+\t# Refs of upstream : main(A)  bar(B)  baz(A)  next(A)\n+\t# Refs of workbench: main(B)  bar(A)  baz(A)  next(A)\n+\t# git-push         : main(B)  bar(A)  NULL    next(A)\n \ttest_expect_success \"atomic push failed ($PROTOCOL)\" '\n \t\t(\n \t\t\tcd workbench &&\n-\t\t\tgit update-ref refs/heads/master $B &&\n+\t\t\tgit update-ref refs/heads/main $B &&\n \t\t\tgit update-ref refs/heads/bar $A &&\n \t\t\ttest_must_fail git push --atomic --porcelain origin \\\n-\t\t\t\tmaster \\\n+\t\t\t\tmain \\\n \t\t\t\tbar \\\n \t\t\t\t:baz \\\n \t\t\t\tnext\n@@ -153,7 +153,7 @@ run_git_push_porcelain_output_test() {\n \t\t=    refs/heads/next:refs/heads/next    [up to date]\n \t\t!    refs/heads/bar:refs/heads/bar    [rejected] (non-fast-forward)\n \t\t!    (delete):refs/heads/baz    [rejected] (atomic push failed)\n-\t\t!    refs/heads/master:refs/heads/master    [rejected] (atomic push failed)\n+\t\t!    refs/heads/main:refs/heads/main    [rejected] (atomic push failed)\n \t\tDone\n \t\tEOF\n \t\ttest_cmp expect actual &&\n@@ -163,7 +163,7 @@ run_git_push_porcelain_output_test() {\n \t\tcat >expect <<-EOF &&\n \t\t<COMMIT-B> refs/heads/bar\n \t\t<COMMIT-A> refs/heads/baz\n-\t\t<COMMIT-A> refs/heads/master\n+\t\t<COMMIT-A> refs/heads/main\n \t\t<COMMIT-A> refs/heads/next\n \t\tEOF\n \t\ttest_cmp expect actual\n@@ -174,16 +174,16 @@ run_git_push_porcelain_output_test() {\n \t\tEOF\n \t'\n \n-\t# Refs of upstream : master(A)  bar(B)  baz(A)  next(A)\n-\t# Refs of workbench: master(B)  bar(A)  baz(A)  next(A)\n-\t# git-push         : master(B)  bar(A)  NULL    next(A)\n+\t# Refs of upstream : main(A)  bar(B)  baz(A)  next(A)\n+\t# Refs of workbench: main(B)  bar(A)  baz(A)  next(A)\n+\t# git-push         : main(B)  bar(A)  NULL    next(A)\n \ttest_expect_success \"pre-receive hook declined ($PROTOCOL)\" '\n \t\t(\n \t\t\tcd workbench &&\n-\t\t\tgit update-ref refs/heads/master $B &&\n+\t\t\tgit update-ref refs/heads/main $B &&\n \t\t\tgit update-ref refs/heads/bar $A &&\n \t\t\ttest_must_fail git push --porcelain --force origin \\\n-\t\t\t\tmaster \\\n+\t\t\t\tmain \\\n \t\t\t\tbar \\\n \t\t\t\t:baz \\\n \t\t\t\tnext\n@@ -194,7 +194,7 @@ run_git_push_porcelain_output_test() {\n \t\t=    refs/heads/next:refs/heads/next    [up to date]\n \t\t!    refs/heads/bar:refs/heads/bar    [remote rejected] (pre-receive hook declined)\n \t\t!    :refs/heads/baz    [remote rejected] (pre-receive hook declined)\n-\t\t!    refs/heads/master:refs/heads/master    [remote rejected] (pre-receive hook declined)\n+\t\t!    refs/heads/main:refs/heads/main    [remote rejected] (pre-receive hook declined)\n \t\tDone\n \t\tEOF\n \t\ttest_cmp expect actual &&\n@@ -204,7 +204,7 @@ run_git_push_porcelain_output_test() {\n \t\tcat >expect <<-EOF &&\n \t\t<COMMIT-B> refs/heads/bar\n \t\t<COMMIT-A> refs/heads/baz\n-\t\t<COMMIT-A> refs/heads/master\n+\t\t<COMMIT-A> refs/heads/main\n \t\t<COMMIT-A> refs/heads/next\n \t\tEOF\n \t\ttest_cmp expect actual\n@@ -214,14 +214,14 @@ run_git_push_porcelain_output_test() {\n \t\trm \"$upstream/hooks/pre-receive\"\n \t'\n \n-\t# Refs of upstream : master(A)  bar(B)  baz(A)  next(A)\n-\t# Refs of workbench: master(B)  bar(A)  baz(A)  next(A)\n-\t# git-push         : master(B)  bar(A)  NULL    next(A)\n+\t# Refs of upstream : main(A)  bar(B)  baz(A)  next(A)\n+\t# Refs of workbench: main(B)  bar(A)  baz(A)  next(A)\n+\t# git-push         : main(B)  bar(A)  NULL    next(A)\n \ttest_expect_success \"non-fastforward push ($PROTOCOL)\" '\n \t\t(\n \t\t\tcd workbench &&\n \t\t\ttest_must_fail git push --porcelain origin \\\n-\t\t\t\tmaster \\\n+\t\t\t\tmain \\\n \t\t\t\tbar \\\n \t\t\t\t:baz \\\n \t\t\t\tnext\n@@ -231,7 +231,7 @@ run_git_push_porcelain_output_test() {\n \t\tTo <URL/of/upstream.git>\n \t\t=    refs/heads/next:refs/heads/next    [up to date]\n \t\t-    :refs/heads/baz    [deleted]\n-\t\t     refs/heads/master:refs/heads/master    <OID-A>..<OID-B>\n+\t\t     refs/heads/main:refs/heads/main    <OID-A>..<OID-B>\n \t\t!    refs/heads/bar:refs/heads/bar    [rejected] (non-fast-forward)\n \t\tDone\n \t\tEOF\n@@ -241,7 +241,7 @@ run_git_push_porcelain_output_test() {\n \t\tmake_user_friendly_and_stable_output <out >actual &&\n \t\tcat >expect <<-EOF &&\n \t\t<COMMIT-B> refs/heads/bar\n-\t\t<COMMIT-B> refs/heads/master\n+\t\t<COMMIT-B> refs/heads/main\n \t\t<COMMIT-A> refs/heads/next\n \t\tEOF\n \t\ttest_cmp expect actual\ndiff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh\nindex 483578b2d7..6fdcd0c036 100755\n--- a/t/t5550-http-fetch-dumb.sh\n+++ b/t/t5550-http-fetch-dumb.sh\n@@ -26,7 +26,7 @@ test_expect_success 'create http-accessible bare repository with loose objects'\n \t hooks/post-update\n \t) &&\n \tgit remote add public \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit push public master:master\n+\tgit push public main:main\n '\n \n test_expect_success 'clone http repository' '\n@@ -37,8 +37,8 @@ test_expect_success 'clone http repository' '\n \n test_expect_success 'list refs from outside any repository' '\n \tcat >expect <<-EOF &&\n-\t$(git rev-parse master)\tHEAD\n-\t$(git rev-parse master)\trefs/heads/master\n+\t$(git rev-parse main)\tHEAD\n+\t$(git rev-parse main)\trefs/heads/main\n \tEOF\n \tnongit git ls-remote \"$HTTPD_URL/dumb/repo.git\" >actual &&\n \ttest_cmp expect actual\n@@ -181,8 +181,8 @@ test_expect_success 'fetch changes via manual http-fetch' '\n \n \tHEAD=$(git rev-parse --verify HEAD) &&\n \t(cd clone2 &&\n-\t git http-fetch -a -w heads/master-new $HEAD $(git config remote.origin.url) &&\n-\t git checkout master-new &&\n+\t git http-fetch -a -w heads/main-new $HEAD $(git config remote.origin.url) &&\n+\t git checkout main-new &&\n \t test $HEAD = $(git rev-parse --verify HEAD)) &&\n \ttest_cmp file clone2/file\n '\n@@ -192,19 +192,19 @@ test_expect_success 'manual http-fetch without -a works just as well' '\n \n \tHEAD=$(git rev-parse --verify HEAD) &&\n \t(cd clone3 &&\n-\t git http-fetch -w heads/master-new $HEAD $(git config remote.origin.url) &&\n-\t git checkout master-new &&\n+\t git http-fetch -w heads/main-new $HEAD $(git config remote.origin.url) &&\n+\t git checkout main-new &&\n \t test $HEAD = $(git rev-parse --verify HEAD)) &&\n \ttest_cmp file clone3/file\n '\n \n test_expect_success 'http remote detects correct HEAD' '\n-\tgit push public master:other &&\n+\tgit push public main:other &&\n \t(cd clone &&\n \t git remote set-head origin -d &&\n \t git remote set-head origin -a &&\n \t git symbolic-ref refs/remotes/origin/HEAD > output &&\n-\t echo refs/remotes/origin/master > expect &&\n+\t echo refs/remotes/origin/main > expect &&\n \t test_cmp expect output\n \t)\n '\n@@ -416,7 +416,7 @@ test_expect_success 'set up evil alternates scheme' '\n \tevil=$HTTPD_DOCUMENT_ROOT_PATH/evil.git &&\n \tgit init --bare \"$evil\" &&\n \t# do this by hand to avoid object existence check\n-\tprintf \"%s\\\\t%s\\\\n\" $sha1 refs/heads/master >\"$evil/info/refs\"\n+\tprintf \"%s\\\\t%s\\\\n\" $sha1 refs/heads/main >\"$evil/info/refs\"\n '\n \n # Here we'll just redirect via HTTP. In a real-world attack these would be on\ndiff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh\nindex e40e9ed52f..2215bbcce7 100755\n--- a/t/t5551-http-fetch-smart.sh\n+++ b/t/t5551-http-fetch-smart.sh\n@@ -18,7 +18,7 @@ test_expect_success 'create http-accessible bare repository' '\n \t git --bare init\n \t) &&\n \tgit remote add public \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit push public master:master\n+\tgit push public main:main\n '\n \n setup_askpass_helper\n@@ -238,9 +238,9 @@ test_expect_success 'invalid Content-Type rejected' '\n \n test_expect_success 'create namespaced refs' '\n \ttest_commit namespaced &&\n-\tgit push public HEAD:refs/namespaces/ns/refs/heads/master &&\n+\tgit push public HEAD:refs/namespaces/ns/refs/heads/main &&\n \tgit --git-dir=\"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" \\\n-\t\tsymbolic-ref refs/namespaces/ns/HEAD refs/namespaces/ns/refs/heads/master\n+\t\tsymbolic-ref refs/namespaces/ns/HEAD refs/namespaces/ns/refs/heads/main\n '\n \n test_expect_success 'smart clone respects namespace' '\n@@ -271,7 +271,7 @@ test_expect_success 'cookies stored in http.cookiefile when http.savecookies set\n \tEOF\n \tgit config http.cookiefile cookies.txt &&\n \tgit config http.savecookies true &&\n-\tgit ls-remote $HTTPD_URL/smart_cookies/repo.git master &&\n+\tgit ls-remote $HTTPD_URL/smart_cookies/repo.git main &&\n \n \t# NEEDSWORK: If the overspecification of the expected result is reduced, we\n \t# might be able to run this test in all protocol versions.\n@@ -344,12 +344,12 @@ test_expect_success 'large fetch-pack requests can be sent using chunked encodin\n test_expect_success 'test allowreachablesha1inwant' '\n \ttest_when_finished \"rm -rf test_reachable.git\" &&\n \tserver=\"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tmaster_sha=$(git -C \"$server\" rev-parse refs/heads/master) &&\n+\tmain_sha=$(git -C \"$server\" rev-parse refs/heads/main) &&\n \tgit -C \"$server\" config uploadpack.allowreachablesha1inwant 1 &&\n \n \tgit init --bare test_reachable.git &&\n \tgit -C test_reachable.git remote add origin \"$HTTPD_URL/smart/repo.git\" &&\n-\tgit -C test_reachable.git fetch origin \"$master_sha\"\n+\tgit -C test_reachable.git fetch origin \"$main_sha\"\n '\n \n test_expect_success 'test allowreachablesha1inwant with unreachable' '\n@@ -363,7 +363,7 @@ test_expect_success 'test allowreachablesha1inwant with unreachable' '\n \tgit push public :refs/heads/doomed &&\n \n \tserver=\"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tmaster_sha=$(git -C \"$server\" rev-parse refs/heads/master) &&\n+\tmain_sha=$(git -C \"$server\" rev-parse refs/heads/main) &&\n \tgit -C \"$server\" config uploadpack.allowreachablesha1inwant 1 &&\n \n \tgit init --bare test_reachable.git &&\n@@ -385,7 +385,7 @@ test_expect_success 'test allowanysha1inwant with unreachable' '\n \tgit push public :refs/heads/doomed &&\n \n \tserver=\"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tmaster_sha=$(git -C \"$server\" rev-parse refs/heads/master) &&\n+\tmain_sha=$(git -C \"$server\" rev-parse refs/heads/main) &&\n \tgit -C \"$server\" config uploadpack.allowreachablesha1inwant 1 &&\n \n \tgit init --bare test_reachable.git &&\n@@ -444,8 +444,8 @@ test_expect_success 'using fetch command in remote-curl updates refs' '\n \ttest_commit -C \"$SERVER\" bar &&\n \tgit -C client -c protocol.version=0 fetch &&\n \n-\tgit -C \"$SERVER\" rev-parse master >expect &&\n-\tgit -C client rev-parse origin/master >actual &&\n+\tgit -C \"$SERVER\" rev-parse main >expect &&\n+\tgit -C client rev-parse origin/main >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t5552-skipping-fetch-negotiator.sh b/t/t5552-skipping-fetch-negotiator.sh\nindex 156c704040..7b9fb4ff02 100755\n--- a/t/t5552-skipping-fetch-negotiator.sh\n+++ b/t/t5552-skipping-fetch-negotiator.sh\n@@ -100,7 +100,7 @@ test_expect_success 'use ref advertisement to filter out commits' '\n \tgit -C server checkout --orphan anotherbranch &&\n \ttest_commit -C server to_fetch &&\n \n-\t# The server advertising \"c3\" (as \"refs/heads/master\") means that we do\n+\t# The server advertising \"c3\" (as \"refs/heads/main\") means that we do\n \t# not need to send any ancestors of \"c3\", but we still need to send \"c3\"\n \t# itself.\n \ttest_config -C client fetch.negotiationalgorithm skipping &&\ndiff --git a/t/t5553-set-upstream.sh b/t/t5553-set-upstream.sh\nindex 7622981cbf..0e6574f526 100755\n--- a/t/t5553-set-upstream.sh\n+++ b/t/t5553-set-upstream.sh\n@@ -32,9 +32,9 @@ test_expect_success 'setup bare parent fetch' '\n \tgit remote add upstream parent\n '\n \n-test_expect_success 'setup commit on master and other fetch' '\n+test_expect_success 'setup commit on main and other fetch' '\n \ttest_commit one &&\n-\tgit push upstream master &&\n+\tgit push upstream main &&\n \tgit checkout -b other &&\n \ttest_commit two &&\n \tgit push upstream other\n@@ -43,38 +43,38 @@ test_expect_success 'setup commit on master and other fetch' '\n # tests for fetch --set-upstream\n \n test_expect_success 'fetch --set-upstream does not set upstream w/o branch' '\n-\tclear_config master other &&\n-\tgit checkout master &&\n+\tclear_config main other &&\n+\tgit checkout main &&\n \tgit fetch --set-upstream upstream &&\n-\tcheck_config_missing master &&\n+\tcheck_config_missing main &&\n \tcheck_config_missing other\n '\n \n-test_expect_success 'fetch --set-upstream upstream master sets branch master but not other' '\n-\tclear_config master other &&\n-\tgit fetch --set-upstream upstream master &&\n-\tcheck_config master upstream refs/heads/master &&\n+test_expect_success 'fetch --set-upstream upstream main sets branch main but not other' '\n+\tclear_config main other &&\n+\tgit fetch --set-upstream upstream main &&\n+\tcheck_config main upstream refs/heads/main &&\n \tcheck_config_missing other\n '\n \n test_expect_success 'fetch --set-upstream upstream other sets branch other' '\n-\tclear_config master other &&\n+\tclear_config main other &&\n \tgit fetch --set-upstream upstream other &&\n-\tcheck_config master upstream refs/heads/other &&\n+\tcheck_config main upstream refs/heads/other &&\n \tcheck_config_missing other\n '\n \n-test_expect_success 'fetch --set-upstream master:other does not set the branch other2' '\n+test_expect_success 'fetch --set-upstream main:other does not set the branch other2' '\n \tclear_config other2 &&\n-\tgit fetch --set-upstream upstream master:other2 &&\n+\tgit fetch --set-upstream upstream main:other2 &&\n \tcheck_config_missing other2\n '\n \n test_expect_success 'fetch --set-upstream http://nosuchdomain.example.com fails with invalid url' '\n-\t# master explicitly not cleared, we check that it is not touched from previous value\n+\t# main explicitly not cleared, we check that it is not touched from previous value\n \tclear_config other other2 &&\n \ttest_must_fail git fetch --set-upstream http://nosuchdomain.example.com &&\n-\tcheck_config master upstream refs/heads/other &&\n+\tcheck_config main upstream refs/heads/other &&\n \tcheck_config_missing other &&\n \tcheck_config_missing other2\n '\n@@ -83,7 +83,7 @@ test_expect_success 'fetch --set-upstream with valid URL sets upstream to URL' '\n \tclear_config other other2 &&\n \turl=\"file://$PWD\" &&\n \tgit fetch --set-upstream \"$url\" &&\n-\tcheck_config master \"$url\" HEAD &&\n+\tcheck_config main \"$url\" HEAD &&\n \tcheck_config_missing other &&\n \tcheck_config_missing other2\n '\n@@ -96,30 +96,30 @@ test_expect_success 'setup bare parent pull' '\n \tgit remote add upstream parent\n '\n \n-test_expect_success 'setup commit on master and other pull' '\n+test_expect_success 'setup commit on main and other pull' '\n \ttest_commit three &&\n-\tgit push --tags upstream master &&\n+\tgit push --tags upstream main &&\n \ttest_commit four &&\n \tgit push upstream other\n '\n \n-test_expect_success 'pull --set-upstream upstream master sets branch master but not other' '\n-\tclear_config master other &&\n-\tgit pull --set-upstream upstream master &&\n-\tcheck_config master upstream refs/heads/master &&\n+test_expect_success 'pull --set-upstream upstream main sets branch main but not other' '\n+\tclear_config main other &&\n+\tgit pull --set-upstream upstream main &&\n+\tcheck_config main upstream refs/heads/main &&\n \tcheck_config_missing other\n '\n \n-test_expect_success 'pull --set-upstream master:other2 does not set the branch other2' '\n+test_expect_success 'pull --set-upstream main:other2 does not set the branch other2' '\n \tclear_config other2 &&\n-\tgit pull --set-upstream upstream master:other2 &&\n+\tgit pull --set-upstream upstream main:other2 &&\n \tcheck_config_missing other2\n '\n \n-test_expect_success 'pull --set-upstream upstream other sets branch master' '\n-\tclear_config master other &&\n+test_expect_success 'pull --set-upstream upstream other sets branch main' '\n+\tclear_config main other &&\n \tgit pull --set-upstream upstream other &&\n-\tcheck_config master upstream refs/heads/other &&\n+\tcheck_config main upstream refs/heads/other &&\n \tcheck_config_missing other\n '\n \n@@ -130,47 +130,47 @@ test_expect_success 'pull --set-upstream upstream tag does not set the tag' '\n '\n \n test_expect_success 'pull --set-upstream http://nosuchdomain.example.com fails with invalid url' '\n-\t# master explicitly not cleared, we check that it is not touched from previous value\n+\t# main explicitly not cleared, we check that it is not touched from previous value\n \tclear_config other other2 three &&\n \ttest_must_fail git pull --set-upstream http://nosuchdomain.example.com &&\n-\tcheck_config master upstream refs/heads/other &&\n+\tcheck_config main upstream refs/heads/other &&\n \tcheck_config_missing other &&\n \tcheck_config_missing other2 &&\n \tcheck_config_missing three\n '\n \n test_expect_success 'pull --set-upstream upstream HEAD sets branch HEAD' '\n-\tclear_config master other &&\n+\tclear_config main other &&\n \tgit pull --set-upstream upstream HEAD &&\n-\tcheck_config master upstream HEAD &&\n+\tcheck_config main upstream HEAD &&\n \tgit checkout other &&\n \tgit pull --set-upstream upstream HEAD &&\n \tcheck_config other upstream HEAD\n '\n \n test_expect_success 'pull --set-upstream upstream with more than one branch does nothing' '\n-\tclear_config master three &&\n-\tgit pull --set-upstream upstream master three &&\n-\tcheck_config_missing master &&\n+\tclear_config main three &&\n+\tgit pull --set-upstream upstream main three &&\n+\tcheck_config_missing main &&\n \tcheck_config_missing three\n '\n \n test_expect_success 'pull --set-upstream with valid URL sets upstream to URL' '\n-\tclear_config master other other2 &&\n-\tgit checkout master &&\n+\tclear_config main other other2 &&\n+\tgit checkout main &&\n \turl=\"file://$PWD\" &&\n \tgit pull --set-upstream \"$url\" &&\n-\tcheck_config master \"$url\" HEAD &&\n+\tcheck_config main \"$url\" HEAD &&\n \tcheck_config_missing other &&\n \tcheck_config_missing other2\n '\n \n test_expect_success 'pull --set-upstream with valid URL and branch sets branch' '\n-\tclear_config master other other2 &&\n-\tgit checkout master &&\n+\tclear_config main other other2 &&\n+\tgit checkout main &&\n \turl=\"file://$PWD\" &&\n-\tgit pull --set-upstream \"$url\" master &&\n-\tcheck_config master \"$url\" refs/heads/master &&\n+\tgit pull --set-upstream \"$url\" main &&\n+\tcheck_config main \"$url\" refs/heads/main &&\n \tcheck_config_missing other &&\n \tcheck_config_missing other2\n '\ndiff --git a/t/t5561-http-backend.sh b/t/t5561-http-backend.sh\nindex 6eb0294978..c8a9f7f9bb 100755\n--- a/t/t5561-http-backend.sh\n+++ b/t/t5561-http-backend.sh\n@@ -39,9 +39,9 @@ POST() {\n \n grep '^[^#]' >exp <<EOF\n \n-###  refs/heads/master\n+###  refs/heads/main\n ###\n-GET  /smart/repo.git/refs/heads/master HTTP/1.1 404 -\n+GET  /smart/repo.git/refs/heads/main HTTP/1.1 404 -\n \n ###  getanyfile default\n ###\ndiff --git a/t/t556x_common b/t/t556x_common\nindex 359fcfe32b..670fb89477 100755\n--- a/t/t556x_common\n+++ b/t/t556x_common\n@@ -22,7 +22,7 @@ test_expect_success 'setup repository' '\n \t : >objects/info/http-alternates\n \t) &&\n \tgit remote add public \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit push public master:master &&\n+\tgit push public main:main &&\n \n \t(cd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n \t git repack -a -d\n@@ -31,7 +31,7 @@ test_expect_success 'setup repository' '\n \techo other >file &&\n \tgit add file &&\n \tgit commit -m two &&\n-\tgit push public master:master &&\n+\tgit push public main:main &&\n \n \tLOOSE_URL=$(find_file objects/??) &&\n \tPACK_URL=$(find_file objects/pack/*.pack) &&\n@@ -51,8 +51,8 @@ get_static_files() {\n \n SMART=smart\n GIT_HTTP_EXPORT_ALL=1 && export GIT_HTTP_EXPORT_ALL\n-test_expect_success 'direct refs/heads/master not found' '\n-\tGET refs/heads/master \"404 Not Found\"\n+test_expect_success 'direct refs/heads/main not found' '\n+\tGET refs/heads/main \"404 Not Found\"\n '\n test_expect_success 'static file is ok' '\n \tget_static_files \"200 OK\"\ndiff --git a/t/t5570-git-daemon.sh b/t/t5570-git-daemon.sh\nindex 8f69a7854f..864d5c985c 100755\n--- a/t/t5570-git-daemon.sh\n+++ b/t/t5570-git-daemon.sh\n@@ -26,7 +26,7 @@ test_expect_success 'create git-accessible bare repository' '\n \t : >git-daemon-export-ok\n \t) &&\n \tgit remote add public \"$GIT_DAEMON_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit push public master:master\n+\tgit push public main:main\n '\n \n test_expect_success 'clone git repository' '\n@@ -55,12 +55,12 @@ test_expect_success 'no-op fetch without \"-v\" is quiet' '\n '\n \n test_expect_success 'remote detects correct HEAD' '\n-\tgit push public master:other &&\n+\tgit push public main:other &&\n \t(cd clone &&\n \t git remote set-head -d origin &&\n \t git remote set-head -a origin &&\n \t git symbolic-ref refs/remotes/origin/HEAD > output &&\n-\t echo refs/remotes/origin/master > expect &&\n+\t echo refs/remotes/origin/main > expect &&\n \t test_cmp expect output\n \t)\n '\n@@ -148,7 +148,7 @@ test_remote_error()\n \n msg=\"access denied or repository not exported\"\n test_expect_success 'clone non-existent' \"test_remote_error    '$msg' clone nowhere.git\"\n-test_expect_success 'push disabled'      \"test_remote_error    '$msg' push  repo.git master\"\n+test_expect_success 'push disabled'      \"test_remote_error    '$msg' push  repo.git main\"\n test_expect_success 'read access denied' \"test_remote_error -x '$msg' fetch repo.git\"\n test_expect_success 'not exported'       \"test_remote_error -n '$msg' fetch repo.git\"\n \n@@ -156,7 +156,7 @@ stop_git_daemon\n start_git_daemon --informative-errors\n \n test_expect_success 'clone non-existent' \"test_remote_error    'no such repository'      clone nowhere.git\"\n-test_expect_success 'push disabled'      \"test_remote_error    'service not enabled'     push  repo.git master\"\n+test_expect_success 'push disabled'      \"test_remote_error    'service not enabled'     push  repo.git main\"\n test_expect_success 'read access denied' \"test_remote_error -x 'no such repository'      fetch repo.git\"\n test_expect_success 'not exported'       \"test_remote_error -n 'repository not exported' fetch repo.git\"\n \n@@ -192,10 +192,10 @@ test_expect_success FAKENC 'hostname interpolation works after LF-stripping' '\n \tfake_nc \"$GIT_DAEMON_HOST_PORT\" <input >output &&\n \tdepacketize <output >output.raw &&\n \n-\t# just pick out the value of master, which avoids any protocol\n+\t# just pick out the value of main, which avoids any protocol\n \t# particulars\n-\tperl -lne \"print \\$1 if m{^(\\\\S+) refs/heads/master}\" <output.raw >actual &&\n-\tgit -C \"$repo\" rev-parse master >expect &&\n+\tperl -lne \"print \\$1 if m{^(\\\\S+) refs/heads/main}\" <output.raw >actual &&\n+\tgit -C \"$repo\" rev-parse main >expect &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t5571-pre-push-hook.sh b/t/t5571-pre-push-hook.sh\nindex ac53d63869..891f03cd59 100755\n--- a/t/t5571-pre-push-hook.sh\n+++ b/t/t5571-pre-push-hook.sh\n@@ -48,11 +48,11 @@ EOF\n cat >expected <<EOF\n parent1\n repo1\n-refs/heads/master $COMMIT2 refs/heads/foreign $COMMIT1\n+refs/heads/main $COMMIT2 refs/heads/foreign $COMMIT1\n EOF\n \n test_expect_success 'push with hook' '\n-\tgit push parent1 master:foreign &&\n+\tgit push parent1 main:foreign &&\n \tdiff expected actual\n '\n \ndiff --git a/t/t5572-pull-submodule.sh b/t/t5572-pull-submodule.sh\nindex 1d75e3b12b..d6a75964d8 100755\n--- a/t/t5572-pull-submodule.sh\n+++ b/t/t5572-pull-submodule.sh\n@@ -148,8 +148,8 @@ test_expect_success 'branch has no merge base with remote-tracking counterpart'\n \n \tgit clone parent child &&\n \n-\t# Reset master so that it has no merge base with\n-\t# refs/remotes/origin/master.\n+\t# Reset main so that it has no merge base with\n+\t# refs/remotes/origin/main.\n \tOTHER=$(git -C child commit-tree -m bar \\\n \t\t$(git -C child rev-parse HEAD^{tree})) &&\n \tgit -C child reset --hard \"$OTHER\" &&\ndiff --git a/t/t5580-unc-paths.sh b/t/t5580-unc-paths.sh\nindex cf768b3a27..511c1ba51d 100755\n--- a/t/t5580-unc-paths.sh\n+++ b/t/t5580-unc-paths.sh\n@@ -53,7 +53,7 @@ test_expect_success fetch '\n \tgit init to-fetch &&\n \t(\n \t\tcd to-fetch &&\n-\t\tgit fetch \"$UNCPATH\" master\n+\t\tgit fetch \"$UNCPATH\" main\n \t)\n '\n \ndiff --git a/t/t5581-http-curl-verbose.sh b/t/t5581-http-curl-verbose.sh\nindex 927aad0820..0c6e3b7665 100755\n--- a/t/t5581-http-curl-verbose.sh\n+++ b/t/t5581-http-curl-verbose.sh\n@@ -13,7 +13,7 @@ test_expect_success 'setup repository' '\n \tgit add file &&\n \tgit commit -m one &&\n \tgit remote add public \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit push public master:master\n+\tgit push public main:main\n '\n \n test_expect_success 'failure in git-upload-pack is shown' '\ndiff --git a/t/t5582-fetch-negative-refspec.sh b/t/t5582-fetch-negative-refspec.sh\nindex 8c61e28fec..9c2b19cae2 100755\n--- a/t/t5582-fetch-negative-refspec.sh\n+++ b/t/t5582-fetch-negative-refspec.sh\n@@ -22,12 +22,12 @@ test_expect_success \"clone and setup child repos\" '\n \t\tgit switch -c alternate &&\n \t\techo >file updated again by one &&\n \t\tgit commit -a -m \"updated by one again\" &&\n-\t\tgit switch master\n+\t\tgit switch main\n \t) &&\n \tgit clone . two &&\n \t(\n \t\tcd two &&\n-\t\tgit config branch.master.remote one &&\n+\t\tgit config branch.main.remote one &&\n \t\tgit config remote.one.url ../one/.git/ &&\n \t\tgit config remote.one.fetch +refs/heads/*:refs/remotes/one/* &&\n \t\tgit config --add remote.one.fetch ^refs/heads/alternate\n@@ -43,9 +43,9 @@ test_expect_success \"fetch one\" '\n \t\ttest_must_fail git rev-parse --verify refs/remotes/one/alternate &&\n \t\tgit fetch one &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/one/alternate &&\n-\t\tgit rev-parse --verify refs/remotes/one/master &&\n-\t\tmine=$(git rev-parse refs/remotes/one/master) &&\n-\t\this=$(cd ../one && git rev-parse refs/heads/master) &&\n+\t\tgit rev-parse --verify refs/remotes/one/main &&\n+\t\tmine=$(git rev-parse refs/remotes/one/main) &&\n+\t\this=$(cd ../one && git rev-parse refs/heads/main) &&\n \t\ttest \"z$mine\" = \"z$his\"\n \t)\n '\n@@ -57,7 +57,7 @@ test_expect_success \"fetch with negative refspec on commandline\" '\n \t\tcd three &&\n \t\talternate_in_one=$(cd ../one && git rev-parse refs/heads/alternate) &&\n \t\techo $alternate_in_one >expect &&\n-\t\tgit fetch ../one/.git refs/heads/*:refs/remotes/one/* ^refs/heads/master &&\n+\t\tgit fetch ../one/.git refs/heads/*:refs/remotes/one/* ^refs/heads/main &&\n \t\tcut -f -1 .git/FETCH_HEAD >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -68,8 +68,8 @@ test_expect_success \"fetch with negative sha1 refspec fails\" '\n \tgit commit -a -m \"updated by origin yet again\" &&\n \t(\n \t\tcd three &&\n-\t\tmaster_in_one=$(cd ../one && git rev-parse refs/heads/master) &&\n-\t\ttest_must_fail git fetch ../one/.git refs/heads/*:refs/remotes/one/* ^$master_in_one\n+\t\tmain_in_one=$(cd ../one && git rev-parse refs/heads/main) &&\n+\t\ttest_must_fail git fetch ../one/.git refs/heads/*:refs/remotes/one/* ^$main_in_one\n \t)\n '\n \n@@ -92,10 +92,10 @@ test_expect_success \"fetch with negative pattern refspec does not expand prefix\"\n \t(\n \t\tcd three &&\n \t\talternate_in_one=$(cd ../one && git rev-parse refs/heads/alternate) &&\n-\t\tmaster_in_one=$(cd ../one && git rev-parse refs/heads/master) &&\n+\t\tmain_in_one=$(cd ../one && git rev-parse refs/heads/main) &&\n \t\techo $alternate_in_one >expect &&\n-\t\techo $master_in_one >>expect &&\n-\t\tgit fetch ../one/.git refs/heads/*:refs/remotes/one/* ^master &&\n+\t\techo $main_in_one >>expect &&\n+\t\tgit fetch ../one/.git refs/heads/*:refs/remotes/one/* ^main &&\n \t\tcut -f -1 .git/FETCH_HEAD >actual &&\n \t\ttest_cmp expect actual\n \t)\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 381416825c..3e0c9413f1 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-4]*|5[0-4]*|55[0-3]*)\n+[0-4]*|5[0-5]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410098","messageId":"4b1b1ee51f19b6625118f39ac1389b485f99290a.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 14/27] t55[23]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:14Z","receivedAt":"2020-11-17T16:13:02Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t5526, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in\nt55[23]*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -e 's/naster/nain/g' -- \\\n\t\tt55[23]*.sh &&\n\t   git checkout HEAD -- t5526\\*)\n\nNote that t5533 contains a variation of the name `master` (`naster`)\nthat we rename here, too.\n\nThis commit allows us to define\n`GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for that range of tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5520-pull.sh                |  30 +++---\n t/t5521-pull-options.sh        |  16 +--\n t/t5523-push-upstream.sh       |  30 +++---\n t/t5527-fetch-odd-refs.sh      |  14 +--\n t/t5528-push-default.sh        |  98 ++++++++---------\n t/t5529-push-errors.sh         |   2 +-\n t/t5530-upload-pack-error.sh   |   2 +-\n t/t5531-deep-submodule-push.sh | 188 ++++++++++++++++-----------------\n t/t5533-push-cas.sh            | 142 ++++++++++++-------------\n t/t5534-push-signed.sh         |   4 +-\n t/t5537-fetch-shallow.sh       |  30 +++---\n t/t5538-push-shallow.sh        |  22 ++--\n t/t5539-fetch-http-shallow.sh  |  14 +--\n t/test-lib.sh                  |   4 +-\n 14 files changed, 298 insertions(+), 298 deletions(-)\n\ndiff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\nindex 9fae07cdfa..3be99df66d 100755\n--- a/t/t5520-pull.sh\n+++ b/t/t5520-pull.sh\n@@ -48,11 +48,11 @@ test_expect_success 'pulling into void' '\n \ttest_cmp file cloned/file\n '\n \n-test_expect_success 'pulling into void using master:master' '\n+test_expect_success 'pulling into void using main:main' '\n \tgit init cloned-uho &&\n \t(\n \t\tcd cloned-uho &&\n-\t\tgit pull .. master:master\n+\t\tgit pull .. main:main\n \t) &&\n \ttest_path_is_file file &&\n \ttest_path_is_file cloned-uho/file &&\n@@ -64,7 +64,7 @@ test_expect_success 'pulling into void does not overwrite untracked files' '\n \t(\n \t\tcd cloned-untracked &&\n \t\techo untracked >file &&\n-\t\ttest_must_fail git pull .. master &&\n+\t\ttest_must_fail git pull .. main &&\n \t\techo untracked >expect &&\n \t\ttest_cmp expect file\n \t)\n@@ -76,7 +76,7 @@ test_expect_success 'pulling into void does not overwrite staged files' '\n \t\tcd cloned-staged-colliding &&\n \t\techo \"alternate content\" >file &&\n \t\tgit add file &&\n-\t\ttest_must_fail git pull .. master &&\n+\t\ttest_must_fail git pull .. main &&\n \t\techo \"alternate content\" >expect &&\n \t\ttest_cmp expect file &&\n \t\tgit cat-file blob :file >file.index &&\n@@ -90,7 +90,7 @@ test_expect_success 'pulling into void does not remove new staged files' '\n \t\tcd cloned-staged-new &&\n \t\techo \"new tracked file\" >newfile &&\n \t\tgit add newfile &&\n-\t\tgit pull .. master &&\n+\t\tgit pull .. main &&\n \t\techo \"new tracked file\" >expect &&\n \t\ttest_cmp expect newfile &&\n \t\tgit cat-file blob :newfile >newfile.index &&\n@@ -102,15 +102,15 @@ test_expect_success 'pulling into void must not create an octopus' '\n \tgit init cloned-octopus &&\n \t(\n \t\tcd cloned-octopus &&\n-\t\ttest_must_fail git pull .. master master &&\n+\t\ttest_must_fail git pull .. main main &&\n \t\ttest_path_is_missing file\n \t)\n '\n \n test_expect_success 'test . as a remote' '\n-\tgit branch copy master &&\n+\tgit branch copy main &&\n \tgit config branch.copy.remote . &&\n-\tgit config branch.copy.merge refs/heads/master &&\n+\tgit config branch.copy.merge refs/heads/main &&\n \techo updated >file &&\n \tgit commit -a -m updated &&\n \tgit checkout copy &&\n@@ -126,7 +126,7 @@ test_expect_success 'test . as a remote' '\n '\n \n test_expect_success 'the default remote . should not break explicit pull' '\n-\tgit checkout -b second master^ &&\n+\tgit checkout -b second main^ &&\n \techo modified >file &&\n \tgit commit -a -m modified &&\n \tgit checkout copy &&\n@@ -361,7 +361,7 @@ test_expect_success 'failed --rebase shows advice' '\n \n test_expect_success '--rebase fails with multiple branches' '\n \tgit reset --hard before-rebase &&\n-\ttest_must_fail git pull --rebase . copy master 2>err &&\n+\ttest_must_fail git pull --rebase . copy main 2>err &&\n \ttest_cmp_rev HEAD before-rebase &&\n \ttest_i18ngrep \"Cannot rebase onto multiple branches\" err &&\n \techo modified >expect &&\n@@ -500,7 +500,7 @@ test_expect_success 'pull --rebase does not warn on --no-verify-signatures' '\n \ttest_i18ngrep ! \"verify-signatures\" err\n '\n \n-# add a feature branch, keep-merge, that is merged into master, so the\n+# add a feature branch, keep-merge, that is merged into main, so the\n # test can try preserving the merge commit (or not) with various\n # --rebase flags/pull.rebase settings.\n test_expect_success 'preserve merge setup' '\n@@ -699,12 +699,12 @@ test_expect_success 'pull --rebase dies early with dirty working directory' '\n '\n \n test_expect_success 'pull --rebase works on branch yet to be born' '\n-\tgit rev-parse master >expect &&\n+\tgit rev-parse main >expect &&\n \tmkdir empty_repo &&\n \t(\n \t\tcd empty_repo &&\n \t\tgit init &&\n-\t\tgit pull --rebase .. master &&\n+\t\tgit pull --rebase .. main &&\n \t\tgit rev-parse HEAD >../actual\n \t) &&\n \ttest_cmp expect actual\n@@ -720,7 +720,7 @@ test_expect_success 'pull --rebase fails on unborn branch with staged changes' '\n \t\techo staged-file >expect &&\n \t\tgit ls-files >actual &&\n \t\ttest_cmp expect actual &&\n-\t\ttest_must_fail git pull --rebase .. master 2>err &&\n+\t\ttest_must_fail git pull --rebase .. main 2>err &&\n \t\tgit ls-files >actual &&\n \t\ttest_cmp expect actual &&\n \t\tgit show :staged-file >actual &&\n@@ -779,7 +779,7 @@ test_expect_success 'setup for avoiding reapplying old patches' '\n \t(\n \t\tcd dst &&\n \t\ttest_might_fail git rebase --abort &&\n-\t\tgit reset --hard origin/master\n+\t\tgit reset --hard origin/main\n \t) &&\n \tgit clone --bare src src-replace.git &&\n \trm -rf src &&\ndiff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh\nindex db1a381cd9..ae80aaa480 100755\n--- a/t/t5521-pull-options.sh\n+++ b/t/t5521-pull-options.sh\n@@ -99,13 +99,13 @@ test_expect_success 'git pull --force' '\n \tcat >>.git/config <<-\\EOF &&\n \t[remote \"one\"]\n \t\turl = ../parent\n-\t\tfetch = refs/heads/master:refs/heads/mirror\n+\t\tfetch = refs/heads/main:refs/heads/mirror\n \t[remote \"two\"]\n \t\turl = ../parent\n-\t\tfetch = refs/heads/master:refs/heads/origin\n-\t[branch \"master\"]\n+\t\tfetch = refs/heads/main:refs/heads/origin\n+\t[branch \"main\"]\n \t\tremote = two\n-\t\tmerge = refs/heads/master\n+\t\tmerge = refs/heads/main\n \tEOF\n \tgit pull two &&\n \ttest_commit A &&\n@@ -124,9 +124,9 @@ test_expect_success 'git pull --all' '\n \t[remote \"two\"]\n \t\turl = ../parent\n \t\tfetch = refs/heads/*:refs/remotes/two/*\n-\t[branch \"master\"]\n+\t[branch \"main\"]\n \t\tremote = one\n-\t\tmerge = refs/heads/master\n+\t\tmerge = refs/heads/main\n \tEOF\n \tgit pull --all\n \t)\n@@ -139,7 +139,7 @@ test_expect_success 'git pull --dry-run' '\n \t\tcd clonedry &&\n \t\tgit pull --dry-run ../parent &&\n \t\ttest_path_is_missing .git/FETCH_HEAD &&\n-\t\ttest_path_is_missing .git/refs/heads/master &&\n+\t\ttest_path_is_missing .git/refs/heads/main &&\n \t\ttest_path_is_missing .git/index &&\n \t\ttest_path_is_missing file\n \t)\n@@ -153,7 +153,7 @@ test_expect_success 'git pull --all --dry-run' '\n \t\tgit remote add origin ../parent &&\n \t\tgit pull --all --dry-run &&\n \t\ttest_path_is_missing .git/FETCH_HEAD &&\n-\t\ttest_path_is_missing .git/refs/remotes/origin/master &&\n+\t\ttest_path_is_missing .git/refs/remotes/origin/main &&\n \t\ttest_path_is_missing .git/index &&\n \t\ttest_path_is_missing file\n \t)\ndiff --git a/t/t5523-push-upstream.sh b/t/t5523-push-upstream.sh\nindex e47b5db5d6..a2eaa877a2 100755\n--- a/t/t5523-push-upstream.sh\n+++ b/t/t5523-push-upstream.sh\n@@ -26,19 +26,19 @@ check_config() {\n \ttest_cmp expect.$1 actual.$1\n }\n \n-test_expect_success 'push -u master:master' '\n-\tgit push -u upstream master:master &&\n-\tcheck_config master upstream refs/heads/master\n+test_expect_success 'push -u main:main' '\n+\tgit push -u upstream main:main &&\n+\tcheck_config main upstream refs/heads/main\n '\n \n-test_expect_success 'push -u master:other' '\n-\tgit push -u upstream master:other &&\n-\tcheck_config master upstream refs/heads/other\n+test_expect_success 'push -u main:other' '\n+\tgit push -u upstream main:other &&\n+\tcheck_config main upstream refs/heads/other\n '\n \n-test_expect_success 'push -u --dry-run master:otherX' '\n-\tgit push -u --dry-run upstream master:otherX &&\n-\tcheck_config master upstream refs/heads/other\n+test_expect_success 'push -u --dry-run main:otherX' '\n+\tgit push -u --dry-run upstream main:otherX &&\n+\tcheck_config main upstream refs/heads/other\n '\n \n test_expect_success 'push -u topic_2:topic_2' '\n@@ -74,7 +74,7 @@ test_expect_success 'push -u HEAD' '\n test_expect_success TTY 'progress messages go to tty' '\n \tensure_fresh_upstream &&\n \n-\ttest_terminal git push -u upstream master >out 2>err &&\n+\ttest_terminal git push -u upstream main >out 2>err &&\n \ttest_i18ngrep \"Writing objects\" err\n '\n \n@@ -82,7 +82,7 @@ test_expect_success 'progress messages do not go to non-tty' '\n \tensure_fresh_upstream &&\n \n \t# skip progress messages, since stderr is non-tty\n-\tgit push -u upstream master >out 2>err &&\n+\tgit push -u upstream main >out 2>err &&\n \ttest_i18ngrep ! \"Writing objects\" err\n '\n \n@@ -90,21 +90,21 @@ test_expect_success 'progress messages go to non-tty (forced)' '\n \tensure_fresh_upstream &&\n \n \t# force progress messages to stderr, even though it is non-tty\n-\tgit push -u --progress upstream master >out 2>err &&\n+\tgit push -u --progress upstream main >out 2>err &&\n \ttest_i18ngrep \"Writing objects\" err\n '\n \n test_expect_success TTY 'push -q suppresses progress' '\n \tensure_fresh_upstream &&\n \n-\ttest_terminal git push -u -q upstream master >out 2>err &&\n+\ttest_terminal git push -u -q upstream main >out 2>err &&\n \ttest_i18ngrep ! \"Writing objects\" err\n '\n \n test_expect_success TTY 'push --no-progress suppresses progress' '\n \tensure_fresh_upstream &&\n \n-\ttest_terminal git push -u --no-progress upstream master >out 2>err &&\n+\ttest_terminal git push -u --no-progress upstream main >out 2>err &&\n \ttest_i18ngrep ! \"Unpacking objects\" err &&\n \ttest_i18ngrep ! \"Writing objects\" err\n '\n@@ -112,7 +112,7 @@ test_expect_success TTY 'push --no-progress suppresses progress' '\n test_expect_success TTY 'quiet push' '\n \tensure_fresh_upstream &&\n \n-\ttest_terminal git push --quiet --no-progress upstream master 2>&1 | tee output &&\n+\ttest_terminal git push --quiet --no-progress upstream main 2>&1 | tee output &&\n \ttest_must_be_empty output\n '\n \ndiff --git a/t/t5527-fetch-odd-refs.sh b/t/t5527-fetch-odd-refs.sh\nindex 3b0cb98422..c6a4db4c59 100755\n--- a/t/t5527-fetch-odd-refs.sh\n+++ b/t/t5527-fetch-odd-refs.sh\n@@ -5,13 +5,13 @@ test_description='test fetching of oddly-named refs'\n \n # afterwards we will have:\n #  HEAD - two\n-#  refs/for/refs/heads/master - one\n-#  refs/heads/master - three\n+#  refs/for/refs/heads/main - one\n+#  refs/heads/main - three\n test_expect_success 'setup repo with odd suffix ref' '\n \techo content >file &&\n \tgit add . &&\n \tgit commit -m one &&\n-\tgit update-ref refs/for/refs/heads/master HEAD &&\n+\tgit update-ref refs/for/refs/heads/main HEAD &&\n \techo content >>file &&\n \tgit commit -a -m two &&\n \techo content >>file &&\n@@ -22,7 +22,7 @@ test_expect_success 'setup repo with odd suffix ref' '\n test_expect_success 'suffix ref is ignored during fetch' '\n \tgit clone --bare file://\"$PWD\" suffix &&\n \techo three >expect &&\n-\tgit --git-dir=suffix log -1 --format=%s refs/heads/master >actual &&\n+\tgit --git-dir=suffix log -1 --format=%s refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -33,7 +33,7 @@ test_expect_success 'try to create repo with absurdly long refname' '\n \t(\n \t\tcd long &&\n \t\ttest_commit long &&\n-\t\ttest_commit master\n+\t\ttest_commit main\n \t) &&\n \tif git -C long update-ref refs/heads/$ref1440 long; then\n \t\ttest_set_prereq LONG_REF\n@@ -46,7 +46,7 @@ test_expect_success LONG_REF 'fetch handles extremely long refname' '\n \tgit fetch long refs/heads/*:refs/remotes/long/* &&\n \tcat >expect <<-\\EOF &&\n \tlong\n-\tmaster\n+\tmain\n \tEOF\n \tgit for-each-ref --format=\"%(subject)\" refs/remotes/long >actual &&\n \ttest_cmp expect actual\n@@ -55,7 +55,7 @@ test_expect_success LONG_REF 'fetch handles extremely long refname' '\n test_expect_success LONG_REF 'push handles extremely long refname' '\n \tgit push long :refs/heads/$ref1440 &&\n \tgit -C long for-each-ref --format=\"%(subject)\" refs/heads >actual &&\n-\techo master >expect &&\n+\techo main >expect &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t5528-push-default.sh b/t/t5528-push-default.sh\nindex f0a287d97d..b6d1776c98 100755\n--- a/t/t5528-push-default.sh\n+++ b/t/t5528-push-default.sh\n@@ -41,7 +41,7 @@ test_push_failure () {\n \n # $1 = success or failure\n # $2 = push.default value\n-# $3 = branch to check for actual output (master or foo)\n+# $3 = branch to check for actual output (main or foo)\n # $4 = [optional] switch to triangular workflow\n test_pushdefault_workflow () {\n \tworkflow=central\n@@ -51,8 +51,8 @@ test_pushdefault_workflow () {\n \t\tpushdefault=parent2\n \tfi\n \ttest_expect_success \"push.default = $2 $1 in $workflow workflows\" \"\n-\t\ttest_config branch.master.remote parent1 &&\n-\t\ttest_config branch.master.merge refs/heads/foo &&\n+\t\ttest_config branch.main.remote parent1 &&\n+\t\ttest_config branch.main.merge refs/heads/foo &&\n \t\ttest_config remote.pushdefault $pushdefault &&\n \t\ttest_commit commit-for-$2${4+-triangular} &&\n \t\ttest_push_$1 $2 $3 ${4+repo2}\n@@ -60,32 +60,32 @@ test_pushdefault_workflow () {\n }\n \n test_expect_success '\"upstream\" pushes to configured upstream' '\n-\tgit checkout master &&\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_config branch.master.merge refs/heads/foo &&\n+\tgit checkout main &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_config branch.main.merge refs/heads/foo &&\n \ttest_commit two &&\n \ttest_push_success upstream foo\n '\n \n test_expect_success '\"upstream\" does not push on unconfigured remote' '\n-\tgit checkout master &&\n-\ttest_unconfig branch.master.remote &&\n+\tgit checkout main &&\n+\ttest_unconfig branch.main.remote &&\n \ttest_commit three &&\n \ttest_push_failure upstream\n '\n \n test_expect_success '\"upstream\" does not push on unconfigured branch' '\n-\tgit checkout master &&\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_unconfig branch.master.merge &&\n+\tgit checkout main &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_unconfig branch.main.merge &&\n \ttest_commit four &&\n \ttest_push_failure upstream\n '\n \n test_expect_success '\"upstream\" does not push when remotes do not match' '\n-\tgit checkout master &&\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_config branch.master.merge refs/heads/foo &&\n+\tgit checkout main &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_config branch.main.merge refs/heads/foo &&\n \ttest_config push.default upstream &&\n \ttest_commit five &&\n \ttest_must_fail git push parent2\n@@ -121,99 +121,99 @@ test_expect_success 'push from/to new branch with current creates remote branch'\n '\n \n test_expect_success 'push to existing branch, with no upstream configured' '\n-\ttest_config branch.master.remote repo1 &&\n-\tgit checkout master &&\n+\ttest_config branch.main.remote repo1 &&\n+\tgit checkout main &&\n \ttest_push_failure simple &&\n \ttest_push_failure upstream\n '\n \n test_expect_success 'push to existing branch, upstream configured with same name' '\n-\ttest_config branch.master.remote repo1 &&\n-\ttest_config branch.master.merge refs/heads/master &&\n-\tgit checkout master &&\n+\ttest_config branch.main.remote repo1 &&\n+\ttest_config branch.main.merge refs/heads/main &&\n+\tgit checkout main &&\n \ttest_commit six &&\n-\ttest_push_success upstream master &&\n+\ttest_push_success upstream main &&\n \ttest_commit seven &&\n-\ttest_push_success simple master\n+\ttest_push_success simple main\n '\n \n test_expect_success 'push to existing branch, upstream configured with different name' '\n-\ttest_config branch.master.remote repo1 &&\n-\ttest_config branch.master.merge refs/heads/other-name &&\n-\tgit checkout master &&\n+\ttest_config branch.main.remote repo1 &&\n+\ttest_config branch.main.merge refs/heads/other-name &&\n+\tgit checkout main &&\n \ttest_commit eight &&\n \ttest_push_success upstream other-name &&\n \ttest_commit nine &&\n \ttest_push_failure simple &&\n \tgit --git-dir=repo1 log -1 --format=\"%h %s\" \"other-name\" >expect-other-name &&\n-\ttest_push_success current master &&\n+\ttest_push_success current main &&\n \tgit --git-dir=repo1 log -1 --format=\"%h %s\" \"other-name\" >actual-other-name &&\n \ttest_cmp expect-other-name actual-other-name\n '\n \n-# We are on 'master', which integrates with 'foo' from parent1\n+# We are on 'main', which integrates with 'foo' from parent1\n # remote (set in test_pushdefault_workflow helper).  Push to\n # parent1 in centralized, and push to parent2 in triangular workflow.\n-# The parent1 repository has 'master' and 'foo' branches, while\n-# the parent2 repository has only 'master' branch.\n+# The parent1 repository has 'main' and 'foo' branches, while\n+# the parent2 repository has only 'main' branch.\n #\n # test_pushdefault_workflow() arguments:\n # $1 = success or failure\n # $2 = push.default value\n-# $3 = branch to check for actual output (master or foo)\n+# $3 = branch to check for actual output (main or foo)\n # $4 = [optional] switch to triangular workflow\n \n-# update parent1's master (which is not our upstream)\n-test_pushdefault_workflow success current master\n+# update parent1's main (which is not our upstream)\n+test_pushdefault_workflow success current main\n \n # update parent1's foo (which is our upstream)\n test_pushdefault_workflow success upstream foo\n \n # upstream is foo which is not the name of the current branch\n-test_pushdefault_workflow failure simple master\n+test_pushdefault_workflow failure simple main\n \n-# master and foo are updated\n-test_pushdefault_workflow success matching master\n+# main and foo are updated\n+test_pushdefault_workflow success matching main\n \n-# master is updated\n-test_pushdefault_workflow success current master triangular\n+# main is updated\n+test_pushdefault_workflow success current main triangular\n \n # upstream mode cannot be used in triangular\n test_pushdefault_workflow failure upstream foo triangular\n \n # in triangular, 'simple' works as 'current' and update the branch\n # with the same name.\n-test_pushdefault_workflow success simple master triangular\n+test_pushdefault_workflow success simple main triangular\n \n-# master is updated (parent2 does not have foo)\n-test_pushdefault_workflow success matching master triangular\n+# main is updated (parent2 does not have foo)\n+test_pushdefault_workflow success matching main triangular\n \n # default tests, when no push-default is specified. This\n # should behave the same as \"simple\" in non-triangular\n # settings, and as \"current\" otherwise.\n \n test_expect_success 'default behavior allows \"simple\" push' '\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_config branch.master.merge refs/heads/master &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_config branch.main.merge refs/heads/main &&\n \ttest_config remote.pushdefault parent1 &&\n-\ttest_commit default-master-master &&\n-\ttest_push_success \"\" master\n+\ttest_commit default-main-main &&\n+\ttest_push_success \"\" main\n '\n \n test_expect_success 'default behavior rejects non-simple push' '\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_config branch.master.merge refs/heads/foo &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_config branch.main.merge refs/heads/foo &&\n \ttest_config remote.pushdefault parent1 &&\n-\ttest_commit default-master-foo &&\n+\ttest_commit default-main-foo &&\n \ttest_push_failure \"\"\n '\n \n test_expect_success 'default triangular behavior acts like \"current\"' '\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_config branch.master.merge refs/heads/foo &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_config branch.main.merge refs/heads/foo &&\n \ttest_config remote.pushdefault parent2 &&\n \ttest_commit default-triangular &&\n-\ttest_push_success \"\" master repo2\n+\ttest_push_success \"\" main repo2\n '\n \n test_done\ndiff --git a/t/t5529-push-errors.sh b/t/t5529-push-errors.sh\nindex 9871307fd4..ce85fd30ad 100755\n--- a/t/t5529-push-errors.sh\n+++ b/t/t5529-push-errors.sh\n@@ -32,7 +32,7 @@ test_expect_success 'detect missing branches early' '\n test_expect_success 'detect missing sha1 expressions early' '\n \techo no >rp-ran &&\n \techo no >expect &&\n-\ttest_must_fail git push origin master~2:master &&\n+\ttest_must_fail git push origin main~2:main &&\n \ttest_cmp expect rp-ran\n '\n \ndiff --git a/t/t5530-upload-pack-error.sh b/t/t5530-upload-pack-error.sh\nindex 9dd2d2457a..7c1460eaa9 100755\n--- a/t/t5530-upload-pack-error.sh\n+++ b/t/t5530-upload-pack-error.sh\n@@ -115,7 +115,7 @@ test_expect_success 'create empty repository' '\n \n test_expect_success 'fetch fails' '\n \n-\ttest_must_fail git fetch .. master\n+\ttest_must_fail git fetch .. main\n \n '\n \ndiff --git a/t/t5531-deep-submodule-push.sh b/t/t5531-deep-submodule-push.sh\nindex 4ad059e6be..afc0cd79f6 100755\n--- a/t/t5531-deep-submodule-push.sh\n+++ b/t/t5531-deep-submodule-push.sh\n@@ -30,7 +30,7 @@ test_expect_success setup '\n test_expect_success 'push works with recorded gitlink' '\n \t(\n \t\tcd work &&\n-\t\tgit push ../pub.git master\n+\t\tgit push ../pub.git main\n \t)\n '\n \n@@ -45,7 +45,7 @@ test_expect_success 'push if submodule has no remote' '\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Second commit for gar/bage\" &&\n-\t\tgit push --recurse-submodules=check ../pub.git master\n+\t\tgit push --recurse-submodules=check ../pub.git main\n \t)\n '\n \n@@ -66,21 +66,21 @@ test_expect_success 'push fails if submodule commit not on remote' '\n \t\tgit commit -m \"Third commit for gar/bage\" &&\n \t\t# the push should fail with --recurse-submodules=check\n \t\t# on the command line...\n-\t\ttest_must_fail git push --recurse-submodules=check ../pub.git master &&\n+\t\ttest_must_fail git push --recurse-submodules=check ../pub.git main &&\n \n \t\t# ...or if specified in the configuration..\n-\t\ttest_must_fail git -c push.recurseSubmodules=check push ../pub.git master\n+\t\ttest_must_fail git -c push.recurseSubmodules=check push ../pub.git main\n \t)\n '\n \n test_expect_success 'push succeeds after commit was pushed to remote' '\n \t(\n \t\tcd work/gar/bage &&\n-\t\tgit push origin master\n+\t\tgit push origin main\n \t) &&\n \t(\n \t\tcd work &&\n-\t\tgit push --recurse-submodules=check ../pub.git master\n+\t\tgit push --recurse-submodules=check ../pub.git main\n \t)\n '\n \n@@ -95,13 +95,13 @@ test_expect_success 'push succeeds if submodule commit not on remote but using o\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse on-demand on command line for gar/bage\" &&\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master &&\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# Check that the submodule commit got there too\n \t\tcd gar/bage &&\n-\t\tgit diff --quiet origin/master master\n+\t\tgit diff --quiet origin/main main\n \t)\n '\n \n@@ -116,13 +116,13 @@ test_expect_success 'push succeeds if submodule commit not on remote but using o\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse on-demand from config for gar/bage\" &&\n-\t\tgit -c push.recurseSubmodules=on-demand push ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=on-demand push ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# Check that the submodule commit got there too\n \t\tcd gar/bage &&\n-\t\tgit diff --quiet origin/master master\n+\t\tgit diff --quiet origin/main main\n \t)\n '\n \n@@ -137,13 +137,13 @@ test_expect_success 'push succeeds if submodule commit not on remote but using a\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse submodule.recurse from config for gar/bage\" &&\n-\t\tgit -c submodule.recurse push ../pub.git master &&\n+\t\tgit -c submodule.recurse push ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# Check that the submodule commit got there too\n \t\tcd gar/bage &&\n-\t\tgit diff --quiet origin/master master\n+\t\tgit diff --quiet origin/main main\n \t)\n '\n \n@@ -161,34 +161,34 @@ test_expect_success 'push recurse-submodules on command line overrides config' '\n \n \t\t# Ensure that we can override on-demand in the config\n \t\t# to just check submodules\n-\t\ttest_must_fail git -c push.recurseSubmodules=on-demand push --recurse-submodules=check ../pub.git master &&\n+\t\ttest_must_fail git -c push.recurseSubmodules=on-demand push --recurse-submodules=check ../pub.git main &&\n \t\t# Check that the supermodule commit did not get there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master^ &&\n+\t\tgit diff --quiet FETCH_HEAD main^ &&\n \t\t# Check that the submodule commit did not get there\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# Ensure that we can override check in the config to\n \t\t# disable submodule recursion entirely\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n-\t\tgit -c push.recurseSubmodules=on-demand push --recurse-submodules=no ../pub.git master &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n+\t\tgit -c push.recurseSubmodules=on-demand push --recurse-submodules=no ../pub.git main &&\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# Ensure that we can override check in the config to\n \t\t# disable submodule recursion entirely (alternative form)\n-\t\tgit -c push.recurseSubmodules=on-demand push --no-recurse-submodules ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=on-demand push --no-recurse-submodules ../pub.git main &&\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# Ensure that we can override check in the config to\n \t\t# push the submodule too\n-\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=on-demand ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=on-demand ../pub.git main &&\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n-\t\t(cd gar/bage && git diff --quiet origin/master master)\n+\t\tgit diff --quiet FETCH_HEAD main &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main)\n \t)\n '\n \n@@ -205,31 +205,31 @@ test_expect_success 'push recurse-submodules last one wins on command line' '\n \t\tgit commit -m \"Recurse on command-line overriding earlier command-line for gar/bage\" &&\n \n \t\t# should result in \"check\"\n-\t\ttest_must_fail git push --recurse-submodules=on-demand --recurse-submodules=check ../pub.git master &&\n+\t\ttest_must_fail git push --recurse-submodules=on-demand --recurse-submodules=check ../pub.git main &&\n \t\t# Check that the supermodule commit did not get there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master^ &&\n+\t\tgit diff --quiet FETCH_HEAD main^ &&\n \t\t# Check that the submodule commit did not get there\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# should result in \"no\"\n-\t\tgit push --recurse-submodules=on-demand --recurse-submodules=no ../pub.git master &&\n+\t\tgit push --recurse-submodules=on-demand --recurse-submodules=no ../pub.git main &&\n \t\t# Check that the supermodule commit did get there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# Check that the submodule commit did not get there\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# should result in \"no\"\n-\t\tgit push --recurse-submodules=on-demand --no-recurse-submodules ../pub.git master &&\n+\t\tgit push --recurse-submodules=on-demand --no-recurse-submodules ../pub.git main &&\n \t\t# Check that the submodule commit did not get there\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# But the options in the other order should push the submodule\n-\t\tgit push --recurse-submodules=check --recurse-submodules=on-demand ../pub.git master &&\n+\t\tgit push --recurse-submodules=check --recurse-submodules=on-demand ../pub.git main &&\n \t\t# Check that the submodule commit did get there\n \t\tgit fetch ../pub.git &&\n-\t\t(cd gar/bage && git diff --quiet origin/master master)\n+\t\t(cd gar/bage && git diff --quiet origin/main main)\n \t)\n '\n \n@@ -244,13 +244,13 @@ test_expect_success 'push succeeds if submodule commit not on remote using on-de\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse on-demand on command-line overriding config for gar/bage\" &&\n-\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=on-demand ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=on-demand ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# Check that the submodule commit got there\n \t\tcd gar/bage &&\n-\t\tgit diff --quiet origin/master master\n+\t\tgit diff --quiet origin/main main\n \t)\n '\n \n@@ -265,14 +265,14 @@ test_expect_success 'push succeeds if submodule commit disabling recursion from\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse disable on command-line overriding config for gar/bage\" &&\n-\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=no ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=no ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# But that the submodule commit did not\n-\t\t( cd gar/bage && git diff --quiet origin/master master^ ) &&\n+\t\t( cd gar/bage && git diff --quiet origin/main main^ ) &&\n \t\t# Now push it to avoid confusing future tests\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t)\n '\n \n@@ -287,14 +287,14 @@ test_expect_success 'push succeeds if submodule commit disabling recursion from\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse disable on command-line alternative overriding config for gar/bage\" &&\n-\t\tgit -c push.recurseSubmodules=check push --no-recurse-submodules ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=check push --no-recurse-submodules ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# But that the submodule commit did not\n-\t\t( cd gar/bage && git diff --quiet origin/master master^ ) &&\n+\t\t( cd gar/bage && git diff --quiet origin/main main^ ) &&\n \t\t# Now push it to avoid confusing future tests\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t)\n '\n \n@@ -304,7 +304,7 @@ test_expect_success 'submodule entry pointing at a tag is error' '\n \tgit -C work update-index --cacheinfo 160000 \"$tag\" gar/bage &&\n \tgit -C work commit -m \"bad commit\" &&\n \ttest_when_finished \"git -C work reset --hard HEAD^\" &&\n-\ttest_must_fail git -C work push --recurse-submodules=on-demand ../pub.git master 2>err &&\n+\ttest_must_fail git -C work push --recurse-submodules=on-demand ../pub.git main 2>err &&\n \ttest_i18ngrep \"is a tag, not a commit\" err\n '\n \n@@ -319,9 +319,9 @@ test_expect_success 'push fails if recurse submodules option passed as yes' '\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse push fails if recurse submodules option passed as yes for gar/bage\" &&\n-\t\ttest_must_fail git push --recurse-submodules=yes ../pub.git master &&\n-\t\ttest_must_fail git -c push.recurseSubmodules=yes push ../pub.git master &&\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\ttest_must_fail git push --recurse-submodules=yes ../pub.git main &&\n+\t\ttest_must_fail git -c push.recurseSubmodules=yes push ../pub.git main &&\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t)\n '\n \n@@ -363,7 +363,7 @@ test_expect_success 'push succeeds if submodule has no remote and is on the firs\n \t\t) &&\n \t\tgit add b &&\n \t\tgit commit -m \"added submodule\" &&\n-\t\tgit push --recurse-submodules=check origin master\n+\t\tgit push --recurse-submodules=check origin main\n \t)\n '\n \n@@ -372,21 +372,21 @@ test_expect_success 'push unpushed submodules when not needed' '\n \t\tcd work &&\n \t\t(\n \t\t\tcd gar/bage &&\n-\t\t\tgit checkout master &&\n+\t\t\tgit checkout main &&\n \t\t\t>junk5 &&\n \t\t\tgit add junk5 &&\n \t\t\tgit commit -m \"Fifth junk\" &&\n \t\t\tgit push &&\n-\t\t\tgit rev-parse origin/master >../../../expected\n+\t\t\tgit rev-parse origin/main >../../../expected\n \t\t) &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Fifth commit for gar/bage\" &&\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t) &&\n \t(\n \t\tcd submodule.git &&\n-\t\tgit rev-parse master >../actual\n+\t\tgit rev-parse main >../actual\n \t) &&\n \ttest_cmp expected actual\n '\n@@ -394,7 +394,7 @@ test_expect_success 'push unpushed submodules when not needed' '\n test_expect_success 'push unpushed submodules when not needed 2' '\n \t(\n \t\tcd submodule.git &&\n-\t\tgit rev-parse master >../expected\n+\t\tgit rev-parse main >../expected\n \t) &&\n \t(\n \t\tcd work &&\n@@ -407,11 +407,11 @@ test_expect_success 'push unpushed submodules when not needed 2' '\n \t\t>junk2 &&\n \t\tgit add junk2 &&\n \t\tgit commit -m \"Second junk for work\" &&\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t) &&\n \t(\n \t\tcd submodule.git &&\n-\t\tgit rev-parse master >../actual\n+\t\tgit rev-parse main >../actual\n \t) &&\n \ttest_cmp expected actual\n '\n@@ -421,20 +421,20 @@ test_expect_success 'push unpushed submodules recursively' '\n \t\tcd work &&\n \t\t(\n \t\t\tcd gar/bage &&\n-\t\t\tgit checkout master &&\n+\t\t\tgit checkout main &&\n \t\t\t> junk7 &&\n \t\t\tgit add junk7 &&\n \t\t\tgit commit -m \"Seventh junk\" &&\n-\t\t\tgit rev-parse master >../../../expected\n+\t\t\tgit rev-parse main >../../../expected\n \t\t) &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Seventh commit for gar/bage\" &&\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t) &&\n \t(\n \t\tcd submodule.git &&\n-\t\tgit rev-parse master >../actual\n+\t\tgit rev-parse main >../actual\n \t) &&\n \ttest_cmp expected actual\n '\n@@ -444,64 +444,64 @@ test_expect_success 'push unpushable submodule recursively fails' '\n \t\tcd work &&\n \t\t(\n \t\t\tcd gar/bage &&\n-\t\t\tgit rev-parse origin/master >../../../expected &&\n-\t\t\tgit checkout master~0 &&\n+\t\t\tgit rev-parse origin/main >../../../expected &&\n+\t\t\tgit checkout main~0 &&\n \t\t\t> junk8 &&\n \t\t\tgit add junk8 &&\n \t\t\tgit commit -m \"Eighth junk\"\n \t\t) &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Eighth commit for gar/bage\" &&\n-\t\ttest_must_fail git push --recurse-submodules=on-demand ../pub.git master\n+\t\ttest_must_fail git push --recurse-submodules=on-demand ../pub.git main\n \t) &&\n \t(\n \t\tcd submodule.git &&\n-\t\tgit rev-parse master >../actual\n+\t\tgit rev-parse main >../actual\n \t) &&\n-\ttest_when_finished git -C work reset --hard master^ &&\n+\ttest_when_finished git -C work reset --hard main^ &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'push --dry-run does not recursively update submodules' '\n \t(\n \t\tcd work/gar/bage &&\n-\t\tgit checkout master &&\n-\t\tgit rev-parse master >../../../expected_submodule &&\n+\t\tgit checkout main &&\n+\t\tgit rev-parse main >../../../expected_submodule &&\n \t\t> junk9 &&\n \t\tgit add junk9 &&\n \t\tgit commit -m \"Ninth junk\" &&\n \n \t\t# Go up to 'work' directory\n \t\tcd ../.. &&\n-\t\tgit checkout master &&\n-\t\tgit rev-parse master >../expected_pub &&\n+\t\tgit checkout main &&\n+\t\tgit rev-parse main >../expected_pub &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Ninth commit for gar/bage\" &&\n-\t\tgit push --dry-run --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --dry-run --recurse-submodules=on-demand ../pub.git main\n \t) &&\n-\tgit -C submodule.git rev-parse master >actual_submodule &&\n-\tgit -C pub.git rev-parse master >actual_pub &&\n+\tgit -C submodule.git rev-parse main >actual_submodule &&\n+\tgit -C pub.git rev-parse main >actual_pub &&\n \ttest_cmp expected_pub actual_pub &&\n \ttest_cmp expected_submodule actual_submodule\n '\n \n test_expect_success 'push --dry-run does not recursively update submodules' '\n-\tgit -C work push --dry-run --recurse-submodules=only ../pub.git master &&\n+\tgit -C work push --dry-run --recurse-submodules=only ../pub.git main &&\n \n-\tgit -C submodule.git rev-parse master >actual_submodule &&\n-\tgit -C pub.git rev-parse master >actual_pub &&\n+\tgit -C submodule.git rev-parse main >actual_submodule &&\n+\tgit -C pub.git rev-parse main >actual_pub &&\n \ttest_cmp expected_pub actual_pub &&\n \ttest_cmp expected_submodule actual_submodule\n '\n \n test_expect_success 'push only unpushed submodules recursively' '\n-\tgit -C work/gar/bage rev-parse master >expected_submodule &&\n-\tgit -C pub.git rev-parse master >expected_pub &&\n+\tgit -C work/gar/bage rev-parse main >expected_submodule &&\n+\tgit -C pub.git rev-parse main >expected_pub &&\n \n-\tgit -C work push --recurse-submodules=only ../pub.git master &&\n+\tgit -C work push --recurse-submodules=only ../pub.git main &&\n \n-\tgit -C submodule.git rev-parse master >actual_submodule &&\n-\tgit -C pub.git rev-parse master >actual_pub &&\n+\tgit -C submodule.git rev-parse main >actual_submodule &&\n+\tgit -C pub.git rev-parse main >actual_pub &&\n \ttest_cmp expected_submodule actual_submodule &&\n \ttest_cmp expected_pub actual_pub\n '\n@@ -517,14 +517,14 @@ test_expect_success 'push propagating the remotes name to a submodule' '\n \tgit -C work commit -m \"Tenth junk added to gar/bage\" &&\n \n \t# Fails when submodule does not have a matching remote\n-\ttest_must_fail git -C work push --recurse-submodules=on-demand pub master &&\n+\ttest_must_fail git -C work push --recurse-submodules=on-demand pub main &&\n \t# Succeeds when submodules has matching remote and refspec\n-\tgit -C work push --recurse-submodules=on-demand origin master &&\n+\tgit -C work push --recurse-submodules=on-demand origin main &&\n \n-\tgit -C submodule.git rev-parse master >actual_submodule &&\n-\tgit -C pub.git rev-parse master >actual_pub &&\n-\tgit -C work/gar/bage rev-parse master >expected_submodule &&\n-\tgit -C work rev-parse master >expected_pub &&\n+\tgit -C submodule.git rev-parse main >actual_submodule &&\n+\tgit -C pub.git rev-parse main >actual_pub &&\n+\tgit -C work/gar/bage rev-parse main >expected_submodule &&\n+\tgit -C work rev-parse main >expected_pub &&\n \ttest_cmp expected_submodule actual_submodule &&\n \ttest_cmp expected_pub actual_pub\n '\n@@ -548,7 +548,7 @@ test_expect_success 'push propagating refspec to a submodule' '\n \ttest_must_fail git -C work push --recurse-submodules=on-demand origin \\\n \t\tHEAD:refs/heads/branch2 &&\n \n-\tgit -C work/gar/bage branch branch2 master &&\n+\tgit -C work/gar/bage branch branch2 main &&\n \tgit -C work push --recurse-submodules=on-demand origin branch2 &&\n \n \tgit -C submodule.git rev-parse branch2 >actual_submodule &&\ndiff --git a/t/t5533-push-cas.sh b/t/t5533-push-cas.sh\nindex 7813e8470e..9fcec604c3 100755\n--- a/t/t5533-push-cas.sh\n+++ b/t/t5533-push-cas.sh\n@@ -29,22 +29,22 @@ setup_src_dup_dst () {\n \t(\n \t\tcd dup &&\n \t\tgit fetch &&\n-\t\tgit merge origin/master &&\n-\t\tgit switch -c branch master~2 &&\n+\t\tgit merge origin/main &&\n+\t\tgit switch -c branch main~2 &&\n \t\ttest_commit D &&\n \t\ttest_commit E &&\n \t\tgit push origin --all\n \t) &&\n \t(\n \t\tcd src &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\tgit fetch --all &&\n \t\tgit branch branch --track origin/branch &&\n-\t\tgit rebase origin/master\n+\t\tgit rebase origin/main\n \t) &&\n \t(\n \t\tcd dup &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit F &&\n \t\ttest_commit G &&\n \t\tgit switch branch &&\n@@ -65,11 +65,11 @@ test_expect_success 'push to update (protected)' '\n \t(\n \t\tcd dst &&\n \t\ttest_commit D &&\n-\t\ttest_must_fail git push --force-with-lease=master:master origin master 2>err &&\n+\t\ttest_must_fail git push --force-with-lease=main:main origin main 2>err &&\n \t\tgrep \"stale info\" err\n \t) &&\n-\tgit ls-remote . refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote . refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -78,11 +78,11 @@ test_expect_success 'push to update (protected, forced)' '\n \t(\n \t\tcd dst &&\n \t\ttest_commit D &&\n-\t\tgit push --force --force-with-lease=master:master origin master 2>err &&\n+\t\tgit push --force --force-with-lease=main:main origin main 2>err &&\n \t\tgrep \"forced update\" err\n \t) &&\n-\tgit ls-remote dst refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote dst refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -90,20 +90,20 @@ test_expect_success 'push to update (protected, tracking)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit D &&\n \t\tgit checkout HEAD^0\n \t) &&\n-\tgit ls-remote src refs/heads/master >expect &&\n+\tgit ls-remote src refs/heads/main >expect &&\n \t(\n \t\tcd dst &&\n \t\ttest_commit E &&\n-\t\tgit ls-remote . refs/remotes/origin/master >expect &&\n-\t\ttest_must_fail git push --force-with-lease=master origin master &&\n-\t\tgit ls-remote . refs/remotes/origin/master >actual &&\n+\t\tgit ls-remote . refs/remotes/origin/main >expect &&\n+\t\ttest_must_fail git push --force-with-lease=main origin main &&\n+\t\tgit ls-remote . refs/remotes/origin/main >actual &&\n \t\ttest_cmp expect actual\n \t) &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -111,18 +111,18 @@ test_expect_success 'push to update (protected, tracking, forced)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit D &&\n \t\tgit checkout HEAD^0\n \t) &&\n \t(\n \t\tcd dst &&\n \t\ttest_commit E &&\n-\t\tgit ls-remote . refs/remotes/origin/master >expect &&\n-\t\tgit push --force --force-with-lease=master origin master\n+\t\tgit ls-remote . refs/remotes/origin/main >expect &&\n+\t\tgit push --force --force-with-lease=main origin main\n \t) &&\n-\tgit ls-remote dst refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote dst refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -131,10 +131,10 @@ test_expect_success 'push to update (allowed)' '\n \t(\n \t\tcd dst &&\n \t\ttest_commit D &&\n-\t\tgit push --force-with-lease=master:master^ origin master\n+\t\tgit push --force-with-lease=main:main^ origin main\n \t) &&\n-\tgit ls-remote dst refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote dst refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -143,11 +143,11 @@ test_expect_success 'push to update (allowed, tracking)' '\n \t(\n \t\tcd dst &&\n \t\ttest_commit D &&\n-\t\tgit push --force-with-lease=master origin master 2>err &&\n+\t\tgit push --force-with-lease=main origin main 2>err &&\n \t\t! grep \"forced update\" err\n \t) &&\n-\tgit ls-remote dst refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote dst refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -157,22 +157,22 @@ test_expect_success 'push to update (allowed even though no-ff)' '\n \t\tcd dst &&\n \t\tgit reset --hard HEAD^ &&\n \t\ttest_commit D &&\n-\t\tgit push --force-with-lease=master origin master 2>err &&\n+\t\tgit push --force-with-lease=main origin main 2>err &&\n \t\tgrep \"forced update\" err\n \t) &&\n-\tgit ls-remote dst refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote dst refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'push to delete (protected)' '\n \tsetup_srcdst_basic &&\n-\tgit ls-remote src refs/heads/master >expect &&\n+\tgit ls-remote src refs/heads/main >expect &&\n \t(\n \t\tcd dst &&\n-\t\ttest_must_fail git push --force-with-lease=master:master^ origin :master\n+\t\ttest_must_fail git push --force-with-lease=main:main^ origin :main\n \t) &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -180,9 +180,9 @@ test_expect_success 'push to delete (protected, forced)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd dst &&\n-\t\tgit push --force --force-with-lease=master:master^ origin :master\n+\t\tgit push --force --force-with-lease=main:main^ origin :main\n \t) &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_must_be_empty actual\n '\n \n@@ -190,10 +190,10 @@ test_expect_success 'push to delete (allowed)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd dst &&\n-\t\tgit push --force-with-lease=master origin :master 2>err &&\n+\t\tgit push --force-with-lease=main origin :main 2>err &&\n \t\tgrep deleted err\n \t) &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_must_be_empty actual\n '\n \n@@ -201,12 +201,12 @@ test_expect_success 'cover everything with default force-with-lease (protected)'\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit branch naster master^\n+\t\tgit branch nain main^\n \t) &&\n \tgit ls-remote src refs/heads/\\* >expect &&\n \t(\n \t\tcd dst &&\n-\t\ttest_must_fail git push --force-with-lease origin master master:naster\n+\t\ttest_must_fail git push --force-with-lease origin main main:nain\n \t) &&\n \tgit ls-remote src refs/heads/\\* >actual &&\n \ttest_cmp expect actual\n@@ -216,16 +216,16 @@ test_expect_success 'cover everything with default force-with-lease (allowed)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit branch naster master^\n+\t\tgit branch nain main^\n \t) &&\n \t(\n \t\tcd dst &&\n \t\tgit fetch &&\n-\t\tgit push --force-with-lease origin master master:naster\n+\t\tgit push --force-with-lease origin main main:nain\n \t) &&\n-\tgit ls-remote dst refs/heads/master |\n-\tsed -e \"s/master/naster/\" >expect &&\n-\tgit ls-remote src refs/heads/naster >actual &&\n+\tgit ls-remote dst refs/heads/main |\n+\tsed -e \"s/main/nain/\" >expect &&\n+\tgit ls-remote src refs/heads/nain >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -233,7 +233,7 @@ test_expect_success 'new branch covered by force-with-lease' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd dst &&\n-\t\tgit branch branch master &&\n+\t\tgit branch branch main &&\n \t\tgit push --force-with-lease=branch origin branch\n \t) &&\n \tgit ls-remote dst refs/heads/branch >expect &&\n@@ -245,7 +245,7 @@ test_expect_success 'new branch covered by force-with-lease (explicit)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd dst &&\n-\t\tgit branch branch master &&\n+\t\tgit branch branch main &&\n \t\tgit push --force-with-lease=branch: origin branch\n \t) &&\n \tgit ls-remote dst refs/heads/branch >expect &&\n@@ -257,12 +257,12 @@ test_expect_success 'new branch already exists' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit checkout -b branch master &&\n+\t\tgit checkout -b branch main &&\n \t\ttest_commit F\n \t) &&\n \t(\n \t\tcd dst &&\n-\t\tgit branch branch master &&\n+\t\tgit branch branch main &&\n \t\ttest_must_fail git push --force-with-lease=branch: origin branch\n \t)\n '\n@@ -277,7 +277,7 @@ test_expect_success 'background updates of REMOTE can be mitigated with a non-up\n \t\tcd dst &&\n \t\ttest_commit G &&\n \t\tgit remote add origin-push ../src.bare &&\n-\t\tgit push origin-push master:master\n+\t\tgit push origin-push main:main\n \t) &&\n \tgit clone --no-local src.bare dst2 &&\n \ttest_when_finished \"rm -rf dst2\" &&\n@@ -299,58 +299,58 @@ test_expect_success 'background updates of REMOTE can be mitigated with a non-up\n test_expect_success 'background updates to remote can be mitigated with \"--force-if-includes\"' '\n \tsetup_src_dup_dst &&\n \ttest_when_finished \"rm -fr dst src dup\" &&\n-\tgit ls-remote dst refs/heads/master >expect.master &&\n+\tgit ls-remote dst refs/heads/main >expect.main &&\n \tgit ls-remote dst refs/heads/branch >expect.branch &&\n \t(\n \t\tcd src &&\n \t\tgit switch branch &&\n \t\ttest_commit I &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit J &&\n \t\tgit fetch --all &&\n \t\ttest_must_fail git push --force-with-lease --force-if-includes --all\n \t) &&\n-\tgit ls-remote dst refs/heads/master >actual.master &&\n+\tgit ls-remote dst refs/heads/main >actual.main &&\n \tgit ls-remote dst refs/heads/branch >actual.branch &&\n-\ttest_cmp expect.master actual.master &&\n+\ttest_cmp expect.main actual.main &&\n \ttest_cmp expect.branch actual.branch\n '\n \n test_expect_success 'background updates to remote can be mitigated with \"push.useForceIfIncludes\"' '\n \tsetup_src_dup_dst &&\n \ttest_when_finished \"rm -fr dst src dup\" &&\n-\tgit ls-remote dst refs/heads/master >expect.master &&\n+\tgit ls-remote dst refs/heads/main >expect.main &&\n \t(\n \t\tcd src &&\n \t\tgit switch branch &&\n \t\ttest_commit I &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit J &&\n \t\tgit fetch --all &&\n \t\tgit config --local push.useForceIfIncludes true &&\n-\t\ttest_must_fail git push --force-with-lease=master origin master\n+\t\ttest_must_fail git push --force-with-lease=main origin main\n \t) &&\n-\tgit ls-remote dst refs/heads/master >actual.master &&\n-\ttest_cmp expect.master actual.master\n+\tgit ls-remote dst refs/heads/main >actual.main &&\n+\ttest_cmp expect.main actual.main\n '\n \n test_expect_success '\"--force-if-includes\" should be disabled for --force-with-lease=\"<refname>:<expect>\"' '\n \tsetup_src_dup_dst &&\n \ttest_when_finished \"rm -fr dst src dup\" &&\n-\tgit ls-remote dst refs/heads/master >expect.master &&\n+\tgit ls-remote dst refs/heads/main >expect.main &&\n \t(\n \t\tcd src &&\n \t\tgit switch branch &&\n \t\ttest_commit I &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit J &&\n-\t\tremote_head=\"$(git rev-parse refs/remotes/origin/master)\" &&\n+\t\tremote_head=\"$(git rev-parse refs/remotes/origin/main)\" &&\n \t\tgit fetch --all &&\n-\t\ttest_must_fail git push --force-if-includes --force-with-lease=\"master:$remote_head\" 2>err &&\n+\t\ttest_must_fail git push --force-if-includes --force-with-lease=\"main:$remote_head\" 2>err &&\n \t\tgrep \"stale info\" err\n \t) &&\n-\tgit ls-remote dst refs/heads/master >actual.master &&\n-\ttest_cmp expect.master actual.master\n+\tgit ls-remote dst refs/heads/main >actual.main &&\n+\ttest_cmp expect.main actual.main\n '\n \n test_expect_success '\"--force-if-includes\" should allow forced update after a rebase (\"pull --rebase\")' '\n@@ -360,10 +360,10 @@ test_expect_success '\"--force-if-includes\" should allow forced update after a re\n \t\tcd src &&\n \t\tgit switch branch &&\n \t\ttest_commit I &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit J &&\n-\t\tgit pull --rebase origin master &&\n-\t\tgit push --force-if-includes --force-with-lease=\"master\"\n+\t\tgit pull --rebase origin main &&\n+\t\tgit push --force-if-includes --force-with-lease=\"main\"\n \t)\n '\n \n@@ -374,11 +374,11 @@ test_expect_success '\"--force-if-includes\" should allow forced update after a re\n \t\tcd src &&\n \t\tgit switch branch &&\n \t\ttest_commit I &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit J &&\n-\t\tgit pull --rebase origin master &&\n+\t\tgit pull --rebase origin main &&\n \t\tgit rebase --onto HEAD~4 HEAD~1 &&\n-\t\tgit push --force-if-includes --force-with-lease=\"master\"\n+\t\tgit push --force-if-includes --force-with-lease=\"main\"\n \t)\n '\n \ndiff --git a/t/t5534-push-signed.sh b/t/t5534-push-signed.sh\nindex af0385fb89..0e850a76de 100755\n--- a/t/t5534-push-signed.sh\n+++ b/t/t5534-push-signed.sh\n@@ -9,11 +9,11 @@ prepare_dst () {\n \trm -fr dst &&\n \ttest_create_repo dst &&\n \n-\tgit push dst master:noop master:ff master:noff\n+\tgit push dst main:noop main:ff main:noff\n }\n \n test_expect_success setup '\n-\t# master, ff and noff branches pointing at the same commit\n+\t# main, ff and noff branches pointing at the same commit\n \ttest_tick &&\n \tgit commit --allow-empty -m initial &&\n \ndiff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh\nindex a55202d2d3..01071f2306 100755\n--- a/t/t5537-fetch-shallow.sh\n+++ b/t/t5537-fetch-shallow.sh\n@@ -49,7 +49,7 @@ test_expect_success 'fetch from shallow clone' '\n \tcd shallow2 &&\n \tgit fetch &&\n \tgit fsck &&\n-\tgit log --format=%s origin/master >actual &&\n+\tgit log --format=%s origin/main >actual &&\n \ttest_write_lines 5 4 3 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -64,7 +64,7 @@ test_expect_success 'fetch --depth from shallow clone' '\n \tcd shallow2 &&\n \tgit fetch --depth=2 &&\n \tgit fsck &&\n-\tgit log --format=%s origin/master >actual &&\n+\tgit log --format=%s origin/main >actual &&\n \ttest_write_lines 6 5 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -75,7 +75,7 @@ test_expect_success 'fetch --unshallow from shallow clone' '\n \tcd shallow2 &&\n \tgit fetch --unshallow &&\n \tgit fsck &&\n-\tgit log --format=%s origin/master >actual &&\n+\tgit log --format=%s origin/main >actual &&\n \ttest_write_lines 6 5 4 3 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -89,7 +89,7 @@ test_expect_success 'fetch --unshallow from a full clone' '\n \ttest_write_lines 4 3 >expect &&\n \ttest_cmp expect actual &&\n \tgit -c fetch.writeCommitGraph fetch --unshallow &&\n-\tgit log origin/master --format=%s >actual &&\n+\tgit log origin/main --format=%s >actual &&\n \ttest_write_lines 4 3 2 1 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -104,9 +104,9 @@ test_expect_success 'fetch something upstream has but hidden by clients shallow\n \tgit commit -m add-1-back &&\n \t(\n \tcd shallow2 &&\n-\tgit fetch ../.git +refs/heads/master:refs/remotes/top/master &&\n+\tgit fetch ../.git +refs/heads/main:refs/remotes/top/main &&\n \tgit fsck &&\n-\tgit log --format=%s top/master >actual &&\n+\tgit log --format=%s top/main >actual &&\n \ttest_write_lines add-1-back 4 3 >expect &&\n \ttest_cmp expect actual\n \t) &&\n@@ -135,7 +135,7 @@ test_expect_success 'fetch that requires changes in .git/shallow is filtered' '\n test_expect_success 'fetch --update-shallow' '\n \t(\n \tcd shallow &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcommit 7 &&\n \tgit tag -m foo heavy-tag HEAD^ &&\n \tgit tag light-tag HEAD^:tracked\n@@ -146,13 +146,13 @@ test_expect_success 'fetch --update-shallow' '\n \tgit fsck &&\n \tgit for-each-ref --sort=refname --format=\"%(refname)\" >actual.refs &&\n \tcat <<-\\EOF >expect.refs &&\n-\trefs/remotes/shallow/master\n+\trefs/remotes/shallow/main\n \trefs/remotes/shallow/no-shallow\n \trefs/tags/heavy-tag\n \trefs/tags/light-tag\n \tEOF\n \ttest_cmp expect.refs actual.refs &&\n-\tgit log --format=%s shallow/master >actual &&\n+\tgit log --format=%s shallow/main >actual &&\n \ttest_write_lines 7 6 5 4 3 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -161,7 +161,7 @@ test_expect_success 'fetch --update-shallow' '\n test_expect_success 'fetch --update-shallow (with fetch.writeCommitGraph)' '\n \t(\n \tcd shallow &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcommit 8 &&\n \tgit tag -m foo heavy-tag-for-graph HEAD^ &&\n \tgit tag light-tag-for-graph HEAD^:tracked\n@@ -173,7 +173,7 @@ test_expect_success 'fetch --update-shallow (with fetch.writeCommitGraph)' '\n \tgit fsck &&\n \tgit for-each-ref --sort=refname --format=\"%(refname)\" >actual.refs &&\n \tcat <<-EOF >expect.refs &&\n-\trefs/remotes/shallow/master\n+\trefs/remotes/shallow/main\n \trefs/remotes/shallow/no-shallow\n \trefs/tags/heavy-tag\n \trefs/tags/heavy-tag-for-graph\n@@ -181,7 +181,7 @@ test_expect_success 'fetch --update-shallow (with fetch.writeCommitGraph)' '\n \trefs/tags/light-tag-for-graph\n \tEOF\n \ttest_cmp expect.refs actual.refs &&\n-\tgit log --format=%s shallow/master >actual &&\n+\tgit log --format=%s shallow/main >actual &&\n \ttest_write_lines 8 7 6 5 4 3 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -206,7 +206,7 @@ test_expect_success '.git/shallow is edited by repack' '\n \ttest_commit -C shallow-server E &&\n \ttest_commit -C shallow-server D &&\n \td=\"$(git -C shallow-server rev-parse --verify D^0)\" &&\n-\tgit -C shallow-server checkout master &&\n+\tgit -C shallow-server checkout main &&\n \n \tgit clone --depth=1 --no-tags --no-single-branch \\\n \t\t\"file://$PWD/shallow-server\" shallow-client &&\n@@ -244,7 +244,7 @@ test_expect_success 'shallow fetches check connectivity before writing shallow f\n \tgit -C \"$REPO\" config protocol.version 2 &&\n \tgit -C client config protocol.version 2 &&\n \n-\tgit -C client fetch --depth=2 \"$HTTPD_URL/one_time_perl/repo\" master:a_branch &&\n+\tgit -C client fetch --depth=2 \"$HTTPD_URL/one_time_perl/repo\" main:a_branch &&\n \n \t# Craft a situation in which the server sends back an unshallow request\n \t# with an empty packfile. This is done by refetching with a shorter\n@@ -256,7 +256,7 @@ test_expect_success 'shallow fetches check connectivity before writing shallow f\n \t       >\"$HTTPD_ROOT_PATH/one-time-perl\" &&\n \ttest_must_fail env GIT_TEST_SIDEBAND_ALL=0 git -C client \\\n \t\tfetch --depth=1 \"$HTTPD_URL/one_time_perl/repo\" \\\n-\t\tmaster:a_branch &&\n+\t\tmain:a_branch &&\n \n \t# Ensure that the one-time-perl script was used.\n \t! test -e \"$HTTPD_ROOT_PATH/one-time-perl\" &&\ndiff --git a/t/t5538-push-shallow.sh b/t/t5538-push-shallow.sh\nindex ecbf84d21c..9d3e946bf1 100755\n--- a/t/t5538-push-shallow.sh\n+++ b/t/t5538-push-shallow.sh\n@@ -44,9 +44,9 @@ test_expect_success 'push from shallow clone' '\n \t(\n \tcd shallow &&\n \tcommit 5 &&\n-\tgit push ../.git +master:refs/remotes/shallow/master\n+\tgit push ../.git +main:refs/remotes/shallow/main\n \t) &&\n-\tgit log --format=%s shallow/master >actual &&\n+\tgit log --format=%s shallow/main >actual &&\n \tgit fsck &&\n \tcat <<EOF >expect &&\n 5\n@@ -61,10 +61,10 @@ EOF\n test_expect_success 'push from shallow clone, with grafted roots' '\n \t(\n \tcd shallow2 &&\n-\ttest_must_fail git push ../.git +master:refs/remotes/shallow2/master 2>err &&\n-\tgrep \"shallow2/master.*shallow update not allowed\" err\n+\ttest_must_fail git push ../.git +main:refs/remotes/shallow2/main 2>err &&\n+\tgrep \"shallow2/main.*shallow update not allowed\" err\n \t) &&\n-\ttest_must_fail git rev-parse shallow2/master &&\n+\ttest_must_fail git rev-parse shallow2/main &&\n \tgit fsck\n '\n \n@@ -72,9 +72,9 @@ test_expect_success 'add new shallow root with receive.updateshallow on' '\n \ttest_config receive.shallowupdate true &&\n \t(\n \tcd shallow2 &&\n-\tgit push ../.git +master:refs/remotes/shallow2/master\n+\tgit push ../.git +main:refs/remotes/shallow2/main\n \t) &&\n-\tgit log --format=%s shallow2/master >actual &&\n+\tgit log --format=%s shallow2/main >actual &&\n \tgit fsck &&\n \tcat <<EOF >expect &&\n c\n@@ -87,12 +87,12 @@ test_expect_success 'push from shallow to shallow' '\n \t(\n \tcd shallow &&\n \tgit --git-dir=../shallow2/.git config receive.shallowupdate true &&\n-\tgit push ../shallow2/.git +master:refs/remotes/shallow/master &&\n+\tgit push ../shallow2/.git +main:refs/remotes/shallow/main &&\n \tgit --git-dir=../shallow2/.git config receive.shallowupdate false\n \t) &&\n \t(\n \tcd shallow2 &&\n-\tgit log --format=%s shallow/master >actual &&\n+\tgit log --format=%s shallow/main >actual &&\n \tgit fsck &&\n \tcat <<EOF >expect &&\n 5\n@@ -106,10 +106,10 @@ EOF\n test_expect_success 'push from full to shallow' '\n \t! git --git-dir=shallow2/.git cat-file blob $(echo 1|git hash-object --stdin) &&\n \tcommit 1 &&\n-\tgit push shallow2/.git +master:refs/remotes/top/master &&\n+\tgit push shallow2/.git +main:refs/remotes/top/main &&\n \t(\n \tcd shallow2 &&\n-\tgit log --format=%s top/master >actual &&\n+\tgit log --format=%s top/main >actual &&\n \tgit fsck &&\n \tcat <<EOF >expect &&\n 1\ndiff --git a/t/t5539-fetch-http-shallow.sh b/t/t5539-fetch-http-shallow.sh\nindex 82aa99ae87..4397197829 100755\n--- a/t/t5539-fetch-http-shallow.sh\n+++ b/t/t5539-fetch-http-shallow.sh\n@@ -32,7 +32,7 @@ test_expect_success 'clone http repository' '\n \t(\n \tcd clone &&\n \tgit fsck &&\n-\tgit log --format=%s origin/master >actual &&\n+\tgit log --format=%s origin/main >actual &&\n \tcat <<EOF >expect &&\n 7\n 6\n@@ -60,9 +60,9 @@ test_expect_success 'no shallow lines after receiving ACK ready' '\n \t\t\t\trefs/heads/unrelated$i:refs/heads/unrelated$i ||\n \t\t\texit 1\n \t\tdone &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit new &&\n-\t\tgit push  \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" master\n+\t\tgit push  \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" main\n \t) &&\n \t(\n \t\tcd clone &&\n@@ -95,7 +95,7 @@ test_expect_success 'clone shallow since ...' '\n \n test_expect_success 'fetch shallow since ...' '\n \tgit -C shallow11 fetch --shallow-since \"200000000 +0700\" origin &&\n-\tgit -C shallow11 log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C shallow11 log --pretty=tformat:%s origin/main >actual &&\n \tcat >expected <<-\\EOF &&\n \tthree\n \ttwo\n@@ -120,7 +120,7 @@ test_expect_success 'shallow clone exclude tag two' '\n \n test_expect_success 'fetch exclude tag one' '\n \tgit -C shallow12 fetch --shallow-exclude one origin &&\n-\tgit -C shallow12 log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C shallow12 log --pretty=tformat:%s origin/main >actual &&\n \ttest_write_lines three two >expected &&\n \ttest_cmp expected actual\n '\n@@ -136,12 +136,12 @@ test_expect_success 'fetching deepen' '\n \tgit clone --depth 1 $HTTPD_URL/smart/shallow-deepen.git deepen &&\n \tmv \"$HTTPD_DOCUMENT_ROOT_PATH/shallow-deepen.git\" .git &&\n \ttest_commit four &&\n-\tgit -C deepen log --pretty=tformat:%s master >actual &&\n+\tgit -C deepen log --pretty=tformat:%s main >actual &&\n \techo three >expected &&\n \ttest_cmp expected actual &&\n \tmv .git \"$HTTPD_DOCUMENT_ROOT_PATH/shallow-deepen.git\" &&\n \tgit -C deepen fetch --deepen=1 &&\n-\tgit -C deepen log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C deepen log --pretty=tformat:%s origin/main >actual &&\n \tcat >expected <<-\\EOF &&\n \tfour\n \tthree\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex a12a1993d0..381416825c 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,13 +257,13 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-3404|4013|5310)\n+3404|4013|5310|5526)\n \t# Avoid conflicts with patch series that are cooking at the same time\n \t# as the patch series changing the default of `init.defaultBranch`.\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-4]*|5[0-4]*|55[01]*)\n+[0-4]*|5[0-4]*|55[0-3]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410103","messageId":"04878e2268c17bd480e2fccace780462142dd665.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 18/27] t64*: preemptively adjust alignment to prepare for `master` -> `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:18Z","receivedAt":"2020-11-17T16:13:02Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe are in the process of renaming the default branch name to `main`,\nwhich is two characters shorter than `master`. Therefore, some lines\nneed to be adjusted in t6416, t6422 and t6427 that want to align text\ninvolving the default branch name.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t6416-recursive-corner-cases.sh    | 8 ++++----\n t/t6422-merge-rename-corner-cases.sh | 4 ++--\n t/t6427-diff3-conflict-markers.sh    | 4 ++--\n 3 files changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t6416-recursive-corner-cases.sh b/t/t6416-recursive-corner-cases.sh\nindex 887c2195a9..dbccc3158a 100755\n--- a/t/t6416-recursive-corner-cases.sh\n+++ b/t/t6416-recursive-corner-cases.sh\n@@ -385,7 +385,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete' '\n \t\ttest_line_count = 2 out &&\n \n \t\tgit rev-parse >expect       \\\n-\t\t\tmaster:file  B:file &&\n+\t\t\tmaster:file    B:file &&\n \t\tgit rev-parse   >actual      \\\n \t\t\t:1:file      :2:file &&\n \t\ttest_cmp expect actual\n@@ -407,7 +407,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete, rev\n \t\ttest_line_count = 2 out &&\n \n \t\tgit rev-parse >expect       \\\n-\t\t\tmaster:file  B:file &&\n+\t\t\tmaster:file    B:file &&\n \t\tgit rev-parse   >actual      \\\n \t\t\t:1:file      :3:file &&\n \t\ttest_cmp expect actual\n@@ -1553,7 +1553,7 @@ test_expect_failure 'check conflicting modes for regular file' '\n # Setup:\n #          L1---L2\n #         /  \\ /  \\\n-#   master    X    ?\n+#     master    X    ?\n #         \\  / \\  /\n #          R1---R2\n #\n@@ -1748,7 +1748,7 @@ test_expect_success 'check nested conflicts' '\n # Setup:\n #          L1---L2---L3\n #         /  \\ /  \\ /  \\\n-#   master    X1   X2   ?\n+#     master    X1   X2   ?\n #         \\  / \\  / \\  /\n #          R1---R2---R3\n #\ndiff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh\nindex 78bfaf17f0..e40a1b686f 100755\n--- a/t/t6422-merge-rename-corner-cases.sh\n+++ b/t/t6422-merge-rename-corner-cases.sh\n@@ -1130,7 +1130,7 @@ test_conflicts_with_adds_and_renames() {\n \t# Setup:\n \t#          L\n \t#         / \\\n-\t#   master   ?\n+\t#     master   ?\n \t#         \\ /\n \t#          R\n \t#\n@@ -1290,7 +1290,7 @@ test_conflicts_with_adds_and_renames add    add\n # Setup:\n #          L\n #         / \\\n-#   master   ?\n+#     master   ?\n #         \\ /\n #          R\n #\ndiff --git a/t/t6427-diff3-conflict-markers.sh b/t/t6427-diff3-conflict-markers.sh\nindex f4655bb358..f7620e677c 100755\n--- a/t/t6427-diff3-conflict-markers.sh\n+++ b/t/t6427-diff3-conflict-markers.sh\n@@ -43,7 +43,7 @@ test_expect_success 'check no merge base' '\n # Setup:\n #          L1\n #         /  \\\n-#   master    ?\n+#     master    ?\n #         \\  /\n #          R1\n #\n@@ -101,7 +101,7 @@ test_expect_success 'check unique merge base' '\n # Setup:\n #          L1---L2--L3\n #         /  \\ /      \\\n-#   master    X1       ?\n+#     master    X1       ?\n #         \\  / \\      /\n #          R1---R2--R3\n #\n-- \ngitgitgadget\n\n"},{"id":"410108","messageId":"57e90d459aec36fc4726215b2fd75d2ab048c72a.1605629549.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 23/27] t9[0-4]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:23Z","receivedAt":"2020-11-17T16:13:02Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t9[0-4]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9001-send-email.sh                  | 28 ++++-----\n t/t9100-git-svn-basic.sh               |  2 +-\n t/t9145-git-svn-master-branch.sh       |  6 +-\n t/t9151-svn-mergeinfo.sh               |  2 +-\n t/t9155-git-svn-fetch-deleted-tag.sh   |  2 +-\n t/t9156-git-svn-fetch-deleted-tag-2.sh |  6 +-\n t/t9163-git-svn-reset-clears-caches.sh |  2 +-\n t/t9169-git-svn-dcommit-crlf.sh        |  2 +-\n t/t9300-fast-import.sh                 | 82 ++++++++++++------------\n t/t9301-fast-import-notes.sh           | 14 ++---\n t/t9302-fast-import-unpack-limit.sh    | 16 ++---\n t/t9350-fast-export.sh                 | 86 +++++++++++++-------------\n t/t9351-fast-export-anonymize.sh       |  4 +-\n t/t9400-git-cvsserver-server.sh        | 32 +++++-----\n t/t9401-git-cvsserver-crlf.sh          | 16 ++---\n t/t9402-git-cvsserver-refs.sh          |  8 +--\n t/test-lib.sh                          |  2 +-\n 17 files changed, 155 insertions(+), 155 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex a08f72596a..579360d2f1 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -1168,10 +1168,10 @@ test_expect_success $PREREQ '--compose-encoding adds correct MIME for subject' '\n '\n \n test_expect_success $PREREQ 'detects ambiguous reference/file conflict' '\n-\techo master >master &&\n-\tgit add master &&\n-\tgit commit -m\"add master\" &&\n-\ttest_must_fail git send-email --dry-run master 2>errors &&\n+\techo main >main &&\n+\tgit add main &&\n+\tgit commit -m\"add main\" &&\n+\ttest_must_fail git send-email --dry-run main 2>errors &&\n \tgrep disambiguate errors\n '\n \n@@ -1185,7 +1185,7 @@ test_expect_success $PREREQ 'feed two files' '\n \t\toutdir/000?-*.patch 2>errors >out &&\n \tgrep \"^Subject: \" out >subjects &&\n \ttest \"z$(sed -n -e 1p subjects)\" = \"zSubject: [PATCH 1/2] Second.\" &&\n-\ttest \"z$(sed -n -e 2p subjects)\" = \"zSubject: [PATCH 2/2] add master\"\n+\ttest \"z$(sed -n -e 2p subjects)\" = \"zSubject: [PATCH 2/2] add main\"\n '\n \n test_expect_success $PREREQ 'in-reply-to but no threading' '\n@@ -2037,7 +2037,7 @@ test_expect_success $PREREQ 'setup expected-list' '\n \t--cc=\"Cc2 <cc2@example.com>\" \\\n \t--bcc=\"bcc1@example.com\" \\\n \t--bcc=\"bcc2@example.com\" \\\n-\t0001-add-master.patch | replace_variable_fields \\\n+\t0001-add-main.patch | replace_variable_fields \\\n \t>expected-list\n '\n \n@@ -2049,7 +2049,7 @@ test_expect_success $PREREQ 'use email list in --cc --to and --bcc' '\n \t--to=\"to3@example.com\" \\\n \t--cc=\"Cc 1 <cc1@example.com>, Cc2 <cc2@example.com>\" \\\n \t--bcc=\"bcc1@example.com, bcc2@example.com\" \\\n-\t0001-add-master.patch | replace_variable_fields \\\n+\t0001-add-main.patch | replace_variable_fields \\\n \t>actual-list &&\n \ttest_cmp expected-list actual-list\n '\n@@ -2065,7 +2065,7 @@ test_expect_success $PREREQ 'aliases work with email list' '\n \t--to=\"To 1 <to1@example.com>, to2, to3@example.com\" \\\n \t--cc=\"cc1, Cc2 <cc2@example.com>\" \\\n \t--bcc=\"bcc1@example.com, bcc2@example.com\" \\\n-\t0001-add-master.patch | replace_variable_fields \\\n+\t0001-add-main.patch | replace_variable_fields \\\n \t>actual-list &&\n \ttest_cmp expected-list actual-list\n '\n@@ -2089,7 +2089,7 @@ test_expect_success $PREREQ 'leading and trailing whitespaces are removed' '\n \t--cc=\"Cc2 <cc2@example.com>\" \\\n \t--bcc=\"$BCC1\" \\\n \t--bcc=\"bcc2@example.com\" \\\n-\t0001-add-master.patch | replace_variable_fields \\\n+\t0001-add-main.patch | replace_variable_fields \\\n \t>actual-list &&\n \ttest_cmp expected-list actual-list\n '\n@@ -2108,8 +2108,8 @@ test_expect_success $PREREQ 'invoke hook' '\n \t\tfalse\n \t\t;;\n \tesac &&\n-\ttest -f 0001-add-master.patch &&\n-\tgrep \"add master\" \"$1\"\n+\ttest -f 0001-add-main.patch &&\n+\tgrep \"add main\" \"$1\"\n \tEOF\n \n \tmkdir subdir &&\n@@ -2121,10 +2121,10 @@ test_expect_success $PREREQ 'invoke hook' '\n \t\t\t--from=\"Example <nobody@example.com>\" \\\n \t\t\t--to=nobody@example.com \\\n \t\t\t--smtp-server=\"$(pwd)/../fake.sendmail\" \\\n-\t\t\t../0001-add-master.patch &&\n+\t\t\t../0001-add-main.patch &&\n \n \t\t# Verify error message when a patch is rejected by the hook\n-\t\tsed -e \"s/add master/x/\" ../0001-add-master.patch >../another.patch &&\n+\t\tsed -e \"s/add main/x/\" ../0001-add-main.patch >../another.patch &&\n \t\ttest_must_fail git send-email \\\n \t\t\t--from=\"Example <nobody@example.com>\" \\\n \t\t\t--to=nobody@example.com \\\n@@ -2139,7 +2139,7 @@ test_expect_success $PREREQ 'test that send-email works outside a repo' '\n \t\t--from=\"Example <nobody@example.com>\" \\\n \t\t--to=nobody@example.com \\\n \t\t--smtp-server=\"$(pwd)/fake.sendmail\" \\\n-\t\t\"$(pwd)/0001-add-master.patch\"\n+\t\t\"$(pwd)/0001-add-main.patch\"\n '\n \n test_expect_success $PREREQ 'test that sendmail config is rejected' '\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex e4bb22034e..7dbf4b8fa0 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -275,7 +275,7 @@ test_expect_success 'dcommit $rev does not clobber current branch' '\n \ttest refs/heads/my-bar = $(git symbolic-ref HEAD) &&\n \tgit log refs/remotes/bar | grep \"change 1\" &&\n \t! git log refs/remotes/bar | grep \"change 2\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -D my-bar\n \t'\n \ndiff --git a/t/t9145-git-svn-master-branch.sh b/t/t9145-git-svn-master-branch.sh\nindex 3bbf341f6a..c5acce010d 100755\n--- a/t/t9145-git-svn-master-branch.sh\n+++ b/t/t9145-git-svn-master-branch.sh\n@@ -2,7 +2,7 @@\n #\n # Copyright (c) 2009 Eric Wong\n #\n-test_description='git svn initial master branch is \"trunk\" if possible'\n+test_description='git svn initial main branch is \"trunk\" if possible'\n . ./lib-git-svn.sh\n \n test_expect_success 'setup test repository' '\n@@ -13,12 +13,12 @@ test_expect_success 'setup test repository' '\n \tsvn_cmd import -m b/b i \"$svnrepo/branches/b\"\n '\n \n-test_expect_success 'git svn clone --stdlayout sets up trunk as master' '\n+test_expect_success 'git svn clone --stdlayout sets up trunk as main' '\n \tgit svn clone -s \"$svnrepo\" g &&\n \t(\n \t\tcd g &&\n \t\ttest x$(git rev-parse --verify refs/remotes/origin/trunk^0) = \\\n-\t\t     x$(git rev-parse --verify refs/heads/master^0)\n+\t\t     x$(git rev-parse --verify refs/heads/main^0)\n \t)\n '\n \ndiff --git a/t/t9151-svn-mergeinfo.sh b/t/t9151-svn-mergeinfo.sh\nindex 4f6c06ecb2..e2f63823f1 100755\n--- a/t/t9151-svn-mergeinfo.sh\n+++ b/t/t9151-svn-mergeinfo.sh\n@@ -50,7 +50,7 @@ test_expect_success 'merging two branches in one commit is detected correctly' '\n \t'\n \n test_expect_failure 'everything got merged in the end' '\n-\tunmerged=$(git rev-list --all --not master) &&\n+\tunmerged=$(git rev-list --all --not main) &&\n \t[ -z \"$unmerged\" ]\n \t'\n \ndiff --git a/t/t9155-git-svn-fetch-deleted-tag.sh b/t/t9155-git-svn-fetch-deleted-tag.sh\nindex 184336f346..891c209238 100755\n--- a/t/t9155-git-svn-fetch-deleted-tag.sh\n+++ b/t/t9155-git-svn-fetch-deleted-tag.sh\n@@ -36,7 +36,7 @@ test_expect_success 'fetch deleted tags from same revision with checksum error'\n \tgit svn fetch &&\n \n \tgit diff --exit-code origin/mybranch:trunk/subdir/file origin/tags/mytag:file &&\n-\tgit diff --exit-code master:subdir/file origin/tags/mytag^:file\n+\tgit diff --exit-code main:subdir/file origin/tags/mytag^:file\n '\n \n test_done\ndiff --git a/t/t9156-git-svn-fetch-deleted-tag-2.sh b/t/t9156-git-svn-fetch-deleted-tag-2.sh\nindex 7a6e33ba3c..0b91063edb 100755\n--- a/t/t9156-git-svn-fetch-deleted-tag-2.sh\n+++ b/t/t9156-git-svn-fetch-deleted-tag-2.sh\n@@ -36,9 +36,9 @@ test_expect_success 'fetch deleted tags from same revision with no checksum erro\n \tcd git_project &&\n \tgit svn fetch &&\n \n-\tgit diff --exit-code master:subdir3/file origin/tags/mytag:file &&\n-\tgit diff --exit-code master:subdir2/file origin/tags/mytag^:file &&\n-\tgit diff --exit-code master:subdir1/file origin/tags/mytag^^:file\n+\tgit diff --exit-code main:subdir3/file origin/tags/mytag:file &&\n+\tgit diff --exit-code main:subdir2/file origin/tags/mytag^:file &&\n+\tgit diff --exit-code main:subdir1/file origin/tags/mytag^^:file\n '\n \n test_done\ndiff --git a/t/t9163-git-svn-reset-clears-caches.sh b/t/t9163-git-svn-reset-clears-caches.sh\nindex d6245cee08..0da856338f 100755\n--- a/t/t9163-git-svn-reset-clears-caches.sh\n+++ b/t/t9163-git-svn-reset-clears-caches.sh\n@@ -59,7 +59,7 @@ test_expect_success 'fetch to merge-base (a)' '\n test_expect_success 'rebase looses SVN merge (m)' '\n \tgit svn rebase &&\n \tgit svn fetch &&\n-\ttest 1 = $(git cat-file -p master|grep parent|wc -l)\n+\ttest 1 = $(git cat-file -p main|grep parent|wc -l)\n '\n \n # git svn fetch creates correct history with merge commit\ndiff --git a/t/t9169-git-svn-dcommit-crlf.sh b/t/t9169-git-svn-dcommit-crlf.sh\nindex 54b1f61a2a..5016896ae6 100755\n--- a/t/t9169-git-svn-dcommit-crlf.sh\n+++ b/t/t9169-git-svn-dcommit-crlf.sh\n@@ -14,7 +14,7 @@ test_expect_success 'setup commit repository' '\n \t\tp=$(git rev-parse HEAD) &&\n \t\tt=$(git write-tree) &&\n \t\tcmt=$(git commit-tree -p $p $t <cmt) &&\n-\t\tgit update-ref refs/heads/master $cmt &&\n+\t\tgit update-ref refs/heads/main $cmt &&\n \t\tgit cat-file commit HEAD | tail -n4 >out &&\n \t\ttest_cmp cmt out &&\n \t\tgit svn dcommit &&\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex 308c1ef42c..e66f438e64 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -62,7 +62,7 @@ test_expect_success 'A: create pack from stdin' '\n \tmark :4\n \tdata $file4_len\n \t$file4_data\n-\tcommit refs/heads/master\n+\tcommit refs/heads/main\n \tmark :5\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -117,7 +117,7 @@ test_expect_success 'A: create pack from stdin' '\n \n \tINPUT_END\n \tgit fast-import --export-marks=marks.out <input &&\n-\tgit whatchanged master\n+\tgit whatchanged main\n '\n \n test_expect_success 'A: verify pack' '\n@@ -131,7 +131,7 @@ test_expect_success 'A: verify commit' '\n \n \tinitial\n \tEOF\n-\tgit cat-file commit master | sed 1d >actual &&\n+\tgit cat-file commit main | sed 1d >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -141,31 +141,31 @@ test_expect_success 'A: verify tree' '\n \t100644 blob file3\n \t100755 blob file4\n \tEOF\n-\tgit cat-file -p master^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n+\tgit cat-file -p main^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'A: verify file2' '\n \techo \"$file2_data\" >expect &&\n-\tgit cat-file blob master:file2 >actual &&\n+\tgit cat-file blob main:file2 >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'A: verify file3' '\n \techo \"$file3_data\" >expect &&\n-\tgit cat-file blob master:file3 >actual &&\n+\tgit cat-file blob main:file3 >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'A: verify file4' '\n \tprintf \"$file4_data\" >expect &&\n-\tgit cat-file blob master:file4 >actual &&\n+\tgit cat-file blob main:file4 >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'A: verify tag/series-A' '\n \tcat >expect <<-EOF &&\n-\tobject $(git rev-parse refs/heads/master)\n+\tobject $(git rev-parse refs/heads/main)\n \ttype commit\n \ttag series-A\n \n@@ -177,7 +177,7 @@ test_expect_success 'A: verify tag/series-A' '\n \n test_expect_success 'A: verify tag/series-A-blob' '\n \tcat >expect <<-EOF &&\n-\tobject $(git rev-parse refs/heads/master:file3)\n+\tobject $(git rev-parse refs/heads/main:file3)\n \ttype blob\n \ttag series-A-blob\n \n@@ -193,13 +193,13 @@ test_expect_success 'A: verify tag deletion is successful' '\n \n test_expect_success 'A: verify marks output' '\n \tcat >expect <<-EOF &&\n-\t:2 $(git rev-parse --verify master:file2)\n-\t:3 $(git rev-parse --verify master:file3)\n-\t:4 $(git rev-parse --verify master:file4)\n-\t:5 $(git rev-parse --verify master^0)\n+\t:2 $(git rev-parse --verify main:file2)\n+\t:3 $(git rev-parse --verify main:file3)\n+\t:4 $(git rev-parse --verify main:file4)\n+\t:5 $(git rev-parse --verify main^0)\n \t:6 $(git cat-file tag nested | grep object | cut -d\" \" -f 2)\n \t:7 $(git rev-parse --verify nested)\n-\t:8 $(git rev-parse --verify master^0)\n+\t:8 $(git rev-parse --verify main^0)\n \tEOF\n \ttest_cmp expect marks.out\n '\n@@ -217,7 +217,7 @@ test_expect_success 'A: tag blob by sha1' '\n \tnew_blob=$(echo testing | git hash-object --stdin) &&\n \tcat >input <<-INPUT_END &&\n \ttag series-A-blob-2\n-\tfrom $(git rev-parse refs/heads/master:file3)\n+\tfrom $(git rev-parse refs/heads/main:file3)\n \tdata <<EOF\n \tTag blob by sha1.\n \tEOF\n@@ -243,7 +243,7 @@ test_expect_success 'A: tag blob by sha1' '\n \tINPUT_END\n \n \tcat >expect <<-EOF &&\n-\tobject $(git rev-parse refs/heads/master:file3)\n+\tobject $(git rev-parse refs/heads/main:file3)\n \ttype blob\n \ttag series-A-blob-2\n \n@@ -284,13 +284,13 @@ test_expect_success 'A: verify pack' '\n '\n \n test_expect_success 'A: verify diff' '\n-\tcopy=$(git rev-parse --verify master:file2) &&\n+\tcopy=$(git rev-parse --verify main:file2) &&\n \tcat >expect <<-EOF &&\n \t:000000 100755 $ZERO_OID $copy A\tcopy-of-file2\n \tEOF\n-\tgit diff-tree -M -r master verify--import-marks >actual &&\n+\tgit diff-tree -M -r main verify--import-marks >actual &&\n \tcompare_diff_raw expect actual &&\n-\ttest $(git rev-parse --verify master:file2) \\\n+\ttest $(git rev-parse --verify main:file2) \\\n \t    = $(git rev-parse --verify verify--import-marks:copy-of-file2)\n '\n \n@@ -364,7 +364,7 @@ test_expect_success 'B: fail on invalid blob sha1' '\n \tcorrupt\n \tCOMMIT\n \n-\tfrom refs/heads/master\n+\tfrom refs/heads/main\n \tM 755 $(echo $ZERO_OID | sed -e \"s/0$/1/\") zero1\n \n \tINPUT_END\n@@ -381,7 +381,7 @@ test_expect_success 'B: accept branch name \"TEMP_TAG\"' '\n \ttag base\n \tCOMMIT\n \n-\tfrom refs/heads/master\n+\tfrom refs/heads/main\n \n \tINPUT_END\n \n@@ -390,7 +390,7 @@ test_expect_success 'B: accept branch name \"TEMP_TAG\"' '\n \t\tgit prune\" &&\n \tgit fast-import <input &&\n \ttest -f .git/TEMP_TAG &&\n-\ttest $(git rev-parse master) = $(git rev-parse TEMP_TAG^)\n+\ttest $(git rev-parse main) = $(git rev-parse TEMP_TAG^)\n '\n \n test_expect_success 'B: accept empty committer' '\n@@ -528,8 +528,8 @@ test_expect_success 'B: fail on invalid committer (5)' '\n \n test_expect_success 'C: incremental import create pack from stdin' '\n \tnewf=$(echo hi newf | git hash-object -w --stdin) &&\n-\toldf=$(git rev-parse --verify master:file2) &&\n-\tthrf=$(git rev-parse --verify master:file3) &&\n+\toldf=$(git rev-parse --verify main:file2) &&\n+\tthrf=$(git rev-parse --verify main:file3) &&\n \ttest_tick &&\n \tcat >input <<-INPUT_END &&\n \tcommit refs/heads/branch\n@@ -538,7 +538,7 @@ test_expect_success 'C: incremental import create pack from stdin' '\n \tsecond\n \tCOMMIT\n \n-\tfrom refs/heads/master\n+\tfrom refs/heads/main\n \tM 644 $oldf file2/oldf\n \tM 755 $newf file2/newf\n \tD file3\n@@ -560,7 +560,7 @@ test_expect_success 'C: validate reuse existing blob' '\n \n test_expect_success 'C: verify commit' '\n \tcat >expect <<-EOF &&\n-\tparent $(git rev-parse --verify master^0)\n+\tparent $(git rev-parse --verify main^0)\n \tauthor $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n@@ -578,7 +578,7 @@ test_expect_success 'C: validate rename result' '\n \t:100644 100644 $oldf $oldf R100\tfile2\tfile2/oldf\n \t:100644 000000 $thrf $zero D\tfile3\n \tEOF\n-\tgit diff-tree -M -r master branch >actual &&\n+\tgit diff-tree -M -r main branch >actual &&\n \tcompare_diff_raw expect actual\n '\n \n@@ -1698,7 +1698,7 @@ test_expect_success 'P: superproject & submodule mix' '\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata 8\n \tinitial\n-\tfrom refs/heads/master\n+\tfrom refs/heads/main\n \tM 100644 :3 .gitmodules\n \tM 160000 :2 sub\n \n@@ -1733,8 +1733,8 @@ test_expect_success 'P: superproject & submodule mix' '\n \t(\n \t\tcd sub &&\n \t\tgit init &&\n-\t\tgit fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&\n-\t\tgit checkout master\n+\t\tgit fetch --update-head-ok .. refs/heads/sub:refs/heads/main &&\n+\t\tgit checkout main\n \t) &&\n \tgit submodule init &&\n \tgit submodule update\n@@ -1758,7 +1758,7 @@ test_expect_success 'P: verbatim SHA gitlinks' '\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata 8\n \tinitial\n-\tfrom refs/heads/master\n+\tfrom refs/heads/main\n \tM 100644 :1 .gitmodules\n \tM 160000 $SUBPREV sub\n \n@@ -3429,8 +3429,8 @@ mark :1\n data 4\n foo\n \n-reset refs/heads/master\n-commit refs/heads/master\n+reset refs/heads/main\n+commit refs/heads/main\n mark :2\n author Full Name <user@company.tld> 1000000000 +0100\n committer Full Name <user@company.tld> 1000000000 +0100\n@@ -3444,7 +3444,7 @@ data 8\n foo\n bar\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :4\n author Full Name <user@company.tld> 1000000001 +0100\n committer Full Name <user@company.tld> 1000000001 +0100\n@@ -3461,8 +3461,8 @@ mark :1\n data 4\n foo\n \n-reset refs/heads/master\n-commit refs/heads/master\n+reset refs/heads/main\n+commit refs/heads/main\n mark :2\n author Full Name <user@company.tld> 2000000000 +0100\n committer Full Name <user@company.tld> 2000000000 +0100\n@@ -3477,7 +3477,7 @@ data 73\n \tpath = sub1\n \turl = https://void.example.com/main.git\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :4\n author Full Name <user@company.tld> 2000000001 +0100\n committer Full Name <user@company.tld> 2000000001 +0100\n@@ -3493,7 +3493,7 @@ data 8\n foo\n bar\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :6\n author Full Name <user@company.tld> 2000000002 +0100\n committer Full Name <user@company.tld> 2000000002 +0100\n@@ -3511,8 +3511,8 @@ Y_INPUT_END\n \n test_expect_success 'Y: setup' '\n \ttest_oid_cache <<-EOF\n-\tYmaster sha1:9afed2f9161ddf416c0a1863b8b0725b00070504\n-\tYmaster sha256:c0a1010da1df187b2e287654793df01b464bd6f8e3f17fc1481a7dadf84caee3\n+\tYmain sha1:9afed2f9161ddf416c0a1863b8b0725b00070504\n+\tYmain sha256:c0a1010da1df187b2e287654793df01b464bd6f8e3f17fc1481a7dadf84caee3\n \tEOF\n '\n \n@@ -3524,7 +3524,7 @@ test_expect_success 'Y: rewrite submodules' '\n \t\tgit -C sub2 fast-import --export-marks=../sub2-marks <../Y-sub-input &&\n \t\tgit fast-import --rewrite-submodules-from=sub:../Y-marks \\\n \t\t\t--rewrite-submodules-to=sub:sub2-marks <../Y-main-input &&\n-\t\ttest \"$(git rev-parse master)\" = \"$(test_oid Ymaster)\"\n+\t\ttest \"$(git rev-parse main)\" = \"$(test_oid Ymain)\"\n \t)\n '\n \ndiff --git a/t/t9301-fast-import-notes.sh b/t/t9301-fast-import-notes.sh\nindex 14c1baa739..ea6efbd387 100755\n--- a/t/t9301-fast-import-notes.sh\n+++ b/t/t9301-fast-import-notes.sh\n@@ -9,7 +9,7 @@ test_description='test git fast-import of notes objects'\n \n test_tick\n cat >input <<INPUT_END\n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n first commit\n@@ -30,7 +30,7 @@ data <<EOF\n file baz/xyzzy in first commit\n EOF\n \n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n second commit\n@@ -46,7 +46,7 @@ data <<EOF\n file baz/xyzzy in second commit\n EOF\n \n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n third commit\n@@ -57,7 +57,7 @@ data <<EOF\n file foo in third commit\n EOF\n \n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n fourth commit\n@@ -70,13 +70,13 @@ EOF\n \n INPUT_END\n \n-test_expect_success 'set up master branch' '\n+test_expect_success 'set up main branch' '\n \n \tgit fast-import <input &&\n-\tgit whatchanged master\n+\tgit whatchanged main\n '\n \n-commit4=$(git rev-parse refs/heads/master)\n+commit4=$(git rev-parse refs/heads/main)\n commit3=$(git rev-parse \"$commit4^\")\n commit2=$(git rev-parse \"$commit4~2\")\n commit1=$(git rev-parse \"$commit4~3\")\ndiff --git a/t/t9302-fast-import-unpack-limit.sh b/t/t9302-fast-import-unpack-limit.sh\nindex bb1c39cfcc..f519e4f1bf 100755\n--- a/t/t9302-fast-import-unpack-limit.sh\n+++ b/t/t9302-fast-import-unpack-limit.sh\n@@ -5,7 +5,7 @@ test_description='test git fast-import unpack limit'\n test_expect_success 'create loose objects on import' '\n \ttest_tick &&\n \tcat >input <<-INPUT_END &&\n-\tcommit refs/heads/master\n+\tcommit refs/heads/main\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n \tinitial\n@@ -23,12 +23,12 @@ test_expect_success 'create loose objects on import' '\n test_expect_success 'bigger packs are preserved' '\n \ttest_tick &&\n \tcat >input <<-INPUT_END &&\n-\tcommit refs/heads/master\n+\tcommit refs/heads/main\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n \tincremental should create a pack\n \tCOMMIT\n-\tfrom refs/heads/master^0\n+\tfrom refs/heads/main^0\n \n \tcommit refs/heads/branch\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n@@ -48,7 +48,7 @@ test_expect_success 'bigger packs are preserved' '\n test_expect_success 'lookups after checkpoint works' '\n \thello_id=$(echo hello | git hash-object --stdin -t blob) &&\n \tid=\"$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\" &&\n-\tbefore=$(git rev-parse refs/heads/master^0) &&\n+\tbefore=$(git rev-parse refs/heads/main^0) &&\n \t(\n \t\tcat <<-INPUT_END &&\n \t\tblob\n@@ -56,13 +56,13 @@ test_expect_success 'lookups after checkpoint works' '\n \t\tdata 6\n \t\thello\n \n-\t\tcommit refs/heads/master\n+\t\tcommit refs/heads/main\n \t\tmark :2\n \t\tcommitter $id\n \t\tdata <<COMMIT\n \t\tcheckpoint after this\n \t\tCOMMIT\n-\t\tfrom refs/heads/master^0\n+\t\tfrom refs/heads/main^0\n \t\tM 100644 :1 hello\n \n \t\t# pre-checkpoint\n@@ -86,10 +86,10 @@ test_expect_success 'lookups after checkpoint works' '\n \t\t\t\tn=$(($n + 1))\n \t\t\tfi &&\n \t\t\tsleep 1 &&\n-\t\t\tfrom=$(git rev-parse refs/heads/master^0)\n+\t\t\tfrom=$(git rev-parse refs/heads/main^0)\n \t\tdone &&\n \t\tcat <<-INPUT_END &&\n-\t\tcommit refs/heads/master\n+\t\tcommit refs/heads/main\n \t\tcommitter $id\n \t\tdata <<COMMIT\n \t\tmake sure from \"unpacked sha1 reference\" works, too\ndiff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh\nindex 1372842559..0715eefd52 100755\n--- a/t/t9350-fast-export.sh\n+++ b/t/t9350-fast-export.sh\n@@ -31,13 +31,13 @@ test_expect_success 'setup' '\n \tgit commit -m sitzt file2 &&\n \ttest_tick &&\n \tgit tag -a -m valentin muss &&\n-\tgit merge -s ours master\n+\tgit merge -s ours main\n \n '\n \n test_expect_success 'fast-export | fast-import' '\n \n-\tMASTER=$(git rev-parse --verify master) &&\n+\tMAIN=$(git rev-parse --verify main) &&\n \tREIN=$(git rev-parse --verify rein) &&\n \tWER=$(git rev-parse --verify wer) &&\n \tMUSS=$(git rev-parse --verify muss) &&\n@@ -46,7 +46,7 @@ test_expect_success 'fast-export | fast-import' '\n \tgit fast-export --all >actual &&\n \t(cd new &&\n \t git fast-import &&\n-\t test $MASTER = $(git rev-parse --verify refs/heads/master) &&\n+\t test $MAIN = $(git rev-parse --verify refs/heads/main) &&\n \t test $REIN = $(git rev-parse --verify refs/tags/rein) &&\n \t test $WER = $(git rev-parse --verify refs/heads/wer) &&\n \t test $MUSS = $(git rev-parse --verify refs/tags/muss)) <actual\n@@ -80,35 +80,35 @@ test_expect_success 'fast-export --mark-tags ^muss^{commit} muss' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'fast-export master~2..master' '\n+test_expect_success 'fast-export main~2..main' '\n \n-\tgit fast-export master~2..master >actual &&\n-\tsed \"s/master/partial/\" actual |\n+\tgit fast-export main~2..main >actual &&\n+\tsed \"s/main/partial/\" actual |\n \t\t(cd new &&\n \t\t git fast-import &&\n-\t\t test $MASTER != $(git rev-parse --verify refs/heads/partial) &&\n-\t\t git diff --exit-code master partial &&\n-\t\t git diff --exit-code master^ partial^ &&\n+\t\t test $MAIN != $(git rev-parse --verify refs/heads/partial) &&\n+\t\t git diff --exit-code main partial &&\n+\t\t git diff --exit-code main^ partial^ &&\n \t\t test_must_fail git rev-parse partial~2)\n \n '\n \n-test_expect_success 'fast-export --reference-excluded-parents master~2..master' '\n+test_expect_success 'fast-export --reference-excluded-parents main~2..main' '\n \n-\tgit fast-export --reference-excluded-parents master~2..master >actual &&\n-\tgrep commit.refs/heads/master actual >commit-count &&\n+\tgit fast-export --reference-excluded-parents main~2..main >actual &&\n+\tgrep commit.refs/heads/main actual >commit-count &&\n \ttest_line_count = 2 commit-count &&\n-\tsed \"s/master/rewrite/\" actual |\n+\tsed \"s/main/rewrite/\" actual |\n \t\t(cd new &&\n \t\t git fast-import &&\n-\t\t test $MASTER = $(git rev-parse --verify refs/heads/rewrite))\n+\t\t test $MAIN = $(git rev-parse --verify refs/heads/rewrite))\n '\n \n test_expect_success 'fast-export --show-original-ids' '\n \n-\tgit fast-export --show-original-ids master >output &&\n+\tgit fast-export --show-original-ids main >output &&\n \tgrep ^original-oid output| sed -e s/^original-oid.// | sort >actual &&\n-\tgit rev-list --objects master muss >objects-and-names &&\n+\tgit rev-list --objects main muss >objects-and-names &&\n \tawk \"{print \\$1}\" objects-and-names | sort >commits-trees-blobs &&\n \tcomm -23 actual commits-trees-blobs >unfound &&\n \ttest_must_be_empty unfound\n@@ -116,8 +116,8 @@ test_expect_success 'fast-export --show-original-ids' '\n \n test_expect_success 'fast-export --show-original-ids | git fast-import' '\n \n-\tgit fast-export --show-original-ids master muss | git fast-import --quiet &&\n-\ttest $MASTER = $(git rev-parse --verify refs/heads/master) &&\n+\tgit fast-export --show-original-ids main muss | git fast-import --quiet &&\n+\ttest $MAIN = $(git rev-parse --verify refs/heads/main) &&\n \ttest $MUSS = $(git rev-parse --verify refs/tags/muss)\n '\n \n@@ -200,7 +200,7 @@ test_expect_success 'encoding preserved if reencoding fails' '\n \n test_expect_success 'import/export-marks' '\n \n-\tgit checkout -b marks master &&\n+\tgit checkout -b marks main &&\n \tgit fast-export --export-marks=tmp-marks HEAD &&\n \ttest -s tmp-marks &&\n \ttest_line_count = 3 tmp-marks &&\n@@ -265,7 +265,7 @@ test_expect_success 'signed-tags=warn-strip' '\n \n test_expect_success 'setup submodule' '\n \n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tmkdir sub &&\n \t(\n \t\tcd sub &&\n@@ -290,17 +290,17 @@ test_expect_success 'setup submodule' '\n \n test_expect_success 'submodule fast-export | fast-import' '\n \n-\tSUBENT1=$(git ls-tree master^ sub) &&\n-\tSUBENT2=$(git ls-tree master sub) &&\n+\tSUBENT1=$(git ls-tree main^ sub) &&\n+\tSUBENT2=$(git ls-tree main sub) &&\n \trm -rf new &&\n \tmkdir new &&\n \tgit --git-dir=new/.git init &&\n \tgit fast-export --signed-tags=strip --all >actual &&\n \t(cd new &&\n \t git fast-import &&\n-\t test \"$SUBENT1\" = \"$(git ls-tree refs/heads/master^ sub)\" &&\n-\t test \"$SUBENT2\" = \"$(git ls-tree refs/heads/master sub)\" &&\n-\t git checkout master &&\n+\t test \"$SUBENT1\" = \"$(git ls-tree refs/heads/main^ sub)\" &&\n+\t test \"$SUBENT2\" = \"$(git ls-tree refs/heads/main sub)\" &&\n+\t git checkout main &&\n \t git submodule init &&\n \t git submodule update &&\n \t cmp sub/file ../sub/file) <actual\n@@ -352,7 +352,7 @@ test_expect_success 'fast-export -C -C | fast-import' '\n \n '\n \n-test_expect_success 'fast-export | fast-import when master is tagged' '\n+test_expect_success 'fast-export | fast-import when main is tagged' '\n \n \tgit tag -m msg last &&\n \tgit fast-export -C -C --signed-tags=strip --all > output &&\n@@ -467,8 +467,8 @@ mark :2\n data 3\n hi\n \n-reset refs/heads/master\n-commit refs/heads/master\n+reset refs/heads/main\n+commit refs/heads/main\n mark :3\n author A U Thor <author@example.com> 1112912713 -0700\n committer C O Mitter <committer@example.com> 1112912713 -0700\n@@ -482,7 +482,7 @@ EOF\n test_expect_failure 'no exact-ref revisions included' '\n \t(\n \t\tcd limit-by-paths &&\n-\t\tgit fast-export master~2..master~1 > output &&\n+\t\tgit fast-export main~2..main~1 > output &&\n \t\ttest_cmp expected output\n \t)\n '\n@@ -524,7 +524,7 @@ test_expect_success 'full-tree re-shows unmodified files'        '\n '\n \n test_expect_success 'set-up a few more tags for tag export tests' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tHEAD_TREE=$(git show -s --pretty=raw HEAD | grep tree | sed \"s/tree //\") &&\n \tgit tag    tree_tag        -m \"tagging a tree\" $HEAD_TREE &&\n \tgit tag -a tree_tag-obj    -m \"tagging a tree\" $HEAD_TREE &&\n@@ -549,7 +549,7 @@ test_expect_success 'tag-obj_tag'     'git fast-export tag-obj_tag'\n test_expect_success 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'\n \n test_expect_success 'handling tags of blobs' '\n-\tgit tag -a -m \"Tag of a blob\" blobtag $(git rev-parse master:file) &&\n+\tgit tag -a -m \"Tag of a blob\" blobtag $(git rev-parse main:file) &&\n \tgit fast-export blobtag >actual &&\n \tcat >expect <<-EOF &&\n \tblob\n@@ -592,10 +592,10 @@ test_expect_success 'directory becomes symlink'        '\n \t) &&\n \t(\n \t\tcd dirtosymlink &&\n-\t\tgit fast-export master -- foo |\n+\t\tgit fast-export main -- foo |\n \t\t(cd ../result && git fast-import --quiet)\n \t) &&\n-\t(cd result && git show master:foo)\n+\t(cd result && git show main:foo)\n '\n \n test_expect_success 'fast-export quotes pathnames' '\n@@ -643,7 +643,7 @@ mark :13\n data 5\n bump\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :14\n author A U Thor <author@example.com> 1112912773 -0700\n committer C O Mitter <committer@example.com> 1112912773 -0700\n@@ -657,18 +657,18 @@ EOF\n test_expect_success 'avoid uninteresting refs' '\n \t> tmp-marks &&\n \tgit fast-export --import-marks=tmp-marks \\\n-\t\t--export-marks=tmp-marks master > /dev/null &&\n+\t\t--export-marks=tmp-marks main > /dev/null &&\n \tgit tag v1.0 &&\n \tgit branch uninteresting &&\n \techo bump > file &&\n \tgit commit -a -m bump &&\n \tgit fast-export --import-marks=tmp-marks \\\n-\t\t--export-marks=tmp-marks ^uninteresting ^v1.0 master > actual &&\n+\t\t--export-marks=tmp-marks ^uninteresting ^v1.0 main > actual &&\n \ttest_cmp expected actual\n '\n \n cat > expected << EOF\n-reset refs/heads/master\n+reset refs/heads/main\n from :14\n \n EOF\n@@ -676,14 +676,14 @@ EOF\n test_expect_success 'refs are updated even if no commits need to be exported' '\n \t> tmp-marks &&\n \tgit fast-export --import-marks=tmp-marks \\\n-\t\t--export-marks=tmp-marks master > /dev/null &&\n+\t\t--export-marks=tmp-marks main > /dev/null &&\n \tgit fast-export --import-marks=tmp-marks \\\n-\t\t--export-marks=tmp-marks master > actual &&\n+\t\t--export-marks=tmp-marks main > actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'use refspec' '\n-\tgit fast-export --refspec refs/heads/master:refs/heads/foobar master >actual2 &&\n+\tgit fast-export --refspec refs/heads/main:refs/heads/foobar main >actual2 &&\n \tgrep \"^commit \" actual2 | sort | uniq >actual &&\n \techo \"commit refs/heads/foobar\" > expected &&\n \ttest_cmp expected actual\n@@ -736,13 +736,13 @@ test_expect_success 'merge commit gets exported with --import-marks' '\n \t\ttest_commit initial &&\n \t\tgit checkout -b topic &&\n \t\ttest_commit on-topic &&\n-\t\tgit checkout master &&\n-\t\ttest_commit on-master &&\n+\t\tgit checkout main &&\n+\t\ttest_commit on-main &&\n \t\ttest_tick &&\n \t\tgit merge --no-ff -m Yeah topic &&\n \n \t\techo \":1 $(git rev-parse HEAD^^)\" >marks &&\n-\t\tgit fast-export --import-marks=marks master >out &&\n+\t\tgit fast-export --import-marks=marks main >out &&\n \t\tgrep Yeah out\n \t)\n '\ndiff --git a/t/t9351-fast-export-anonymize.sh b/t/t9351-fast-export-anonymize.sh\nindex 5ac2c3b5ee..c07175db47 100755\n--- a/t/t9351-fast-export-anonymize.sh\n+++ b/t/t9351-fast-export-anonymize.sh\n@@ -51,7 +51,7 @@ test_expect_success 'stream retains other as refname' '\n '\n \n test_expect_success 'stream omits other refnames' '\n-\t! grep master stream &&\n+\t! grep main stream &&\n \t! grep mytag stream\n '\n \n@@ -85,7 +85,7 @@ test_expect_success 'repo has original shape and timestamps' '\n \tshape () {\n \t\tgit log --format=\"%m %ct\" --left-right --boundary \"$@\"\n \t} &&\n-\t(cd .. && shape master...other) >expect &&\n+\t(cd .. && shape main...other) >expect &&\n \tshape $main_branch...$other_branch >actual &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh\nindex 4a46f31c41..9aa49c6906 100755\n--- a/t/t9400-git-cvsserver-server.sh\n+++ b/t/t9400-git-cvsserver-server.sh\n@@ -45,7 +45,7 @@ test_expect_success 'setup' '\n   touch secondrootfile &&\n   git add secondrootfile &&\n   git commit -m \"second root\") &&\n-  git fetch secondroot master &&\n+  git fetch secondroot main &&\n   git merge --allow-unrelated-histories FETCH_HEAD &&\n   git clone -q --bare \"$WORKDIR/.git\" \"$SERVERDIR\" >/dev/null 2>&1 &&\n   GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled true &&\n@@ -57,7 +57,7 @@ test_expect_success 'setup' '\n # note that cvs doesn't accept absolute pathnames\n # as argument to co -d\n test_expect_success 'basic checkout' \\\n-  'GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master &&\n+  'GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main &&\n    test \"$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | head -n 1))\" = \"empty/1.1/\" &&\n    test \"$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | sed -ne \\$p))\" = \"secondrootfile/1.1/\"'\n \n@@ -226,7 +226,7 @@ GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled true || exit 1\n \n test_expect_success 'gitcvs.enabled = false' \\\n   'GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled false &&\n-   if GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1\n+   if GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1\n    then\n      echo unexpected cvs success\n      false\n@@ -240,14 +240,14 @@ rm -fr cvswork2\n test_expect_success 'gitcvs.ext.enabled = true' \\\n   'GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.ext.enabled true &&\n    GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled false &&\n-   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&\n+   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1 &&\n    test_cmp cvswork cvswork2'\n \n rm -fr cvswork2\n test_expect_success 'gitcvs.ext.enabled = false' \\\n   'GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.ext.enabled false &&\n    GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled true &&\n-   if GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1\n+   if GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1\n    then\n      echo unexpected cvs success\n      false\n@@ -261,21 +261,21 @@ rm -fr cvswork2\n test_expect_success 'gitcvs.dbname' \\\n   'GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.ext.enabled true &&\n    GIT_DIR=\"$SERVERDIR\" git config gitcvs.dbname %Ggitcvs.%a.%m.sqlite &&\n-   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&\n+   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1 &&\n    test_cmp cvswork cvswork2 &&\n-   test -f \"$SERVERDIR/gitcvs.ext.master.sqlite\" &&\n-   cmp \"$SERVERDIR/gitcvs.master.sqlite\" \"$SERVERDIR/gitcvs.ext.master.sqlite\"'\n+   test -f \"$SERVERDIR/gitcvs.ext.main.sqlite\" &&\n+   cmp \"$SERVERDIR/gitcvs.main.sqlite\" \"$SERVERDIR/gitcvs.ext.main.sqlite\"'\n \n rm -fr cvswork2\n test_expect_success 'gitcvs.ext.dbname' \\\n   'GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.ext.enabled true &&\n    GIT_DIR=\"$SERVERDIR\" git config gitcvs.ext.dbname %Ggitcvs1.%a.%m.sqlite &&\n    GIT_DIR=\"$SERVERDIR\" git config gitcvs.dbname %Ggitcvs2.%a.%m.sqlite &&\n-   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&\n+   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1 &&\n    test_cmp cvswork cvswork2 &&\n-   test -f \"$SERVERDIR/gitcvs1.ext.master.sqlite\" &&\n-   test ! -f \"$SERVERDIR/gitcvs2.ext.master.sqlite\" &&\n-   cmp \"$SERVERDIR/gitcvs.master.sqlite\" \"$SERVERDIR/gitcvs1.ext.master.sqlite\"'\n+   test -f \"$SERVERDIR/gitcvs1.ext.main.sqlite\" &&\n+   test ! -f \"$SERVERDIR/gitcvs2.ext.main.sqlite\" &&\n+   cmp \"$SERVERDIR/gitcvs.main.sqlite\" \"$SERVERDIR/gitcvs1.ext.main.sqlite\"'\n \n \n #------------\n@@ -457,7 +457,7 @@ cd \"$WORKDIR\"\n test_expect_success 'cvs update (module list supports packed refs)' '\n     GIT_DIR=\"$SERVERDIR\" git pack-refs --all &&\n     GIT_CONFIG=\"$git_config\" cvs -n up -d 2> out &&\n-    grep \"cvs update: New directory \\`master'\\''\" < out\n+    grep \"cvs update: New directory \\`main'\\''\" < out\n '\n \n #------------\n@@ -499,8 +499,8 @@ test_expect_success 'cvs status (no subdirs in header)' '\n cd \"$WORKDIR\"\n test_expect_success 'cvs co -c (shows module database)' '\n     GIT_CONFIG=\"$git_config\" cvs co -c > out &&\n-    grep \"^master[\t ][ \t]*master$\" <out &&\n-    ! grep -v \"^master[\t ][ \t]*master$\" <out\n+    grep \"^main[\t ][ \t]*main$\" <out &&\n+    ! grep -v \"^main[\t ][ \t]*main$\" <out\n '\n \n #------------\n@@ -526,7 +526,7 @@ test_expect_success 'cvs co -c (shows module database)' '\n \n sed -e 's/^x//' -e 's/SP$/ /' > \"$WORKDIR/expect\" <<EOF\n x\n-xRCS file: $WORKDIR/gitcvs.git/master/merge,v\n+xRCS file: $WORKDIR/gitcvs.git/main/merge,v\n xWorking file: merge\n xhead: 1.4\n xbranch:\ndiff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh\nindex c7a0dd84a4..8046a25b1f 100755\n--- a/t/t9401-git-cvsserver-crlf.sh\n+++ b/t/t9401-git-cvsserver-crlf.sh\n@@ -105,14 +105,14 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'cvs co (default crlf)' '\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     test x\"$(grep '/-k' cvswork/CVS/Entries cvswork/subdir/CVS/Entries)\" = x\"\"\n '\n \n rm -rf cvswork\n test_expect_success 'cvs co (allbinary)' '\n     GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.allbinary true &&\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     marked_as cvswork textfile.c -kb &&\n     marked_as cvswork binfile.bin -kb &&\n     marked_as cvswork .gitattributes -kb &&\n@@ -125,7 +125,7 @@ test_expect_success 'cvs co (allbinary)' '\n rm -rf cvswork cvs.log\n test_expect_success 'cvs co (use attributes/allbinary)' '\n     GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.usecrlfattr true &&\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     marked_as cvswork textfile.c \"\" &&\n     marked_as cvswork binfile.bin -kb &&\n     marked_as cvswork .gitattributes -kb &&\n@@ -138,7 +138,7 @@ test_expect_success 'cvs co (use attributes/allbinary)' '\n rm -rf cvswork\n test_expect_success 'cvs co (use attributes)' '\n     GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.allbinary false &&\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     marked_as cvswork textfile.c \"\" &&\n     marked_as cvswork binfile.bin -kb &&\n     marked_as cvswork .gitattributes \"\" &&\n@@ -194,7 +194,7 @@ test_expect_success 'updating' '\n rm -rf cvswork\n test_expect_success 'cvs co (use attributes/guess)' '\n     GIT_DIR=\"$SERVERDIR\" git config gitcvs.allbinary guess &&\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     marked_as cvswork textfile.c \"\" &&\n     marked_as cvswork binfile.bin -kb &&\n     marked_as cvswork .gitattributes \"\" &&\n@@ -224,7 +224,7 @@ test_expect_success 'setup multi-line files' '\n rm -rf cvswork\n test_expect_success 'cvs co (guess)' '\n     GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.usecrlfattr false &&\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     marked_as cvswork textfile.c \"\" &&\n     marked_as cvswork binfile.bin -kb &&\n     marked_as cvswork .gitattributes \"\" &&\n@@ -239,7 +239,7 @@ test_expect_success 'cvs co (guess)' '\n '\n \n test_expect_success 'cvs co another copy (guess)' '\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1 &&\n     marked_as cvswork2 textfile.c \"\" &&\n     marked_as cvswork2 binfile.bin -kb &&\n     marked_as cvswork2 .gitattributes \"\" &&\n@@ -335,7 +335,7 @@ test_expect_success 'update subdir of other copy (guess)' '\n \n echo \"starting update/merge\" >> \"${WORKDIR}/marked.log\"\n test_expect_success 'update/merge full other copy (guess)' '\n-    git pull gitcvs.git master &&\n+    git pull gitcvs.git main &&\n     sed \"s/3/replaced_3/\" < multilineTxt.c > ml.temp &&\n     mv ml.temp multilineTxt.c &&\n     git add multilineTxt.c &&\ndiff --git a/t/t9402-git-cvsserver-refs.sh b/t/t9402-git-cvsserver-refs.sh\nindex 6436c91a3c..3b30b02bd1 100755\n--- a/t/t9402-git-cvsserver-refs.sh\n+++ b/t/t9402-git-cvsserver-refs.sh\n@@ -115,7 +115,7 @@ test_expect_success 'setup v1, b1' '\n \n rm -rf cvswork\n test_expect_success 'cvs co v1' '\n-\tcvs -f -Q co -r v1 -d cvswork master >cvs.log 2>&1 &&\n+\tcvs -f -Q co -r v1 -d cvswork main >cvs.log 2>&1 &&\n \tcheck_start_tree cvswork &&\n \tcheck_file cvswork textfile.c v1 &&\n \tcheck_file cvswork t2 v1 &&\n@@ -128,7 +128,7 @@ test_expect_success 'cvs co v1' '\n \n rm -rf cvswork\n test_expect_success 'cvs co b1' '\n-\tcvs -f co -r b1 -d cvswork master >cvs.log 2>&1 &&\n+\tcvs -f co -r b1 -d cvswork main >cvs.log 2>&1 &&\n \tcheck_start_tree cvswork &&\n \tcheck_file cvswork textfile.c v1 &&\n \tcheck_file cvswork t2 v1 &&\n@@ -140,7 +140,7 @@ test_expect_success 'cvs co b1' '\n '\n \n test_expect_success 'cvs co b1 [cvswork3]' '\n-\tcvs -f co -r b1 -d cvswork3 master >cvs.log 2>&1 &&\n+\tcvs -f co -r b1 -d cvswork3 main >cvs.log 2>&1 &&\n \tcheck_start_tree cvswork3 &&\n \tcheck_file cvswork3 textfile.c v1 &&\n \tcheck_file cvswork3 t2 v1 &&\n@@ -265,7 +265,7 @@ test_expect_success 'setup simple b2' '\n '\n \n test_expect_success 'cvs co b2 [into cvswork2]' '\n-\tcvs -f co -r b2 -d cvswork2 master >cvs.log 2>&1 &&\n+\tcvs -f co -r b2 -d cvswork2 main >cvs.log 2>&1 &&\n \tcheck_start_tree cvswork &&\n \tcheck_file cvswork textfile.c v1 &&\n \tcheck_file cvswork t2 v1 &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex a63945569f..faad473555 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-8]*)\n+[0-8]*|9[0-4]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410100","messageId":"4da4b69114b597cf27baee63313663ccd1d8d28c.1605629549.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 25/27] tests(git-p4): transition to the default branch name `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:25Z","receivedAt":"2020-11-17T16:13:03Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn the previous commits, we adjusted the test suite to use the branch\nname `main` for initial branches.\n\nThe `git p4`-related tests are a bit harder to adjust because `git p4`\nuses the ref `refs/heads/p4/master` to track the remote branches, and\nfor now, we do not want to change that (this might be the subject of a\nfuture patch series). We only need to adjust for the actual initial\nbranch name to be changed to `main`.\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9800-git-p4-basic.sh        |  2 +-\n t/t9801-git-p4-branch.sh       | 16 ++++++++--------\n t/t9806-git-p4-options.sh      | 18 +++++++++---------\n t/t9807-git-p4-submit.sh       |  2 +-\n t/t9811-git-p4-label-import.sh |  2 +-\n t/test-lib.sh                  |  2 +-\n 6 files changed, 21 insertions(+), 21 deletions(-)\n\ndiff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh\nindex c98c1dfc23..0c543a8708 100755\n--- a/t/t9800-git-p4-basic.sh\n+++ b/t/t9800-git-p4-basic.sh\n@@ -226,7 +226,7 @@ test_expect_success 'clone --bare should make a bare repository' '\n \t\tgit config --get --bool core.bare true &&\n \t\tgit rev-parse --verify refs/remotes/p4/master &&\n \t\tgit rev-parse --verify refs/remotes/p4/HEAD &&\n-\t\tgit rev-parse --verify refs/heads/master &&\n+\t\tgit rev-parse --verify refs/heads/main &&\n \t\tgit rev-parse --verify HEAD\n \t)\n '\ndiff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh\nindex a3abd778f9..94161d4b57 100755\n--- a/t/t9801-git-p4-branch.sh\n+++ b/t/t9801-git-p4-branch.sh\n@@ -67,7 +67,7 @@ test_expect_success 'import main, no branch detection' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 4 wc\n \t)\n '\n@@ -78,7 +78,7 @@ test_expect_success 'import branch1, no branch detection' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 2 wc\n \t)\n '\n@@ -89,7 +89,7 @@ test_expect_success 'import branch2, no branch detection' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 2 wc\n \t)\n '\n@@ -100,7 +100,7 @@ test_expect_success 'import depot, no branch detection' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 8 wc\n \t)\n '\n@@ -114,7 +114,7 @@ test_expect_success 'import depot, branch detection' '\n \t\tgit log --oneline --graph --decorate --all &&\n \n \t\t# 4 main commits\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 4 wc &&\n \n \t\t# 3 main, 1 integrate, 1 on branch2\n@@ -137,7 +137,7 @@ test_expect_success 'import depot, branch detection, branchList branch definitio\n \t\tgit log --oneline --graph --decorate --all &&\n \n \t\t# 4 main commits\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 4 wc &&\n \n \t\t# 3 main, 1 integrate, 1 on branch2\n@@ -484,7 +484,7 @@ test_expect_success 'use-client-spec detect-branches files in top-level' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit p4 sync --detect-branches --use-client-spec //depot/usecs@all &&\n-\t\tgit checkout -b master p4/usecs/b1 &&\n+\t\tgit checkout -b main p4/usecs/b1 &&\n \t\ttest_path_is_file b1-file1 &&\n \t\ttest_path_is_missing b2-file2 &&\n \t\ttest_path_is_missing b1 &&\n@@ -537,7 +537,7 @@ test_expect_success 'use-client-spec detect-branches skips files in branches' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit p4 sync --detect-branches --use-client-spec //depot/usecs@all &&\n-\t\tgit checkout -b master p4/usecs/b3 &&\n+\t\tgit checkout -b main p4/usecs/b3 &&\n \t\ttest_path_is_file b1-file1 &&\n \t\ttest_path_is_file b3-file3_2 &&\n \t\ttest_path_is_missing b3-file3_1\ndiff --git a/t/t9806-git-p4-options.sh b/t/t9806-git-p4-options.sh\nindex 4e794a01bf..0beae2e3f3 100755\n--- a/t/t9806-git-p4-options.sh\n+++ b/t/t9806-git-p4-options.sh\n@@ -27,14 +27,14 @@ test_expect_success 'clone no --git-dir' '\n \ttest_must_fail git p4 clone --git-dir=xx //depot\n '\n \n-test_expect_success 'clone --branch should checkout master' '\n+test_expect_success 'clone --branch should checkout main' '\n \tgit p4 clone --branch=refs/remotes/p4/sb --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n \t\tgit rev-parse refs/remotes/p4/sb >sb &&\n-\t\tgit rev-parse refs/heads/master >master &&\n-\t\ttest_cmp sb master &&\n+\t\tgit rev-parse refs/heads/main >main &&\n+\t\ttest_cmp sb main &&\n \t\tgit rev-parse HEAD >head &&\n \t\ttest_cmp sb head\n \t)\n@@ -147,22 +147,22 @@ test_expect_success 'clone --changesfile, @all' '\n \ttest_must_fail git p4 clone --changesfile=\"$TRASH_DIRECTORY/cf\" --dest=\"$git\" //depot@all\n '\n \n-# imports both master and p4/master in refs/heads\n+# imports both main and p4/master in refs/heads\n # requires --import-local on sync to find p4 refs/heads\n-# does not update master on sync, just p4/master\n+# does not update main on sync, just p4/master\n test_expect_success 'clone/sync --import-local' '\n \tgit p4 clone --import-local --dest=\"$git\" //depot@1,2 &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n-\t\tgit log --oneline refs/heads/master >lines &&\n+\t\tgit log --oneline refs/heads/main >lines &&\n \t\ttest_line_count = 2 lines &&\n \t\tgit log --oneline refs/heads/p4/master >lines &&\n \t\ttest_line_count = 2 lines &&\n \t\ttest_must_fail git p4 sync &&\n \n \t\tgit p4 sync --import-local &&\n-\t\tgit log --oneline refs/heads/master >lines &&\n+\t\tgit log --oneline refs/heads/main >lines &&\n \t\ttest_line_count = 2 lines &&\n \t\tgit log --oneline refs/heads/p4/master >lines &&\n \t\ttest_line_count = 3 lines\n@@ -174,7 +174,7 @@ test_expect_success 'clone --max-changes' '\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n-\t\tgit log --oneline refs/heads/master >lines &&\n+\t\tgit log --oneline refs/heads/main >lines &&\n \t\ttest_line_count = 2 lines\n \t)\n '\n@@ -237,7 +237,7 @@ test_expect_success 'clone --use-client-spec' '\n \t\t\tgit init &&\n \t\t\tgit config git-p4.useClientSpec true &&\n \t\t\tgit p4 sync //depot/... &&\n-\t\t\tgit checkout -b master p4/master &&\n+\t\t\tgit checkout -b main p4/master &&\n \t\t\ttest_path_is_file bus/dir/f4 &&\n \t\t\ttest_path_is_missing file1\n \t\t)\ndiff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh\nindex eaaae414a1..e45104d1ef 100755\n--- a/t/t9807-git-p4-submit.sh\n+++ b/t/t9807-git-p4-submit.sh\n@@ -114,7 +114,7 @@ test_expect_success 'submit with allowSubmit' '\n \t\tgit config git-p4.skipSubmitEdit true &&\n \t\tgit config git-p4.allowSubmit \"nobranch\" &&\n \t\ttest_must_fail git p4 submit &&\n-\t\tgit config git-p4.allowSubmit \"nobranch,master\" &&\n+\t\tgit config git-p4.allowSubmit \"nobranch,main\" &&\n \t\tgit p4 submit\n \t)\n '\ndiff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh\nindex c1446f26ab..c722b5a176 100755\n--- a/t/t9811-git-p4-label-import.sh\n+++ b/t/t9811-git-p4-label-import.sh\n@@ -185,7 +185,7 @@ test_expect_success 'tag that cannot be exported' '\n \t\tgit add main/f12 &&\n \t\tgit commit -m \"adding f12\" &&\n \t\tgit tag -m \"tag on a_branch\" GIT_TAG_ON_A_BRANCH &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit p4 submit --export-labels\n \t) &&\n \t(\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 58267802f9..0ec93a2eec 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-8]*|9[0-7]*)\n+[0-8]*|9[0-8]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410102","messageId":"5cac0065c87e6acf1ed95ed5f24c1027048e7b6f.1605629549.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 22/27] t8*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:22Z","receivedAt":"2020-11-17T16:13:03Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t8*.sh annotate*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/annotate-tests.sh             |  8 ++++----\n t/t8001-annotate.sh             |  2 +-\n t/t8003-blame-corner-cases.sh   |  4 ++--\n t/t8004-blame-with-conflicts.sh | 14 +++++++-------\n t/test-lib.sh                   |  2 +-\n 5 files changed, 15 insertions(+), 15 deletions(-)\n\ndiff --git a/t/annotate-tests.sh b/t/annotate-tests.sh\nindex 3aee61d2cc..ee5d2d4cf8 100644\n--- a/t/annotate-tests.sh\n+++ b/t/annotate-tests.sh\n@@ -95,7 +95,7 @@ test_expect_success 'blame 2 authors' '\n '\n \n test_expect_success 'setup B1 lines (branch1)' '\n-\tgit checkout -b branch1 master &&\n+\tgit checkout -b branch1 main &&\n \techo \"3A slow green fox jumps into the\" >>file &&\n \techo \"well.\" >>file &&\n \tGIT_AUTHOR_NAME=\"B1\" GIT_AUTHOR_EMAIL=\"B1@test.git\" \\\n@@ -107,7 +107,7 @@ test_expect_success 'blame 2 authors + 1 branch1 author' '\n '\n \n test_expect_success 'setup B2 lines (branch2)' '\n-\tgit checkout -b branch2 master &&\n+\tgit checkout -b branch2 main &&\n \tsed -e \"s/2A quick brown/4A quick brown lazy dog/\" <file >file.new &&\n \tmv file.new file &&\n \tGIT_AUTHOR_NAME=\"B2\" GIT_AUTHOR_EMAIL=\"B2@test.git\" \\\n@@ -131,11 +131,11 @@ test_expect_success 'blame --first-parent blames merge for branch1' '\n '\n \n test_expect_success 'blame ancestor' '\n-\tcheck_count -h master A 2 B 2\n+\tcheck_count -h main A 2 B 2\n '\n \n test_expect_success 'blame great-ancestor' '\n-\tcheck_count -h master^ A 2\n+\tcheck_count -h main^ A 2\n '\n \n test_expect_success 'setup evil merge' '\ndiff --git a/t/t8001-annotate.sh b/t/t8001-annotate.sh\nindex 72176e42c1..3687fc58d8 100755\n--- a/t/t8001-annotate.sh\n+++ b/t/t8001-annotate.sh\n@@ -7,7 +7,7 @@ PROG='git annotate'\n . \"$TEST_DIRECTORY\"/annotate-tests.sh\n \n test_expect_success 'annotate old revision' '\n-\tgit annotate file master >actual &&\n+\tgit annotate file main >actual &&\n \tawk \"{ print \\$3; }\" <actual >authors &&\n \ttest 2 = $(grep A <authors | wc -l) &&\n \ttest 2 = $(grep B <authors | wc -l)\ndiff --git a/t/t8003-blame-corner-cases.sh b/t/t8003-blame-corner-cases.sh\nindex ba8013b002..2e499b4511 100755\n--- a/t/t8003-blame-corner-cases.sh\n+++ b/t/t8003-blame-corner-cases.sh\n@@ -161,13 +161,13 @@ test_expect_success 'blame wholesale copy and more in the index' '\n \n test_expect_success 'blame during cherry-pick with file rename conflict' '\n \n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \tgit checkout HEAD~3 &&\n \techo MOUSE >> mouse &&\n \tgit mv mouse rodent &&\n \tgit add rodent &&\n \tGIT_AUTHOR_NAME=Rodent git commit -m \"rodent\" &&\n-\tgit checkout --detach master &&\n+\tgit checkout --detach main &&\n \t(git cherry-pick HEAD@{1} || test $? -eq 1) &&\n \tgit show HEAD@{1}:rodent > rodent &&\n \tgit add rodent &&\ndiff --git a/t/t8004-blame-with-conflicts.sh b/t/t8004-blame-with-conflicts.sh\nindex 9c353ab222..b6c992ec45 100755\n--- a/t/t8004-blame-with-conflicts.sh\n+++ b/t/t8004-blame-with-conflicts.sh\n@@ -21,16 +21,16 @@ test_expect_success 'setup first case' '\n \tgit add file2 &&\n \tgit commit --author \"U Gly <ug@localhost>\" -m ugly &&\n \n-\t# Back to master and change something\n-\tgit checkout master &&\n+\t# Back to main and change something\n+\tgit checkout main &&\n \techo \"\n \n bla\" >> file1 &&\n \tgit commit --author \"Old Line <ol@localhost>\" -a -m file1.b &&\n \n-\t# Back to foo and merge master\n+\t# Back to foo and merge main\n \tgit checkout foo &&\n-\tif git merge master; then\n+\tif git merge main; then\n \t\techo needed conflict here\n \t\texit 1\n \telse\n@@ -44,8 +44,8 @@ Even more\" > file2 &&\n \tgit rm file1 &&\n \tgit commit --author \"M Result <mr@localhost>\" -a -m merged &&\n \n-\t# Back to master and change file1 again\n-\tgit checkout master &&\n+\t# Back to main and change file1 again\n+\tgit checkout main &&\n \tsed s/bla/foo/ <file1 >X &&\n \trm file1 &&\n \tmv X file1 &&\n@@ -53,7 +53,7 @@ Even more\" > file2 &&\n \n \t# Try to merge into foo again\n \tgit checkout foo &&\n-\tif git merge master; then\n+\tif git merge main; then\n \t\techo needed conflict here\n \t\texit 1\n \telse\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 6ce12ad6d8..a63945569f 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-7]*)\n+[0-8]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410104","messageId":"f9e01de17fc4cd3004c0669d103f8d6a261cf0de.1605629549.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 24/27] t9[5-7]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:24Z","receivedAt":"2020-11-17T16:13:03Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t9[5-7]*.sh lib-cvs.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/lib-cvs.sh                              |  2 +-\n t/t9500-gitweb-standalone-no-errors.sh    | 20 ++++++++++----------\n t/t9501-gitweb-standalone-http-status.sh  | 14 +++++++-------\n t/t9502-gitweb-standalone-parse-output.sh | 16 ++++++++--------\n t/t9600-cvsimport.sh                      |  2 +-\n t/t9601-cvsimport-vendor-branch.sh        | 16 ++++++++--------\n t/t9602-cvsimport-branches-tags.sh        |  4 ++--\n t/t9603-cvsimport-patchsets.sh            |  8 ++++----\n t/test-lib.sh                             |  2 +-\n 9 files changed, 42 insertions(+), 42 deletions(-)\n\ndiff --git a/t/lib-cvs.sh b/t/lib-cvs.sh\nindex 9b2bcfb1b0..32b3473379 100644\n--- a/t/lib-cvs.sh\n+++ b/t/lib-cvs.sh\n@@ -36,7 +36,7 @@ setup_cvs_test_repository () {\n test_cvs_co () {\n \t# Usage: test_cvs_co BRANCH_NAME\n \trm -rf module-cvs-\"$1\"\n-\tif [ \"$1\" = \"master\" ]\n+\tif [ \"$1\" = \"main\" ]\n \tthen\n \t\t$CVS co -P -d module-cvs-\"$1\" -A module\n \telse\ndiff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\nindex b484e3e250..452470ff3b 100755\n--- a/t/t9500-gitweb-standalone-no-errors.sh\n+++ b/t/t9500-gitweb-standalone-no-errors.sh\n@@ -327,7 +327,7 @@ test_expect_success \\\n \t echo \"Branch\" >>b &&\n \t git add b &&\n \t git commit -a -m \"On branch\" &&\n-\t git checkout master &&\n+\t git checkout main &&\n \t git merge b &&\n \t git tag merge_commit'\n \n@@ -364,7 +364,7 @@ test_expect_success \\\n \t echo \"Changed and have mode changed\" >07-change-mode-change &&\n \t test_chmod +x 07-change-mode-change &&\n \t git commit -a -m \"Large commit\" &&\n-\t git checkout master'\n+\t git checkout main'\n \n test_expect_success \\\n \t'commit(1): large commit' \\\n@@ -402,7 +402,7 @@ test_expect_success 'side-by-side: merge commit' '\n \n test_expect_success \\\n \t'tags: list of different types of tags' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t git tag -a -m \"Tag commit object\" tag-commit HEAD &&\n \t git tag -a -m \"\" tag-commit-nomessage HEAD &&\n \t git tag -a -m \"Tag tag object\" tag-tag tag-commit &&\n@@ -443,7 +443,7 @@ test_expect_success \\\n \n test_expect_success \\\n \t'logs: history (implicit HEAD, deleted file)' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t echo \"to be deleted\" >deleted_file &&\n \t git add deleted_file &&\n \t git commit -m \"Add file to be deleted\" &&\n@@ -463,11 +463,11 @@ test_expect_success \\\n \n test_expect_success \\\n \t'path_info: project/branch:file' \\\n-\t'gitweb_run \"\" \"/.git/master:file\"'\n+\t'gitweb_run \"\" \"/.git/main:file\"'\n \n test_expect_success \\\n \t'path_info: project/branch:dir/' \\\n-\t'gitweb_run \"\" \"/.git/master:foo/\"'\n+\t'gitweb_run \"\" \"/.git/main:foo/\"'\n \n test_expect_success \\\n \t'path_info: project/branch (non-existent)' \\\n@@ -479,16 +479,16 @@ test_expect_success \\\n \n test_expect_success \\\n \t'path_info: project/branch:file (non-existent)' \\\n-\t'gitweb_run \"\" \"/.git/master:non-existent\"'\n+\t'gitweb_run \"\" \"/.git/main:non-existent\"'\n \n test_expect_success \\\n \t'path_info: project/branch:dir/ (non-existent)' \\\n-\t'gitweb_run \"\" \"/.git/master:non-existent/\"'\n+\t'gitweb_run \"\" \"/.git/main:non-existent/\"'\n \n \n test_expect_success \\\n \t'path_info: project/branch:/file' \\\n-\t'gitweb_run \"\" \"/.git/master:/file\"'\n+\t'gitweb_run \"\" \"/.git/main:/file\"'\n \n test_expect_success \\\n \t'path_info: project/:/file (implicit HEAD)' \\\n@@ -801,7 +801,7 @@ test_expect_success \\\n \t\tgit checkout orphan_branch ||\n \t\tgit checkout --orphan orphan_branch\n \t } &&\n-\t test_when_finished \"git checkout master\" &&\n+\t test_when_finished \"git checkout main\" &&\n \t gitweb_run \"p=.git;a=summary\"'\n \n test_done\ndiff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-status.sh\nindex 2a0ffed870..16f98ab54e 100755\n--- a/t/t9501-gitweb-standalone-http-status.sh\n+++ b/t/t9501-gitweb-standalone-http-status.sh\n@@ -85,7 +85,7 @@ test_debug 'cat gitweb.headers'\n # snapshot hash ids\n \n test_expect_success 'snapshots: good tree-ish id' '\n-\tgitweb_run \"p=.git;a=snapshot;h=master;sf=tgz\" &&\n+\tgitweb_run \"p=.git;a=snapshot;h=main;sf=tgz\" &&\n \tgrep \"Status: 200 OK\" gitweb.output\n '\n test_debug 'cat gitweb.headers'\n@@ -123,7 +123,7 @@ test_debug 'cat gitweb.output'\n # modification times (Last-Modified and If-Modified-Since)\n \n test_expect_success DATE_PARSER 'modification: feed last-modified' '\n-\tgitweb_run \"p=.git;a=atom;h=master\" &&\n+\tgitweb_run \"p=.git;a=atom;h=main\" &&\n \tgrep \"Status: 200 OK\" gitweb.headers &&\n \tgrep \"Last-modified: Thu, 7 Apr 2005 22:14:13 +0000\" gitweb.headers\n '\n@@ -133,7 +133,7 @@ test_expect_success DATE_PARSER 'modification: feed if-modified-since (modified)\n \tHTTP_IF_MODIFIED_SINCE=\"Wed, 6 Apr 2005 22:14:13 +0000\" &&\n \texport HTTP_IF_MODIFIED_SINCE &&\n \ttest_when_finished \"unset HTTP_IF_MODIFIED_SINCE\" &&\n-\tgitweb_run \"p=.git;a=atom;h=master\" &&\n+\tgitweb_run \"p=.git;a=atom;h=main\" &&\n \tgrep \"Status: 200 OK\" gitweb.headers\n '\n test_debug 'cat gitweb.headers'\n@@ -142,13 +142,13 @@ test_expect_success DATE_PARSER 'modification: feed if-modified-since (unmodifie\n \tHTTP_IF_MODIFIED_SINCE=\"Thu, 7 Apr 2005 22:14:13 +0000\" &&\n \texport HTTP_IF_MODIFIED_SINCE &&\n \ttest_when_finished \"unset HTTP_IF_MODIFIED_SINCE\" &&\n-\tgitweb_run \"p=.git;a=atom;h=master\" &&\n+\tgitweb_run \"p=.git;a=atom;h=main\" &&\n \tgrep \"Status: 304 Not Modified\" gitweb.headers\n '\n test_debug 'cat gitweb.headers'\n \n test_expect_success DATE_PARSER 'modification: snapshot last-modified' '\n-\tgitweb_run \"p=.git;a=snapshot;h=master;sf=tgz\" &&\n+\tgitweb_run \"p=.git;a=snapshot;h=main;sf=tgz\" &&\n \tgrep \"Status: 200 OK\" gitweb.headers &&\n \tgrep \"Last-modified: Thu, 7 Apr 2005 22:14:13 +0000\" gitweb.headers\n '\n@@ -158,7 +158,7 @@ test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (modif\n \tHTTP_IF_MODIFIED_SINCE=\"Wed, 6 Apr 2005 22:14:13 +0000\" &&\n \texport HTTP_IF_MODIFIED_SINCE &&\n \ttest_when_finished \"unset HTTP_IF_MODIFIED_SINCE\" &&\n-\tgitweb_run \"p=.git;a=snapshot;h=master;sf=tgz\" &&\n+\tgitweb_run \"p=.git;a=snapshot;h=main;sf=tgz\" &&\n \tgrep \"Status: 200 OK\" gitweb.headers\n '\n test_debug 'cat gitweb.headers'\n@@ -167,7 +167,7 @@ test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (unmod\n \tHTTP_IF_MODIFIED_SINCE=\"Thu, 7 Apr 2005 22:14:13 +0000\" &&\n \texport HTTP_IF_MODIFIED_SINCE &&\n \ttest_when_finished \"unset HTTP_IF_MODIFIED_SINCE\" &&\n-\tgitweb_run \"p=.git;a=snapshot;h=master;sf=tgz\" &&\n+\tgitweb_run \"p=.git;a=snapshot;h=main;sf=tgz\" &&\n \tgrep \"Status: 304 Not Modified\" gitweb.headers\n '\n test_debug 'cat gitweb.headers'\ndiff --git a/t/t9502-gitweb-standalone-parse-output.sh b/t/t9502-gitweb-standalone-parse-output.sh\nindex e38cbc97d3..d0cfff9fdd 100755\n--- a/t/t9502-gitweb-standalone-parse-output.sh\n+++ b/t/t9502-gitweb-standalone-parse-output.sh\n@@ -79,10 +79,10 @@ test_expect_success 'snapshot: HEAD' '\n '\n test_debug 'cat gitweb.headers && cat file_list'\n \n-test_expect_success 'snapshot: short branch name (master)' '\n-\tgitweb_run \"p=.git;a=snapshot;h=master;sf=tar\" &&\n-\tID=$(git rev-parse --verify --short=7 master) &&\n-\tcheck_snapshot \".git-master-$ID\"\n+test_expect_success 'snapshot: short branch name (main)' '\n+\tgitweb_run \"p=.git;a=snapshot;h=main;sf=tar\" &&\n+\tID=$(git rev-parse --verify --short=7 main) &&\n+\tcheck_snapshot \".git-main-$ID\"\n '\n test_debug 'cat gitweb.headers && cat file_list'\n \n@@ -93,10 +93,10 @@ test_expect_success 'snapshot: short tag name (first)' '\n '\n test_debug 'cat gitweb.headers && cat file_list'\n \n-test_expect_success 'snapshot: full branch name (refs/heads/master)' '\n-\tgitweb_run \"p=.git;a=snapshot;h=refs/heads/master;sf=tar\" &&\n-\tID=$(git rev-parse --verify --short=7 master) &&\n-\tcheck_snapshot \".git-master-$ID\"\n+test_expect_success 'snapshot: full branch name (refs/heads/main)' '\n+\tgitweb_run \"p=.git;a=snapshot;h=refs/heads/main;sf=tar\" &&\n+\tID=$(git rev-parse --verify --short=7 main) &&\n+\tcheck_snapshot \".git-main-$ID\"\n '\n test_debug 'cat gitweb.headers && cat file_list'\n \ndiff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh\nindex 251fdd66c4..0c8e02c2b3 100755\n--- a/t/t9600-cvsimport.sh\n+++ b/t/t9600-cvsimport.sh\n@@ -159,6 +159,6 @@ test_expect_success PERL 'no .git/cvs-revisions created by default' '\n \n '\n \n-test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree master'\n+test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree main'\n \n test_done\ndiff --git a/t/t9601-cvsimport-vendor-branch.sh b/t/t9601-cvsimport-vendor-branch.sh\nindex 827d39f5bf..1e89f936e8 100755\n--- a/t/t9601-cvsimport-vendor-branch.sh\n+++ b/t/t9601-cvsimport-vendor-branch.sh\n@@ -42,43 +42,43 @@ test_expect_success PERL 'import a module with a vendor branch' '\n \n '\n \n-test_expect_success PERL 'check HEAD out of cvs repository' 'test_cvs_co master'\n+test_expect_success PERL 'check HEAD out of cvs repository' 'test_cvs_co main'\n \n-test_expect_success PERL 'check master out of git repository' 'test_git_co master'\n+test_expect_success PERL 'check main out of git repository' 'test_git_co main'\n \n test_expect_success PERL 'check a file that was imported once' '\n \n-\ttest_cmp_branch_file master imported-once.txt\n+\ttest_cmp_branch_file main imported-once.txt\n \n '\n \n test_expect_failure PERL 'check a file that was imported twice' '\n \n-\ttest_cmp_branch_file master imported-twice.txt\n+\ttest_cmp_branch_file main imported-twice.txt\n \n '\n \n test_expect_success PERL 'check a file that was imported then modified on HEAD' '\n \n-\ttest_cmp_branch_file master imported-modified.txt\n+\ttest_cmp_branch_file main imported-modified.txt\n \n '\n \n test_expect_success PERL 'check a file that was imported, modified, then imported again' '\n \n-\ttest_cmp_branch_file master imported-modified-imported.txt\n+\ttest_cmp_branch_file main imported-modified-imported.txt\n \n '\n \n test_expect_success PERL 'check a file that was added to HEAD then imported' '\n \n-\ttest_cmp_branch_file master added-imported.txt\n+\ttest_cmp_branch_file main added-imported.txt\n \n '\n \n test_expect_success PERL 'a vendor branch whose tag has been removed' '\n \n-\ttest_cmp_branch_file master imported-anonymously.txt\n+\ttest_cmp_branch_file main imported-anonymously.txt\n \n '\n \ndiff --git a/t/t9602-cvsimport-branches-tags.sh b/t/t9602-cvsimport-branches-tags.sh\nindex e1db323f54..fa3c1ae133 100755\n--- a/t/t9602-cvsimport-branches-tags.sh\n+++ b/t/t9602-cvsimport-branches-tags.sh\n@@ -14,9 +14,9 @@ test_expect_success PERL 'import module' '\n \n '\n \n-test_expect_success PERL 'test branch master' '\n+test_expect_success PERL 'test branch main' '\n \n-\ttest_cmp_branch_tree master\n+\ttest_cmp_branch_tree main\n \n '\n \ndiff --git a/t/t9603-cvsimport-patchsets.sh b/t/t9603-cvsimport-patchsets.sh\nindex e7a91611dc..19f38f78f2 100755\n--- a/t/t9603-cvsimport-patchsets.sh\n+++ b/t/t9603-cvsimport-patchsets.sh\n@@ -20,16 +20,16 @@ test_expect_failure PERL 'import with criss cross times on revisions' '\n \tgit cvsimport -p\"-x\" -C module-git module &&\n \t(\n \t\tcd module-git &&\n-\t\tgit log --pretty=format:%s > ../actual-master &&\n+\t\tgit log --pretty=format:%s > ../actual-main &&\n \t\tgit log A~2..A --pretty=\"format:%s %ad\" -- > ../actual-A &&\n-\t\techo \"\" >> ../actual-master &&\n+\t\techo \"\" >> ../actual-main &&\n \t\techo \"\" >> ../actual-A\n \t) &&\n \techo \"Rev 4\n Rev 3\n Rev 2\n-Rev 1\" > expect-master &&\n-\ttest_cmp expect-master actual-master &&\n+Rev 1\" > expect-main &&\n+\ttest_cmp expect-main actual-main &&\n \n \techo \"Rev 5 Branch A Wed Mar 11 19:09:10 2009 +0000\n Rev 4 Branch A Wed Mar 11 19:03:52 2009 +0000\" > expect-A &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex faad473555..58267802f9 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-8]*|9[0-4]*)\n+[0-8]*|9[0-7]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410110","messageId":"fc0c1f64631d961a9772600f2accba94b28217fb.1605629549.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 27/27] tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:27Z","receivedAt":"2020-11-17T16:13:03Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe introduced the `PREPARE_FOR_MAIN_BRANCH` prereq for the sole purpose\nof allowing us to perform the non-trivial adjustments regarding the\n`master` -> `main` rename before the automatable ones.\n\nNow that the transition is almost complete, we can stop using it in most\ninstances. The only two exceptions are t5526 and t9902: at the time of\nwriting, there are other patches in flight that touch these test\nscripts, therefore their transition to `main` is postponed to a later\ndate.\n\nThis patch is the result of this command:\n\n\tsed -i 's/PREPARE_FOR_MAIN_BRANCH[ ,]//' t/t[0-9]*.sh &&\n\tgit checkout HEAD -- t/t5526\\* t/t9902\\*\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t1400-update-ref.sh              |  4 ++--\n t/t3200-branch.sh                  |  6 +++---\n t/t3201-branch-contains.sh         |  2 +-\n t/t3203-branch-output.sh           |  2 +-\n t/t3205-branch-color.sh            |  2 +-\n t/t5505-remote.sh                  |  8 ++++----\n t/t5510-fetch.sh                   |  4 ++--\n t/t5703-upload-pack-ref-in-want.sh |  2 +-\n t/t6302-for-each-ref-filter.sh     | 12 ++++++------\n 9 files changed, 21 insertions(+), 21 deletions(-)\n\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex 3265a8c58e..127efff136 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -585,7 +585,7 @@ test_expect_success 'stdin fails on unbalanced quotes' '\n \tgrep \"fatal: badly quoted argument: \\\\\\\"main\" err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin fails on invalid escape' '\n+test_expect_success 'stdin fails on invalid escape' '\n \techo \"create $a \\\"ma\\zn\\\"\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n \tgrep \"fatal: badly quoted argument: \\\\\\\"ma\\\\\\\\zn\\\\\\\"\" err\n@@ -704,7 +704,7 @@ test_expect_success 'stdin succeeds with quoted argument' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin succeeds with escaped character' '\n+test_expect_success 'stdin succeeds with escaped character' '\n \tgit update-ref -d $a &&\n \techo \"create $a \\\"ma\\\\151n\\\"\" >stdin &&\n \tgit update-ref --stdin <stdin &&\ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex 63036e0369..430f5af21b 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -321,7 +321,7 @@ test_expect_success 'git branch --list -v with --abbrev' '\n \n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch --column' '\n+test_expect_success 'git branch --column' '\n \tCOLUMNS=81 git branch --column=column >actual &&\n \tcat >expect <<\\EOF &&\n   a/b/c   bam     foo     l     * main    n       o/p     r\n@@ -358,7 +358,7 @@ EOF\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch with column.*' '\n+test_expect_success 'git branch with column.*' '\n \tgit config column.ui column &&\n \tgit config column.branch \"dense\" &&\n \tCOLUMNS=80 git branch >actual &&\n@@ -375,7 +375,7 @@ test_expect_success 'git branch --column -v should fail' '\n \ttest_must_fail git branch --column -v\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch -v with column.ui ignored' '\n+test_expect_success 'git branch -v with column.ui ignored' '\n \tgit config column.ui column &&\n \tCOLUMNS=80 git branch -v | cut -c -8 | sed \"s/ *$//\" >actual &&\n \tgit config --unset column.ui &&\ndiff --git a/t/t3201-branch-contains.sh b/t/t3201-branch-contains.sh\nindex 110cfef820..f39ae97264 100755\n--- a/t/t3201-branch-contains.sh\n+++ b/t/t3201-branch-contains.sh\n@@ -242,7 +242,7 @@ test_expect_success 'branch --merged combined with --no-merged' '\n # Here \"topic\" tracks \"main\" with one extra commit, and \"zzz\" points to the\n # same tip as main The name \"zzz\" must come alphabetically after \"topic\"\n # as we process them in that order.\n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'branch --merged with --verbose' '\n+test_expect_success 'branch --merged with --verbose' '\n \tgit branch --track topic main &&\n \tgit branch zzz topic &&\n \tgit checkout topic &&\ndiff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh\nindex 727c9d9caa..211eb8357f 100755\n--- a/t/t3203-branch-output.sh\n+++ b/t/t3203-branch-output.sh\n@@ -329,7 +329,7 @@ test_expect_success '--color overrides auto-color' '\n \ttest_cmp expect.color actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output lists worktree path' '\n+test_expect_success 'verbose output lists worktree path' '\n \tone=$(git rev-parse --short HEAD) &&\n \ttwo=$(git rev-parse --short main) &&\n \tcat >expect <<-EOF &&\ndiff --git a/t/t3205-branch-color.sh b/t/t3205-branch-color.sh\nindex 9f2fb785d2..2eb619231d 100755\n--- a/t/t3205-branch-color.sh\n+++ b/t/t3205-branch-color.sh\n@@ -28,7 +28,7 @@ test_expect_success 'regular output shows colors' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output shows colors' '\n+test_expect_success 'verbose output shows colors' '\n \toid=$(git rev-parse --short HEAD) &&\n \tcat >expect <<-EOF &&\n \t* <CYAN>main               <RESET> $oid foo\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex 540d65aa22..869109a2c6 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -234,7 +234,7 @@ cat >test/expect <<EOF\n     main  pushes to another (up to date)\n EOF\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'show' '\n+test_expect_success 'show' '\n \t(\n \t\tcd test &&\n \t\tgit config --add remote.origin.fetch refs/heads/main:refs/heads/upstream &&\n@@ -285,7 +285,7 @@ cat >test/expect <<EOF\n     refs/tags/lastbackup forces to refs/tags/lastbackup\n EOF\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'show -n' '\n+test_expect_success 'show -n' '\n \tmv one one.unreachable &&\n \t(\n \t\tcd test &&\n@@ -328,7 +328,7 @@ test_expect_success 'set-head --auto' '\n \t)\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'set-head --auto has no problem w/multiple HEADs' '\n+test_expect_success 'set-head --auto has no problem w/multiple HEADs' '\n \t(\n \t\tcd test &&\n \t\tgit fetch two \"refs/heads/*:refs/remotes/two/*\" &&\n@@ -1348,7 +1348,7 @@ test_expect_success 'unqualified <dst> refspec DWIM and advice' '\n \t)\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '\n+test_expect_success 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '\n \t(\n \t\tcd two &&\n \t\tgit tag -a -m \"Some tag\" my-tag main &&\ndiff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh\nindex 206e3be695..f8bcaeca08 100755\n--- a/t/t5510-fetch.sh\n+++ b/t/t5510-fetch.sh\n@@ -942,7 +942,7 @@ test_expect_success 'fetching with auto-gc does not lock up' '\n \t)\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch aligned output' '\n+test_expect_success C_LOCALE_OUTPUT 'fetch aligned output' '\n \tgit clone . full-output &&\n \ttest_commit looooooooooooong-tag &&\n \t(\n@@ -957,7 +957,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch aligned outpu\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch compact output' '\n+test_expect_success C_LOCALE_OUTPUT 'fetch compact output' '\n \tgit clone . compact &&\n \ttest_commit extraaa &&\n \t(\ndiff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\nindex bbf03a8f66..fe89ea55b1 100755\n--- a/t/t5703-upload-pack-ref-in-want.sh\n+++ b/t/t5703-upload-pack-ref-in-want.sh\n@@ -383,7 +383,7 @@ test_expect_success 'server is initially behind - ref in want' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'server loses a ref - ref in want' '\n+test_expect_success 'server loses a ref - ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant true &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\ndiff --git a/t/t6302-for-each-ref-filter.sh b/t/t6302-for-each-ref-filter.sh\nindex f5a55c1991..7a45bbf048 100755\n--- a/t/t6302-for-each-ref-filter.sh\n+++ b/t/t6302-for-each-ref-filter.sh\n@@ -113,7 +113,7 @@ test_expect_success '%(color) must fail' '\n \ttest_must_fail git for-each-ref --format=\"%(color)%(refname)\"\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'left alignment is default' '\n+test_expect_success 'left alignment is default' '\n \tcat >expect <<-\\EOF &&\n \trefname is refs/heads/main    |refs/heads/main\n \trefname is refs/heads/side    |refs/heads/side\n@@ -131,7 +131,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'left alignment is default' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'middle alignment' '\n+test_expect_success 'middle alignment' '\n \tcat >expect <<-\\EOF &&\n \t|  refname is refs/heads/main  |refs/heads/main\n \t|  refname is refs/heads/side  |refs/heads/side\n@@ -149,7 +149,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'middle alignment' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'right alignment' '\n+test_expect_success 'right alignment' '\n \tcat >expect <<-\\EOF &&\n \t|    refname is refs/heads/main|refs/heads/main\n \t|    refname is refs/heads/side|refs/heads/side\n@@ -184,7 +184,7 @@ EOF\n test_align_permutations() {\n \twhile read -r option\n \tdo\n-\t\ttest_expect_success PREPARE_FOR_MAIN_BRANCH \"align:$option\" '\n+\t\ttest_expect_success \"align:$option\" '\n \t\t\tgit for-each-ref --format=\"|%(align:$option)refname is %(refname)%(end)|%(refname)\" >actual &&\n \t\t\ttest_cmp expect actual\n \t\t'\n@@ -213,7 +213,7 @@ EOF\n \n # Individual atoms inside %(align:...) and %(end) must not be quoted.\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'alignment with format quote' \"\n+test_expect_success 'alignment with format quote' \"\n \tcat >expect <<-\\EOF &&\n \t|'       '\\''main| A U Thor'\\''       '|\n \t|'       '\\''side| A U Thor'\\''       '|\n@@ -231,7 +231,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'alignment with format quote' \"\n \ttest_cmp expect actual\n \"\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'nested alignment with quote formatting' \"\n+test_expect_success 'nested alignment with quote formatting' \"\n \tcat >expect <<-\\EOF &&\n \t|'           main               '|\n \t|'           side               '|\n-- \ngitgitgadget\n"},{"id":"410106","messageId":"2b269ca98392c6d4da3831b334c8c3b823228e60.1605629549.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 21/27] t7[5-9]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:21Z","receivedAt":"2020-11-17T16:13:04Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nExcluding t7817, which is added in an unrelated patch series at the time\nof writing, this adjusts t7[5-9]*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t7[5-9]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t7501-commit-basic-functionality.sh         |   2 +-\n t/t7502-commit-porcelain.sh                   |  12 +-\n ...3-pre-commit-and-pre-merge-commit-hooks.sh |  42 ++---\n t/t7504-commit-msg-hook.sh                    |  24 +--\n t/t7505-prepare-commit-msg-hook.sh            |  20 +-\n t/t7508-status.sh                             |  58 +++---\n t/t7510-signed-commit.sh                      |   2 +-\n t/t7512-status-help.sh                        |  40 ++--\n t/t7517-per-repo-email.sh                     |  12 +-\n t/t7600-merge.sh                              |  44 ++---\n t/t7606-merge-custom.sh                       |   2 +-\n t/t7608-merge-messages.sh                     |  36 ++--\n t/t7610-mergetool.sh                          | 174 +++++++++---------\n t/t7611-merge-abort.sh                        |   4 +-\n t/t7612-merge-verify-signatures.sh            |   2 +-\n t/t7614-merge-signoff.sh                      |  24 +--\n t/t7701-repack-unpack-unreachable.sh          |   2 +-\n t/t7800-difftool.sh                           |  38 ++--\n t/t7810-grep.sh                               |  28 +--\n t/test-lib.sh                                 |   4 +-\n 20 files changed, 285 insertions(+), 285 deletions(-)\n\ndiff --git a/t/t7501-commit-basic-functionality.sh b/t/t7501-commit-basic-functionality.sh\nindex 110b4bf459..72c9031934 100755\n--- a/t/t7501-commit-basic-functionality.sh\n+++ b/t/t7501-commit-basic-functionality.sh\n@@ -603,7 +603,7 @@ test_expect_success 'same tree (merge and amend merge)' '\n \techo zero >zero &&\n \tgit add zero &&\n \tgit commit -m \"add zero\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit merge -s ours side -m \"empty ok\" &&\n \tgit diff HEAD^ HEAD >actual &&\ndiff --git a/t/t7502-commit-porcelain.sh b/t/t7502-commit-porcelain.sh\nindex 14c92e4c25..3956dcc237 100755\n--- a/t/t7502-commit-porcelain.sh\n+++ b/t/t7502-commit-porcelain.sh\n@@ -76,7 +76,7 @@ test_expect_success 'output summary format for merges' '\n \n output_tests_cleanup() {\n \t# this is needed for \"do not fire editor in the presence of conflicts\"\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \t# this is needed for the \"partial removal\" test to pass\n \tgit rm file1 &&\n@@ -440,7 +440,7 @@ test_expect_success 'do not fire editor in the presence of conflicts' '\n \tgit add g &&\n \tgit commit -m \"add g\" &&\n \tgit branch second &&\n-\techo master >g &&\n+\techo main >g &&\n \techo g >h &&\n \tgit add g h &&\n \tgit commit -m \"modify g and add h\" &&\n@@ -449,7 +449,7 @@ test_expect_success 'do not fire editor in the presence of conflicts' '\n \tgit add g &&\n \tgit commit -m second &&\n \t# Must fail due to conflict\n-\ttest_must_fail git cherry-pick -n master &&\n+\ttest_must_fail git cherry-pick -n main &&\n \techo \"editor not started\" >.git/result &&\n \t(\n \t\tGIT_EDITOR=\"\\\"$(pwd)/.git/FAKE_EDITOR\\\"\" &&\n@@ -478,9 +478,9 @@ git reset -q --hard\n \n test_expect_success 'Hand committing of a redundant merge removes dups' '\n \n-\tgit rev-parse second master >expect &&\n-\ttest_must_fail git merge second master &&\n-\tgit checkout master g &&\n+\tgit rev-parse second main >expect &&\n+\ttest_must_fail git merge second main &&\n+\tgit checkout main g &&\n \tEDITOR=: git commit -a &&\n \tgit cat-file commit HEAD >raw &&\n \tsed -n -e \"s/^parent //p\" -e \"/^$/q\" raw >actual &&\ndiff --git a/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh b/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh\nindex b3485450a2..6ac12726d6 100755\n--- a/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh\n+++ b/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh\n@@ -44,16 +44,16 @@ test_expect_success 'root commit' '\n \tgit add foo &&\n \tgit commit -m \"make it non-ff\" &&\n \tgit branch side-orig side &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'setup conflicting branches' '\n-\ttest_when_finished \"git checkout master\" &&\n-\tgit checkout -b conflicting-a master &&\n+\ttest_when_finished \"git checkout main\" &&\n+\tgit checkout -b conflicting-a main &&\n \techo a >conflicting &&\n \tgit add conflicting &&\n \tgit commit -m conflicting-a &&\n-\tgit checkout -b conflicting-b master &&\n+\tgit checkout -b conflicting-b main &&\n \techo b >conflicting &&\n \tgit add conflicting &&\n \tgit commit -m conflicting-b\n@@ -71,8 +71,8 @@ test_expect_success 'with no hook (merge)' '\n \ttest_when_finished \"rm -f actual_hooks\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \n@@ -88,8 +88,8 @@ test_expect_success '--no-verify with no hook (merge)' '\n \ttest_when_finished \"rm -f actual_hooks\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge --no-verify -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge --no-verify -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \n@@ -108,15 +108,15 @@ test_expect_success 'with succeeding hook (merge)' '\n \tcp \"$HOOKDIR/success.sample\" \"$PREMERGE\" &&\n \techo \"$PREMERGE\" >expected_hooks &&\n \tgit checkout side &&\n-\tgit merge -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_cmp expected_hooks actual_hooks\n '\n \n test_expect_success 'automatic merge fails; both hooks are available' '\n \ttest_when_finished \"rm -f \\\"$PREMERGE\\\" \\\"$PRECOMMIT\\\"\" &&\n \ttest_when_finished \"rm -f expected_hooks actual_hooks\" &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tcp \"$HOOKDIR/success.sample\" \"$PREMERGE\" &&\n \tcp \"$HOOKDIR/success.sample\" \"$PRECOMMIT\" &&\n \n@@ -145,8 +145,8 @@ test_expect_success '--no-verify with succeeding hook (merge)' '\n \tcp \"$HOOKDIR/success.sample\" \"$PREMERGE\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge --no-verify -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge --no-verify -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \n@@ -174,8 +174,8 @@ test_expect_success 'with failing hook (merge)' '\n \tcp \"$HOOKDIR/fail.sample\" \"$PREMERGE\" &&\n \techo \"$PREMERGE\" >expected_hooks &&\n \tgit checkout side &&\n-\ttest_must_fail git merge -m \"merge master\" master &&\n-\tgit checkout master &&\n+\ttest_must_fail git merge -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_cmp expected_hooks actual_hooks\n '\n \n@@ -184,8 +184,8 @@ test_expect_success '--no-verify with failing hook (merge)' '\n \tcp \"$HOOKDIR/fail.sample\" \"$PREMERGE\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge --no-verify -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge --no-verify -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \n@@ -212,8 +212,8 @@ test_expect_success POSIXPERM 'with non-executable hook (merge)' '\n \tcp \"$HOOKDIR/non-exec.sample\" \"$PREMERGE\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \n@@ -222,8 +222,8 @@ test_expect_success POSIXPERM '--no-verify with non-executable hook (merge)' '\n \tcp \"$HOOKDIR/non-exec.sample\" \"$PREMERGE\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge --no-verify -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge --no-verify -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \ndiff --git a/t/t7504-commit-msg-hook.sh b/t/t7504-commit-msg-hook.sh\nindex 31b9c6a2c1..2547362a39 100755\n--- a/t/t7504-commit-msg-hook.sh\n+++ b/t/t7504-commit-msg-hook.sh\n@@ -142,12 +142,12 @@ test_expect_success '--no-verify with failing hook (editor)' '\n test_expect_success 'merge fails with failing hook' '\n \n \ttest_when_finished \"git branch -D newbranch\" &&\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout --orphan newbranch &&\n \t: >file2 &&\n \tgit add file2 &&\n \tgit commit --no-verify file2 -m in-side-branch &&\n-\ttest_must_fail git merge --allow-unrelated-histories master &&\n+\ttest_must_fail git merge --allow-unrelated-histories main &&\n \tcommit_msg_is \"in-side-branch\" # HEAD before merge\n \n '\n@@ -155,14 +155,14 @@ test_expect_success 'merge fails with failing hook' '\n test_expect_success 'merge bypasses failing hook with --no-verify' '\n \n \ttest_when_finished \"git branch -D newbranch\" &&\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout --orphan newbranch &&\n \tgit rm -f file &&\n \t: >file2 &&\n \tgit add file2 &&\n \tgit commit --no-verify file2 -m in-side-branch &&\n-\tgit merge --no-verify --allow-unrelated-histories master &&\n-\tcommit_msg_is \"Merge branch '\\''master'\\'' into newbranch\"\n+\tgit merge --no-verify --allow-unrelated-histories main &&\n+\tcommit_msg_is \"Merge branch '\\''main'\\'' into newbranch\"\n '\n \n \n@@ -248,28 +248,28 @@ test_expect_success \"hook doesn't edit commit message (editor)\" '\n \n test_expect_success 'hook called in git-merge picks up commit message' '\n \ttest_when_finished \"git branch -D newbranch\" &&\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout --orphan newbranch &&\n \tgit rm -f file &&\n \t: >file2 &&\n \tgit add file2 &&\n \tgit commit --no-verify file2 -m in-side-branch &&\n-\tgit merge --allow-unrelated-histories master &&\n+\tgit merge --allow-unrelated-histories main &&\n \tcommit_msg_is \"new message\"\n '\n \n test_expect_failure 'merge --continue remembers --no-verify' '\n \ttest_when_finished \"git branch -D newbranch\" &&\n-\ttest_when_finished \"git checkout -f master\" &&\n-\tgit checkout master &&\n+\ttest_when_finished \"git checkout -f main\" &&\n+\tgit checkout main &&\n \techo a >file2 &&\n \tgit add file2 &&\n-\tgit commit --no-verify -m \"add file2 to master\" &&\n-\tgit checkout -b newbranch master^ &&\n+\tgit commit --no-verify -m \"add file2 to main\" &&\n+\tgit checkout -b newbranch main^ &&\n \techo b >file2 &&\n \tgit add file2 &&\n \tgit commit --no-verify file2 -m in-side-branch &&\n-\tgit merge --no-verify -m not-rewritten-by-hook master &&\n+\tgit merge --no-verify -m not-rewritten-by-hook main &&\n \t# resolve conflict:\n \techo c >file2 &&\n \tgit add file2 &&\ndiff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh\nindex 94f85cdf83..20b49629cd 100755\n--- a/t/t7505-prepare-commit-msg-hook.sh\n+++ b/t/t7505-prepare-commit-msg-hook.sh\n@@ -15,7 +15,7 @@ test_expect_success 'set up commits for rebasing' '\n \tdo\n \t\ttest_commit rebase-$i c $i\n \tdone &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tcat >rebase-todo <<-EOF\n \tpick $(git rev-parse rebase-a)\n@@ -190,7 +190,7 @@ test_expect_success 'with hook (-c)' '\n \n test_expect_success 'with hook (merge)' '\n \n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other HEAD@{1} &&\n \techo \"more\" >>file &&\n \tgit add file &&\n@@ -202,7 +202,7 @@ test_expect_success 'with hook (merge)' '\n \n test_expect_success 'with hook and editor (merge)' '\n \n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other HEAD@{1} &&\n \techo \"more\" >>file &&\n \tgit add file &&\n@@ -218,7 +218,7 @@ test_rebase () {\n \ttest_expect_$expect C_LOCALE_OUTPUT \"with hook (rebase ${mode:--i})\" '\n \t\ttest_when_finished \"\\\n \t\t\tgit rebase --abort\n-\t\t\tgit checkout -f master\n+\t\t\tgit checkout -f main\n \t\t\tgit branch -D tmp\" &&\n \t\tgit checkout -b tmp rebase-me &&\n \t\tGIT_SEQUENCE_EDITOR=\"cp rebase-todo\" &&\n@@ -250,14 +250,14 @@ test_rebase success\n test_have_prereq !REBASE_P || test_rebase success -p\n \n test_expect_success 'with hook (cherry-pick)' '\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other b &&\n \tgit cherry-pick rebase-1 &&\n \ttest \"$(git log -1 --pretty=format:%s)\" = \"message (no editor)\"\n '\n \n test_expect_success 'with hook and editor (cherry-pick)' '\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other b &&\n \tgit cherry-pick -e rebase-1 &&\n \ttest \"$(git log -1 --pretty=format:%s)\" = merge\n@@ -270,7 +270,7 @@ EOF\n \n test_expect_success 'with failing hook' '\n \n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \thead=$(git rev-parse HEAD) &&\n \techo \"more\" >> file &&\n \tgit add file &&\n@@ -280,7 +280,7 @@ test_expect_success 'with failing hook' '\n \n test_expect_success 'with failing hook (--no-verify)' '\n \n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \thead=$(git rev-parse HEAD) &&\n \techo \"more\" >> file &&\n \tgit add file &&\n@@ -290,7 +290,7 @@ test_expect_success 'with failing hook (--no-verify)' '\n \n test_expect_success 'with failing hook (merge)' '\n \n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other HEAD@{1} &&\n \techo \"more\" >> file &&\n \tgit add file &&\n@@ -305,7 +305,7 @@ test_expect_success 'with failing hook (merge)' '\n '\n \n test_expect_success C_LOCALE_OUTPUT 'with failing hook (cherry-pick)' '\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other b &&\n \ttest_must_fail git cherry-pick rebase-1 2>actual &&\n \ttest $(grep -c prepare-commit-msg actual) = 1\ndiff --git a/t/t7508-status.sh b/t/t7508-status.sh\nindex 963fed6821..d01aacb66b 100755\n--- a/t/t7508-status.sh\n+++ b/t/t7508-status.sh\n@@ -37,11 +37,11 @@ test_expect_success 'create upstream branch' '\n \tgit checkout -b upstream &&\n \ttest_commit upstream1 &&\n \ttest_commit upstream2 &&\n-\t# leave the first commit on master as root because several\n+\t# leave the first commit on main as root because several\n \t# tests depend on this case; for our upstream we only\n \t# care about commit counts anyway, so a totally divergent\n \t# history is OK\n-\tgit checkout --orphan master\n+\tgit checkout --orphan main\n '\n \n test_expect_success 'setup' '\n@@ -88,7 +88,7 @@ EOF\n \n test_expect_success 'status --column' '\n \tcat >expect <<\\EOF &&\n-# On branch master\n+# On branch main\n # Your branch and '\\''upstream'\\'' have diverged,\n # and have 1 and 2 different commits each, respectively.\n #   (use \"git pull\" to merge the remote branch into yours)\n@@ -119,7 +119,7 @@ test_expect_success 'status --column status.displayCommentPrefix=false' '\n '\n \n cat >expect <<\\EOF\n-# On branch master\n+# On branch main\n # Your branch and 'upstream' have diverged,\n # and have 1 and 2 different commits each, respectively.\n #   (use \"git pull\" to merge the remote branch into yours)\n@@ -193,7 +193,7 @@ test_expect_success 'commit ignores status.displayCommentPrefix=false in COMMIT_\n '\n \n cat >expect <<\\EOF\n-On branch master\n+On branch main\n Your branch and 'upstream' have diverged,\n and have 1 and 2 different commits each, respectively.\n \n@@ -266,7 +266,7 @@ test_expect_success 'status with gitignore' '\n \ttest_cmp expect output &&\n \n \tcat >expect <<\\EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -331,7 +331,7 @@ test_expect_success 'status with gitignore (nothing untracked)' '\n \ttest_cmp expect output &&\n \n \tcat >expect <<\\EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -368,7 +368,7 @@ output*\n EOF\n \n cat >expect <<\\EOF\n-## master...upstream [ahead 1, behind 2]\n+## main...upstream [ahead 1, behind 2]\n  M dir1/modified\n A  dir2/added\n ?? dir1/untracked\n@@ -401,7 +401,7 @@ test_expect_success 'setup dir3' '\n \n test_expect_success 'status -uno' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -429,7 +429,7 @@ test_expect_success 'status (status.showUntrackedFiles no)' '\n \n test_expect_success 'status -uno (advice.statusHints false)' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n \n@@ -463,7 +463,7 @@ test_expect_success 'status -s (status.showUntrackedFiles no)' '\n \n test_expect_success 'status -unormal' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -518,7 +518,7 @@ test_expect_success 'status -s (status.showUntrackedFiles normal)' '\n \n test_expect_success 'status -uall' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -578,7 +578,7 @@ test_expect_success 'status -s (status.showUntrackedFiles all)' '\n \n test_expect_success 'status with relative paths' '\n \tcat >expect <<\\EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -646,7 +646,7 @@ test_expect_success 'setup unique colors' '\n \n test_expect_success TTY 'status with color.ui' '\n \tcat >expect <<\\EOF &&\n-On branch <GREEN>master<RESET>\n+On branch <GREEN>main<RESET>\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -706,7 +706,7 @@ test_expect_success TTY 'status -s with color.status' '\n '\n \n cat >expect <<\\EOF\n-## <YELLOW>master<RESET>...<CYAN>upstream<RESET> [ahead <YELLOW>1<RESET>, behind <CYAN>2<RESET>]\n+## <YELLOW>main<RESET>...<CYAN>upstream<RESET> [ahead <YELLOW>1<RESET>, behind <CYAN>2<RESET>]\n  <RED>M<RESET> dir1/modified\n <GREEN>A<RESET>  dir2/added\n <BLUE>??<RESET> dir1/untracked\n@@ -757,7 +757,7 @@ test_expect_success 'status --porcelain respects -b' '\n \n \tgit status --porcelain -b >output &&\n \t{\n-\t\techo \"## master...upstream [ahead 1, behind 2]\" &&\n+\t\techo \"## main...upstream [ahead 1, behind 2]\" &&\n \t\tcat expect\n \t} >tmp &&\n \tmv tmp expect &&\n@@ -769,7 +769,7 @@ test_expect_success 'status --porcelain respects -b' '\n \n test_expect_success 'status without relative paths' '\n \tcat >expect <<\\EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -843,7 +843,7 @@ test_expect_success 'status -s without relative paths' '\n \n test_expect_success 'dry-run of partial commit excluding new file in index' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -897,7 +897,7 @@ test_expect_success 'setup status submodule summary' '\n \n test_expect_success 'status submodule summary is disabled by default' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -954,7 +954,7 @@ head=$(cd sm && git rev-parse --short=7 --verify HEAD)\n \n test_expect_success 'status submodule summary' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1013,7 +1013,7 @@ test_expect_success 'status -s submodule summary' '\n \n test_expect_success 'status submodule summary (clean submodule): commit' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1061,7 +1061,7 @@ test_expect_success 'status -z implies porcelain' '\n \n test_expect_success 'commit --dry-run submodule summary (--amend)' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1113,7 +1113,7 @@ touch .gitmodules\n \n test_expect_success '--ignore-submodules=untracked suppresses submodules with untracked content' '\n \tcat > expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1222,7 +1222,7 @@ test_expect_success '.git/config ignore=dirty suppresses submodules with modifie\n \n test_expect_success \"--ignore-submodules=untracked doesn't suppress submodules with modified content\" '\n \tcat > expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1279,7 +1279,7 @@ head2=$(cd sm && git commit -q -m \"2nd commit\" foo && git rev-parse --short=7 --\n \n test_expect_success \"--ignore-submodules=untracked doesn't suppress submodule summary\" '\n \tcat > expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1360,7 +1360,7 @@ test_expect_success \".git/config ignore=dirty doesn't suppress submodule summary\n '\n \n cat > expect << EOF\n-; On branch master\n+; On branch main\n ; Your branch and 'upstream' have diverged,\n ; and have 2 and 2 different commits each, respectively.\n ;   (use \"git pull\" to merge the remote branch into yours)\n@@ -1408,7 +1408,7 @@ test_expect_success \"status (core.commentchar with two chars with submodule summ\n \n test_expect_success \"--ignore-submodules=all suppresses submodule summary\" '\n \tcat > expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1434,7 +1434,7 @@ EOF\n \n test_expect_success '.gitmodules ignore=all suppresses unstaged submodule summary' '\n \tcat > expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1554,7 +1554,7 @@ test_expect_success 'git commit --dry-run will show a staged but ignored submodu\n \tgit reset HEAD^ &&\n \tgit add sm &&\n \tcat >expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\ndiff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh\nindex 6baaa1ad91..0653fdcd02 100755\n--- a/t/t7510-signed-commit.sh\n+++ b/t/t7510-signed-commit.sh\n@@ -25,7 +25,7 @@ test_expect_success GPG 'create signed commits' '\n \techo 3 >elif && git add elif &&\n \ttest_tick && git commit -m \"third on side\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick && git merge -S side &&\n \tgit tag merge &&\n \ndiff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh\nindex 29518e0949..29aa9adcfd 100755\n--- a/t/t7512-status-help.sh\n+++ b/t/t7512-status-help.sh\n@@ -17,14 +17,14 @@ test_expect_success 'prepare for conflicts' '\n \tgit config --global advice.statusuoption false &&\n \ttest_commit init main.txt init &&\n \tgit branch conflicts &&\n-\ttest_commit on_master main.txt on_master &&\n+\ttest_commit on_main main.txt on_main &&\n \tgit checkout conflicts &&\n \ttest_commit on_conflicts main.txt on_conflicts\n '\n \n \n test_expect_success 'status when conflicts unresolved' '\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tcat >expected <<\\EOF &&\n On branch conflicts\n You have unmerged paths.\n@@ -44,7 +44,7 @@ EOF\n \n test_expect_success 'status when conflicts resolved before commit' '\n \tgit reset --hard conflicts &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \techo one >main.txt &&\n \tgit add main.txt &&\n \tcat >expected <<\\EOF &&\n@@ -63,7 +63,7 @@ EOF\n \n \n test_expect_success 'prepare for rebase conflicts' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b rebase_conflicts &&\n \ttest_commit one_rebase main.txt one &&\n \ttest_commit two_rebase main.txt two &&\n@@ -118,11 +118,11 @@ EOF\n \n \n test_expect_success 'prepare for rebase_i_conflicts' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b rebase_i_conflicts &&\n \ttest_commit one_unmerge main.txt one_unmerge &&\n \tgit branch rebase_i_conflicts_second &&\n-\ttest_commit one_master main.txt one_master &&\n+\ttest_commit one_main main.txt one_main &&\n \tgit checkout rebase_i_conflicts_second &&\n \ttest_commit one_second main.txt one_second\n '\n@@ -182,7 +182,7 @@ EOF\n \n \n test_expect_success 'status when rebasing -i in edit mode' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b rebase_i_edit &&\n \ttest_commit one_rebase_i main.txt one &&\n \ttest_commit two_rebase_i main.txt two &&\n@@ -212,7 +212,7 @@ EOF\n \n \n test_expect_success 'status when splitting a commit' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b split_commit &&\n \ttest_commit one_split main.txt one &&\n \ttest_commit two_split main.txt two &&\n@@ -251,7 +251,7 @@ EOF\n \n \n test_expect_success 'status after editing the last commit with --amend during a rebase -i' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b amend_last &&\n \ttest_commit one_amend main.txt one &&\n \ttest_commit two_amend main.txt two &&\n@@ -284,7 +284,7 @@ EOF\n \n \n test_expect_success 'prepare for several edits' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b several_edits &&\n \ttest_commit one_edits main.txt one &&\n \ttest_commit two_edits main.txt two &&\n@@ -593,7 +593,7 @@ EOF\n \n \n test_expect_success 'prepare am_session' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b am_session &&\n \ttest_commit one_am one.txt \"one\" &&\n \ttest_commit two_am two.txt \"two\" &&\n@@ -666,7 +666,7 @@ EOF\n \n \n test_expect_success 'status when bisecting' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b bisect &&\n \ttest_commit one_bisect main.txt one &&\n \ttest_commit two_bisect main.txt two &&\n@@ -689,7 +689,7 @@ EOF\n \n \n test_expect_success 'status when rebase --apply conflicts with statushints disabled' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b statushints_disabled &&\n \ttest_when_finished \"git config --local advice.statushints true\" &&\n \tgit config --local advice.statushints false &&\n@@ -714,7 +714,7 @@ EOF\n \n \n test_expect_success 'prepare for cherry-pick conflicts' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b cherry_branch &&\n \ttest_commit one_cherry main.txt one &&\n \ttest_commit two_cherries main.txt two &&\n@@ -825,7 +825,7 @@ EOF\n '\n \n test_expect_success 'status while reverting commit (conflicts)' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo before >to-revert.txt &&\n \ttest_commit before to-revert.txt &&\n \techo old >to-revert.txt &&\n@@ -835,7 +835,7 @@ test_expect_success 'status while reverting commit (conflicts)' '\n \tTO_REVERT=$(git rev-parse --short HEAD^) &&\n \ttest_must_fail git revert $TO_REVERT &&\n \tcat >expected <<EOF &&\n-On branch master\n+On branch main\n You are currently reverting commit $TO_REVERT.\n   (fix conflicts and run \"git revert --continue\")\n   (use \"git revert --skip\" to skip this patch)\n@@ -856,7 +856,7 @@ test_expect_success 'status while reverting commit (conflicts resolved)' '\n \techo reverted >to-revert.txt &&\n \tgit add to-revert.txt &&\n \tcat >expected <<EOF &&\n-On branch master\n+On branch main\n You are currently reverting commit $TO_REVERT.\n   (all conflicts fixed: run \"git revert --continue\")\n   (use \"git revert --skip\" to skip this patch)\n@@ -875,7 +875,7 @@ EOF\n test_expect_success 'status after reverting commit' '\n \tgit revert --continue &&\n \tcat >expected <<\\EOF &&\n-On branch master\n+On branch main\n nothing to commit (use -u to show untracked files)\n EOF\n \tgit status --untracked-files=no >actual &&\n@@ -889,7 +889,7 @@ test_expect_success 'status while reverting after committing conflict resolution\n \techo reverted >to-revert.txt &&\n \tgit commit -a &&\n \tcat >expected <<EOF &&\n-On branch master\n+On branch main\n Revert currently in progress.\n   (run \"git revert --continue\" to continue)\n   (use \"git revert --skip\" to skip this patch)\n@@ -902,7 +902,7 @@ EOF\n '\n \n test_expect_success 'prepare for different number of commits rebased' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b several_commits &&\n \ttest_commit one_commit main.txt one &&\n \ttest_commit two_commit main.txt two &&\ndiff --git a/t/t7517-per-repo-email.sh b/t/t7517-per-repo-email.sh\nindex b2401cec3e..3a7723d16b 100755\n--- a/t/t7517-per-repo-email.sh\n+++ b/t/t7517-per-repo-email.sh\n@@ -47,24 +47,24 @@ test_expect_success 'set up rebase scenarios' '\n \n test_expect_success 'fast-forward rebase does not care about ident' '\n \tgit checkout -B tmp side-without-commit &&\n-\tgit rebase master\n+\tgit rebase main\n '\n \n test_expect_success 'non-fast-forward rebase refuses to write commits' '\n \ttest_when_finished \"git rebase --abort || true\" &&\n \tgit checkout -B tmp side-with-commit &&\n-\ttest_must_fail git rebase master\n+\ttest_must_fail git rebase main\n '\n \n test_expect_success 'fast-forward rebase does not care about ident (interactive)' '\n \tgit checkout -B tmp side-without-commit &&\n-\tgit rebase -i master\n+\tgit rebase -i main\n '\n \n test_expect_success 'non-fast-forward rebase refuses to write commits (interactive)' '\n \ttest_when_finished \"git rebase --abort || true\" &&\n \tgit checkout -B tmp side-with-commit &&\n-\ttest_must_fail git rebase -i master\n+\ttest_must_fail git rebase -i main\n '\n \n test_expect_success 'noop interactive rebase does not care about ident' '\n@@ -75,14 +75,14 @@ test_expect_success 'noop interactive rebase does not care about ident' '\n test_expect_success REBASE_P \\\n \t'fast-forward rebase does not care about ident (preserve)' '\n \tgit checkout -B tmp side-without-commit &&\n-\tgit rebase -p master\n+\tgit rebase -p main\n '\n \n test_expect_success REBASE_P \\\n \t'non-fast-forward rebase refuses to write commits (preserve)' '\n \ttest_when_finished \"git rebase --abort || true\" &&\n \tgit checkout -B tmp side-with-commit &&\n-\ttest_must_fail git rebase -p master\n+\ttest_must_fail git rebase -p main\n '\n \n test_expect_success 'author.name overrides user.name' '\ndiff --git a/t/t7600-merge.sh b/t/t7600-merge.sh\nindex 1c85f75555..6feb8895f3 100755\n--- a/t/t7600-merge.sh\n+++ b/t/t7600-merge.sh\n@@ -14,9 +14,9 @@ Testing basic merge operations/option parsing.\n     ! [c4] c4\n      ! [c5] c5\n       ! [c6] c6\n-       * [master] Merge commit 'c1'\n+       * [main] Merge commit 'c1'\n --------\n-       - [master] Merge commit 'c1'\n+       - [main] Merge commit 'c1'\n  +     * [c1] commit 1\n       +  [c6] c6\n      +   [c5] c5\n@@ -203,13 +203,13 @@ test_expect_success 'merge c0 with c1 with --ff-only' '\n test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'merge from unborn branch' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \ttest_might_fail git branch -D kid &&\n \n \techo \"OBJID HEAD@{0}: initial pull\" >reflog.expected &&\n \n \tgit checkout --orphan kid &&\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit rm -fr . &&\n \ttest_tick &&\n \tgit merge --ff-only c1 &&\n@@ -413,7 +413,7 @@ test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'merge c1 with c2 (no-commit in config)' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"--no-commit\" &&\n+\ttest_config branch.main.mergeoptions \"--no-commit\" &&\n \tgit merge c2 &&\n \tverify_merge file result.1-5 &&\n \tverify_head $c1 &&\n@@ -427,7 +427,7 @@ test_expect_success 'merge c1 with c2 (log in config)' '\n \tgit merge --log c2 &&\n \tgit show -s --pretty=tformat:%s%n%b >expect &&\n \n-\ttest_config branch.master.mergeoptions \"--log\" &&\n+\ttest_config branch.main.mergeoptions \"--log\" &&\n \tgit reset --hard c1 &&\n \tgit merge c2 &&\n \tgit show -s --pretty=tformat:%s%n%b >actual &&\n@@ -440,7 +440,7 @@ test_expect_success 'merge c1 with c2 (log in config gets overridden)' '\n \tgit merge c2 &&\n \tgit show -s --pretty=tformat:%s%n%b >expect &&\n \n-\ttest_config branch.master.mergeoptions \"--no-log\" &&\n+\ttest_config branch.main.mergeoptions \"--no-log\" &&\n \ttest_config merge.log \"true\" &&\n \tgit reset --hard c1 &&\n \tgit merge c2 &&\n@@ -451,7 +451,7 @@ test_expect_success 'merge c1 with c2 (log in config gets overridden)' '\n \n test_expect_success 'merge c1 with c2 (squash in config)' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"--squash\" &&\n+\ttest_config branch.main.mergeoptions \"--squash\" &&\n \tgit merge c2 &&\n \tverify_merge file result.1-5 &&\n \tverify_head $c1 &&\n@@ -463,7 +463,7 @@ test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'override config option -n with --summary' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"-n\" &&\n+\ttest_config branch.main.mergeoptions \"-n\" &&\n \ttest_tick &&\n \tgit merge --summary c2 >diffstat.txt &&\n \tverify_merge file result.1-5 msg.1-5 &&\n@@ -477,7 +477,7 @@ test_expect_success 'override config option -n with --summary' '\n \n test_expect_success 'override config option -n with --stat' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"-n\" &&\n+\ttest_config branch.main.mergeoptions \"-n\" &&\n \ttest_tick &&\n \tgit merge --stat c2 >diffstat.txt &&\n \tverify_merge file result.1-5 msg.1-5 &&\n@@ -493,7 +493,7 @@ test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'override config option --stat' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"--stat\" &&\n+\ttest_config branch.main.mergeoptions \"--stat\" &&\n \ttest_tick &&\n \tgit merge -n c2 >diffstat.txt &&\n \tverify_merge file result.1-5 msg.1-5 &&\n@@ -509,7 +509,7 @@ test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'merge c1 with c2 (override --no-commit)' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"--no-commit\" &&\n+\ttest_config branch.main.mergeoptions \"--no-commit\" &&\n \ttest_tick &&\n \tgit merge --commit c2 &&\n \tverify_merge file result.1-5 msg.1-5 &&\n@@ -520,7 +520,7 @@ test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'merge c1 with c2 (override --squash)' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"--squash\" &&\n+\ttest_config branch.main.mergeoptions \"--squash\" &&\n \ttest_tick &&\n \tgit merge --no-squash c2 &&\n \tverify_merge file result.1-5 msg.1-5 &&\n@@ -549,9 +549,9 @@ test_expect_success 'merge c0 with c1 (merge.ff=false)' '\n '\n test_debug 'git log --graph --decorate --oneline --all'\n \n-test_expect_success 'combine branch.master.mergeoptions with merge.ff' '\n+test_expect_success 'combine branch.main.mergeoptions with merge.ff' '\n \tgit reset --hard c0 &&\n-\ttest_config branch.master.mergeoptions \"--ff\" &&\n+\ttest_config branch.main.mergeoptions \"--ff\" &&\n \ttest_config merge.ff \"false\" &&\n \ttest_tick &&\n \tgit merge c1 &&\n@@ -593,7 +593,7 @@ test_expect_success 'option --no-ff overrides merge.ff=only config' '\n \n test_expect_success 'merge c0 with c1 (ff overrides no-ff)' '\n \tgit reset --hard c0 &&\n-\ttest_config branch.master.mergeoptions \"--no-ff\" &&\n+\ttest_config branch.main.mergeoptions \"--no-ff\" &&\n \tgit merge --ff c1 &&\n \tverify_merge file result.1 &&\n \tverify_head $c1\n@@ -606,7 +606,7 @@ test_expect_success 'merge log message' '\n \ttest_must_be_empty msg.act &&\n \n \tgit reset --hard c0 &&\n-\ttest_config branch.master.mergeoptions \"--no-ff\" &&\n+\ttest_config branch.main.mergeoptions \"--no-ff\" &&\n \tgit merge --no-log c2 &&\n \tgit show -s --pretty=format:%b HEAD >msg.act &&\n \ttest_must_be_empty msg.act &&\n@@ -950,10 +950,10 @@ test_expect_success 'set up mod-256 conflict scenario' '\n \tgit add file &&\n \tgit commit -m base &&\n \n-\t# one side changes the first line of each to \"master\"\n-\tsed s/-1/-master/ file >tmp &&\n+\t# one side changes the first line of each to \"main\"\n+\tsed s/-1/-main/ file >tmp &&\n \tmv tmp file &&\n-\tgit commit -am master &&\n+\tgit commit -am main &&\n \n \t# and the other to \"side\"; merging the two will\n \t# yield 256 separate conflicts\n@@ -965,12 +965,12 @@ test_expect_success 'set up mod-256 conflict scenario' '\n \n test_expect_success 'merge detects mod-256 conflicts (recursive)' '\n \tgit reset --hard &&\n-\ttest_must_fail git merge -s recursive master\n+\ttest_must_fail git merge -s recursive main\n '\n \n test_expect_success 'merge detects mod-256 conflicts (resolve)' '\n \tgit reset --hard &&\n-\ttest_must_fail git merge -s resolve master\n+\ttest_must_fail git merge -s resolve main\n '\n \n test_expect_success 'merge nothing into void' '\ndiff --git a/t/t7606-merge-custom.sh b/t/t7606-merge-custom.sh\nindex 8e8c4d7246..81fb7c474c 100755\n--- a/t/t7606-merge-custom.sh\n+++ b/t/t7606-merge-custom.sh\n@@ -4,7 +4,7 @@ test_description=\"git merge\n \n Testing a custom strategy.\n \n-*   (HEAD, master) Merge commit 'c3'\n+*   (HEAD, main) Merge commit 'c3'\n |\\\n | * (tag: c3) c3\n * | (tag: c1) c1\ndiff --git a/t/t7608-merge-messages.sh b/t/t7608-merge-messages.sh\nindex 8e7e0a5865..d5e411daf5 100755\n--- a/t/t7608-merge-messages.sh\n+++ b/t/t7608-merge-messages.sh\n@@ -10,51 +10,51 @@ check_oneline() {\n }\n \n test_expect_success 'merge local branch' '\n-\ttest_commit master-1 &&\n+\ttest_commit main-1 &&\n \tgit checkout -b local-branch &&\n \ttest_commit branch-1 &&\n-\tgit checkout master &&\n-\ttest_commit master-2 &&\n+\tgit checkout main &&\n+\ttest_commit main-2 &&\n \tgit merge local-branch &&\n \tcheck_oneline \"Merge branch Qlocal-branchQ\"\n '\n \n test_expect_success 'merge octopus branches' '\n-\tgit checkout -b octopus-a master &&\n+\tgit checkout -b octopus-a main &&\n \ttest_commit octopus-1 &&\n-\tgit checkout -b octopus-b master &&\n+\tgit checkout -b octopus-b main &&\n \ttest_commit octopus-2 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge octopus-a octopus-b &&\n \tcheck_oneline \"Merge branches Qoctopus-aQ and Qoctopus-bQ\"\n '\n \n test_expect_success 'merge tag' '\n-\tgit checkout -b tag-branch master &&\n+\tgit checkout -b tag-branch main &&\n \ttest_commit tag-1 &&\n-\tgit checkout master &&\n-\ttest_commit master-3 &&\n+\tgit checkout main &&\n+\ttest_commit main-3 &&\n \tgit merge tag-1 &&\n \tcheck_oneline \"Merge tag Qtag-1Q\"\n '\n \n test_expect_success 'ambiguous tag' '\n-\tgit checkout -b ambiguous master &&\n+\tgit checkout -b ambiguous main &&\n \ttest_commit ambiguous &&\n-\tgit checkout master &&\n-\ttest_commit master-4 &&\n+\tgit checkout main &&\n+\ttest_commit main-4 &&\n \tgit merge ambiguous &&\n \tcheck_oneline \"Merge tag QambiguousQ\"\n '\n \n test_expect_success 'remote-tracking branch' '\n-\tgit checkout -b remote master &&\n+\tgit checkout -b remote main &&\n \ttest_commit remote-1 &&\n-\tgit update-ref refs/remotes/origin/master remote &&\n-\tgit checkout master &&\n-\ttest_commit master-5 &&\n-\tgit merge origin/master &&\n-\tcheck_oneline \"Merge remote-tracking branch Qorigin/masterQ\"\n+\tgit update-ref refs/remotes/origin/main remote &&\n+\tgit checkout main &&\n+\ttest_commit main-5 &&\n+\tgit merge origin/main &&\n+\tcheck_oneline \"Merge remote-tracking branch Qorigin/mainQ\"\n '\n \n test_done\ndiff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh\nindex 70afdd06fa..69ef7f7356 100755\n--- a/t/t7610-mergetool.sh\n+++ b/t/t7610-mergetool.sh\n@@ -10,19 +10,19 @@ Testing basic merge tool invocation'\n . ./test-lib.sh\n \n # All the mergetool test work by checking out a temporary branch based\n-# off 'branch1' and then merging in master and checking the results of\n+# off 'branch1' and then merging in main and checking the results of\n # running mergetool\n \n test_expect_success 'setup' '\n \ttest_config rerere.enabled true &&\n-\techo master >file1 &&\n-\techo master spaced >\"spaced name\" &&\n-\techo master file11 >file11 &&\n-\techo master file12 >file12 &&\n-\techo master file13 >file13 &&\n-\techo master file14 >file14 &&\n+\techo main >file1 &&\n+\techo main spaced >\"spaced name\" &&\n+\techo main file11 >file11 &&\n+\techo main file12 >file12 &&\n+\techo main file13 >file13 &&\n+\techo main file14 >file14 &&\n \tmkdir subdir &&\n-\techo master sub >subdir/file3 &&\n+\techo main sub >subdir/file3 &&\n \ttest_create_repo submod &&\n \t(\n \t\tcd submod &&\n@@ -34,7 +34,7 @@ test_expect_success 'setup' '\n \tgit add file1 \"spaced name\" file1[1-4] subdir/file3 .gitmodules submod &&\n \tgit commit -m \"add initial versions\" &&\n \n-\tgit checkout -b branch1 master &&\n+\tgit checkout -b branch1 main &&\n \tgit submodule update -N &&\n \techo branch1 change >file1 &&\n \techo branch1 newfile >file2 &&\n@@ -71,39 +71,39 @@ test_expect_success 'setup' '\n \ttest_write_lines one two 3 >c/c/file.txt &&\n \tgit commit -a -m\"move to c\" &&\n \n-\tgit checkout -b stash1 master &&\n+\tgit checkout -b stash1 main &&\n \techo stash1 change file11 >file11 &&\n \tgit add file11 &&\n \tgit commit -m \"stash1 changes\" &&\n \n-\tgit checkout -b stash2 master &&\n+\tgit checkout -b stash2 main &&\n \techo stash2 change file11 >file11 &&\n \tgit add file11 &&\n \tgit commit -m \"stash2 changes\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit submodule update -N &&\n-\techo master updated >file1 &&\n-\techo master new >file2 &&\n-\techo master updated spaced >\"spaced name\" &&\n-\techo master both added >both &&\n-\techo master updated file12 >file12 &&\n-\techo master updated file14 >file14 &&\n-\techo master new sub >subdir/file3 &&\n+\techo main updated >file1 &&\n+\techo main new >file2 &&\n+\techo main updated spaced >\"spaced name\" &&\n+\techo main both added >both &&\n+\techo main updated file12 >file12 &&\n+\techo main updated file14 >file14 &&\n+\techo main new sub >subdir/file3 &&\n \t(\n \t\tcd submod &&\n-\t\techo master submodule >bar &&\n+\t\techo main submodule >bar &&\n \t\tgit add bar &&\n-\t\tgit commit -m \"Add bar on master\" &&\n-\t\tgit checkout -b submod-master\n+\t\tgit commit -m \"Add bar on main\" &&\n+\t\tgit checkout -b submod-main\n \t) &&\n \tgit add file1 \"spaced name\" file12 file14 file2 subdir/file3 submod &&\n \tgit add both &&\n \tgit rm file11 &&\n-\tgit commit -m \"master updates\" &&\n+\tgit commit -m \"main updates\" &&\n \n \tgit clean -fdx &&\n-\tgit checkout -b order-file-start master &&\n+\tgit checkout -b order-file-start main &&\n \techo start >a &&\n \techo start >b &&\n \tgit add a b &&\n@@ -130,7 +130,7 @@ test_expect_success 'custom mergetool' '\n \ttest_when_finished \"git reset --hard\" &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tyes \"\" | git mergetool both &&\n \tyes \"\" | git mergetool file1 file1 &&\n \tyes \"\" | git mergetool file2 \"spaced name\" &&\n@@ -138,11 +138,11 @@ test_expect_success 'custom mergetool' '\n \tyes \"d\" | git mergetool file11 &&\n \tyes \"d\" | git mergetool file12 &&\n \tyes \"l\" | git mergetool submod &&\n-\techo \"master updated\" >expect &&\n+\techo \"main updated\" >expect &&\n \ttest_cmp expect file1 &&\n-\techo \"master new\" >expect &&\n+\techo \"main new\" >expect &&\n \ttest_cmp expect file2 &&\n-\techo \"master new sub\" >expect &&\n+\techo \"main new sub\" >expect &&\n \ttest_cmp expect subdir/file3 &&\n \techo \"branch1 submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n@@ -156,7 +156,7 @@ test_expect_success 'gui mergetool' '\n \ttest_when_finished \"git reset --hard\" &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tyes \"\" | git mergetool --gui both &&\n \tyes \"\" | git mergetool -g file1 file1 &&\n \tyes \"\" | git mergetool --gui file2 \"spaced name\" &&\n@@ -164,11 +164,11 @@ test_expect_success 'gui mergetool' '\n \tyes \"d\" | git mergetool --gui file11 &&\n \tyes \"d\" | git mergetool --gui file12 &&\n \tyes \"l\" | git mergetool --gui submod &&\n-\techo \"gui master updated\" >expect &&\n+\techo \"gui main updated\" >expect &&\n \ttest_cmp expect file1 &&\n-\techo \"gui master new\" >expect &&\n+\techo \"gui main new\" >expect &&\n \ttest_cmp expect file2 &&\n-\techo \"gui master new sub\" >expect &&\n+\techo \"gui main new sub\" >expect &&\n \ttest_cmp expect subdir/file3 &&\n \techo \"branch1 submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n@@ -179,7 +179,7 @@ test_expect_success 'gui mergetool without merge.guitool set falls back to merge\n \ttest_when_finished \"git reset --hard\" &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tyes \"\" | git mergetool --gui both &&\n \tyes \"\" | git mergetool -g file1 file1 &&\n \tyes \"\" | git mergetool --gui file2 \"spaced name\" &&\n@@ -187,11 +187,11 @@ test_expect_success 'gui mergetool without merge.guitool set falls back to merge\n \tyes \"d\" | git mergetool --gui file11 &&\n \tyes \"d\" | git mergetool --gui file12 &&\n \tyes \"l\" | git mergetool --gui submod &&\n-\techo \"master updated\" >expect &&\n+\techo \"main updated\" >expect &&\n \ttest_cmp expect file1 &&\n-\techo \"master new\" >expect &&\n+\techo \"main new\" >expect &&\n \ttest_cmp expect file2 &&\n-\techo \"master new sub\" >expect &&\n+\techo \"main new sub\" >expect &&\n \ttest_cmp expect subdir/file3 &&\n \techo \"branch1 submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n@@ -206,7 +206,7 @@ test_expect_success 'mergetool crlf' '\n \t# test_when_finished is LIFO.)\n \ttest_config core.autocrlf true &&\n \tgit checkout -b test$test_count branch1 &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tyes \"\" | git mergetool file1 &&\n \tyes \"\" | git mergetool file2 &&\n \tyes \"\" | git mergetool \"spaced name\" &&\n@@ -215,11 +215,11 @@ test_expect_success 'mergetool crlf' '\n \tyes \"d\" | git mergetool file11 &&\n \tyes \"d\" | git mergetool file12 &&\n \tyes \"r\" | git mergetool submod &&\n-\ttest \"$(printf x | cat file1 -)\" = \"$(printf \"master updated\\r\\nx\")\" &&\n-\ttest \"$(printf x | cat file2 -)\" = \"$(printf \"master new\\r\\nx\")\" &&\n-\ttest \"$(printf x | cat subdir/file3 -)\" = \"$(printf \"master new sub\\r\\nx\")\" &&\n+\ttest \"$(printf x | cat file1 -)\" = \"$(printf \"main updated\\r\\nx\")\" &&\n+\ttest \"$(printf x | cat file2 -)\" = \"$(printf \"main new\\r\\nx\")\" &&\n+\ttest \"$(printf x | cat subdir/file3 -)\" = \"$(printf \"main new sub\\r\\nx\")\" &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit commit -m \"branch1 resolved with mergetool - autocrlf\"\n '\n@@ -230,9 +230,9 @@ test_expect_success 'mergetool in subdir' '\n \tgit submodule update -N &&\n \t(\n \t\tcd subdir &&\n-\t\ttest_must_fail git merge master &&\n+\t\ttest_must_fail git merge main &&\n \t\tyes \"\" | git mergetool file3 &&\n-\t\techo \"master new sub\" >expect &&\n+\t\techo \"main new sub\" >expect &&\n \t\ttest_cmp expect file3\n \t)\n '\n@@ -243,7 +243,7 @@ test_expect_success 'mergetool on file in parent dir' '\n \tgit submodule update -N &&\n \t(\n \t\tcd subdir &&\n-\t\ttest_must_fail git merge master &&\n+\t\ttest_must_fail git merge main &&\n \t\tyes \"\" | git mergetool file3 &&\n \t\tyes \"\" | git mergetool ../file1 &&\n \t\tyes \"\" | git mergetool ../file2 ../spaced\\ name &&\n@@ -251,9 +251,9 @@ test_expect_success 'mergetool on file in parent dir' '\n \t\tyes \"d\" | git mergetool ../file11 &&\n \t\tyes \"d\" | git mergetool ../file12 &&\n \t\tyes \"l\" | git mergetool ../submod &&\n-\t\techo \"master updated\" >expect &&\n+\t\techo \"main updated\" >expect &&\n \t\ttest_cmp expect ../file1 &&\n-\t\techo \"master new\" >expect &&\n+\t\techo \"main new\" >expect &&\n \t\ttest_cmp expect ../file2 &&\n \t\techo \"branch1 submodule\" >expect &&\n \t\ttest_cmp expect ../submod/bar &&\n@@ -265,7 +265,7 @@ test_expect_success 'mergetool skips autoresolved' '\n \ttest_when_finished \"git reset --hard\" &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"d\" | git mergetool file11 &&\n \tyes \"d\" | git mergetool file12 &&\n@@ -280,17 +280,17 @@ test_expect_success 'mergetool merges all from subdir (rerere disabled)' '\n \ttest_config rerere.enabled false &&\n \t(\n \t\tcd subdir &&\n-\t\ttest_must_fail git merge master &&\n+\t\ttest_must_fail git merge main &&\n \t\tyes \"r\" | git mergetool ../submod &&\n \t\tyes \"d\" \"d\" | git mergetool --no-prompt &&\n-\t\techo \"master updated\" >expect &&\n+\t\techo \"main updated\" >expect &&\n \t\ttest_cmp expect ../file1 &&\n-\t\techo \"master new\" >expect &&\n+\t\techo \"main new\" >expect &&\n \t\ttest_cmp expect ../file2 &&\n-\t\techo \"master new sub\" >expect &&\n+\t\techo \"main new sub\" >expect &&\n \t\ttest_cmp expect file3 &&\n \t\t( cd .. && git submodule update -N ) &&\n-\t\techo \"master submodule\" >expect &&\n+\t\techo \"main submodule\" >expect &&\n \t\ttest_cmp expect ../submod/bar &&\n \t\tgit commit -m \"branch2 resolved by mergetool from subdir\"\n \t)\n@@ -303,17 +303,17 @@ test_expect_success 'mergetool merges all from subdir (rerere enabled)' '\n \trm -rf .git/rr-cache &&\n \t(\n \t\tcd subdir &&\n-\t\ttest_must_fail git merge master &&\n+\t\ttest_must_fail git merge main &&\n \t\tyes \"r\" | git mergetool ../submod &&\n \t\tyes \"d\" \"d\" | git mergetool --no-prompt &&\n-\t\techo \"master updated\" >expect &&\n+\t\techo \"main updated\" >expect &&\n \t\ttest_cmp expect ../file1 &&\n-\t\techo \"master new\" >expect &&\n+\t\techo \"main new\" >expect &&\n \t\ttest_cmp expect ../file2 &&\n-\t\techo \"master new sub\" >expect &&\n+\t\techo \"main new sub\" >expect &&\n \t\ttest_cmp expect file3 &&\n \t\t( cd .. && git submodule update -N ) &&\n-\t\techo \"master submodule\" >expect &&\n+\t\techo \"main submodule\" >expect &&\n \t\ttest_cmp expect ../submod/bar &&\n \t\tgit commit -m \"branch2 resolved by mergetool from subdir\"\n \t)\n@@ -325,7 +325,7 @@ test_expect_success 'mergetool skips resolved paths when rerere is active' '\n \trm -rf .git/rr-cache &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tyes \"l\" | git mergetool --no-prompt submod &&\n \tyes \"d\" \"d\" | git mergetool --no-prompt &&\n \tgit submodule update -N &&\n@@ -366,11 +366,11 @@ test_expect_success 'mergetool takes partial path' '\n \ttest_config rerere.enabled false &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \n \tyes \"\" | git mergetool subdir &&\n \n-\techo \"master new sub\" >expect &&\n+\techo \"main new sub\" >expect &&\n \ttest_cmp expect subdir/file3\n '\n \n@@ -434,7 +434,7 @@ test_expect_success 'deleted vs modified submodule' '\n \tgit rm --cached submod &&\n \tgit commit -m \"Submodule deleted from branch\" &&\n \tgit checkout -b test$test_count.a test$test_count &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 &&\n \tyes \"\" | git mergetool both &&\n@@ -444,7 +444,7 @@ test_expect_success 'deleted vs modified submodule' '\n \techo \"branch1 submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \toutput=\"$(git mergetool --no-prompt)\" &&\n \ttest \"$output\" = \"No files need merging\" &&\n@@ -453,7 +453,7 @@ test_expect_success 'deleted vs modified submodule' '\n \tmv submod submod-movedaside &&\n \tgit checkout -b test$test_count.b test$test_count &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 &&\n \tyes \"\" | git mergetool both &&\n@@ -465,7 +465,7 @@ test_expect_success 'deleted vs modified submodule' '\n \tgit commit -m \"Merge resolved by deleting module\" &&\n \n \tmv submod-movedaside submod &&\n-\tgit checkout -b test$test_count.c master &&\n+\tgit checkout -b test$test_count.c main &&\n \tgit submodule update -N &&\n \ttest_must_fail git merge test$test_count &&\n \ttest -n \"$(git ls-files -u)\" &&\n@@ -481,7 +481,7 @@ test_expect_success 'deleted vs modified submodule' '\n \tgit commit -m \"Merge resolved by deleting module\" &&\n \tmv submod.orig submod &&\n \n-\tgit checkout -b test$test_count.d master &&\n+\tgit checkout -b test$test_count.d main &&\n \tgit submodule update -N &&\n \ttest_must_fail git merge test$test_count &&\n \ttest -n \"$(git ls-files -u)\" &&\n@@ -489,10 +489,10 @@ test_expect_success 'deleted vs modified submodule' '\n \tyes \"\" | git mergetool both &&\n \tyes \"d\" | git mergetool file11 file12 &&\n \tyes \"l\" | git mergetool submod &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \toutput=\"$(git mergetool --no-prompt)\" &&\n \ttest \"$output\" = \"No files need merging\" &&\n@@ -509,7 +509,7 @@ test_expect_success 'file vs modified submodule' '\n \tgit add submod &&\n \tgit commit -m \"Submodule path becomes file\" &&\n \tgit checkout -b test$test_count.a branch1 &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 &&\n \tyes \"\" | git mergetool both &&\n@@ -519,7 +519,7 @@ test_expect_success 'file vs modified submodule' '\n \techo \"branch1 submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \toutput=\"$(git mergetool --no-prompt)\" &&\n \ttest \"$output\" = \"No files need merging\" &&\n@@ -527,7 +527,7 @@ test_expect_success 'file vs modified submodule' '\n \n \tmv submod submod-movedaside &&\n \tgit checkout -b test$test_count.b test$test_count &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 &&\n \tyes \"\" | git mergetool both &&\n@@ -547,7 +547,7 @@ test_expect_success 'file vs modified submodule' '\n \ttest \"$output\" = \"No files need merging\" &&\n \tgit commit -m \"Merge resolved by keeping file\" &&\n \n-\tgit checkout -b test$test_count.c master &&\n+\tgit checkout -b test$test_count.c main &&\n \trmdir submod && mv submod-movedaside submod &&\n \ttest ! -e submod.orig &&\n \tgit submodule update -N &&\n@@ -573,7 +573,7 @@ test_expect_success 'file vs modified submodule' '\n \ttest \"$output\" = \"No files need merging\" &&\n \tgit commit -m \"Merge resolved by keeping file\" &&\n \n-\tgit checkout -b test$test_count.d master &&\n+\tgit checkout -b test$test_count.d main &&\n \trmdir submod && mv submod.orig submod &&\n \tgit submodule update -N &&\n \ttest_must_fail git merge test$test_count &&\n@@ -586,10 +586,10 @@ test_expect_success 'file vs modified submodule' '\n \tthen\n \t\tyes \"d\" | git mergetool submod~test19\n \tfi &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \toutput=\"$(git mergetool --no-prompt)\" &&\n \ttest \"$output\" = \"No files need merging\" &&\n@@ -672,7 +672,7 @@ test_expect_success 'directory vs modified submodule' '\n \tgit add submod/file16 &&\n \tgit commit -m \"Submodule path becomes directory\" &&\n \n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"l\" | git mergetool submod &&\n \techo \"not a submodule\" >expect &&\n@@ -680,14 +680,14 @@ test_expect_success 'directory vs modified submodule' '\n \trm -rf submod.orig &&\n \n \tgit reset --hard &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \ttest ! -e submod.orig &&\n \tif test \"$GIT_TEST_MERGE_ALGORITHM\" = ort\n \tthen\n-\t\tyes \"r\" | git mergetool submod~master &&\n+\t\tyes \"r\" | git mergetool submod~main &&\n \t\tgit mv submod submod.orig &&\n-\t\tgit mv submod~master submod\n+\t\tgit mv submod~main submod\n \telse\n \t\tyes \"r\" | git mergetool submod\n \tfi &&\n@@ -698,18 +698,18 @@ test_expect_success 'directory vs modified submodule' '\n \tmv submod-movedaside/.git submod &&\n \t( cd submod && git clean -f && git reset --hard ) &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit reset --hard &&\n \trm -rf submod-movedaside &&\n \n-\tgit checkout -b test$test_count.c master &&\n+\tgit checkout -b test$test_count.c main &&\n \tgit submodule update -N &&\n \ttest_must_fail git merge test$test_count &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"l\" | git mergetool submod &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \n \tgit reset --hard &&\n@@ -721,7 +721,7 @@ test_expect_success 'directory vs modified submodule' '\n \techo \"not a submodule\" >expect &&\n \ttest_cmp expect submod/file16 &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \t( cd submod && git clean -f && git reset --hard ) &&\n \tgit submodule update -N\n '\n@@ -729,7 +729,7 @@ test_expect_success 'directory vs modified submodule' '\n test_expect_success 'file with no base' '\n \ttest_when_finished \"git reset --hard\" &&\n \tgit checkout -b test$test_count branch1 &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit mergetool --no-prompt --tool mybase -- both &&\n \ttest_must_be_empty both\n '\n@@ -739,9 +739,9 @@ test_expect_success 'custom commands override built-ins' '\n \tgit checkout -b test$test_count branch1 &&\n \ttest_config mergetool.defaults.cmd \"cat \\\"\\$REMOTE\\\" >\\\"\\$MERGED\\\"\" &&\n \ttest_config mergetool.defaults.trustExitCode true &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit mergetool --no-prompt --tool defaults -- both &&\n-\techo master both added >expected &&\n+\techo main both added >expected &&\n \ttest_cmp expected both\n '\n \n@@ -751,7 +751,7 @@ test_expect_success 'filenames seen by tools start with ./' '\n \ttest_config mergetool.writeToTemp false &&\n \ttest_config mergetool.myecho.cmd \"echo \\\"\\$LOCAL\\\"\" &&\n \ttest_config mergetool.myecho.trustExitCode true &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit mergetool --no-prompt --tool myecho -- both >actual &&\n \tgrep ^\\./both_LOCAL_ actual\n '\n@@ -768,7 +768,7 @@ test_expect_success MKTEMP 'temporary filenames are used with mergetool.writeToT\n \ttest_config mergetool.writeToTemp true &&\n \ttest_config mergetool.myecho.cmd \"echo \\\"\\$LOCAL\\\"\" &&\n \ttest_config mergetool.myecho.trustExitCode true &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit mergetool --no-prompt --tool myecho -- both >actual &&\n \t! grep ^\\./both_LOCAL_ actual &&\n \tgrep /both_LOCAL_ actual\ndiff --git a/t/t7611-merge-abort.sh b/t/t7611-merge-abort.sh\nindex 7c84a518aa..8e95182566 100755\n--- a/t/t7611-merge-abort.sh\n+++ b/t/t7611-merge-abort.sh\n@@ -7,7 +7,7 @@ Set up repo with conflicting and non-conflicting branches:\n There are three files foo/bar/baz, and the following graph illustrates the\n content of these files in each commit:\n \n-# foo/bar/baz --- foo/bar/bazz     <-- master\n+# foo/bar/baz --- foo/bar/bazz     <-- main\n #             \\\n #              --- foo/barf/bazf   <-- conflict_branch\n #               \\\n@@ -40,7 +40,7 @@ test_expect_success 'setup' '\n \tgit checkout -b clean_branch HEAD^ &&\n \techo bart > bar &&\n \tgit commit -a -m \"clean\" &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n pre_merge_head=\"$(git rev-parse HEAD)\"\ndiff --git a/t/t7612-merge-verify-signatures.sh b/t/t7612-merge-verify-signatures.sh\nindex a426f3a89a..6c52b6ac1e 100755\n--- a/t/t7612-merge-verify-signatures.sh\n+++ b/t/t7612-merge-verify-signatures.sh\n@@ -31,7 +31,7 @@ test_expect_success GPG 'create signed commits' '\n \techo 3 >baz && git add baz &&\n \ttest_tick && git commit -SB7227189 -m \"untrusted on side\" &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success GPG 'merge unsigned commit with verification' '\ndiff --git a/t/t7614-merge-signoff.sh b/t/t7614-merge-signoff.sh\nindex c1b8446f49..1e901224cd 100755\n--- a/t/t7614-merge-signoff.sh\n+++ b/t/t7614-merge-signoff.sh\n@@ -11,17 +11,17 @@ This test runs git merge --signoff and makes sure that it works.\n test_setup() {\n \t# Expected commit message after merge --signoff\n \tcat >expected-signed <<EOF &&\n-Merge branch 'master' into other-branch\n+Merge branch 'main' into other-branch\n \n Signed-off-by: $(git var GIT_COMMITTER_IDENT | sed -e \"s/>.*/>/\")\n EOF\n \n \t# Expected commit message after merge without --signoff (or with --no-signoff)\n \tcat >expected-unsigned <<EOF &&\n-Merge branch 'master' into other-branch\n+Merge branch 'main' into other-branch\n EOF\n \n-\t# Initial commit and feature branch to merge master into it.\n+\t# Initial commit and feature branch to merge main into it.\n \tgit commit --allow-empty -m \"Initial empty commit\" &&\n \tgit checkout -b other-branch &&\n \ttest_commit other-branch file1 1\n@@ -38,30 +38,30 @@ test_expect_success 'setup' '\n \n # Test with --signoff flag\n test_expect_success 'git merge --signoff adds a sign-off line' '\n-\tgit checkout master &&\n-\ttest_commit master-branch-2 file2 2 &&\n+\tgit checkout main &&\n+\ttest_commit main-branch-2 file2 2 &&\n \tgit checkout other-branch &&\n-\tgit merge master --signoff --no-edit &&\n+\tgit merge main --signoff --no-edit &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n \ttest_cmp expected-signed actual\n '\n \n # Test without --signoff flag\n test_expect_success 'git merge does not add a sign-off line' '\n-\tgit checkout master &&\n-\ttest_commit master-branch-3 file3 3 &&\n+\tgit checkout main &&\n+\ttest_commit main-branch-3 file3 3 &&\n \tgit checkout other-branch &&\n-\tgit merge master --no-edit &&\n+\tgit merge main --no-edit &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n \ttest_cmp expected-unsigned actual\n '\n \n # Test for --no-signoff flag\n test_expect_success 'git merge --no-signoff flag cancels --signoff flag' '\n-\tgit checkout master &&\n-\ttest_commit master-branch-4 file4 4 &&\n+\tgit checkout main &&\n+\ttest_commit main-branch-4 file4 4 &&\n \tgit checkout other-branch &&\n-\tgit merge master --no-edit --signoff --no-signoff &&\n+\tgit merge main --no-edit --signoff --no-signoff &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n \ttest_cmp expected-unsigned actual\n '\ndiff --git a/t/t7701-repack-unpack-unreachable.sh b/t/t7701-repack-unpack-unreachable.sh\nindex 48261ba080..852c81d13e 100755\n--- a/t/t7701-repack-unpack-unreachable.sh\n+++ b/t/t7701-repack-unpack-unreachable.sh\n@@ -22,7 +22,7 @@ test_expect_success '-A with -d option leaves unreachable objects unpacked' '\n \tgit commit -a -m more_content &&\n \tcsha1=$(git rev-parse HEAD^{commit}) &&\n \ttsha1=$(git rev-parse HEAD^{tree}) &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo even more content >> file1 &&\n \ttest_tick &&\n \tgit commit -a -m even_more_content &&\ndiff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh\nindex a578b35761..31e719e361 100755\n--- a/t/t7800-difftool.sh\n+++ b/t/t7800-difftool.sh\n@@ -35,23 +35,23 @@ test_expect_success 'basic usage requires no repo' '\n \ttest_i18ngrep ^usage: output\n '\n \n-# Create a file on master and change it on branch\n+# Create a file on main and change it on branch\n test_expect_success 'setup' '\n-\techo master >file &&\n+\techo main >file &&\n \tgit add file &&\n \tgit commit -m \"added file\" &&\n \n-\tgit checkout -b branch master &&\n+\tgit checkout -b branch main &&\n \techo branch >file &&\n \tgit commit -a -m \"branch changed file\" &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n # Configure a custom difftool.<tool>.cmd and use it\n test_expect_success 'custom commands' '\n \tdifftool_test_setup &&\n \ttest_config difftool.test-tool.cmd \"cat \\\"\\$REMOTE\\\"\" &&\n-\techo master >expect &&\n+\techo main >expect &&\n \tgit difftool --no-prompt branch >actual &&\n \ttest_cmp expect actual &&\n \n@@ -63,7 +63,7 @@ test_expect_success 'custom commands' '\n \n test_expect_success 'custom tool commands override built-ins' '\n \ttest_config difftool.vimdiff.cmd \"cat \\\"\\$REMOTE\\\"\" &&\n-\techo master >expect &&\n+\techo main >expect &&\n \tgit difftool --tool vimdiff --no-prompt branch >actual &&\n \ttest_cmp expect actual\n '\n@@ -311,21 +311,21 @@ test_expect_success 'difftool.<tool>.path' '\n \n test_expect_success 'difftool --extcmd=cat' '\n \techo branch >expect &&\n-\techo master >>expect &&\n+\techo main >>expect &&\n \tgit difftool --no-prompt --extcmd=cat branch >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'difftool --extcmd cat' '\n \techo branch >expect &&\n-\techo master >>expect &&\n+\techo main >>expect &&\n \tgit difftool --no-prompt --extcmd=cat branch >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'difftool -x cat' '\n \techo branch >expect &&\n-\techo master >>expect &&\n+\techo main >>expect &&\n \tgit difftool --no-prompt -x cat branch >actual &&\n \ttest_cmp expect actual\n '\n@@ -338,7 +338,7 @@ test_expect_success 'difftool --extcmd echo arg1' '\n '\n \n test_expect_success 'difftool --extcmd cat arg1' '\n-\techo master >expect &&\n+\techo main >expect &&\n \tgit difftool --no-prompt \\\n \t\t--extcmd sh\\ -c\\ \\\"cat\\ \\$1\\\" branch >actual &&\n \ttest_cmp expect actual\n@@ -351,7 +351,7 @@ test_expect_success 'difftool --extcmd cat arg2' '\n \ttest_cmp expect actual\n '\n \n-# Create a second file on master and a different version on branch\n+# Create a second file on main and a different version on branch\n test_expect_success 'setup with 2 files different' '\n \techo m2 >file2 &&\n \tgit add file2 &&\n@@ -361,7 +361,7 @@ test_expect_success 'setup with 2 files different' '\n \techo br2 >file2 &&\n \tgit add file2 &&\n \tgit commit -a -m \"branch changed file2\" &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'say no to the first file' '\n@@ -369,14 +369,14 @@ test_expect_success 'say no to the first file' '\n \tgit difftool -x cat branch <input >output &&\n \tgrep m2 output &&\n \tgrep br2 output &&\n-\t! grep master output &&\n+\t! grep main output &&\n \t! grep branch output\n '\n \n test_expect_success 'say no to the second file' '\n \t(echo && echo n) >input &&\n \tgit difftool -x cat branch <input >output &&\n-\tgrep master output &&\n+\tgrep main output &&\n \tgrep branch output &&\n \t! grep m2 output &&\n \t! grep br2 output\n@@ -384,7 +384,7 @@ test_expect_success 'say no to the second file' '\n \n test_expect_success 'ending prompt input with EOF' '\n \tgit difftool -x cat branch </dev/null >output &&\n-\t! grep master output &&\n+\t! grep main output &&\n \t! grep branch output &&\n \t! grep m2 output &&\n \t! grep br2 output\n@@ -396,9 +396,9 @@ test_expect_success 'difftool --tool-help' '\n '\n \n test_expect_success 'setup change in subdirectory' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tmkdir sub &&\n-\techo master >sub/sub &&\n+\techo main >sub/sub &&\n \tgit add sub/sub &&\n \tgit commit -m \"added sub/sub\" &&\n \tgit tag v1 &&\n@@ -526,7 +526,7 @@ run_dir_diff_test 'difftool --dir-diff from subdirectory with GIT_DIR set' '\n run_dir_diff_test 'difftool --dir-diff when worktree file is missing' '\n \ttest_when_finished git reset --hard &&\n \trm file2 &&\n-\tgit difftool --dir-diff $symlinks --extcmd ls branch master >output &&\n+\tgit difftool --dir-diff $symlinks --extcmd ls branch main >output &&\n \tgrep file2 output\n '\n \n@@ -543,7 +543,7 @@ run_dir_diff_test 'difftool --dir-diff with unmerged files' '\n \techo b >>file &&\n \tgit add file &&\n \tgit commit -m conflict-b &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge conflict-a &&\n \ttest_must_fail git merge conflict-b &&\n \tcat >expect <<-EOF &&\ndiff --git a/t/t7810-grep.sh b/t/t7810-grep.sh\nindex 991d5bd9c0..bee57a4e08 100755\n--- a/t/t7810-grep.sh\n+++ b/t/t7810-grep.sh\n@@ -1206,19 +1206,19 @@ test_expect_success 'grep -e -- -- path' '\n '\n \n test_expect_success 'dashdash disambiguates rev as rev' '\n-\ttest_when_finished \"rm -f master\" &&\n-\techo content >master &&\n-\techo master:hello.c >expect &&\n-\tgit grep -l o master -- hello.c >actual &&\n+\ttest_when_finished \"rm -f main\" &&\n+\techo content >main &&\n+\techo main:hello.c >expect &&\n+\tgit grep -l o main -- hello.c >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'dashdash disambiguates pathspec as pathspec' '\n-\ttest_when_finished \"git rm -f master\" &&\n-\techo content >master &&\n-\tgit add master &&\n-\techo master:content >expect &&\n-\tgit grep o -- master >actual &&\n+\ttest_when_finished \"git rm -f main\" &&\n+\techo content >main &&\n+\tgit add main &&\n+\techo main:content >expect &&\n+\tgit grep o -- main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -1254,15 +1254,15 @@ test_expect_success 'grep --no-index pattern -- path' '\n '\n \n test_expect_success 'grep --no-index complains of revs' '\n-\ttest_must_fail git grep --no-index o master -- 2>err &&\n+\ttest_must_fail git grep --no-index o main -- 2>err &&\n \ttest_i18ngrep \"cannot be used with revs\" err\n '\n \n test_expect_success 'grep --no-index prefers paths to revs' '\n-\ttest_when_finished \"rm -f master\" &&\n-\techo content >master &&\n-\techo master:content >expect &&\n-\tgit grep --no-index o master >actual &&\n+\ttest_when_finished \"rm -f main\" &&\n+\techo content >main &&\n+\techo main:content >expect &&\n+\tgit grep --no-index o main >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 056d9591aa..6ce12ad6d8 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,13 +257,13 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-3404|4013|5310|5526|6300|7064)\n+3404|4013|5310|5526|6300|7064|7817)\n \t# Avoid conflicts with patch series that are cooking at the same time\n \t# as the patch series changing the default of `init.defaultBranch`.\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-6]*|7[0-4]*)\n+[0-7]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410101","messageId":"cfa29c7f714f8225714e9dc052e37b4402bc9863.1605629549.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 26/27] t99*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:26Z","receivedAt":"2020-11-17T16:13:05Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t9902, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in\nt9903. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t99*.sh lib-cvs.sh &&\n\t   git checkout HEAD -- t9902\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor all tests (except the ones we specifically excluded for now).\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9903-bash-prompt.sh | 114 ++++++++++++++++++++---------------------\n t/test-lib.sh          |   4 +-\n 2 files changed, 59 insertions(+), 59 deletions(-)\n\ndiff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh\nindex ab5da2cabc..a77daa7419 100755\n--- a/t/t9903-bash-prompt.sh\n+++ b/t/t9903-bash-prompt.sh\n@@ -28,7 +28,7 @@ test_expect_success 'setup for prompt tests' '\n \techo 3 >file &&\n \tgit commit -m \"third b1\" file &&\n \tgit tag -a -m msg2 t2 &&\n-\tgit checkout -b b2 master &&\n+\tgit checkout -b b2 main &&\n \techo 0 >file &&\n \tgit commit -m \"second b2\" file &&\n \techo 00 >file &&\n@@ -37,20 +37,20 @@ test_expect_success 'setup for prompt tests' '\n \tgit commit -m \"yet another b2\" file &&\n \tmkdir ignored_dir &&\n \techo \"ignored_dir/\" >>.gitignore &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'prompt - branch name' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \t__git_ps1 >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n \n test_expect_success SYMLINKS 'prompt - branch name - symlink symref' '\n-\tprintf \" (master)\" >expected &&\n-\ttest_when_finished \"git checkout master\" &&\n+\tprintf \" (main)\" >expected &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_config core.preferSymlinkRefs true &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \t__git_ps1 >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n@@ -58,7 +58,7 @@ test_expect_success SYMLINKS 'prompt - branch name - symlink symref' '\n test_expect_success 'prompt - unborn branch' '\n \tprintf \" (unborn)\" >expected &&\n \tgit checkout --orphan unborn &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t__git_ps1 >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n@@ -72,7 +72,7 @@ test_expect_success FUNNYNAMES 'prompt - with newline in path' '\n with\n newline\" &&\n \tmkdir \"$repo_with_newline\" &&\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \tgit init \"$repo_with_newline\" &&\n \ttest_when_finished \"rm -rf \\\"$repo_with_newline\\\"\" &&\n \tmkdir \"$repo_with_newline\"/subdir &&\n@@ -87,7 +87,7 @@ test_expect_success 'prompt - detached head' '\n \tprintf \" ((%s...))\" $(git log -1 --format=\"%h\" --abbrev=13 b1^) >expected &&\n \ttest_config core.abbrev 13 &&\n \tgit checkout b1^ &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t__git_ps1 >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n@@ -95,7 +95,7 @@ test_expect_success 'prompt - detached head' '\n test_expect_success 'prompt - describe detached head - contains' '\n \tprintf \" ((t2~1))\" >expected &&\n \tgit checkout b1^ &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t(\n \t\tGIT_PS1_DESCRIBE_STYLE=contains &&\n \t\t__git_ps1 >\"$actual\"\n@@ -106,7 +106,7 @@ test_expect_success 'prompt - describe detached head - contains' '\n test_expect_success 'prompt - describe detached head - branch' '\n \tprintf \" ((tags/t2~1))\" >expected &&\n \tgit checkout b1^ &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t(\n \t\tGIT_PS1_DESCRIBE_STYLE=branch &&\n \t\t__git_ps1 >\"$actual\"\n@@ -117,7 +117,7 @@ test_expect_success 'prompt - describe detached head - branch' '\n test_expect_success 'prompt - describe detached head - describe' '\n \tprintf \" ((t1-1-g%s))\" $(git log -1 --format=\"%h\" b1^) >expected &&\n \tgit checkout b1^ &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t(\n \t\tGIT_PS1_DESCRIBE_STYLE=describe &&\n \t\t__git_ps1 >\"$actual\"\n@@ -128,7 +128,7 @@ test_expect_success 'prompt - describe detached head - describe' '\n test_expect_success 'prompt - describe detached head - default' '\n \tprintf \" ((t2))\" >expected &&\n \tgit checkout --detach b1 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t__git_ps1 >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n@@ -152,7 +152,7 @@ test_expect_success 'prompt - deep inside .git directory' '\n '\n \n test_expect_success 'prompt - inside bare repository' '\n-\tprintf \" (BARE:master)\" >expected &&\n+\tprintf \" (BARE:main)\" >expected &&\n \tgit init --bare bare.git &&\n \ttest_when_finished \"rm -rf bare.git\" &&\n \t(\n@@ -172,7 +172,7 @@ test_expect_success 'prompt - interactive rebase' '\n \ttest_when_finished \"rm -f fake_editor.sh\" &&\n \ttest_set_editor \"$TRASH_DIRECTORY/fake_editor.sh\" &&\n \tgit checkout b1 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit rebase -i HEAD^ &&\n \ttest_when_finished \"git rebase --abort\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -182,7 +182,7 @@ test_expect_success 'prompt - interactive rebase' '\n test_expect_success 'prompt - rebase merge' '\n \tprintf \" (b2|REBASE 1/3)\" >expected &&\n \tgit checkout b2 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_must_fail git rebase --merge b1 b2 &&\n \ttest_when_finished \"git rebase --abort\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -192,7 +192,7 @@ test_expect_success 'prompt - rebase merge' '\n test_expect_success 'prompt - rebase am' '\n \tprintf \" (b2|REBASE 1/3)\" >expected &&\n \tgit checkout b2 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_must_fail git rebase --apply b1 b2 &&\n \ttest_when_finished \"git rebase --abort\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -202,7 +202,7 @@ test_expect_success 'prompt - rebase am' '\n test_expect_success 'prompt - merge' '\n \tprintf \" (b1|MERGING)\" >expected &&\n \tgit checkout b1 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_must_fail git merge b2 &&\n \ttest_when_finished \"git reset --hard\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -210,7 +210,7 @@ test_expect_success 'prompt - merge' '\n '\n \n test_expect_success 'prompt - cherry-pick' '\n-\tprintf \" (master|CHERRY-PICKING)\" >expected &&\n+\tprintf \" (main|CHERRY-PICKING)\" >expected &&\n \ttest_must_fail git cherry-pick b1 b1^ &&\n \ttest_when_finished \"git cherry-pick --abort\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -222,7 +222,7 @@ test_expect_success 'prompt - cherry-pick' '\n '\n \n test_expect_success 'prompt - revert' '\n-\tprintf \" (master|REVERTING)\" >expected &&\n+\tprintf \" (main|REVERTING)\" >expected &&\n \ttest_must_fail git revert b1^ b1 &&\n \ttest_when_finished \"git revert --abort\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -234,7 +234,7 @@ test_expect_success 'prompt - revert' '\n '\n \n test_expect_success 'prompt - bisect' '\n-\tprintf \" (master|BISECTING)\" >expected &&\n+\tprintf \" (main|BISECTING)\" >expected &&\n \tgit bisect start &&\n \ttest_when_finished \"git bisect reset\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -242,7 +242,7 @@ test_expect_success 'prompt - bisect' '\n '\n \n test_expect_success 'prompt - dirty status indicator - clean' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWDIRTYSTATE=y &&\n \t\t__git_ps1 >\"$actual\"\n@@ -251,7 +251,7 @@ test_expect_success 'prompt - dirty status indicator - clean' '\n '\n \n test_expect_success 'prompt - dirty status indicator - dirty worktree' '\n-\tprintf \" (master *)\" >expected &&\n+\tprintf \" (main *)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \t(\n@@ -262,7 +262,7 @@ test_expect_success 'prompt - dirty status indicator - dirty worktree' '\n '\n \n test_expect_success 'prompt - dirty status indicator - dirty index' '\n-\tprintf \" (master +)\" >expected &&\n+\tprintf \" (main +)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \tgit add -u &&\n@@ -274,7 +274,7 @@ test_expect_success 'prompt - dirty status indicator - dirty index' '\n '\n \n test_expect_success 'prompt - dirty status indicator - dirty index and worktree' '\n-\tprintf \" (master *+)\" >expected &&\n+\tprintf \" (main *+)\" >expected &&\n \techo \"dirty index\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \tgit add -u &&\n@@ -288,7 +288,7 @@ test_expect_success 'prompt - dirty status indicator - dirty index and worktree'\n \n test_expect_success 'prompt - dirty status indicator - orphan branch - clean' '\n \tprintf \" (orphan #)\" >expected &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit checkout --orphan orphan &&\n \tgit reset --hard &&\n \t(\n@@ -300,7 +300,7 @@ test_expect_success 'prompt - dirty status indicator - orphan branch - clean' '\n \n test_expect_success 'prompt - dirty status indicator - orphan branch - dirty index' '\n \tprintf \" (orphan +)\" >expected &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit checkout --orphan orphan &&\n \t(\n \t\tGIT_PS1_SHOWDIRTYSTATE=y &&\n@@ -311,7 +311,7 @@ test_expect_success 'prompt - dirty status indicator - orphan branch - dirty ind\n \n test_expect_success 'prompt - dirty status indicator - orphan branch - dirty index and worktree' '\n \tprintf \" (orphan *+)\" >expected &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit checkout --orphan orphan &&\n \t>file &&\n \t(\n@@ -322,7 +322,7 @@ test_expect_success 'prompt - dirty status indicator - orphan branch - dirty ind\n '\n \n test_expect_success 'prompt - dirty status indicator - shell variable unset with config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \ttest_config bash.showDirtyState false &&\n@@ -334,7 +334,7 @@ test_expect_success 'prompt - dirty status indicator - shell variable unset with\n '\n \n test_expect_success 'prompt - dirty status indicator - shell variable unset with config enabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \ttest_config bash.showDirtyState true &&\n@@ -346,7 +346,7 @@ test_expect_success 'prompt - dirty status indicator - shell variable unset with\n '\n \n test_expect_success 'prompt - dirty status indicator - shell variable set with config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \ttest_config bash.showDirtyState false &&\n@@ -358,7 +358,7 @@ test_expect_success 'prompt - dirty status indicator - shell variable set with c\n '\n \n test_expect_success 'prompt - dirty status indicator - shell variable set with config enabled' '\n-\tprintf \" (master *)\" >expected &&\n+\tprintf \" (main *)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \ttest_config bash.showDirtyState true &&\n@@ -382,7 +382,7 @@ test_expect_success 'prompt - dirty status indicator - not shown inside .git dir\n '\n \n test_expect_success 'prompt - stash status indicator - no stash' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWSTASHSTATE=y &&\n \t\t__git_ps1 >\"$actual\"\n@@ -391,7 +391,7 @@ test_expect_success 'prompt - stash status indicator - no stash' '\n '\n \n test_expect_success 'prompt - stash status indicator - stash' '\n-\tprintf \" (master $)\" >expected &&\n+\tprintf \" (main $)\" >expected &&\n \techo 2 >file &&\n \tgit stash &&\n \ttest_when_finished \"git stash drop\" &&\n@@ -417,7 +417,7 @@ test_expect_success 'prompt - stash status indicator - not shown inside .git dir\n '\n \n test_expect_success 'prompt - untracked files status indicator - no untracked files' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWUNTRACKEDFILES=y &&\n \t\tcd otherrepo &&\n@@ -427,7 +427,7 @@ test_expect_success 'prompt - untracked files status indicator - no untracked fi\n '\n \n test_expect_success 'prompt - untracked files status indicator - untracked files' '\n-\tprintf \" (master %%)\" >expected &&\n+\tprintf \" (main %%)\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWUNTRACKEDFILES=y &&\n \t\t__git_ps1 >\"$actual\"\n@@ -436,7 +436,7 @@ test_expect_success 'prompt - untracked files status indicator - untracked files\n '\n \n test_expect_success 'prompt - untracked files status indicator - empty untracked dir' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \tmkdir otherrepo/untracked-dir &&\n \ttest_when_finished \"rm -rf otherrepo/untracked-dir\" &&\n \t(\n@@ -448,7 +448,7 @@ test_expect_success 'prompt - untracked files status indicator - empty untracked\n '\n \n test_expect_success 'prompt - untracked files status indicator - non-empty untracked dir' '\n-\tprintf \" (master %%)\" >expected &&\n+\tprintf \" (main %%)\" >expected &&\n \tmkdir otherrepo/untracked-dir &&\n \ttest_when_finished \"rm -rf otherrepo/untracked-dir\" &&\n \t>otherrepo/untracked-dir/untracked-file &&\n@@ -461,7 +461,7 @@ test_expect_success 'prompt - untracked files status indicator - non-empty untra\n '\n \n test_expect_success 'prompt - untracked files status indicator - untracked files outside cwd' '\n-\tprintf \" (master %%)\" >expected &&\n+\tprintf \" (main %%)\" >expected &&\n \t(\n \t\tmkdir -p ignored_dir &&\n \t\tcd ignored_dir &&\n@@ -472,7 +472,7 @@ test_expect_success 'prompt - untracked files status indicator - untracked files\n '\n \n test_expect_success 'prompt - untracked files status indicator - shell variable unset with config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \ttest_config bash.showUntrackedFiles false &&\n \t(\n \t\tsane_unset GIT_PS1_SHOWUNTRACKEDFILES &&\n@@ -482,7 +482,7 @@ test_expect_success 'prompt - untracked files status indicator - shell variable\n '\n \n test_expect_success 'prompt - untracked files status indicator - shell variable unset with config enabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \ttest_config bash.showUntrackedFiles true &&\n \t(\n \t\tsane_unset GIT_PS1_SHOWUNTRACKEDFILES &&\n@@ -492,7 +492,7 @@ test_expect_success 'prompt - untracked files status indicator - shell variable\n '\n \n test_expect_success 'prompt - untracked files status indicator - shell variable set with config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \ttest_config bash.showUntrackedFiles false &&\n \t(\n \t\tGIT_PS1_SHOWUNTRACKEDFILES=y &&\n@@ -502,7 +502,7 @@ test_expect_success 'prompt - untracked files status indicator - shell variable\n '\n \n test_expect_success 'prompt - untracked files status indicator - shell variable set with config enabled' '\n-\tprintf \" (master %%)\" >expected &&\n+\tprintf \" (main %%)\" >expected &&\n \ttest_config bash.showUntrackedFiles true &&\n \t(\n \t\tGIT_PS1_SHOWUNTRACKEDFILES=y &&\n@@ -522,13 +522,13 @@ test_expect_success 'prompt - untracked files status indicator - not shown insid\n '\n \n test_expect_success 'prompt - format string starting with dash' '\n-\tprintf -- \"-master\" >expected &&\n+\tprintf -- \"-main\" >expected &&\n \t__git_ps1 \"-%s\" >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n \n test_expect_success 'prompt - pc mode' '\n-\tprintf \"BEFORE: (\\${__git_ps1_branch_name}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (\\${__git_ps1_branch_name}):AFTER\\\\nmain\" >expected &&\n \t(\n \t\t__git_ps1 \"BEFORE:\" \":AFTER\" >\"$actual\" &&\n \t\ttest_must_be_empty \"$actual\" &&\n@@ -538,7 +538,7 @@ test_expect_success 'prompt - pc mode' '\n '\n \n test_expect_success 'prompt - bash color pc mode - branch name' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear}):AFTER\\\\nmain\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n \t\t__git_ps1 \"BEFORE:\" \":AFTER\" >\"$actual\" &&\n@@ -550,7 +550,7 @@ test_expect_success 'prompt - bash color pc mode - branch name' '\n test_expect_success 'prompt - bash color pc mode - detached head' '\n \tprintf \"BEFORE: (${c_red}\\${__git_ps1_branch_name}${c_clear}):AFTER\\\\n(%s...)\" $(git log -1 --format=\"%h\" b1^) >expected &&\n \tgit checkout b1^ &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t(\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n \t\t__git_ps1 \"BEFORE:\" \":AFTER\" &&\n@@ -560,7 +560,7 @@ test_expect_success 'prompt - bash color pc mode - detached head' '\n '\n \n test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirty worktree' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}*${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}*${c_clear}):AFTER\\\\nmain\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \t(\n@@ -573,7 +573,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirt\n '\n \n test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirty index' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_green}+${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_green}+${c_clear}):AFTER\\\\nmain\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \tgit add -u &&\n@@ -587,7 +587,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirt\n '\n \n test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirty index and worktree' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}*${c_green}+${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}*${c_green}+${c_clear}):AFTER\\\\nmain\" >expected &&\n \techo \"dirty index\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \tgit add -u &&\n@@ -602,7 +602,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirt\n '\n \n test_expect_success 'prompt - bash color pc mode - dirty status indicator - before root commit' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_green}#${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_green}#${c_clear}):AFTER\\\\nmain\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWDIRTYSTATE=y &&\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n@@ -628,7 +628,7 @@ test_expect_success 'prompt - bash color pc mode - inside .git directory' '\n '\n \n test_expect_success 'prompt - bash color pc mode - stash status indicator' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_lblue}\\$${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_lblue}\\$${c_clear}):AFTER\\\\nmain\" >expected &&\n \techo 2 >file &&\n \tgit stash &&\n \ttest_when_finished \"git stash drop\" &&\n@@ -642,7 +642,7 @@ test_expect_success 'prompt - bash color pc mode - stash status indicator' '\n '\n \n test_expect_success 'prompt - bash color pc mode - untracked files status indicator' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}%%${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}%%${c_clear}):AFTER\\\\nmain\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWUNTRACKEDFILES=y &&\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n@@ -653,7 +653,7 @@ test_expect_success 'prompt - bash color pc mode - untracked files status indica\n '\n \n test_expect_success 'prompt - zsh color pc mode' '\n-\tprintf \"BEFORE: (%%F{green}master%%f):AFTER\" >expected &&\n+\tprintf \"BEFORE: (%%F{green}main%%f):AFTER\" >expected &&\n \t(\n \t\tZSH_VERSION=5.0.0 &&\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n@@ -664,7 +664,7 @@ test_expect_success 'prompt - zsh color pc mode' '\n '\n \n test_expect_success 'prompt - hide if pwd ignored - env var unset, config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \ttest_config bash.hideIfPwdIgnored false &&\n \t(\n \t\tcd ignored_dir &&\n@@ -685,7 +685,7 @@ test_expect_success 'prompt - hide if pwd ignored - env var unset, config disabl\n '\n \n test_expect_success 'prompt - hide if pwd ignored - env var unset, config unset' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \t(\n \t\tcd ignored_dir &&\n \t\t__git_ps1 >\"$actual\"\n@@ -704,7 +704,7 @@ test_expect_success 'prompt - hide if pwd ignored - env var unset, config unset,\n '\n \n test_expect_success 'prompt - hide if pwd ignored - env var set, config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \ttest_config bash.hideIfPwdIgnored false &&\n \t(\n \t\tcd ignored_dir &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 0ec93a2eec..d39bdf04ce 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,13 +257,13 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-3404|4013|5310|5526|6300|7064|7817)\n+3404|4013|5310|5526|6300|7064|7817|9902)\n \t# Avoid conflicts with patch series that are cooking at the same time\n \t# as the patch series changing the default of `init.defaultBranch`.\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-8]*|9[0-8]*)\n+*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410109","messageId":"5126d90a32fafa6a7de4db06de2583eb69acd7b4.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 11/27] t5503: prepare aligned comment for replacing `master` with `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:11Z","receivedAt":"2020-11-17T16:13:06Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn an upcoming commit, we will use `main` as the default branch name in\nt5503 instead of `master`. This will require extra padding in ASCII-art\ncommit graphs, which we hereby add preemptively.\n\nBy doing this preemptively rather than after the commit applying the\nsearch-and-replace, it is more obvious that we caught all aligned\ncomments that are affected by the latter commit.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5503-tagfollow.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t5503-tagfollow.sh b/t/t5503-tagfollow.sh\nindex 6041a4dd32..6dafbe4543 100755\n--- a/t/t5503-tagfollow.sh\n+++ b/t/t5503-tagfollow.sh\n@@ -11,7 +11,7 @@ test_description='test automatic tag following'\n #   L - A ------ O ------ B\n #    \\   \\                 \\\n #     \\   C - origin/cat    \\\n-#      origin/master         master\n+#      origin/master           master\n \n test_expect_success setup '\n \ttest_tick &&\n-- \ngitgitgadget\n\n"},{"id":"410114","messageId":"27d7994933c4b3c1f3142ff0d72edd30f6556400.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 17/27] t6[0-3]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:17Z","receivedAt":"2020-11-17T16:13:06Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t6300, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in\nt6[0-3]*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t6[0-3]*.sh &&\n\t   git checkout HEAD -- t6300\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t6000-rev-list-misc.sh                   |  2 +-\n t/t6001-rev-list-graft.sh                  |  2 +-\n t/t6004-rev-list-path-optim.sh             | 14 +++---\n t/t6006-rev-list-format.sh                 | 14 +++---\n t/t6007-rev-list-cherry-pick-file.sh       |  4 +-\n t/t6008-rev-list-submodule.sh              |  2 +-\n t/t6009-rev-list-parent.sh                 |  6 +--\n t/t6012-rev-list-simplify.sh               |  8 ++--\n t/t6013-rev-list-reverse-parents.sh        | 10 ++--\n t/t6016-rev-list-graph-simplify-history.sh |  2 +-\n t/t6017-rev-list-stdin.sh                  |  8 ++--\n t/t6018-rev-list-glob.sh                   | 50 ++++++++++----------\n t/t6019-rev-list-ancestry-path.sh          |  6 +--\n t/t6030-bisect-porcelain.sh                | 10 ++--\n t/t6040-tracking-info.sh                   | 54 +++++++++++-----------\n t/t6050-replace.sh                         | 10 ++--\n t/t6101-rev-parse-parents.sh               |  2 +-\n t/t6110-rev-list-sparse.sh                 |  2 +-\n t/t6111-rev-list-treesame.sh               |  6 +--\n t/t6112-rev-list-filters-objects.sh        | 14 +++---\n t/t6120-describe.sh                        | 20 ++++----\n t/t6200-fmt-merge-msg.sh                   | 50 ++++++++++----------\n t/t6302-for-each-ref-filter.sh             | 46 +++++++++---------\n t/test-lib.sh                              |  4 +-\n 24 files changed, 173 insertions(+), 173 deletions(-)\n\ndiff --git a/t/t6000-rev-list-misc.sh b/t/t6000-rev-list-misc.sh\nindex fc4d55dcb2..dc40a39fce 100755\n--- a/t/t6000-rev-list-misc.sh\n+++ b/t/t6000-rev-list-misc.sh\n@@ -85,7 +85,7 @@ test_expect_success 'propagate uninteresting flag down correctly' '\n '\n \n test_expect_success 'symleft flag bit is propagated down from tag' '\n-\tgit log --format=\"%m %s\" --left-right v1.0...master >actual &&\n+\tgit log --format=\"%m %s\" --left-right v1.0...main >actual &&\n \tcat >expect <<-\\EOF &&\n \t< another\n \t< that\ndiff --git a/t/t6001-rev-list-graft.sh b/t/t6001-rev-list-graft.sh\nindex 7504ba4751..4490981352 100755\n--- a/t/t6001-rev-list-graft.sh\n+++ b/t/t6001-rev-list-graft.sh\n@@ -20,7 +20,7 @@ test_expect_success setup '\n \tgit commit -a -m \"Third in one history.\" &&\n \tA2=$(git rev-parse --verify HEAD) &&\n \n-\trm -f .git/refs/heads/master .git/index &&\n+\trm -f .git/refs/heads/main .git/index &&\n \n \techo >fileA fileA again &&\n \techo >subdir/fileB fileB again &&\ndiff --git a/t/t6004-rev-list-path-optim.sh b/t/t6004-rev-list-path-optim.sh\nindex 3e8c42ee0b..81d1b57ced 100755\n--- a/t/t6004-rev-list-path-optim.sh\n+++ b/t/t6004-rev-list-path-optim.sh\n@@ -4,7 +4,7 @@ test_description='git rev-list trivial path optimization test\n \n    d/z1\n    b0                             b1\n-   o------------------------*----o master\n+   o------------------------*----o main\n   /                        /\n  o---------o----o----o----o side\n  a0        c0   c1   a1   c2\n@@ -55,18 +55,18 @@ test_expect_success 'further setup' '\n \tgit add c &&\n \ttest_tick &&\n \tgit commit -m \"Side makes yet another irrelevant commit\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo Another >b &&\n \techo Munged >d/z &&\n \tgit add b d/z &&\n \ttest_tick &&\n-\tgit commit -m \"Master touches b\" &&\n-\tgit tag master_b0 &&\n+\tgit commit -m \"Main touches b\" &&\n+\tgit tag main_b0 &&\n \tgit merge side &&\n \techo Touched >b &&\n \tgit add b &&\n \ttest_tick &&\n-\tgit commit -m \"Master touches b again\"\n+\tgit commit -m \"Main touches b again\"\n '\n \n test_expect_success 'path optimization 2' '\n@@ -76,13 +76,13 @@ test_expect_success 'path optimization 2' '\n '\n \n test_expect_success 'pathspec with leading path' '\n-\tgit rev-parse master^ master_b0 side_c0 initial >expected &&\n+\tgit rev-parse main^ main_b0 side_c0 initial >expected &&\n \tgit rev-list HEAD -- d >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'pathspec with glob (1)' '\n-\tgit rev-parse master^ master_b0 side_c0 initial >expected &&\n+\tgit rev-parse main^ main_b0 side_c0 initial >expected &&\n \tgit rev-list HEAD -- \"d/*\" >actual &&\n \ttest_cmp expected actual\n '\ndiff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh\nindex 99a1eaf332..8cc54a5a50 100755\n--- a/t/t6006-rev-list-format.sh\n+++ b/t/t6006-rev-list-format.sh\n@@ -53,7 +53,7 @@ test_expect_success 'setup' '\n test_format () {\n \tcat >expect.$1\n \ttest_expect_${3:-success} \"format $1\" \"\n-\t\tgit rev-list --pretty=format:'$2' master >output.$1 &&\n+\t\tgit rev-list --pretty=format:'$2' main >output.$1 &&\n \t\ttest_cmp expect.$1 output.$1\n \t\"\n }\n@@ -184,13 +184,13 @@ test_expect_success 'basic colors' '\n \t<RED>foo<GREEN>bar<BLUE>baz<RESET>xyzzy\n \tEOF\n \tformat=\"%Credfoo%Cgreenbar%Cbluebaz%Cresetxyzzy\" &&\n-\tgit rev-list --color --format=\"$format\" -1 master >actual.raw &&\n+\tgit rev-list --color --format=\"$format\" -1 main >actual.raw &&\n \ttest_decode_color <actual.raw >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success '%S is not a placeholder for rev-list yet' '\n-\tgit rev-list --format=\"%S\" -1 master | grep \"%S\"\n+\tgit rev-list --format=\"%S\" -1 main | grep \"%S\"\n '\n \n test_expect_success 'advanced colors' '\n@@ -199,7 +199,7 @@ test_expect_success 'advanced colors' '\n \t<BOLD;RED;BYELLOW>foo<RESET>\n \tEOF\n \tformat=\"%C(red yellow bold)foo%C(reset)\" &&\n-\tgit rev-list --color --format=\"$format\" -1 master >actual.raw &&\n+\tgit rev-list --color --format=\"$format\" -1 main >actual.raw &&\n \ttest_decode_color <actual.raw >actual &&\n \ttest_cmp expect actual\n '\n@@ -406,7 +406,7 @@ test_expect_success '%x00 shows NUL' '\n \n test_expect_success '%ad respects --date=' '\n \techo 2005-04-07 >expect.ad-short &&\n-\tgit log -1 --date=short --pretty=tformat:%ad >output.ad-short master &&\n+\tgit log -1 --date=short --pretty=tformat:%ad >output.ad-short main &&\n \ttest_cmp expect.ad-short output.ad-short\n '\n \n@@ -494,8 +494,8 @@ test_expect_success '\"%h %gD: %gs\" is same as git-reflog (with --abbrev)' '\n '\n \n test_expect_success '%gd shortens ref name' '\n-\techo \"master@{0}\" >expect.gd-short &&\n-\tgit log -g -1 --format=%gd refs/heads/master >actual.gd-short &&\n+\techo \"main@{0}\" >expect.gd-short &&\n+\tgit log -g -1 --format=%gd refs/heads/main >actual.gd-short &&\n \ttest_cmp expect.gd-short actual.gd-short\n '\n \ndiff --git a/t/t6007-rev-list-cherry-pick-file.sh b/t/t6007-rev-list-cherry-pick-file.sh\nindex f0268372d2..e689959593 100755\n--- a/t/t6007-rev-list-cherry-pick-file.sh\n+++ b/t/t6007-rev-list-cherry-pick-file.sh\n@@ -31,7 +31,7 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m \"E\" &&\n \tgit tag E &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout branch foo &&\n \ttest_tick &&\n \tgit commit -m \"B\" &&\n@@ -233,7 +233,7 @@ test_expect_success '--cherry-pick with independent, but identical branches' '\n \ttest_tick &&\n \tgit commit -m \"independent, too\" foo &&\n \ttest -z \"$(git rev-list --left-right --cherry-pick \\\n-\t\tHEAD...master -- foo)\"\n+\t\tHEAD...main -- foo)\"\n '\n \n cat >expect <<EOF\ndiff --git a/t/t6008-rev-list-submodule.sh b/t/t6008-rev-list-submodule.sh\nindex c4af9ca0a7..39762aa6ff 100755\n--- a/t/t6008-rev-list-submodule.sh\n+++ b/t/t6008-rev-list-submodule.sh\n@@ -36,7 +36,7 @@ test_expect_success 'setup' '\n '\n \n test_expect_success \"Ilari's test\" '\n-\tgit rev-list --objects super master ^super^\n+\tgit rev-list --objects super main ^super^\n '\n \n test_done\ndiff --git a/t/t6009-rev-list-parent.sh b/t/t6009-rev-list-parent.sh\nindex 916d9692bc..7dedceb472 100755\n--- a/t/t6009-rev-list-parent.sh\n+++ b/t/t6009-rev-list-parent.sh\n@@ -45,7 +45,7 @@ test_expect_success 'setup roots, merges and octopuses' '\n \ttest_commit seven &&\n \tgit checkout -b yetanotherbranch four &&\n \ttest_commit eight &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit merge --allow-unrelated-histories -m normalmerge newroot &&\n \tgit tag normalmerge &&\n@@ -56,7 +56,7 @@ test_expect_success 'setup roots, merges and octopuses' '\n \ttest_tick &&\n \tgit merge -m tetrapus sidebranch anotherbranch yetanotherbranch &&\n \tgit tag tetrapus &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'rev-list roots' '\n@@ -123,7 +123,7 @@ test_expect_success 'dodecapus' '\n \t\troots=\"$roots root$i\" ||\n \t\treturn\n \tdone &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit merge -m dodecapus $roots &&\n \tgit tag dodecapus &&\ndiff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh\nindex fd202fcb94..1b5f54a3f5 100755\n--- a/t/t6012-rev-list-simplify.sh\n+++ b/t/t6012-rev-list-simplify.sh\n@@ -43,7 +43,7 @@ test_expect_success setup '\n \tgit add side &&\n \ttest_tick && git commit -m \"Side root\" &&\n \tnote J &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \techo \"Hello\" >file &&\n \techo \"second\" >lost &&\n@@ -65,7 +65,7 @@ test_expect_success setup '\n \tnote D &&\n \n \ttest_tick &&\n-\ttest_must_fail git merge -m \"merge\" master &&\n+\ttest_must_fail git merge -m \"merge\" main &&\n \t>lost && git commit -a -m \"merge\" &&\n \tnote E &&\n \n@@ -74,7 +74,7 @@ test_expect_success setup '\n \ttest_tick && git commit -m \"Irrelevant change\" &&\n \tnote F &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo \"Yet another\" >elif &&\n \tgit add elif &&\n \ttest_tick && git commit -m \"Another irrelevant change\" &&\n@@ -87,7 +87,7 @@ test_expect_success setup '\n \ttest_tick && git commit -a -m \"Final change\" &&\n \tnote I &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick && git merge --allow-unrelated-histories -m \"Coolest\" unrelated &&\n \tnote K &&\n \ndiff --git a/t/t6013-rev-list-reverse-parents.sh b/t/t6013-rev-list-reverse-parents.sh\nindex 89458d370f..e6caf80d7e 100755\n--- a/t/t6013-rev-list-reverse-parents.sh\n+++ b/t/t6013-rev-list-reverse-parents.sh\n@@ -18,24 +18,24 @@ test_expect_success 'set up --reverse example' '\n \tcommit two &&\n \tgit checkout -b side HEAD^ &&\n \tcommit three &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge -s ours side &&\n \tcommit five\n \t'\n \n test_expect_success '--reverse --parents --full-history combines correctly' '\n-\tgit rev-list --parents --full-history master -- foo |\n+\tgit rev-list --parents --full-history main -- foo |\n \t\tperl -e \"print reverse <>\" > expected &&\n-\tgit rev-list --reverse --parents --full-history master -- foo \\\n+\tgit rev-list --reverse --parents --full-history main -- foo \\\n \t\t> actual &&\n \ttest_cmp expected actual\n \t'\n \n test_expect_success '--boundary does too' '\n-\tgit rev-list --boundary --parents --full-history master ^root -- foo |\n+\tgit rev-list --boundary --parents --full-history main ^root -- foo |\n \t\tperl -e \"print reverse <>\" > expected &&\n \tgit rev-list --boundary --reverse --parents --full-history \\\n-\t\tmaster ^root -- foo > actual &&\n+\t\tmain ^root -- foo > actual &&\n \ttest_cmp expected actual\n \t'\n \ndiff --git a/t/t6016-rev-list-graph-simplify-history.sh b/t/t6016-rev-list-graph-simplify-history.sh\nindex f5e6e92f5b..c341e6ecb4 100755\n--- a/t/t6016-rev-list-graph-simplify-history.sh\n+++ b/t/t6016-rev-list-graph-simplify-history.sh\n@@ -14,7 +14,7 @@ test_expect_success 'set up rev-list --graph test' '\n \ttest_commit A1 foo.txt &&\n \ttest_commit A2 bar.txt &&\n \ttest_commit A3 bar.txt &&\n-\tgit branch -m master A &&\n+\tgit branch -m main A &&\n \n \t# 2 commits on branch B, started from A1\n \tgit checkout -b B A1 &&\ndiff --git a/t/t6017-rev-list-stdin.sh b/t/t6017-rev-list-stdin.sh\nindex 667b37564e..6b72f100cb 100755\n--- a/t/t6017-rev-list-stdin.sh\n+++ b/t/t6017-rev-list-stdin.sh\n@@ -40,7 +40,7 @@ test_expect_success setup '\n \t\tdone &&\n \t\tfor i in $them\n \t\tdo\n-\t\t\tgit checkout -b side-$i master~$i &&\n+\t\t\tgit checkout -b side-$i main~$i &&\n \t\t\techo updated $i >file-$i &&\n \t\t\tgit add file-$i &&\n \t\t\ttest_tick &&\n@@ -49,7 +49,7 @@ test_expect_success setup '\n \t)\n '\n \n-check master\n+check main\n check side-1 ^side-4\n check side-1 ^side-7 --\n check side-1 ^side-7 -- file-1\n@@ -66,11 +66,11 @@ test_expect_success 'not only --stdin' '\n \tfile-2\n \tEOF\n \tcat >input <<-EOF &&\n-\t^master^\n+\t^main^\n \t--\n \tfile-2\n \tEOF\n-\tgit log --pretty=tformat:%s --name-only --stdin master -- file-1 \\\n+\tgit log --pretty=tformat:%s --name-only --stdin main -- file-1 \\\n \t\t<input >actual &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t6018-rev-list-glob.sh b/t/t6018-rev-list-glob.sh\nindex fe2f3cec3d..ac030b9a7c 100755\n--- a/t/t6018-rev-list-glob.sh\n+++ b/t/t6018-rev-list-glob.sh\n@@ -20,22 +20,22 @@ compare () {\n \n test_expect_success 'setup' '\n \n-\tcommit master &&\n-\tgit checkout -b subspace/one master &&\n+\tcommit main &&\n+\tgit checkout -b subspace/one main &&\n \tcommit one &&\n-\tgit checkout -b subspace/two master &&\n+\tgit checkout -b subspace/two main &&\n \tcommit two &&\n-\tgit checkout -b subspace-x master &&\n+\tgit checkout -b subspace-x main &&\n \tcommit subspace-x &&\n-\tgit checkout -b other/three master &&\n+\tgit checkout -b other/three main &&\n \tcommit three &&\n-\tgit checkout -b someref master &&\n+\tgit checkout -b someref main &&\n \tcommit some &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcommit topic_2 &&\n-\tgit tag foo/bar master &&\n+\tgit tag foo/bar main &&\n \tcommit topic_3 &&\n-\tgit update-ref refs/remotes/foo/baz master &&\n+\tgit update-ref refs/remotes/foo/baz main &&\n \tcommit topic_4 &&\n \tgit update-ref refs/remotes/upstream/one subspace/one &&\n \tgit update-ref refs/remotes/upstream/two subspace/two &&\n@@ -83,7 +83,7 @@ test_expect_failure 'rev-parse accepts --glob as detached option' '\n \n test_expect_failure 'rev-parse is not confused by option-like glob' '\n \n-\tcompare rev-parse \"master\" \"--glob --symbolic master\"\n+\tcompare rev-parse \"main\" \"--glob --symbolic main\"\n \n '\n \n@@ -111,15 +111,15 @@ test_expect_success 'rev-parse --glob=heads/subspace/* --glob=heads/other/*' '\n \n '\n \n-test_expect_success 'rev-parse --glob=heads/someref/* master' '\n+test_expect_success 'rev-parse --glob=heads/someref/* main' '\n \n-\tcompare rev-parse \"master\" \"--glob=heads/someref/* master\"\n+\tcompare rev-parse \"main\" \"--glob=heads/someref/* main\"\n \n '\n \n test_expect_success 'rev-parse --glob=heads/*' '\n \n-\tcompare rev-parse \"master other/three someref subspace-x subspace/one subspace/two\" \"--glob=heads/*\"\n+\tcompare rev-parse \"main other/three someref subspace-x subspace/one subspace/two\" \"--glob=heads/*\"\n \n '\n \n@@ -136,7 +136,7 @@ test_expect_success 'rev-parse --remotes=foo' '\n '\n \n test_expect_success 'rev-parse --exclude with --branches' '\n-\tcompare rev-parse \"--exclude=*/* --branches\" \"master someref subspace-x\"\n+\tcompare rev-parse \"--exclude=*/* --branches\" \"main someref subspace-x\"\n '\n \n test_expect_success 'rev-parse --exclude with --all' '\n@@ -221,7 +221,7 @@ test_expect_success 'rev-list --glob refs/heads/subspace/*' '\n \n test_expect_success 'rev-list not confused by option-like --glob arg' '\n \n-\tcompare rev-list \"master\" \"--glob -0 master\"\n+\tcompare rev-list \"main\" \"--glob -0 main\"\n \n '\n \n@@ -269,13 +269,13 @@ test_expect_success 'rev-list --branches=subspace' '\n \n test_expect_success 'rev-list --branches' '\n \n-\tcompare rev-list \"master subspace-x someref other/three subspace/one subspace/two\" \"--branches\"\n+\tcompare rev-list \"main subspace-x someref other/three subspace/one subspace/two\" \"--branches\"\n \n '\n \n-test_expect_success 'rev-list --glob=heads/someref/* master' '\n+test_expect_success 'rev-list --glob=heads/someref/* main' '\n \n-\tcompare rev-list \"master\" \"--glob=heads/someref/* master\"\n+\tcompare rev-list \"main\" \"--glob=heads/someref/* main\"\n \n '\n \n@@ -287,7 +287,7 @@ test_expect_success 'rev-list --glob=heads/subspace/* --glob=heads/other/*' '\n \n test_expect_success 'rev-list --glob=heads/*' '\n \n-\tcompare rev-list \"master other/three someref subspace-x subspace/one subspace/two\" \"--glob=heads/*\"\n+\tcompare rev-list \"main other/three someref subspace-x subspace/one subspace/two\" \"--glob=heads/*\"\n \n '\n \n@@ -310,7 +310,7 @@ test_expect_success 'rev-list --remotes=foo' '\n '\n \n test_expect_success 'rev-list --exclude with --branches' '\n-\tcompare rev-list \"--exclude=*/* --branches\" \"master someref subspace-x\"\n+\tcompare rev-list \"--exclude=*/* --branches\" \"main someref subspace-x\"\n '\n \n test_expect_success 'rev-list --exclude with --all' '\n@@ -354,13 +354,13 @@ test_expect_success 'shortlog accepts --glob/--tags/--remotes' '\n \n \tcompare shortlog \"subspace/one subspace/two\" --branches=subspace &&\n \tcompare shortlog \\\n-\t  \"master subspace-x someref other/three subspace/one subspace/two\" \\\n+\t  \"main subspace-x someref other/three subspace/one subspace/two\" \\\n \t  --branches &&\n-\tcompare shortlog master \"--glob=heads/someref/* master\" &&\n+\tcompare shortlog main \"--glob=heads/someref/* main\" &&\n \tcompare shortlog \"subspace/one subspace/two other/three\" \\\n \t  \"--glob=heads/subspace/* --glob=heads/other/*\" &&\n \tcompare shortlog \\\n-\t  \"master other/three someref subspace-x subspace/one subspace/two\" \\\n+\t  \"main other/three someref subspace-x subspace/one subspace/two\" \\\n \t  \"--glob=heads/*\" &&\n \tcompare shortlog foo/bar --tags=foo &&\n \tcompare shortlog \"foo/bar qux/one qux/two qux/x\" --tags &&\n@@ -371,14 +371,14 @@ test_expect_success 'shortlog accepts --glob/--tags/--remotes' '\n test_expect_failure 'shortlog accepts --glob as detached option' '\n \n \tcompare shortlog \\\n-\t  \"master other/three someref subspace-x subspace/one subspace/two\" \\\n+\t  \"main other/three someref subspace-x subspace/one subspace/two\" \\\n \t  \"--glob heads/*\"\n \n '\n \n test_expect_failure 'shortlog --glob is not confused by option-like argument' '\n \n-\tcompare shortlog master \"--glob -e master\"\n+\tcompare shortlog main \"--glob -e main\"\n \n '\n \ndiff --git a/t/t6019-rev-list-ancestry-path.sh b/t/t6019-rev-list-ancestry-path.sh\nindex 353f84313f..c664d66773 100755\n--- a/t/t6019-rev-list-ancestry-path.sh\n+++ b/t/t6019-rev-list-ancestry-path.sh\n@@ -128,15 +128,15 @@ test_expect_success 'setup criss-cross' '\n \t(cd criss-cross &&\n \t git init &&\n \t test_commit A &&\n-\t git checkout -b xb master &&\n+\t git checkout -b xb main &&\n \t test_commit B &&\n-\t git checkout -b xc master &&\n+\t git checkout -b xc main &&\n \t test_commit C &&\n \t git checkout -b xbc xb -- &&\n \t git merge xc &&\n \t git checkout -b xcb xc -- &&\n \t git merge xb &&\n-\t git checkout master)\n+\t git checkout main)\n '\n \n # no commits in bc descend from cb\ndiff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh\nindex aa226381be..386841f7b7 100755\n--- a/t/t6030-bisect-porcelain.sh\n+++ b/t/t6030-bisect-porcelain.sh\n@@ -89,9 +89,9 @@ test_expect_success 'bisect start without -- takes unknown arg as pathspec' '\n \tgrep bar \".git/BISECT_NAMES\"\n '\n \n-test_expect_success 'bisect reset: back in the master branch' '\n+test_expect_success 'bisect reset: back in the main branch' '\n \tgit bisect reset &&\n-\techo \"* master\" > branch.expect &&\n+\techo \"* main\" > branch.expect &&\n \tgit branch > branch.output &&\n \tcmp branch.expect branch.output\n '\n@@ -102,7 +102,7 @@ test_expect_success 'bisect reset: back in another branch' '\n \tgit bisect good $HASH1 &&\n \tgit bisect bad $HASH3 &&\n \tgit bisect reset &&\n-\techo \"  master\" > branch.expect &&\n+\techo \"  main\" > branch.expect &&\n \techo \"* other\" >> branch.expect &&\n \tgit branch > branch.output &&\n \tcmp branch.expect branch.output\n@@ -348,7 +348,7 @@ test_expect_success 'bisect skip many ranges' '\n \n test_expect_success 'bisect starting with a detached HEAD' '\n \tgit bisect reset &&\n-\tgit checkout master^ &&\n+\tgit checkout main^ &&\n \tHEAD=$(git rev-parse --verify HEAD) &&\n \tgit bisect start &&\n \ttest $HEAD = $(cat .git/BISECT_START) &&\n@@ -716,7 +716,7 @@ test_expect_success 'bisect: --no-checkout - target after breakage' '\n test_expect_success 'bisect: demonstrate identification of damage boundary' \"\n \tgit bisect reset &&\n \tgit checkout broken &&\n-\tgit bisect start broken master --no-checkout &&\n+\tgit bisect start broken main --no-checkout &&\n \ttest_must_fail git bisect run \\\"\\$SHELL_PATH\\\" -c '\n \t\tGOOD=\\$(git for-each-ref \\\"--format=%(objectname)\\\" refs/bisect/good-*) &&\n \t\tgit rev-list --objects BISECT_HEAD --not \\$GOOD >tmp.\\$\\$ &&\ndiff --git a/t/t6040-tracking-info.sh b/t/t6040-tracking-info.sh\nindex 50a934e1b2..8ad1390511 100755\n--- a/t/t6040-tracking-info.sh\n+++ b/t/t6040-tracking-info.sh\n@@ -34,7 +34,7 @@ test_expect_success setup '\n \t\tgit branch -d brokenbase &&\n \t\tgit checkout -b b6 origin\n \t) &&\n-\tgit checkout -b follower --track master &&\n+\tgit checkout -b follower --track main &&\n \tadvance h\n '\n \n@@ -58,12 +58,12 @@ test_expect_success 'branch -v' '\n '\n \n cat >expect <<\\EOF\n-b1 [origin/master: ahead 1, behind 1] d\n-b2 [origin/master: ahead 1, behind 1] d\n-b3 [origin/master: behind 1] b\n-b4 [origin/master: ahead 2] f\n+b1 [origin/main: ahead 1, behind 1] d\n+b2 [origin/main: ahead 1, behind 1] d\n+b3 [origin/main: behind 1] b\n+b4 [origin/main: ahead 2] f\n b5 [brokenbase: gone] g\n-b6 [origin/master] c\n+b6 [origin/main] c\n EOF\n \n test_expect_success 'branch -vv' '\n@@ -83,7 +83,7 @@ test_expect_success 'checkout (diverged from upstream)' '\n '\n \n test_expect_success 'checkout with local tracked branch' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout follower >actual &&\n \ttest_i18ngrep \"is ahead of\" actual\n '\n@@ -100,7 +100,7 @@ test_expect_success 'checkout (up-to-date with upstream)' '\n \t(\n \t\tcd test && git checkout b6\n \t) >actual &&\n-\ttest_i18ngrep \"Your branch is up to date with .origin/master\" actual\n+\ttest_i18ngrep \"Your branch is up to date with .origin/main\" actual\n '\n \n test_expect_success 'status (diverged from upstream)' '\n@@ -130,11 +130,11 @@ test_expect_success 'status (up-to-date with upstream)' '\n \t\t# reports nothing to commit\n \t\ttest_must_fail git commit --dry-run\n \t) >actual &&\n-\ttest_i18ngrep \"Your branch is up to date with .origin/master\" actual\n+\ttest_i18ngrep \"Your branch is up to date with .origin/main\" actual\n '\n \n cat >expect <<\\EOF\n-## b1...origin/master [ahead 1, behind 1]\n+## b1...origin/main [ahead 1, behind 1]\n EOF\n \n test_expect_success 'status -s -b (diverged from upstream)' '\n@@ -147,7 +147,7 @@ test_expect_success 'status -s -b (diverged from upstream)' '\n '\n \n cat >expect <<\\EOF\n-## b1...origin/master [different]\n+## b1...origin/main [different]\n EOF\n \n test_expect_success 'status -s -b --no-ahead-behind (diverged from upstream)' '\n@@ -160,7 +160,7 @@ test_expect_success 'status -s -b --no-ahead-behind (diverged from upstream)' '\n '\n \n cat >expect <<\\EOF\n-## b1...origin/master [different]\n+## b1...origin/main [different]\n EOF\n \n test_expect_success 'status.aheadbehind=false status -s -b (diverged from upstream)' '\n@@ -174,7 +174,7 @@ test_expect_success 'status.aheadbehind=false status -s -b (diverged from upstre\n \n cat >expect <<\\EOF\n On branch b1\n-Your branch and 'origin/master' have diverged,\n+Your branch and 'origin/main' have diverged,\n and have 1 and 1 different commits each, respectively.\n EOF\n \n@@ -198,7 +198,7 @@ test_expect_success 'status --long --branch' '\n \n cat >expect <<\\EOF\n On branch b1\n-Your branch and 'origin/master' refer to different commits.\n+Your branch and 'origin/main' refer to different commits.\n EOF\n \n test_expect_success 'status --long --branch --no-ahead-behind' '\n@@ -233,7 +233,7 @@ test_expect_success 'status -s -b (upstream is gone)' '\n '\n \n cat >expect <<\\EOF\n-## b6...origin/master\n+## b6...origin/main\n EOF\n \n test_expect_success 'status -s -b (up-to-date with upstream)' '\n@@ -246,7 +246,7 @@ test_expect_success 'status -s -b (up-to-date with upstream)' '\n '\n \n test_expect_success 'fail to track lightweight tags' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag light &&\n \ttest_must_fail git branch --track lighttrack light >actual &&\n \ttest_i18ngrep ! \"set up to track\" actual &&\n@@ -254,7 +254,7 @@ test_expect_success 'fail to track lightweight tags' '\n '\n \n test_expect_success 'fail to track annotated tags' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag -m heavy heavy &&\n \ttest_must_fail git branch --track heavytrack heavy >actual &&\n \ttest_i18ngrep ! \"set up to track\" actual &&\n@@ -262,17 +262,17 @@ test_expect_success 'fail to track annotated tags' '\n '\n \n test_expect_success '--set-upstream-to does not change branch' '\n-\tgit branch from-master master &&\n-\tgit branch --set-upstream-to master from-master &&\n-\tgit branch from-topic_2 master &&\n+\tgit branch from-main main &&\n+\tgit branch --set-upstream-to main from-main &&\n+\tgit branch from-topic_2 main &&\n \ttest_must_fail git config branch.from-topic_2.merge > actual &&\n \tgit rev-list from-topic_2 &&\n \tgit update-ref refs/heads/from-topic_2 from-topic_2^ &&\n \tgit rev-parse from-topic_2 >expect2 &&\n-\tgit branch --set-upstream-to master from-topic_2 &&\n-\tgit config branch.from-master.merge > actual &&\n+\tgit branch --set-upstream-to main from-topic_2 &&\n+\tgit config branch.from-main.merge > actual &&\n \tgit rev-parse from-topic_2 >actual2 &&\n-\tgrep -q \"^refs/heads/master$\" actual &&\n+\tgrep -q \"^refs/heads/main$\" actual &&\n \tcmp expect2 actual2\n '\n \n@@ -280,11 +280,11 @@ test_expect_success '--set-upstream-to @{-1}' '\n \tgit checkout follower &&\n \tgit checkout from-topic_2 &&\n \tgit config branch.from-topic_2.merge > expect2 &&\n-\tgit branch --set-upstream-to @{-1} from-master &&\n-\tgit config branch.from-master.merge > actual &&\n+\tgit branch --set-upstream-to @{-1} from-main &&\n+\tgit config branch.from-main.merge > actual &&\n \tgit config branch.from-topic_2.merge > actual2 &&\n-\tgit branch --set-upstream-to follower from-master &&\n-\tgit config branch.from-master.merge > expect &&\n+\tgit branch --set-upstream-to follower from-main &&\n+\tgit config branch.from-main.merge > expect &&\n \ttest_cmp expect2 actual2 &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t6050-replace.sh b/t/t6050-replace.sh\nindex c80dc10b8f..56cf4ceb90 100755\n--- a/t/t6050-replace.sh\n+++ b/t/t6050-replace.sh\n@@ -133,9 +133,9 @@ test_expect_success 'tag replaced commit' '\n '\n \n test_expect_success '\"git fsck\" works' '\n-     git fsck master >fsck_master.out &&\n-     test_i18ngrep \"dangling commit $R\" fsck_master.out &&\n-     test_i18ngrep \"dangling tag $(git show-ref -s refs/tags/mytag)\" fsck_master.out &&\n+     git fsck main >fsck_main.out &&\n+     test_i18ngrep \"dangling commit $R\" fsck_main.out &&\n+     test_i18ngrep \"dangling tag $(git show-ref -s refs/tags/mytag)\" fsck_main.out &&\n      test -z \"$(git fsck)\"\n '\n \n@@ -218,7 +218,7 @@ test_expect_success 'create parallel branch without the bug' '\n      git cherry-pick $HASH6 &&\n      PARA6=$(git rev-parse --verify HEAD) &&\n      git replace $HASH6 $PARA6 &&\n-     git checkout master &&\n+     git checkout main &&\n      cur=$(git rev-parse --verify HEAD) &&\n      test \"$cur\" = \"$HASH7\" &&\n      git log --pretty=oneline | grep $PARA2 &&\n@@ -461,7 +461,7 @@ test_expect_success GPG 'set up a merge commit with a mergetag' '\n \tgit commit -m \"hello: 2 more lines from a test branch\" &&\n \tHASH9=$(git rev-parse --verify HEAD) &&\n \tgit tag -s -m \"tag for testing with a mergetag\" test_tag HEAD &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge -s ours test_tag &&\n \tHASH10=$(git rev-parse --verify HEAD) &&\n \tgit cat-file commit $HASH10 | grep \"^mergetag object\"\ndiff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh\nindex 7531262a5e..288a75c02b 100755\n--- a/t/t6101-rev-parse-parents.sh\n+++ b/t/t6101-rev-parse-parents.sh\n@@ -18,7 +18,7 @@ test_expect_success 'setup' '\n \ttest_commit second &&\n \tgit checkout --orphan tmp &&\n \ttest_commit start2 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge -m next --allow-unrelated-histories start2 &&\n \ttest_commit final &&\n \ndiff --git a/t/t6110-rev-list-sparse.sh b/t/t6110-rev-list-sparse.sh\nindex 656ac7fe9d..093536fd85 100755\n--- a/t/t6110-rev-list-sparse.sh\n+++ b/t/t6110-rev-list-sparse.sh\n@@ -10,7 +10,7 @@ test_expect_success setup '\n \tgit checkout -b side HEAD^ &&\n \ttest_commit D &&\n \ttest_commit E &&\n-\tgit merge master\n+\tgit merge main\n '\n \n test_expect_success 'rev-list --first-parent --boundary' '\ndiff --git a/t/t6111-rev-list-treesame.sh b/t/t6111-rev-list-treesame.sh\nindex 4244638285..90c8630e34 100755\n--- a/t/t6111-rev-list-treesame.sh\n+++ b/t/t6111-rev-list-treesame.sh\n@@ -33,13 +33,13 @@ test_expect_success setup '\n \tgit checkout other-branch &&\n \ttest_commit \"Added other\" other \"Hello\" C &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_merge D other-branch &&\n \n \tgit checkout third-branch &&\n \ttest_commit \"Third file\" third \"Nothing\" E &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit \"file=Blah\" file \"Blah\" F &&\n \n \ttest_tick && git merge --no-commit third-branch &&\n@@ -56,7 +56,7 @@ test_expect_success setup '\n \n \ttest_tick && git revert I && note J &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick && git merge --no-ff fiddler-branch &&\n \tnote K &&\n \ndiff --git a/t/t6112-rev-list-filters-objects.sh b/t/t6112-rev-list-filters-objects.sh\nindex de0e5a5d36..c6729320ea 100755\n--- a/t/t6112-rev-list-filters-objects.sh\n+++ b/t/t6112-rev-list-filters-objects.sh\n@@ -223,7 +223,7 @@ test_expect_success 'verify sparse:oid=oid-ish omits top-level files' '\n \tsort >expected &&\n \n \tgit -C r3 rev-list --quiet --objects --filter-print-omitted \\\n-\t\t--filter=sparse:oid=master:pattern HEAD >revs &&\n+\t\t--filter=sparse:oid=main:pattern HEAD >revs &&\n \tawk -f print_1.awk revs |\n \tsed \"s/~//\" |\n \tsort >observed &&\n@@ -436,7 +436,7 @@ test_expect_success 'add sparse pattern blobs whose paths have reserved chars' '\n \n test_expect_success 'combine:... with more than two sub-filters' '\n \tgit -C r3 rev-list --objects \\\n-\t\t--filter=combine:tree:3+blob:limit=40+sparse:oid=master:pattern \\\n+\t\t--filter=combine:tree:3+blob:limit=40+sparse:oid=main:pattern \\\n \t\tHEAD >actual &&\n \n \texpect_has HEAD \"\" &&\n@@ -454,7 +454,7 @@ test_expect_success 'combine:... with more than two sub-filters' '\n \tcp actual expect &&\n \n \tgit -C r3 rev-list --objects \\\n-\t\t--filter=combine:tree:3+blob:limit=40+sparse:oid=master:pattern1%2brenamed%25 \\\n+\t\t--filter=combine:tree:3+blob:limit=40+sparse:oid=main:pattern1%2brenamed%25 \\\n \t\tHEAD >actual &&\n \ttest_cmp expect actual &&\n \n@@ -464,23 +464,23 @@ test_expect_success 'combine:... with more than two sub-filters' '\n \ttest_when_finished \"rm -f trace1\" &&\n \tGIT_TRACE=$(pwd)/trace1 git -C r3 rev-list --objects \\\n \t\t--filter=tree:3 --filter=blob:limit=40 \\\n-\t\t--filter=sparse:oid=\"master:p;at%ter+n\" \\\n+\t\t--filter=sparse:oid=\"main:p;at%ter+n\" \\\n \t\tHEAD >actual &&\n \n \ttest_cmp expect actual &&\n-\tgrep \"Add to combine filter-spec: sparse:oid=master:p%3bat%25ter%2bn\" \\\n+\tgrep \"Add to combine filter-spec: sparse:oid=main:p%3bat%25ter%2bn\" \\\n \t\ttrace1 &&\n \n \t# Repeat the above test, but this time, the characters to encode are in\n \t# the LHS of the combined filter.\n \ttest_when_finished \"rm -f trace2\" &&\n \tGIT_TRACE=$(pwd)/trace2 git -C r3 rev-list --objects \\\n-\t\t--filter=sparse:oid=master:^~pattern \\\n+\t\t--filter=sparse:oid=main:^~pattern \\\n \t\t--filter=tree:3 --filter=blob:limit=40 \\\n \t\tHEAD >actual &&\n \n \ttest_cmp expect actual &&\n-\tgrep \"Add to combine filter-spec: sparse:oid=master:%5e%7epattern\" \\\n+\tgrep \"Add to combine filter-spec: sparse:oid=main:%5e%7epattern\" \\\n \t\ttrace2\n '\n \ndiff --git a/t/t6120-describe.sh b/t/t6120-describe.sh\nindex f822d5d328..53617c9da9 100755\n--- a/t/t6120-describe.sh\n+++ b/t/t6120-describe.sh\n@@ -102,7 +102,7 @@ check_describe c-* --tags HEAD^^2\n check_describe B --tags HEAD^^2^\n check_describe e --tags HEAD^^^\n \n-check_describe heads/master --all HEAD\n+check_describe heads/main --all HEAD\n check_describe tags/c-* --all HEAD^\n check_describe tags/e --all HEAD^^^\n \n@@ -403,15 +403,15 @@ test_expect_success ULIMIT_STACK_SIZE 'name-rev works in a deep repo' '\n \ti=1 &&\n \twhile test $i -lt 8000\n \tdo\n-\t\techo \"commit refs/heads/master\n+\t\techo \"commit refs/heads/main\n committer A U Thor <author@example.com> $((1000000000 + $i * 100)) +0200\n data <<EOF\n commit #$i\n EOF\"\n-\t\ttest $i = 1 && echo \"from refs/heads/master^0\"\n+\t\ttest $i = 1 && echo \"from refs/heads/main^0\"\n \t\ti=$(($i + 1))\n \tdone | git fast-import &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag far-far-away HEAD^ &&\n \techo \"HEAD~4000 tags/far-far-away~3999\" >expect &&\n \tgit name-rev HEAD~4000 >actual &&\n@@ -442,7 +442,7 @@ test_expect_success 'describe complains about missing object' '\n '\n \n test_expect_success 'name-rev a rev shortly after epoch' '\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \n \tgit checkout --orphan no-timestamp-underflow &&\n \t# Any date closer to epoch than the CUTOFF_DATE_SLOP constant\n@@ -456,7 +456,7 @@ test_expect_success 'name-rev a rev shortly after epoch' '\n \ttest_cmp expect actual\n '\n \n-# A--------------master\n+# A--------------main\n #  \\            /\n #   \\----------M2\n #    \\        /\n@@ -487,10 +487,10 @@ test_expect_success 'name-rev covers all conditions while looking at parents' '\n \t\tgit checkout $A &&\n \t\tgit merge --no-ff HEAD@{1} && # M2\n \n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit merge --no-ff HEAD@{1} &&\n \n-\t\techo \"$B master^2^2~1^2\" >expect &&\n+\t\techo \"$B main^2^2~1^2\" >expect &&\n \t\tgit name-rev $B >actual &&\n \n \t\ttest_cmp expect actual\n@@ -516,7 +516,7 @@ test_expect_success 'describe commits with disjoint bases' '\n \t\tgit checkout --orphan branch && rm file &&\n \t\techo B > file2 && git add file2 && git commit -m B &&\n \t\tgit tag B -a -m B &&\n-\t\tgit merge --no-ff --allow-unrelated-histories master -m x &&\n+\t\tgit merge --no-ff --allow-unrelated-histories main -m x &&\n \n \t\tcheck_describe \"A-3-*\" HEAD\n \t)\n@@ -542,7 +542,7 @@ test_expect_success 'describe commits with disjoint bases 2' '\n \t\techo o >> file2 && git add file2 && GIT_COMMITTER_DATE=\"2020-01-01 15:01\" git commit -m o &&\n \t\techo B >> file2 && git add file2 && GIT_COMMITTER_DATE=\"2020-01-01 15:02\" git commit -m B &&\n \t\tgit tag B -a -m B &&\n-\t\tgit merge --no-ff --allow-unrelated-histories master -m x &&\n+\t\tgit merge --no-ff --allow-unrelated-histories main -m x &&\n \n \t\tcheck_describe \"B-3-*\" HEAD\n \t)\ndiff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh\nindex f3e66eaf9b..8be07ce902 100755\n--- a/t/t6200-fmt-merge-msg.sh\n+++ b/t/t6200-fmt-merge-msg.sh\n@@ -81,7 +81,7 @@ test_expect_success GPG 'set up a signed tag' '\n test_expect_success 'message for merging local branch' '\n \techo \"Merge branch ${apos}left${apos}\" >expected &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch . left &&\n \n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n@@ -89,7 +89,7 @@ test_expect_success 'message for merging local branch' '\n '\n \n test_expect_success GPG 'message for merging local tag signed by good key' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch . signed-good-tag &&\n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&\n \tgrep \"^Merge tag ${apos}signed-good-tag${apos}\" actual &&\n@@ -98,7 +98,7 @@ test_expect_success GPG 'message for merging local tag signed by good key' '\n '\n \n test_expect_success GPG 'message for merging local tag signed by unknown key' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch . signed-good-tag &&\n \tGNUPGHOME=. git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&\n \tgrep \"^Merge tag ${apos}signed-good-tag${apos}\" actual &&\n@@ -109,7 +109,7 @@ test_expect_success GPG 'message for merging local tag signed by unknown key' '\n test_expect_success 'message for merging external branch' '\n \techo \"Merge branch ${apos}left${apos} of $(pwd)\" >expected &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch \"$(pwd)\" left &&\n \n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n@@ -133,7 +133,7 @@ test_expect_success '[merge] summary/log configuration' '\n \ttest_config merge.log true &&\n \ttest_unconfig merge.summary &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left &&\n \n@@ -142,7 +142,7 @@ test_expect_success '[merge] summary/log configuration' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary true &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left &&\n \n@@ -153,7 +153,7 @@ test_expect_success '[merge] summary/log configuration' '\n '\n \n test_expect_success 'setup FETCH_HEAD' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left\n '\n@@ -281,7 +281,7 @@ test_expect_success 'fmt-merge-msg -m' '\n \n \ttest_unconfig merge.log &&\n \ttest_unconfig merge.summary &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch \"$(pwd)\" left &&\n \tgit fmt-merge-msg -m \"Sync with left\" <.git/FETCH_HEAD >actual &&\n \tgit fmt-merge-msg --log -m \"Sync with left\" \\\n@@ -323,28 +323,28 @@ test_expect_success 'setup: expected shortlog for two branches' '\n test_expect_success 'shortlog for two branches' '\n \ttest_config merge.log true &&\n \ttest_unconfig merge.summary &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual1 &&\n \n \ttest_unconfig merge.log &&\n \ttest_config merge.summary true &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual2 &&\n \n \ttest_config merge.log yes &&\n \ttest_unconfig merge.summary &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual3 &&\n \n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual4 &&\n@@ -358,7 +358,7 @@ test_expect_success 'shortlog for two branches' '\n test_expect_success 'merge-msg -F' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tgit fmt-merge-msg -F .git/FETCH_HEAD >actual &&\n@@ -368,7 +368,7 @@ test_expect_success 'merge-msg -F' '\n test_expect_success 'merge-msg -F in subdirectory' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tmkdir sub &&\n@@ -408,7 +408,7 @@ test_expect_success 'merge-msg tag' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . tag tag-r3 &&\n \n@@ -438,7 +438,7 @@ test_expect_success 'merge-msg two tags' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . tag tag-r3 tag tag-l5 &&\n \n@@ -468,7 +468,7 @@ test_expect_success 'merge-msg tag and branch' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . tag tag-r3 left &&\n \n@@ -495,7 +495,7 @@ test_expect_success 'merge-msg lots of commits' '\n \n \ttest_config merge.summary yes &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . long &&\n \n@@ -506,11 +506,11 @@ test_expect_success 'merge-msg lots of commits' '\n test_expect_success 'merge-msg with \"merging\" an annotated tag' '\n \ttest_config merge.log true &&\n \n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit commit --allow-empty -m \"One step ahead\" &&\n \tgit tag -a -m \"An annotated one\" annote HEAD &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch . annote &&\n \n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n@@ -543,23 +543,23 @@ test_expect_success 'merge-msg with \"merging\" an annotated tag' '\n '\n \n test_expect_success 'merge.suppressDest configuration' '\n-\tgit checkout -B side master &&\n+\tgit checkout -B side main &&\n \tgit commit --allow-empty -m \"One step ahead\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch . side &&\n \n \tgit -c merge.suppressDest=\"\" fmt-merge-msg <.git/FETCH_HEAD >full.1 &&\n \thead -n1 full.1 >actual &&\n-\tgrep -e \"Merge branch .side. into master\" actual &&\n+\tgrep -e \"Merge branch .side. into main\" actual &&\n \n \tgit -c merge.suppressDest=\"mast\" fmt-merge-msg <.git/FETCH_HEAD >full.2 &&\n \thead -n1 full.2 >actual &&\n-\tgrep -e \"Merge branch .side. into master$\" actual &&\n+\tgrep -e \"Merge branch .side. into main$\" actual &&\n \n \tgit -c merge.suppressDest=\"ma?*[rn]\" fmt-merge-msg <.git/FETCH_HEAD >full.3 &&\n \thead -n1 full.3 >actual &&\n \tgrep -e \"Merge branch .side.\" actual &&\n-\t! grep -e \" into master$\" actual\n+\t! grep -e \" into main$\" actual\n '\n \n test_done\ndiff --git a/t/t6302-for-each-ref-filter.sh b/t/t6302-for-each-ref-filter.sh\nindex 0a21669f56..f5a55c1991 100755\n--- a/t/t6302-for-each-ref-filter.sh\n+++ b/t/t6302-for-each-ref-filter.sh\n@@ -26,17 +26,17 @@ test_expect_success 'setup some history and refs' '\n \tgit tag $sign -m \"A signed tag\" signed-tag &&\n \tgit tag $sign -m \"Signed doubly\" doubly-signed-tag signed-tag &&\n \n-\tgit checkout master &&\n-\tgit update-ref refs/odd/spot master\n+\tgit checkout main &&\n+\tgit update-ref refs/odd/spot main\n '\n \n test_expect_success 'filtering with --points-at' '\n \tcat >expect <<-\\EOF &&\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/odd/spot\n \trefs/tags/three\n \tEOF\n-\tgit for-each-ref --format=\"%(refname)\" --points-at=master >actual &&\n+\tgit for-each-ref --format=\"%(refname)\" --points-at=main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -53,13 +53,13 @@ test_expect_success 'check signed tags with --points-at' '\n \n test_expect_success 'filtering with --merged' '\n \tcat >expect <<-\\EOF &&\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/odd/spot\n \trefs/tags/one\n \trefs/tags/three\n \trefs/tags/two\n \tEOF\n-\tgit for-each-ref --format=\"%(refname)\" --merged=master >actual &&\n+\tgit for-each-ref --format=\"%(refname)\" --merged=main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -72,13 +72,13 @@ test_expect_success 'filtering with --no-merged' '\n \trefs/tags/four\n \trefs/tags/signed-tag\n \tEOF\n-\tgit for-each-ref --format=\"%(refname)\" --no-merged=master >actual &&\n+\tgit for-each-ref --format=\"%(refname)\" --no-merged=main >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'filtering with --contains' '\n \tcat >expect <<-\\EOF &&\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/heads/side\n \trefs/odd/spot\n \trefs/tags/annotated-tag\n@@ -251,7 +251,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'nested alignment with quote formatt\n \n test_expect_success 'check `%(contents:lines=1)`' '\n \tcat >expect <<-\\EOF &&\n-\tmaster |three\n+\tmain |three\n \tside |four\n \todd/spot |three\n \tannotated-tag |An annotated tag\n@@ -269,7 +269,7 @@ test_expect_success 'check `%(contents:lines=1)`' '\n \n test_expect_success 'check `%(contents:lines=0)`' '\n \tcat >expect <<-\\EOF &&\n-\tmaster |\n+\tmain |\n \tside |\n \todd/spot |\n \tannotated-tag |\n@@ -287,7 +287,7 @@ test_expect_success 'check `%(contents:lines=0)`' '\n \n test_expect_success 'check `%(contents:lines=99999)`' '\n \tcat >expect <<-\\EOF &&\n-\tmaster |three\n+\tmain |three\n \tside |four\n \todd/spot |three\n \tannotated-tag |An annotated tag\n@@ -360,7 +360,7 @@ test_expect_success 'improper usage of %(if), %(then), %(else) and %(end) atoms'\n test_expect_success 'check %(if)...%(then)...%(end) atoms' '\n \tgit for-each-ref --format=\"%(refname)%(if)%(authorname)%(then) Author: %(authorname)%(end)\" >actual &&\n \tcat >expect <<-\\EOF &&\n-\trefs/heads/master Author: A U Thor\n+\trefs/heads/main Author: A U Thor\n \trefs/heads/side Author: A U Thor\n \trefs/odd/spot Author: A U Thor\n \trefs/tags/annotated-tag\n@@ -381,7 +381,7 @@ test_expect_success 'check %(if)...%(then)...%(end) atoms' '\n test_expect_success 'check %(if)...%(then)...%(else)...%(end) atoms' '\n \tgit for-each-ref --format=\"%(if)%(authorname)%(then)%(authorname)%(else)No author%(end): %(refname)\" >actual &&\n \tcat >expect <<-\\EOF &&\n-\tA U Thor: refs/heads/master\n+\tA U Thor: refs/heads/main\n \tA U Thor: refs/heads/side\n \tA U Thor: refs/odd/spot\n \tNo author: refs/tags/annotated-tag\n@@ -401,7 +401,7 @@ test_expect_success 'check %(if)...%(then)...%(else)...%(end) atoms' '\n test_expect_success 'ignore spaces in %(if) atom usage' '\n \tgit for-each-ref --format=\"%(refname:short): %(if)%(HEAD)%(then)Head ref%(else)Not Head ref%(end)\" >actual &&\n \tcat >expect <<-\\EOF &&\n-\tmaster: Head ref\n+\tmain: Head ref\n \tside: Not Head ref\n \todd/spot: Not Head ref\n \tannotated-tag: Not Head ref\n@@ -420,19 +420,19 @@ test_expect_success 'ignore spaces in %(if) atom usage' '\n '\n \n test_expect_success 'check %(if:equals=<string>)' '\n-\tgit for-each-ref --format=\"%(if:equals=master)%(refname:short)%(then)Found master%(else)Not master%(end)\" refs/heads/ >actual &&\n+\tgit for-each-ref --format=\"%(if:equals=main)%(refname:short)%(then)Found main%(else)Not main%(end)\" refs/heads/ >actual &&\n \tcat >expect <<-\\EOF &&\n-\tFound master\n-\tNot master\n+\tFound main\n+\tNot main\n \tEOF\n \ttest_cmp expect actual\n '\n \n test_expect_success 'check %(if:notequals=<string>)' '\n-\tgit for-each-ref --format=\"%(if:notequals=master)%(refname:short)%(then)Not master%(else)Found master%(end)\" refs/heads/ >actual &&\n+\tgit for-each-ref --format=\"%(if:notequals=main)%(refname:short)%(then)Not main%(else)Found main%(end)\" refs/heads/ >actual &&\n \tcat >expect <<-\\EOF &&\n-\tFound master\n-\tNot master\n+\tFound main\n+\tNot main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -443,11 +443,11 @@ test_expect_success '--merged is compatible with --no-merged' '\n \n test_expect_success 'validate worktree atom' '\n \tcat >expect <<-EOF &&\n-\tmaster: $(pwd)\n-\tmaster_worktree: $(pwd)/worktree_dir\n+\tmain: $(pwd)\n+\tmain_worktree: $(pwd)/worktree_dir\n \tside: not checked out\n \tEOF\n-\tgit worktree add -b master_worktree worktree_dir master &&\n+\tgit worktree add -b main_worktree worktree_dir main &&\n \tgit for-each-ref --format=\"%(refname:short): %(if)%(worktreepath)%(then)%(worktreepath)%(else)not checked out%(end)\" refs/heads/ >actual &&\n \trm -r worktree_dir &&\n \tgit worktree prune &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 11e02d615a..255eb24e5d 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,13 +257,13 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-3404|4013|5310|5526)\n+3404|4013|5310|5526|6300)\n \t# Avoid conflicts with patch series that are cooking at the same time\n \t# as the patch series changing the default of `init.defaultBranch`.\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-5]*)\n+[0-5]*|6[0-3]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410111","messageId":"f9c30dc516e8462d7b653484dd6d91421162ace8.1605629549.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 20/27] t7[0-4]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:20Z","receivedAt":"2020-11-17T16:13:07Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t7064, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in\nt7[0-4]*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t7[0-4]*.sh &&\n\t   git checkout HEAD -- t7064\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t7003-filter-branch.sh                |  40 ++++-----\n t/t7004-tag.sh                          |   8 +-\n t/t7030-verify-tag.sh                   |   2 +-\n t/t7060-wtstatus.sh                     |  26 +++---\n t/t7063-status-untracked-cache.sh       |  14 +--\n t/t7102-reset.sh                        |   6 +-\n t/t7113-post-index-change-hook.sh       |   2 +-\n t/t7201-co.sh                           | 110 ++++++++++++------------\n t/t7400-submodule-basic.sh              |  20 ++---\n t/t7403-submodule-sync.sh               |  10 +--\n t/t7406-submodule-update.sh             |  38 ++++----\n t/t7407-submodule-foreach.sh            |  24 +++---\n t/t7409-submodule-detached-work-tree.sh |   8 +-\n t/t7417-submodule-path-url.sh           |   2 +-\n t/test-lib.sh                           |   4 +-\n 15 files changed, 157 insertions(+), 157 deletions(-)\n\ndiff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh\nindex 36477cb1f4..e8df682c8d 100755\n--- a/t/t7003-filter-branch.sh\n+++ b/t/t7003-filter-branch.sh\n@@ -13,7 +13,7 @@ test_expect_success 'setup' '\n \tmkdir dir &&\n \ttest_commit dir/D &&\n \ttest_commit E &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit C &&\n \tgit checkout branch &&\n \tgit merge C &&\n@@ -25,7 +25,7 @@ test_expect_success 'setup' '\n # * G\n # *   Merge commit 'C' into branch\n # |\\\n-# | * (master) C\n+# | * (main) C\n # * | E\n # * | dir/D\n # * | D\n@@ -162,15 +162,15 @@ test_expect_success 'subdirectory filter result looks okay' '\n '\n \n test_expect_success 'more setup' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tmkdir subdir &&\n \techo A > subdir/new &&\n \tgit add subdir/new &&\n \ttest_tick &&\n-\tgit commit -m \"subdir on master\" subdir/new &&\n+\tgit commit -m \"subdir on main\" subdir/new &&\n \tgit rm A.t &&\n \ttest_tick &&\n-\tgit commit -m \"again subdir on master\" &&\n+\tgit commit -m \"again subdir on main\" &&\n \tgit merge branch\n '\n \n@@ -199,7 +199,7 @@ test_expect_success 'author information is preserved' '\n \tgit branch preserved-author &&\n \t(sane_unset GIT_AUTHOR_NAME &&\n \t git filter-branch -f --msg-filter \"cat; \\\n-\t\t\ttest \\$GIT_COMMIT != $(git rev-parse master) || \\\n+\t\t\ttest \\$GIT_COMMIT != $(git rev-parse main) || \\\n \t\t\techo Hallo\" \\\n \t\tpreserved-author) &&\n \tgit rev-list --author=\"B V Uips\" preserved-author >actual &&\n@@ -218,7 +218,7 @@ test_expect_success \"remove a certain author's commits\" '\n \t\telse\\\n \t\t\tgit commit-tree \\\"\\$@\\\";\\\n \t\tfi\" removed-author &&\n-\tcnt1=$(git rev-list master | wc -l) &&\n+\tcnt1=$(git rev-list main | wc -l) &&\n \tcnt2=$(git rev-list removed-author | wc -l) &&\n \ttest $cnt1 -eq $(($cnt2 + 1)) &&\n \tgit rev-list --author=\"B V Uips\" removed-author >actual &&\n@@ -226,7 +226,7 @@ test_expect_success \"remove a certain author's commits\" '\n '\n \n test_expect_success 'barf on invalid name' '\n-\ttest_must_fail git filter-branch -f master xy-problem &&\n+\ttest_must_fail git filter-branch -f main xy-problem &&\n \ttest_must_fail git filter-branch -f HEAD^\n '\n \n@@ -236,8 +236,8 @@ test_expect_success '\"map\" works in commit filter' '\n \t\tmapped=\\$(map \\$parent) &&\n \t\tactual=\\$(echo \\\"\\$@\\\" | sed \\\"s/^.*-p //\\\") &&\n \t\ttest \\$mapped = \\$actual &&\n-\t\tgit commit-tree \\\"\\$@\\\";\" master~2..master &&\n-\tgit rev-parse --verify master\n+\t\tgit commit-tree \\\"\\$@\\\";\" main~2..main &&\n+\tgit rev-parse --verify main\n '\n \n test_expect_success 'Name needing quotes' '\n@@ -256,7 +256,7 @@ test_expect_success 'Name needing quotes' '\n \n test_expect_success 'Subdirectory filter with disappearing trees' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tmkdir foo &&\n \ttouch foo/bar &&\n@@ -275,7 +275,7 @@ test_expect_success 'Subdirectory filter with disappearing trees' '\n \tgit commit -m \"Re-adding foo\" &&\n \n \tgit filter-branch -f --subdirectory-filter foo &&\n-\tgit rev-list master >actual &&\n+\tgit rev-list main >actual &&\n \ttest_line_count = 3 actual\n '\n \n@@ -332,7 +332,7 @@ test_expect_success 'Tag name filtering allows slashes in tag names' '\n \ttest_cmp expect actual\n '\n test_expect_success 'setup --prune-empty comparisons' '\n-\tgit checkout --orphan master-no-a &&\n+\tgit checkout --orphan main-no-a &&\n \tgit rm -rf . &&\n \tunset test_tick &&\n \ttest_tick &&\n@@ -343,7 +343,7 @@ test_expect_success 'setup --prune-empty comparisons' '\n \tmkdir dir &&\n \ttest_commit dir/D dir/D.t dir/D dir/Dx &&\n \ttest_commit E E.t E Ex &&\n-\tgit checkout master-no-a &&\n+\tgit checkout main-no-a &&\n \ttest_commit C C.t C Cx &&\n \tgit checkout branch-no-a &&\n \tgit merge Cx -m \"Merge tag '\\''C'\\'' into branch\" &&\n@@ -397,7 +397,7 @@ test_expect_success '--prune-empty is able to prune entire branch' '\n '\n \n test_expect_success '--remap-to-ancestor with filename filters' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard A &&\n \ttest_commit add-foo foo 1 &&\n \tgit branch moved-foo &&\n@@ -407,15 +407,15 @@ test_expect_success '--remap-to-ancestor with filename filters' '\n \tgit branch moved-bar &&\n \ttest_commit change-foo foo 2 &&\n \tgit filter-branch -f --remap-to-ancestor \\\n-\t\tmoved-foo moved-bar A..master \\\n+\t\tmoved-foo moved-bar A..main \\\n \t\t-- -- foo &&\n \ttest $(git rev-parse moved-foo) = $(git rev-parse moved-bar) &&\n-\ttest $(git rev-parse moved-foo) = $(git rev-parse master^) &&\n+\ttest $(git rev-parse moved-foo) = $(git rev-parse main^) &&\n \ttest $orig_invariant = $(git rev-parse invariant)\n '\n \n test_expect_success 'automatic remapping to ancestor with filename filters' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard A &&\n \ttest_commit add-foo2 foo 1 &&\n \tgit branch moved-foo2 &&\n@@ -425,10 +425,10 @@ test_expect_success 'automatic remapping to ancestor with filename filters' '\n \tgit branch moved-bar2 &&\n \ttest_commit change-foo2 foo 2 &&\n \tgit filter-branch -f \\\n-\t\tmoved-foo2 moved-bar2 A..master \\\n+\t\tmoved-foo2 moved-bar2 A..main \\\n \t\t-- -- foo &&\n \ttest $(git rev-parse moved-foo2) = $(git rev-parse moved-bar2) &&\n-\ttest $(git rev-parse moved-foo2) = $(git rev-parse master^) &&\n+\ttest $(git rev-parse moved-foo2) = $(git rev-parse main^) &&\n \ttest $orig_invariant = $(git rev-parse invariant2)\n '\n \ndiff --git a/t/t7004-tag.sh b/t/t7004-tag.sh\nindex 05f411c821..630fcde90b 100755\n--- a/t/t7004-tag.sh\n+++ b/t/t7004-tag.sh\n@@ -1583,7 +1583,7 @@ test_expect_success 'checking that branch head with --no-contains lists all but\n \"\n \n test_expect_success 'merging original branch into this branch' '\n-\tgit merge --strategy=ours master &&\n+\tgit merge --strategy=ours main &&\n         git tag v4.0\n '\n \n@@ -1944,15 +1944,15 @@ test_expect_success ULIMIT_STACK_SIZE '--contains and --no-contains work in a de\n \ti=1 &&\n \twhile test $i -lt 8000\n \tdo\n-\t\techo \"commit refs/heads/master\n+\t\techo \"commit refs/heads/main\n committer A U Thor <author@example.com> $((1000000000 + $i * 100)) +0200\n data <<EOF\n commit #$i\n EOF\"\n-\t\ttest $i = 1 && echo \"from refs/heads/master^0\"\n+\t\ttest $i = 1 && echo \"from refs/heads/main^0\"\n \t\ti=$(($i + 1))\n \tdone | git fast-import &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag far-far-away HEAD^ &&\n \trun_with_limited_stack git tag --contains HEAD >actual &&\n \ttest_must_be_empty actual &&\ndiff --git a/t/t7030-verify-tag.sh b/t/t7030-verify-tag.sh\nindex 5c5bc32ccb..7a70df79a2 100755\n--- a/t/t7030-verify-tag.sh\n+++ b/t/t7030-verify-tag.sh\n@@ -17,7 +17,7 @@ test_expect_success GPG 'create signed tags' '\n \techo 3 >elif && git add elif &&\n \ttest_tick && git commit -m \"third on side\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick && git merge -S side &&\n \tgit tag -s -m merge merge &&\n \ndiff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh\nindex d5218743e9..cb4e104e4b 100755\n--- a/t/t7060-wtstatus.sh\n+++ b/t/t7060-wtstatus.sh\n@@ -51,7 +51,7 @@ EOF\n \t\tgit checkout -b side HEAD^ &&\n \t\tgit rm foo &&\n \t\tgit commit -m delete &&\n-\t\ttest_must_fail git merge master &&\n+\t\ttest_must_fail git merge main &&\n \t\ttest_must_fail git commit --dry-run >../actual &&\n \t\ttest_i18ncmp ../expect ../actual &&\n \t\tgit status >../actual &&\n@@ -124,18 +124,18 @@ test_expect_success 'git diff-index --cached -C shows 2 copies + 1 unmerged' '\n \n test_expect_success 'status when conflicts with add and rm advice (deleted by them)' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit init main.txt init &&\n \tgit checkout -b second_branch &&\n \tgit rm main.txt &&\n \tgit commit -m \"main.txt deleted on second_branch\" &&\n \ttest_commit second conflict.txt second &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit on_second main.txt on_second &&\n-\ttest_commit master conflict.txt master &&\n+\ttest_commit main conflict.txt main &&\n \ttest_must_fail git merge second_branch &&\n \tcat >expected <<\\EOF &&\n-On branch master\n+On branch main\n You have unmerged paths.\n   (fix conflicts and run \"git commit\")\n   (use \"git merge --abort\" to abort the merge)\n@@ -157,8 +157,8 @@ test_expect_success 'prepare for conflicts' '\n \tgit checkout -b conflict &&\n \ttest_commit one main.txt one &&\n \tgit branch conflict_second &&\n-\tgit mv main.txt sub_master.txt &&\n-\tgit commit -m \"main.txt renamed in sub_master.txt\" &&\n+\tgit mv main.txt sub_main.txt &&\n+\tgit commit -m \"main.txt renamed in sub_main.txt\" &&\n \tgit checkout conflict_second &&\n \tgit mv main.txt sub_second.txt &&\n \tgit commit -m \"main.txt renamed in sub_second.txt\"\n@@ -176,7 +176,7 @@ You have unmerged paths.\n Unmerged paths:\n   (use \"git add/rm <file>...\" as appropriate to mark resolution)\n \tboth deleted:    main.txt\n-\tadded by them:   sub_master.txt\n+\tadded by them:   sub_main.txt\n \tadded by us:     sub_second.txt\n \n no changes added to commit (use \"git add\" and/or \"git commit -a\")\n@@ -189,7 +189,7 @@ EOF\n test_expect_success 'status when conflicts with only rm advice (both deleted)' '\n \tgit reset --hard conflict_second &&\n \ttest_must_fail git merge conflict &&\n-\tgit add sub_master.txt &&\n+\tgit add sub_main.txt &&\n \tgit add sub_second.txt &&\n \tcat >expected <<\\EOF &&\n On branch conflict_second\n@@ -198,7 +198,7 @@ You have unmerged paths.\n   (use \"git merge --abort\" to abort the merge)\n \n Changes to be committed:\n-\tnew file:   sub_master.txt\n+\tnew file:   sub_main.txt\n \n Unmerged paths:\n   (use \"git rm <file>...\" to mark resolution)\n@@ -209,12 +209,12 @@ EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual &&\n \tgit reset --hard &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'status --branch with detached HEAD' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit status --branch --porcelain >actual &&\n \tcat >expected <<-EOF &&\n \t## HEAD (no branch)\n@@ -230,7 +230,7 @@ test_expect_success 'status --branch with detached HEAD' '\n ## Duplicate the above test and verify --porcelain=v1 arg parsing.\n test_expect_success 'status --porcelain=v1 --branch with detached HEAD' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit status --branch --porcelain=v1 >actual &&\n \tcat >expected <<-EOF &&\n \t## HEAD (no branch)\ndiff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh\nindex a682a3d826..3b41d563d5 100755\n--- a/t/t7063-status-untracked-cache.sh\n+++ b/t/t7063-status-untracked-cache.sh\n@@ -475,7 +475,7 @@ EOF\n test_expect_success 'set up sparse checkout' '\n \techo \"done/[a-z]*\" >.git/info/sparse-checkout &&\n \ttest_config core.sparsecheckout true &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit update-index --force-untracked-cache &&\n \tgit status --porcelain >/dev/null && # prime the cache\n \ttest_path_is_missing done/.gitignore &&\n@@ -734,13 +734,13 @@ test_expect_success 'test ident field is working' '\n test_expect_success 'untracked cache survives a checkout' '\n \tgit commit --allow-empty -m empty &&\n \ttest-tool dump-untracked-cache >../before &&\n-\ttest_when_finished  \"git checkout master\" &&\n+\ttest_when_finished  \"git checkout main\" &&\n \tgit checkout -b other_branch &&\n \ttest-tool dump-untracked-cache >../after &&\n \ttest_cmp ../before ../after &&\n \ttest_commit test &&\n \ttest-tool dump-untracked-cache >../before &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest-tool dump-untracked-cache >../after &&\n \ttest_cmp ../before ../after\n '\n@@ -775,7 +775,7 @@ test_expect_success SYMLINKS '\"status\" after symlink replacement should be clean\n \tgit checkout HEAD~ &&\n \tstatus_is_clean &&\n \tstatus_is_clean &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tavoid_racy &&\n \tstatus_is_clean &&\n \tstatus_is_clean\n@@ -786,7 +786,7 @@ test_expect_success SYMLINKS '\"status\" after symlink replacement should be clean\n \tgit checkout HEAD~ &&\n \tstatus_is_clean &&\n \tstatus_is_clean &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tavoid_racy &&\n \tstatus_is_clean &&\n \tstatus_is_clean\n@@ -810,7 +810,7 @@ test_expect_success '\"status\" after file replacement should be clean with UC=tru\n \tgit checkout HEAD~ &&\n \tstatus_is_clean &&\n \tstatus_is_clean &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tavoid_racy &&\n \tstatus_is_clean &&\n \ttest-tool dump-untracked-cache >../actual &&\n@@ -828,7 +828,7 @@ test_expect_success '\"status\" after file replacement should be clean with UC=fal\n \tgit checkout HEAD~ &&\n \tstatus_is_clean &&\n \tstatus_is_clean &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tavoid_racy &&\n \tstatus_is_clean &&\n \tstatus_is_clean\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex b1affb001f..9dfed50354 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -145,7 +145,7 @@ test_expect_success 'trying to do reset --soft with pending merge should fail' '\n \tprintf \"1st line 2nd file\\n2nd line 2nd file\\n3rd line\" >secondfile &&\n \tgit commit -a -m \"the change in branch2\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -D branch1 branch2 &&\n \tcheck_changes $head5\n '\n@@ -167,7 +167,7 @@ test_expect_success 'trying to do reset --soft with pending checkout merge shoul\n \tprintf \"1st line 2nd file\\n2nd line 2nd file\\n3rd line\" >secondfile &&\n \tgit commit -a -m \"the line in branch3\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -D branch3 branch4 &&\n \tcheck_changes $head5\n '\n@@ -380,7 +380,7 @@ test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge\n \tgit reset --hard ORIG_HEAD &&\n \tcheck_changes $head5 &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -D branch1 branch2 &&\n \tcheck_changes $head5\n '\ndiff --git a/t/t7113-post-index-change-hook.sh b/t/t7113-post-index-change-hook.sh\nindex f011ad7eec..2e38428176 100755\n--- a/t/t7113-post-index-change-hook.sh\n+++ b/t/t7113-post-index-change-hook.sh\n@@ -85,7 +85,7 @@ test_expect_success 'test checkout and reset trigger the hook' '\n \tEOF\n \t: force index to be dirty &&\n \ttest-tool chmtime +60 dir1/file1.txt &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_path_is_file testsuccess && rm -f testsuccess &&\n \ttest_path_is_missing testfailure &&\n \ttest-tool chmtime +60 dir1/file1.txt &&\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex b36a93056f..3ab219a04e 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -5,10 +5,10 @@\n \n test_description='git checkout tests.\n \n-Creates master, forks renamer and side branches from it.\n+Creates main, forks renamer and side branches from it.\n Test switching across them.\n \n-  ! [master] Initial A one, A two\n+  ! [main] Initial A one, A two\n    * [renamer] Renamer R one->uno, M two\n     ! [side] Side M one, D two, A three\n      ! [simple] Simple D one, M two\n@@ -16,7 +16,7 @@ Test switching across them.\n      + [simple] Simple D one, M two\n     +  [side] Side M one, D two, A three\n    *   [renamer] Renamer R one->uno, M two\n-  +*++ [master] Initial A one, A two\n+  +*++ [main] Initial A one, A two\n \n '\n \n@@ -46,27 +46,27 @@ test_expect_success setup '\n \tfill a b c d e f >two &&\n \tgit commit -a -m \"Renamer R one->uno, M two\" &&\n \n-\tgit checkout -b side master &&\n+\tgit checkout -b side main &&\n \tfill 1 2 3 4 5 6 7 >one &&\n \tfill A B C D E >three &&\n \trm -f two &&\n \tgit update-index --add --remove one two three &&\n \tgit commit -m \"Side M one, D two, A three\" &&\n \n-\tgit checkout -b simple master &&\n+\tgit checkout -b simple main &&\n \trm -f one &&\n \tfill a c e >two &&\n \tgit commit -a -m \"Simple D one, M two\" &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'checkout from non-existing branch' '\n-\tgit checkout -b delete-me master &&\n+\tgit checkout -b delete-me main &&\n \tgit update-ref -d --no-deref refs/heads/delete-me &&\n \ttest refs/heads/delete-me = \"$(git symbolic-ref HEAD)\" &&\n-\tgit checkout master &&\n-\ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n+\tgit checkout main &&\n+\ttest refs/heads/main = \"$(git symbolic-ref HEAD)\"\n '\n \n test_expect_success 'checkout with dirty tree without -m' '\n@@ -81,7 +81,7 @@ test_expect_success 'checkout with dirty tree without -m' '\n '\n \n test_expect_success 'checkout with unrelated dirty tree without -m' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tfill 0 1 2 3 4 5 6 7 8 >same &&\n \tcp same kept &&\n \tgit checkout side >messages &&\n@@ -91,7 +91,7 @@ test_expect_success 'checkout with unrelated dirty tree without -m' '\n '\n \n test_expect_success 'checkout -m with dirty tree' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit clean -f &&\n \n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n@@ -102,9 +102,9 @@ test_expect_success 'checkout -m with dirty tree' '\n \tprintf \"M\\t%s\\n\" one >expect.messages &&\n \ttest_cmp expect.messages messages &&\n \n-\tfill \"M\tone\" \"A\tthree\" \"D\ttwo\" >expect.master &&\n-\tgit diff --name-status master >current.master &&\n-\ttest_cmp expect.master current.master &&\n+\tfill \"M\tone\" \"A\tthree\" \"D\ttwo\" >expect.main &&\n+\tgit diff --name-status main >current.main &&\n+\ttest_cmp expect.main current.main &&\n \n \tfill \"M\tone\" >expect.side &&\n \tgit diff --name-status side >current.side &&\n@@ -115,7 +115,7 @@ test_expect_success 'checkout -m with dirty tree' '\n '\n \n test_expect_success 'checkout -m with dirty tree, renamed' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f main && git clean -f &&\n \n \tfill 1 2 3 4 5 7 8 >one &&\n \tif git checkout renamer\n@@ -135,7 +135,7 @@ test_expect_success 'checkout -m with dirty tree, renamed' '\n '\n \n test_expect_success 'checkout -m with merge conflict' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f main && git clean -f &&\n \n \tfill 1 T 3 4 5 6 S 8 >one &&\n \tif git checkout renamer\n@@ -148,7 +148,7 @@ test_expect_success 'checkout -m with merge conflict' '\n \n \tgit checkout -m renamer &&\n \n-\tgit diff master:one :3:uno |\n+\tgit diff main:one :3:uno |\n \tsed -e \"1,/^@@/d\" -e \"/^ /d\" -e \"s/^-/d/\" -e \"s/^+/a/\" >current &&\n \tfill d2 aT d7 aS >expect &&\n \ttest_cmp expect current &&\n@@ -157,7 +157,7 @@ test_expect_success 'checkout -m with merge conflict' '\n '\n \n test_expect_success 'format of merge conflict from checkout -m' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit clean -f &&\n \n \tfill b d >two &&\n@@ -181,7 +181,7 @@ test_expect_success 'format of merge conflict from checkout -m' '\n '\n \n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard &&\n \tgit clean -f &&\n \n@@ -193,7 +193,7 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n \ta\n \tc\n \te\n-\t||||||| master\n+\t||||||| main\n \ta\n \tb\n \tc\n@@ -208,7 +208,7 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n '\n \n test_expect_success 'switch to another branch while carrying a deletion' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard &&\n \tgit clean -f &&\n \tgit rm two &&\n@@ -229,7 +229,7 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '\n \ttest_i18ngrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count = 1 messages &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tif git symbolic-ref HEAD >/dev/null 2>&1\n \tthen\n@@ -249,7 +249,7 @@ test_expect_success 'checkout to detach HEAD' '\n \tgrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count -gt 1 messages &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tif git symbolic-ref HEAD >/dev/null 2>&1\n \tthen\n@@ -261,11 +261,11 @@ test_expect_success 'checkout to detach HEAD' '\n '\n \n test_expect_success 'checkout to detach HEAD with branchname^' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit clean -f &&\n \tgit checkout renamer^ &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tif git symbolic-ref HEAD >/dev/null 2>&1\n \tthen\n@@ -277,11 +277,11 @@ test_expect_success 'checkout to detach HEAD with branchname^' '\n '\n \n test_expect_success 'checkout to detach HEAD with :/message' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit clean -f &&\n \tgit checkout \":/Initial\" &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tif git symbolic-ref HEAD >/dev/null 2>&1\n \tthen\n@@ -293,11 +293,11 @@ test_expect_success 'checkout to detach HEAD with :/message' '\n '\n \n test_expect_success 'checkout to detach HEAD with HEAD^0' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit clean -f &&\n \tgit checkout HEAD^0 &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tif git symbolic-ref HEAD >/dev/null 2>&1\n \tthen\n@@ -310,13 +310,13 @@ test_expect_success 'checkout to detach HEAD with HEAD^0' '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n \tgit tag both side &&\n-\tgit branch both master &&\n+\tgit branch both main &&\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit checkout both &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tname=$(git symbolic-ref HEAD 2>/dev/null) &&\n \ttest \"z$name\" = zrefs/heads/both\n@@ -324,12 +324,12 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit tag frotz side &&\n-\tgit branch frotz master &&\n+\tgit branch frotz main &&\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit checkout tags/frotz &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -346,7 +346,7 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \n test_expect_success 'switch branches while in subdirectory' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tmkdir subs &&\n \tgit -C subs checkout side &&\n@@ -362,7 +362,7 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \tgit add subs/bero &&\n \tgit commit -m \"add subs/bero\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tmkdir -p subs &&\n \tgit -C subs checkout side -- bero &&\n \ttest -f subs/bero\n@@ -370,7 +370,7 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \n test_expect_success 'checkout w/--track sets up tracking' '\n     git config branch.autosetupmerge false &&\n-    git checkout master &&\n+    git checkout main &&\n     git checkout --track -b track1 &&\n     test \"$(git config branch.track1.remote)\" &&\n     test \"$(git config branch.track1.merge)\"\n@@ -379,40 +379,40 @@ test_expect_success 'checkout w/--track sets up tracking' '\n test_expect_success 'checkout w/autosetupmerge=always sets up tracking' '\n     test_when_finished git config branch.autosetupmerge false &&\n     git config branch.autosetupmerge always &&\n-    git checkout master &&\n+    git checkout main &&\n     git checkout -b track2 &&\n     test \"$(git config branch.track2.remote)\" &&\n     test \"$(git config branch.track2.merge)\"\n '\n \n test_expect_success 'checkout w/--track from non-branch HEAD fails' '\n-    git checkout master^0 &&\n+    git checkout main^0 &&\n     test_must_fail git symbolic-ref HEAD &&\n     test_must_fail git checkout --track -b track &&\n     test_must_fail git rev-parse --verify track &&\n     test_must_fail git symbolic-ref HEAD &&\n-    test \"z$(git rev-parse master^0)\" = \"z$(git rev-parse HEAD)\"\n+    test \"z$(git rev-parse main^0)\" = \"z$(git rev-parse HEAD)\"\n '\n \n test_expect_success 'checkout w/--track from tag fails' '\n-    git checkout master^0 &&\n+    git checkout main^0 &&\n     test_must_fail git symbolic-ref HEAD &&\n     test_must_fail git checkout --track -b track frotz &&\n     test_must_fail git rev-parse --verify track &&\n     test_must_fail git symbolic-ref HEAD &&\n-    test \"z$(git rev-parse master^0)\" = \"z$(git rev-parse HEAD)\"\n+    test \"z$(git rev-parse main^0)\" = \"z$(git rev-parse HEAD)\"\n '\n \n test_expect_success 'detach a symbolic link HEAD' '\n-    git checkout master &&\n+    git checkout main &&\n     git config --bool core.prefersymlinkrefs yes &&\n     git checkout side &&\n-    git checkout master &&\n+    git checkout main &&\n     it=$(git symbolic-ref HEAD) &&\n-    test \"z$it\" = zrefs/heads/master &&\n-    here=$(git rev-parse --verify refs/heads/master) &&\n+    test \"z$it\" = zrefs/heads/main &&\n+    here=$(git rev-parse --verify refs/heads/main) &&\n     git checkout side^ &&\n-    test \"z$(git rev-parse --verify refs/heads/master)\" = \"z$here\"\n+    test \"z$(git rev-parse --verify refs/heads/main)\" = \"z$here\"\n '\n \n test_expect_success 'checkout with --track fakes a sensible -b <name>' '\n@@ -423,13 +423,13 @@ test_expect_success 'checkout with --track fakes a sensible -b <name>' '\n     test \"refs/heads/koala/bear\" = \"$(git symbolic-ref HEAD)\" &&\n     test \"$(git rev-parse HEAD)\" = \"$(git rev-parse renamer)\" &&\n \n-    git checkout master && git branch -D koala/bear &&\n+    git checkout main && git branch -D koala/bear &&\n \n     git checkout --track refs/remotes/origin/koala/bear &&\n     test \"refs/heads/koala/bear\" = \"$(git symbolic-ref HEAD)\" &&\n     test \"$(git rev-parse HEAD)\" = \"$(git rev-parse renamer)\" &&\n \n-    git checkout master && git branch -D koala/bear &&\n+    git checkout main && git branch -D koala/bear &&\n \n     git checkout --track remotes/origin/koala/bear &&\n     test \"refs/heads/koala/bear\" = \"$(git symbolic-ref HEAD)\" &&\n@@ -582,17 +582,17 @@ test_expect_success 'checkout --conflict=diff3' '\n '\n \n test_expect_success 'failing checkout -b should not break working tree' '\n-\tgit reset --hard master &&\n-\tgit symbolic-ref HEAD refs/heads/master &&\n+\tgit reset --hard main &&\n+\tgit symbolic-ref HEAD refs/heads/main &&\n \ttest_must_fail git checkout -b renamer side^ &&\n-\ttest $(git symbolic-ref HEAD) = refs/heads/master &&\n+\ttest $(git symbolic-ref HEAD) = refs/heads/main &&\n \tgit diff --exit-code &&\n \tgit diff --cached --exit-code\n '\n \n test_expect_success 'switch out of non-branch' '\n-\tgit reset --hard master &&\n-\tgit checkout master^0 &&\n+\tgit reset --hard main &&\n+\tgit checkout main^0 &&\n \techo modified >one &&\n \ttest_must_fail git checkout renamer 2>error.log &&\n \t! grep \"^Previous HEAD\" error.log\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex fec7e0299d..ce320807d4 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -124,7 +124,7 @@ inspect() {\n }\n \n test_expect_success 'submodule add' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -223,7 +223,7 @@ test_expect_success 'submodule add --branch' '\n \techo \"refs/heads/initial\" >expect-head &&\n \tcat <<-\\EOF >expect-heads &&\n \trefs/heads/initial\n-\trefs/heads/master\n+\trefs/heads/main\n \tEOF\n \n \t(\n@@ -241,7 +241,7 @@ test_expect_success 'submodule add --branch' '\n '\n \n test_expect_success 'submodule add with ./ in path' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -257,7 +257,7 @@ test_expect_success 'submodule add with ./ in path' '\n '\n \n test_expect_success 'submodule add with /././ in path' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -273,7 +273,7 @@ test_expect_success 'submodule add with /././ in path' '\n '\n \n test_expect_success 'submodule add with // in path' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -289,7 +289,7 @@ test_expect_success 'submodule add with // in path' '\n '\n \n test_expect_success 'submodule add with /.. in path' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -305,7 +305,7 @@ test_expect_success 'submodule add with /.. in path' '\n '\n \n test_expect_success 'submodule add with ./, /.. and // in path' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -335,7 +335,7 @@ test_expect_success !CYGWIN 'submodule add with \\\\ in path' '\n '\n \n test_expect_success 'submodule add in subdirectory' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \tmkdir addtest/sub &&\n \t(\n@@ -557,7 +557,7 @@ test_expect_success 'status should be \"up-to-date\" after update' '\n \n test_expect_success 'checkout superproject with subproject already present' '\n \tgit checkout initial &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'apply submodule diff' '\n@@ -574,7 +574,7 @@ test_expect_success 'apply submodule diff' '\n \tgit checkout second &&\n \tgit apply --index P.diff &&\n \n-\tgit diff --cached master >staged &&\n+\tgit diff --cached main >staged &&\n \ttest_must_be_empty staged\n '\n \ndiff --git a/t/t7403-submodule-sync.sh b/t/t7403-submodule-sync.sh\nindex 0726799e74..848d4e7db7 100755\n--- a/t/t7403-submodule-sync.sh\n+++ b/t/t7403-submodule-sync.sh\n@@ -78,7 +78,7 @@ test_expect_success 'change submodule url' '\n \t(\n \t\tcd super &&\n \t\tcd submodule &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit pull\n \t) &&\n \tmv submodule moved-submodule &&\n@@ -112,7 +112,7 @@ test_expect_success '\"git submodule sync\" should update submodule URLs' '\n \t)\" &&\n \t(\n \t\tcd super-clone/submodule &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit pull\n \t) &&\n \t(\n@@ -140,7 +140,7 @@ test_expect_success '\"git submodule sync --recursive\" should update all submodul\n \t)\" &&\n \t(\n \t\tcd super-clone/submodule/sub-submodule &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit pull\n \t)\n '\n@@ -168,7 +168,7 @@ test_expect_success '\"git submodule sync\" should update submodule URLs - subdire\n \t)\" &&\n \t(\n \t\tcd super-clone/submodule &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit pull\n \t) &&\n \t(\n@@ -199,7 +199,7 @@ test_expect_success '\"git submodule sync --recursive\" should update all submodul\n \t)\" &&\n \t(\n \t\tcd super-clone/submodule/sub-submodule &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit pull\n \t)\n '\ndiff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh\nindex acb8766ac2..87097846cb 100755\n--- a/t/t7406-submodule-update.sh\n+++ b/t/t7406-submodule-update.sh\n@@ -14,10 +14,10 @@ submodule and \"git submodule update --rebase/--merge\" does not detach the HEAD.\n \n compare_head()\n {\n-    sha_master=$(git rev-list --max-count=1 master)\n+    sha_main=$(git rev-list --max-count=1 main)\n     sha_head=$(git rev-list --max-count=1 HEAD)\n \n-    test \"$sha_master\" = \"$sha_head\"\n+    test \"$sha_main\" = \"$sha_head\"\n }\n \n \n@@ -262,14 +262,14 @@ test_expect_success 'submodule update --remote should fetch upstream changes wit\n \t\tcd super &&\n \t\tgit submodule update --remote --force submodule &&\n \t\tgit -C submodule log -1 --oneline >actual &&\n-\t\tgit -C ../submodule log -1 --oneline master >expect &&\n+\t\tgit -C ../submodule log -1 --oneline main >expect &&\n \t\ttest_cmp expect actual &&\n \t\tgit checkout -b test-branch &&\n \t\tgit submodule update --remote --force submodule &&\n \t\tgit -C submodule log -1 --oneline >actual &&\n \t\tgit -C ../submodule log -1 --oneline test-branch >expect &&\n \t\ttest_cmp expect actual &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit branch -d test-branch &&\n \t\tgit reset --hard HEAD^\n \t)\n@@ -282,7 +282,7 @@ test_expect_success 'local config should override .gitmodules branch' '\n \t git add file &&\n \t test_tick &&\n \t git commit -m \"upstream line5\" &&\n-\t git checkout master\n+\t git checkout main\n \t) &&\n \t(cd super &&\n \t git config submodule.submodule.branch test-branch &&\n@@ -292,9 +292,9 @@ test_expect_success 'local config should override .gitmodules branch' '\n \t)\n '\n \n-test_expect_success 'submodule update --rebase staying on master' '\n+test_expect_success 'submodule update --rebase staying on main' '\n \t(cd super/submodule &&\n-\t  git checkout master\n+\t  git checkout main\n \t) &&\n \t(cd super &&\n \t (cd submodule &&\n@@ -306,7 +306,7 @@ test_expect_success 'submodule update --rebase staying on master' '\n \t)\n '\n \n-test_expect_success 'submodule update --merge staying on master' '\n+test_expect_success 'submodule update --merge staying on main' '\n \t(cd super/submodule &&\n \t  git reset --hard HEAD~1\n \t) &&\n@@ -609,7 +609,7 @@ test_expect_success 'submodule update - update=none in .git/config' '\n \t(cd super &&\n \t git config submodule.submodule.update none &&\n \t (cd submodule &&\n-\t  git checkout master &&\n+\t  git checkout main &&\n \t  compare_head\n \t ) &&\n \t git diff --name-only >out &&\n@@ -629,7 +629,7 @@ test_expect_success 'submodule update - update=none in .git/config but --checkou\n \t(cd super &&\n \t git config submodule.submodule.update none &&\n \t (cd submodule &&\n-\t  git checkout master &&\n+\t  git checkout main &&\n \t  compare_head\n \t ) &&\n \t git diff --name-only >out &&\n@@ -689,7 +689,7 @@ test_expect_success 'submodule update continues after checkout error' '\n test_expect_success 'submodule update continues after recursive checkout error' '\n \t(cd super &&\n \t git reset --hard HEAD &&\n-\t git checkout master &&\n+\t git checkout main &&\n \t git submodule update &&\n \t (cd submodule &&\n \t  git submodule add ../submodule subsubmodule &&\n@@ -733,7 +733,7 @@ test_expect_success 'submodule update continues after recursive checkout error'\n \n test_expect_success 'submodule update exit immediately in case of merge conflict' '\n \t(cd super &&\n-\t git checkout master &&\n+\t git checkout main &&\n \t git reset --hard HEAD &&\n \t (cd submodule &&\n \t  (cd subsubmodule &&\n@@ -751,7 +751,7 @@ test_expect_success 'submodule update exit immediately in case of merge conflict\n \t git add submodule2 &&\n \t git commit -m \"two_new_submodule_commits\" &&\n \t (cd submodule &&\n-\t  git checkout master &&\n+\t  git checkout main &&\n \t  test_commit \"conflict\" file &&\n \t  echo \"conflict\" > file\n \t ) &&\n@@ -770,7 +770,7 @@ test_expect_success 'submodule update exit immediately in case of merge conflict\n \n test_expect_success 'submodule update exit immediately after recursive rebase error' '\n \t(cd super &&\n-\t git checkout master &&\n+\t git checkout main &&\n \t git reset --hard HEAD &&\n \t (cd submodule &&\n \t  git reset --hard HEAD &&\n@@ -786,7 +786,7 @@ test_expect_success 'submodule update exit immediately after recursive rebase er\n \t git add submodule2 &&\n \t git commit -m \"two_new_submodule_commits\" &&\n \t (cd submodule &&\n-\t  git checkout master &&\n+\t  git checkout main &&\n \t  test_commit \"conflict2\" file &&\n \t  echo \"conflict\" > file\n \t ) &&\n@@ -878,21 +878,21 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir re\n \tgit clone subsubsuper_update_r subsubsuper_update_r2 &&\n \t(cd subsubsuper_update_r2 &&\n \t test_commit \"update_subsubsuper\" file &&\n-\t git push origin master\n+\t git push origin main\n \t) &&\n \tgit clone subsuper_update_r subsuper_update_r2 &&\n \t(cd subsuper_update_r2 &&\n \t test_commit \"update_subsuper\" file &&\n \t git submodule add ../subsubsuper_update_r subsubmodule &&\n \t git commit -am \"subsubmodule\" &&\n-\t git push origin master\n+\t git push origin main\n \t) &&\n \tgit clone super_update_r super_update_r2 &&\n \t(cd super_update_r2 &&\n \t test_commit \"update_super\" file &&\n \t git submodule add ../subsuper_update_r submodule &&\n \t git commit -am \"submodule\" &&\n-\t git push origin master\n+\t git push origin main\n \t) &&\n \trm -rf super_update_r2 &&\n \tgit clone super_update_r super_update_r2 &&\n@@ -911,7 +911,7 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir re\n \n test_expect_success 'submodule add properly re-creates deeper level submodules' '\n \t(cd super &&\n-\t git reset --hard master &&\n+\t git reset --hard main &&\n \t rm -rf deeper/ &&\n \t git submodule add --force ../submodule deeper/submodule\n \t)\ndiff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh\nindex 6b2aa917e1..8ebcaa3694 100755\n--- a/t/t7407-submodule-foreach.sh\n+++ b/t/t7407-submodule-foreach.sh\n@@ -277,13 +277,13 @@ sub1sha1_short=$(cd clone3/sub1 && git rev-parse --short HEAD)\n sub2sha1_short=$(cd clone3/sub2 && git rev-parse --short HEAD)\n \n cat > expect <<EOF\n- $nested1sha1 nested1 (heads/master)\n- $nested2sha1 nested1/nested2 (heads/master)\n- $nested3sha1 nested1/nested2/nested3 (heads/master)\n- $submodulesha1 nested1/nested2/nested3/submodule (heads/master)\n+ $nested1sha1 nested1 (heads/main)\n+ $nested2sha1 nested1/nested2 (heads/main)\n+ $nested3sha1 nested1/nested2/nested3 (heads/main)\n+ $submodulesha1 nested1/nested2/nested3/submodule (heads/main)\n  $sub1sha1 sub1 ($sub1sha1_short)\n  $sub2sha1 sub2 ($sub2sha1_short)\n- $sub3sha1 sub3 (heads/master)\n+ $sub3sha1 sub3 (heads/main)\n EOF\n \n test_expect_success 'test \"status --recursive\"' '\n@@ -295,10 +295,10 @@ test_expect_success 'test \"status --recursive\"' '\n '\n \n cat > expect <<EOF\n- $nested1sha1 nested1 (heads/master)\n+ $nested1sha1 nested1 (heads/main)\n +$nested2sha1 nested1/nested2 (file2~1)\n- $nested3sha1 nested1/nested2/nested3 (heads/master)\n- $submodulesha1 nested1/nested2/nested3/submodule (heads/master)\n+ $nested3sha1 nested1/nested2/nested3 (heads/main)\n+ $submodulesha1 nested1/nested2/nested3/submodule (heads/main)\n EOF\n \n test_expect_success 'ensure \"status --cached --recursive\" preserves the --cached flag' '\n@@ -316,13 +316,13 @@ test_expect_success 'ensure \"status --cached --recursive\" preserves the --cached\n nested2sha1=$(git -C clone3/nested1/nested2 rev-parse HEAD)\n \n cat > expect <<EOF\n- $nested1sha1 ../nested1 (heads/master)\n+ $nested1sha1 ../nested1 (heads/main)\n +$nested2sha1 ../nested1/nested2 (file2)\n- $nested3sha1 ../nested1/nested2/nested3 (heads/master)\n- $submodulesha1 ../nested1/nested2/nested3/submodule (heads/master)\n+ $nested3sha1 ../nested1/nested2/nested3 (heads/main)\n+ $submodulesha1 ../nested1/nested2/nested3/submodule (heads/main)\n  $sub1sha1 ../sub1 ($sub1sha1_short)\n  $sub2sha1 ../sub2 ($sub2sha1_short)\n- $sub3sha1 ../sub3 (heads/master)\n+ $sub3sha1 ../sub3 (heads/main)\n EOF\n \n test_expect_success 'test \"status --recursive\" from sub directory' '\ndiff --git a/t/t7409-submodule-detached-work-tree.sh b/t/t7409-submodule-detached-work-tree.sh\nindex fc018e3638..727490eb15 100755\n--- a/t/t7409-submodule-detached-work-tree.sh\n+++ b/t/t7409-submodule-detached-work-tree.sh\n@@ -35,7 +35,7 @@ test_expect_success 'submodule on detached working tree' '\n \t\t\tgit rev-parse --verify HEAD >actual &&\n \t\t\ttest_cmp ../../../../expect actual\n \t\t) &&\n-\t\tgit push origin master\n+\t\tgit push origin main\n \t) &&\n \tmkdir home2 &&\n \t(\n@@ -44,7 +44,7 @@ test_expect_success 'submodule on detached working tree' '\n \t\tGIT_WORK_TREE=\"$(pwd)\" &&\n \t\tGIT_DIR=\"$(pwd)/.dotfiles\" &&\n \t\texport GIT_WORK_TREE GIT_DIR &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit submodule update --init &&\n \t\t(\n \t\t\tunset GIT_WORK_TREE GIT_DIR &&\n@@ -64,10 +64,10 @@ test_expect_success 'submodule on detached working pointed by core.worktree' '\n \t\tgit clone --bare ../remote \"$GIT_DIR\" &&\n \t\tgit config core.bare false &&\n \t\tgit config core.worktree .. &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit submodule add ../bundle1 .vim/bundle/dupe &&\n \t\ttest_commit \"dupe\" &&\n-\t\tgit push origin master\n+\t\tgit push origin main\n \t) &&\n \t(\n \t\tcd home &&\ndiff --git a/t/t7417-submodule-path-url.sh b/t/t7417-submodule-path-url.sh\nindex f7e7e94d7b..1c9181aee7 100755\n--- a/t/t7417-submodule-path-url.sh\n+++ b/t/t7417-submodule-path-url.sh\n@@ -36,7 +36,7 @@ test_expect_success MINGW 'submodule paths disallows trailing spaces' '\n \tsed \"s/sub/sub /\" <tree >tree.new &&\n \ttree=$(git -C super mktree <tree.new) &&\n \tcommit=$(echo with space | git -C super commit-tree $tree) &&\n-\tgit -C super update-ref refs/heads/master $commit &&\n+\tgit -C super update-ref refs/heads/main $commit &&\n \n \ttest_must_fail git clone --recurse-submodules super dst 2>err &&\n \ttest_i18ngrep \"sub \" err\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 2f9c584fab..056d9591aa 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,13 +257,13 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-3404|4013|5310|5526|6300)\n+3404|4013|5310|5526|6300|7064)\n \t# Avoid conflicts with patch series that are cooking at the same time\n \t# as the patch series changing the default of `init.defaultBranch`.\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-6]*)\n+[0-6]*|7[0-4]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410105","messageId":"f0fa12b5774fa7041f507884fada95b46e7bb925.1605629548.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 19/27] t6[4-9]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-17T16:12:19Z","receivedAt":"2020-11-17T16:13:08Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t6[4-9]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t6400-merge-df.sh                       |  6 +--\n t/t6402-merge-rename.sh                   | 46 +++++++++++------------\n t/t6404-recursive-merge.sh                |  4 +-\n t/t6405-merge-symlinks.sh                 | 14 +++----\n t/t6406-merge-attr.sh                     | 24 ++++++------\n t/t6407-merge-binary.sh                   |  6 +--\n t/t6409-merge-subtree.sh                  | 16 ++++----\n t/t6411-merge-filemode.sh                 | 10 ++---\n t/t6412-merge-large-rename.sh             |  6 +--\n t/t6413-merge-crlf.sh                     |  2 +-\n t/t6414-merge-rename-nocruft.sh           |  2 +-\n t/t6415-merge-dir-to-symlink.sh           | 22 +++++------\n t/t6416-recursive-corner-cases.sh         | 28 +++++++-------\n t/t6417-merge-ours-theirs.sh              | 28 +++++++-------\n t/t6418-merge-text-auto.sh                | 12 +++---\n t/t6419-merge-ignorecase.sh               | 10 ++---\n t/t6422-merge-rename-corner-cases.sh      | 12 +++---\n t/t6425-merge-rename-delete.sh            |  2 +-\n t/t6427-diff3-conflict-markers.sh         | 14 +++----\n t/t6430-merge-recursive.sh                | 18 ++++-----\n t/t6432-merge-recursive-space-options.sh  |  6 +--\n t/t6433-merge-toplevel.sh                 |  8 ++--\n t/t6434-merge-recursive-rename-options.sh |  6 +--\n t/t6436-merge-overwrite.sh                |  2 +-\n t/t6437-submodule-merge.sh                | 14 +++----\n t/t6439-merge-co-error-msgs.sh            |  6 +--\n t/t6501-freshen-objects.sh                |  2 +-\n t/test-lib.sh                             |  2 +-\n 28 files changed, 164 insertions(+), 164 deletions(-)\n\ndiff --git a/t/t6400-merge-df.sh b/t/t6400-merge-df.sh\nindex 9da0838216..f7907df3af 100755\n--- a/t/t6400-merge-df.sh\n+++ b/t/t6400-merge-df.sh\n@@ -24,12 +24,12 @@ test_expect_success 'prepare repository' '\n '\n \n test_expect_success 'Merge with d/f conflicts' '\n-\ttest_expect_code 1 git merge -m \"merge msg\" master\n+\ttest_expect_code 1 git merge -m \"merge msg\" main\n '\n \n test_expect_success 'F/D conflict' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \trm .git/index &&\n \n \tmkdir before &&\n@@ -47,7 +47,7 @@ test_expect_success 'F/D conflict' '\n \tgit add . &&\n \tgit commit -m para &&\n \n-\tgit merge master\n+\tgit merge main\n '\n \n test_expect_success 'setup modify/delete + directory/file conflict' '\ndiff --git a/t/t6402-merge-rename.sh b/t/t6402-merge-rename.sh\nindex 3f64f62224..82b1b00d5b 100755\n--- a/t/t6402-merge-rename.sh\n+++ b/t/t6402-merge-rename.sh\n@@ -54,9 +54,9 @@ test_expect_success 'setup' '\n \tgit branch change &&\n \tgit branch change+rename &&\n \n-\tsed -e \"/^g /s/.*/g : master changes a line/\" <A >A+ &&\n+\tsed -e \"/^g /s/.*/g : main changes a line/\" <A >A+ &&\n \tmv A+ A &&\n-\tgit commit -a -m \"master updates A\" &&\n+\tgit commit -a -m \"main updates A\" &&\n \n \tgit checkout yellow &&\n \trm -f M &&\n@@ -94,7 +94,7 @@ test_expect_success 'setup' '\n \tgit update-index --add B &&\n \tgit commit -q -a -m \"changed and renamed\" &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'pull renaming branch into unrenaming one' \\\n@@ -109,7 +109,7 @@ test_expect_success 'pull renaming branch into unrenaming one' \\\n \tsed -ne \"/^g/{\n \tp\n \tq\n-\t}\" B | grep master &&\n+\t}\" B | grep main &&\n \tgit diff --exit-code white N\n '\n \n@@ -134,7 +134,7 @@ test_expect_success 'pull unrenaming branch into renaming one' \\\n '\n \tgit reset --hard &&\n \tgit show-branch &&\n-\ttest_expect_code 1 git pull . master &&\n+\ttest_expect_code 1 git pull . main &&\n \tgit ls-files -u B >b.stages &&\n \ttest_line_count = 3 b.stages &&\n \tgit ls-files -s N >n.stages &&\n@@ -187,7 +187,7 @@ test_expect_success 'interference with untracked working tree file' '\n test_expect_success 'interference with untracked working tree file' '\n \tgit reset --hard &&\n \trm -f A M &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit tag -f anchor &&\n \tgit show-branch &&\n \tgit pull . yellow &&\n@@ -198,7 +198,7 @@ test_expect_success 'interference with untracked working tree file' '\n test_expect_success 'updated working tree file should prevent the merge' '\n \tgit reset --hard &&\n \trm -f A M &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit tag -f anchor &&\n \tgit show-branch &&\n \techo >>M one line addition &&\n@@ -211,7 +211,7 @@ test_expect_success 'updated working tree file should prevent the merge' '\n test_expect_success 'updated working tree file should prevent the merge' '\n \tgit reset --hard &&\n \trm -f A M &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit tag -f anchor &&\n \tgit show-branch &&\n \techo >>M one line addition &&\n@@ -229,7 +229,7 @@ test_expect_success 'interference with untracked working tree file' '\n \tgit tag -f anchor &&\n \tgit show-branch &&\n \techo >M this file should not matter &&\n-\tgit pull . master &&\n+\tgit pull . main &&\n \ttest_path_is_file M &&\n \t! {\n \t\tgit ls-files -s |\n@@ -764,7 +764,7 @@ test_expect_success 'setup avoid unnecessary update, dir->(file,nothing)' '\n \tgit rm -rf df &&\n \tgit commit -mB &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit rm -rf df &&\n \techo bla >df &&\n \tgit add -A &&\n@@ -772,7 +772,7 @@ test_expect_success 'setup avoid unnecessary update, dir->(file,nothing)' '\n '\n \n test_expect_success 'avoid unnecessary update, dir->(file,nothing)' '\n-\tgit checkout -q master^0 &&\n+\tgit checkout -q main^0 &&\n \ttest-tool chmtime --get -3600 df >expect &&\n \tgit merge side &&\n \ttest-tool chmtime --get df >actual &&\n@@ -794,14 +794,14 @@ test_expect_success 'setup avoid unnecessary update, modify/delete' '\n \tgit rm -f file &&\n \tgit commit -m \"Delete file\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo bla >file &&\n \tgit add -A &&\n \tgit commit -m \"Modify file\"\n '\n \n test_expect_success 'avoid unnecessary update, modify/delete' '\n-\tgit checkout -q master^0 &&\n+\tgit checkout -q main^0 &&\n \ttest-tool chmtime --get -3600 file >expect &&\n \ttest_must_fail git merge side &&\n \ttest-tool chmtime --get file >actual &&\n@@ -823,13 +823,13 @@ test_expect_success 'setup avoid unnecessary update, rename/add-dest' '\n \tgit add -A &&\n \tgit commit -m \"Add file copy\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit mv file newfile &&\n \tgit commit -m \"Rename file\"\n '\n \n test_expect_success 'avoid unnecessary update, rename/add-dest' '\n-\tgit checkout -q master^0 &&\n+\tgit checkout -q main^0 &&\n \ttest-tool chmtime --get -3600 newfile >expect &&\n \tgit merge side &&\n \ttest-tool chmtime --get newfile >actual &&\n@@ -879,15 +879,15 @@ test_expect_success 'setup for use of extended merge markers' '\n \tgit mv original_file renamed_file &&\n \tgit commit -mB &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo 8.5 >>original_file &&\n \tgit add original_file &&\n \tgit commit -mC\n '\n \n-test_expect_success 'merge master into rename has correct extended markers' '\n+test_expect_success 'merge main into rename has correct extended markers' '\n \tgit checkout rename^0 &&\n-\ttest_must_fail git merge -s recursive master^0 &&\n+\ttest_must_fail git merge -s recursive main^0 &&\n \n \tcat >expected <<-\\EOF &&\n \t1\n@@ -902,14 +902,14 @@ test_expect_success 'merge master into rename has correct extended markers' '\n \t9\n \t=======\n \t8.5\n-\t>>>>>>> master^0:original_file\n+\t>>>>>>> main^0:original_file\n \tEOF\n \ttest_cmp expected renamed_file\n '\n \n-test_expect_success 'merge rename into master has correct extended markers' '\n+test_expect_success 'merge rename into main has correct extended markers' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git merge -s recursive rename^0 &&\n \n \tcat >expected <<-\\EOF &&\n@@ -945,13 +945,13 @@ test_expect_success 'setup spurious \"refusing to lose untracked\" message' '\n \tgit mv original_file renamed_file &&\n \tgit commit -mB &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit rm original_file &&\n \tgit commit -mC\n '\n \n test_expect_success 'no spurious \"refusing to lose untracked\" message' '\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git merge rename^0 2>errors.txt &&\n \t! grep \"refusing to lose untracked file\" errors.txt\n '\ndiff --git a/t/t6404-recursive-merge.sh b/t/t6404-recursive-merge.sh\nindex b1c3d4dda4..410a17865b 100755\n--- a/t/t6404-recursive-merge.sh\n+++ b/t/t6404-recursive-merge.sh\n@@ -19,11 +19,11 @@ test_expect_success 'setup tests' '\n \tgit add a1 &&\n \tGIT_AUTHOR_DATE=\"2006-12-12 23:00:00\" git commit -m 1 a1 &&\n \n-\tgit checkout -b A master &&\n+\tgit checkout -b A main &&\n \techo A >a1 &&\n \tGIT_AUTHOR_DATE=\"2006-12-12 23:00:01\" git commit -m A a1 &&\n \n-\tgit checkout -b B master &&\n+\tgit checkout -b B main &&\n \techo B >a1 &&\n \tGIT_AUTHOR_DATE=\"2006-12-12 23:00:02\" git commit -m B a1 &&\n \ndiff --git a/t/t6405-merge-symlinks.sh b/t/t6405-merge-symlinks.sh\nindex 6c0a90d044..160c2c10f6 100755\n--- a/t/t6405-merge-symlinks.sh\n+++ b/t/t6405-merge-symlinks.sh\n@@ -19,7 +19,7 @@ test_expect_success 'setup' '\n \tgit branch b-file &&\n \tl=$(printf file | git hash-object -t blob -w --stdin) &&\n \techo \"120000 $l\tsymlink\" | git update-index --index-info &&\n-\tgit commit -m master &&\n+\tgit commit -m main &&\n \tgit checkout b-symlink &&\n \tl=$(printf file-different | git hash-object -t blob -w --stdin) &&\n \techo \"120000 $l\tsymlink\" | git update-index --index-info &&\n@@ -30,28 +30,28 @@ test_expect_success 'setup' '\n \tgit commit -m b-file\n '\n \n-test_expect_success 'merge master into b-symlink, which has a different symbolic link' '\n+test_expect_success 'merge main into b-symlink, which has a different symbolic link' '\n \tgit checkout b-symlink &&\n-\ttest_must_fail git merge master\n+\ttest_must_fail git merge main\n '\n \n test_expect_success 'the merge result must be a file' '\n \ttest_path_is_file symlink\n '\n \n-test_expect_success 'merge master into b-file, which has a file instead of a symbolic link' '\n+test_expect_success 'merge main into b-file, which has a file instead of a symbolic link' '\n \tgit reset --hard &&\n \tgit checkout b-file &&\n-\ttest_must_fail git merge master\n+\ttest_must_fail git merge main\n '\n \n test_expect_success 'the merge result must be a file' '\n \ttest_path_is_file symlink\n '\n \n-test_expect_success 'merge b-file, which has a file instead of a symbolic link, into master' '\n+test_expect_success 'merge b-file, which has a file instead of a symbolic link, into main' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git merge b-file\n '\n \ndiff --git a/t/t6406-merge-attr.sh b/t/t6406-merge-attr.sh\nindex 76a55f838c..c559b5a3e6 100755\n--- a/t/t6406-merge-attr.sh\n+++ b/t/t6406-merge-attr.sh\n@@ -19,10 +19,10 @@ test_expect_success setup '\n \tgit branch side &&\n \tfor f in text binary union\n \tdo\n-\t\techo Master >>$f && git add $f || return 1\n+\t\techo Main >>$f && git add $f || return 1\n \tdone &&\n \ttest_tick &&\n-\tgit commit -m Master &&\n+\tgit commit -m Main &&\n \n \tgit checkout side &&\n \tfor f in text binary union\n@@ -64,7 +64,7 @@ test_expect_success merge '\n \t\techo \"union merge=union\"\n \t} >.gitattributes &&\n \n-\tif git merge master\n+\tif git merge main\n \tthen\n \t\techo Gaah, should have conflicted\n \t\tfalse\n@@ -87,7 +87,7 @@ test_expect_success 'check merge result in working tree' '\n \tgrep \"<<<<<<<\" text &&\n \tcmp binary-orig binary &&\n \t! grep \"<<<<<<<\" union &&\n-\tgrep Master union &&\n+\tgrep Main union &&\n \tgrep Side union\n \n '\n@@ -115,13 +115,13 @@ test_expect_success 'custom merge backend' '\n \tgit config --replace-all \\\n \tmerge.custom.name \"custom merge driver for testing\" &&\n \n-\tgit merge master &&\n+\tgit merge main &&\n \n \tcmp binary union &&\n \tsed -e 1,3d text >check-1 &&\n-\to=$(git unpack-file master^:text) &&\n+\to=$(git unpack-file main^:text) &&\n \ta=$(git unpack-file side^:text) &&\n-\tb=$(git unpack-file master:text) &&\n+\tb=$(git unpack-file main:text) &&\n \tsh -c \"./custom-merge $o $a $b 0 text\" &&\n \tsed -e 1,3d $a >check-2 &&\n \tcmp check-1 check-2 &&\n@@ -136,7 +136,7 @@ test_expect_success 'custom merge backend' '\n \tgit config --replace-all \\\n \tmerge.custom.name \"custom merge driver for testing\" &&\n \n-\tif git merge master\n+\tif git merge main\n \tthen\n \t\techo \"Eh? should have conflicted\"\n \t\tfalse\n@@ -146,9 +146,9 @@ test_expect_success 'custom merge backend' '\n \n \tcmp binary union &&\n \tsed -e 1,3d text >check-1 &&\n-\to=$(git unpack-file master^:text) &&\n+\to=$(git unpack-file main^:text) &&\n \ta=$(git unpack-file anchor:text) &&\n-\tb=$(git unpack-file master:text) &&\n+\tb=$(git unpack-file main:text) &&\n \tsh -c \"./custom-merge $o $a $b 0 text\" &&\n \tsed -e 1,3d $a >check-2 &&\n \tcmp check-1 check-2 &&\n@@ -176,7 +176,7 @@ test_expect_success 'up-to-date merge without common ancestor' '\n \ttest_tick &&\n \t(\n \t\tcd repo1 &&\n-\t\tgit fetch ../repo2 master &&\n+\t\tgit fetch ../repo2 main &&\n \t\tgit merge --allow-unrelated-histories FETCH_HEAD\n \t)\n '\n@@ -201,7 +201,7 @@ test_expect_success 'custom merge does not lock index' '\n \t# By packaging the command in test_when_finished, we get both\n \t# the correctness check and the clean-up.\n \ttest_when_finished \"kill \\$(cat sleep.pid)\" &&\n-\tgit merge master\n+\tgit merge main\n '\n \n test_done\ndiff --git a/t/t6407-merge-binary.sh b/t/t6407-merge-binary.sh\nindex 4e6c7cb77e..a76c85ec1e 100755\n--- a/t/t6407-merge-binary.sh\n+++ b/t/t6407-merge-binary.sh\n@@ -20,7 +20,7 @@ test_expect_success setup '\n \tgit ls-files -s a >E0 &&\n \tgit ls-files -s m | sed -e \"s/ 0\t/ 3\t/\" >E3 &&\n \ttest_tick &&\n-\tgit commit -m \"master adds some\" &&\n+\tgit commit -m \"main adds some\" &&\n \n \tgit checkout side &&\n \techo rezrov >>m &&\n@@ -39,7 +39,7 @@ test_expect_success resolve '\n \trm -f a* m* &&\n \tgit reset --hard anchor &&\n \n-\tif git merge -s resolve master\n+\tif git merge -s resolve main\n \tthen\n \t\techo Oops, should not have succeeded\n \t\tfalse\n@@ -54,7 +54,7 @@ test_expect_success recursive '\n \trm -f a* m* &&\n \tgit reset --hard anchor &&\n \n-\tif git merge -s recursive master\n+\tif git merge -s recursive main\n \tthen\n \t\techo Oops, should not have succeeded\n \t\tfalse\ndiff --git a/t/t6409-merge-subtree.sh b/t/t6409-merge-subtree.sh\nindex b8e8b6f642..55ae58584a 100755\n--- a/t/t6409-merge-subtree.sh\n+++ b/t/t6409-merge-subtree.sh\n@@ -14,10 +14,10 @@ test_expect_success setup '\n \techo >>hello world &&\n \tgit add hello &&\n \tgit commit -m second &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tfor i in mundo $s; do echo $i; done >hello &&\n \tgit add hello &&\n-\tgit commit -m master\n+\tgit commit -m main\n \n '\n \n@@ -36,7 +36,7 @@ test_expect_success 'setup branch sub' '\n '\n \n test_expect_success 'setup topic branch' '\n-\tgit checkout -b topic master &&\n+\tgit checkout -b topic main &&\n \tgit merge -s ours --no-commit --allow-unrelated-histories sub &&\n \tgit read-tree --prefix=dir/ -u sub &&\n \tgit commit -m \"initial merge of sub into topic\" &&\n@@ -77,8 +77,8 @@ test_expect_success 'setup' '\n \n test_expect_success 'initial merge' '\n \tgit remote add -f gui ../git-gui &&\n-\tgit merge -s ours --no-commit --allow-unrelated-histories gui/master &&\n-\tgit read-tree --prefix=git-gui/ -u gui/master &&\n+\tgit merge -s ours --no-commit --allow-unrelated-histories gui/main &&\n+\tgit read-tree --prefix=git-gui/ -u gui/main &&\n \tgit commit -m \"Merge git-gui as our subdirectory\" &&\n \tgit checkout -b work &&\n \tgit ls-files -s >actual &&\n@@ -108,10 +108,10 @@ test_expect_success 'merge update' '\n \n test_expect_success 'initial ambiguous subtree' '\n \tcd ../git &&\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b topic_2 &&\n-\tgit merge -s ours --no-commit gui/master &&\n-\tgit read-tree --prefix=git-gui2/ -u gui/master &&\n+\tgit merge -s ours --no-commit gui/main &&\n+\tgit read-tree --prefix=git-gui2/ -u gui/main &&\n \tgit commit -m \"Merge git-gui2 as our subdirectory\" &&\n \tgit checkout -b work2 &&\n \tgit ls-files -s >actual &&\ndiff --git a/t/t6411-merge-filemode.sh b/t/t6411-merge-filemode.sh\nindex 87741efad3..7ded226de4 100755\n--- a/t/t6411-merge-filemode.sh\n+++ b/t/t6411-merge-filemode.sh\n@@ -7,11 +7,11 @@ test_expect_success 'set up mode change in one branch' '\n \t: >file1 &&\n \tgit add file1 &&\n \tgit commit -m initial &&\n-\tgit checkout -b a1 master &&\n+\tgit checkout -b a1 main &&\n \t: >dummy &&\n \tgit add dummy &&\n \tgit commit -m a &&\n-\tgit checkout -b b1 master &&\n+\tgit checkout -b b1 main &&\n \ttest_chmod +x file1 &&\n \tgit add file1 &&\n \tgit commit -m b1\n@@ -39,12 +39,12 @@ do_one_mode resolve b1 a1\n \n test_expect_success 'set up mode change in both branches' '\n \tgit reset --hard HEAD &&\n-\tgit checkout -b a2 master &&\n+\tgit checkout -b a2 main &&\n \t: >file2 &&\n \tH=$(git hash-object file2) &&\n \ttest_chmod +x file2 &&\n \tgit commit -m a2 &&\n-\tgit checkout -b b2 master &&\n+\tgit checkout -b b2 main &&\n \t: >file2 &&\n \tgit add file2 &&\n \tgit commit -m b2 &&\n@@ -76,7 +76,7 @@ do_both_modes resolve\n \n test_expect_success 'set up delete/modechange scenario' '\n \tgit reset --hard &&\n-\tgit checkout -b deletion master &&\n+\tgit checkout -b deletion main &&\n \tgit rm file1 &&\n \tgit commit -m deletion\n '\ndiff --git a/t/t6412-merge-large-rename.sh b/t/t6412-merge-large-rename.sh\nindex 80777386dc..489ebd9bb7 100755\n--- a/t/t6412-merge-large-rename.sh\n+++ b/t/t6412-merge-large-rename.sh\n@@ -30,7 +30,7 @@ test_rename() {\n \ttest_expect_success \"rename ($1, $2)\" '\n \tn='$1' &&\n \texpect='$2' &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \ttest_might_fail git branch -D test$n &&\n \tgit reset --hard initial &&\n \tfor i in $(count $n); do\n@@ -50,8 +50,8 @@ test_rename() {\n \tgit add . &&\n \tgit commit -m change+rename=$n &&\n \tcase \"$expect\" in\n-\t\tok) git merge master ;;\n-\t\t *) test_must_fail git merge master ;;\n+\t\tok) git merge main ;;\n+\t\t *) test_must_fail git merge main ;;\n \tesac\n \t'\n }\ndiff --git a/t/t6413-merge-crlf.sh b/t/t6413-merge-crlf.sh\nindex e8d65eefb5..feaf9ef1a0 100755\n--- a/t/t6413-merge-crlf.sh\n+++ b/t/t6413-merge-crlf.sh\n@@ -24,7 +24,7 @@ test_expect_success setup '\n \techo line from b | append_cr >file &&\n \tgit commit -m \"add line from b\" file &&\n \tgit tag b &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'Check \"ours\" is CRLF' '\ndiff --git a/t/t6414-merge-rename-nocruft.sh b/t/t6414-merge-rename-nocruft.sh\nindex a25e730460..81fa89331c 100755\n--- a/t/t6414-merge-rename-nocruft.sh\n+++ b/t/t6414-merge-rename-nocruft.sh\n@@ -65,7 +65,7 @@ test_expect_success 'setup' '\n \tgit update-index A &&\n \tgit commit -m \"blue modify A\" &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n # This test broke in 65ac6e9c3f47807cb603af07a6a9e1a43bc119ae\ndiff --git a/t/t6415-merge-dir-to-symlink.sh b/t/t6415-merge-dir-to-symlink.sh\nindex 2eddcc7664..3bbabbee49 100755\n--- a/t/t6415-merge-dir-to-symlink.sh\n+++ b/t/t6415-merge-dir-to-symlink.sh\n@@ -19,7 +19,7 @@ test_expect_success 'create a commit where dir a/b changed to symlink' '\n \n test_expect_success 'checkout does not clobber untracked symlink' '\n \tgit checkout HEAD^0 &&\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit rm --cached a/b &&\n \tgit commit -m \"untracked symlink remains\" &&\n \ttest_must_fail git checkout start^0\n@@ -27,7 +27,7 @@ test_expect_success 'checkout does not clobber untracked symlink' '\n \n test_expect_success 'a/b-2/c/d is kept when clobbering symlink b' '\n \tgit checkout HEAD^0 &&\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit rm --cached a/b &&\n \tgit commit -m \"untracked symlink remains\" &&\n \tgit checkout -f start^0 &&\n@@ -36,7 +36,7 @@ test_expect_success 'a/b-2/c/d is kept when clobbering symlink b' '\n \n test_expect_success 'checkout should not have deleted a/b-2/c/d' '\n \tgit checkout HEAD^0 &&\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \t git checkout start^0 &&\n \t test_path_is_file a/b-2/c/d\n '\n@@ -53,7 +53,7 @@ test_expect_success 'setup for merge test' '\n test_expect_success 'Handle D/F conflict, do not lose a/b-2/c/d in merge (resolve)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n-\tgit merge -s resolve master &&\n+\tgit merge -s resolve main &&\n \ttest_path_is_file a/b-2/c/d\n '\n \n@@ -64,7 +64,7 @@ test_expect_success SYMLINKS 'a/b was resolved as symlink' '\n test_expect_success 'Handle D/F conflict, do not lose a/b-2/c/d in merge (recursive)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n-\tgit merge -s recursive master &&\n+\tgit merge -s recursive main &&\n \ttest_path_is_file a/b-2/c/d\n '\n \n@@ -74,7 +74,7 @@ test_expect_success SYMLINKS 'a/b was resolved as symlink' '\n \n test_expect_success 'Handle F/D conflict, do not lose a/b-2/c/d in merge (resolve)' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit merge -s resolve baseline^0 &&\n \ttest_path_is_file a/b-2/c/d\n '\n@@ -85,7 +85,7 @@ test_expect_success SYMLINKS 'a/b was resolved as symlink' '\n \n test_expect_success 'Handle F/D conflict, do not lose a/b-2/c/d in merge (recursive)' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit merge -s recursive baseline^0 &&\n \ttest_path_is_file a/b-2/c/d\n '\n@@ -98,7 +98,7 @@ test_expect_failure 'do not lose untracked in merge (resolve)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n \t>a/b/c/e &&\n-\ttest_must_fail git merge -s resolve master &&\n+\ttest_must_fail git merge -s resolve main &&\n \ttest_path_is_file a/b/c/e &&\n \ttest_path_is_file a/b-2/c/d\n '\n@@ -107,7 +107,7 @@ test_expect_success 'do not lose untracked in merge (recursive)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n \t>a/b/c/e &&\n-\ttest_must_fail git merge -s recursive master &&\n+\ttest_must_fail git merge -s recursive main &&\n \ttest_path_is_file a/b/c/e &&\n \ttest_path_is_file a/b-2/c/d\n '\n@@ -116,14 +116,14 @@ test_expect_success 'do not lose modifications in merge (resolve)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n \techo more content >>a/b/c/d &&\n-\ttest_must_fail git merge -s resolve master\n+\ttest_must_fail git merge -s resolve main\n '\n \n test_expect_success 'do not lose modifications in merge (recursive)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n \techo more content >>a/b/c/d &&\n-\ttest_must_fail git merge -s recursive master\n+\ttest_must_fail git merge -s recursive main\n '\n \n test_expect_success 'setup a merge where dir a/b-2 changed to symlink' '\ndiff --git a/t/t6416-recursive-corner-cases.sh b/t/t6416-recursive-corner-cases.sh\nindex dbccc3158a..b43ecb38b7 100755\n--- a/t/t6416-recursive-corner-cases.sh\n+++ b/t/t6416-recursive-corner-cases.sh\n@@ -385,7 +385,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete' '\n \t\ttest_line_count = 2 out &&\n \n \t\tgit rev-parse >expect       \\\n-\t\t\tmaster:file    B:file &&\n+\t\t\tmain:file    B:file &&\n \t\tgit rev-parse   >actual      \\\n \t\t\t:1:file      :2:file &&\n \t\ttest_cmp expect actual\n@@ -407,7 +407,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete, rev\n \t\ttest_line_count = 2 out &&\n \n \t\tgit rev-parse >expect       \\\n-\t\t\tmaster:file    B:file &&\n+\t\t\tmain:file    B:file &&\n \t\tgit rev-parse   >actual      \\\n \t\t\t:1:file      :3:file &&\n \t\ttest_cmp expect actual\n@@ -1553,12 +1553,12 @@ test_expect_failure 'check conflicting modes for regular file' '\n # Setup:\n #          L1---L2\n #         /  \\ /  \\\n-#     master    X    ?\n+#     main    X    ?\n #         \\  / \\  /\n #          R1---R2\n #\n # Where:\n-#   master has two files, named 'b' and 'a'\n+#   main has two files, named 'b' and 'a'\n #   branches L1 and R1 both modify each of the two files in conflicting ways\n #\n #   L2 is a merge of R1 into L1; more on it later.\n@@ -1663,7 +1663,7 @@ test_expect_success 'check nested conflicts' '\n \t\tcd nested_conflicts &&\n \n \t\tgit clean -f &&\n-\t\tMASTER=$(git rev-parse --short master) &&\n+\t\tMAIN=$(git rev-parse --short main) &&\n \t\tgit checkout L2^0 &&\n \n \t\t# Merge must fail; there is a conflict\n@@ -1679,24 +1679,24 @@ test_expect_success 'check nested conflicts' '\n \t\ttest_line_count = 1 out &&\n \n \t\t# Create a and b from virtual merge base X\n-\t\tgit cat-file -p master:a >base &&\n+\t\tgit cat-file -p main:a >base &&\n \t\tgit cat-file -p L1:a >ours &&\n \t\tgit cat-file -p R1:a >theirs &&\n \t\ttest_must_fail git merge-file --diff3 \\\n \t\t\t-L \"Temporary merge branch 1\" \\\n-\t\t\t-L \"$MASTER\"  \\\n+\t\t\t-L \"$MAIN\"  \\\n \t\t\t-L \"Temporary merge branch 2\" \\\n \t\t\tours  \\\n \t\t\tbase  \\\n \t\t\ttheirs &&\n \t\tsed -e \"s/^\\([<|=>]\\)/\\1\\1/\" ours >vmb_a &&\n \n-\t\tgit cat-file -p master:b >base &&\n+\t\tgit cat-file -p main:b >base &&\n \t\tgit cat-file -p L1:b >ours &&\n \t\tgit cat-file -p R1:b >theirs &&\n \t\ttest_must_fail git merge-file --diff3 \\\n \t\t\t-L \"Temporary merge branch 1\" \\\n-\t\t\t-L \"$MASTER\"  \\\n+\t\t\t-L \"$MAIN\"  \\\n \t\t\t-L \"Temporary merge branch 2\" \\\n \t\t\tours  \\\n \t\t\tbase  \\\n@@ -1748,12 +1748,12 @@ test_expect_success 'check nested conflicts' '\n # Setup:\n #          L1---L2---L3\n #         /  \\ /  \\ /  \\\n-#     master    X1   X2   ?\n+#     main    X1   X2   ?\n #         \\  / \\  / \\  /\n #          R1---R2---R3\n #\n # Where:\n-#   master has one file named 'content'\n+#   main has one file named 'content'\n #   branches L1 and R1 both modify each of the two files in conflicting ways\n #\n #   L<n> (n>1) is a merge of R<n-1> into L<n-1>\n@@ -1834,7 +1834,7 @@ test_expect_success 'check virtual merge base with nested conflicts' '\n \t(\n \t\tcd virtual_merge_base_has_nested_conflicts &&\n \n-\t\tMASTER=$(git rev-parse --short master) &&\n+\t\tMAIN=$(git rev-parse --short main) &&\n \t\tgit checkout L3^0 &&\n \n \t\t# Merge must fail; there is a conflict\n@@ -1857,13 +1857,13 @@ test_expect_success 'check virtual merge base with nested conflicts' '\n \t\t# Imitate X1 merge base, except without long enough conflict\n \t\t# markers because a subsequent sed will modify them.  Put\n \t\t# result into vmb.\n-\t\tgit cat-file -p master:content >base &&\n+\t\tgit cat-file -p main:content >base &&\n \t\tgit cat-file -p L:content >left &&\n \t\tgit cat-file -p R:content >right &&\n \t\tcp left merged-once &&\n \t\ttest_must_fail git merge-file --diff3 \\\n \t\t\t-L \"Temporary merge branch 1\" \\\n-\t\t\t-L \"$MASTER\"  \\\n+\t\t\t-L \"$MAIN\"  \\\n \t\t\t-L \"Temporary merge branch 2\" \\\n \t\t\tmerged-once \\\n \t\t\tbase        \\\ndiff --git a/t/t6417-merge-ours-theirs.sh b/t/t6417-merge-ours-theirs.sh\nindex 0aebc6c028..4bb77b9779 100755\n--- a/t/t6417-merge-ours-theirs.sh\n+++ b/t/t6417-merge-ours-theirs.sh\n@@ -20,11 +20,11 @@ test_expect_success setup '\n \tsed -e \"s/9/nueve/\" >file <elif &&\n \tgit commit -a -m theirs &&\n \n-\tgit checkout master^0\n+\tgit checkout main^0\n '\n \n test_expect_success 'plain recursive - should conflict' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \ttest_must_fail git merge -s recursive side &&\n \tgrep nine file &&\n \tgrep nueve file &&\n@@ -34,7 +34,7 @@ test_expect_success 'plain recursive - should conflict' '\n '\n \n test_expect_success 'recursive favouring theirs' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit merge -s recursive -Xtheirs side &&\n \t! grep nine file &&\n \tgrep nueve file &&\n@@ -44,7 +44,7 @@ test_expect_success 'recursive favouring theirs' '\n '\n \n test_expect_success 'recursive favouring ours' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit merge -s recursive -X ours side &&\n \tgrep nine file &&\n \t! grep nueve file &&\n@@ -56,26 +56,26 @@ test_expect_success 'recursive favouring ours' '\n test_expect_success 'binary file with -Xours/-Xtheirs' '\n \techo file binary >.gitattributes &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit merge -s recursive -X theirs side &&\n \tgit diff --exit-code side HEAD -- file &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit merge -s recursive -X ours side &&\n-\tgit diff --exit-code master HEAD -- file\n+\tgit diff --exit-code main HEAD -- file\n '\n \n test_expect_success 'pull passes -X to underlying merge' '\n-\tgit reset --hard master && git pull -s recursive -Xours . side &&\n-\tgit reset --hard master && git pull -s recursive -X ours . side &&\n-\tgit reset --hard master && git pull -s recursive -Xtheirs . side &&\n-\tgit reset --hard master && git pull -s recursive -X theirs . side &&\n-\tgit reset --hard master && test_must_fail git pull -s recursive -X bork . side\n+\tgit reset --hard main && git pull -s recursive -Xours . side &&\n+\tgit reset --hard main && git pull -s recursive -X ours . side &&\n+\tgit reset --hard main && git pull -s recursive -Xtheirs . side &&\n+\tgit reset --hard main && git pull -s recursive -X theirs . side &&\n+\tgit reset --hard main && test_must_fail git pull -s recursive -X bork . side\n '\n \n test_expect_success SYMLINKS 'symlink with -Xours/-Xtheirs' '\n-\tgit reset --hard master &&\n-\tgit checkout -b two master &&\n+\tgit reset --hard main &&\n+\tgit checkout -b two main &&\n \tln -s target-zero link &&\n \tgit add link &&\n \tgit commit -m \"add link pointing to zero\" &&\ndiff --git a/t/t6418-merge-text-auto.sh b/t/t6418-merge-text-auto.sh\nindex 30983d18b1..b8df80d2df 100755\n--- a/t/t6418-merge-text-auto.sh\n+++ b/t/t6418-merge-text-auto.sh\n@@ -2,13 +2,13 @@\n \n test_description='CRLF merge conflict across text=auto change\n \n-* [master] remove .gitattributes\n+* [main] remove .gitattributes\n  ! [side] add line from b\n --\n  + [side] add line from b\n-*  [master] remove .gitattributes\n-*  [master^] add line from a\n-*  [master~2] normalize file\n+*  [main] remove .gitattributes\n+*  [main^] add line from a\n+*  [main~2] normalize file\n *+ [side^] Initial\n '\n \n@@ -64,7 +64,7 @@ test_expect_success setup '\n \tgit commit -m \"add line from b\" &&\n \tgit tag b &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'set up fuzz_conflict() helper' '\n@@ -195,7 +195,7 @@ test_expect_success 'Test delete/normalize conflict' '\n \tgit reset --hard initial &&\n \tgit rm file &&\n \tgit commit -m \"remove file\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard a^ &&\n \tgit merge side &&\n \ttest_path_is_missing file\ndiff --git a/t/t6419-merge-ignorecase.sh b/t/t6419-merge-ignorecase.sh\nindex 531850d834..d32bbb3359 100755\n--- a/t/t6419-merge-ignorecase.sh\n+++ b/t/t6419-merge-ignorecase.sh\n@@ -20,18 +20,18 @@ test_expect_success 'merge with case-changing rename' '\n \t>foo &&\n \tgit add foo &&\n \tgit commit -m \"intervening commit\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit rm TestCase &&\n \t>testcase &&\n \tgit add testcase &&\n \tgit commit -m \"rename to testcase\" &&\n \tgit checkout with-camel &&\n-\tgit merge master -m \"merge\" &&\n+\tgit merge main -m \"merge\" &&\n \ttest_path_is_file testcase\n '\n \n test_expect_success 'merge with case-changing rename on both sides' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard baseline &&\n \tgit branch -D with-camel &&\n \tgit checkout -b with-camel &&\n@@ -40,13 +40,13 @@ test_expect_success 'merge with case-changing rename on both sides' '\n \t>foo &&\n \tgit add foo &&\n \tgit commit -m \"intervening commit\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit rm TestCase &&\n \t>testcase &&\n \tgit add testcase &&\n \tgit commit -m \"rename to testcase\" &&\n \tgit checkout with-camel &&\n-\tgit merge master -m \"merge\" &&\n+\tgit merge main -m \"merge\" &&\n \ttest_path_is_file testcase\n '\n \ndiff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh\nindex e40a1b686f..21c64b51be 100755\n--- a/t/t6422-merge-rename-corner-cases.sh\n+++ b/t/t6422-merge-rename-corner-cases.sh\n@@ -1130,7 +1130,7 @@ test_conflicts_with_adds_and_renames() {\n \t# Setup:\n \t#          L\n \t#         / \\\n-\t#     master   ?\n+\t#     main   ?\n \t#         \\ /\n \t#          R\n \t#\n@@ -1260,7 +1260,7 @@ test_conflicts_with_adds_and_renames() {\n \t\t\t\t:2:three           \\\n \t\t\t\t:3:three           &&\n \t\t\tgit rev-parse >expected        \\\n-\t\t\t\tmaster:irrelevant_file \\\n+\t\t\t\tmain:irrelevant_file \\\n \t\t\t\tfile_v2                \\\n \t\t\t\tfile_v4                &&\n \t\t\ttest_cmp expected actual &&\n@@ -1290,12 +1290,12 @@ test_conflicts_with_adds_and_renames add    add\n # Setup:\n #          L\n #         / \\\n-#     master   ?\n+#     main   ?\n #         \\ /\n #          R\n #\n # Where:\n-#   master has two files, named 'one' and 'two'.\n+#   main has two files, named 'one' and 'two'.\n #   branches L and R both modify 'one', in conflicting ways.\n #   branches L and R both modify 'two', in conflicting ways.\n #   branch L also renames 'one' to 'three'.\n@@ -1376,7 +1376,7 @@ test_expect_success 'check nested conflicts from rename/rename(2to1)' '\n \t\ttest_line_count = 1 out &&\n \n \t\t# Compare :2:three to expected values\n-\t\tgit cat-file -p master:one >base &&\n+\t\tgit cat-file -p main:one >base &&\n \t\tgit cat-file -p L:three >ours &&\n \t\tgit cat-file -p R:one >theirs &&\n \t\ttest_must_fail git merge-file    \\\n@@ -1387,7 +1387,7 @@ test_expect_success 'check nested conflicts from rename/rename(2to1)' '\n \t\ttest_cmp expect L-three &&\n \n \t\t# Compare :2:three to expected values\n-\t\tgit cat-file -p master:two >base &&\n+\t\tgit cat-file -p main:two >base &&\n \t\tgit cat-file -p L:two >ours &&\n \t\tgit cat-file -p R:three >theirs &&\n \t\ttest_must_fail git merge-file    \\\ndiff --git a/t/t6425-merge-rename-delete.sh b/t/t6425-merge-rename-delete.sh\nindex f79d021590..2d39bf630e 100755\n--- a/t/t6425-merge-rename-delete.sh\n+++ b/t/t6425-merge-rename-delete.sh\n@@ -12,7 +12,7 @@ test_expect_success 'rename/delete' '\n \tgit mv A B &&\n \tgit commit -m \"rename\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit rm A &&\n \tgit commit -m \"delete\" &&\n \ndiff --git a/t/t6427-diff3-conflict-markers.sh b/t/t6427-diff3-conflict-markers.sh\nindex f7620e677c..b28966d0f4 100755\n--- a/t/t6427-diff3-conflict-markers.sh\n+++ b/t/t6427-diff3-conflict-markers.sh\n@@ -43,7 +43,7 @@ test_expect_success 'check no merge base' '\n # Setup:\n #          L1\n #         /  \\\n-#     master    ?\n+#     main    ?\n #         \\  /\n #          R1\n #\n@@ -90,18 +90,18 @@ test_expect_success 'check unique merge base' '\n \t\tcd unique_merge_base &&\n \n \t\tgit checkout L^0 &&\n-\t\tMASTER=$(git rev-parse --short master) &&\n+\t\tMAIN=$(git rev-parse --short main) &&\n \n \t\ttest_must_fail git -c merge.conflictstyle=diff3 merge -s recursive R^0 &&\n \n-\t\tgrep \"|||||| $MASTER:content\" renamed\n+\t\tgrep \"|||||| $MAIN:content\" renamed\n \t)\n '\n \n # Setup:\n #          L1---L2--L3\n #         /  \\ /      \\\n-#     master    X1       ?\n+#     main    X1       ?\n #         \\  / \\      /\n #          R1---R2--R3\n #\n@@ -191,10 +191,10 @@ test_expect_success 'rebase --merge describes parent of commit being picked' '\n \t(\n \t\tcd rebase &&\n \t\ttest_commit base file &&\n-\t\ttest_commit master file &&\n+\t\ttest_commit main file &&\n \t\tgit checkout -b side HEAD^ &&\n \t\ttest_commit side file &&\n-\t\ttest_must_fail git -c merge.conflictstyle=diff3 rebase --merge master &&\n+\t\ttest_must_fail git -c merge.conflictstyle=diff3 rebase --merge main &&\n \t\tgrep \"||||||| parent of\" file\n \t)\n '\n@@ -203,7 +203,7 @@ test_expect_success 'rebase --apply describes fake ancestor base' '\n \t(\n \t\tcd rebase &&\n \t\tgit rebase --abort &&\n-\t\ttest_must_fail git -c merge.conflictstyle=diff3 rebase --apply master &&\n+\t\ttest_must_fail git -c merge.conflictstyle=diff3 rebase --apply main &&\n \t\tgrep \"||||||| constructed merge base\" file\n \t)\n '\ndiff --git a/t/t6430-merge-recursive.sh b/t/t6430-merge-recursive.sh\nindex 9c08e63af2..4bc8cc764b 100755\n--- a/t/t6430-merge-recursive.sh\n+++ b/t/t6430-merge-recursive.sh\n@@ -35,7 +35,7 @@ test_expect_success 'setup 1' '\n \tgit add a d/e &&\n \n \ttest_tick &&\n-\tgit commit -m \"master modifies a and d/e\" &&\n+\tgit commit -m \"main modifies a and d/e\" &&\n \tc1=$(git rev-parse --verify HEAD) &&\n \t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n@@ -466,7 +466,7 @@ test_expect_success SYMLINKS 'dir in working tree with symlink ancestor does not\n \t\tgit checkout -b branch1 &&\n \t\tgit commit --allow-empty -m \"empty commit\" &&\n \n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit rm foo &&\n \t\tmkdir foo &&\n \t\t>foo/bar &&\n@@ -475,7 +475,7 @@ test_expect_success SYMLINKS 'dir in working tree with symlink ancestor does not\n \n \t\tgit checkout branch1 &&\n \n-\t\tgit cherry-pick master &&\n+\t\tgit cherry-pick main &&\n \t\ttest_path_is_dir foo &&\n \t\ttest_path_is_file foo/bar\n \t)\n@@ -490,8 +490,8 @@ test_expect_success 'reset and 3-way merge' '\n \n test_expect_success 'reset and bind merge' '\n \n-\tgit reset --hard master &&\n-\tgit read-tree --prefix=M/ master &&\n+\tgit reset --hard main &&\n+\tgit read-tree --prefix=M/ main &&\n \tgit ls-files -s >actual &&\n \t(\n \t\techo \"100644 $o1 0\tM/a\" &&\n@@ -505,7 +505,7 @@ test_expect_success 'reset and bind merge' '\n \t) >expected &&\n \ttest_cmp expected actual &&\n \n-\tgit read-tree --prefix=a1/ master &&\n+\tgit read-tree --prefix=a1/ main &&\n \tgit ls-files -s >actual &&\n \t(\n \t\techo \"100644 $o1 0\tM/a\" &&\n@@ -523,7 +523,7 @@ test_expect_success 'reset and bind merge' '\n \t) >expected &&\n \ttest_cmp expected actual &&\n \n-\tgit read-tree --prefix=z/ master &&\n+\tgit read-tree --prefix=z/ main &&\n \tgit ls-files -s >actual &&\n \t(\n \t\techo \"100644 $o1 0\tM/a\" &&\n@@ -599,11 +599,11 @@ test_expect_success 'merge-recursive w/ empty work tree - theirs has rename' '\n \n test_expect_success 'merge removes empty directories' '\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b rm &&\n \tgit rm d/e &&\n \tgit commit -mremoved-d/e &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge -s recursive rm &&\n \ttest_path_is_missing d\n '\ndiff --git a/t/t6432-merge-recursive-space-options.sh b/t/t6432-merge-recursive-space-options.sh\nindex b56180ee4a..4eda1dd444 100755\n--- a/t/t6432-merge-recursive-space-options.sh\n+++ b/t/t6432-merge-recursive-space-options.sh\n@@ -2,11 +2,11 @@\n \n test_description='merge-recursive space options\n \n-* [master] Clarify\n+* [main] Clarify\n  ! [remote] Remove cruft\n --\n  + [remote] Remove cruft\n-*  [master] Clarify\n+*  [main] Clarify\n *+ [remote^] Initial revision\n *   ok 1: setup\n '\n@@ -87,7 +87,7 @@ test_expect_success 'setup' '\n \tmv text.txt+ text.txt &&\n \tgit commit -a -m \"Remove cruft\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tsed -e \"\n \t\t\ts/\\(not in his right mind\\),\\(.*\\)/\\1;\\2Q/\n \t\t\ts/Quite correct\\(.*\\)/It is too correct\\1Q/\ndiff --git a/t/t6433-merge-toplevel.sh b/t/t6433-merge-toplevel.sh\nindex e29c284b9b..fdbd095cde 100755\n--- a/t/t6433-merge-toplevel.sh\n+++ b/t/t6433-merge-toplevel.sh\n@@ -5,7 +5,7 @@ test_description='\"git merge\" top-level frontend'\n . ./test-lib.sh\n \n t3033_reset () {\n-\tgit checkout -B master two &&\n+\tgit checkout -B main two &&\n \tgit branch -f left three &&\n \tgit branch -f right four\n }\n@@ -21,7 +21,7 @@ test_expect_success setup '\n \ttest_commit four &&\n \tgit checkout --orphan newroot &&\n \ttest_commit five &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n # Local branches\n@@ -61,7 +61,7 @@ test_expect_success 'merge octopus, non-fast-forward (ff)' '\n test_expect_success 'merge octopus, fast-forward (does not ff)' '\n \tt3033_reset &&\n \tgit merge left right &&\n-\t# two (master) is not an ancestor of three (left) and four (right)\n+\t# two (main) is not an ancestor of three (left) and four (right)\n \ttest_must_fail git rev-parse --verify HEAD^4 &&\n \tgit rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&\n \tgit rev-parse two three four | sort >expect &&\n@@ -118,7 +118,7 @@ test_expect_success 'merge FETCH_HEAD octopus fast-forward (does not ff)' '\n \tt3033_reset &&\n \tgit fetch . left right &&\n \tgit merge FETCH_HEAD &&\n-\t# two (master) is not an ancestor of three (left) and four (right)\n+\t# two (main) is not an ancestor of three (left) and four (right)\n \ttest_must_fail git rev-parse --verify HEAD^4 &&\n \tgit rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&\n \tgit rev-parse two three four | sort >expect &&\ndiff --git a/t/t6434-merge-recursive-rename-options.sh b/t/t6434-merge-recursive-rename-options.sh\nindex 3d9fae68c4..1203984101 100755\n--- a/t/t6434-merge-recursive-rename-options.sh\n+++ b/t/t6434-merge-recursive-rename-options.sh\n@@ -5,11 +5,11 @@ test_description='merge-recursive rename options\n Test rename detection by examining rename/delete conflicts.\n \n * (HEAD -> rename) rename\n-| * (master) delete\n+| * (main) delete\n |/\n * base\n \n-git diff --name-status base master\n+git diff --name-status base main\n D\t0-old\n D\t1-old\n D\t2-old\n@@ -118,7 +118,7 @@ test_expect_success 'setup repo' '\n \tget_expected_stages 2 &&\n \tget_expected_stages 3 &&\n \tcheck_50=\"false\" &&\n-\ttail=\"HEAD^ -- HEAD master\"\n+\ttail=\"HEAD^ -- HEAD main\"\n '\n \n test_expect_success 'setup thresholds' '\ndiff --git a/t/t6436-merge-overwrite.sh b/t/t6436-merge-overwrite.sh\nindex dd9376842f..8efe96dc8c 100755\n--- a/t/t6436-merge-overwrite.sh\n+++ b/t/t6436-merge-overwrite.sh\n@@ -193,7 +193,7 @@ test_expect_success 'set up unborn branch and content' '\n '\n \n test_expect_success 'will not clobber WT/index when merging into unborn' '\n-\tgit merge master &&\n+\tgit merge main &&\n \tgrep foo tracked-file &&\n \tgit show :tracked-file >expect &&\n \tgrep foo expect &&\ndiff --git a/t/t6437-submodule-merge.sh b/t/t6437-submodule-merge.sh\nindex 3ead2b726f..d71e9410b9 100755\n--- a/t/t6437-submodule-merge.sh\n+++ b/t/t6437-submodule-merge.sh\n@@ -27,7 +27,7 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m root &&\n \n-\tgit checkout -b a master &&\n+\tgit checkout -b a main &&\n \t(cd sub &&\n \t echo A > file &&\n \t git add file &&\n@@ -37,7 +37,7 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m a &&\n \n-\tgit checkout -b b master &&\n+\tgit checkout -b b main &&\n \t(cd sub &&\n \t echo B > file &&\n \t git add file &&\n@@ -254,22 +254,22 @@ test_expect_success 'setup for recursive merge with submodule' '\n \t (cd sub &&\n \t  git init &&\n \t  test_commit a &&\n-\t  git checkout -b sub-b master &&\n+\t  git checkout -b sub-b main &&\n \t  test_commit b &&\n-\t  git checkout -b sub-c master &&\n+\t  git checkout -b sub-c main &&\n \t  test_commit c &&\n \t  git checkout -b sub-bc sub-b &&\n \t  git merge sub-c &&\n \t  git checkout -b sub-cb sub-c &&\n \t  git merge sub-b &&\n-\t  git checkout master) &&\n+\t  git checkout main) &&\n \t git add sub &&\n \t git commit -m a &&\n-\t git checkout -b top-b master &&\n+\t git checkout -b top-b main &&\n \t (cd sub && git checkout sub-b) &&\n \t git add sub &&\n \t git commit -m b &&\n-\t git checkout -b top-c master &&\n+\t git checkout -b top-c main &&\n \t (cd sub && git checkout sub-c) &&\n \t git add sub &&\n \t git commit -m c &&\ndiff --git a/t/t6439-merge-co-error-msgs.sh b/t/t6439-merge-co-error-msgs.sh\nindex 5c8894d94f..cd87fe6dd4 100755\n--- a/t/t6439-merge-co-error-msgs.sh\n+++ b/t/t6439-merge-co-error-msgs.sh\n@@ -18,7 +18,7 @@ test_expect_success 'setup' '\n \tgit add two three four five &&\n \tgit commit -m Second &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo other >two &&\n \techo other >three &&\n \techo other >four &&\n@@ -83,7 +83,7 @@ test_expect_success 'cannot switch branches because of local changes' '\n \techo two >rep/two &&\n \tgit add rep/one rep/two &&\n \tgit commit -m Fourth &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo uno >rep/one &&\n \techo dos >rep/two &&\n \ttest_must_fail git checkout branch 2>out &&\n@@ -128,7 +128,7 @@ test_expect_success 'not_uptodate_dir porcelain checkout error' '\n \t>rep2 &&\n \tgit add rep rep2 &&\n \tgit commit -m \"added test as a file\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \t>rep/untracked-file &&\n \t>rep2/untracked-file &&\n \ttest_must_fail git checkout branch 2>out &&\ndiff --git a/t/t6501-freshen-objects.sh b/t/t6501-freshen-objects.sh\nindex 8a3bb4105b..2f2b89f229 100755\n--- a/t/t6501-freshen-objects.sh\n+++ b/t/t6501-freshen-objects.sh\n@@ -67,7 +67,7 @@ for repack in '' true; do\n \t\tgit checkout -b experiment &&\n \t\tcommit abandon &&\n \t\tmaybe_repack &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit branch -D experiment\n \t'\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 255eb24e5d..2f9c584fab 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -263,7 +263,7 @@ case \"$TEST_NUMBER\" in\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-[0-5]*|6[0-3]*)\n+[0-6]*)\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \t;;\n-- \ngitgitgadget\n\n"},{"id":"410118","messageId":"xmqqpn4b6bru.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"nycvar.QRO.7.76.6.2011171651130.18437@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-17T19:09:25Z","receivedAt":"2020-11-17T19:09:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi Junio,\n>\n> On Mon, 16 Nov 2020, Junio C Hamano wrote:\n>\n>> Junio C Hamano <gitster@pobox.com> writes:\n>>\n>> >    Some test scripts may require setting init.defaultBranch='master'\n>> >    at the top in the 'setup' part (I've shown how in my response to\n>> >    t4013 patchset) if the body of the test relies too heavily on the\n>> >    primary branch to be 'master'.\n>>\n>> Ah, I realized we have much better mechanism already in the form of\n>> GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME environment.\n>>\n>> So, my three wishes in this message now become\n>>\n>>  - lose PREPARE_FOR_MAIN_BRANCH prerequisite as quickly as possible\n>\n> Okay, we're on the same page here.\n\nYeah, you may have noticed after reading my recent messages to this\ntopic, my initial reaction was mostly triggered by \"eh, are we\nlosing test coverage too much?\" before re-reading what the patches\n(both what we have already merged and these 28 final stretch\npatches) actually do, and realizing that they aim at preparing us so\nthat we can flip the fallback default any time we like.  So we are\nvery much on the same page.\n\n> That's precisely what I do, incrementally, by adjusting that `case`\n> statement in `t/test-lib.sh` whenever a range of test scripts has been\n> transitioned. In patch 2/28, it looks like this:\n>\n> \tcase \"$TEST_NUMBER\" in\n> \t[01]*)\n> \t       GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n> \t       export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n> \t       ;;\n> \tesac\n>\n> By patch 26/28, it looks like this:\n>\n> \tcase \"$TEST_NUMBER\" in\n> \t3404|4013|5310|5526|6300|7064|7817|9902)\n> \t\t# Avoid conflicts with patch series that are cooking at the same\n> \t\t# time\n> \t\t# as the patch series changing the default of\n> \t\t# `init.defaultBranch`.\n> \t\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n> \t\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n> \t\t;;\n> \t*)\n> \t\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n> \t\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n> \t\t;;\n> \tesac\n\nI actually am not a big fan of the centralized table of \"these want\nto run with main\".  My ideal would be to have an explicit assignment\nof either master or main for tests that absolutely require the\ndefault to be one of these names at the top of these script, and any\ntest scripts that do not care what the initial branch is called\n(perhaps because they begin by switching to a branch whose name is\npicked by them immediately after they start and use that name\nthroughout) won't have GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME in them.\n\nI think we can live with a centralized \"case\", but I have trouble\nwith seeing only two arms in the above case statement, whether which\none gets the asterisk.  There may be ones that need to force\n'master', there may be ones that need to force 'main', but hopefully\nmany do not even have to force and can work with either.  And seeing\n\"everything else works only with 'main'\" is a bit disappointing.\n\nBut if you must have a case with only two arms, i.e. \"these are\nexceptions\" and \"everything else\", I think the above (i.e. we\nrefrain from touching these and force them to 'master' as\nexceptions, but everything else is forced to 'main') is better than\nhaving them the other way around.\n\nThanks.\n\n\n"},{"id":"410128","messageId":"87r1oraewl.fsf@x220.int.ebiederm.org","threadId":"54633","inReplyTo":"pull.762.git.1605221038.gitgitgadget@gmail.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Eric W. Biederman","fromEmail":"ebiederm@xmission.com","sentAt":"2020-11-17T20:48:10Z","receivedAt":"2020-11-17T21:07:24Z","isPatch":true,"sender":{"key":"ebiederm@xmission.com","avatar":"https://avatars.githubusercontent.com/u/7477136?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> This is the big one. This changes the default of init.defaultBranch to main,\n> reflecting what many open source projects already did (which was followed by\n> GitHub, Azure Repos and others).\n\nCan we please not simply replace one hard coded branch name with\nanother?\n\nHaving a blessed name for the initially created branch continues to\nimply the branch has special significance.  As the initially created\nbranch does not have special significance can we please do\nsomething that does not imply that?\n\nInstead of having a fixed name across all repos for the initially\ncreated branch can we instead use the directory name of the repo for the\nbranch name?\n\nAdvantages:\n\n- The branch name that is somewhat meaningful to the creator of the git\n  repo.\n\n  I have at least two repos where I wound up doing this by hand.  So at\n  least for me it is something I am doing anyway.\n\n- Tools can not hard code the name of an initially created branch and\n  expect it to work.\n\n  This moves us farther from the realm of people assuming incorrectly\n  that there is something special about the branch created by default.\n\n- As the name is somewhat meaningful.  This change to the initial branch\n  name becomes something that can be argued is a technical improvement\n  rather than a simple political statement.\n\nAt least for my usage main is a pretty huge misnomer as I barely use the\nbranch with the master.  Renaming my unused branch main implies that I\nam using the tool wrong.\n\n\nI don't look in on the git list very often so perhaps I am missing a\nconversation where all of the details were thought through.  If so\nplease point me at that conversation.  Otherwise can we please use this\nopportunity to come up with something that is actually better than\nnaming the default branch main, rather than just something just as\nawkward whose only advantage is that people don't think it is\npolitically incorrect this week.\n\nEric\n"},{"id":"410172","messageId":"CAMP44s2VJOd3N2zaj8YPv0iLOqTF7vWyZ=zPd9vd0+qO1DbEVA@mail.gmail.com","threadId":"54633","inReplyTo":"87r1oraewl.fsf@x220.int.ebiederm.org","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-11-17T22:47:56Z","receivedAt":"2020-11-17T22:48:30Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Tue, Nov 17, 2020 at 3:10 PM Eric W. Biederman <ebiederm@xmission.com> wrote:\n>\n> \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n> > This is the big one. This changes the default of init.defaultBranch to main,\n> > reflecting what many open source projects already did (which was followed by\n> > GitHub, Azure Repos and others).\n>\n> Can we please not simply replace one hard coded branch name with\n> another?\n\nI thought precisely the same thing.\n\nThis should be easy to do if we make \"origin\" be a pseudo ref that\npoints to \"origin/HEAD\" (and we could introduce \"origin/@\").\n\nThat way there will never be a need to type \"origin/master\", or having\nit as an upstream, you can simply set \"origin\" as the upstream\ntracking \"branch\".\n\n> I don't look in on the git list very often so perhaps I am missing a\n> conversation where all of the details were thought through.  If so\n> please point me at that conversation.  Otherwise can we please use this\n> opportunity to come up with something that is actually better than\n> naming the default branch main, rather than just something just as\n> awkward whose only advantage is that people don't think it is\n> politically incorrect this week.\n\nThis is the thread:\n\nhttps://lore.kernel.org/git/CAOAHyQwyXC1Z3v7BZAC+Bq6JBaM7FvBenA-1fcqeDV==apdWDg@mail.gmail.com/\n\nUnfortunately in my opinion the most important topics--like your\nsuggestion--were not even mentioned. Everyone focused on the wrong\nthing (e.g. what would be a better name for \"master\").\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"410174","messageId":"xmqqv9e34mq5.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"87r1oraewl.fsf@x220.int.ebiederm.org","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-17T22:55:46Z","receivedAt":"2020-11-17T22:56:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"ebiederm@xmission.com (Eric W. Biederman) writes:\n\n> \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n>> This is the big one. This changes the default of init.defaultBranch to main,\n>> reflecting what many open source projects already did (which was followed by\n>> GitHub, Azure Repos and others).\n>\n> Can we please not simply replace one hard coded branch name with\n> another?\n>\n> Having a blessed name for the initially created branch continues to\n> imply the branch has special significance.  As the initially created\n> branch does not have special significance can we please do\n> something that does not imply that?\n\nI personally am fond of this line of \"let's not treat one single\nthing any special among others\" approach, but I think the way people\nuse the initially created branch tends to make it special at the end\nof the day.\n\nWhile the project is still in its infancy, you may use that as the\nonly branch until the tree of the project starts to take its shape,\nperhaps with subdirectories dedicated to sources, documentation, and\noverall build procedure, etc.  Then you may start to fork different\nbranches to work on topics that last more than one commit's worth of\ntime and then it is likely you'd use the initially created branch as\nthe integration branch, until you start to need the second and third\nintegration branches.  Like it or not, the primary integration\nbranch would inevitably end up being something more special than\nothers, and it is likely that using the initially created branch for\nthat purpose would be the most convenient.  There however may exist\ntwo or more equally significant branches, not just one special one,\nthough, but it is reasonable to have at least one special one.\n\nI think using some word that is derived from $(basename $(pwd)) as\nthe name of the initial branch may be a more reasonable choice than\nusing any single word that tries to fit everybody (which will *not*\nexist).  When a user says \"git init tinyshell\" to start a project to\ncreate a tiny shell, \"tinyshell\" may be one reasonable choice to\nrefer to its primary integration branch.  Everything that goes into\nit will become part of the tinyshell project.\n\nBut if there is a woke-safe word that can refer to \"the primary\nintegration branch\", calling the initially created branch with that\nword by default is also equally a reasonable approach.  I personally\ndo not like the word 'main' used as such, but the rest of the world\nseems to be moving in that direction, so being consistent with them\nwould help users who want to do\n\n\tmkdir project && cd project\n\tgit init\n\t... some workflow specific 'git config' here ...\n\tgit remote add $URL origin\n\tgit pull origin\n\nand have it be an enhanced equivalent to\n\n\tgit clone $URL project\n\nThe latter will try to find the name used for the primary branch on\nthe other side and use the same name; the former would not work that\nway, but if \"git init\" uses a fallback default that is most common,\nit would hurt less.\n\nIn any case, the updated version of these 28 patches no longer has\nthe final \"switch the fallback default to 'main'\" step, and the good\nthing is that the other 27 patches will help us moving in any\ndirection.  If we choose to dynamically derive the initial branch\nname, these steps make sure that such a change won't break our\ntestsuite.\n\n> Instead of having a fixed name across all repos for the initially\n> created branch can we instead use the directory name of the repo for the\n> branch name?\n>\n> Advantages:\n>\n> - The branch name that is somewhat meaningful to the creator of the git\n>   repo.\n>\n>   I have at least two repos where I wound up doing this by hand.  So at\n>   least for me it is something I am doing anyway.\n\nDirect \"other side\" of the coin is that the name meaningful to the\ncreator may be different from project to project, so those who want\nto try peeking projects that are so far unknown to them will have to\nguess what that meaningful thing is.  When visiting a random github\nrepository and presented by 47 different branches, it would be more\nhelpful for such a visitor to have a reliable \"this is likely to be\nthe primary integration branch\" cue.  Not having a convention is\nworse than having a convention some folks may find suboptimal from\nusability's point of view.\n\n> - Tools can not hard code the name of an initially created branch and\n>   expect it to work.\n\nCannot?  Is this a dogmatic declaration?\n\nIf tools that are meant to work with variety of projects with a\nsingle \"special\" branch and do things relative to that special\nbranch (e.g. perhaps the special branch is the primary integration\nbranch, and the tool may list commits that are not yet in that\nbranch), a toolsmith has multiple choices.  The tool can take the\nname of the \"special\" branch from the end-user to be most flexible,\nof the tool can hardcode the most commonly used name for the\n\"special\" branch to be out-of-the-box useful for majority of\nprojects.  Most sensible folks may do the former, but I do not think\nthe latter is a bad choice.  And even those who do the former has to\nfall back to some hardcoded value when the user didn't give the name\nof the \"special\" branch, because end-users are greedy and will\ndemand such a \"convenience\" feature, saying \"in most repositories,\nthis name is commonly used for the 'special' branch---why force us\nto type the same thing?\"\n\n"},{"id":"410177","messageId":"CAMP44s3750bSdmw4A=KU=UgffOPiQwB8ECk9YRPe8mh50Og8Ow@mail.gmail.com","threadId":"54633","inReplyTo":"xmqqv9e34mq5.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-11-17T23:16:53Z","receivedAt":"2020-11-17T23:17:29Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Tue, Nov 17, 2020 at 4:57 PM Junio C Hamano <gitster@pobox.com> wrote:\n> ebiederm@xmission.com (Eric W. Biederman) writes:\n\n> > - The branch name that is somewhat meaningful to the creator of the git\n> >   repo.\n> >\n> >   I have at least two repos where I wound up doing this by hand.  So at\n> >   least for me it is something I am doing anyway.\n>\n> Direct \"other side\" of the coin is that the name meaningful to the\n> creator may be different from project to project, so those who want\n> to try peeking projects that are so far unknown to them will have to\n> guess what that meaningful thing is.  When visiting a random github\n> repository and presented by 47 different branches, it would be more\n> helpful for such a visitor to have a reliable \"this is likely to be\n> the primary integration branch\" cue.  Not having a convention is\n> worse than having a convention some folks may find suboptimal from\n> usability's point of view.\n\nBut a convention is just that: a convention.\n\nIf we already know \"origin/HEAD\" is very likely pointing to the\nintegration branch, then why do we need to know what that branch is\ncalled in that particular project?\n\nJust refer to that branch as \"origin/@\", or just \"origin\".\n\nThat would work for projects that follow the convention, and those who\ndon't. Why does the tool need to care?\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"410178","messageId":"20201117233313.GB642410@coredump.intra.peff.net","threadId":"54633","inReplyTo":"CAMP44s2VJOd3N2zaj8YPv0iLOqTF7vWyZ=zPd9vd0+qO1DbEVA@mail.gmail.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-11-17T23:33:13Z","receivedAt":"2020-11-17T23:33:16Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Nov 17, 2020 at 04:47:56PM -0600, Felipe Contreras wrote:\n\n> On Tue, Nov 17, 2020 at 3:10 PM Eric W. Biederman <ebiederm@xmission.com> wrote:\n> >\n> > \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n> >\n> > > This is the big one. This changes the default of init.defaultBranch to main,\n> > > reflecting what many open source projects already did (which was followed by\n> > > GitHub, Azure Repos and others).\n> >\n> > Can we please not simply replace one hard coded branch name with\n> > another?\n> \n> I thought precisely the same thing.\n> \n> This should be easy to do if we make \"origin\" be a pseudo ref that\n> points to \"origin/HEAD\" (and we could introduce \"origin/@\").\n\nDidn't we already do this long ago? refs/remotes/%s/HEAD is special in\nthe dwim_ref() lookup:\n\n  $ git rev-parse --symbolic-full-name origin\n  refs/remotes/origin/master\n\nOr did you have something else in mind?\n\nI think I have occasionally hit spots where saying \"origin\" instead of\n\"origin/master\" does not work. I can't think of any offhand now, though\n(I thought perhaps \"git checkout -b foo origin\" or \"git branch\n--set-upstream-to=origin\", but both seem to work).\n\n> > I don't look in on the git list very often so perhaps I am missing a\n> > conversation where all of the details were thought through.  If so\n> > please point me at that conversation.  Otherwise can we please use this\n> > opportunity to come up with something that is actually better than\n> > naming the default branch main, rather than just something just as\n> > awkward whose only advantage is that people don't think it is\n> > politically incorrect this week.\n> \n> This is the thread:\n> \n> https://lore.kernel.org/git/CAOAHyQwyXC1Z3v7BZAC+Bq6JBaM7FvBenA-1fcqeDV==apdWDg@mail.gmail.com/\n> \n> Unfortunately in my opinion the most important topics--like your\n> suggestion--were not even mentioned. Everyone focused on the wrong\n> thing (e.g. what would be a better name for \"master\").\n\nThere is another thread from the same time that contains quite a lot of\ndiscussion on logistics. This subthread in particular raises the notion\nof \"let's try to minimize needing a special branch-name at all\":\n\n  https://lore.kernel.org/git/875zbrcpgh.fsf@evledraar.gmail.com/\n\nAnd indeed, it led to some other bug-fixes in improvements in the time\nsince then:\n\n  - submodule--helper was fixed to use HEAD from the remote as its\n    fallback rather than a hard-coded \"master\"\n\n  - fast-export --anonymize no longer treats \"master\" as special, but\n    instead grew a flexible system for leaving some bits intact\n\n  - fmt-merge-msg gained new options for configuring when it will print\n    \"into <branch>\"\n\nSo really all that is left is deciding what to do when:\n\n  git init\n  git commit -m foo\n\nis run. Obviously we added a config variable here, but we still fall\nback to a hard-coded name. One suggestion was to not use any name, and\neither require \"git checkout -b some-branch\" first, or commit onto a\ndetached HEAD:\n\n  https://lore.kernel.org/git/B4814F42-7AF8-4D80-93D4-FAF752C72F21@me.com/\n\nThe simplicity has some appeal to me, but it's even less\nbackwards-compatible than falling back to a new different name.\n\nI think Eric's suggestion of using the directory name as a default was\nnot previously mentioned. I'm not sure I would like that myself (I find\nvalue in having a consistent \"this is the main branch\" name across\ndifferent repositories, at least for my workflows). And it creates all\nof the same \"every tutorial is now out of date\" issues. But it is\nneutral. I wouldn't be opposed to seeing it as a configurable option.\n\n-Peff\n"},{"id":"410182","messageId":"xmqqr1or4jen.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"20201117233313.GB642410@coredump.intra.peff.net","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-18T00:07:28Z","receivedAt":"2020-11-18T00:08:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> I think Eric's suggestion of using the directory name as a default was\n> not previously mentioned. I'm not sure I would like that myself (I find\n> value in having a consistent \"this is the main branch\" name across\n> different repositories, at least for my workflows). And it creates all\n> of the same \"every tutorial is now out of date\" issues. But it is\n> neutral. I wouldn't be opposed to seeing it as a configurable option.\n\nI actually recall hearing it from Eric, not on this list, directly\nback in the timeframe of these previous dicsussions.  I somehow\nthought I relayed it to the community, perhaps #git-devel on\nfreenode, but apparently not to this list.\n\nYes, init.defaultBranchName is defined to be a string, so it is a\nbit tricky to introduce special values that mean \"no, not a\nhardcoded value but derive dynamically based on X\".  Perhaps use a\nprefix that is not allowed in a refname, perhaps like this update to\nthe function that uses the value read from the init.defaultBranch\nconfiguration variable.\n\n refs.c | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git c/refs.c w/refs.c\nindex 392f0bbf68..3fbc697cd8 100644\n--- c/refs.c\n+++ w/refs.c\n@@ -576,6 +576,12 @@ char *repo_default_branch_name(struct repository *r)\n \n \tif (!ret)\n \t\tret = xstrdup(\"master\");\n+\telse if (!strcmp(ret, \":dirname\"))\n+\t\tret = ... do the $(basename $(cwd)) thing ...;\n+\telse if (!strcmp(ret, \":some other magic\"))\n+\t\tret = ... do some other magic thing ...;\n+\telse if (ret[0] == ':')\n+\t\tdie(_(\"%s - unrecognised magic\", ret);\n \n \tfull_ref = xstrfmt(\"refs/heads/%s\", ret);\n \tif (check_refname_format(full_ref, 0))\n"},{"id":"410183","messageId":"xmqqmtzf4j96.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"CAMP44s3750bSdmw4A=KU=UgffOPiQwB8ECk9YRPe8mh50Og8Ow@mail.gmail.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-18T00:10:45Z","receivedAt":"2020-11-18T00:10:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> If we already know \"origin/HEAD\" is very likely pointing to the\n> integration branch, then why do we need to know what that branch is\n> called in that particular project?\n>\n> Just refer to that branch as \"origin/@\", or just \"origin\".\n\n\"git merge origin\" turns into \"git merge origin/HEAD\", I think, and\nwe had it for quite some time.\n\nBut repositories may not even have any origin to begin with.  The\none I am typing this message in certainly does not.  And we need\nsome fallback default when origin/HEAD cannot be used anyway, and\nthat is where the convention comes in again.  You cannot escape from\nit, and ...\n\n> That would work for projects that follow the convention, and those who\n> don't. Why does the tool need to care?\n\n... certainly it would not work for me.\n\n"},{"id":"410184","messageId":"CAMP44s1HhiDYfji9L2sj3QbCDmsb9dnrLCS6cQJPbmS1F3vKoQ@mail.gmail.com","threadId":"54633","inReplyTo":"20201117233313.GB642410@coredump.intra.peff.net","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-11-18T00:18:03Z","receivedAt":"2020-11-18T00:18:18Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Tue, Nov 17, 2020 at 5:33 PM Jeff King <peff@peff.net> wrote:\n> On Tue, Nov 17, 2020 at 04:47:56PM -0600, Felipe Contreras wrote:\n\n> > This should be easy to do if we make \"origin\" be a pseudo ref that\n> > points to \"origin/HEAD\" (and we could introduce \"origin/@\").\n>\n> Didn't we already do this long ago? refs/remotes/%s/HEAD is special in\n> the dwim_ref() lookup:\n>\n>   $ git rev-parse --symbolic-full-name origin\n>   refs/remotes/origin/master\n\nHmmm. For some reason none of my remotes do have a HEAD.\n\nIf I do \"git remote add\", and then fetch, the HEAD doesn't seem to be present.\n\n-- \nFelipe Contreras\n"},{"id":"410187","messageId":"CAMP44s39fuHfJ5Uuywh05+S+fTzdhOb3f6ma-oqkW2T5gTG9OQ@mail.gmail.com","threadId":"54633","inReplyTo":"xmqqmtzf4j96.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-11-18T00:51:17Z","receivedAt":"2020-11-18T00:51:31Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Tue, Nov 17, 2020 at 6:10 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>\n> > If we already know \"origin/HEAD\" is very likely pointing to the\n> > integration branch, then why do we need to know what that branch is\n> > called in that particular project?\n> >\n> > Just refer to that branch as \"origin/@\", or just \"origin\".\n>\n> \"git merge origin\" turns into \"git merge origin/HEAD\", I think, and\n> we had it for quite some time.\n>\n> But repositories may not even have any origin to begin with.  The\n> one I am typing this message in certainly does not.  And we need\n> some fallback default when origin/HEAD cannot be used anyway, and\n> that is where the convention comes in again.  You cannot escape from\n> it, and ...\n\nI did not say the convention can be escaped, I said the convention can\nbe minimized.\n\nSince apparently there's already support for \"origin/HEAD\", a lot of\ndocumentation can avoid the term \"origin/master\", and simply use\n\"origin\".\n\nHowever, we need to make sure users have a properly set up\n\"origin/HEAD\", and at least in my case none of my remotes have set it\nup. Looking at the code, it seems:\n\n  git clone URL test\n\nIs different than:\n\n  git init test\n  git remote add origin URL\n  git fetch origin\n  git checkout -b $favorite origin\n\nIn the latter there is no origin/HEAD, and I don't see why that should\nbe the case.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"410188","messageId":"20201118012230.GB650959@coredump.intra.peff.net","threadId":"54633","inReplyTo":"CAMP44s1HhiDYfji9L2sj3QbCDmsb9dnrLCS6cQJPbmS1F3vKoQ@mail.gmail.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-11-18T01:22:30Z","receivedAt":"2020-11-18T01:22:42Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Nov 17, 2020 at 06:18:03PM -0600, Felipe Contreras wrote:\n\n> On Tue, Nov 17, 2020 at 5:33 PM Jeff King <peff@peff.net> wrote:\n> > On Tue, Nov 17, 2020 at 04:47:56PM -0600, Felipe Contreras wrote:\n> \n> > > This should be easy to do if we make \"origin\" be a pseudo ref that\n> > > points to \"origin/HEAD\" (and we could introduce \"origin/@\").\n> >\n> > Didn't we already do this long ago? refs/remotes/%s/HEAD is special in\n> > the dwim_ref() lookup:\n> >\n> >   $ git rev-parse --symbolic-full-name origin\n> >   refs/remotes/origin/master\n> \n> Hmmm. For some reason none of my remotes do have a HEAD.\n> \n> If I do \"git remote add\", and then fetch, the HEAD doesn't seem to be present.\n\nYes, I have run into that, and it's definitely annoying. The\nrefs/remotes/<remote>/HEAD symref is created by clone, but is not\nupdated by \"fetch\". That's intentional, because it's supposed to\nrepresent a local choice (that is merely seeded by the remote side). But\nit seems like adding it if it's missing might be reasonable.\n\nI'm not sure if \"git remote add\" should be doing it (it already can do\nit with \"git remote set-head -a\", but that is not the default when\nadding a new remote, which otherwise does not contact the network at\nall). Or if \"git fetch\" should be doing it. Certainly having \"fetch\n--update-remote-head\" would be fine, but that doesn't really solve the\nproblem (which is that people don't realize they need to specify it).\n\nThere was some related discussion in:\n\n  https://lore.kernel.org/git/CAEXP2g8-reK+u2FaO=mMP-nsvuDDWGpwV_tyKG5L5XpU=1LQeg@mail.gmail.com/\n\nbut I don't think any patches came out of that.\n\n-Peff\n"},{"id":"410189","messageId":"20201118012544.GC650959@coredump.intra.peff.net","threadId":"54633","inReplyTo":"xmqqr1or4jen.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-11-18T01:25:44Z","receivedAt":"2020-11-18T01:26:07Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Nov 17, 2020 at 04:07:28PM -0800, Junio C Hamano wrote:\n\n> Jeff King <peff@peff.net> writes:\n> \n> > I think Eric's suggestion of using the directory name as a default was\n> > not previously mentioned. I'm not sure I would like that myself (I find\n> > value in having a consistent \"this is the main branch\" name across\n> > different repositories, at least for my workflows). And it creates all\n> > of the same \"every tutorial is now out of date\" issues. But it is\n> > neutral. I wouldn't be opposed to seeing it as a configurable option.\n> \n> I actually recall hearing it from Eric, not on this list, directly\n> back in the timeframe of these previous dicsussions.  I somehow\n> thought I relayed it to the community, perhaps #git-devel on\n> freenode, but apparently not to this list.\n\nCould be. I don't keep up with the irc logs.\n\n> Yes, init.defaultBranchName is defined to be a string, so it is a\n> bit tricky to introduce special values that mean \"no, not a\n> hardcoded value but derive dynamically based on X\".  Perhaps use a\n> prefix that is not allowed in a refname, perhaps like this update to\n> the function that uses the value read from the init.defaultBranch\n> configuration variable.\n\nYeah, I restrained myself from getting too far into thinking about\nsyntax, but I agree we'd want something like that. It might also be OK\nto use something that's extremely unlikely to be a default branch name\n(like BASENAME), but the \":\" syntax you have here isn't bad. Yet another\noption is a separate variable (that if set means we do not look at\ninit.defaultBranch at all).\n\nIMHO, though, all of this is orthogonal to question of what the default\nis. Unless we are thinking the basename thing would work as a default,\nbut I don't think that resolves any of the backwards-compatibility\nconcerns.\n\n-Peff\n"},{"id":"410190","messageId":"CAMP44s1t3CKF3btQwSwaz_Pu2fE6PGyb+_iMW8dAbY3aE3mH7w@mail.gmail.com","threadId":"54633","inReplyTo":"20201118012230.GB650959@coredump.intra.peff.net","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-11-18T01:45:21Z","receivedAt":"2020-11-18T01:45:35Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Tue, Nov 17, 2020 at 7:22 PM Jeff King <peff@peff.net> wrote:\n>\n> On Tue, Nov 17, 2020 at 06:18:03PM -0600, Felipe Contreras wrote:\n>\n> > On Tue, Nov 17, 2020 at 5:33 PM Jeff King <peff@peff.net> wrote:\n> > > On Tue, Nov 17, 2020 at 04:47:56PM -0600, Felipe Contreras wrote:\n> >\n> > > > This should be easy to do if we make \"origin\" be a pseudo ref that\n> > > > points to \"origin/HEAD\" (and we could introduce \"origin/@\").\n> > >\n> > > Didn't we already do this long ago? refs/remotes/%s/HEAD is special in\n> > > the dwim_ref() lookup:\n> > >\n> > >   $ git rev-parse --symbolic-full-name origin\n> > >   refs/remotes/origin/master\n> >\n> > Hmmm. For some reason none of my remotes do have a HEAD.\n> >\n> > If I do \"git remote add\", and then fetch, the HEAD doesn't seem to be present.\n>\n> Yes, I have run into that, and it's definitely annoying. The\n> refs/remotes/<remote>/HEAD symref is created by clone, but is not\n> updated by \"fetch\". That's intentional, because it's supposed to\n> represent a local choice (that is merely seeded by the remote side). But\n> it seems like adding it if it's missing might be reasonable.\n\nThe equivalent of this choice is in \"git remote add -m\":\n\n  With `-m <master>` option, a symbolic-ref `refs/remotes/<name>/HEAD`\n  is set up to point at remote's `<master>` branch. See also the\n  set-head command.\n\nThis is of course inconsistent. Is it the \"head\", or is it the \"master\"?\n\nPresumably if we want to avoid the term \"master\", then this option\nneeds to be renamed.\n\nIn my opinion unless this option has been explicitly set,\n\"origin/HEAD\" should keep track of whatever remote head is set.\n\nIf somebody updates its remote HEAD from \"master\" to \"main\", then\norigin/HEAD should be updated accordingly. Granted, this may be some\noverhead in the 99.999% of the cases where the remote HEAD is the\nsame, so it may not be worth even thinking about it.\n\nBut at least the first fetch after \"git remote add\" should fetch it,\nin my opinion (unless it's manually configured already). I'm not sure\nif origin/HEAD can contain some placeholder so that \"git fetch\" knows\nwhat to do.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"410192","messageId":"20201118020618.GE650959@coredump.intra.peff.net","threadId":"54633","inReplyTo":"CAMP44s1t3CKF3btQwSwaz_Pu2fE6PGyb+_iMW8dAbY3aE3mH7w@mail.gmail.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-11-18T02:06:18Z","receivedAt":"2020-11-18T02:06:21Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Nov 17, 2020 at 07:45:21PM -0600, Felipe Contreras wrote:\n\n> > Yes, I have run into that, and it's definitely annoying. The\n> > refs/remotes/<remote>/HEAD symref is created by clone, but is not\n> > updated by \"fetch\". That's intentional, because it's supposed to\n> > represent a local choice (that is merely seeded by the remote side). But\n> > it seems like adding it if it's missing might be reasonable.\n> \n> The equivalent of this choice is in \"git remote add -m\":\n> \n>   With `-m <master>` option, a symbolic-ref `refs/remotes/<name>/HEAD`\n>   is set up to point at remote's `<master>` branch. See also the\n>   set-head command.\n\nWow, I'm not sure how that option escaped my notice for all these years.\nOf course it would be much more useful if it pulled the value from the\nremote HEAD (but again, unless we use \"-f\" we are not contacting the\nremote at all).\n\n> This is of course inconsistent. Is it the \"head\", or is it the \"master\"?\n> \n> Presumably if we want to avoid the term \"master\", then this option\n> needs to be renamed.\n\nAgreed that the naming is bad.\n\n> In my opinion unless this option has been explicitly set,\n> \"origin/HEAD\" should keep track of whatever remote head is set.\n> \n> If somebody updates its remote HEAD from \"master\" to \"main\", then\n> origin/HEAD should be updated accordingly. Granted, this may be some\n> overhead in the 99.999% of the cases where the remote HEAD is the\n> same, so it may not be worth even thinking about it.\n> \n> But at least the first fetch after \"git remote add\" should fetch it,\n> in my opinion (unless it's manually configured already). I'm not sure\n> if origin/HEAD can contain some placeholder so that \"git fetch\" knows\n> what to do.\n\nIf it's simply not present (which is the case now after \"git remote\nadd\"), then it might be reasonable for \"git fetch\" to use that as the\nhint to fill it in. That would also make \"git remote add -f\" just work,\nI believe.\n\nIt does mean that you can _change_ the value of origin/HEAD, but you\nwouldn't be allowed to delete it without fetch trying to re-create it.\nI suspect this is quite rare, but we might want an escape hatch config.\nE.g., remote.origin.updateHEAD that can be set to one of:\n\n  - never; do not touch it\n\n  - create-if-missing; as discussed here\n\n  - always; update it on every fetch\n\nAnd then it is just a question of what the default is. Currently it is\n\"never\". I suspect most people would be happy with \"always\", but it does\nbreak some existing flows. But perhaps \"create-if-missing\" is a good\nmedium.\n\n-Peff\n"},{"id":"410197","messageId":"20201118023902.GD360414@google.com","threadId":"54633","inReplyTo":"20201118020618.GE650959@coredump.intra.peff.net","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2020-11-18T02:39:02Z","receivedAt":"2020-11-18T02:39:08Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nJeff King wrote:\n> On Tue, Nov 17, 2020 at 07:45:21PM -0600, Felipe Contreras wrote:\n>> Jeff King wrote:\n\n>>> Yes, I have run into that, and it's definitely annoying. The\n>>> refs/remotes/<remote>/HEAD symref is created by clone, but is not\n>>> updated by \"fetch\". That's intentional, because it's supposed to\n>>> represent a local choice (that is merely seeded by the remote side). But\n>>> it seems like adding it if it's missing might be reasonable.\n>>\n>> The equivalent of this choice is in \"git remote add -m\":\n>>\n>>   With `-m <master>` option, a symbolic-ref `refs/remotes/<name>/HEAD`\n>>   is set up to point at remote's `<master>` branch. See also the\n>>   set-head command.\n>\n> Wow, I'm not sure how that option escaped my notice for all these years.\n> Of course it would be much more useful if it pulled the value from the\n> remote HEAD (but again, unless we use \"-f\" we are not contacting the\n> remote at all).\n\nWhen would I want this implicit \"set-head -a\" and *not* want \"-f\"?\n\n[...]\n>> Presumably if we want to avoid the term \"master\", then this option\n>> needs to be renamed.\n>\n> Agreed that the naming is bad.\n\nThat said, single-letter options often have bad names.  (That's part of\nwhy these days I try to push back against single-letter options unless\na flag is frequently used.)\n\nFor consistency with \"git clone -b\", I suppose one might expect it to\nbe \"git remote add -b\".  Or even better, to retire the option and have\npeople run \"git remote set-head\" separately.\n\n[...]\n> E.g., remote.origin.updateHEAD that can be set to one of:\n>\n>   - never; do not touch it\n>\n>   - create-if-missing; as discussed here\n>\n>   - always; update it on every fetch\n>\n> And then it is just a question of what the default is. Currently it is\n> \"never\". I suspect most people would be happy with \"always\", but it does\n> break some existing flows. But perhaps \"create-if-missing\" is a good\n> medium.\n\nThanks for bringing this up --- this is something I had been\ninterested in as well but hadn't gotten around to contacting the list\nabout it.\n\nThe default value for a config setting like this has two purposes:\n\n- it makes the config setting for affected people who have not\n  discovered it\n\n- it provides a sensible, predictable standard behavior\n\nThose two goals are often in tension, as they were for example when\nsetting the default for push.default.\n\nIf I consider them separately:\n\n- to make as smooth a transition as possible for people who were\n  relying on \"git remote set-head\", a good behavior would be to\n  *fail the fetch* when the remote HEAD changes.  That would force\n  the user to make a choice between \"never\" and \"always\".\n\n- one way to relax that without hurting that goal too much would be to\n  fail the fetch when the remote HEAD changes from something other\n  than \"master\" or \"main\".  That way, the common case (moving from a\n  default to a project-appropriate setting) would work without\n  friction, and in other cases the user could make a choice between\n  \"never\" and \"always\".\n\n- all that said, the default that I prefer is simply \"always\".  Like\n  Felipe hinted, this is a simple, intuitive behavior that most people\n  would expect.\n\nAs a transition plan, I can imagine going from one of those first two\nto the third after some appropriate period of time has passed.\n\nWhat do you think?\n\nThanks,\nJonathan\n"},{"id":"410198","messageId":"20201118024028.GE360414@google.com","threadId":"54633","inReplyTo":"20201118012544.GC650959@coredump.intra.peff.net","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2020-11-18T02:40:28Z","receivedAt":"2020-11-18T02:41:16Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jeff King wrote:\n\n> IMHO, though, all of this is orthogonal to question of what the default\n> is. Unless we are thinking the basename thing would work as a default,\n> but I don't think that resolves any of the backwards-compatibility\n> concerns.\n\nIf we think it would make sense as the *eventual* default, we could use\n\n\t[init]\n\t\tdefaultBranchName =\n\n(i.e., an empty string) to request it early.\n"},{"id":"410199","messageId":"20201118025611.GF360414@google.com","threadId":"54633","inReplyTo":"87r1oraewl.fsf@x220.int.ebiederm.org","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2020-11-18T02:56:11Z","receivedAt":"2020-11-18T02:56:16Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Eric W. Biederman wrote:\n\n> Instead of having a fixed name across all repos for the initially\n> created branch can we instead use the directory name of the repo for the\n> branch name?\n>\n> Advantages:\n>\n> - The branch name that is somewhat meaningful to the creator of the git\n>   repo.\n>\n>   I have at least two repos where I wound up doing this by hand.  So at\n>   least for me it is something I am doing anyway.\n\nExample: this would make the main branch in a new git.git repository\ndefault to \"git\".  However, we would be free to switch to some other\nworkflow-specific name like \"stable\".\n\n> - Tools can not hard code the name of an initially created branch and\n>   expect it to work.\n>\n>   This moves us farther from the realm of people assuming incorrectly\n>   that there is something special about the branch created by default.\n\nWhat's especially nice about this is that a repository's local\nbasename and the URL at which it gets published do not always\ncoincide.  So scripts designed to be robust would be more likely to\nuse commands like \"git branch --show-current\" instead of trying to\nguess using the new rule.\n\nThat said, if I put myself in the shoes of such a script author for a\nmoment, I'm likely to be irritated.  What started as a static string\nnow becomes something dynamic.  If I put myself in the shoes of\nsomeone who has *inherited* a script (a testsuite, maybe), I'm likely\nto be even more irritated.\n\nFor testsuites, one can buy time by setting init.defaultBranch, but\nnot for other scripts.\n\nAre there things we can do to make a script author's life easier?\n\nToday if I want to look up a remote repository's default branch,\nthe best I can do is\n\n\tgit ls-remote --symref origin HEAD\n\nThe output is not as easy to parse as I'd like: it's split between two\nlines and has multiple fields on each line.  Worse, it is slow, since\nit scans all refs instead of just the ref I wanted.  Even worse, if\nanother ref in the remote repository ends with /HEAD (e.g.,\nrefs/remotes/someremote/HEAD), it prints that, too.\n\nIf I could do something like\n\n\tgit ls-remote --format='%(symref)' --exact-match origin HEAD\n\n(using for-each-ref style formats, and allowing exact matching) then\nthat would be helpful.\n\nIn general, this aspect of a less deterministic first branchname is\nappealing; it would result in improving the quality of the ecosystem\nof tools built around Git.  This is what I like most about this\nproposal.\n\n[...]\n> At least for my usage main is a pretty huge misnomer as I barely use the\n> branch with the master.  Renaming my unused branch main implies that I\n> am using the tool wrong.\n\nIs that because \"master\" is inherited from your upstream?  Which\nbranch would you want people to check out by default when they clone\nfrom your repo?\n\nFor what it's worth:\n\n- I find this proposal really tempting, and have liked it since the\n  moment gitster brought it up on #git-devel.  The main reason I\n  haven't brought it up since then is that I didn't have a patch\n  implementing it. :)\n\n- That said, a fixed string as default would be fine with me, too.\n\nThanks,\nJonathan\n"},{"id":"410200","messageId":"xmqqima343vb.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"20201118024028.GE360414@google.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-18T05:43:04Z","receivedAt":"2020-11-18T05:43:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n>> IMHO, though, all of this is orthogonal to question of what the default\n>> is. Unless we are thinking the basename thing would work as a default,\n>> but I don't think that resolves any of the backwards-compatibility\n>> concerns.\n>\n> If we think it would make sense as the *eventual* default, we could use\n>\n> \t[init]\n> \t\tdefaultBranchName =\n>\n> (i.e., an empty string) to request it early.\n\nI am not opposed to the idea to invent a notation that asks for the\nbasename behaviour, but I do not think it is a good idea to use \"an\nempty string\" for that.  I'd rather see us use some consistent\nnaming convention to denote any new \"non-constant string\" thing.\n\nWhat Peff suggested is a more viable possibility, for example.  When\n\"[init] defaultBranchAlgorithm = <name>\" is set, the fixed string\n\"init.defaultBranch\" is ignored and the algorithm specified with its\nname is invoked to come up with a name dynamically.  We may start\nwith something like 'dirname' as the only supported algorithm but\nthat way we would avoid painting ourselves in a corner out of which\nwe cannot escape (e.g. we may come up with a better way than the\nbasename thing, and we would not have a good way to give it a name\nthat is easy to use if we wasted \"an empty string\" for the basename\nthing).\n"},{"id":"410202","messageId":"xmqqa6vf437i.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"20201118025611.GF360414@google.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-18T05:57:21Z","receivedAt":"2020-11-18T05:57:28Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> That said, if I put myself in the shoes of such a script author for a\n> moment, I'm likely to be irritated.  What started as a static string\n> now becomes something dynamic.  If I put myself in the shoes of\n> someone who has *inherited* a script (a testsuite, maybe), I'm likely\n> to be even more irritated.\n\nIt is conceptually really nice to say that we do not use words like\n'master' and 'main' that are 'meaningless' in the context of\nthinking about the workflow used for the project and instead pick\nthe word the end user chose to call (some aspect of) the project\n(i.e. the name of the directory to host its working tree).  It\nhowever is much harder to defend the design in real life because it\ncan lead to the irritations you mention.\n\n> Are there things we can do to make a script author's life easier?\n\nIt largely depends on what \"specialness\" of 'master' branch the\nscript is interested in, isn't it?\n\n> Today if I want to look up a remote repository's default branch,\n> the best I can do is\n>\n> \tgit ls-remote --symref origin HEAD\n>\n> The output is not as easy to parse as I'd like:...\n\nIn a sense, these follower repositories are easier to work with.\n\nYou have refs/remotes/origin/HEAD that indicates what the owner of\nthe local repository considers of the most significance; it is\ninitialized to match what the remote had pointed with its HEAD when\nthe repository was cloned, but the local user can repoint it when\nthe local interest diverge from that of the remote's.  And you do\nnot need to talk over the network with ls-remote to find that\nout (actually asking ls-remote may actively be wrong after the\nlocal user repointed it); you only need to ask 'git symbolic-ref'\nwhich is totally local.\n\n\n\n"},{"id":"410211","messageId":"CAMP44s1G9vqrCPsev-uy6G6dEpB-1MXkeqG7Gt_fyHnoCVcLsw@mail.gmail.com","threadId":"54633","inReplyTo":"20201118020618.GE650959@coredump.intra.peff.net","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-11-18T09:04:25Z","receivedAt":"2020-11-18T09:05:08Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Tue, Nov 17, 2020 at 8:06 PM Jeff King <peff@peff.net> wrote:\n> On Tue, Nov 17, 2020 at 07:45:21PM -0600, Felipe Contreras wrote:\n\n> > The equivalent of this choice is in \"git remote add -m\":\n> >\n> >   With `-m <master>` option, a symbolic-ref `refs/remotes/<name>/HEAD`\n> >   is set up to point at remote's `<master>` branch. See also the\n> >   set-head command.\n>\n> Wow, I'm not sure how that option escaped my notice for all these years.\n> Of course it would be much more useful if it pulled the value from the\n> remote HEAD (but again, unless we use \"-f\" we are not contacting the\n> remote at all).\n\nSeems to come basically untouched since 2007:\n\n  b6f5da1e0f (Teach git-remote add to fetch and track)\n\n> And then it is just a question of what the default is. Currently it is\n> \"never\". I suspect most people would be happy with \"always\", but it does\n> break some existing flows. But perhaps \"create-if-missing\" is a good\n> medium.\n\nAgreed. Personally I don't see any problem with \"create-if-missing\",\nbut creating a configuration and defaulting to \"never\" should be a\ngood first step.\n\nI'm sending an RFC patch to that effect.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"410216","messageId":"CAMP44s1Mf=zHB3xmCV_zCVOs4eoggOL+Lo=7V4AauXkQ8v4C+A@mail.gmail.com","threadId":"54633","inReplyTo":"20201118023902.GD360414@google.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-11-18T10:12:35Z","receivedAt":"2020-11-18T10:12:49Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Tue, Nov 17, 2020 at 8:39 PM Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Jeff King wrote:\n> > On Tue, Nov 17, 2020 at 07:45:21PM -0600, Felipe Contreras wrote:\n> >> Jeff King wrote:\n>\n> >>> Yes, I have run into that, and it's definitely annoying. The\n> >>> refs/remotes/<remote>/HEAD symref is created by clone, but is not\n> >>> updated by \"fetch\". That's intentional, because it's supposed to\n> >>> represent a local choice (that is merely seeded by the remote side). But\n> >>> it seems like adding it if it's missing might be reasonable.\n> >>\n> >> The equivalent of this choice is in \"git remote add -m\":\n> >>\n> >>   With `-m <master>` option, a symbolic-ref `refs/remotes/<name>/HEAD`\n> >>   is set up to point at remote's `<master>` branch. See also the\n> >>   set-head command.\n> >\n> > Wow, I'm not sure how that option escaped my notice for all these years.\n> > Of course it would be much more useful if it pulled the value from the\n> > remote HEAD (but again, unless we use \"-f\" we are not contacting the\n> > remote at all).\n>\n> When would I want this implicit \"set-head -a\" and *not* want \"-f\"?\n\nThis is what I often do:\n\n git remote add origin $url\n git fetch origin\n\nThat should work (update origin/HEAD), and it currently doesn't.\n\n> > E.g., remote.origin.updateHEAD that can be set to one of:\n> >\n> >   - never; do not touch it\n> >\n> >   - create-if-missing; as discussed here\n> >\n> >   - always; update it on every fetch\n> >\n> > And then it is just a question of what the default is. Currently it is\n> > \"never\". I suspect most people would be happy with \"always\", but it does\n> > break some existing flows. But perhaps \"create-if-missing\" is a good\n> > medium.\n>\n> Thanks for bringing this up --- this is something I had been\n> interested in as well but hadn't gotten around to contacting the list\n> about it.\n>\n> The default value for a config setting like this has two purposes:\n>\n> - it makes the config setting for affected people who have not\n>   discovered it\n>\n> - it provides a sensible, predictable standard behavior\n>\n> Those two goals are often in tension, as they were for example when\n> setting the default for push.default.\n>\n> If I consider them separately:\n>\n> - to make as smooth a transition as possible for people who were\n>   relying on \"git remote set-head\", a good behavior would be to\n>   *fail the fetch* when the remote HEAD changes.  That would force\n>   the user to make a choice between \"never\" and \"always\".\n\nWe don't need to fail the fetch, we can print a warning so the user\ncan decide what to do next, including ignoring the warning.\n\nMoreover, since projects rarely change the HEAD, we might want to\nprint the warning always, until the user sets the configuration.\n\n> - one way to relax that without hurting that goal too much would be to\n>   fail the fetch when the remote HEAD changes from something other\n>   than \"master\" or \"main\".  That way, the common case (moving from a\n>   default to a project-appropriate setting) would work without\n>   friction, and in other cases the user could make a choice between\n>   \"never\" and \"always\".\n\nThis thread started in an attempt to move away from hard-coded values.\nThis doesn't help in my opinion.\n\n> - all that said, the default that I prefer is simply \"always\".  Like\n>   Felipe hinted, this is a simple, intuitive behavior that most people\n>   would expect.\n>\n> As a transition plan, I can imagine going from one of those first two\n> to the third after some appropriate period of time has passed.\n\nI think the default should be \"missing\", after a warning period. And\nperhaps change it to \"always\" in the next major version, but that\nbasically gets rid of the manual \"origin/HEAD\" that seems to have been\nthere since forever (at least 2007).\n\nI personally don't see any point in manually setting the HEAD (I have\nnever done so), but that's just me, others might.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"410219","messageId":"nycvar.QRO.7.76.6.2011181207220.56@tvgsbejvaqbjf.bet","threadId":"54633","inReplyTo":"xmqqima343vb.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-18T11:32:14Z","receivedAt":"2020-11-18T11:32:57Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 17 Nov 2020, Junio C Hamano wrote:\n\n> Jonathan Nieder <jrnieder@gmail.com> writes:\n>\n> >> IMHO, though, all of this is orthogonal to question of what the default\n> >> is. Unless we are thinking the basename thing would work as a default,\n> >> but I don't think that resolves any of the backwards-compatibility\n> >> concerns.\n> >\n> > If we think it would make sense as the *eventual* default, we could use\n> >\n> > \t[init]\n> > \t\tdefaultBranchName =\n> >\n> > (i.e., an empty string) to request it early.\n>\n> I am not opposed to the idea to invent a notation that asks for the\n> basename behaviour, but I do not think it is a good idea to use \"an\n> empty string\" for that.  I'd rather see us use some consistent\n> naming convention to denote any new \"non-constant string\" thing.\n\nAt least in the tests, using the empty string for\n`GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME` is equivalent for not setting it at\nall, i.e. to trigger the fall-back.\n\nSo yes, I totally agree that triggering an interactive prompt by the empty\nvalue is not really a good idea (nor a particularly intuitive behavior).\n\nWith your idea to special-case any value starting with a colon, `:ask:`\nseems like a saner approach.\n\nHaving said that, I would still favor the fall-back `main` over this idea:\nit is a much smaller (and less annoying) change of behavior to use a less\nloaded name than to change from a previously non-interactive to a\nnow-interactive operation.\n\nAs to using the base name by default: I don't think that is a good idea at\nall. Not only doesn't it work when you run `git init` in the root\ndirectory (which some people do, and that's totally okay with me), it also\ndoes not work with any base name that isn't a valid ref name. Try this at\nhome:\n\n\t$ git check-ref-format --branch \"My Documents\"\n\tfatal: 'My Documents' is not a valid branch name\n\nSo while it is a cute idea, in general it will simply fail, and is\ntherefore worse than any alternative that does _not_ fail in general.\n\n> What Peff suggested is a more viable possibility, for example.  When\n> \"[init] defaultBranchAlgorithm = <name>\" is set, the fixed string\n> \"init.defaultBranch\" is ignored and the algorithm specified with its\n> name is invoked to come up with a name dynamically.  We may start\n> with something like 'dirname' as the only supported algorithm but\n> that way we would avoid painting ourselves in a corner out of which\n> we cannot escape (e.g. we may come up with a better way than the\n> basename thing, and we would not have a good way to give it a name\n> that is easy to use if we wasted \"an empty string\" for the basename\n> thing).\n\nIndeed. In the spirit of minimizing disruption (as promised in\nhttps://sfconservancy.org/news/2020/jun/23/gitbranchname/), I would like\nto stay away from changing the default behavior _that_ much.\n\nMy current plan is to implement a warning in `git init` (much like the\n`pull.rebase` one, which I thought would raise outcries of frustration,\nbut to my surprise this did not happen, and `git init` is _a lot_ less\ncommon than `git pull`).\n\nThis needs to be done with care, obviously. I haven't looked yet, but I\nthink there is a chance that `git clone` would implicitly look at\n`init.defaultBranch` only to override it later by the name of the remote\nprimary branch. In that case, we obviously do not want to warn the user\nbecause the `init.defaultBranch` value is not actually used.\n\nCiao,\nDscho\n"},{"id":"410220","messageId":"20201118114834.11137-1-avarab@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v2 28/27] tests: run tests omitted by PREPARE_FOR_MAIN_BRANCH","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2020-11-18T11:48:34Z","receivedAt":"2020-11-18T11:48:53Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Reinstate the test coverage lost due to PREPARE_FOR_MAIN_BRANCH. The\nremaining impact of that prerequisite was mainly missing coverage from\nsubmodule fetches being lost[1], e.g. impacting my in-flight\nab/retire-parse-remote. Now the prerequisite is effectively a\nnoop. This goes on top of [2].\n\nI'm not removing the PREPARE_FOR_MAIN_BRANCH prerequisite to keep this\nchange small, instead it's now effectively a noop. It can be removed\nin some later change.\n\nThe only remaining occurrences in t5526-fetch-submodules.sh can be\nremoved without breakage with:\n\n    perl -pi -e 's/PREPARE_FOR_MAIN_BRANCH //g' t/t5526-fetch-submodules.sh\n\nWhich at this point leaves only the now-unused prerequisite\ndeclaration in test-lib.sh.\n\nThe coverage in t9902-completion.sh was restored by partially\nreverting[3]. After that we were left with one test in a mixed\nstate. It setup \"master\" but tested for \"mai\". Change it back to\n\"mas\", pending a more complete refactoring of that test.\n\nThis change only conflicts between next..seen by clashing with Peter\nKaestle's in-flights submodule fix[4]. Fixing the resulting logic\nerror in t5526-fetch-submodules.sh is trivial, simply:\n\n    - compare_refs_in_dir A origin/master B origin/master\n    + compare_refs_in_dir A origin/main B origin/main\n\n1. 66713e84e7 (\"tests: prepare aligned mentions of the default branch name\", 2020-10-23)\n2. https://public-inbox.org/git/pull.762.v2.git.1605629547.gitgitgadget@gmail.com/\n3. 8164360fc8 (\"t9902: prepare a test for the upcoming default branch name\", 2020-10-23)\n4. https://public-inbox.org/git/1605196853-37359-1-git-send-email-peter.kaestle@nokia.com/\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n\nOn Tue, Nov 17 2020, Johannes Schindelin via GitGitGadget wrote:\n> To avoid even more conflicts with topics that did not even make it to seen \n> yet, this patch series specifically excludes t3404, t4013, t5310, t5526,\n> t6300, t7064, t7817, t9902: in those test scripts, we will still use master \n> for the time being. Once the topics in question have settled, I will send\n> the appropriate follow-up patches to adjust them to use main instead.\n\nThis is not a replacement for that subsequent cleanup, but seems like\na simple enough thing to have now to reinstate the missing test\ncoverage.\n\nPerhaps there's some topics not in \"seen\" that you have in mind as\nconflicting, but as noted above the conflict produced here with\nin-flight in \"seen\" is trivial.\n\nSeems worth having that sooner than later if Junio's willing juggle\nthat.\n\n t/t5526-fetch-submodules.sh | 6 +++---\n t/t9902-completion.sh       | 6 +++---\n t/test-lib.sh               | 9 +++------\n 3 files changed, 9 insertions(+), 12 deletions(-)\n\ndiff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh\nindex dd8e423d25..f45ba02b8a 100755\n--- a/t/t5526-fetch-submodules.sh\n+++ b/t/t5526-fetch-submodules.sh\n@@ -481,7 +481,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"don't fetch submodule when newly re\n \ttest_i18ncmp expect.err actual.err &&\n \t(\n \t\tcd submodule &&\n-\t\tgit checkout -q master\n+\t\tgit checkout -q main\n \t)\n '\n \n@@ -663,9 +663,9 @@ test_expect_success 'fetch new submodule commits on-demand without .gitmodules e\n \tgit config -f .gitmodules --remove-section submodule.sub1 &&\n \tgit add .gitmodules &&\n \tgit commit -m \"delete gitmodules file\" &&\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tgit -C downstream fetch &&\n-\tgit -C downstream checkout origin/master &&\n+\tgit -C downstream checkout origin/main &&\n \n \tC=$(git -C submodule commit-tree -m \"yet another change outside refs/heads\" HEAD^{tree}) &&\n \tgit -C submodule update-ref refs/changes/7 $C &&\ndiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\nindex 5c01c75d40..3696b85acb 100755\n--- a/t/t9902-completion.sh\n+++ b/t/t9902-completion.sh\n@@ -1055,13 +1055,13 @@ test_expect_success 'teardown after filtering matching refs' '\n \tgit -C otherrepo branch -D matching/branch-in-other\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH '__git_refs - for-each-ref format specifiers in prefix' '\n+test_expect_success '__git_refs - for-each-ref format specifiers in prefix' '\n \tcat >expected <<-EOF &&\n \tevil-%%-%42-%(refname)..master\n \tEOF\n \t(\n-\t\tcur=\"evil-%%-%42-%(refname)..mai\" &&\n-\t\t__git_refs \"\" \"\" \"evil-%%-%42-%(refname)..\" mai >\"$actual\"\n+\t\tcur=\"evil-%%-%42-%(refname)..mas\" &&\n+\t\t__git_refs \"\" \"\" \"evil-%%-%42-%(refname)..\" mas >\"$actual\"\n \t) &&\n \ttest_cmp expected \"$actual\"\n '\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex d39bdf04ce..ed489b2213 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -257,7 +257,7 @@ case \"$TRASH_DIRECTORY\" in\n esac\n \n case \"$TEST_NUMBER\" in\n-3404|4013|5310|5526|6300|7064|7817|9902)\n+3404|4013|5310|6300|7064|7817|9902)\n \t# Avoid conflicts with patch series that are cooking at the same time\n \t# as the patch series changing the default of `init.defaultBranch`.\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n@@ -1725,12 +1725,9 @@ test_lazy_prereq REBASE_P '\n \ttest -z \"$GIT_TEST_SKIP_REBASE_P\"\n '\n \n-# Special-purpose prereq for transitioning to a new default branch name:\n-# Some tests need more than just a mindless (case-preserving) s/master/main/g\n-# replacement. The non-trivial adjustments are guarded behind this\n-# prerequisite, acting kind of as a feature flag\n+# Obsolete, do not use, removed soon!\n test_lazy_prereq PREPARE_FOR_MAIN_BRANCH '\n-\ttest \"$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\" = main\n+\ttest \"$TEST_NAME\" = \"t5526-fetch-submodules\"\n '\n \n # Ensure that no test accidentally triggers a Git command\n-- \n2.29.2.222.g5d2a92d10f8\n\n"},{"id":"410223","messageId":"87ima2rdsm.fsf@evledraar.gmail.com","threadId":"54633","inReplyTo":"nycvar.QRO.7.76.6.2011162118060.18437@tvgsbejvaqbjf.bet","subject":"Re: [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2020-11-18T13:32:25Z","receivedAt":"2020-11-18T13:32:30Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Mon, Nov 16 2020, Johannes Schindelin wrote:\n\n> Hi Ævar,\n>\n> On Sat, 14 Nov 2020, Ævar Arnfjörð Bjarmason wrote:\n>\n>> On Fri, Nov 13 2020, Johannes Schindelin wrote:\n>>\n>> > Whatever telemetry I would be able to pull would not be representative,\n>> > and I would not be at liberty to share it anyway. So I asked Alex Mullans\n>> > of GitHub (who is in charge of the default branch name switch to `main`\n>> > there) whether he has any data I could share publicly and he said: \"Across\n>> > GitHub, 1/4 of daily pushes (and growing) go to `main`.\"\n>> >\n>> > Seeing as the branch name to be used in newly-created repositories on\n>> > GitHub changed only very recently (October 1st, i.e. some 6 weeks ago), I\n>> > highly suspect that this number means that _a lot_ of existing projects\n>> > have changed their primary branch name to `main`, and seem to be quite\n>> > happy with it.\n>> >\n>> > All this is to say that I consider it unnecessary to have a long\n>> > deprecation period or major version bump for this patch series, based on\n>> > available public data. The name `main` is already in wide-spread use (and\n>> > growing) as primary branch name of Git projects.\n>>\n>> [...]\n>> I'm on the fence about what we should do in that case, but I'm leaning\n>> towards some deprecation period or at least some other approach than a\n>> s/master/main/g change precisely because of the numbers you're citing.\n>>\n>> Because they shows how irrelevant the default shipped with git.git is to\n>> users who want this s/master/main/g change in repositories they\n>> regularly use. So we're really mostly talking about an impact to scripts\n>> & some advanced users, both of who have a pretty good argument for\n>> \"init\"'s default being what's been explicitly documented for ages in its\n>> manpage.\n>\n> I think you have a good point here. It really does not matter _all_ that\n> much, yet I still would like to complete the switch to `main` at some\n> stage. But as you point out, that point does not _have_ to be now.\n>\n> As a consequence, I reconsider my stance on \"splitting off patch 28\". I\n> think I will send out a v2 tomorrow, including the fix you suggested for\n> t1400 to also rename `naster` to `nain`, and dropping the patch that\n> changes the fall-back for `init.defaultBranch` for now.\n>\n> I _do_ want to complete the transition to using\n> `GIT_TEST_DEFAULT_INIT_BRANCH=main` to address the concern you raised\n> elsewhere: a couple of test cases are skipped until that transition is\n> complete.\n>\n> After I send out v2, I will work on that patch that imitates d18c950a69f\n> (pull: warn if the user didn't say whether to rebase or to merge,\n> 2020-03-09) to show some advice when `init.defaultBranch` is not set.\n>\n> My current thinking is that we could show this advice for about half a\n> year and then make the switch to `main`, continuing to show the advice\n> (now adjusted for `main`) for about another half year, and then turn the\n> warning off.\n>\n> What do you think, does that sound too conservative of a plan?\n\nThe v2 looks good to me. I just had a suggestion in [1] to apply\nsomething on top to restore the test coverage until while whatever comes\nafter it lands.\n\nIn case I didn't make it clear I have no objection entirely replacing\n\"master\" with \"main\" in the tests. I just had a practical\nconcern/question about coverage while it was landing, and a suggestion\nof whether perhaps there was an easier/faster way to do the \"init\"\nchange first by omitting some of the test churn.\n\nBut if you want to do all the legwork that's fine by me :)\n\nI just thought that a sober estimation of how long it takes patches to\nland would mean the v1 would be in some in-between state for the next\nrelease.\n\nFWIW I'm not necessarily for some warning. I mainly wanted to attempt to\nmediate some of the discussion about the concern to something more\nproductive.\n\nAt the risk of repeating too much of my past overly long E-Mails, but if\nI'm being difficult for you when you're submitting patches & causing\nwork for you I think I owe you an unambiguous explanation for why that\nis:\n\nI think some of the people advocating this change can rightly look at\nsome of the previous E-Mail traffic and see what are at best rants and\nat worst some political grandstanding that's at best pretty irrelevant\nto any proposed changes in git.git.\n\nBut that doesn't mean that there aren't some legitimate concerns. Those\nare in my mind separate from the particular political motivations of the\ns/master/main/ change, we'd have those with any change to the defaults\nin the core tooling.\n\nI think in general with such changes that replies like Theodore Ts'o\nhere [2] (not picking on him in particular, I just thought it was\nrepresentative) reflect a rather insular view of how we need to think\nabout these sorts of changes.\n\nI.e. a *lot* of git users probably aren't aware that there's even a git\nconfig (they use some 3rd party UI), and I'd say the vast majority are\nlikely to never find or read any sort of release notes about changes we\nmake.\n\nMost people's relation to git is like my relation to netcat. It's some\ntool I use 1-2 levels down in my stack, and I only bothered to find out\nabout it because \"ssh\" stopped working one day.\n\nIf at the end of the day we decide to keep something like your original\nv1 28/28 patch + docs after some realistic look at the impact that would\nbe fine by me. Just as long as we understand who we're likely to break\nstuff for, and whether it's worth the trade-off.\n\nTo Theodore's point about some people's motivations in [2], just to make\nmy stance/opinion on the end-state clear (so far in all these threads\nI've been commenting on the \"how\" of the incremental transition):\n\nI do 100% agree that the s/master/main/g change of the default should be\nmade in one form or another. In my mind that doesn't even require a\nconsideration of the political motivations at this point as far as\ngit.git is concerned, just:\n\n 1. Major Git hosting providers already made the change\n\n 2. Realistically a lot/majority of git's user base interact with that\n    in a major way.\n\n 3. A discrepancy in any default between /usr/bin/git and those\n    providers is more confusing than not.\n\n 4. #3 doesn't mean they say \"jump\" we say \"how high\" whatever the\n    change is.\n\n    But in this case the default is an entirely arbitrary default. Not\n    e.g. that they decided to add some ill-thought out header to the\n    object format or whatever.\n\nP.S.: Shouldn't the pull patch in d18c950a69f be using the advice\n     facility, not warning()?\n\n1. https://public-inbox.org/git/20201118114834.11137-1-avarab@gmail.com/\n\n2. https://public-inbox.org/git/20201115034649.GC3985404@mit.edu/\n"},{"id":"410227","messageId":"CAMP44s2Uf4tkBdHWFV6e3K3VqCksJxwz52kgWzTBN_SAHnof-w@mail.gmail.com","threadId":"54633","inReplyTo":"87ima2rdsm.fsf@evledraar.gmail.com","subject":"Re: [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of)","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-11-18T14:16:32Z","receivedAt":"2020-11-18T14:16:46Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Wed, Nov 18, 2020 at 7:32 AM Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n\n> I do 100% agree that the s/master/main/g change of the default should be\n> made in one form or another. In my mind that doesn't even require a\n> consideration of the political motivations at this point as far as\n> git.git is concerned, just:\n\nOthers disagree.\n\nWhile the political motivation shouldn't be a central concern, I\nsuspect the vast majority of users have no idea this change is coming,\nand when they see the warning they will likely complain... Strongly.\nThe fact that this change is extremely politically charged will become\na factor.\n\n>  1. Major Git hosting providers already made the change\n\nThat's their decision. The Git project shouldn't be held hostage to\nthird party decisions.\n\n>  2. Realistically a lot/majority of git's user base interact with that\n>     in a major way.\n>\n>  3. A discrepancy in any default between /usr/bin/git and those\n>     providers is more confusing than not.\n\nThat's a problem for GitHub et al. Fortunately they can tell their\nusers to set init.defaultbranch to whatever they want.\n\n>  4. #3 doesn't mean they say \"jump\" we say \"how high\" whatever the\n>     change is.\n>\n>     But in this case the default is an entirely arbitrary default. Not\n>     e.g. that they decided to add some ill-thought out header to the\n>     object format or whatever.\n\nI don't agree it is arbitrary, otherwise you could set the default to\n\"loremipsum\". Moreover, even if was arbitrary, it was arbitrary in\n2005, not 2020 where \"master\" is already widely used in basically\n*all* the documentation everywhere. Some people have been using this\nname for 15 years, they won't give it up just like that.\n\nPeople will complain, especially if they don't see a good reason for the change.\n\n-- \nFelipe Contreras\n"},{"id":"410236","messageId":"xmqq1rgq4qn3.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"nycvar.QRO.7.76.6.2011181207220.56@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-18T15:43:28Z","receivedAt":"2020-11-18T15:43:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> So yes, I totally agree that triggering an interactive prompt by the empty\n> value is not really a good idea (nor a particularly intuitive behavior).\n\nPuzzled.\n\nNobody talked about going interactive so far and I didn't suggest\nit---even though I think it is a cute idea to give a \"what branch\nname do you want to use?\" prompt, I do not think it is practical.\n\nI thought it was obvious, but the key to coming up with a name\ndynamically instead of using a fixed string is to derive from a cue\nthe end user gives, not directly use what the end user gives.  I do\nnot think anybody in the discussion meant by \"the <basename> thing\"\nto literally use $(basename $(cwd)) output, but use it to derive a\ntoken that check-ref-format likes.  As you may have already known\nwhen you wrote them, \"My Documents\" or the root directory case are\nred herring---it would be trivial to derive \"MyDocuments\" or\n\"my-documents\" for the former, and for the latter, it is totally OK\nfor the deriving rule to come up with any of \"unnamed\", \"initial\",\netc.\n\nMost of the thing you said in the message I am responding to did not\nmake much sense to me.  Perhaps you can retry after reading the\nmessage you are responding to again?\n\nThanks.\n"},{"id":"410238","messageId":"xmqqsg963bg9.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"87ima2rdsm.fsf@evledraar.gmail.com","subject":"Re: [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-18T15:56:54Z","receivedAt":"2020-11-18T15:57:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> ... In my mind that doesn't even require a\n> consideration of the political motivations at this point as far as\n> git.git is concerned, just:\n>\n>  1. Major Git hosting providers already made the change\n>\n>  2. Realistically a lot/majority of git's user base interact with that\n>     in a major way.\n>\n>  3. A discrepancy in any default between /usr/bin/git and those\n>     providers is more confusing than not.\n>\n>  4. #3 doesn't mean they say \"jump\" we say \"how high\" whatever the\n>     change is.\n>\n>     But in this case the default is an entirely arbitrary default. Not\n>     e.g. that they decided to add some ill-thought out header to the\n>     object format or whatever.\n\nYes.\n\n> P.S.: Shouldn't the pull patch in d18c950a69f be using the advice\n>      facility, not warning()?\n\nI think warning() is the right thing here, as it is self squelching.\nSetting pull.rebase (even to 'false') is sufficient---there is no\nneed to set advise.setpullrebase to 'false' on top.\n"},{"id":"410276","messageId":"nycvar.QRO.7.76.6.2011182156560.56@tvgsbejvaqbjf.bet","threadId":"54633","inReplyTo":"xmqqpn4b6bru.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-18T20:58:57Z","receivedAt":"2020-11-18T20:59:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 17 Nov 2020, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>\n> > \tcase \"$TEST_NUMBER\" in\n> > \t3404|4013|5310|5526|6300|7064|7817|9902)\n> > \t\t# Avoid conflicts with patch series that are cooking at the same\n> > \t\t# time\n> > \t\t# as the patch series changing the default of\n> > \t\t# `init.defaultBranch`.\n> > \t\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n> > \t\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n> > \t\t;;\n> > \t*)\n> > \t\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n> > \t\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n> > \t\t;;\n> > \tesac\n>\n> I actually am not a big fan of the centralized table of \"these want\n> to run with main\".  My ideal would be to have an explicit assignment\n> of either master or main for tests that absolutely require the\n> default to be one of these names at the top of these script, and any\n> test scripts that do not care what the initial branch is called\n> (perhaps because they begin by switching to a branch whose name is\n> picked by them immediately after they start and use that name\n> throughout) won't have GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME in them.\n\nI will make it so in v3.\n\nIt does make sense, too: the four patch series I sent out in the past\nhours address some issues that I would have otherwise missed in the\ntransition (in particular, two test cases with `test_must_fail` in them\nwould have continued to pass, but for the wrong reason, during the\ntransition to `main`.\n\nCiao,\nDscho\n"},{"id":"410284","messageId":"c8494f4602c5b0047c40039f65ca17e6d6be4605.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 06/28] t3416: preemptively adjust alignment in a comment","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:24Z","receivedAt":"2020-11-18T23:45:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe are about to adjust t3416 for the new default branch name `main`.\nThis name is two characters shorter and therefore needs two spaces more\npadding to align correctly.\n\nAdjusting the alignment before the big search-and-replace makes it\neasier to verify that the final result does not leave any misaligned\nlines behind.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3416-rebase-onto-threedots.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t3416-rebase-onto-threedots.sh b/t/t3416-rebase-onto-threedots.sh\nindex 0f5b814aaf..d0476fbb28 100755\n--- a/t/t3416-rebase-onto-threedots.sh\n+++ b/t/t3416-rebase-onto-threedots.sh\n@@ -15,7 +15,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n #\n #\t    F---G topic                             G'\n #\t   /                                       /\n-# A---B---C---D---E master      -->       A---B---C---D---E\n+# A---B---C---D---E master        -->       A---B---C---D---E\n #      \\   \\ /\n #\t\\   x\n #\t \\ / \\\n-- \ngitgitgadget\n\n"},{"id":"410285","messageId":"8c2e158c8f3f33257306ea188a63167b2c2ab2e5.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 02/28] t0060: preemptively adjust alignment","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:20Z","receivedAt":"2020-11-18T23:45:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe are about to adjust t0060 for the new default branch name `main`.\nThis name is two characters shorter and therefore needs two spaces more\npadding to align correctly.\n\nAdjusting the alignment before the big search-and-replace makes it\neasier to verify that the final result does not leave any misaligned\nlines behind.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t0060-path-utils.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh\nindex b2e3cf3f4c..928eebbdc0 100755\n--- a/t/t0060-path-utils.sh\n+++ b/t/t0060-path-utils.sh\n@@ -312,8 +312,8 @@ test_git_path GIT_COMMON_DIR=bar info/sparse-checkout     .git/info/sparse-check\n test_git_path GIT_COMMON_DIR=bar info//sparse-checkout    .git/info//sparse-checkout\n test_git_path GIT_COMMON_DIR=bar remotes/bar              bar/remotes/bar\n test_git_path GIT_COMMON_DIR=bar branches/bar             bar/branches/bar\n-test_git_path GIT_COMMON_DIR=bar logs/refs/heads/master   bar/logs/refs/heads/master\n-test_git_path GIT_COMMON_DIR=bar refs/heads/master        bar/refs/heads/master\n+test_git_path GIT_COMMON_DIR=bar logs/refs/heads/master     bar/logs/refs/heads/master\n+test_git_path GIT_COMMON_DIR=bar refs/heads/master          bar/refs/heads/master\n test_git_path GIT_COMMON_DIR=bar refs/bisect/foo          .git/refs/bisect/foo\n test_git_path GIT_COMMON_DIR=bar hooks/me                 bar/hooks/me\n test_git_path GIT_COMMON_DIR=bar config                   bar/config\n-- \ngitgitgadget\n\n"},{"id":"410308","messageId":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v2.git.1605629547.gitgitgadget@gmail.com","subject":"[PATCH v3 00/28] tests: use main as default branch name","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:18Z","receivedAt":"2020-11-18T23:45:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This (big) patch series (almost) concludes the transition of Git's test\nsuite to use init.defaultBranch=main that was started in \njs/default-branch-name-part-4-minus-1, continued in \njs/default-branch-name-adjust-t5411 and in \njs/default-branch-name-adjust-t5515. This transition prepares for changing\nthe fall-back value of init.defaultBranch accordingly (which will be done in\na different set of patch series, with an appropriate deprecation period),\nreflecting what many open source projects already did followed by GitHub,\nAzure Repos and others.\n\nBefore doing anything else, the series starts out with a patch that marks\nall the test scripts that expect a specific default branch name and won't\npass with any other name.\n\nInstead of one huge patch that reflects essentially a search-and-replace in\nthe test suite, this patch series then splits the changes up into chunks\nthat are intended to be smaller than 100kB so that they are not rejected by\nthe Git mailing list. Interspersed between those changes are adjustments\ne.g. in alignment, to make it easier to review (or recreate) the\nsearch-and-replace patches.\n\nNote that this branch is based on next, mostly because it would otherwise\nconflict with en/merge-tests, jk/diff-release-filespec-fix and \nds/maintenance-part-3.\n\nTo avoid even more conflicts with topics that did not even make it to seen \nyet, this patch series specifically excludes t1309, t2106, t3040, t3404,\nt4013, t4015, t5310, t5526, t6300, t7064, t7817, t9902: in those test\nscripts, we will still use master for the time being. Once the topics in\nquestion have settled, I will send the appropriate follow-up patches to\nadjust them to use main instead.\n\nNote that even after this patch series, master is still found in t/, even\noutside of the tests we excluded specifically to avoid conflicts with other\npatch series that are currently in flight: t/perf/, the git p4 tests\n(because git p4 still uses p4/master to refer to the remote main branch),\nand some comments still refer to this name. I intend to address at least\nsome of those, in patch series separate from the current one.\n\nChanges since v2:\n\n * The case statement setting the default branch name for each test script\n   was replaced by an initial patch that sets the default branch name in\n   those test scripts that need it (and only in those). This patch also\n   modifies the linux-gcc job to verify that the test suite runs with\n   overridden default branch name (which the now-marked test scripts\n   over-override).\n * Four more test scripts were excluded from this patch series: t1309,\n   t2106, t3040 and t4015. These are handled in four separate patch series,\n   where I try to remove the requirement to hard-code the default branch\n   name in the first place.\n\nChanges since v1:\n\n * Dropped the commit changing the default initial branch name for git init.\n * Adjusted the patch for t1402 to also replace naster by nain.\n * Excluded t5526 from the patches for now, to avoid clashing with \n   pk/subsub-fetch-fix.\n\nJohannes Schindelin (28):\n  tests: mark tests relying on the current default for\n    `init.defaultBranch`\n  t0060: preemptively adjust alignment\n  t[01]*: adjust the references to the default branch name \"main\"\n  t2*: adjust the references to the default branch name \"main\"\n  t3[0-3]*: adjust the references to the default branch name \"main\"\n  t3416: preemptively adjust alignment in a comment\n  t34*: adjust the references to the default branch name \"main\"\n  t3[5-9]*: adjust the references to the default branch name \"main\"\n  t4*: adjust the references to the default branch name \"main\"\n  t5323: prepare centered comment for `master` -> `main`\n  t5[0-4]*: adjust the references to the default branch name \"main\"\n  t5503: prepare aligned comment for replacing `master` with `main`\n  t550*: adjust the references to the default branch name \"main\"\n  t551*: adjust the references to the default branch name \"main\"\n  t55[23]*: adjust the references to the default branch name \"main\"\n  t55[4-9]*: adjust the references to the default branch name \"main\"\n  t5[6-9]*: adjust the references to the default branch name \"main\"\n  t6[0-3]*: adjust the references to the default branch name \"main\"\n  t64*: preemptively adjust alignment to prepare for `master` -> `main`\n  t6[4-9]*: adjust the references to the default branch name \"main\"\n  t7[0-4]*: adjust the references to the default branch name \"main\"\n  t7[5-9]*: adjust the references to the default branch name \"main\"\n  t8*: adjust the references to the default branch name \"main\"\n  t9[0-4]*: adjust the references to the default branch name \"main\"\n  t9[5-7]*: adjust the references to the default branch name \"main\"\n  tests(git-p4): transition to the default branch name `main`\n  t99*: adjust the references to the default branch name \"main\"\n  tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed\n\n ci/run-build-and-tests.sh                     |   2 +\n t/annotate-tests.sh                           |   8 +-\n t/lib-cvs.sh                                  |   2 +-\n t/t0002-gitfile.sh                            |   9 +-\n t/t0020-crlf.sh                               |  11 +-\n t/t0021-conversion.sh                         |  43 +-\n t/t0027-auto-crlf.sh                          |   4 +-\n t/t0028-working-tree-encoding.sh              |   7 +-\n t/t0041-usage.sh                              |  13 +-\n t/t0050-filesystem.sh                         |   9 +-\n t/t0060-path-utils.sh                         |   4 +-\n t/t0100-previous.sh                           |  21 +-\n t/t1004-read-tree-m-u-wf.sh                   |  43 +-\n t/t1008-read-tree-overlay.sh                  |   5 +-\n t/t1009-read-tree-new-index.sh                |   7 +-\n t/t1011-read-tree-sparse-checkout.sh          |   2 +-\n t/t1021-rerere-in-workdir.sh                  |   5 +-\n t/t1090-sparse-checkout-scope.sh              |  13 +-\n t/t1091-sparse-checkout-builtin.sh            |   5 +-\n t/t1300-config.sh                             |  11 +-\n t/t1301-shared-repo.sh                        |   7 +-\n t/t1305-config-include.sh                     |   2 +-\n t/t1400-update-ref.sh                         |  75 +--\n t/t1402-check-ref-format.sh                   |  32 +-\n t/t1403-show-ref.sh                           |  21 +-\n t/t1405-main-ref-store.sh                     |  45 +-\n t/t1406-submodule-ref-store.sh                |  33 +-\n t/t1407-worktree-ref-store.sh                 |  35 +-\n t/t1408-packed-refs.sh                        |  15 +-\n t/t1410-reflog.sh                             |  59 +-\n t/t1411-reflog-show.sh                        |   5 +-\n t/t1413-reflog-detach.sh                      |  27 +-\n t/t1414-reflog-walk.sh                        |  15 +-\n t/t1416-ref-transaction-hooks.sh              |  13 +-\n t/t1430-bad-ref-name.sh                       |  55 +-\n t/t1450-fsck.sh                               |   2 +-\n t/t1500-rev-parse.sh                          |   7 +-\n t/t1503-rev-parse-verify.sh                   |  31 +-\n t/t1505-rev-parse-last.sh                     |  11 +-\n t/t1506-rev-parse-diagnosis.sh                |   7 +-\n t/t1507-rev-parse-upstream.sh                 |  43 +-\n t/t1508-at-combinations.sh                    |  13 +-\n t/t1511-rev-parse-caret.sh                    |  29 +-\n t/t1512-rev-parse-disambiguation.sh           |   5 +-\n t/t1513-rev-parse-prefix.sh                   |   7 +-\n t/t1514-rev-parse-push.sh                     |  19 +-\n t/t1700-split-index.sh                        |   5 +-\n t/t2007-checkout-symlink.sh                   |  13 +-\n t/t2009-checkout-statinfo.sh                  |  11 +-\n t/t2010-checkout-ambiguous.sh                 |   7 +-\n t/t2011-checkout-invalid-head.sh              |  19 +-\n t/t2012-checkout-last.sh                      |  51 +-\n t/t2015-checkout-unborn.sh                    |   5 +-\n t/t2017-checkout-orphan.sh                    |  47 +-\n t/t2020-checkout-detach.sh                    |  31 +-\n t/t2022-checkout-paths.sh                     |  25 +-\n t/t2023-checkout-m.sh                         |  13 +-\n t/t2024-checkout-dwim.sh                      |  70 +--\n t/t2027-checkout-track.sh                     |   9 +-\n t/t2030-unresolve-info.sh                     |   9 +-\n t/t2060-switch.sh                             |  33 +-\n t/t2070-restore.sh                            |   7 +-\n t/t2400-worktree-add.sh                       |  69 +--\n t/t2401-worktree-prune.sh                     |   5 +-\n t/t2402-worktree-list.sh                      |  23 +-\n t/t2405-worktree-submodule.sh                 |   9 +-\n t/t3200-branch.sh                             | 251 ++++-----\n t/t3201-branch-contains.sh                    |  85 +--\n t/t3202-show-branch-octopus.sh                |   5 +-\n t/t3203-branch-output.sh                      |  43 +-\n t/t3204-branch-name-interpretation.sh         |   9 +-\n t/t3205-branch-color.sh                       |  11 +-\n t/t3206-range-diff.sh                         |  43 +-\n t/t3206/history.export                        |   2 +-\n t/t3210-pack-refs.sh                          |   7 +-\n t/t3211-peel-ref.sh                           |   7 +-\n t/t3301-notes.sh                              |   6 +-\n t/t3302-notes-index-expensive.sh              |   5 +-\n t/t3303-notes-subtrees.sh                     |  11 +-\n t/t3304-notes-mixed.sh                        |  11 +-\n t/t3308-notes-merge.sh                        |   2 +-\n t/t3320-notes-merge-worktrees.sh              |   7 +-\n t/t3400-rebase.sh                             |  63 +--\n t/t3402-rebase-merge.sh                       |  47 +-\n t/t3403-rebase-skip.sh                        |   9 +-\n t/t3404-rebase-interactive.sh                 |   3 +\n t/t3405-rebase-malformed.sh                   |  11 +-\n t/t3406-rebase-message.sh                     |  27 +-\n t/t3407-rebase-abort.sh                       |  21 +-\n t/t3408-rebase-multi-line.sh                  |   5 +-\n t/t3409-rebase-preserve-merges.sh             |  13 +-\n t/t3412-rebase-root.sh                        |  31 +-\n t/t3413-rebase-hook.sh                        |  45 +-\n t/t3415-rebase-autosquash.sh                  |   5 +-\n t/t3416-rebase-onto-threedots.sh              |  57 +-\n t/t3418-rebase-continue.sh                    |  27 +-\n t/t3419-rebase-patch-id.sh                    |  15 +-\n t/t3420-rebase-autostash.sh                   |  11 +-\n t/t3423-rebase-reword.sh                      |   6 +-\n t/t3427-rebase-subtree.sh                     |  23 +-\n t/t3430-rebase-merges.sh                      |  19 +-\n t/t3431-rebase-fork-point.sh                  |  35 +-\n t/t3432-rebase-fast-forward.sh                |  37 +-\n t/t3434-rebase-i18n.sh                        |  11 +-\n t/t3435-rebase-gpg-sign.sh                    |   7 +-\n t/t3436-rebase-more-options.sh                |   2 +-\n t/t3500-cherry.sh                             |  15 +-\n t/t3501-revert-cherry-pick.sh                 |   7 +-\n t/t3502-cherry-pick-merge.sh                  |   5 +-\n t/t3503-cherry-pick-root.sh                   |  13 +-\n t/t3504-cherry-pick-rerere.sh                 |  27 +-\n t/t3505-cherry-pick-empty.sh                  |  27 +-\n t/t3506-cherry-pick-ff.sh                     |  11 +-\n t/t3507-cherry-pick-conflict.sh               |   5 +-\n t/t3508-cherry-pick-many-commits.sh           |  41 +-\n t/t3509-cherry-pick-merge-df.sh               |   5 +-\n t/t3512-cherry-pick-submodule.sh              |   5 +-\n t/t3600-rm.sh                                 |  13 +-\n t/t3701-add-interactive.sh                    |   7 +-\n t/t3901-i18n-patch.sh                         |  43 +-\n t/t3903-stash.sh                              |  35 +-\n t/t3910-mac-os-precompose.sh                  |   9 +-\n t/t4013-diff-various.sh                       |   3 +\n t/t4014-format-patch.sh                       | 179 ++++---\n t/t4017-diff-retval.sh                        |   5 +-\n t/t4038-diff-combined.sh                      |  17 +-\n t/t4041-diff-submodule-option.sh              |   5 +-\n t/t4048-diff-combined-binary.sh               |  13 +-\n t/t4052-stat-output.sh                        |   7 +-\n t/t4056-diff-order.sh                         |   5 +-\n t/t4057-diff-combined-paths.sh                |  23 +-\n t/t4061-diff-indent.sh                        |  27 +-\n t/t4066-diff-emit-delay.sh                    |   5 +-\n t/t4068-diff-symmetric-merge-base.sh          |  51 +-\n t/t4103-apply-binary.sh                       |  39 +-\n t/t4108-apply-threeway.sh                     |  17 +-\n t/t4121-apply-diffs.sh                        |   5 +-\n t/t4122-apply-symlink-inside.sh               |   9 +-\n t/t4150-am.sh                                 |  29 +-\n t/t4200-rerere.sh                             |  23 +-\n t/t4201-shortlog.sh                           |   5 +-\n t/t4202-log.sh                                | 109 ++--\n t/t4203-mailmap.sh                            |   5 +-\n t/t4204-patch-id.sh                           |  29 +-\n t/t4207-log-decoration-colors.sh              |   9 +-\n t/t4208-log-magic-pathspec.sh                 |   7 +-\n t/t4211-line-log.sh                           |   3 +\n t/t4211/history.export                        |   2 +-\n t/t4214-log-graph-octopus.sh                  |   5 +-\n t/t4216-log-bloom.sh                          |   7 +-\n t/t4253-am-keep-cr-dos.sh                     |  23 +-\n t/t4257-am-interactive.sh                     |   2 +-\n t/t5150-request-pull.sh                       |  37 +-\n t/t5304-prune.sh                              |   5 +-\n t/t5305-include-tag.sh                        |   5 +-\n t/t5310-pack-bitmaps.sh                       |   3 +\n t/t5312-prune-corruption.sh                   |  19 +-\n t/t5317-pack-objects-filter-objects.sh        |   5 +-\n t/t5322-pack-objects-sparse.sh                |   5 +-\n t/t5323-pack-redundant.sh                     |  66 +--\n t/t5400-send-pack.sh                          |  63 +--\n t/t5401-update-hooks.sh                       |  24 +-\n t/t5402-post-merge-hook.sh                    |   5 +-\n t/t5403-post-checkout-hook.sh                 |   9 +-\n t/t5404-tracking-branches.sh                  |  11 +-\n t/t5405-send-pack-rewind.sh                   |   9 +-\n t/t5407-post-rewrite-hook.sh                  |   5 +-\n t/t5410-receive-pack-alternates.sh            |   7 +-\n t/t5500-fetch-pack.sh                         |  31 +-\n t/t5501-fetch-push-alternates.sh              |   7 +-\n t/t5502-quickfetch.sh                         |   9 +-\n t/t5503-tagfollow.sh                          |  15 +-\n t/t5504-fetch-receive-strict.sh               |  23 +-\n t/t5505-remote.sh                             | 151 +++---\n t/t5506-remote-groups.sh                      |   7 +-\n t/t5509-fetch-push-namespaces.sh              |  33 +-\n t/t5510-fetch.sh                              | 165 +++---\n t/t5511-refspec.sh                            |  12 +-\n t/t5512-ls-remote.sh                          |  29 +-\n t/t5514-fetch-multiple.sh                     |  33 +-\n t/t5516-fetch-push.sh                         | 503 +++++++++---------\n t/t5517-push-mirror.sh                        | 127 ++---\n t/t5518-fetch-exit-status.sh                  |   9 +-\n t/t5519-push-alternates.sh                    |  15 +-\n t/t5520-pull.sh                               |  33 +-\n t/t5521-pull-options.sh                       |  19 +-\n t/t5523-push-upstream.sh                      |  33 +-\n t/t5526-fetch-submodules.sh                   |   3 +\n t/t5527-fetch-odd-refs.sh                     |  17 +-\n t/t5528-push-default.sh                       | 101 ++--\n t/t5529-push-errors.sh                        |   2 +-\n t/t5530-upload-pack-error.sh                  |   2 +-\n t/t5531-deep-submodule-push.sh                | 191 +++----\n t/t5533-push-cas.sh                           | 145 ++---\n t/t5534-push-signed.sh                        |   7 +-\n t/t5537-fetch-shallow.sh                      |  33 +-\n t/t5538-push-shallow.sh                       |  25 +-\n t/t5539-fetch-http-shallow.sh                 |  17 +-\n t/t5540-http-push-webdav.sh                   |  11 +-\n t/t5541-http-push-smart.sh                    |  43 +-\n t/t5542-push-http-shallow.sh                  |  11 +-\n t/t5543-atomic-push.sh                        |  83 +--\n t/t5545-push-options.sh                       |  65 +--\n t/t5548-push-porcelain.sh                     |  64 +--\n t/t5550-http-fetch-dumb.sh                    |  23 +-\n t/t5551-http-fetch-smart.sh                   |  23 +-\n t/t5552-skipping-fetch-negotiator.sh          |   2 +-\n t/t5553-set-upstream.sh                       |  85 +--\n t/t5560-http-backend-noserver.sh              |   3 +\n t/t5561-http-backend.sh                       |   7 +-\n t/t556x_common                                |   8 +-\n t/t5570-git-daemon.sh                         |  19 +-\n t/t5571-pre-push-hook.sh                      |   7 +-\n t/t5572-pull-submodule.sh                     |   4 +-\n t/t5580-unc-paths.sh                          |   5 +-\n t/t5581-http-curl-verbose.sh                  |   5 +-\n t/t5582-fetch-negative-refspec.sh             |  25 +-\n t/t5601-clone.sh                              |   7 +-\n t/t5604-clone-reference.sh                    |  15 +-\n t/t5605-clone-local.sh                        |  13 +-\n t/t5606-clone-options.sh                      |  11 +-\n t/t5607-clone-bundle.sh                       |  17 +-\n t/t5608-clone-2gb.sh                          |   2 +-\n t/t5609-clone-branch.sh                       |   9 +-\n t/t5610-clone-detached.sh                     |   7 +-\n t/t5611-clone-config.sh                       |  19 +-\n t/t5612-clone-refspec.sh                      |  45 +-\n t/t5614-clone-submodules-shallow.sh           |   2 +-\n t/t5616-partial-clone.sh                      |  53 +-\n t/t5617-clone-submodules-remote.sh            |   9 +-\n t/t5700-protocol-v1.sh                        |  19 +-\n t/t5701-git-serve.sh                          |  19 +-\n t/t5702-protocol-v2.sh                        |  53 +-\n t/t5703-upload-pack-ref-in-want.sh            |  63 +--\n t/t5801-remote-helpers.sh                     |  27 +-\n t/t6000-rev-list-misc.sh                      |   5 +-\n t/t6001-rev-list-graft.sh                     |   5 +-\n t/t6004-rev-list-path-optim.sh                |  17 +-\n t/t6006-rev-list-format.sh                    |  17 +-\n t/t6007-rev-list-cherry-pick-file.sh          |   7 +-\n t/t6008-rev-list-submodule.sh                 |   5 +-\n t/t6009-rev-list-parent.sh                    |   9 +-\n t/t6012-rev-list-simplify.sh                  |  11 +-\n t/t6013-rev-list-reverse-parents.sh           |  13 +-\n t/t6016-rev-list-graph-simplify-history.sh    |   5 +-\n t/t6017-rev-list-stdin.sh                     |  11 +-\n t/t6018-rev-list-glob.sh                      |  53 +-\n t/t6019-rev-list-ancestry-path.sh             |   9 +-\n t/t6030-bisect-porcelain.sh                   |  13 +-\n t/t6040-tracking-info.sh                      |  57 +-\n t/t6050-replace.sh                            |  13 +-\n t/t6101-rev-parse-parents.sh                  |   5 +-\n t/t6110-rev-list-sparse.sh                    |   5 +-\n t/t6111-rev-list-treesame.sh                  |   9 +-\n t/t6112-rev-list-filters-objects.sh           |  17 +-\n t/t6120-describe.sh                           |  23 +-\n t/t6200-fmt-merge-msg.sh                      |  53 +-\n t/t6300-for-each-ref.sh                       |   3 +\n t/t6302-for-each-ref-filter.sh                |  61 ++-\n t/t6400-merge-df.sh                           |   9 +-\n t/t6402-merge-rename.sh                       |  49 +-\n t/t6404-recursive-merge.sh                    |   7 +-\n t/t6405-merge-symlinks.sh                     |  17 +-\n t/t6406-merge-attr.sh                         |  27 +-\n t/t6407-merge-binary.sh                       |   9 +-\n t/t6409-merge-subtree.sh                      |  19 +-\n t/t6411-merge-filemode.sh                     |  13 +-\n t/t6412-merge-large-rename.sh                 |   9 +-\n t/t6413-merge-crlf.sh                         |   5 +-\n t/t6414-merge-rename-nocruft.sh               |   5 +-\n t/t6415-merge-dir-to-symlink.sh               |  25 +-\n t/t6416-recursive-corner-cases.sh             |  31 +-\n t/t6417-merge-ours-theirs.sh                  |  31 +-\n t/t6418-merge-text-auto.sh                    |  15 +-\n t/t6419-merge-ignorecase.sh                   |  13 +-\n t/t6422-merge-rename-corner-cases.sh          |  15 +-\n t/t6425-merge-rename-delete.sh                |   5 +-\n t/t6427-diff3-conflict-markers.sh             |  17 +-\n t/t6430-merge-recursive.sh                    |  21 +-\n t/t6432-merge-recursive-space-options.sh      |   9 +-\n t/t6433-merge-toplevel.sh                     |  11 +-\n t/t6434-merge-recursive-rename-options.sh     |   9 +-\n t/t6436-merge-overwrite.sh                    |   5 +-\n t/t6437-submodule-merge.sh                    |  17 +-\n t/t6439-merge-co-error-msgs.sh                |   9 +-\n t/t6501-freshen-objects.sh                    |   5 +-\n t/t7003-filter-branch.sh                      |  43 +-\n t/t7004-tag.sh                                |  11 +-\n t/t7030-verify-tag.sh                         |   5 +-\n t/t7060-wtstatus.sh                           |  29 +-\n t/t7063-status-untracked-cache.sh             |  17 +-\n t/t7064-wtstatus-pv2.sh                       |   3 +\n t/t7102-reset.sh                              |   9 +-\n t/t7113-post-index-change-hook.sh             |   5 +-\n t/t7201-co.sh                                 | 113 ++--\n t/t7400-submodule-basic.sh                    |  23 +-\n t/t7403-submodule-sync.sh                     |  13 +-\n t/t7406-submodule-update.sh                   |  41 +-\n t/t7407-submodule-foreach.sh                  |  27 +-\n t/t7409-submodule-detached-work-tree.sh       |  11 +-\n t/t7417-submodule-path-url.sh                 |   5 +-\n t/t7501-commit-basic-functionality.sh         |   5 +-\n t/t7502-commit-porcelain.sh                   |  15 +-\n ...3-pre-commit-and-pre-merge-commit-hooks.sh |  45 +-\n t/t7504-commit-msg-hook.sh                    |  27 +-\n t/t7505-prepare-commit-msg-hook.sh            |  23 +-\n t/t7508-status.sh                             |  58 +-\n t/t7510-signed-commit.sh                      |   5 +-\n t/t7512-status-help.sh                        |  43 +-\n t/t7517-per-repo-email.sh                     |  15 +-\n t/t7600-merge.sh                              |  47 +-\n t/t7606-merge-custom.sh                       |   2 +-\n t/t7608-merge-messages.sh                     |  39 +-\n t/t7610-mergetool.sh                          | 177 +++---\n t/t7611-merge-abort.sh                        |   7 +-\n t/t7612-merge-verify-signatures.sh            |   5 +-\n t/t7614-merge-signoff.sh                      |  27 +-\n t/t7701-repack-unpack-unreachable.sh          |   5 +-\n t/t7800-difftool.sh                           |  41 +-\n t/t7810-grep.sh                               |  31 +-\n t/t8001-annotate.sh                           |   5 +-\n t/t8002-blame.sh                              |   3 +\n t/t8003-blame-corner-cases.sh                 |   7 +-\n t/t8004-blame-with-conflicts.sh               |  17 +-\n t/t8012-blame-colors.sh                       |   3 +\n t/t9001-send-email.sh                         |  31 +-\n t/t9100-git-svn-basic.sh                      |   5 +-\n t/t9145-git-svn-master-branch.sh              |   9 +-\n t/t9151-svn-mergeinfo.sh                      |   5 +-\n t/t9155-git-svn-fetch-deleted-tag.sh          |   5 +-\n t/t9156-git-svn-fetch-deleted-tag-2.sh        |   9 +-\n t/t9163-git-svn-reset-clears-caches.sh        |   5 +-\n t/t9169-git-svn-dcommit-crlf.sh               |   5 +-\n t/t9300-fast-import.sh                        |  85 +--\n t/t9301-fast-import-notes.sh                  |  17 +-\n t/t9302-fast-import-unpack-limit.sh           |  16 +-\n t/t9350-fast-export.sh                        |  89 ++--\n t/t9351-fast-export-anonymize.sh              |   7 +-\n t/t9400-git-cvsserver-server.sh               |  35 +-\n t/t9401-git-cvsserver-crlf.sh                 |  19 +-\n t/t9402-git-cvsserver-refs.sh                 |  11 +-\n t/t9500-gitweb-standalone-no-errors.sh        |  23 +-\n t/t9501-gitweb-standalone-http-status.sh      |  17 +-\n t/t9502-gitweb-standalone-parse-output.sh     |  19 +-\n t/t9600-cvsimport.sh                          |   5 +-\n t/t9601-cvsimport-vendor-branch.sh            |  19 +-\n t/t9602-cvsimport-branches-tags.sh            |   7 +-\n t/t9603-cvsimport-patchsets.sh                |  11 +-\n t/t9800-git-p4-basic.sh                       |   5 +-\n t/t9801-git-p4-branch.sh                      |  19 +-\n t/t9806-git-p4-options.sh                     |  21 +-\n t/t9807-git-p4-submit.sh                      |   5 +-\n t/t9811-git-p4-label-import.sh                |   5 +-\n t/t9902-completion.sh                         |   3 +\n t/t9903-bash-prompt.sh                        | 117 ++--\n 355 files changed, 4835 insertions(+), 3861 deletions(-)\n\n\nbase-commit: aff20da3a209088e7f8f3632077fa11b86453d67\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-762%2Fdscho%2Fuse-main-as-default-branch-name-v3\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-762/dscho/use-main-as-default-branch-name-v3\nPull-Request: https://github.com/gitgitgadget/git/pull/762\n\nRange-diff vs v2:\n\n  -:  ---------- >  1:  e9ee22525a tests: mark tests relying on the current default for `init.defaultBranch`\n  1:  0a05d319c0 =  2:  8c2e158c8f t0060: preemptively adjust alignment\n  2:  b8fa037791 !  3:  9b7749dcde t[01]*: adjust the references to the default branch name \"main\"\n     @@ Metadata\n       ## Commit message ##\n          t[01]*: adjust the references to the default branch name \"main\"\n      \n     -    This trick was performed via\n     +    Carefully excluding t1309, which sees independent development elsewhere\n     +    at the time of writing, we transition above-mentioned tests to the\n     +    default branch name `main`. This trick was performed via\n      \n                  $ (cd t &&\n                     sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n     -                    -e 's/Master/Main/g' -e 's/naster/nain/g' -- t[01]*.sh)\n     +                    -e 's/Master/Main/g' -e 's/naster/nain/g' -- t[01]*.sh &&\n     +               git checkout HEAD -- t1309\\*)\n      \n          Note that t5533 contains a variation of the name `master` (`naster`)\n          that we rename here, too.\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t0002-gitfile.sh ##\n     +@@ t/t0002-gitfile.sh: test_description='.git file\n     + \n     + Verify that plumbing commands work when .git is a file\n     + '\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t0002-gitfile.sh: test_expect_success 'enter_repo non-strict mode' '\n       \tgit ls-remote enter_repo >actual &&\n       \tcat >expected <<-EOF &&\n     @@ t/t0002-gitfile.sh: test_expect_success 'enter_repo strict mode' '\n       \ttest_cmp expected actual\n      \n       ## t/t0020-crlf.sh ##\n     +@@\n     + \n     + test_description='CRLF conversion'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t0020-crlf.sh: test_expect_success 'checkout with existing .gitattributes' '\n       \tgit add .gitattributes .file &&\n       \tgit commit -m second &&\n     @@ t/t0020-crlf.sh: test_expect_success 'checkout when deleting .gitattributes' '\n       '\n      \n       ## t/t0021-conversion.sh ##\n     +@@\n     + \n     + test_description='blob conversion via gitattributes'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t0021-conversion.sh: test_expect_success PERL 'required process filter should filter data' '\n       \t\ttest_cmp_count expected.log debug.log &&\n       \n     @@ t/t0027-auto-crlf.sh: test_expect_success 'ls-files --eol -o Text/Binary' '\n       \tprintf \"\\$Id: 0000000000000000000000000000000000000000 \\$\\nLINEONE\\nLINETWO\\nLINETHREE\"     >LF &&\n      \n       ## t/t0028-working-tree-encoding.sh ##\n     +@@\n     + \n     + test_description='working-tree-encoding conversion via gitattributes'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t0028-working-tree-encoding.sh: test_expect_success 'error if encoding round trip is not the same during refresh\n       \tTEST_HASH=$(git hash-object --no-filters -w nonsense.utf16le) &&\n       \tgit update-index --add --cacheinfo 100644 $TEST_HASH nonsense.utf16le &&\n     @@ t/t0028-working-tree-encoding.sh: test_expect_success 'error if encoding garbage\n       \ttest_i18ngrep \"error: BOM is required\" err.out\n      \n       ## t/t0041-usage.sh ##\n     +@@\n     + \n     + test_description='Test commands behavior when given invalid argument value'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t0041-usage.sh: test_expect_success 'tag usage error' '\n       '\n       \n     @@ t/t0041-usage.sh: test_expect_success 'for-each-ref --contains <inexistent_objec\n       '\n      \n       ## t/t0050-filesystem.sh ##\n     +@@\n     + \n     + test_description='Various filesystem issues'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t0050-filesystem.sh: test_expect_success \"setup case tests\" '\n       \tgit mv camelcase tmp &&\n       \tgit mv tmp CamelCase &&\n     @@ t/t0060-path-utils.sh: test_git_path GIT_COMMON_DIR=bar info/sparse-checkout\n       test_git_path GIT_COMMON_DIR=bar config                   bar/config\n      \n       ## t/t0100-previous.sh ##\n     +@@\n     + \n     + test_description='previous branch syntax @{-n}'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t0100-previous.sh: test_expect_success 'branch -d @{-1}' '\n       \ttest_commit A &&\n       \tgit checkout -b junk &&\n     @@ t/t0100-previous.sh: test_expect_success 'merge @{-1}~1' '\n       \n      \n       ## t/t1004-read-tree-m-u-wf.sh ##\n     +@@\n     + \n     + test_description='read-tree -m -u checks working tree files'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1004-read-tree-m-u-wf.sh: test_expect_success 'two-way setup' '\n       \tgit branch side &&\n       \tgit tag -f branch-point &&\n     @@ t/t1004-read-tree-m-u-wf.sh: test_expect_success 'three-way not complaining on a\n       test_expect_success '3-way not overwriting local changes (setup)' '\n      \n       ## t/t1008-read-tree-overlay.sh ##\n     +@@\n     + \n     + test_description='test multi-tree read-tree without merging'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1008-read-tree-overlay.sh: test_expect_success setup '\n       '\n       \n     @@ t/t1008-read-tree-overlay.sh: test_expect_success setup '\n       \ttest_cmp expect actual\n      \n       ## t/t1009-read-tree-new-index.sh ##\n     +@@\n     + \n     + test_description='test read-tree into a fresh index file'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1009-read-tree-new-index.sh: test_expect_success setup '\n       \n       test_expect_success 'non-existent index file' '\n     @@ t/t1011-read-tree-sparse-checkout.sh\n       | M\tinit.t\n      \n       ## t/t1021-rerere-in-workdir.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='rerere run in a workdir'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1021-rerere-in-workdir.sh: test_expect_success SYMLINKS setup '\n       \ttest_tick &&\n       \tgit commit -a -m goodbye &&\n     @@ t/t1021-rerere-in-workdir.sh: test_expect_success SYMLINKS setup '\n       test_expect_success SYMLINKS 'rerere in workdir' '\n      \n       ## t/t1090-sparse-checkout-scope.sh ##\n     +@@\n     + \n     + test_description='sparse checkout scope tests'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1090-sparse-checkout-scope.sh: test_expect_success 'create feature branch' '\n       \tgit commit -m \"modification\"\n       '\n     @@ t/t1090-sparse-checkout-scope.sh: test_expect_success 'merge feature branch into\n       \ttest_path_is_file c &&\n      \n       ## t/t1091-sparse-checkout-builtin.sh ##\n     +@@\n     + \n     + test_description='sparse checkout builtin tests'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1091-sparse-checkout-builtin.sh: test_expect_success 'interaction with clone --no-checkout (unborn index)' '\n       \ttest_path_is_missing clone_no_checkout/.git/index &&\n       \n     @@ t/t1091-sparse-checkout-builtin.sh: test_expect_success 'interaction with clone\n       '\n      \n       ## t/t1300-config.sh ##\n     +@@\n     + \n     + test_description='Test git config in different settings'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1300-config.sh: test_expect_success 'check split_cmdline return' \"\n       \techo foo > foo &&\n       \tgit add foo &&\n     @@ t/t1300-config.sh: test_expect_success '--show-origin blob' '\n       \n      \n       ## t/t1301-shared-repo.sh ##\n     +@@\n     + \n     + test_description='Test shared repository initialization'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1301-shared-repo.sh: test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '\n       \tumask 077 &&\n       \tgit config core.sharedRepository group &&\n     @@ t/t1305-config-include.sh: test_expect_success SYMLINKS 'conditional include, gi\n       \tgit checkout -b foo-branch &&\n       \techo 9 >expect &&\n      \n     - ## t/t1309-early-config.sh ##\n     -@@ t/t1309-early-config.sh: test_expect_failure 'ignore .git/ with invalid config' '\n     - \n     - test_expect_success 'early config and onbranch' '\n     - \techo \"[broken\" >broken &&\n     --\ttest_with_config \"[includeif \\\"onbranch:master\\\"]path=../broken\"\n     -+\ttest_with_config \"[includeif \\\"onbranch:main\\\"]path=../broken\"\n     - '\n     + ## t/t1400-update-ref.sh ##\n     +@@\n     + #\n       \n     - test_expect_success 'onbranch config outside of git repo' '\n     --\ttest_config_global includeIf.onbranch:master.path non-existent &&\n     -+\ttest_config_global includeIf.onbranch:main.path non-existent &&\n     - \tnongit git help\n     - '\n     + test_description='Test git update-ref and basic ref logging'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n       \n     -\n     - ## t/t1400-update-ref.sh ##\n     -@@ t/t1400-update-ref.sh: test_description='Test git update-ref and basic ref logging'\n     + . ./test-lib.sh\n       \n       Z=$ZERO_OID\n       \n     @@ t/t1402-check-ref-format.sh: test_expect_success 'check-ref-format --branch @{-1\n       \n      \n       ## t/t1403-show-ref.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='show-ref'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1403-show-ref.sh: test_expect_success setup '\n       \tgit checkout -b side &&\n       \ttest_commit B &&\n     @@ t/t1403-show-ref.sh: test_expect_success 'show-ref -d' '\n       \tdone >expect.heads &&\n      \n       ## t/t1405-main-ref-store.sh ##\n     +@@\n     + \n     + test_description='test main ref store api'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1405-main-ref-store.sh: test_expect_success 'peel_ref(new-tag)' '\n       \ttest_cmp expected actual\n       '\n     @@ t/t1405-main-ref-store.sh: test_expect_success 'for_each_reflog()' '\n       \n      \n       ## t/t1406-submodule-ref-store.sh ##\n     +@@\n     + \n     + test_description='test submodule ref store api'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1406-submodule-ref-store.sh: test_expect_success 'setup' '\n       \t(\n       \t\tcd sub &&\n     @@ t/t1406-submodule-ref-store.sh: test_expect_success 'for_each_reflog()' '\n       \n      \n       ## t/t1407-worktree-ref-store.sh ##\n     +@@\n     + \n     + test_description='test worktree ref store api'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1407-worktree-ref-store.sh: RMAIN=\"test-tool ref-store worktree:main\"\n       \n       test_expect_success 'setup' '\n     @@ t/t1407-worktree-ref-store.sh: test_expect_success 'for_each_reflog()' '\n       '\n      \n       ## t/t1408-packed-refs.sh ##\n     +@@\n     + \n     + test_description='packed-refs entries are covered by loose refs'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1408-packed-refs.sh: test_expect_success setup '\n       \tgit commit --allow-empty -m one &&\n       \tone=$(git rev-parse HEAD) &&\n     @@ t/t1408-packed-refs.sh: test_expect_success setup '\n       '\n      \n       ## t/t1410-reflog.sh ##\n     +@@\n     + #\n     + \n     + test_description='Test prune and reflog expiration'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1410-reflog.sh: test_expect_success setup '\n       \n       \tcheck_fsck &&\n     @@ t/t1410-reflog.sh: test_expect_success 'stale dirs do not cause d/f conflicts (r\n       '\n      \n       ## t/t1411-reflog-show.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='Test reflog display routines'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1411-reflog-show.sh: test_expect_success 'git log -g -p shows diffs vs. parents' '\n       '\n       \n     @@ t/t1411-reflog-show.sh: test_expect_success 'git log -g -p shows diffs vs. paren\n       \n      \n       ## t/t1413-reflog-detach.sh ##\n     -@@ t/t1413-reflog-detach.sh: test_description='Test reflog interaction with detached HEAD'\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='Test reflog interaction with detached HEAD'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n       . ./test-lib.sh\n       \n       reset_state () {\n     @@ t/t1413-reflog-detach.sh: test_expect_success 'switch to branch' '\n       \ttest_cmp expect actual\n      \n       ## t/t1414-reflog-walk.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='various tests of reflog walk (log -g) behavior'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1414-reflog-walk.sh: test_expect_success 'set up some reflog entries' '\n       \ttest_commit two &&\n       \tgit checkout -b side HEAD^ &&\n     @@ t/t1414-reflog-walk.sh: test_expect_success 'walking multiple reflogs shows all'\n       \n      \n       ## t/t1416-ref-transaction-hooks.sh ##\n     +@@\n     + \n     + test_description='reference transaction hooks'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1416-ref-transaction-hooks.sh: test_expect_success 'hook gets all queued updates in prepared state' '\n       \tEOF\n       \tcat >expect <<-EOF &&\n     @@ t/t1416-ref-transaction-hooks.sh: test_expect_success 'hook gets all queued upda\n       \ttest_cmp expect actual\n      \n       ## t/t1430-bad-ref-name.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='Test handling of ref names that check-ref-format rejects'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1430-bad-ref-name.sh: test_expect_success 'fast-import: fail on invalid branch name \".badbranchname\"'\n       \t\tcorrupt\n       \t\tCOMMIT\n     @@ t/t1450-fsck.sh\n       . ./test-lib.sh\n      \n       ## t/t1500-rev-parse.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='test git rev-parse'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1500-rev-parse.sh: test_expect_success 'showing the superproject correctly' '\n       \ttest_commit -C super/dir/sub branch1_commit &&\n       \tgit -C super add dir/sub &&\n     @@ t/t1500-rev-parse.sh: test_expect_success 'showing the superproject correctly' '\n       \ttest_commit -C super branch2_commit &&\n      \n       ## t/t1503-rev-parse-verify.sh ##\n     +@@ t/t1503-rev-parse-verify.sh: test_description='test git rev-parse --verify'\n     + \n     + exec </dev/null\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1503-rev-parse-verify.sh: test_expect_success 'works with one good rev' '\n       \ttest \"$rev_hash3\" = \"$HASH3\" &&\n       \trev_hash4=$(git rev-parse --verify $HASH4) &&\n     @@ t/t1503-rev-parse-verify.sh: test_expect_success 'no stdout output on error' '\n       test_expect_success SYMLINKS 'ref resolution not confused by broken symlinks' '\n      \n       ## t/t1505-rev-parse-last.sh ##\n     +@@\n     + \n     + test_description='test @{-N} syntax'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1505-rev-parse-last.sh: test_expect_success 'setup' '\n       \tmake_commit 3 &&\n       \tgit checkout side &&\n     @@ t/t1505-rev-parse-last.sh: test_expect_success '@{-1}@{1} works' '\n       test_expect_success '@{-3} fails' '\n      \n       ## t/t1506-rev-parse-diagnosis.sh ##\n     +@@ t/t1506-rev-parse-diagnosis.sh: test_description='test git rev-parse diagnosis for invalid argument'\n     + \n     + exec </dev/null\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1506-rev-parse-diagnosis.sh: test_expect_success 'incorrect file in :path and :N:path' '\n       '\n       \n     @@ t/t1506-rev-parse-diagnosis.sh: test_expect_success 'incorrect file in :path and\n       '\n      \n       ## t/t1507-rev-parse-upstream.sh ##\n     +@@\n     + \n     + test_description='test <branch>@{upstream} syntax'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1507-rev-parse-upstream.sh: test_expect_success 'setup' '\n       \ttest_commit 1 &&\n       \tgit checkout -b side &&\n     @@ t/t1507-rev-parse-upstream.sh: test_expect_success 'log -g other@{u}@{now}' '\n       \tDate:   Thu Apr 7 15:15:13 2005 -0700\n      \n       ## t/t1508-at-combinations.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='test various @{X} syntax combinations together'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1508-at-combinations.sh: fail() {\n       }\n       \n     @@ t/t1508-at-combinations.sh: check \"@{-1}@{1}\" commit old-one\n       check \"@@/at-test\" ref refs/heads/@@/at-test\n      \n       ## t/t1511-rev-parse-caret.sh ##\n     +@@\n     + \n     + test_description='tests for ref^{stuff}'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1511-rev-parse-caret.sh: test_expect_success 'setup' '\n       \tgit commit -m Initial &&\n       \tgit tag -a -m commit commit-tag &&\n     @@ t/t1511-rev-parse-caret.sh: test_expect_success 'ref^{tag}' '\n       \n      \n       ## t/t1512-rev-parse-disambiguation.sh ##\n     +@@ t/t1512-rev-parse-disambiguation.sh: one tagged as v1.0.0.  They all have one regular file each.\n     + \n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1512-rev-parse-disambiguation.sh: test_expect_success 'more history' '\n       \tside=$(git rev-parse HEAD) &&\n       \n     @@ t/t1512-rev-parse-disambiguation.sh: test_expect_success 'more history' '\n       \t# clean up a0blgqsjc as well.  If you use resolve, merge will\n      \n       ## t/t1513-rev-parse-prefix.sh ##\n     +@@\n     + \n     + test_description='Tests for rev-parse --prefix'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1513-rev-parse-prefix.sh: test_expect_success 'disambiguate path with valid prefix' '\n       '\n       \n     @@ t/t1513-rev-parse-prefix.sh: test_expect_success 'disambiguate path with valid p\n       \ttest_cmp expected actual\n      \n       ## t/t1514-rev-parse-push.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='test <branch>@{push} syntax'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1514-rev-parse-push.sh: test_expect_success 'setup' '\n       \tgit remote add other other.git &&\n       \ttest_commit base &&\n     @@ t/t1514-rev-parse-push.sh: test_expect_success 'setup' '\n       test_expect_success 'triangular @{push} fails with default=simple' '\n      \n       ## t/t1700-split-index.sh ##\n     +@@\n     + \n     + test_description='split index mode tests'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t1700-split-index.sh: test_expect_success 'do not refresh null base index' '\n       \t\ttest_commit initial &&\n       \t\tgit checkout -b side-branch &&\n     @@ t/t1700-split-index.sh: test_expect_success 'do not refresh null base index' '\n       \t\tgit update-index --split-index &&\n       \t\ttest_commit more &&\n       \t\t# must not write a new shareindex, or we wont catch the problem\n     -\n     - ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TRASH_DIRECTORY\" in\n     -  *) TRASH_DIRECTORY=\"$TEST_OUTPUT_DIRECTORY/$TRASH_DIRECTORY\" ;;\n     - esac\n     - \n     -+case \"$TEST_NUMBER\" in\n     -+[01]*)\n     -+\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     -+\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     -+\t;;\n     -+esac\n     -+\n     - # If --stress was passed, run this test repeatedly in several parallel loops.\n     - if test \"$GIT_TEST_STRESS_STARTED\" = \"done\"\n     - then\n  3:  0d4f1275f7 !  4:  f5dbc0d5bb t2*: adjust the references to the default branch name \"main\"\n     @@ Metadata\n       ## Commit message ##\n          t2*: adjust the references to the default branch name \"main\"\n      \n     -    This trick was performed via\n     +    Carefully excluding t2106, which sees independent development elsewhere\n     +    at the time of writing, we transition above-mentioned tests to the\n     +    default branch name `main`. This trick was performed via\n      \n                  $ (cd t &&\n                     sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n     -                    -e 's/Master/Main/g' -- t2*.sh)\n     +                    -e 's/Master/Main/g' -- t2*.sh &&\n     +               git checkout HEAD -- t2106\\*)\n      \n          This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\n          for those tests.\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t2007-checkout-symlink.sh ##\n     +@@\n     + \n     + test_description='git checkout to switch between branches with symlink<->dir'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2007-checkout-symlink.sh: test_expect_success setup '\n       \techo hello >frotz/filfre &&\n       \tgit add frotz/filfre &&\n     @@ t/t2007-checkout-symlink.sh: test_expect_success setup '\n       test_expect_success 'switch from dir to symlink' '\n      \n       ## t/t2009-checkout-statinfo.sh ##\n     +@@\n     + \n     + test_description='checkout should leave clean stat info'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2009-checkout-statinfo.sh: test_expect_success 'branch switching' '\n       \tgit reset --hard &&\n       \ttest \"$(git diff-files --raw)\" = \"\" &&\n     @@ t/t2009-checkout-statinfo.sh: test_expect_success 'path checkout' '\n       '\n      \n       ## t/t2010-checkout-ambiguous.sh ##\n     +@@\n     + \n     + test_description='checkout and pathspecs/refspecs ambiguities'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2010-checkout-ambiguous.sh: test_expect_success 'reference must be a tree' '\n       '\n       \n     @@ t/t2010-checkout-ambiguous.sh: test_expect_success 'disambiguate checking out fr\n       '\n      \n       ## t/t2011-checkout-invalid-head.sh ##\n     +@@\n     + \n     + test_description='checkout switching away from an invalid branch'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2011-checkout-invalid-head.sh: test_expect_success 'setup' '\n       '\n       \n     @@ t/t2011-checkout-invalid-head.sh: test_expect_success 'pack refs' '\n       test_done\n      \n       ## t/t2012-checkout-last.sh ##\n     +@@\n     + \n     + test_description='checkout can switch to last branch and merge base'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2012-checkout-last.sh: test_expect_success 'first branch switch' '\n       \n       test_expect_success '\"checkout -\" switches back' '\n     @@ t/t2012-checkout-last.sh: test_expect_success 'merge base test setup' '\n       test_done\n      \n       ## t/t2015-checkout-unborn.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='checkout from unborn branch'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2015-checkout-unborn.sh: test_expect_success 'setup' '\n       \t git add file &&\n       \t git commit -m base\n     @@ t/t2015-checkout-unborn.sh: test_expect_success 'setup' '\n       test_expect_success 'checkout from unborn preserves untracked files' '\n      \n       ## t/t2017-checkout-orphan.sh ##\n     +@@ t/t2017-checkout-orphan.sh: test_description='git checkout --orphan\n     + \n     + Main Tests for --orphan functionality.'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2017-checkout-orphan.sh: test_expect_success '--orphan creates a new orphan branch from HEAD' '\n       \ttest_tick &&\n       \tgit commit -m \"Third Commit\" &&\n     @@ t/t2017-checkout-orphan.sh: test_expect_success '--orphan with -l makes reflog w\n       '\n      \n       ## t/t2020-checkout-detach.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='checkout into detached HEAD state'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2020-checkout-detach.sh: check_no_orphan_warning() {\n       }\n       \n     @@ t/t2020-checkout-detach.sh: test_expect_success 'describe_detached_head prints n\n       \tcat >1st_detach <<-EOF &&\n      \n       ## t/t2022-checkout-paths.sh ##\n     -@@ t/t2022-checkout-paths.sh: test_description='checkout $tree -- $paths'\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='checkout $tree -- $paths'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n       \n       test_expect_success setup '\n       \tmkdir dir &&\n     @@ t/t2022-checkout-paths.sh: test_expect_success 'do not touch unmerged entries ma\n       '\n      \n       ## t/t2023-checkout-m.sh ##\n     +@@ t/t2023-checkout-m.sh: test_description='checkout -m -- <conflicted path>\n     + \n     + Ensures that checkout -m on a resolved file restores the conflicted file'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2023-checkout-m.sh: test_expect_success setup '\n       \ttest_tick &&\n       \ttest_commit both.txt both.txt initial &&\n     @@ t/t2024-checkout-dwim.sh: test_expect_success 'loosely defined local base branch\n       \tstatus_uno_is_clean &&\n      \n       ## t/t2027-checkout-track.sh ##\n     +@@\n     + \n     + test_description='tests for git branch --track'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2027-checkout-track.sh: test_expect_success 'setup' '\n       '\n       \n     @@ t/t2027-checkout-track.sh: test_expect_success 'setup' '\n       \n      \n       ## t/t2030-unresolve-info.sh ##\n     +@@\n     + \n     + test_description='undoing resolution'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2030-unresolve-info.sh: test_expect_success setup '\n       \ttest_commit fourth fi/le fourth &&\n       \tgit checkout add-add &&\n     @@ t/t2030-unresolve-info.sh: test_expect_success 'rerere forget (binary)' '\n       \ttest_must_fail git merge fifth &&\n      \n       ## t/t2060-switch.sh ##\n     +@@\n     + \n     + test_description='switch basic functionality'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2060-switch.sh: test_expect_success 'switch branch' '\n       '\n       \n     @@ t/t2060-switch.sh: test_expect_success 'switching ignores file of same branch na\n       \ttest_must_fail git switch foo &&\n      \n       ## t/t2070-restore.sh ##\n     +@@\n     + \n     + test_description='restore basic functionality'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2070-restore.sh: test_expect_success 'setup' '\n       \techo ignored >ignored &&\n       \techo /ignored >.gitignore &&\n     @@ t/t2070-restore.sh: test_expect_success 'restore --ignore-unmerged ignores unmer\n       \t\tgit commit -am second &&\n       \t\ttest_must_fail git merge first &&\n      \n     - ## t/t2106-update-index-assume-unchanged.sh ##\n     -@@ t/t2106-update-index-assume-unchanged.sh: test_expect_success 'do not switch branches with dirty file' \\\n     - \t git checkout other &&\n     - \t echo dirt >file &&\n     - \t git update-index --assume-unchanged file &&\n     --\t test_must_fail git checkout master'\n     -+\t test_must_fail git checkout main'\n     - \n     - test_done\n     -\n       ## t/t2400-worktree-add.sh ##\n     +@@\n     + \n     + test_description='test git worktree add'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2400-worktree-add.sh: test_expect_success 'setup' '\n       \n       test_expect_success '\"add\" an existing worktree' '\n     @@ t/t2400-worktree-add.sh: test_branch_upstream () {\n       \t\t\t\"refs/heads/*:refs/remotes/$1/*\" &&\n      \n       ## t/t2401-worktree-prune.sh ##\n     +@@\n     + \n     + test_description='prune $GIT_DIR/worktrees'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2401-worktree-prune.sh: test_expect_success 'not prune recent checkouts' '\n       \n       test_expect_success 'not prune proper checkouts' '\n     @@ t/t2401-worktree-prune.sh: test_expect_success 'not prune recent checkouts' '\n       '\n      \n       ## t/t2402-worktree-list.sh ##\n     +@@\n     + \n     + test_description='test git worktree list'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2402-worktree-list.sh: test_expect_success 'rev-parse --git-common-dir on main worktree' '\n       test_expect_success 'rev-parse --git-path objects linked worktree' '\n       \techo \"$(git rev-parse --show-toplevel)/.git/objects\" >expect &&\n     @@ t/t2402-worktree-list.sh: test_expect_success '\"list\" all worktrees --porcelain\n       \tgit -C there worktree list >out &&\n      \n       ## t/t2405-worktree-submodule.sh ##\n     +@@\n     + \n     + test_description='Combination of submodules and multiple worktrees'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t2405-worktree-submodule.sh: test_expect_success 'add superproject worktree' '\n       '\n       \n     @@ t/t2405-worktree-submodule.sh: test_expect_success 'add superproject worktree an\n       \tgrep \"file1 updated\" out\n       '\n       \n     -\n     - ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TRASH_DIRECTORY\" in\n     - esac\n     - \n     - case \"$TEST_NUMBER\" in\n     --[01]*)\n     -+[0-2]*)\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n  4:  aee29a0528 !  5:  090ac6e9a1 t3[0-3]*: adjust the references to the default branch name \"main\"\n     @@ Metadata\n       ## Commit message ##\n          t3[0-3]*: adjust the references to the default branch name \"main\"\n      \n     -    This trick was performed via\n     +    Carefully excluding t3040, which sees independent development elsewhere\n     +    at the time of writing, we transition above-mentioned tests to the\n     +    default branch name `main`. This trick was performed via\n      \n                  $ (cd t &&\n                     sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n     -                    -e 's/Master/Main/g' -- t3[0-3]*.sh t3206/*)\n     +                    -e 's/Master/Main/g' -- t3[0-3]*.sh t3206/* &&\n     +               git checkout HEAD -- t3040\\*)\n      \n          This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\n          for those tests.\n      \n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n     - ## t/t3040-subprojects-basic.sh ##\n     -@@ t/t3040-subprojects-basic.sh: test_expect_success 'checkout in superproject' '\n     - '\n     + ## t/t3200-branch.sh ##\n     +@@\n       \n     - # just interesting what happened...\n     --# git diff --name-status -M save master\n     -+# git diff --name-status -M save main\n     + test_description='git branch assorted tests'\n       \n     - test_done\n     -\n     - ## t/t3200-branch.sh ##\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3200-branch.sh: test_expect_success 'branch -h in broken repository' '\n       \t(\n       \t\tcd broken &&\n     @@ t/t3200-branch.sh: test_expect_success 'option override configured sort' '\n       \t)\n      \n       ## t/t3201-branch-contains.sh ##\n     +@@\n     + \n     + test_description='branch --contains <commit>, --no-contains <commit> --merged, and --no-merged'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3201-branch-contains.sh: test_expect_success setup '\n       \n       \techo 1 >file &&\n     @@ t/t3201-branch-contains.sh: test_expect_success 'branch --merged combined with -\n       \tEOF\n      \n       ## t/t3202-show-branch-octopus.sh ##\n     +@@\n     + \n     + test_description='test show-branch with more than 8 heads'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3202-show-branch-octopus.sh: test_expect_success 'setup' '\n       \n       \tfor i in $numbers\n     @@ t/t3202-show-branch-octopus.sh: test_expect_success 'setup' '\n       \t\ttest_tick &&\n      \n       ## t/t3203-branch-output.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='git branch display tests'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3203-branch-output.sh: test_expect_success 'make remote branches' '\n       cat >expect <<'EOF'\n         branch-one\n     @@ t/t3203-branch-output.sh: test_expect_success '--color overrides auto-color' '\n       \t  ambiguous                    $one one\n      \n       ## t/t3204-branch-name-interpretation.sh ##\n     +@@ t/t3204-branch-name-interpretation.sh: Branch name arguments are usually names which are taken to be inside of\n     + refs/heads/, but we interpret some magic syntax like @{-1}, @{upstream}, etc.\n     + This script aims to check the behavior of those corner cases.\n     + '\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3204-branch-name-interpretation.sh: test_expect_success 'update branch via @{-1}' '\n       \tgit branch previous one &&\n       \n     @@ t/t3204-branch-name-interpretation.sh: test_expect_success 'disallow deleting re\n       \texpect_branch refs/remotes/origin/previous one &&\n      \n       ## t/t3205-branch-color.sh ##\n     -@@ t/t3205-branch-color.sh: test_description='basic branch output coloring'\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='basic branch output coloring'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n       \n       test_expect_success 'set up some sample branches' '\n       \ttest_commit foo &&\n     @@ t/t3205-branch-color.sh: test_expect_success 'set up some color config' '\n       \ttest_decode_color <actual.raw >actual &&\n      \n       ## t/t3206-range-diff.sh ##\n     +@@\n     + \n     + test_description='range-diff tests'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3206-range-diff.sh: test_expect_success 'setup' '\n       '\n       \n     @@ t/t3206/history.export: mark :11\n       committer Thomas Rast <trast@inf.ethz.ch> 1374485127 +0200\n      \n       ## t/t3210-pack-refs.sh ##\n     +@@ t/t3210-pack-refs.sh: test_description='git pack-refs should not change the branch semantic\n     + This test runs git pack-refs and git show-ref and checks that the branch\n     + semantic is still the same.\n     + '\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3210-pack-refs.sh: test_expect_success 'delete ref with dangling packed version' '\n       \tgit commit --allow-empty -m \"future garbage\" &&\n       \tgit pack-refs --all &&\n     @@ t/t3210-pack-refs.sh: test_expect_success 'retry acquiring packed-refs.lock' '\n       \tln -s my-deviant-packed-refs .git/packed-refs &&\n      \n       ## t/t3211-peel-ref.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='tests for the peel_ref optimization of packed-refs'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3211-peel-ref.sh: print_ref() {\n       \n       test_expect_success 'set up expected show-ref output' '\n     @@ t/t3301-notes.sh: test_expect_success 'git notes copy diagnoses too many or too\n       \n      \n       ## t/t3302-notes-index-expensive.sh ##\n     +@@\n     + \n     + test_description='Test commit notes index (expensive!)'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3302-notes-index-expensive.sh: create_repo () {\n       \t\t\tnotemark=$(($mark+1))\n       \t\t\ttest_tick &&\n     @@ t/t3302-notes-index-expensive.sh: create_repo () {\n       \t\t\tdata <<COMMIT\n      \n       ## t/t3303-notes-subtrees.sh ##\n     +@@\n     + \n     + test_description='Test commit notes organized in subtrees'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3303-notes-subtrees.sh: test_expect_success \"setup: create $number_of_commits commits\" '\n       \t\t\tnr=$(($nr+1)) &&\n       \t\t\ttest_tick &&\n     @@ t/t3303-notes-subtrees.sh: test_concatenated_notes () {\n       \t\t\tsecond_note_path=$(echo \"$sha1\" | sed \"$2\")\n      \n       ## t/t3304-notes-mixed.sh ##\n     +@@\n     + \n     + test_description='Test notes trees that also contain non-notes'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3304-notes-mixed.sh: test_expect_success \"setup: create a couple of commits\" '\n       \n       \ttest_tick &&\n     @@ t/t3308-notes-merge.sh: test_expect_success 'fail to merge into various non-note\n       \ttest_must_fail git -c \"core.notesRef=refs/notes/foo^{bar\" notes merge x\n      \n       ## t/t3320-notes-merge-worktrees.sh ##\n     +@@\n     + \n     + test_description='Test merging of notes trees in multiple worktrees'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3320-notes-merge-worktrees.sh: test_expect_success 'modify notes ref ourselves (x)' '\n       '\n       \n     @@ t/t3320-notes-merge-worktrees.sh: test_expect_success 'modify notes ref ourselve\n       '\n       \n       test_expect_success 'merge z into y fails and sets NOTES_MERGE_REF' '\n     -\n     - ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TRASH_DIRECTORY\" in\n     - esac\n     - \n     - case \"$TEST_NUMBER\" in\n     --[0-2]*)\n     -+[0-2]*|3[0-3]*)\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n  5:  041ad86e33 !  6:  c8494f4602 t3416: preemptively adjust alignment in a comment\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t3416-rebase-onto-threedots.sh ##\n     -@@ t/t3416-rebase-onto-threedots.sh: test_description='git rebase --onto A...B'\n     +@@ t/t3416-rebase-onto-threedots.sh: export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n       #\n       #\t    F---G topic                             G'\n       #\t   /                                       /\n  6:  2f62b3f469 !  7:  c0d02e4d9d t34*: adjust the references to the default branch name \"main\"\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t3400-rebase.sh ##\n     +@@ t/t3400-rebase.sh: test_description='git rebase assorted tests\n     + This test runs git rebase and checks that the author information is not lost\n     + among other things.\n     + '\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3400-rebase.sh: test_expect_success 'prepare repository with topic branches' '\n       \tgit update-index --add Y &&\n       \tgit commit -m \"Add Y.\" &&\n     @@ t/t3400-rebase.sh: test_expect_success 'rebase -c rebase.useBuiltin=false warnin\n       \n      \n       ## t/t3402-rebase-merge.sh ##\n     +@@\n     + \n     + test_description='git rebase --merge test'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3402-rebase-merge.sh: test_expect_success setup '\n       \tgit commit -m\"initial\" &&\n       \tgit branch side &&\n     @@ t/t3402-rebase-merge.sh: test_expect_success '--reapply-cherry-picks refrains fr\n       \tgit -C client rev-list --objects --all --missing=print >missing_list &&\n      \n       ## t/t3403-rebase-skip.sh ##\n     +@@\n     + \n     + test_description='git rebase --merge --skip tests'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3403-rebase-skip.sh: test_expect_success setup '\n       \t'\n       \n     @@ t/t3403-rebase-skip.sh: test_expect_success 'rebase moves back to skip-reference\n       test_expect_success 'rebase --skip with --merge' '\n      \n       ## t/t3405-rebase-malformed.sh ##\n     +@@\n     + \n     + test_description='rebase should handle arbitrary git message'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3405-rebase-malformed.sh: test_expect_success setup '\n       \tgit add file3 &&\n       \tgit commit --allow-empty-message -m \"\" &&\n     @@ t/t3405-rebase-malformed.sh: test_expect_success 'rebase commit with multi-line\n       test_expect_success 'rebase -i commit with empty message' '\n      \n       ## t/t3406-rebase-message.sh ##\n     +@@\n     + \n     + test_description='messages from rebase operation'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3406-rebase-message.sh: test_expect_success 'setup' '\n       '\n       \n     @@ t/t3406-rebase-message.sh: test_expect_success 'rebase -i onto unrelated history\n       \ttest_i18ngrep \"5 files changed\" actual\n      \n       ## t/t3407-rebase-abort.sh ##\n     +@@\n     + \n     + test_description='git rebase --abort tests'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3407-rebase-abort.sh: testrebase() {\n       \t\tcd \"$work_dir\" &&\n       \t\t# Clean up the state from the previous one\n     @@ t/t3407-rebase-abort.sh: test_expect_success 'rebase --merge --quit' '\n       \tgit rebase --quit &&\n      \n       ## t/t3408-rebase-multi-line.sh ##\n     +@@\n     + \n     + test_description='rebasing a commit with multi-line first paragraph.'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3408-rebase-multi-line.sh: But otherwise with a sane description.\" side2 &&\n       test_expect_success rebase '\n       \n     @@ t/t3408-rebase-multi-line.sh: But otherwise with a sane description.\" side2 &&\n       \ttest_cmp expect actual\n      \n       ## t/t3409-rebase-preserve-merges.sh ##\n     +@@ t/t3409-rebase-preserve-merges.sh: test_description='git rebase -p should preserve merges\n     + \n     + Run \"git rebase -p\" and check that merges are properly carried along\n     + '\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3409-rebase-preserve-merges.sh: export GIT_AUTHOR_EMAIL\n       \n       # Clone 2 (conflicting merge):\n     @@ t/t3409-rebase-preserve-merges.sh: test_expect_success 'setup for merge-preservi\n       \tgit clone ./. clone3 &&\n      \n       ## t/t3412-rebase-root.sh ##\n     +@@ t/t3412-rebase-root.sh: test_description='git rebase --root\n     + \n     + Tests if git rebase --root --onto <newparent> can rebase the root commit.\n     + '\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3412-rebase-root.sh: test_expect_success 'prepare repository' '\n       \n       test_expect_success 'rebase --root fails with too many args' '\n     @@ t/t3412-rebase-root.sh: EOF\n       \n      \n       ## t/t3413-rebase-hook.sh ##\n     +@@\n     + \n     + test_description='git rebase with its hook(s)'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3413-rebase-hook.sh: test_expect_success setup '\n       \tgit add git &&\n       \ttest_tick &&\n     @@ t/t3413-rebase-hook.sh: test_expect_success 'rebase --no-verify overrides pre-re\n       '\n      \n       ## t/t3415-rebase-autosquash.sh ##\n     +@@\n     + \n     + test_description='auto squash'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3415-rebase-autosquash.sh: test_expect_success 'wrapped original subject' '\n       \n       test_expect_success 'abort last squash' '\n     @@ t/t3415-rebase-autosquash.sh: test_expect_success 'wrapped original subject' '\n       \tgit commit --allow-empty -m first &&\n      \n       ## t/t3416-rebase-onto-threedots.sh ##\n     -@@ t/t3416-rebase-onto-threedots.sh: test_description='git rebase --onto A...B'\n     +@@\n     + \n     + test_description='git rebase --onto A...B'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n       . ./test-lib.sh\n       . \"$TEST_DIRECTORY/lib-rebase.sh\"\n       \n     @@ t/t3416-rebase-onto-threedots.sh: test_expect_success 'rebase -i --keep-base mas\n       test_done\n      \n       ## t/t3418-rebase-continue.sh ##\n     +@@\n     + \n     + test_description='git rebase --continue tests'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3418-rebase-continue.sh: test_expect_success 'setup' '\n       \tgit checkout -b topic HEAD^ &&\n       \ttest_commit \"commit-new-file-F2-on-topic-branch\" F2 22 &&\n     @@ t/t3418-rebase-continue.sh: test_rerere_autoupdate () {\n       \t\tgit add F2 &&\n      \n       ## t/t3419-rebase-patch-id.sh ##\n     +@@\n     + \n     + test_description='git rebase - test patch id computation'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3419-rebase-patch-id.sh: test_expect_success 'setup' '\n       \n       test_expect_success 'setup: 500 lines' '\n     @@ t/t3419-rebase-patch-id.sh: test_expect_success 'setup attributes' '\n       \tgit commit -q -m squashed &&\n      \n       ## t/t3420-rebase-autostash.sh ##\n     +@@\n     + #\n     + \n     + test_description='git rebase --autostash tests'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3420-rebase-autostash.sh: test_expect_success setup '\n       \tgit add . &&\n       \ttest_tick &&\n     @@ t/t3423-rebase-reword.sh: test_expect_success 'reword after a conflict preserves\n       \tgit add file-2 &&\n      \n       ## t/t3427-rebase-subtree.sh ##\n     +@@ t/t3427-rebase-subtree.sh: test_description='git rebase tests for -Xsubtree\n     + \n     + This test runs git rebase and tests the subtree strategy.\n     + '\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3427-rebase-subtree.sh: commit_message() {\n       #\n       # topic_1 - topic_2 - topic_3\n     @@ t/t3430-rebase-merges.sh: Initial setup:\n          \\    \\       /\n           \\    F - G                (second)\n            \\\n     +       Conflicting-G\n     + '\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3430-rebase-merges.sh: test_expect_success 'setup' '\n       \tgit checkout -b first &&\n       \ttest_commit B &&\n     @@ t/t3430-rebase-merges.sh: test_expect_success 'labels that are object IDs are re\n       \tgit commit -m \"Merge commit '\\''$third'\\'' into labels\" &&\n      \n       ## t/t3431-rebase-fork-point.sh ##\n     -@@ t/t3431-rebase-fork-point.sh: test_description='git rebase --fork-point test'\n     +@@\n     + \n     + test_description='git rebase --fork-point test'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n       \n       . ./test-lib.sh\n       \n     @@ t/t3431-rebase-fork-point.sh: test_rebase 'G F C E D B A' --no-fork-point\n       \tgit tag one &&\n      \n       ## t/t3432-rebase-fast-forward.sh ##\n     +@@\n     + \n     + test_description='ensure rebase fast-forwards commits when possible'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3432-rebase-fast-forward.sh: test_rebase_same_head_ () {\n       \n       changes='no changes'\n     @@ t/t3434-rebase-i18n.sh: test_description='rebase with changing encoding\n        \\\n         3 - 4            first\n          \\\n     +     5 - 6          second\n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3434-rebase-i18n.sh: test_expect_success 'rebase --rebase-merges update encoding eucJP to UTF-8' '\n       \tgit config i18n.commitencoding eucJP &&\n       \tgit merge -F \"$TEST_DIRECTORY/t3434/eucJP.txt\" second &&\n     @@ t/t3434-rebase-i18n.sh: test_rebase_continue_update_encode () {\n       \t\tgit add two.t &&\n      \n       ## t/t3435-rebase-gpg-sign.sh ##\n     +@@\n     + \n     + test_description='test rebase --[no-]gpg-sign'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3435-rebase-gpg-sign.sh: test_expect_success 'setup: merge commit' '\n       \ttest_commit fork-point &&\n       \tgit switch -c side &&\n     @@ t/t3436-rebase-more-options.sh: test_expect_success 'setup' '\n       \trm foo &&\n       \ttest_write_lines \"line 1\" \"        line 2\" \"line 3\" >file &&\n       \tgit commit -am \"add file\" &&\n     -\n     - ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TRASH_DIRECTORY\" in\n     - esac\n     - \n     - case \"$TEST_NUMBER\" in\n     --[0-2]*|3[0-3]*)\n     -+3404)\n     -+\t# Avoid conflicts with patch series that are cooking at the same time\n     -+\t# as the patch series changing the default of `init.defaultBranch`.\n     -+\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     -+\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     -+\t;;\n     -+[0-2]*|3[0-4]*)\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n  7:  0cf754646e !  8:  db3a104750 t3[5-9]*: adjust the references to the default branch name \"main\"\n     @@ t/t3500-cherry.sh\n      +This test cherry-picks one local change of two into main branch, and\n       checks that git cherry only returns the second patch in the local branch\n       '\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n       . ./test-lib.sh\n      @@ t/t3500-cherry.sh: test_expect_success \\\n            test_tick &&\n     @@ t/t3500-cherry.sh: test_expect_success \\\n       test_expect_success 'cherry ignores whitespace' '\n      \n       ## t/t3501-revert-cherry-pick.sh ##\n     +@@ t/t3501-revert-cherry-pick.sh: test_description='test cherry-pick and revert with renames\n     + \n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3501-revert-cherry-pick.sh: test_expect_success 'cherry-pick on unborn branch' '\n       test_expect_success 'cherry-pick \"-\" to pick from previous branch' '\n       \tgit checkout unborn &&\n     @@ t/t3501-revert-cherry-pick.sh: test_expect_success 'cherry-pick \"-\" is meaningle\n       \tgit cat-file commit HEAD | grep ^Signed-off-by: >signoff &&\n      \n       ## t/t3502-cherry-pick-merge.sh ##\n     +@@ t/t3502-cherry-pick-merge.sh: test_description='cherry picking and reverting a merge\n     + \n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3502-cherry-pick-merge.sh: test_expect_success setup '\n       \techo new line >B &&\n       \tgit commit -m \"add line to B\" B &&\n     @@ t/t3502-cherry-pick-merge.sh: test_expect_success setup '\n       \n      \n       ## t/t3503-cherry-pick-root.sh ##\n     +@@\n     + \n     + test_description='test cherry-picking (and reverting) a root commit'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3503-cherry-pick-root.sh: test_expect_success setup '\n       test_expect_success 'cherry-pick a root commit' '\n       \n     @@ t/t3503-cherry-pick-root.sh: test_expect_success 'cherry-pick two root commits'\n       \ttest_cmp expect.file2 file2 &&\n      \n       ## t/t3504-cherry-pick-rerere.sh ##\n     -@@ t/t3504-cherry-pick-rerere.sh: test_description='cherry-pick should rerere for conflicts'\n     +@@\n     + \n     + test_description='cherry-pick should rerere for conflicts'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n       \n       test_expect_success setup '\n       \ttest_commit foo &&\n     @@ t/t3504-cherry-pick-rerere.sh: test_expect_success 'cherry-pick --continue rejec\n       test_done\n      \n       ## t/t3505-cherry-pick-empty.sh ##\n     +@@\n     + \n     + test_description='test cherry-picking an empty commit'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3505-cherry-pick-empty.sh: test_expect_success setup '\n       \ttest_tick &&\n       \tgit commit --allow-empty-message -m \"\" &&\n     @@ t/t3505-cherry-pick-empty.sh: test_expect_success 'cherry-pick a commit that bec\n       \n      \n       ## t/t3506-cherry-pick-ff.sh ##\n     +@@\n     + \n     + test_description='test cherry-picking with --ff option'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3506-cherry-pick-ff.sh: test_expect_success setup '\n       '\n       \n     @@ t/t3506-cherry-pick-ff.sh: test_expect_success 'merge setup' '\n       \tgit checkout -b new A\n      \n       ## t/t3507-cherry-pick-conflict.sh ##\n     +@@ t/t3507-cherry-pick-conflict.sh: test_description='test cherry-pick and revert with conflicts\n     + \n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3507-cherry-pick-conflict.sh: test_expect_success setup '\n       \ttest_commit redundant-pick foo c redundant &&\n       \tgit commit --allow-empty --allow-empty-message &&\n     @@ t/t3507-cherry-pick-conflict.sh: test_expect_success setup '\n       '\n      \n       ## t/t3508-cherry-pick-many-commits.sh ##\n     +@@\n     + \n     + test_description='test cherry-picking many commits'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3508-cherry-pick-many-commits.sh: test_expect_success setup '\n       '\n       \n     @@ t/t3508-cherry-pick-many-commits.sh: test_expect_success 'cherry-pick -3 fourth\n       \tgit rev-list --reverse first..fourth | git cherry-pick --stdin &&\n      \n       ## t/t3509-cherry-pick-merge-df.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='Test cherry-pick with directory/file conflicts'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3509-cherry-pick-merge-df.sh: test_expect_success 'Setup rename across paths each below D/F conflicts' '\n       \n       test_expect_success 'Cherry-pick succeeds with rename across D/F conflicts' '\n     @@ t/t3509-cherry-pick-merge-df.sh: test_expect_success 'Setup rename across paths\n       \n      \n       ## t/t3512-cherry-pick-submodule.sh ##\n     +@@\n     + \n     + test_description='cherry-pick can handle submodules'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3512-cherry-pick-submodule.sh: test_expect_success 'unrelated submodule/file conflict is ignored' '\n       \t\tgit add a_file &&\n       \t\tgit commit -m \"modify a file\" &&\n     @@ t/t3512-cherry-pick-submodule.sh: test_expect_success 'unrelated submodule/file\n       \t\tgit submodule update sub &&\n      \n       ## t/t3600-rm.sh ##\n     +@@\n     + \n     + test_description='Test of the various options to git rm.'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3600-rm.sh: test_expect_success 'setup submodule conflict' '\n       \techo 1 >nitfol &&\n       \tgit add nitfol &&\n     @@ t/t3600-rm.sh: test_expect_success 'checking out a commit after submodule remova\n       \techo \"?? submod/\" >expected &&\n      \n       ## t/t3701-add-interactive.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='add -i basic tests'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3701-add-interactive.sh: test_expect_success 'patch mode ignores unmerged entries' '\n       \ttest_commit non-conflict &&\n       \tgit checkout -b side &&\n     @@ t/t3701-add-interactive.sh: test_expect_success 'patch mode ignores unmerged ent\n       \techo y | git add -p >output &&\n      \n       ## t/t3901-i18n-patch.sh ##\n     +@@\n     + \n     + test_description='i18n settings and format-patch | am pipe'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3901-i18n-patch.sh: test_expect_success setup '\n       \n       \t# the first commit on the side branch is UTF-8\n     @@ t/t3901-i18n-patch.sh: test_expect_success !MINGW 'am (L/U)' '\n       \tgit am out-u1 out-u2 &&\n      \n       ## t/t3903-stash.sh ##\n     +@@\n     + \n     + test_description='Test git stash'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3903-stash.sh: test_expect_success 'stash branch' '\n       \tgit commit file -m second &&\n       \tgit stash branch stashbranch &&\n     @@ t/t3903-stash.sh: test_expect_success 'create with multiple arguments for the me\n       \tgit add foo &&\n      \n       ## t/t3910-mac-os-precompose.sh ##\n     +@@\n     + \n     + test_description='utf-8 decomposed (nfd) converted to precomposed (nfc)'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t3910-mac-os-precompose.sh: test_expect_success \"git checkout link nfd\" '\n       \tgit checkout l.$Odiarnfd\n       '\n     @@ t/t3910-mac-os-precompose.sh: test_expect_success \"Add long decomposed filename\"\n       \tgit reset --hard &&\n       \tgit checkout -b mac_os_long_nfc_fn\n       '\n     -\n     - ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TEST_NUMBER\" in\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n     --[0-2]*|3[0-4]*)\n     -+[0-3]*)\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n  8:  cf6c1d1d83 !  9:  0164eb9745 t4*: adjust the references to the default branch name \"main\"\n     @@ Metadata\n       ## Commit message ##\n          t4*: adjust the references to the default branch name \"main\"\n      \n     -    Carefully excluding t4013, which sees independent development elsewhere\n     -    at the time of writing, we use `main` as the default branch name in t4*.\n     -    This trick was performed via\n     +    Carefully excluding t4013 and t4015, which see independent development\n     +    elsewhere at the time of writing, we use `main` as the default branch\n     +    name in t4*. This trick was performed via\n      \n                  $ (cd t &&\n                     sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t4014-format-patch.sh ##\n     +@@\n     + \n     + test_description='various format-patch tests'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4014-format-patch.sh: test_expect_success setup '\n       \ttest_tick &&\n       \tgit commit -m \"Side changes #3 with \\\\n backslash-n in it.\" &&\n     @@ t/t4014-format-patch.sh: test_expect_success 'format-patch --pretty=mboxrd' '\n       \ttest_commit fleep blorp\n       '\n      \n     - ## t/t4015-diff-whitespace.sh ##\n     -@@ t/t4015-diff-whitespace.sh: test_expect_success 'combined diff with autocrlf conversion' '\n     - \techo >x goodbye &&\n     - \tgit commit -m \"the other side\" x &&\n     - \tgit config core.autocrlf true &&\n     --\ttest_must_fail git merge master &&\n     -+\ttest_must_fail git merge main &&\n     - \n     - \tgit diff >actual.raw &&\n     - \tsed -e \"1,/^@@@/d\" actual.raw >actual &&\n     -\n       ## t/t4017-diff-retval.sh ##\n     +@@\n     + \n     + test_description='Return value of diffs'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4017-diff-retval.sh: test_expect_success 'check detects leftover conflict markers' '\n       \tgit checkout HEAD^ &&\n       \techo binary >>b &&\n     @@ t/t4017-diff-retval.sh: test_expect_success 'check detects leftover conflict mar\n       \ttest 3 = $(grep \"conflict marker\" test.out | wc -l) &&\n      \n       ## t/t4038-diff-combined.sh ##\n     +@@\n     + \n     + test_description='combined diff'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4038-diff-combined.sh: test_expect_success 'check --cc --raw with forty trees' '\n       '\n       \n     @@ t/t4038-diff-combined.sh: test_expect_success 'combine diff gets tree sorting ri\n       \tprintf \"MM\\tfoo\\n\" >expect &&\n      \n       ## t/t4041-diff-submodule-option.sh ##\n     +@@ t/t4041-diff-submodule-option.sh: test_description='Support for verbose submodule differences in git diff\n     + This test tries to verify the sanity of the --submodule option of git diff.\n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4041-diff-submodule-option.sh: test_expect_success 'diff --submodule with objects referenced by alternates' '\n       \t(cd super &&\n       \t\t(cd sub &&\n     @@ t/t4041-diff-submodule-option.sh: test_expect_success 'diff --submodule with obj\n       \t) &&\n      \n       ## t/t4048-diff-combined-binary.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='combined and merge diff handle binary files and textconv'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4048-diff-combined-binary.sh: test_expect_success 'setup binary merge conflict' '\n       \techo threeQ3 | q_to_nul >binary &&\n       \tgit commit -a -m three &&\n     @@ t/t4048-diff-combined-binary.sh: index $three,$two..0000000\n       '\n      \n       ## t/t4052-stat-output.sh ##\n     +@@\n     + \n     + test_description='test --stat output of various commands'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4052-stat-output.sh: cat >expect <<'EOF'\n       EOF\n       test_expect_success 'merge --stat respects COLUMNS (big change)' '\n     @@ t/t4052-stat-output.sh: cat >expect <<'EOF'\n       '\n      \n       ## t/t4056-diff-order.sh ##\n     +@@\n     + \n     + test_description='diff order'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4056-diff-order.sh: done\n       test_expect_success 'setup for testing combine-diff order' '\n       \tgit checkout -b tmp HEAD~ &&\n     @@ t/t4056-diff-order.sh: done\n       '\n      \n       ## t/t4057-diff-combined-paths.sh ##\n     +@@\n     + \n     + test_description='combined diff show only paths that are different to all parents'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4057-diff-combined-paths.sh: test_expect_success 'trivial merge - combine-diff empty' '\n       \t\techo $i/2 >>$i.txt\n       \tdone &&\n     @@ t/t4057-diff-combined-paths.sh: test_expect_success 'merge removed a file' '\n       \tgit commit --amend &&\n      \n       ## t/t4061-diff-indent.sh ##\n     +@@\n     + test_description='Test diff indent heuristic.\n     + \n     + '\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4061-diff-indent.sh: test_expect_success 'diff-index: nice spaces with --indent-heuristic' '\n       \tgit reset --soft HEAD~ &&\n       \tgit diff-index --indent-heuristic -p old -- spaces.txt >out-diff-index-compacted &&\n     @@ t/t4061-diff-indent.sh: test_expect_success 'diff-files: --no-indent-heuristic o\n       test_done\n      \n       ## t/t4066-diff-emit-delay.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='test combined/stat/moved interaction'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4066-diff-emit-delay.sh: test_expect_success 'set up history with a merge' '\n       \ttest_commit B &&\n       \tgit checkout -b side HEAD^ &&\n     @@ t/t4066-diff-emit-delay.sh: test_expect_success 'set up history with a merge' '\n       \n      \n       ## t/t4068-diff-symmetric-merge-base.sh ##\n     -@@ t/t4068-diff-symmetric-merge-base.sh: test_description='behavior of diff with symmetric-diff setups and --merge-base'\n     +@@\n     + \n     + test_description='behavior of diff with symmetric-diff setups and --merge-base'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n       \n       # build these situations:\n       #  - normal merge with one merge base (br1...b2r);\n     @@ t/t4068-diff-symmetric-merge-base.sh: do\n       \n      \n       ## t/t4103-apply-binary.sh ##\n     +@@\n     + test_description='git apply handling binary patches\n     + \n     + '\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4103-apply-binary.sh: test_expect_success 'setup' '\n       \tgit update-index --add --remove file1 file2 file3 file4 &&\n       \tgit commit -m \"Second Version\" &&\n     @@ t/t4103-apply-binary.sh: test_expect_success 'check binary diff with replacement\n       test_expect_success 'apply binary diff -- should fail.' \\\n      \n       ## t/t4108-apply-threeway.sh ##\n     +@@\n     + \n     + test_description='git apply --3way'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4108-apply-threeway.sh: test_expect_success setup '\n       \ttest_tick &&\n       \ttest_write_lines 1 two 3 4 5 six 7 >one &&\n     @@ t/t4108-apply-threeway.sh: test_expect_success 'apply with --3way with rerere en\n       \t# but rerere should have replayed the recorded resolution\n      \n       ## t/t4121-apply-diffs.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='git apply for contextually independent diffs'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4121-apply-diffs.sh: test_expect_success 'setup' \\\n       \tgit commit -a -q -m 2 &&\n       \techo 9 >>file &&\n     @@ t/t4121-apply-diffs.sh: test_expect_success 'setup' \\\n       \t'check if contextually independent diffs for the same file apply' \\\n      \n       ## t/t4122-apply-symlink-inside.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='apply to deeper directory without getting fooled with symlink'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4122-apply-symlink-inside.sh: test_expect_success apply '\n       \n       test_expect_success 'check result' '\n     @@ t/t4122-apply-symlink-inside.sh: test_expect_success apply '\n       \n      \n       ## t/t4150-am.sh ##\n     +@@\n     + \n     + test_description='git am running'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4150-am.sh: test_expect_success setup '\n       \ttest_tick &&\n       \tgit commit -m \"added another file\" &&\n     @@ t/t4200-rerere.sh: test_description='git rerere\n      +++++++ [main] initial\n       '\n       \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n       . ./test-lib.sh\n      @@ t/t4200-rerere.sh: test_expect_success 'setup' '\n       \ttest_tick &&\n     @@ t/t4200-rerere.sh: test_expect_success 'setup simple stage 1 handling' '\n       \t)\n      \n       ## t/t4201-shortlog.sh ##\n     +@@\n     + test_description='git shortlog\n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4201-shortlog.sh: test_expect_success 'shortlog with revision pseudo options' '\n       '\n       \n     @@ t/t4201-shortlog.sh: test_expect_success 'shortlog with revision pseudo options'\n       '\n      \n       ## t/t4202-log.sh ##\n     +@@\n     + \n     + test_description='git log'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4202-log.sh: test_expect_success 'set up merge history' '\n       \tgit checkout -b side HEAD~4 &&\n       \ttest_commit side-1 1 1 &&\n     @@ t/t4202-log.sh: test_expect_success 'log diagnoses bogus HEAD' '\n       \techo \"ref: refs/heads/invalid.lock\" >empty/.git/HEAD &&\n      \n       ## t/t4203-mailmap.sh ##\n     +@@\n     + \n     + test_description='.mailmap configurations'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4203-mailmap.sh: test_expect_success 'No mailmap files, but configured' '\n       \n       test_expect_success 'setup mailmap blob tests' '\n     @@ t/t4203-mailmap.sh: test_expect_success 'No mailmap files, but configured' '\n       \tEOF\n      \n       ## t/t4204-patch-id.sh ##\n     +@@\n     + \n     + test_description='git patch-id'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4204-patch-id.sh: test_expect_success 'setup' '\n       \ttest_write_lines $as b >foo &&\n       \ttest_write_lines $as b >bar &&\n     @@ t/t4204-patch-id.sh: test_expect_success '--stable overrides patchid.stable = fa\n       test_expect_success 'patch-id respects config from subdir' '\n      \n       ## t/t4207-log-decoration-colors.sh ##\n     +@@\n     + \n     + test_description='Test for \"git log --decorate\" colors'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4207-log-decoration-colors.sh: test_expect_success setup '\n       \n       cat >expected <<EOF\n     @@ t/t4207-log-decoration-colors.sh: test_expect_success setup '\n       \n      \n       ## t/t4208-log-magic-pathspec.sh ##\n     +@@\n     + \n     + test_description='magic pathspec tests using git-log'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4208-log-magic-pathspec.sh: test_expect_success '\"git log :/a -- \" should not be ambiguous' '\n       '\n       \n     @@ t/t4208-log-magic-pathspec.sh: test_expect_success 'command line pathspec parsin\n       \tgit log --merge -- a\n       '\n      \n     + ## t/t4211-line-log.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='test log -L'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n     +\n       ## t/t4211/history.export ##\n      @@ t/t4211/history.export: long f(long x)\n       \treturn s;\n     @@ t/t4211/history.export: long f(long x)\n       committer Thomas Rast <trast@student.ethz.ch> 1362045024 +0100\n      \n       ## t/t4214-log-graph-octopus.sh ##\n     +@@\n     + \n     + test_description='git log --graph of skewed left octopus merge.'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4214-log-graph-octopus.sh: test_cmp_colored_graph () {\n       test_expect_success 'set up merge history' '\n       \ttest_commit initial &&\n     @@ t/t4214-log-graph-octopus.sh: test_cmp_colored_graph () {\n       \t\ttest_commit $i $i $i tag$i || return $?\n      \n       ## t/t4216-log-bloom.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='git log for a path with Bloom filters'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4216-log-bloom.sh: test_expect_success 'setup test - repo, commits, commit graph, log outputs' '\n       \ttest_commit c10 file_to_be_deleted &&\n       \tgit checkout -b side HEAD~4 &&\n     @@ t/t4216-log-bloom.sh: do\n       \t\t\ttest_bloom_filters_used \"$option -- $path\" &&\n      \n       ## t/t4253-am-keep-cr-dos.sh ##\n     +@@\n     + test_description='git-am mbox with dos line ending.\n     + \n     + '\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t4253-am-keep-cr-dos.sh: test_expect_success 'setup repository with dos files' '\n       \n       test_expect_success 'am with dos files without --keep-cr' '\n     @@ t/t4257-am-interactive.sh: test_expect_success 'set up patches to apply' '\n       '\n       \n       # Sanity check our setup.\n     -\n     - ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TRASH_DIRECTORY\" in\n     - esac\n     - \n     - case \"$TEST_NUMBER\" in\n     --3404)\n     -+3404|4013)\n     - \t# Avoid conflicts with patch series that are cooking at the same time\n     - \t# as the patch series changing the default of `init.defaultBranch`.\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n     --[0-3]*)\n     -+[0-4]*)\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n  9:  6ff4594a28 = 10:  36d633a5ec t5323: prepare centered comment for `master` -> `main`\n 10:  be29e07892 ! 11:  d9d1d14681 t5[0-4]*: adjust the references to the default branch name \"main\"\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t5150-request-pull.sh ##\n     +@@\n     + \n     + test_description='Test workflows involving pull request.'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5150-request-pull.sh: test_expect_success 'setup' '\n       \t\ttest_tick &&\n       \t\tgit commit -m \"\\\"Thirty days\\\", a reminder of month lengths\" &&\n     @@ t/t5150-request-pull.sh: test_expect_success 'pull request with stale object' '\n       \t\ttest_must_fail git request-pull initial \"$downstream_url\" tags/full \\\n      \n       ## t/t5304-prune.sh ##\n     +@@\n     + #\n     + \n     + test_description='prune'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5304-prune.sh: test_expect_success 'prune: do not prune detached HEAD with no reflog' '\n       test_expect_success 'prune: prune former HEAD after checking out branch' '\n       \n     @@ t/t5304-prune.sh: test_expect_success 'prune: do not prune detached HEAD with no\n       \n      \n       ## t/t5305-include-tag.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='git pack-object --include-tag'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5305-include-tag.sh: test_expect_success 'check unpacked result (have all objects)' '\n       \n       test_expect_success 'single-branch clone can transfer tag' '\n     @@ t/t5305-include-tag.sh: test_expect_success 'check unpacked result (have all obj\n       \n      \n       ## t/t5312-prune-corruption.sh ##\n     +@@ t/t5312-prune-corruption.sh: bail out or to proceed using it as a reachable tip, but it is _not_\n     + OK to proceed as if it did not exist. Otherwise we might silently\n     + delete objects that cannot be recovered.\n     + '\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5312-prune-corruption.sh: test_expect_success 'disable reflogs' '\n       '\n       \n     @@ t/t5312-prune-corruption.sh: test_expect_success 'pack-refs does not silently de\n       \n      \n       ## t/t5317-pack-objects-filter-objects.sh ##\n     +@@\n     + \n     + test_description='git pack-objects using object filtering'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5317-pack-objects-filter-objects.sh: test_expect_success 'verify sparse:oid=oid-ish' '\n       \tawk -f print_2.awk ls_files_result |\n       \tsort >expected &&\n     @@ t/t5317-pack-objects-filter-objects.sh: test_expect_success 'verify sparse:oid=o\n       \tgit -C r4 index-pack ../filter.pack &&\n      \n       ## t/t5322-pack-objects-sparse.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='pack-objects object selection using sparse algorithm'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5322-pack-objects-sparse.sh: test_expect_success 'setup repo' '\n       \tgit commit -m \"Initialized trees\" &&\n       \tfor i in $(test_seq 1 3)\n     @@ t/t5323-pack-redundant.sh: test_expect_success 'shared: one pack is redundant wi\n       #     P1  | x x x x x x x                       x                   |\n      \n       ## t/t5400-send-pack.sh ##\n     +@@\n     + test_description='See why rewinding head breaks send-pack\n     + \n     + '\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5400-send-pack.sh: test_expect_success 'pack the destination repository' '\n       '\n       \n     @@ t/t5401-update-hooks.sh: test_expect_success 'pre-receive hook that forgets to r\n       '\n      \n       ## t/t5402-post-merge-hook.sh ##\n     +@@\n     + #\n     + \n     + test_description='Test the post-merge hook.'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5402-post-merge-hook.sh: test_expect_success setup '\n       \tgit update-index a &&\n       \ttree1=$(git write-tree) &&\n     @@ t/t5402-post-merge-hook.sh: test_expect_success setup '\n       \tgit clone ./. clone2 &&\n      \n       ## t/t5403-post-checkout-hook.sh ##\n     +@@\n     + #\n     + \n     + test_description='Test the post-checkout hook.'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5403-post-checkout-hook.sh: test_expect_success setup '\n       \n       test_expect_success 'post-checkout receives the right arguments with HEAD unchanged ' '\n     @@ t/t5403-post-checkout-hook.sh: test_expect_success 'post-checkout receives the r\n       \tread old new flag <.git/post-checkout.args &&\n      \n       ## t/t5404-tracking-branches.sh ##\n     +@@\n     + \n     + test_description='tracking branch update checks for git push'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5404-tracking-branches.sh: test_expect_success 'prepare pushable branches' '\n       \tgit checkout -b b2 origin/b2 &&\n       \techo aa-b2 >>file &&\n     @@ t/t5404-tracking-branches.sh: test_expect_success 'mixed-success push returns er\n       test_expect_success 'check tracking branches not updated for failed refs' '\n      \n       ## t/t5405-send-pack-rewind.sh ##\n     +@@\n     + \n     + test_description='forced push to replace commit we do not have'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5405-send-pack-rewind.sh: test_expect_success setup '\n       \tmkdir another && (\n       \t\tcd another &&\n     @@ t/t5405-send-pack-rewind.sh: test_expect_success 'forced push should succeed' '\n       '\n      \n       ## t/t5407-post-rewrite-hook.sh ##\n     +@@\n     + #\n     + \n     + test_description='Test the post-rewrite hook.'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5407-post-rewrite-hook.sh: test_expect_success 'setup' '\n       \tgit checkout A^0 &&\n       \ttest_commit E bar E &&\n     @@ t/t5407-post-rewrite-hook.sh: test_expect_success 'setup' '\n       mkdir .git/hooks\n      \n       ## t/t5410-receive-pack-alternates.sh ##\n     -@@ t/t5410-receive-pack-alternates.sh: test_description='git receive-pack with alternate ref filtering'\n     +@@\n     + \n     + test_description='git receive-pack with alternate ref filtering'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n     +@@ t/t5410-receive-pack-alternates.sh: export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n       test_expect_success 'setup' '\n       \ttest_commit base &&\n       \tgit clone -s --bare . fork &&\n     @@ t/t5410-receive-pack-alternates.sh: test_description='git receive-pack with alte\n       \ttest_commit private\n       '\n       \n     -\n     - ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TRASH_DIRECTORY\" in\n     - esac\n     - \n     - case \"$TEST_NUMBER\" in\n     --3404|4013)\n     -+3404|4013|5310)\n     - \t# Avoid conflicts with patch series that are cooking at the same time\n     - \t# as the patch series changing the default of `init.defaultBranch`.\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n     --[0-4]*)\n     -+[0-4]*|5[0-4]*)\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n 11:  5126d90a32 ! 12:  f7a9bc07c7 t5503: prepare aligned comment for replacing `master` with `main`\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t5503-tagfollow.sh ##\n     -@@ t/t5503-tagfollow.sh: test_description='test automatic tag following'\n     +@@ t/t5503-tagfollow.sh: export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n       #   L - A ------ O ------ B\n       #    \\   \\                 \\\n       #     \\   C - origin/cat    \\\n 12:  332677cbf9 ! 13:  4d7eb7dc28 t550*: adjust the references to the default branch name \"main\"\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t5500-fetch-pack.sh ##\n     +@@\n     + \n     + test_description='Testing multi_ack pack fetching'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5500-fetch-pack.sh: test_expect_success 'in_vain resetted upon ACK' '\n       \trm -rf myserver myclient &&\n       \tgit init myserver &&\n     @@ t/t5500-fetch-pack.sh: test_expect_success 'fetching deepen' '\n       \tthree\n      \n       ## t/t5501-fetch-push-alternates.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='fetch/push involving alternates'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5501-fetch-push-alternates.sh: test_expect_success setup '\n       test_expect_success 'pushing into a repository with the same alternate' '\n       \t(\n     @@ t/t5501-fetch-push-alternates.sh: test_expect_success 'pushing into a repository\n       \ttest_cmp one.count fetcher.count\n      \n       ## t/t5502-quickfetch.sh ##\n     +@@\n     + \n     + test_description='test quickfetch from local'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5502-quickfetch.sh: test_expect_success 'quickfetch should not copy from alternate' '\n       \t\t\t\tq\n       \t\t\t}\"\n     @@ t/t5502-quickfetch.sh: test_expect_success 'quickfetch should not copy from alte\n       \n      \n       ## t/t5503-tagfollow.sh ##\n     -@@ t/t5503-tagfollow.sh: test_description='test automatic tag following'\n     +@@\n     + \n     + test_description='test automatic tag following'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n     +@@ t/t5503-tagfollow.sh: export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n       #   L - A ------ O ------ B\n       #    \\   \\                 \\\n       #     \\   C - origin/cat    \\\n     @@ t/t5503-tagfollow.sh: test_expect_success 'new clone fetch master and tags' '\n       \t\ttest $T = $(git rev-parse --verify tag1) &&\n      \n       ## t/t5504-fetch-receive-strict.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='fetch/receive strict mode'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5504-fetch-receive-strict.sh: test_expect_success 'fetch without strict' '\n       \t\tcd dst &&\n       \t\tgit config fetch.fsckobjects false &&\n     @@ t/t5504-fetch-receive-strict.sh: test_expect_success 'push with transfer.fsckobj\n       \n      \n       ## t/t5505-remote.sh ##\n     +@@\n     + \n     + test_description='git remote porcelain-ish'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5505-remote.sh: setup_repository () {\n       \tgit add elif &&\n       \ttest_tick &&\n     @@ t/t5505-remote.sh: test_expect_success 'unqualified <dst> refspec DWIM and advic\n       \t) &&\n      \n       ## t/t5506-remote-groups.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='git remote group handling'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5506-remote-groups.sh: repo_fetched() {\n       test_expect_success 'setup' '\n       \tmkdir one && (cd one && git init) &&\n     @@ t/t5506-remote-groups.sh: repo_fetched() {\n       test_expect_success 'no group updates all' '\n      \n       ## t/t5509-fetch-push-namespaces.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='fetch/push involving ref namespaces'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5509-fetch-push-namespaces.sh: test_expect_success setup '\n       test_expect_success 'pushing into a repository using a ref namespace' '\n       \t(\n     @@ t/t5509-fetch-push-namespaces.sh: test_expect_success 'denyCurrentBranch and unb\n       \t)\n       '\n       \n     -\n     - ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TEST_NUMBER\" in\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n     --[0-4]*|5[0-4]*)\n     -+[0-4]*|5[0-4]*|550*)\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n 13:  b7333ef201 ! 14:  88b2c30cc8 t551*: adjust the references to the default branch name \"main\"\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t5510-fetch.sh ##\n     +@@ t/t5510-fetch.sh: test_description='Per branch config variables affects \"git fetch\".\n     + \n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5510-fetch.sh: test_expect_success \"clone and setup child repos\" '\n       \tgit clone . two &&\n       \t(\n     @@ t/t5511-refspec.sh: test_refspec push 'refs/heads/master:refs/remotes/frotz/xyzz\n       \n      \n       ## t/t5512-ls-remote.sh ##\n     +@@\n     + \n     + test_description='git ls-remote'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5512-ls-remote.sh: test_expect_success 'use branch.<name>.remote if possible' '\n       \techo \"From $URL\" >exp_err &&\n       \n     @@ t/t5512-ls-remote.sh: test_expect_success 'ls-remote --sort fails gracefully out\n       \n      \n       ## t/t5514-fetch-multiple.sh ##\n     +@@\n     + \n     + test_description='fetch --all works correctly'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5514-fetch-multiple.sh: setup_repository () {\n       \tgit add elif &&\n       \ttest_tick &&\n     @@ t/t5514-fetch-multiple.sh: test_expect_success 'git fetch --all (skipFetchAll)'\n       \n      \n       ## t/t5516-fetch-push.sh ##\n     +@@ t/t5516-fetch-push.sh: This test checks the following functionality:\n     + * reflogs\n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5516-fetch-push.sh: test_expect_success setup '\n       \tgit add path1 &&\n       \ttest_tick &&\n     @@ t/t5516-fetch-push.sh: test_expect_success 'updateInstead with push-to-checkout\n       \t\tgit diff --quiet &&\n      \n       ## t/t5517-push-mirror.sh ##\n     +@@\n     + \n     + test_description='pushing to a mirror repository'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5517-push-mirror.sh: invert () {\n       }\n       \n     @@ t/t5517-push-mirror.sh: test_expect_success 'remote.foo.mirror=no has no effect'\n       \n      \n       ## t/t5518-fetch-exit-status.sh ##\n     +@@\n     + \n     + test_description='fetch exit status test'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5518-fetch-exit-status.sh: test_expect_success setup '\n       \techo side >file &&\n       \tgit commit -a -m side &&\n     @@ t/t5518-fetch-exit-status.sh: test_expect_success setup '\n       \n      \n       ## t/t5519-push-alternates.sh ##\n     +@@\n     + \n     + test_description='push to a repository that borrows from elsewhere'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5519-push-alternates.sh: test_expect_success setup '\n       \t\t>file &&\n       \t\tgit add . &&\n     @@ t/t5519-push-alternates.sh: test_expect_success 'alice works and pushes yet agai\n       \t\t# at a commit Bob does not fully know about, but\n       \t\t# he happens to have the commit object (but not the\n       \t\t# necessary tree) in his repository from Alice.\n     -\n     - ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TEST_NUMBER\" in\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n     --[0-4]*|5[0-4]*|550*)\n     -+[0-4]*|5[0-4]*|55[01]*)\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n 14:  4b1b1ee51f ! 15:  3b73811af4 t55[23]*: adjust the references to the default branch name \"main\"\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t5520-pull.sh ##\n     +@@\n     + \n     + test_description='pulling into void'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5520-pull.sh: test_expect_success 'pulling into void' '\n       \ttest_cmp file cloned/file\n       '\n     @@ t/t5520-pull.sh: test_expect_success 'setup for avoiding reapplying old patches'\n       \trm -rf src &&\n      \n       ## t/t5521-pull-options.sh ##\n     +@@\n     + \n     + test_description='pull options'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5521-pull-options.sh: test_expect_success 'git pull --force' '\n       \tcat >>.git/config <<-\\EOF &&\n       \t[remote \"one\"]\n     @@ t/t5521-pull-options.sh: test_expect_success 'git pull --all --dry-run' '\n       \t)\n      \n       ## t/t5523-push-upstream.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='push with --set-upstream'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5523-push-upstream.sh: check_config() {\n       \ttest_cmp expect.$1 actual.$1\n       }\n     @@ t/t5523-push-upstream.sh: test_expect_success TTY 'push --no-progress suppresses\n       \n      \n       ## t/t5527-fetch-odd-refs.sh ##\n     -@@ t/t5527-fetch-odd-refs.sh: test_description='test fetching of oddly-named refs'\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='test fetching of oddly-named refs'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n       \n       # afterwards we will have:\n       #  HEAD - two\n     @@ t/t5527-fetch-odd-refs.sh: test_expect_success LONG_REF 'fetch handles extremely\n       \n      \n       ## t/t5528-push-default.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='check various push.default settings'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5528-push-default.sh: test_push_failure () {\n       \n       # $1 = success or failure\n     @@ t/t5530-upload-pack-error.sh: test_expect_success 'create empty repository' '\n       \n      \n       ## t/t5531-deep-submodule-push.sh ##\n     +@@\n     + \n     + test_description='test push with submodules'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5531-deep-submodule-push.sh: test_expect_success setup '\n       test_expect_success 'push works with recorded gitlink' '\n       \t(\n     @@ t/t5531-deep-submodule-push.sh: test_expect_success 'push propagating refspec to\n       \tgit -C submodule.git rev-parse branch2 >actual_submodule &&\n      \n       ## t/t5533-push-cas.sh ##\n     +@@\n     + \n     + test_description='compare & swap push force/delete safety'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5533-push-cas.sh: setup_src_dup_dst () {\n       \t(\n       \t\tcd dup &&\n     @@ t/t5533-push-cas.sh: test_expect_success '\"--force-if-includes\" should allow for\n       \n      \n       ## t/t5534-push-signed.sh ##\n     +@@\n     + \n     + test_description='signed push'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5534-push-signed.sh: prepare_dst () {\n       \trm -fr dst &&\n       \ttest_create_repo dst &&\n     @@ t/t5534-push-signed.sh: prepare_dst () {\n       \n      \n       ## t/t5537-fetch-shallow.sh ##\n     +@@\n     + \n     + test_description='fetch/clone from a shallow clone'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5537-fetch-shallow.sh: test_expect_success 'fetch from shallow clone' '\n       \tcd shallow2 &&\n       \tgit fetch &&\n     @@ t/t5537-fetch-shallow.sh: test_expect_success 'shallow fetches check connectivit\n       \t! test -e \"$HTTPD_ROOT_PATH/one-time-perl\" &&\n      \n       ## t/t5538-push-shallow.sh ##\n     +@@\n     + \n     + test_description='push from/to a shallow clone'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5538-push-shallow.sh: test_expect_success 'push from shallow clone' '\n       \t(\n       \tcd shallow &&\n     @@ t/t5538-push-shallow.sh: EOF\n       1\n      \n       ## t/t5539-fetch-http-shallow.sh ##\n     +@@\n     + \n     + test_description='fetch/clone from a shallow clone over http'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5539-fetch-http-shallow.sh: test_expect_success 'clone http repository' '\n       \t(\n       \tcd clone &&\n     @@ t/t5539-fetch-http-shallow.sh: test_expect_success 'fetching deepen' '\n       \tcat >expected <<-\\EOF &&\n       \tfour\n       \tthree\n     -\n     - ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TRASH_DIRECTORY\" in\n     - esac\n     - \n     - case \"$TEST_NUMBER\" in\n     --3404|4013|5310)\n     -+3404|4013|5310|5526)\n     - \t# Avoid conflicts with patch series that are cooking at the same time\n     - \t# as the patch series changing the default of `init.defaultBranch`.\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n     --[0-4]*|5[0-4]*|55[01]*)\n     -+[0-4]*|5[0-4]*|55[0-3]*)\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n 15:  c37d97c2d8 ! 16:  5c57fbe695 t55[4-9]*: adjust the references to the default branch name \"main\"\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t5540-http-push-webdav.sh ##\n     +@@ t/t5540-http-push-webdav.sh: test_description='test WebDAV http-push\n     + \n     + This test runs various sanity checks on http-push.'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5540-http-push-webdav.sh: test_expect_success 'push already up-to-date' '\n       test_expect_success 'push to remote repository with unpacked refs' '\n       \t(cd \"$HTTPD_DOCUMENT_ROOT_PATH\"/test_repo.git &&\n     @@ t/t5540-http-push-webdav.sh: test_expect_success 'PUT and MOVE sends object to U\n       \ttest_commit pw-user &&\n      \n       ## t/t5541-http-push-smart.sh ##\n     +@@\n     + #\n     + \n     + test_description='test smart pushing over http via http-backend'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5541-http-push-smart.sh: test_expect_success 'used receive-pack service' '\n       '\n       \n     @@ t/t5541-http-push-smart.sh: test_expect_success 'colorize errors/hints' '\n       \ttest_i18ngrep \"<RED>error: failed to push some refs\" decoded &&\n      \n       ## t/t5542-push-http-shallow.sh ##\n     +@@\n     + \n     + test_description='push from/to a shallow clone over http'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5542-push-http-shallow.sh: test_expect_success 'push to shallow repo via http' '\n       \t(\n       \tcd full &&\n     @@ t/t5542-push-http-shallow.sh: test_expect_success 'push from shallow repo via ht\n       4\n      \n       ## t/t5543-atomic-push.sh ##\n     +@@\n     + \n     + test_description='pushing to a repository using the atomic push option'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5543-atomic-push.sh: test_expect_success 'atomic push works for a single branch' '\n       \t\ttest_commit one &&\n       \t\tgit push --mirror up &&\n     @@ t/t5543-atomic-push.sh: test_expect_success 'atomic push reports (mirror, but re\n       \ttest_cmp expect actual\n      \n       ## t/t5545-push-options.sh ##\n     +@@\n     + \n     + test_description='pushing to a repository using push options'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5545-push-options.sh: test_expect_success 'one push option works for a single branch' '\n       \t\ttest_commit one &&\n       \t\tgit push --mirror up &&\n     @@ t/t5548-push-porcelain.sh: run_git_push_porcelain_output_test() {\n       \t\ttest_cmp expect actual\n      \n       ## t/t5550-http-fetch-dumb.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='test dumb fetching over http via static file'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5550-http-fetch-dumb.sh: test_expect_success 'create http-accessible bare repository with loose objects'\n       \t hooks/post-update\n       \t) &&\n     @@ t/t5550-http-fetch-dumb.sh: test_expect_success 'set up evil alternates scheme'\n       # Here we'll just redirect via HTTP. In a real-world attack these would be on\n      \n       ## t/t5551-http-fetch-smart.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='test smart fetching over http via http-backend'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5551-http-fetch-smart.sh: test_expect_success 'create http-accessible bare repository' '\n       \t git --bare init\n       \t) &&\n     @@ t/t5552-skipping-fetch-negotiator.sh: test_expect_success 'use ref advertisement\n       \ttest_config -C client fetch.negotiationalgorithm skipping &&\n      \n       ## t/t5553-set-upstream.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='\"git fetch/pull --set-upstream\" basic tests.'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5553-set-upstream.sh: test_expect_success 'setup bare parent fetch' '\n       \tgit remote add upstream parent\n       '\n     @@ t/t5553-set-upstream.sh: test_expect_success 'pull --set-upstream upstream tag d\n       \tcheck_config_missing other2\n       '\n      \n     + ## t/t5560-http-backend-noserver.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='test git-http-backend-noserver'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n     +\n       ## t/t5561-http-backend.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='test git-http-backend'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5561-http-backend.sh: POST() {\n       \n       grep '^[^#]' >exp <<EOF\n     @@ t/t556x_common: get_static_files() {\n       \tget_static_files \"200 OK\"\n      \n       ## t/t5570-git-daemon.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='test fetching over git protocol'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5570-git-daemon.sh: test_expect_success 'create git-accessible bare repository' '\n       \t : >git-daemon-export-ok\n       \t) &&\n     @@ t/t5570-git-daemon.sh: test_expect_success FAKENC 'hostname interpolation works\n       \n      \n       ## t/t5571-pre-push-hook.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='check pre-push hooks'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5571-pre-push-hook.sh: EOF\n       cat >expected <<EOF\n       parent1\n     @@ t/t5572-pull-submodule.sh: test_expect_success 'branch has no merge base with re\n       \tgit -C child reset --hard \"$OTHER\" &&\n      \n       ## t/t5580-unc-paths.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='various Windows-only path tests'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5580-unc-paths.sh: test_expect_success fetch '\n       \tgit init to-fetch &&\n       \t(\n     @@ t/t5580-unc-paths.sh: test_expect_success fetch '\n       \n      \n       ## t/t5581-http-curl-verbose.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='test GIT_CURL_VERBOSE'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5581-http-curl-verbose.sh: test_expect_success 'setup repository' '\n       \tgit add file &&\n       \tgit commit -m one &&\n     @@ t/t5581-http-curl-verbose.sh: test_expect_success 'setup repository' '\n       test_expect_success 'failure in git-upload-pack is shown' '\n      \n       ## t/t5582-fetch-negative-refspec.sh ##\n     +@@ t/t5582-fetch-negative-refspec.sh: test_description='\"git fetch\" with negative refspecs.\n     + \n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5582-fetch-negative-refspec.sh: test_expect_success \"clone and setup child repos\" '\n       \t\tgit switch -c alternate &&\n       \t\techo >file updated again by one &&\n     @@ t/t5582-fetch-negative-refspec.sh: test_expect_success \"fetch with negative patt\n       \t\tcut -f -1 .git/FETCH_HEAD >actual &&\n       \t\ttest_cmp expect actual\n       \t)\n     -\n     - ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TEST_NUMBER\" in\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n     --[0-4]*|5[0-4]*|55[0-3]*)\n     -+[0-4]*|5[0-5]*)\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n 16:  dda6ce098c ! 17:  b2fda75261 t5[6-9]*: adjust the references to the default branch name \"main\"\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t5601-clone.sh ##\n     +@@\n     + \n     + test_description=clone\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5601-clone.sh: test_expect_success 'clone respects global branch.autosetuprebase' '\n       \t\trm -fr dst &&\n       \t\tgit clone src dst &&\n     @@ t/t5601-clone.sh: test_expect_success 'clone from a repository with two identica\n       \ttest \"z$( cd target-11 && git symbolic-ref HEAD )\" = zrefs/heads/another\n      \n       ## t/t5604-clone-reference.sh ##\n     +@@\n     + #\n     + \n     + test_description='test clone --reference'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5604-clone-reference.sh: test_expect_success 'existence of info/alternates' '\n       '\n       \n     @@ t/t5604-clone-reference.sh: test_expect_success 'fetch with incomplete alternate\n       '\n      \n       ## t/t5605-clone-local.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='test local clone'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5605-clone-local.sh: test_expect_success 'preparing origin repository' '\n       \ttest \"$(cd a.git && git config --bool core.bare)\" = true &&\n       \ttest \"$(cd x && git config --bool core.bare)\" = true &&\n     @@ t/t5605-clone-local.sh: test_expect_success 'clone empty repository' '\n       \n      \n       ## t/t5606-clone-options.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='basic clone options'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5606-clone-options.sh: test_expect_success 'setup' '\n       test_expect_success 'clone -o' '\n       \n     @@ t/t5606-clone-options.sh: test_expect_success 'prefers config \"clone.defaultRemo\n       \n      \n       ## t/t5607-clone-bundle.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='some bundle related tests'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5607-clone-bundle.sh: test_expect_success 'setup' '\n       '\n       \n     @@ t/t5608-clone-2gb.sh: test_expect_success 'setup' '\n       \t echo \"data 5\" &&\n      \n       ## t/t5609-clone-branch.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='clone --branch option'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5609-clone-branch.sh: test_expect_success 'setup' '\n       \t echo one >file && git add file && git commit -m one &&\n       \t git checkout -b two &&\n     @@ t/t5609-clone-branch.sh: test_expect_success 'clone -b sets up tracking' '\n       \t)\n      \n       ## t/t5610-clone-detached.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='test cloning a repository with detached HEAD'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5610-clone-detached.sh: test_expect_success 'setup' '\n       '\n       \n     @@ t/t5610-clone-detached.sh: test_expect_success 'cloned HEAD is detached' '\n       \tgit clone \"file://$PWD\" detached-orphan\n      \n       ## t/t5611-clone-config.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='tests for git clone -c key=value'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5611-clone-config.sh: test_expect_success 'clone -c config is available during clone' '\n       \n       test_expect_success 'clone -c remote.origin.fetch=<refspec> works' '\n     @@ t/t5611-clone-config.sh: test_expect_success 'clone -c remote.<remote>.fetch=<re\n       '\n      \n       ## t/t5612-clone-refspec.sh ##\n     -@@ t/t5612-clone-refspec.sh: test_description='test refspec written by clone-command'\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='test refspec written by clone-command'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n       . ./test-lib.sh\n       \n       test_expect_success 'setup' '\n     @@ t/t5614-clone-submodules-shallow.sh: test_description='Test shallow cloning of r\n       \tmkdir sub &&\n      \n       ## t/t5616-partial-clone.sh ##\n     +@@\n     + \n     + test_description='git partial clone'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5616-partial-clone.sh: test_expect_success 'verify that .promisor file contains refs fetched' '\n       \ttest_line_count = 1 promisorlist &&\n       \tgit -C srv.bare rev-parse --verify HEAD >headhash &&\n     @@ t/t5616-partial-clone.sh: test_expect_success 'fetch lazy-fetches only to resolv\n       \tgrep \"fetch< version 2\" trace &&\n      \n       ## t/t5617-clone-submodules-remote.sh ##\n     -@@ t/t5617-clone-submodules-remote.sh: test_description='Test cloning repos with submodules using remote-tracking branc\n     +@@\n     + \n     + test_description='Test cloning repos with submodules using remote-tracking branches'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n     +@@ t/t5617-clone-submodules-remote.sh: export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n       pwd=$(pwd)\n       \n       test_expect_success 'setup' '\n     @@ t/t5617-clone-submodules-remote.sh: test_expect_success 'clone with --single-bra\n       '\n      \n       ## t/t5700-protocol-v1.sh ##\n     +@@ t/t5700-protocol-v1.sh: TEST_NO_CREATE_REPO=1\n     + GIT_TEST_PROTOCOL_VERSION=0\n     + export GIT_TEST_PROTOCOL_VERSION\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5700-protocol-v1.sh: test_expect_success 'fetch with git:// using protocol v1' '\n       \tGIT_TRACE_PACKET=1 git -C daemon_child -c protocol.version=1 \\\n       \t\tfetch 2>log &&\n     @@ t/t5700-protocol-v1.sh: test_expect_success 'push with http:// using protocol v1\n       \n      \n       ## t/t5701-git-serve.sh ##\n     +@@\n     + \n     + test_description='test protocol v2 server commands'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5701-git-serve.sh: test_expect_success 'wrong object-format' '\n       #\n       test_expect_success 'setup some refs and tags' '\n     @@ t/t5701-git-serve.sh: test_expect_success 'symrefs parameter' '\n       \n      \n       ## t/t5702-protocol-v2.sh ##\n     +@@ t/t5702-protocol-v2.sh: test_description='test git wire-protocol version 2'\n     + \n     + TEST_NO_CREATE_REPO=1\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5702-protocol-v2.sh: test_expect_success 'ref advertisement is filtered with ls-remote using protocol\n       \ttest_when_finished \"rm -f log\" &&\n       \n     @@ t/t5702-protocol-v2.sh: test_expect_success 'push with http:// and a config of v\n       \n      \n       ## t/t5703-upload-pack-ref-in-want.sh ##\n     +@@\n     + \n     + test_description='upload-pack ref-in-want'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5703-upload-pack-ref-in-want.sh: write_command () {\n       \n       # c(o/foo) d(o/bar)\n     @@ t/t5703-upload-pack-ref-in-want.sh: test_expect_success 'server is initially beh\n       \n      \n       ## t/t5801-remote-helpers.sh ##\n     +@@\n     + \n     + test_description='Test remote-helper import and export commands'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t5801-remote-helpers.sh: test_expect_success 'fetch multiple branches' '\n       \t(cd local &&\n       \t git fetch\n     @@ t/t5801-remote-helpers.sh: test_expect_success 'fetch HEAD' '\n       \techo more >>file &&\n       \tgit commit -a -m more\n       \t) &&\n     -\n     - ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TEST_NUMBER\" in\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n     --[0-4]*|5[0-5]*)\n     -+[0-5]*)\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n 17:  27d7994933 ! 18:  dfbc93923b t6[0-3]*: adjust the references to the default branch name \"main\"\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t6000-rev-list-misc.sh ##\n     +@@\n     + \n     + test_description='miscellaneous rev-list tests'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6000-rev-list-misc.sh: test_expect_success 'propagate uninteresting flag down correctly' '\n       '\n       \n     @@ t/t6000-rev-list-misc.sh: test_expect_success 'propagate uninteresting flag down\n       \t< that\n      \n       ## t/t6001-rev-list-graft.sh ##\n     +@@\n     + \n     + test_description='Revision traversal vs grafts and path limiter'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6001-rev-list-graft.sh: test_expect_success setup '\n       \tgit commit -a -m \"Third in one history.\" &&\n       \tA2=$(git rev-parse --verify HEAD) &&\n     @@ t/t6004-rev-list-path-optim.sh: test_description='git rev-list trivial path opti\n         /                        /\n        o---------o----o----o----o side\n        a0        c0   c1   a1   c2\n     +@@ t/t6004-rev-list-path-optim.sh: test_description='git rev-list trivial path optimization test\n     + \n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6004-rev-list-path-optim.sh: test_expect_success 'further setup' '\n       \tgit add c &&\n       \ttest_tick &&\n     @@ t/t6004-rev-list-path-optim.sh: test_expect_success 'path optimization 2' '\n       '\n      \n       ## t/t6006-rev-list-format.sh ##\n     +@@\n     + \n     + test_description='git rev-list --pretty=format test'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6006-rev-list-format.sh: test_expect_success 'setup' '\n       test_format () {\n       \tcat >expect.$1\n     @@ t/t6006-rev-list-format.sh: test_expect_success '\"%h %gD: %gs\" is same as git-re\n       \n      \n       ## t/t6007-rev-list-cherry-pick-file.sh ##\n     +@@\n     + \n     + test_description='test git rev-list --cherry-pick -- file'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6007-rev-list-cherry-pick-file.sh: test_expect_success setup '\n       \ttest_tick &&\n       \tgit commit -m \"E\" &&\n     @@ t/t6007-rev-list-cherry-pick-file.sh: test_expect_success '--cherry-pick with in\n       cat >expect <<EOF\n      \n       ## t/t6008-rev-list-submodule.sh ##\n     +@@\n     + \n     + test_description='git rev-list involving submodules that this repo has'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6008-rev-list-submodule.sh: test_expect_success 'setup' '\n       '\n       \n     @@ t/t6008-rev-list-submodule.sh: test_expect_success 'setup' '\n       test_done\n      \n       ## t/t6009-rev-list-parent.sh ##\n     +@@\n     + \n     + test_description='ancestor culling and limiting by parent number'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6009-rev-list-parent.sh: test_expect_success 'setup roots, merges and octopuses' '\n       \ttest_commit seven &&\n       \tgit checkout -b yetanotherbranch four &&\n     @@ t/t6009-rev-list-parent.sh: test_expect_success 'dodecapus' '\n       \tgit tag dodecapus &&\n      \n       ## t/t6012-rev-list-simplify.sh ##\n     +@@\n     + \n     + test_description='merge simplification'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6012-rev-list-simplify.sh: test_expect_success setup '\n       \tgit add side &&\n       \ttest_tick && git commit -m \"Side root\" &&\n     @@ t/t6012-rev-list-simplify.sh: test_expect_success setup '\n       \n      \n       ## t/t6013-rev-list-reverse-parents.sh ##\n     +@@\n     + \n     + test_description='--reverse combines with --parents'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6013-rev-list-reverse-parents.sh: test_expect_success 'set up --reverse example' '\n       \tcommit two &&\n       \tgit checkout -b side HEAD^ &&\n     @@ t/t6013-rev-list-reverse-parents.sh: test_expect_success 'set up --reverse examp\n       \n      \n       ## t/t6016-rev-list-graph-simplify-history.sh ##\n     +@@\n     + \n     + test_description='--graph and simplified history'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6016-rev-list-graph-simplify-history.sh: test_expect_success 'set up rev-list --graph test' '\n       \ttest_commit A1 foo.txt &&\n       \ttest_commit A2 bar.txt &&\n     @@ t/t6016-rev-list-graph-simplify-history.sh: test_expect_success 'set up rev-list\n       \tgit checkout -b B A1 &&\n      \n       ## t/t6017-rev-list-stdin.sh ##\n     +@@\n     + \n     + test_description='log family learns --stdin'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6017-rev-list-stdin.sh: test_expect_success setup '\n       \t\tdone &&\n       \t\tfor i in $them\n     @@ t/t6017-rev-list-stdin.sh: test_expect_success 'not only --stdin' '\n       '\n      \n       ## t/t6018-rev-list-glob.sh ##\n     +@@\n     + \n     + test_description='rev-list/rev-parse --glob'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6018-rev-list-glob.sh: compare () {\n       \n       test_expect_success 'setup' '\n     @@ t/t6018-rev-list-glob.sh: test_expect_success 'shortlog accepts --glob/--tags/--\n       \n      \n       ## t/t6019-rev-list-ancestry-path.sh ##\n     +@@ t/t6019-rev-list-ancestry-path.sh: test_description='--ancestry-path'\n     + #  --ancestry-path G..M -- G.t == L\n     + #  --ancestry-path --simplify-merges G^..M -- G.t == G L\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6019-rev-list-ancestry-path.sh: test_expect_success 'setup criss-cross' '\n       \t(cd criss-cross &&\n       \t git init &&\n     @@ t/t6019-rev-list-ancestry-path.sh: test_expect_success 'setup criss-cross' '\n       # no commits in bc descend from cb\n      \n       ## t/t6030-bisect-porcelain.sh ##\n     +@@ t/t6030-bisect-porcelain.sh: test_description='Tests git bisect functionality'\n     + \n     + exec </dev/null\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6030-bisect-porcelain.sh: test_expect_success 'bisect start without -- takes unknown arg as pathspec' '\n       \tgrep bar \".git/BISECT_NAMES\"\n       '\n     @@ t/t6030-bisect-porcelain.sh: test_expect_success 'bisect: --no-checkout - target\n       \t\tgit rev-list --objects BISECT_HEAD --not \\$GOOD >tmp.\\$\\$ &&\n      \n       ## t/t6040-tracking-info.sh ##\n     +@@\n     + \n     + test_description='remote tracking stats'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6040-tracking-info.sh: test_expect_success setup '\n       \t\tgit branch -d brokenbase &&\n       \t\tgit checkout -b b6 origin\n     @@ t/t6040-tracking-info.sh: test_expect_success '--set-upstream-to @{-1}' '\n       '\n      \n       ## t/t6050-replace.sh ##\n     +@@\n     + #\n     + test_description='Tests replace refs functionality'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6050-replace.sh: test_expect_success 'tag replaced commit' '\n       '\n       \n     @@ t/t6050-replace.sh: test_expect_success GPG 'set up a merge commit with a merget\n       \tgit cat-file commit $HASH10 | grep \"^mergetag object\"\n      \n       ## t/t6101-rev-parse-parents.sh ##\n     +@@\n     + \n     + test_description='Test git rev-parse with different parent options'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6101-rev-parse-parents.sh: test_expect_success 'setup' '\n       \ttest_commit second &&\n       \tgit checkout --orphan tmp &&\n     @@ t/t6101-rev-parse-parents.sh: test_expect_success 'setup' '\n       \n      \n       ## t/t6110-rev-list-sparse.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='operations that cull histories in unusual ways'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6110-rev-list-sparse.sh: test_expect_success setup '\n       \tgit checkout -b side HEAD^ &&\n       \ttest_commit D &&\n     @@ t/t6110-rev-list-sparse.sh: test_expect_success setup '\n       test_expect_success 'rev-list --first-parent --boundary' '\n      \n       ## t/t6111-rev-list-treesame.sh ##\n     +@@\n     + \n     + test_description='TREESAME and limiting'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6111-rev-list-treesame.sh: test_expect_success setup '\n       \tgit checkout other-branch &&\n       \ttest_commit \"Added other\" other \"Hello\" C &&\n     @@ t/t6111-rev-list-treesame.sh: test_expect_success setup '\n       \n      \n       ## t/t6112-rev-list-filters-objects.sh ##\n     +@@\n     + \n     + test_description='git rev-list using object filtering'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6112-rev-list-filters-objects.sh: test_expect_success 'verify sparse:oid=oid-ish omits top-level files' '\n       \tsort >expected &&\n       \n     @@ t/t6112-rev-list-filters-objects.sh: test_expect_success 'combine:... with more\n       \n      \n       ## t/t6120-describe.sh ##\n     +@@ t/t6120-describe.sh: test_description='test describe'\n     + #\n     + # First parent of a merge commit is on the same line, second parent below.\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6120-describe.sh: check_describe c-* --tags HEAD^^2\n       check_describe B --tags HEAD^^2^\n       check_describe e --tags HEAD^^^\n     @@ t/t6120-describe.sh: test_expect_success 'describe commits with disjoint bases 2\n       \t)\n      \n       ## t/t6200-fmt-merge-msg.sh ##\n     +@@\n     + \n     + test_description='fmt-merge-msg test'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6200-fmt-merge-msg.sh: test_expect_success GPG 'set up a signed tag' '\n       test_expect_success 'message for merging local branch' '\n       \techo \"Merge branch ${apos}left${apos}\" >expected &&\n     @@ t/t6200-fmt-merge-msg.sh: test_expect_success 'merge-msg with \"merging\" an annot\n       test_done\n      \n       ## t/t6302-for-each-ref-filter.sh ##\n     +@@\n     + \n     + test_description='test for-each-refs usage of ref-filter APIs'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6302-for-each-ref-filter.sh: test_expect_success 'setup some history and refs' '\n       \tgit tag $sign -m \"A signed tag\" signed-tag &&\n       \tgit tag $sign -m \"Signed doubly\" doubly-signed-tag signed-tag &&\n     @@ t/t6302-for-each-ref-filter.sh: test_expect_success '--merged is compatible with\n       \tgit for-each-ref --format=\"%(refname:short): %(if)%(worktreepath)%(then)%(worktreepath)%(else)not checked out%(end)\" refs/heads/ >actual &&\n       \trm -r worktree_dir &&\n       \tgit worktree prune &&\n     -\n     - ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TRASH_DIRECTORY\" in\n     - esac\n     - \n     - case \"$TEST_NUMBER\" in\n     --3404|4013|5310|5526)\n     -+3404|4013|5310|5526|6300)\n     - \t# Avoid conflicts with patch series that are cooking at the same time\n     - \t# as the patch series changing the default of `init.defaultBranch`.\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n     --[0-5]*)\n     -+[0-5]*|6[0-3]*)\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n 18:  04878e2268 = 19:  0a4bc77dac t64*: preemptively adjust alignment to prepare for `master` -> `main`\n 19:  f0fa12b577 ! 20:  3dbc83c6a1 t6[4-9]*: adjust the references to the default branch name \"main\"\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t6400-merge-df.sh ##\n     +@@\n     + #\n     + \n     + test_description='Test merge with directory/file conflicts'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6400-merge-df.sh: test_expect_success 'prepare repository' '\n       '\n       \n     @@ t/t6400-merge-df.sh: test_expect_success 'F/D conflict' '\n       test_expect_success 'setup modify/delete + directory/file conflict' '\n      \n       ## t/t6402-merge-rename.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='Merge-recursive merging renames'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6402-merge-rename.sh: test_expect_success 'setup' '\n       \tgit branch change &&\n       \tgit branch change+rename &&\n     @@ t/t6402-merge-rename.sh: test_expect_success 'setup spurious \"refusing to lose u\n       '\n      \n       ## t/t6404-recursive-merge.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='Test merge without common ancestors'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6404-recursive-merge.sh: test_expect_success 'setup tests' '\n       \tgit add a1 &&\n       \tGIT_AUTHOR_DATE=\"2006-12-12 23:00:00\" git commit -m 1 a1 &&\n     @@ t/t6404-recursive-merge.sh: test_expect_success 'setup tests' '\n       \n      \n       ## t/t6405-merge-symlinks.sh ##\n     +@@ t/t6405-merge-symlinks.sh: test_description='merging symlinks on filesystem w/o symlink support.\n     + This tests that git merge-recursive writes merge results as plain files\n     + if core.symlinks is false.'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6405-merge-symlinks.sh: test_expect_success 'setup' '\n       \tgit branch b-file &&\n       \tl=$(printf file | git hash-object -t blob -w --stdin) &&\n     @@ t/t6405-merge-symlinks.sh: test_expect_success 'setup' '\n       \n      \n       ## t/t6406-merge-attr.sh ##\n     +@@\n     + \n     + test_description='per path merge controlled by merge attribute'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6406-merge-attr.sh: test_expect_success setup '\n       \tgit branch side &&\n       \tfor f in text binary union\n     @@ t/t6406-merge-attr.sh: test_expect_success 'custom merge does not lock index' '\n       test_done\n      \n       ## t/t6407-merge-binary.sh ##\n     +@@\n     + \n     + test_description='ask merge-recursive to merge binary files'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6407-merge-binary.sh: test_expect_success setup '\n       \tgit ls-files -s a >E0 &&\n       \tgit ls-files -s m | sed -e \"s/ 0\t/ 3\t/\" >E3 &&\n     @@ t/t6407-merge-binary.sh: test_expect_success recursive '\n       \t\tfalse\n      \n       ## t/t6409-merge-subtree.sh ##\n     +@@\n     + \n     + test_description='subtree merge strategy'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6409-merge-subtree.sh: test_expect_success setup '\n       \techo >>hello world &&\n       \tgit add hello &&\n     @@ t/t6409-merge-subtree.sh: test_expect_success 'merge update' '\n       \tgit ls-files -s >actual &&\n      \n       ## t/t6411-merge-filemode.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='merge: handle file mode'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6411-merge-filemode.sh: test_expect_success 'set up mode change in one branch' '\n       \t: >file1 &&\n       \tgit add file1 &&\n     @@ t/t6411-merge-filemode.sh: do_both_modes resolve\n       '\n      \n       ## t/t6412-merge-large-rename.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='merging with large rename matrix'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6412-merge-large-rename.sh: test_rename() {\n       \ttest_expect_success \"rename ($1, $2)\" '\n       \tn='$1' &&\n     @@ t/t6412-merge-large-rename.sh: test_rename() {\n       }\n      \n       ## t/t6413-merge-crlf.sh ##\n     +@@ t/t6413-merge-crlf.sh: test_description='merge conflict in crlf repo\n     + \n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6413-merge-crlf.sh: test_expect_success setup '\n       \techo line from b | append_cr >file &&\n       \tgit commit -m \"add line from b\" file &&\n     @@ t/t6413-merge-crlf.sh: test_expect_success setup '\n       test_expect_success 'Check \"ours\" is CRLF' '\n      \n       ## t/t6414-merge-rename-nocruft.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='Merge-recursive merging renames'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6414-merge-rename-nocruft.sh: test_expect_success 'setup' '\n       \tgit update-index A &&\n       \tgit commit -m \"blue modify A\" &&\n     @@ t/t6414-merge-rename-nocruft.sh: test_expect_success 'setup' '\n       # This test broke in 65ac6e9c3f47807cb603af07a6a9e1a43bc119ae\n      \n       ## t/t6415-merge-dir-to-symlink.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='merging when a directory was replaced with a symlink'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6415-merge-dir-to-symlink.sh: test_expect_success 'create a commit where dir a/b changed to symlink' '\n       \n       test_expect_success 'checkout does not clobber untracked symlink' '\n     @@ t/t6415-merge-dir-to-symlink.sh: test_expect_success 'do not lose modifications\n       test_expect_success 'setup a merge where dir a/b-2 changed to symlink' '\n      \n       ## t/t6416-recursive-corner-cases.sh ##\n     +@@\n     + \n     + test_description='recursive merge corner cases involving criss-cross merges'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6416-recursive-corner-cases.sh: test_expect_success 'git detects conflict merging criss-cross+modify/delete' '\n       \t\ttest_line_count = 2 out &&\n       \n     @@ t/t6416-recursive-corner-cases.sh: test_expect_success 'check virtual merge base\n       \t\t\tbase        \\\n      \n       ## t/t6417-merge-ours-theirs.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='Merge-recursive ours and theirs variants'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6417-merge-ours-theirs.sh: test_expect_success setup '\n       \tsed -e \"s/9/nueve/\" >file <elif &&\n       \tgit commit -a -m theirs &&\n     @@ t/t6418-merge-text-auto.sh\n       *+ [side^] Initial\n       '\n       \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6418-merge-text-auto.sh: test_expect_success setup '\n       \tgit commit -m \"add line from b\" &&\n       \tgit tag b &&\n     @@ t/t6418-merge-text-auto.sh: test_expect_success 'Test delete/normalize conflict'\n       \ttest_path_is_missing file\n      \n       ## t/t6419-merge-ignorecase.sh ##\n     +@@\n     + \n     + test_description='git-merge with case-changing rename on case-insensitive file system'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6419-merge-ignorecase.sh: test_expect_success 'merge with case-changing rename' '\n       \t>foo &&\n       \tgit add foo &&\n     @@ t/t6419-merge-ignorecase.sh: test_expect_success 'merge with case-changing renam\n       \n      \n       ## t/t6422-merge-rename-corner-cases.sh ##\n     +@@\n     + test_description=\"recursive merge corner cases w/ renames but not criss-crosses\"\n     + # t6036 has corner cases that involve both criss-cross merges and renames\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6422-merge-rename-corner-cases.sh: test_conflicts_with_adds_and_renames() {\n       \t# Setup:\n       \t#          L\n     @@ t/t6422-merge-rename-corner-cases.sh: test_expect_success 'check nested conflict\n       \t\ttest_must_fail git merge-file    \\\n      \n       ## t/t6425-merge-rename-delete.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='Merge-recursive rename/delete conflict message'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6425-merge-rename-delete.sh: test_expect_success 'rename/delete' '\n       \tgit mv A B &&\n       \tgit commit -m \"rename\" &&\n     @@ t/t6425-merge-rename-delete.sh: test_expect_success 'rename/delete' '\n       \n      \n       ## t/t6427-diff3-conflict-markers.sh ##\n     +@@\n     + \n     + test_description='recursive merge diff3 style conflict markers'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6427-diff3-conflict-markers.sh: test_expect_success 'check no merge base' '\n       # Setup:\n       #          L1\n     @@ t/t6427-diff3-conflict-markers.sh: test_expect_success 'rebase --apply describes\n       '\n      \n       ## t/t6430-merge-recursive.sh ##\n     +@@\n     + \n     + test_description='merge-recursive backend test'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6430-merge-recursive.sh: test_expect_success 'setup 1' '\n       \tgit add a d/e &&\n       \n     @@ t/t6432-merge-recursive-space-options.sh\n       *+ [remote^] Initial revision\n       *   ok 1: setup\n       '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6432-merge-recursive-space-options.sh: test_expect_success 'setup' '\n       \tmv text.txt+ text.txt &&\n       \tgit commit -a -m \"Remove cruft\" &&\n     @@ t/t6432-merge-recursive-space-options.sh: test_expect_success 'setup' '\n       \t\t\ts/Quite correct\\(.*\\)/It is too correct\\1Q/\n      \n       ## t/t6433-merge-toplevel.sh ##\n     -@@ t/t6433-merge-toplevel.sh: test_description='\"git merge\" top-level frontend'\n     +@@\n     + \n     + test_description='\"git merge\" top-level frontend'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n       . ./test-lib.sh\n       \n       t3033_reset () {\n     @@ t/t6434-merge-recursive-rename-options.sh: test_description='merge-recursive ren\n       D\t0-old\n       D\t1-old\n       D\t2-old\n     +@@ t/t6434-merge-recursive-rename-options.sh: they are rounded down (see, e.g., Documentation/diff-generate-patch.txt, which\n     + mentions this in a different context).\n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6434-merge-recursive-rename-options.sh: test_expect_success 'setup repo' '\n       \tget_expected_stages 2 &&\n       \tget_expected_stages 3 &&\n     @@ t/t6434-merge-recursive-rename-options.sh: test_expect_success 'setup repo' '\n       test_expect_success 'setup thresholds' '\n      \n       ## t/t6436-merge-overwrite.sh ##\n     +@@ t/t6436-merge-overwrite.sh: test_description='git-merge\n     + \n     + Do not overwrite changes.'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6436-merge-overwrite.sh: test_expect_success 'set up unborn branch and content' '\n       '\n       \n     @@ t/t6436-merge-overwrite.sh: test_expect_success 'set up unborn branch and conten\n       \tgrep foo expect &&\n      \n       ## t/t6437-submodule-merge.sh ##\n     +@@\n     + \n     + test_description='merging with submodules'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6437-submodule-merge.sh: test_expect_success setup '\n       \ttest_tick &&\n       \tgit commit -m root &&\n     @@ t/t6437-submodule-merge.sh: test_expect_success 'setup for recursive merge with\n       \t git commit -m c &&\n      \n       ## t/t6439-merge-co-error-msgs.sh ##\n     +@@\n     + \n     + test_description='unpack-trees error messages'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6439-merge-co-error-msgs.sh: test_expect_success 'setup' '\n       \tgit add two three four five &&\n       \tgit commit -m Second &&\n     @@ t/t6439-merge-co-error-msgs.sh: test_expect_success 'not_uptodate_dir porcelain\n       \ttest_must_fail git checkout branch 2>out &&\n      \n       ## t/t6501-freshen-objects.sh ##\n     +@@\n     + #      to refer to an existing tree).\n     + \n     + test_description='check pruning of dependent objects'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t6501-freshen-objects.sh: for repack in '' true; do\n       \t\tgit checkout -b experiment &&\n       \t\tcommit abandon &&\n     @@ t/t6501-freshen-objects.sh: for repack in '' true; do\n       \t\tgit branch -D experiment\n       \t'\n       \n     -\n     - ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TEST_NUMBER\" in\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n     --[0-5]*|6[0-3]*)\n     -+[0-6]*)\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n 20:  f9c30dc516 ! 21:  2315a253f6 t7[0-4]*: adjust the references to the default branch name \"main\"\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t7003-filter-branch.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='git filter-branch'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7003-filter-branch.sh: test_expect_success 'setup' '\n       \tmkdir dir &&\n       \ttest_commit dir/D &&\n     @@ t/t7003-filter-branch.sh: test_expect_success 'automatic remapping to ancestor w\n       \n      \n       ## t/t7004-tag.sh ##\n     +@@ t/t7004-tag.sh: test_description='git tag\n     + \n     + Tests for operations with tags.'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7004-tag.sh: test_expect_success 'checking that branch head with --no-contains lists all but\n       \"\n       \n     @@ t/t7004-tag.sh: test_expect_success ULIMIT_STACK_SIZE '--contains and --no-conta\n       \ttest_must_be_empty actual &&\n      \n       ## t/t7030-verify-tag.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='signed tag tests'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7030-verify-tag.sh: test_expect_success GPG 'create signed tags' '\n       \techo 3 >elif && git add elif &&\n       \ttest_tick && git commit -m \"third on side\" &&\n     @@ t/t7030-verify-tag.sh: test_expect_success GPG 'create signed tags' '\n       \n      \n       ## t/t7060-wtstatus.sh ##\n     +@@\n     + \n     + test_description='basic work tree status reporting'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7060-wtstatus.sh: EOF\n       \t\tgit checkout -b side HEAD^ &&\n       \t\tgit rm foo &&\n     @@ t/t7060-wtstatus.sh: test_expect_success 'status --branch with detached HEAD' '\n       \t## HEAD (no branch)\n      \n       ## t/t7063-status-untracked-cache.sh ##\n     +@@\n     + \n     + test_description='test untracked cache'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7063-status-untracked-cache.sh: EOF\n       test_expect_success 'set up sparse checkout' '\n       \techo \"done/[a-z]*\" >.git/info/sparse-checkout &&\n     @@ t/t7063-status-untracked-cache.sh: test_expect_success '\"status\" after file repl\n       \tstatus_is_clean\n      \n       ## t/t7102-reset.sh ##\n     +@@ t/t7102-reset.sh: test_description='git reset\n     + \n     + Documented tests for git reset'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7102-reset.sh: test_expect_success 'trying to do reset --soft with pending merge should fail' '\n       \tprintf \"1st line 2nd file\\n2nd line 2nd file\\n3rd line\" >secondfile &&\n       \tgit commit -a -m \"the change in branch2\" &&\n     @@ t/t7102-reset.sh: test_expect_success '--hard reset to ORIG_HEAD should clear a\n       '\n      \n       ## t/t7113-post-index-change-hook.sh ##\n     +@@\n     + \n     + test_description='post index change hook'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7113-post-index-change-hook.sh: test_expect_success 'test checkout and reset trigger the hook' '\n       \tEOF\n       \t: force index to be dirty &&\n     @@ t/t7201-co.sh: Test switching across them.\n       \n       '\n       \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7201-co.sh: test_expect_success setup '\n       \tfill a b c d e f >two &&\n       \tgit commit -a -m \"Renamer R one->uno, M two\" &&\n     @@ t/t7201-co.sh: test_expect_success 'checkout --conflict=diff3' '\n       \t! grep \"^Previous HEAD\" error.log\n      \n       ## t/t7400-submodule-basic.sh ##\n     +@@ t/t7400-submodule-basic.sh: This test tries to verify basic sanity of the init, update and status\n     + subcommands of git submodule.\n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7400-submodule-basic.sh: inspect() {\n       }\n       \n     @@ t/t7400-submodule-basic.sh: test_expect_success 'apply submodule diff' '\n       \n      \n       ## t/t7403-submodule-sync.sh ##\n     +@@ t/t7403-submodule-sync.sh: test_description='git submodule sync\n     + These tests exercise the \"git submodule sync\" subcommand.\n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7403-submodule-sync.sh: test_expect_success 'change submodule url' '\n       \t(\n       \t\tcd super &&\n     @@ t/t7403-submodule-sync.sh: test_expect_success '\"git submodule sync --recursive\"\n       '\n      \n       ## t/t7406-submodule-update.sh ##\n     -@@ t/t7406-submodule-update.sh: submodule and \"git submodule update --rebase/--merge\" does not detach the HEAD.\n     +@@ t/t7406-submodule-update.sh: This test verifies that \"git submodule update\" detaches the HEAD of the\n     + submodule and \"git submodule update --rebase/--merge\" does not detach the HEAD.\n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n     +@@ t/t7406-submodule-update.sh: export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n       \n       compare_head()\n       {\n     @@ t/t7406-submodule-update.sh: test_expect_success 'submodule update places git-di\n       \t)\n      \n       ## t/t7407-submodule-foreach.sh ##\n     +@@ t/t7407-submodule-foreach.sh: This test verifies that \"git submodule foreach\" correctly visits all submodules\n     + that are currently checked out.\n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7407-submodule-foreach.sh: sub1sha1_short=$(cd clone3/sub1 && git rev-parse --short HEAD)\n       sub2sha1_short=$(cd clone3/sub2 && git rev-parse --short HEAD)\n       \n     @@ t/t7407-submodule-foreach.sh: test_expect_success 'ensure \"status --cached --rec\n       test_expect_success 'test \"status --recursive\" from sub directory' '\n      \n       ## t/t7409-submodule-detached-work-tree.sh ##\n     +@@ t/t7409-submodule-detached-work-tree.sh: on detached working trees\n     + '\n     + \n     + TEST_NO_CREATE_REPO=1\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7409-submodule-detached-work-tree.sh: test_expect_success 'submodule on detached working tree' '\n       \t\t\tgit rev-parse --verify HEAD >actual &&\n       \t\t\ttest_cmp ../../../../expect actual\n     @@ t/t7409-submodule-detached-work-tree.sh: test_expect_success 'submodule on detac\n       \t\tcd home &&\n      \n       ## t/t7417-submodule-path-url.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='check handling of .gitmodule path with dash'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7417-submodule-path-url.sh: test_expect_success MINGW 'submodule paths disallows trailing spaces' '\n       \tsed \"s/sub/sub /\" <tree >tree.new &&\n       \ttree=$(git -C super mktree <tree.new) &&\n     @@ t/t7417-submodule-path-url.sh: test_expect_success MINGW 'submodule paths disall\n       \n       \ttest_must_fail git clone --recurse-submodules super dst 2>err &&\n       \ttest_i18ngrep \"sub \" err\n     -\n     - ## t/test-lib.sh ##\n     -@@ t/test-lib.sh: case \"$TRASH_DIRECTORY\" in\n     - esac\n     - \n     - case \"$TEST_NUMBER\" in\n     --3404|4013|5310|5526|6300)\n     -+3404|4013|5310|5526|6300|7064)\n     - \t# Avoid conflicts with patch series that are cooking at the same time\n     - \t# as the patch series changing the default of `init.defaultBranch`.\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n     --[0-6]*)\n     -+[0-6]*|7[0-4]*)\n     - \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     - \texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     - \t;;\n 21:  2b269ca983 ! 22:  20eef6cc97 t7[5-9]*: adjust the references to the default branch name \"main\"\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t7501-commit-basic-functionality.sh ##\n     +@@\n     + # signoff\n     + \n     + test_description='git commit'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7501-commit-basic-functionality.sh: test_expect_success 'same tree (merge and amend merge)' '\n       \techo zero >zero &&\n       \tgit add zero &&\n     @@ t/t7501-commit-basic-functionality.sh: test_expect_success 'same tree (merge and\n       \tgit diff HEAD^ HEAD >actual &&\n      \n       ## t/t7502-commit-porcelain.sh ##\n     +@@\n     + \n     + test_description='git commit porcelain-ish'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7502-commit-porcelain.sh: test_expect_success 'output summary format for merges' '\n       \n       output_tests_cleanup() {\n     @@ t/t7502-commit-porcelain.sh: git reset -q --hard\n       \tsed -n -e \"s/^parent //p\" -e \"/^$/q\" raw >actual &&\n      \n       ## t/t7503-pre-commit-and-pre-merge-commit-hooks.sh ##\n     +@@\n     + \n     + test_description='pre-commit and pre-merge-commit hooks'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7503-pre-commit-and-pre-merge-commit-hooks.sh: test_expect_success 'root commit' '\n       \tgit add foo &&\n       \tgit commit -m \"make it non-ff\" &&\n     @@ t/t7503-pre-commit-and-pre-merge-commit-hooks.sh: test_expect_success POSIXPERM\n       \n      \n       ## t/t7504-commit-msg-hook.sh ##\n     +@@\n     + \n     + test_description='commit-msg hook'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7504-commit-msg-hook.sh: test_expect_success '--no-verify with failing hook (editor)' '\n       test_expect_success 'merge fails with failing hook' '\n       \n     @@ t/t7504-commit-msg-hook.sh: test_expect_success \"hook doesn't edit commit messag\n       \tgit add file2 &&\n      \n       ## t/t7505-prepare-commit-msg-hook.sh ##\n     +@@\n     + \n     + test_description='prepare-commit-msg hook'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7505-prepare-commit-msg-hook.sh: test_expect_success 'set up commits for rebasing' '\n       \tdo\n       \t\ttest_commit rebase-$i c $i\n     @@ t/t7508-status.sh: test_expect_success 'git commit --dry-run will show a staged\n         (use \"git pull\" to merge the remote branch into yours)\n      \n       ## t/t7510-signed-commit.sh ##\n     +@@\n     + #!/bin/sh\n     + \n     + test_description='signed commit tests'\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7510-signed-commit.sh: test_expect_success GPG 'create signed commits' '\n       \techo 3 >elif && git add elif &&\n       \ttest_tick && git commit -m \"third on side\" &&\n     @@ t/t7510-signed-commit.sh: test_expect_success GPG 'create signed commits' '\n       \n      \n       ## t/t7512-status-help.sh ##\n     +@@\n     + \n     + test_description='git status advice'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7512-status-help.sh: test_expect_success 'prepare for conflicts' '\n       \tgit config --global advice.statusuoption false &&\n       \ttest_commit init main.txt init &&\n     @@ t/t7512-status-help.sh: EOF\n       \ttest_commit two_commit main.txt two &&\n      \n       ## t/t7517-per-repo-email.sh ##\n     +@@\n     + \n     + test_description='per-repo forced setting of email address'\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n      @@ t/t7517-per-repo-email.sh: test_expect_success 'set up rebase scenarios' '\n       \n       test_expect_success 'fast-forward rebase does not care about ident' '\n     @@ t/t7600-merge.sh: Testing basic merge operations/option parsing.\n        +     * [c1] commit 1\n             +  [c6] c6\n            +   [c5] c5\n     +@@ t/t7600-merge.sh: Testing basic merge operations/option parsing.\n     + +++++++* [c0] commit 0\n     + '\n     + \n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     + export "},{"id":"410309","messageId":"e9ee22525a30709d4d8435a822d19be80c2f5529.1605743086.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 01/28] tests: mark tests relying on the current default for `init.defaultBranch`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:19Z","receivedAt":"2020-11-18T23:45:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn addition to the manual adjustment to let the `linux-gcc` CI job run\nthe test suite with `master` and then with `main`, this patch makes sure\nthat GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME is set in all test scripts\nthat currently rely on the initial branch name being `master by default.\n\nTo determine which test scripts to mark up, the first step was to\nforce-set the default branch name to `master` in\n\n- all test scripts that contain the keyword `master`,\n\n- t4211, which expects `t/t4211/history.export` with a hard-coded ref to\n  initialize the default branch,\n\n- t5560 because it sources `t/t556x_common` which uses `master`,\n\n- t8002 and t8012 because both source `t/annotate-tests.sh` which also\n  uses `master`)\n\nThis trick was performed by this command:\n\n\t$ sed -i '/^ *\\. \\.\\/\\(test-lib\\|lib-\\(bash\\|cvs\\|git-svn\\)\\|gitweb-lib\\)\\.sh$/i\\\n\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\\\n\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\\\n\t' $(git grep -l master t/t[0-9]*.sh) \\\n\tt/t4211*.sh t/t5560*.sh t/t8002*.sh t/t8012*.sh\n\nAfter that, careful, manual inspection revealed that some of the test\nscripts containing the needle `master` do not actually rely on a\nspecific default branch name: either they mention `master` only in a\ncomment, or they initialize that branch specificially, or they do not\nactually refer to the current default branch. Therefore, the\naforementioned modification was undone in those test scripts thusly:\n\n\t$ git checkout HEAD -- \\\n\t\tt/t0027-auto-crlf.sh t/t0060-path-utils.sh \\\n\t\tt/t1011-read-tree-sparse-checkout.sh \\\n\t\tt/t1305-config-include.sh t/t1309-early-config.sh \\\n\t\tt/t1402-check-ref-format.sh t/t1450-fsck.sh \\\n\t\tt/t2024-checkout-dwim.sh \\\n\t\tt/t2106-update-index-assume-unchanged.sh \\\n\t\tt/t3040-subprojects-basic.sh t/t3301-notes.sh \\\n\t\tt/t3308-notes-merge.sh t/t3423-rebase-reword.sh \\\n\t\tt/t3436-rebase-more-options.sh \\\n\t\tt/t4015-diff-whitespace.sh t/t4257-am-interactive.sh \\\n\t\tt/t5323-pack-redundant.sh t/t5401-update-hooks.sh \\\n\t\tt/t5511-refspec.sh t/t5526-fetch-submodules.sh \\\n\t\tt/t5529-push-errors.sh t/t5530-upload-pack-error.sh \\\n\t\tt/t5548-push-porcelain.sh \\\n\t\tt/t5552-skipping-fetch-negotiator.sh \\\n\t\tt/t5572-pull-submodule.sh t/t5608-clone-2gb.sh \\\n\t\tt/t5614-clone-submodules-shallow.sh \\\n\t\tt/t7508-status.sh t/t7606-merge-custom.sh \\\n\t\tt/t9302-fast-import-unpack-limit.sh\n\nWe excluded one set of test scripts in these commands, though: the range\nof `git p4` tests. The reason? `git p4` stores the (foreign) remote\nbranch in the branch called `p4/master`, which is obviously not the\ndefault branch. Manual analysis revealed that only five of these tests\nactually require a specific default branch name to pass; They were\nmodified thusly:\n\n\t$ sed -i '/^ *\\. \\.\\/lib-git-p4\\.sh$/i\\\n\tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\\\n\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\\\n\t' t/t980[0167]*.sh t/t9811*.sh\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n ci/run-build-and-tests.sh                        | 2 ++\n t/t0002-gitfile.sh                               | 3 +++\n t/t0020-crlf.sh                                  | 3 +++\n t/t0021-conversion.sh                            | 3 +++\n t/t0028-working-tree-encoding.sh                 | 3 +++\n t/t0041-usage.sh                                 | 3 +++\n t/t0050-filesystem.sh                            | 3 +++\n t/t0100-previous.sh                              | 3 +++\n t/t1004-read-tree-m-u-wf.sh                      | 3 +++\n t/t1008-read-tree-overlay.sh                     | 3 +++\n t/t1009-read-tree-new-index.sh                   | 3 +++\n t/t1021-rerere-in-workdir.sh                     | 3 +++\n t/t1090-sparse-checkout-scope.sh                 | 3 +++\n t/t1091-sparse-checkout-builtin.sh               | 3 +++\n t/t1300-config.sh                                | 3 +++\n t/t1301-shared-repo.sh                           | 3 +++\n t/t1400-update-ref.sh                            | 3 +++\n t/t1403-show-ref.sh                              | 3 +++\n t/t1405-main-ref-store.sh                        | 3 +++\n t/t1406-submodule-ref-store.sh                   | 3 +++\n t/t1407-worktree-ref-store.sh                    | 3 +++\n t/t1408-packed-refs.sh                           | 3 +++\n t/t1410-reflog.sh                                | 3 +++\n t/t1411-reflog-show.sh                           | 3 +++\n t/t1413-reflog-detach.sh                         | 3 +++\n t/t1414-reflog-walk.sh                           | 3 +++\n t/t1416-ref-transaction-hooks.sh                 | 3 +++\n t/t1430-bad-ref-name.sh                          | 3 +++\n t/t1500-rev-parse.sh                             | 3 +++\n t/t1503-rev-parse-verify.sh                      | 3 +++\n t/t1505-rev-parse-last.sh                        | 3 +++\n t/t1506-rev-parse-diagnosis.sh                   | 3 +++\n t/t1507-rev-parse-upstream.sh                    | 3 +++\n t/t1508-at-combinations.sh                       | 3 +++\n t/t1511-rev-parse-caret.sh                       | 3 +++\n t/t1512-rev-parse-disambiguation.sh              | 3 +++\n t/t1513-rev-parse-prefix.sh                      | 3 +++\n t/t1514-rev-parse-push.sh                        | 3 +++\n t/t1700-split-index.sh                           | 3 +++\n t/t2007-checkout-symlink.sh                      | 3 +++\n t/t2009-checkout-statinfo.sh                     | 3 +++\n t/t2010-checkout-ambiguous.sh                    | 3 +++\n t/t2011-checkout-invalid-head.sh                 | 3 +++\n t/t2012-checkout-last.sh                         | 3 +++\n t/t2015-checkout-unborn.sh                       | 3 +++\n t/t2017-checkout-orphan.sh                       | 3 +++\n t/t2020-checkout-detach.sh                       | 3 +++\n t/t2022-checkout-paths.sh                        | 3 +++\n t/t2023-checkout-m.sh                            | 3 +++\n t/t2027-checkout-track.sh                        | 3 +++\n t/t2030-unresolve-info.sh                        | 3 +++\n t/t2060-switch.sh                                | 3 +++\n t/t2070-restore.sh                               | 3 +++\n t/t2400-worktree-add.sh                          | 3 +++\n t/t2401-worktree-prune.sh                        | 3 +++\n t/t2402-worktree-list.sh                         | 3 +++\n t/t2405-worktree-submodule.sh                    | 3 +++\n t/t3200-branch.sh                                | 3 +++\n t/t3201-branch-contains.sh                       | 3 +++\n t/t3202-show-branch-octopus.sh                   | 3 +++\n t/t3203-branch-output.sh                         | 3 +++\n t/t3204-branch-name-interpretation.sh            | 3 +++\n t/t3205-branch-color.sh                          | 3 +++\n t/t3206-range-diff.sh                            | 3 +++\n t/t3210-pack-refs.sh                             | 3 +++\n t/t3211-peel-ref.sh                              | 3 +++\n t/t3302-notes-index-expensive.sh                 | 3 +++\n t/t3303-notes-subtrees.sh                        | 3 +++\n t/t3304-notes-mixed.sh                           | 3 +++\n t/t3320-notes-merge-worktrees.sh                 | 3 +++\n t/t3400-rebase.sh                                | 3 +++\n t/t3402-rebase-merge.sh                          | 3 +++\n t/t3403-rebase-skip.sh                           | 3 +++\n t/t3404-rebase-interactive.sh                    | 3 +++\n t/t3405-rebase-malformed.sh                      | 3 +++\n t/t3406-rebase-message.sh                        | 3 +++\n t/t3407-rebase-abort.sh                          | 3 +++\n t/t3408-rebase-multi-line.sh                     | 3 +++\n t/t3409-rebase-preserve-merges.sh                | 3 +++\n t/t3412-rebase-root.sh                           | 3 +++\n t/t3413-rebase-hook.sh                           | 3 +++\n t/t3415-rebase-autosquash.sh                     | 3 +++\n t/t3416-rebase-onto-threedots.sh                 | 3 +++\n t/t3418-rebase-continue.sh                       | 3 +++\n t/t3419-rebase-patch-id.sh                       | 3 +++\n t/t3420-rebase-autostash.sh                      | 3 +++\n t/t3427-rebase-subtree.sh                        | 3 +++\n t/t3430-rebase-merges.sh                         | 3 +++\n t/t3431-rebase-fork-point.sh                     | 3 +++\n t/t3432-rebase-fast-forward.sh                   | 3 +++\n t/t3434-rebase-i18n.sh                           | 3 +++\n t/t3435-rebase-gpg-sign.sh                       | 3 +++\n t/t3500-cherry.sh                                | 3 +++\n t/t3501-revert-cherry-pick.sh                    | 3 +++\n t/t3502-cherry-pick-merge.sh                     | 3 +++\n t/t3503-cherry-pick-root.sh                      | 3 +++\n t/t3504-cherry-pick-rerere.sh                    | 3 +++\n t/t3505-cherry-pick-empty.sh                     | 3 +++\n t/t3506-cherry-pick-ff.sh                        | 3 +++\n t/t3507-cherry-pick-conflict.sh                  | 3 +++\n t/t3508-cherry-pick-many-commits.sh              | 3 +++\n t/t3509-cherry-pick-merge-df.sh                  | 3 +++\n t/t3512-cherry-pick-submodule.sh                 | 3 +++\n t/t3600-rm.sh                                    | 3 +++\n t/t3701-add-interactive.sh                       | 3 +++\n t/t3901-i18n-patch.sh                            | 3 +++\n t/t3903-stash.sh                                 | 3 +++\n t/t3910-mac-os-precompose.sh                     | 3 +++\n t/t4013-diff-various.sh                          | 3 +++\n t/t4014-format-patch.sh                          | 3 +++\n t/t4017-diff-retval.sh                           | 3 +++\n t/t4038-diff-combined.sh                         | 3 +++\n t/t4041-diff-submodule-option.sh                 | 3 +++\n t/t4048-diff-combined-binary.sh                  | 3 +++\n t/t4052-stat-output.sh                           | 3 +++\n t/t4056-diff-order.sh                            | 3 +++\n t/t4057-diff-combined-paths.sh                   | 3 +++\n t/t4061-diff-indent.sh                           | 3 +++\n t/t4066-diff-emit-delay.sh                       | 3 +++\n t/t4068-diff-symmetric-merge-base.sh             | 3 +++\n t/t4103-apply-binary.sh                          | 3 +++\n t/t4108-apply-threeway.sh                        | 3 +++\n t/t4121-apply-diffs.sh                           | 3 +++\n t/t4122-apply-symlink-inside.sh                  | 3 +++\n t/t4150-am.sh                                    | 3 +++\n t/t4200-rerere.sh                                | 3 +++\n t/t4201-shortlog.sh                              | 3 +++\n t/t4202-log.sh                                   | 3 +++\n t/t4203-mailmap.sh                               | 3 +++\n t/t4204-patch-id.sh                              | 3 +++\n t/t4207-log-decoration-colors.sh                 | 3 +++\n t/t4208-log-magic-pathspec.sh                    | 3 +++\n t/t4211-line-log.sh                              | 3 +++\n t/t4214-log-graph-octopus.sh                     | 3 +++\n t/t4216-log-bloom.sh                             | 3 +++\n t/t4253-am-keep-cr-dos.sh                        | 3 +++\n t/t5150-request-pull.sh                          | 3 +++\n t/t5304-prune.sh                                 | 3 +++\n t/t5305-include-tag.sh                           | 3 +++\n t/t5310-pack-bitmaps.sh                          | 3 +++\n t/t5312-prune-corruption.sh                      | 3 +++\n t/t5317-pack-objects-filter-objects.sh           | 3 +++\n t/t5322-pack-objects-sparse.sh                   | 3 +++\n t/t5400-send-pack.sh                             | 3 +++\n t/t5402-post-merge-hook.sh                       | 3 +++\n t/t5403-post-checkout-hook.sh                    | 3 +++\n t/t5404-tracking-branches.sh                     | 3 +++\n t/t5405-send-pack-rewind.sh                      | 3 +++\n t/t5407-post-rewrite-hook.sh                     | 3 +++\n t/t5410-receive-pack-alternates.sh               | 3 +++\n t/t5500-fetch-pack.sh                            | 3 +++\n t/t5501-fetch-push-alternates.sh                 | 3 +++\n t/t5502-quickfetch.sh                            | 3 +++\n t/t5503-tagfollow.sh                             | 3 +++\n t/t5504-fetch-receive-strict.sh                  | 3 +++\n t/t5505-remote.sh                                | 3 +++\n t/t5506-remote-groups.sh                         | 3 +++\n t/t5509-fetch-push-namespaces.sh                 | 3 +++\n t/t5510-fetch.sh                                 | 3 +++\n t/t5512-ls-remote.sh                             | 3 +++\n t/t5514-fetch-multiple.sh                        | 3 +++\n t/t5516-fetch-push.sh                            | 3 +++\n t/t5517-push-mirror.sh                           | 3 +++\n t/t5518-fetch-exit-status.sh                     | 3 +++\n t/t5519-push-alternates.sh                       | 3 +++\n t/t5520-pull.sh                                  | 3 +++\n t/t5521-pull-options.sh                          | 3 +++\n t/t5523-push-upstream.sh                         | 3 +++\n t/t5526-fetch-submodules.sh                      | 3 +++\n t/t5527-fetch-odd-refs.sh                        | 3 +++\n t/t5528-push-default.sh                          | 3 +++\n t/t5531-deep-submodule-push.sh                   | 3 +++\n t/t5533-push-cas.sh                              | 3 +++\n t/t5534-push-signed.sh                           | 3 +++\n t/t5537-fetch-shallow.sh                         | 3 +++\n t/t5538-push-shallow.sh                          | 3 +++\n t/t5539-fetch-http-shallow.sh                    | 3 +++\n t/t5540-http-push-webdav.sh                      | 3 +++\n t/t5541-http-push-smart.sh                       | 3 +++\n t/t5542-push-http-shallow.sh                     | 3 +++\n t/t5543-atomic-push.sh                           | 3 +++\n t/t5545-push-options.sh                          | 3 +++\n t/t5550-http-fetch-dumb.sh                       | 3 +++\n t/t5551-http-fetch-smart.sh                      | 3 +++\n t/t5553-set-upstream.sh                          | 3 +++\n t/t5560-http-backend-noserver.sh                 | 3 +++\n t/t5561-http-backend.sh                          | 3 +++\n t/t5570-git-daemon.sh                            | 3 +++\n t/t5571-pre-push-hook.sh                         | 3 +++\n t/t5580-unc-paths.sh                             | 3 +++\n t/t5581-http-curl-verbose.sh                     | 3 +++\n t/t5582-fetch-negative-refspec.sh                | 3 +++\n t/t5601-clone.sh                                 | 3 +++\n t/t5604-clone-reference.sh                       | 3 +++\n t/t5605-clone-local.sh                           | 3 +++\n t/t5606-clone-options.sh                         | 3 +++\n t/t5607-clone-bundle.sh                          | 3 +++\n t/t5609-clone-branch.sh                          | 3 +++\n t/t5610-clone-detached.sh                        | 3 +++\n t/t5611-clone-config.sh                          | 3 +++\n t/t5612-clone-refspec.sh                         | 3 +++\n t/t5616-partial-clone.sh                         | 3 +++\n t/t5617-clone-submodules-remote.sh               | 3 +++\n t/t5700-protocol-v1.sh                           | 3 +++\n t/t5701-git-serve.sh                             | 3 +++\n t/t5702-protocol-v2.sh                           | 3 +++\n t/t5703-upload-pack-ref-in-want.sh               | 3 +++\n t/t5801-remote-helpers.sh                        | 3 +++\n t/t6000-rev-list-misc.sh                         | 3 +++\n t/t6001-rev-list-graft.sh                        | 3 +++\n t/t6004-rev-list-path-optim.sh                   | 3 +++\n t/t6006-rev-list-format.sh                       | 3 +++\n t/t6007-rev-list-cherry-pick-file.sh             | 3 +++\n t/t6008-rev-list-submodule.sh                    | 3 +++\n t/t6009-rev-list-parent.sh                       | 3 +++\n t/t6012-rev-list-simplify.sh                     | 3 +++\n t/t6013-rev-list-reverse-parents.sh              | 3 +++\n t/t6016-rev-list-graph-simplify-history.sh       | 3 +++\n t/t6017-rev-list-stdin.sh                        | 3 +++\n t/t6018-rev-list-glob.sh                         | 3 +++\n t/t6019-rev-list-ancestry-path.sh                | 3 +++\n t/t6030-bisect-porcelain.sh                      | 3 +++\n t/t6040-tracking-info.sh                         | 3 +++\n t/t6050-replace.sh                               | 3 +++\n t/t6101-rev-parse-parents.sh                     | 3 +++\n t/t6110-rev-list-sparse.sh                       | 3 +++\n t/t6111-rev-list-treesame.sh                     | 3 +++\n t/t6112-rev-list-filters-objects.sh              | 3 +++\n t/t6120-describe.sh                              | 3 +++\n t/t6200-fmt-merge-msg.sh                         | 3 +++\n t/t6300-for-each-ref.sh                          | 3 +++\n t/t6302-for-each-ref-filter.sh                   | 3 +++\n t/t6400-merge-df.sh                              | 3 +++\n t/t6402-merge-rename.sh                          | 3 +++\n t/t6404-recursive-merge.sh                       | 3 +++\n t/t6405-merge-symlinks.sh                        | 3 +++\n t/t6406-merge-attr.sh                            | 3 +++\n t/t6407-merge-binary.sh                          | 3 +++\n t/t6409-merge-subtree.sh                         | 3 +++\n t/t6411-merge-filemode.sh                        | 3 +++\n t/t6412-merge-large-rename.sh                    | 3 +++\n t/t6413-merge-crlf.sh                            | 3 +++\n t/t6414-merge-rename-nocruft.sh                  | 3 +++\n t/t6415-merge-dir-to-symlink.sh                  | 3 +++\n t/t6416-recursive-corner-cases.sh                | 3 +++\n t/t6417-merge-ours-theirs.sh                     | 3 +++\n t/t6418-merge-text-auto.sh                       | 3 +++\n t/t6419-merge-ignorecase.sh                      | 3 +++\n t/t6422-merge-rename-corner-cases.sh             | 3 +++\n t/t6425-merge-rename-delete.sh                   | 3 +++\n t/t6427-diff3-conflict-markers.sh                | 3 +++\n t/t6430-merge-recursive.sh                       | 3 +++\n t/t6432-merge-recursive-space-options.sh         | 3 +++\n t/t6433-merge-toplevel.sh                        | 3 +++\n t/t6434-merge-recursive-rename-options.sh        | 3 +++\n t/t6436-merge-overwrite.sh                       | 3 +++\n t/t6437-submodule-merge.sh                       | 3 +++\n t/t6439-merge-co-error-msgs.sh                   | 3 +++\n t/t6501-freshen-objects.sh                       | 3 +++\n t/t7003-filter-branch.sh                         | 3 +++\n t/t7004-tag.sh                                   | 3 +++\n t/t7030-verify-tag.sh                            | 3 +++\n t/t7060-wtstatus.sh                              | 3 +++\n t/t7063-status-untracked-cache.sh                | 3 +++\n t/t7064-wtstatus-pv2.sh                          | 3 +++\n t/t7102-reset.sh                                 | 3 +++\n t/t7113-post-index-change-hook.sh                | 3 +++\n t/t7201-co.sh                                    | 3 +++\n t/t7400-submodule-basic.sh                       | 3 +++\n t/t7403-submodule-sync.sh                        | 3 +++\n t/t7406-submodule-update.sh                      | 3 +++\n t/t7407-submodule-foreach.sh                     | 3 +++\n t/t7409-submodule-detached-work-tree.sh          | 3 +++\n t/t7417-submodule-path-url.sh                    | 3 +++\n t/t7501-commit-basic-functionality.sh            | 3 +++\n t/t7502-commit-porcelain.sh                      | 3 +++\n t/t7503-pre-commit-and-pre-merge-commit-hooks.sh | 3 +++\n t/t7504-commit-msg-hook.sh                       | 3 +++\n t/t7505-prepare-commit-msg-hook.sh               | 3 +++\n t/t7510-signed-commit.sh                         | 3 +++\n t/t7512-status-help.sh                           | 3 +++\n t/t7517-per-repo-email.sh                        | 3 +++\n t/t7600-merge.sh                                 | 3 +++\n t/t7608-merge-messages.sh                        | 3 +++\n t/t7610-mergetool.sh                             | 3 +++\n t/t7611-merge-abort.sh                           | 3 +++\n t/t7612-merge-verify-signatures.sh               | 3 +++\n t/t7614-merge-signoff.sh                         | 3 +++\n t/t7701-repack-unpack-unreachable.sh             | 3 +++\n t/t7800-difftool.sh                              | 3 +++\n t/t7810-grep.sh                                  | 3 +++\n t/t8001-annotate.sh                              | 3 +++\n t/t8002-blame.sh                                 | 3 +++\n t/t8003-blame-corner-cases.sh                    | 3 +++\n t/t8004-blame-with-conflicts.sh                  | 3 +++\n t/t8012-blame-colors.sh                          | 3 +++\n t/t9001-send-email.sh                            | 3 +++\n t/t9100-git-svn-basic.sh                         | 3 +++\n t/t9145-git-svn-master-branch.sh                 | 3 +++\n t/t9151-svn-mergeinfo.sh                         | 3 +++\n t/t9155-git-svn-fetch-deleted-tag.sh             | 3 +++\n t/t9156-git-svn-fetch-deleted-tag-2.sh           | 3 +++\n t/t9163-git-svn-reset-clears-caches.sh           | 3 +++\n t/t9169-git-svn-dcommit-crlf.sh                  | 3 +++\n t/t9300-fast-import.sh                           | 3 +++\n t/t9301-fast-import-notes.sh                     | 3 +++\n t/t9350-fast-export.sh                           | 3 +++\n t/t9351-fast-export-anonymize.sh                 | 3 +++\n t/t9400-git-cvsserver-server.sh                  | 3 +++\n t/t9401-git-cvsserver-crlf.sh                    | 3 +++\n t/t9402-git-cvsserver-refs.sh                    | 3 +++\n t/t9500-gitweb-standalone-no-errors.sh           | 3 +++\n t/t9501-gitweb-standalone-http-status.sh         | 3 +++\n t/t9502-gitweb-standalone-parse-output.sh        | 3 +++\n t/t9600-cvsimport.sh                             | 3 +++\n t/t9601-cvsimport-vendor-branch.sh               | 3 +++\n t/t9602-cvsimport-branches-tags.sh               | 3 +++\n t/t9603-cvsimport-patchsets.sh                   | 3 +++\n t/t9800-git-p4-basic.sh                          | 3 +++\n t/t9801-git-p4-branch.sh                         | 3 +++\n t/t9806-git-p4-options.sh                        | 3 +++\n t/t9807-git-p4-submit.sh                         | 3 +++\n t/t9811-git-p4-label-import.sh                   | 3 +++\n t/t9902-completion.sh                            | 3 +++\n t/t9903-bash-prompt.sh                           | 3 +++\n 325 files changed, 974 insertions(+)\n\ndiff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh\nindex 6c27b886b8..50e0b90073 100755\n--- a/ci/run-build-and-tests.sh\n+++ b/ci/run-build-and-tests.sh\n@@ -13,6 +13,7 @@ esac\n make\n case \"$jobname\" in\n linux-gcc)\n+\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \tmake test\n \texport GIT_TEST_SPLIT_INDEX=yes\n \texport GIT_TEST_FULL_IN_PACK_ARRAY=true\n@@ -22,6 +23,7 @@ linux-gcc)\n \texport GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS=1\n \texport GIT_TEST_MULTI_PACK_INDEX=1\n \texport GIT_TEST_ADD_I_USE_BUILTIN=1\n+\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n \tmake test\n \t;;\n linux-clang)\ndiff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh\nindex 960ed150cb..0a396c95e5 100755\n--- a/t/t0002-gitfile.sh\n+++ b/t/t0002-gitfile.sh\n@@ -4,6 +4,9 @@ test_description='.git file\n \n Verify that plumbing commands work when .git is a file\n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n objpath() {\ndiff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh\nindex b63ba62e5d..0d43189048 100755\n--- a/t/t0020-crlf.sh\n+++ b/t/t0020-crlf.sh\n@@ -2,6 +2,9 @@\n \n test_description='CRLF conversion'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n has_cr() {\ndiff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh\nindex f6deaf498b..adf862aef1 100755\n--- a/t/t0021-conversion.sh\n+++ b/t/t0021-conversion.sh\n@@ -2,6 +2,9 @@\n \n test_description='blob conversion via gitattributes'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n TEST_ROOT=\"$PWD\"\ndiff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh\nindex bfc4fb9af5..ccdc91c41c 100755\n--- a/t/t0028-working-tree-encoding.sh\n+++ b/t/t0028-working-tree-encoding.sh\n@@ -2,6 +2,9 @@\n \n test_description='working-tree-encoding conversion via gitattributes'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n GIT_TRACE_WORKING_TREE_ENCODING=1 && export GIT_TRACE_WORKING_TREE_ENCODING\ndiff --git a/t/t0041-usage.sh b/t/t0041-usage.sh\nindex 5b927b76fe..068b784e72 100755\n--- a/t/t0041-usage.sh\n+++ b/t/t0041-usage.sh\n@@ -2,6 +2,9 @@\n \n test_description='Test commands behavior when given invalid argument value'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup ' '\ndiff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh\nindex 608673fb77..368f7d515b 100755\n--- a/t/t0050-filesystem.sh\n+++ b/t/t0050-filesystem.sh\n@@ -2,6 +2,9 @@\n \n test_description='Various filesystem issues'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n auml=$(printf '\\303\\244')\ndiff --git a/t/t0100-previous.sh b/t/t0100-previous.sh\nindex 58c0b7e9b6..c3c2770ab3 100755\n--- a/t/t0100-previous.sh\n+++ b/t/t0100-previous.sh\n@@ -2,6 +2,9 @@\n \n test_description='previous branch syntax @{-n}'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'branch -d @{-1}' '\ndiff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh\nindex 181956b241..57caa3a73f 100755\n--- a/t/t1004-read-tree-m-u-wf.sh\n+++ b/t/t1004-read-tree-m-u-wf.sh\n@@ -2,6 +2,9 @@\n \n test_description='read-tree -m -u checks working tree files'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-read-tree.sh\n \ndiff --git a/t/t1008-read-tree-overlay.sh b/t/t1008-read-tree-overlay.sh\nindex cf96016844..edb89447c7 100755\n--- a/t/t1008-read-tree-overlay.sh\n+++ b/t/t1008-read-tree-overlay.sh\n@@ -2,6 +2,9 @@\n \n test_description='test multi-tree read-tree without merging'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-read-tree.sh\n \ndiff --git a/t/t1009-read-tree-new-index.sh b/t/t1009-read-tree-new-index.sh\nindex 59b3aa4bc4..b9bab37ac0 100755\n--- a/t/t1009-read-tree-new-index.sh\n+++ b/t/t1009-read-tree-new-index.sh\n@@ -2,6 +2,9 @@\n \n test_description='test read-tree into a fresh index file'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t1021-rerere-in-workdir.sh b/t/t1021-rerere-in-workdir.sh\nindex 301e071ff7..9177871c99 100755\n--- a/t/t1021-rerere-in-workdir.sh\n+++ b/t/t1021-rerere-in-workdir.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='rerere run in a workdir'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success SYMLINKS setup '\ndiff --git a/t/t1090-sparse-checkout-scope.sh b/t/t1090-sparse-checkout-scope.sh\nindex f35a73dd20..d731322633 100755\n--- a/t/t1090-sparse-checkout-scope.sh\n+++ b/t/t1090-sparse-checkout-scope.sh\n@@ -2,6 +2,9 @@\n \n test_description='sparse checkout scope tests'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh\nindex 84acfc48b6..25e68ca036 100755\n--- a/t/t1091-sparse-checkout-builtin.sh\n+++ b/t/t1091-sparse-checkout-builtin.sh\n@@ -2,6 +2,9 @@\n \n test_description='sparse checkout builtin tests'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n list_files() {\ndiff --git a/t/t1300-config.sh b/t/t1300-config.sh\nindex 825d9a184f..67e201b5c1 100755\n--- a/t/t1300-config.sh\n+++ b/t/t1300-config.sh\n@@ -5,6 +5,9 @@\n \n test_description='Test git config in different settings'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'clear default config' '\ndiff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh\nindex 2dc853d1be..c573438f98 100755\n--- a/t/t1301-shared-repo.sh\n+++ b/t/t1301-shared-repo.sh\n@@ -5,6 +5,9 @@\n \n test_description='Test shared repository initialization'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # Remove a default ACL from the test dir if possible.\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex 4c01e08551..4ae6f50c02 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -4,6 +4,9 @@\n #\n \n test_description='Test git update-ref and basic ref logging'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n Z=$ZERO_OID\ndiff --git a/t/t1403-show-ref.sh b/t/t1403-show-ref.sh\nindex 5d955c3bff..aaf32f3b07 100755\n--- a/t/t1403-show-ref.sh\n+++ b/t/t1403-show-ref.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='show-ref'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh\nindex 74af927fba..531059b871 100755\n--- a/t/t1405-main-ref-store.sh\n+++ b/t/t1405-main-ref-store.sh\n@@ -2,6 +2,9 @@\n \n test_description='test main ref store api'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n RUN=\"test-tool ref-store main\"\ndiff --git a/t/t1406-submodule-ref-store.sh b/t/t1406-submodule-ref-store.sh\nindex 36b7ef5046..126518c155 100755\n--- a/t/t1406-submodule-ref-store.sh\n+++ b/t/t1406-submodule-ref-store.sh\n@@ -2,6 +2,9 @@\n \n test_description='test submodule ref store api'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n RUN=\"test-tool ref-store submodule:sub\"\ndiff --git a/t/t1407-worktree-ref-store.sh b/t/t1407-worktree-ref-store.sh\nindex 9a84858118..aede1c20d7 100755\n--- a/t/t1407-worktree-ref-store.sh\n+++ b/t/t1407-worktree-ref-store.sh\n@@ -2,6 +2,9 @@\n \n test_description='test worktree ref store api'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n RWT=\"test-tool ref-store worktree:wt\"\ndiff --git a/t/t1408-packed-refs.sh b/t/t1408-packed-refs.sh\nindex 1e44a17eea..fd58388232 100755\n--- a/t/t1408-packed-refs.sh\n+++ b/t/t1408-packed-refs.sh\n@@ -2,6 +2,9 @@\n \n test_description='packed-refs entries are covered by loose refs'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh\nindex 730a43d9dd..aa02ca488d 100755\n--- a/t/t1410-reflog.sh\n+++ b/t/t1410-reflog.sh\n@@ -4,6 +4,9 @@\n #\n \n test_description='Test prune and reflog expiration'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n check_have () {\ndiff --git a/t/t1411-reflog-show.sh b/t/t1411-reflog-show.sh\nindex 985daf1def..f6fecff671 100755\n--- a/t/t1411-reflog-show.sh\n+++ b/t/t1411-reflog-show.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='Test reflog display routines'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t1413-reflog-detach.sh b/t/t1413-reflog-detach.sh\nindex c730600d8a..140914aa29 100755\n--- a/t/t1413-reflog-detach.sh\n+++ b/t/t1413-reflog-detach.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='Test reflog interaction with detached HEAD'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n reset_state () {\ndiff --git a/t/t1414-reflog-walk.sh b/t/t1414-reflog-walk.sh\nindex 1181a9fb28..c463b5fc29 100755\n--- a/t/t1414-reflog-walk.sh\n+++ b/t/t1414-reflog-walk.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='various tests of reflog walk (log -g) behavior'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'set up some reflog entries' '\ndiff --git a/t/t1416-ref-transaction-hooks.sh b/t/t1416-ref-transaction-hooks.sh\nindex f6e741c6c0..a26a6b782d 100755\n--- a/t/t1416-ref-transaction-hooks.sh\n+++ b/t/t1416-ref-transaction-hooks.sh\n@@ -2,6 +2,9 @@\n \n test_description='reference transaction hooks'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t1430-bad-ref-name.sh b/t/t1430-bad-ref-name.sh\nindex c7878a60ed..8c4353746b 100755\n--- a/t/t1430-bad-ref-name.sh\n+++ b/t/t1430-bad-ref-name.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='Test handling of ref names that check-ref-format rejects'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh\nindex 408b97d5af..d23da4e8de 100755\n--- a/t/t1500-rev-parse.sh\n+++ b/t/t1500-rev-parse.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test git rev-parse'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # usage: [options] label is-bare is-inside-git is-inside-work prefix git-dir absolute-git-dir\ndiff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh\nindex dc9fe3cbf1..e4343c49b2 100755\n--- a/t/t1503-rev-parse-verify.sh\n+++ b/t/t1503-rev-parse-verify.sh\n@@ -6,6 +6,9 @@ test_description='test git rev-parse --verify'\n \n exec </dev/null\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n add_line_into_file()\ndiff --git a/t/t1505-rev-parse-last.sh b/t/t1505-rev-parse-last.sh\nindex 4969edb314..9bd0307b5d 100755\n--- a/t/t1505-rev-parse-last.sh\n+++ b/t/t1505-rev-parse-last.sh\n@@ -2,6 +2,9 @@\n \n test_description='test @{-N} syntax'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n \ndiff --git a/t/t1506-rev-parse-diagnosis.sh b/t/t1506-rev-parse-diagnosis.sh\nindex e2ae15a2cf..694d74fc01 100755\n--- a/t/t1506-rev-parse-diagnosis.sh\n+++ b/t/t1506-rev-parse-diagnosis.sh\n@@ -4,6 +4,9 @@ test_description='test git rev-parse diagnosis for invalid argument'\n \n exec </dev/null\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_did_you_mean ()\ndiff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh\nindex dfc0d96d8a..521233a3c3 100755\n--- a/t/t1507-rev-parse-upstream.sh\n+++ b/t/t1507-rev-parse-upstream.sh\n@@ -2,6 +2,9 @@\n \n test_description='test <branch>@{upstream} syntax'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n \ndiff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh\nindex 4a9964e9dc..8e73633761 100755\n--- a/t/t1508-at-combinations.sh\n+++ b/t/t1508-at-combinations.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test various @{X} syntax combinations together'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n check() {\ndiff --git a/t/t1511-rev-parse-caret.sh b/t/t1511-rev-parse-caret.sh\nindex e0a49a651f..cfb2ea5e04 100755\n--- a/t/t1511-rev-parse-caret.sh\n+++ b/t/t1511-rev-parse-caret.sh\n@@ -2,6 +2,9 @@\n \n test_description='tests for ref^{stuff}'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t1512-rev-parse-disambiguation.sh b/t/t1512-rev-parse-disambiguation.sh\nindex 18fa6cf40d..2ef1f2b7e8 100755\n--- a/t/t1512-rev-parse-disambiguation.sh\n+++ b/t/t1512-rev-parse-disambiguation.sh\n@@ -20,6 +20,9 @@ one tagged as v1.0.0.  They all have one regular file each.\n \n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n if ! test_have_prereq SHA1\ndiff --git a/t/t1513-rev-parse-prefix.sh b/t/t1513-rev-parse-prefix.sh\nindex 87ec3ae714..d151ef9218 100755\n--- a/t/t1513-rev-parse-prefix.sh\n+++ b/t/t1513-rev-parse-prefix.sh\n@@ -2,6 +2,9 @@\n \n test_description='Tests for rev-parse --prefix'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t1514-rev-parse-push.sh b/t/t1514-rev-parse-push.sh\nindex 788cc91e45..173ba2792b 100755\n--- a/t/t1514-rev-parse-push.sh\n+++ b/t/t1514-rev-parse-push.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test <branch>@{push} syntax'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n resolve () {\ndiff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh\nindex 12a5568844..7d4a6f1e93 100755\n--- a/t/t1700-split-index.sh\n+++ b/t/t1700-split-index.sh\n@@ -2,6 +2,9 @@\n \n test_description='split index mode tests'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # We need total control of index splitting here\ndiff --git a/t/t2007-checkout-symlink.sh b/t/t2007-checkout-symlink.sh\nindex fc9aad530e..8879a78b85 100755\n--- a/t/t2007-checkout-symlink.sh\n+++ b/t/t2007-checkout-symlink.sh\n@@ -4,6 +4,9 @@\n \n test_description='git checkout to switch between branches with symlink<->dir'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t2009-checkout-statinfo.sh b/t/t2009-checkout-statinfo.sh\nindex f3c2152087..9af4d6ca5e 100755\n--- a/t/t2009-checkout-statinfo.sh\n+++ b/t/t2009-checkout-statinfo.sh\n@@ -2,6 +2,9 @@\n \n test_description='checkout should leave clean stat info'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t2010-checkout-ambiguous.sh b/t/t2010-checkout-ambiguous.sh\nindex 2e47fe01cf..3f5431e033 100755\n--- a/t/t2010-checkout-ambiguous.sh\n+++ b/t/t2010-checkout-ambiguous.sh\n@@ -2,6 +2,9 @@\n \n test_description='checkout and pathspecs/refspecs ambiguities'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t2011-checkout-invalid-head.sh b/t/t2011-checkout-invalid-head.sh\nindex 0e8d56aa76..fede33ff1f 100755\n--- a/t/t2011-checkout-invalid-head.sh\n+++ b/t/t2011-checkout-invalid-head.sh\n@@ -2,6 +2,9 @@\n \n test_description='checkout switching away from an invalid branch'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t2012-checkout-last.sh b/t/t2012-checkout-last.sh\nindex e7ba8c505f..16bf19f7ee 100755\n--- a/t/t2012-checkout-last.sh\n+++ b/t/t2012-checkout-last.sh\n@@ -2,6 +2,9 @@\n \n test_description='checkout can switch to last branch and merge base'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t2015-checkout-unborn.sh b/t/t2015-checkout-unborn.sh\nindex 37bdcedcc9..669a70c76f 100755\n--- a/t/t2015-checkout-unborn.sh\n+++ b/t/t2015-checkout-unborn.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='checkout from unborn branch'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t2017-checkout-orphan.sh b/t/t2017-checkout-orphan.sh\nindex 655f278c5f..999e976c62 100755\n--- a/t/t2017-checkout-orphan.sh\n+++ b/t/t2017-checkout-orphan.sh\n@@ -7,6 +7,9 @@ test_description='git checkout --orphan\n \n Main Tests for --orphan functionality.'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n TEST_FILE=foo\ndiff --git a/t/t2020-checkout-detach.sh b/t/t2020-checkout-detach.sh\nindex b748db9946..45d87c23b1 100755\n--- a/t/t2020-checkout-detach.sh\n+++ b/t/t2020-checkout-detach.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='checkout into detached HEAD state'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n check_detached () {\ndiff --git a/t/t2022-checkout-paths.sh b/t/t2022-checkout-paths.sh\nindex 6844afafc0..fc0f5b775c 100755\n--- a/t/t2022-checkout-paths.sh\n+++ b/t/t2022-checkout-paths.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='checkout $tree -- $paths'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t2023-checkout-m.sh b/t/t2023-checkout-m.sh\nindex fca3f85824..f2f4f5b3ac 100755\n--- a/t/t2023-checkout-m.sh\n+++ b/t/t2023-checkout-m.sh\n@@ -4,6 +4,9 @@ test_description='checkout -m -- <conflicted path>\n \n Ensures that checkout -m on a resolved file restores the conflicted file'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t2027-checkout-track.sh b/t/t2027-checkout-track.sh\nindex bcba1bf90c..4e1419ca98 100755\n--- a/t/t2027-checkout-track.sh\n+++ b/t/t2027-checkout-track.sh\n@@ -2,6 +2,9 @@\n \n test_description='tests for git branch --track'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t2030-unresolve-info.sh b/t/t2030-unresolve-info.sh\nindex 309199bca2..3fe29fc3ee 100755\n--- a/t/t2030-unresolve-info.sh\n+++ b/t/t2030-unresolve-info.sh\n@@ -2,6 +2,9 @@\n \n test_description='undoing resolution'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n check_resolve_undo () {\ndiff --git a/t/t2060-switch.sh b/t/t2060-switch.sh\nindex 68c9101b02..4de9299705 100755\n--- a/t/t2060-switch.sh\n+++ b/t/t2060-switch.sh\n@@ -2,6 +2,9 @@\n \n test_description='switch basic functionality'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t2070-restore.sh b/t/t2070-restore.sh\nindex 89e5a142c9..6941769c9a 100755\n--- a/t/t2070-restore.sh\n+++ b/t/t2070-restore.sh\n@@ -2,6 +2,9 @@\n \n test_description='restore basic functionality'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh\nindex 5a7495474a..35cef266e9 100755\n--- a/t/t2400-worktree-add.sh\n+++ b/t/t2400-worktree-add.sh\n@@ -2,6 +2,9 @@\n \n test_description='test git worktree add'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n . \"$TEST_DIRECTORY\"/lib-rebase.sh\ndiff --git a/t/t2401-worktree-prune.sh b/t/t2401-worktree-prune.sh\nindex a6ce7f590b..e6fc27de1e 100755\n--- a/t/t2401-worktree-prune.sh\n+++ b/t/t2401-worktree-prune.sh\n@@ -2,6 +2,9 @@\n \n test_description='prune $GIT_DIR/worktrees'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success initialize '\ndiff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh\nindex 795ddca2e4..3b23b0fdb7 100755\n--- a/t/t2402-worktree-list.sh\n+++ b/t/t2402-worktree-list.sh\n@@ -2,6 +2,9 @@\n \n test_description='test git worktree list'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t2405-worktree-submodule.sh b/t/t2405-worktree-submodule.sh\nindex e1b2bfd87e..cca2aea658 100755\n--- a/t/t2405-worktree-submodule.sh\n+++ b/t/t2405-worktree-submodule.sh\n@@ -2,6 +2,9 @@\n \n test_description='Combination of submodules and multiple worktrees'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n base_path=$(pwd -P)\ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex a0b832d59e..04b568cf21 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -5,6 +5,9 @@\n \n test_description='git branch assorted tests'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-rebase.sh\n \ndiff --git a/t/t3201-branch-contains.sh b/t/t3201-branch-contains.sh\nindex 3733cd0091..532cdbe9ae 100755\n--- a/t/t3201-branch-contains.sh\n+++ b/t/t3201-branch-contains.sh\n@@ -2,6 +2,9 @@\n \n test_description='branch --contains <commit>, --no-contains <commit> --merged, and --no-merged'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t3202-show-branch-octopus.sh b/t/t3202-show-branch-octopus.sh\nindex 6adf47869c..bbf7129dd8 100755\n--- a/t/t3202-show-branch-octopus.sh\n+++ b/t/t3202-show-branch-octopus.sh\n@@ -2,6 +2,9 @@\n \n test_description='test show-branch with more than 8 heads'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n numbers=\"1 2 3 4 5 6 7 8 9 10\"\ndiff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh\nindex d65586541d..a2144dd8e5 100755\n--- a/t/t3203-branch-output.sh\n+++ b/t/t3203-branch-output.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='git branch display tests'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-terminal.sh\n \ndiff --git a/t/t3204-branch-name-interpretation.sh b/t/t3204-branch-name-interpretation.sh\nindex 698d9cc4f3..dd315ebf04 100755\n--- a/t/t3204-branch-name-interpretation.sh\n+++ b/t/t3204-branch-name-interpretation.sh\n@@ -6,6 +6,9 @@ Branch name arguments are usually names which are taken to be inside of\n refs/heads/, but we interpret some magic syntax like @{-1}, @{upstream}, etc.\n This script aims to check the behavior of those corner cases.\n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n expect_branch() {\ndiff --git a/t/t3205-branch-color.sh b/t/t3205-branch-color.sh\nindex 289625c464..8b54a9252b 100755\n--- a/t/t3205-branch-color.sh\n+++ b/t/t3205-branch-color.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='basic branch output coloring'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'set up some sample branches' '\ndiff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh\nindex 6eb344be03..3813ddc85e 100755\n--- a/t/t3206-range-diff.sh\n+++ b/t/t3206-range-diff.sh\n@@ -2,6 +2,9 @@\n \n test_description='range-diff tests'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # Note that because of the range-diff's heuristics, test_commit does more\ndiff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh\nindex f41b2afb99..90eea19564 100755\n--- a/t/t3210-pack-refs.sh\n+++ b/t/t3210-pack-refs.sh\n@@ -9,6 +9,9 @@ test_description='git pack-refs should not change the branch semantic\n This test runs git pack-refs and git show-ref and checks that the branch\n semantic is still the same.\n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'enable reflogs' '\ndiff --git a/t/t3211-peel-ref.sh b/t/t3211-peel-ref.sh\nindex 3b7caca421..f3d9c6b6b6 100755\n--- a/t/t3211-peel-ref.sh\n+++ b/t/t3211-peel-ref.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='tests for the peel_ref optimization of packed-refs'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'create annotated tag in refs/tags' '\ndiff --git a/t/t3302-notes-index-expensive.sh b/t/t3302-notes-index-expensive.sh\nindex 7217c5e222..1564befe00 100755\n--- a/t/t3302-notes-index-expensive.sh\n+++ b/t/t3302-notes-index-expensive.sh\n@@ -5,6 +5,9 @@\n \n test_description='Test commit notes index (expensive!)'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n create_repo () {\ndiff --git a/t/t3303-notes-subtrees.sh b/t/t3303-notes-subtrees.sh\nindex 704aee81ef..16f3438355 100755\n--- a/t/t3303-notes-subtrees.sh\n+++ b/t/t3303-notes-subtrees.sh\n@@ -2,6 +2,9 @@\n \n test_description='Test commit notes organized in subtrees'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n number_of_commits=100\ndiff --git a/t/t3304-notes-mixed.sh b/t/t3304-notes-mixed.sh\nindex 1709e8c00b..6a7b8e2829 100755\n--- a/t/t3304-notes-mixed.sh\n+++ b/t/t3304-notes-mixed.sh\n@@ -2,6 +2,9 @@\n \n test_description='Test notes trees that also contain non-notes'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n number_of_commits=100\ndiff --git a/t/t3320-notes-merge-worktrees.sh b/t/t3320-notes-merge-worktrees.sh\nindex 823fdbda1f..f86975414c 100755\n--- a/t/t3320-notes-merge-worktrees.sh\n+++ b/t/t3320-notes-merge-worktrees.sh\n@@ -5,6 +5,9 @@\n \n test_description='Test merging of notes trees in multiple worktrees'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup commit' '\ndiff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\nindex 40d2975995..61577591d0 100755\n--- a/t/t3400-rebase.sh\n+++ b/t/t3400-rebase.sh\n@@ -8,6 +8,9 @@ test_description='git rebase assorted tests\n This test runs git rebase and checks that the author information is not lost\n among other things.\n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n GIT_AUTHOR_NAME=author@name\ndiff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh\nindex 6e032716a6..d79a11b686 100755\n--- a/t/t3402-rebase-merge.sh\n+++ b/t/t3402-rebase-merge.sh\n@@ -5,6 +5,9 @@\n \n test_description='git rebase --merge test'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n T=\"A quick brown fox\ndiff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh\nindex a927774910..c9936cb1d9 100755\n--- a/t/t3403-rebase-skip.sh\n+++ b/t/t3403-rebase-skip.sh\n@@ -5,6 +5,9 @@\n \n test_description='git rebase --merge --skip tests'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n . \"$TEST_DIRECTORY\"/lib-rebase.sh\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex 1e56696e4f..9c91524e12 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -25,6 +25,9 @@ Initial setup:\n  where A, B, D and G all touch file1, and one, two, three, four all\n  touch file \"conflict\".\n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n . \"$TEST_DIRECTORY\"/lib-rebase.sh\ndiff --git a/t/t3405-rebase-malformed.sh b/t/t3405-rebase-malformed.sh\nindex 860e63e444..d8f6d2e3cb 100755\n--- a/t/t3405-rebase-malformed.sh\n+++ b/t/t3405-rebase-malformed.sh\n@@ -2,6 +2,9 @@\n \n test_description='rebase should handle arbitrary git message'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-rebase.sh\n \ndiff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh\nindex 4afc528165..863db3ac4c 100755\n--- a/t/t3406-rebase-message.sh\n+++ b/t/t3406-rebase-message.sh\n@@ -2,6 +2,9 @@\n \n test_description='messages from rebase operation'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t3407-rebase-abort.sh b/t/t3407-rebase-abort.sh\nindex 97efea0f56..e3c1851f40 100755\n--- a/t/t3407-rebase-abort.sh\n+++ b/t/t3407-rebase-abort.sh\n@@ -2,6 +2,9 @@\n \n test_description='git rebase --abort tests'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n ### Test that we handle space characters properly\ndiff --git a/t/t3408-rebase-multi-line.sh b/t/t3408-rebase-multi-line.sh\nindex d2bd7c17b0..6dd56c4c15 100755\n--- a/t/t3408-rebase-multi-line.sh\n+++ b/t/t3408-rebase-multi-line.sh\n@@ -2,6 +2,9 @@\n \n test_description='rebasing a commit with multi-line first paragraph.'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t3409-rebase-preserve-merges.sh b/t/t3409-rebase-preserve-merges.sh\nindex 3b340f1ece..609efc96f9 100755\n--- a/t/t3409-rebase-preserve-merges.sh\n+++ b/t/t3409-rebase-preserve-merges.sh\n@@ -6,6 +6,9 @@ test_description='git rebase -p should preserve merges\n \n Run \"git rebase -p\" and check that merges are properly carried along\n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n if ! test_have_prereq REBASE_P; then\ndiff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh\nindex 21632a984e..07597643c5 100755\n--- a/t/t3412-rebase-root.sh\n+++ b/t/t3412-rebase-root.sh\n@@ -4,6 +4,9 @@ test_description='git rebase --root\n \n Tests if git rebase --root --onto <newparent> can rebase the root commit.\n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n log_with_names () {\ndiff --git a/t/t3413-rebase-hook.sh b/t/t3413-rebase-hook.sh\nindex b6833e9a5f..86a1b82d65 100755\n--- a/t/t3413-rebase-hook.sh\n+++ b/t/t3413-rebase-hook.sh\n@@ -2,6 +2,9 @@\n \n test_description='git rebase with its hook(s)'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh\nindex 7bab6000dc..35eb8e2bb2 100755\n--- a/t/t3415-rebase-autosquash.sh\n+++ b/t/t3415-rebase-autosquash.sh\n@@ -2,6 +2,9 @@\n \n test_description='auto squash'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n . \"$TEST_DIRECTORY\"/lib-rebase.sh\ndiff --git a/t/t3416-rebase-onto-threedots.sh b/t/t3416-rebase-onto-threedots.sh\nindex 9c2548423b..0f5b814aaf 100755\n--- a/t/t3416-rebase-onto-threedots.sh\n+++ b/t/t3416-rebase-onto-threedots.sh\n@@ -2,6 +2,9 @@\n \n test_description='git rebase --onto A...B'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY/lib-rebase.sh\"\n \ndiff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh\nindex 7a2da972fd..445cb843ba 100755\n--- a/t/t3418-rebase-continue.sh\n+++ b/t/t3418-rebase-continue.sh\n@@ -2,6 +2,9 @@\n \n test_description='git rebase --continue tests'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n . \"$TEST_DIRECTORY\"/lib-rebase.sh\ndiff --git a/t/t3419-rebase-patch-id.sh b/t/t3419-rebase-patch-id.sh\nindex 1f32faa4a4..c5fe58d68b 100755\n--- a/t/t3419-rebase-patch-id.sh\n+++ b/t/t3419-rebase-patch-id.sh\n@@ -2,6 +2,9 @@\n \n test_description='git rebase - test patch id computation'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n scramble () {\ndiff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh\nindex ca331733fb..95facc49aa 100755\n--- a/t/t3420-rebase-autostash.sh\n+++ b/t/t3420-rebase-autostash.sh\n@@ -4,6 +4,9 @@\n #\n \n test_description='git rebase --autostash tests'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t3427-rebase-subtree.sh b/t/t3427-rebase-subtree.sh\nindex 5839719ba1..254ed18452 100755\n--- a/t/t3427-rebase-subtree.sh\n+++ b/t/t3427-rebase-subtree.sh\n@@ -4,6 +4,9 @@ test_description='git rebase tests for -Xsubtree\n \n This test runs git rebase and tests the subtree strategy.\n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-rebase.sh\n \ndiff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh\nindex b454f400eb..22d929bd31 100755\n--- a/t/t3430-rebase-merges.sh\n+++ b/t/t3430-rebase-merges.sh\n@@ -18,6 +18,9 @@ Initial setup:\n      \\\n       Conflicting-G\n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-rebase.sh\n . \"$TEST_DIRECTORY\"/lib-log-graph.sh\ndiff --git a/t/t3431-rebase-fork-point.sh b/t/t3431-rebase-fork-point.sh\nindex 172562789e..af862e5bcc 100755\n--- a/t/t3431-rebase-fork-point.sh\n+++ b/t/t3431-rebase-fork-point.sh\n@@ -5,6 +5,9 @@\n \n test_description='git rebase --fork-point test'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # A---B---D---E    (master)\ndiff --git a/t/t3432-rebase-fast-forward.sh b/t/t3432-rebase-fast-forward.sh\nindex a29eda87e9..112a18d630 100755\n--- a/t/t3432-rebase-fast-forward.sh\n+++ b/t/t3432-rebase-fast-forward.sh\n@@ -5,6 +5,9 @@\n \n test_description='ensure rebase fast-forwards commits when possible'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t3434-rebase-i18n.sh b/t/t3434-rebase-i18n.sh\nindex c7c835cde9..26fd33cbed 100755\n--- a/t/t3434-rebase-i18n.sh\n+++ b/t/t3434-rebase-i18n.sh\n@@ -14,6 +14,9 @@ Initial setup:\n     5 - 6          second\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n compare_msg () {\ndiff --git a/t/t3435-rebase-gpg-sign.sh b/t/t3435-rebase-gpg-sign.sh\nindex 54120b09d6..d169bc511d 100755\n--- a/t/t3435-rebase-gpg-sign.sh\n+++ b/t/t3435-rebase-gpg-sign.sh\n@@ -5,6 +5,9 @@\n \n test_description='test rebase --[no-]gpg-sign'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY/lib-rebase.sh\"\n . \"$TEST_DIRECTORY/lib-gpg.sh\"\ndiff --git a/t/t3500-cherry.sh b/t/t3500-cherry.sh\nindex 2b8d9cb38e..99905dd49a 100755\n--- a/t/t3500-cherry.sh\n+++ b/t/t3500-cherry.sh\n@@ -8,6 +8,9 @@ test_description='git cherry should detect patches integrated upstream\n This test cherry-picks one local change of two into master branch, and\n checks that git cherry only returns the second patch in the local branch\n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n GIT_AUTHOR_EMAIL=bogus_email_address\ndiff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh\nindex 3669dfb1be..6a10714e22 100755\n--- a/t/t3501-revert-cherry-pick.sh\n+++ b/t/t3501-revert-cherry-pick.sh\n@@ -10,6 +10,9 @@ test_description='test cherry-pick and revert with renames\n \n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t3502-cherry-pick-merge.sh b/t/t3502-cherry-pick-merge.sh\nindex 8b635a196d..774ad9ce14 100755\n--- a/t/t3502-cherry-pick-merge.sh\n+++ b/t/t3502-cherry-pick-merge.sh\n@@ -8,6 +8,9 @@ test_description='cherry picking and reverting a merge\n \n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t3503-cherry-pick-root.sh b/t/t3503-cherry-pick-root.sh\nindex e27f39d1e5..00c622d5dc 100755\n--- a/t/t3503-cherry-pick-root.sh\n+++ b/t/t3503-cherry-pick-root.sh\n@@ -2,6 +2,9 @@\n \n test_description='test cherry-picking (and reverting) a root commit'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t3504-cherry-pick-rerere.sh b/t/t3504-cherry-pick-rerere.sh\nindex 80a0d08706..860ba0b496 100755\n--- a/t/t3504-cherry-pick-rerere.sh\n+++ b/t/t3504-cherry-pick-rerere.sh\n@@ -2,6 +2,9 @@\n \n test_description='cherry-pick should rerere for conflicts'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t3505-cherry-pick-empty.sh b/t/t3505-cherry-pick-empty.sh\nindex 5f911bb529..20cd4052d4 100755\n--- a/t/t3505-cherry-pick-empty.sh\n+++ b/t/t3505-cherry-pick-empty.sh\n@@ -2,6 +2,9 @@\n \n test_description='test cherry-picking an empty commit'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t3506-cherry-pick-ff.sh b/t/t3506-cherry-pick-ff.sh\nindex 9d5adbc130..a105a782f6 100755\n--- a/t/t3506-cherry-pick-ff.sh\n+++ b/t/t3506-cherry-pick-ff.sh\n@@ -2,6 +2,9 @@\n \n test_description='test cherry-picking with --ff option'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh\nindex a21adcf0e4..e94264e578 100755\n--- a/t/t3507-cherry-pick-conflict.sh\n+++ b/t/t3507-cherry-pick-conflict.sh\n@@ -9,6 +9,9 @@ test_description='test cherry-pick and revert with conflicts\n \n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n pristine_detach () {\ndiff --git a/t/t3508-cherry-pick-many-commits.sh b/t/t3508-cherry-pick-many-commits.sh\nindex 23070a7b73..b967bf0639 100755\n--- a/t/t3508-cherry-pick-many-commits.sh\n+++ b/t/t3508-cherry-pick-many-commits.sh\n@@ -2,6 +2,9 @@\n \n test_description='test cherry-picking many commits'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n check_head_differs_from() {\ndiff --git a/t/t3509-cherry-pick-merge-df.sh b/t/t3509-cherry-pick-merge-df.sh\nindex 1e5b3948df..83cab7b2ed 100755\n--- a/t/t3509-cherry-pick-merge-df.sh\n+++ b/t/t3509-cherry-pick-merge-df.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='Test cherry-pick with directory/file conflicts'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'Initialize repository' '\ndiff --git a/t/t3512-cherry-pick-submodule.sh b/t/t3512-cherry-pick-submodule.sh\nindex 6ece1d8573..ff33c6d5c9 100755\n--- a/t/t3512-cherry-pick-submodule.sh\n+++ b/t/t3512-cherry-pick-submodule.sh\n@@ -2,6 +2,9 @@\n \n test_description='cherry-pick can handle submodules'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-submodule-update.sh\n \ndiff --git a/t/t3600-rm.sh b/t/t3600-rm.sh\nindex efec8d13b6..3baa64bf99 100755\n--- a/t/t3600-rm.sh\n+++ b/t/t3600-rm.sh\n@@ -5,6 +5,9 @@\n \n test_description='Test of the various options to git rm.'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # Setup some files to be removed, some with funny characters\ndiff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh\nindex ca04fac417..9be7527531 100755\n--- a/t/t3701-add-interactive.sh\n+++ b/t/t3701-add-interactive.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='add -i basic tests'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-terminal.sh\n \ndiff --git a/t/t3901-i18n-patch.sh b/t/t3901-i18n-patch.sh\nindex 923eb01f0e..bde27227b6 100755\n--- a/t/t3901-i18n-patch.sh\n+++ b/t/t3901-i18n-patch.sh\n@@ -5,6 +5,9 @@\n \n test_description='i18n settings and format-patch | am pipe'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n check_encoding () {\ndiff --git a/t/t3903-stash.sh b/t/t3903-stash.sh\nindex 9f7ca98967..49d52c46ad 100755\n--- a/t/t3903-stash.sh\n+++ b/t/t3903-stash.sh\n@@ -5,6 +5,9 @@\n \n test_description='Test git stash'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n diff_cmp () {\ndiff --git a/t/t3910-mac-os-precompose.sh b/t/t3910-mac-os-precompose.sh\nindex 54ce19e353..a2d1cdec6d 100755\n--- a/t/t3910-mac-os-precompose.sh\n+++ b/t/t3910-mac-os-precompose.sh\n@@ -5,6 +5,9 @@\n \n test_description='utf-8 decomposed (nfd) converted to precomposed (nfc)'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n if ! test_have_prereq UTF8_NFD_TO_NFC\ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex f72d456d3b..45f68ebcdb 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -5,6 +5,9 @@\n \n test_description='Various diff formatting options'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/diff-lib.sh\n \ndiff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh\nindex c5e5e0da3f..276aea32a6 100755\n--- a/t/t4014-format-patch.sh\n+++ b/t/t4014-format-patch.sh\n@@ -5,6 +5,9 @@\n \n test_description='various format-patch tests'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-terminal.sh\n \ndiff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh\nindex 95a7ca7070..0b379c307b 100755\n--- a/t/t4017-diff-retval.sh\n+++ b/t/t4017-diff-retval.sh\n@@ -2,6 +2,9 @@\n \n test_description='Return value of diffs'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh\nindex 94680836ce..e873abb1da 100755\n--- a/t/t4038-diff-combined.sh\n+++ b/t/t4038-diff-combined.sh\n@@ -2,6 +2,9 @@\n \n test_description='combined diff'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/diff-lib.sh\n \ndiff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh\nindex f852136585..8014cd684b 100755\n--- a/t/t4041-diff-submodule-option.sh\n+++ b/t/t4041-diff-submodule-option.sh\n@@ -9,6 +9,9 @@ test_description='Support for verbose submodule differences in git diff\n This test tries to verify the sanity of the --submodule option of git diff.\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # Tested non-UTF-8 encoding\ndiff --git a/t/t4048-diff-combined-binary.sh b/t/t4048-diff-combined-binary.sh\nindex 7f9ad9fa3d..e2780e697a 100755\n--- a/t/t4048-diff-combined-binary.sh\n+++ b/t/t4048-diff-combined-binary.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='combined and merge diff handle binary files and textconv'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup binary merge conflict' '\ndiff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh\nindex 28c053849a..a9aef7f986 100755\n--- a/t/t4052-stat-output.sh\n+++ b/t/t4052-stat-output.sh\n@@ -5,6 +5,9 @@\n \n test_description='test --stat output of various commands'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-terminal.sh\n \ndiff --git a/t/t4056-diff-order.sh b/t/t4056-diff-order.sh\nindex 43dd474a12..723eee4e8e 100755\n--- a/t/t4056-diff-order.sh\n+++ b/t/t4056-diff-order.sh\n@@ -2,6 +2,9 @@\n \n test_description='diff order'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n create_files () {\ndiff --git a/t/t4057-diff-combined-paths.sh b/t/t4057-diff-combined-paths.sh\nindex 0b78573733..71af157bf9 100755\n--- a/t/t4057-diff-combined-paths.sh\n+++ b/t/t4057-diff-combined-paths.sh\n@@ -2,6 +2,9 @@\n \n test_description='combined diff show only paths that are different to all parents'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # verify that diffc.expect matches output of\ndiff --git a/t/t4061-diff-indent.sh b/t/t4061-diff-indent.sh\nindex 0f7a6d97a8..cbe64d5f79 100755\n--- a/t/t4061-diff-indent.sh\n+++ b/t/t4061-diff-indent.sh\n@@ -3,6 +3,9 @@\n test_description='Test diff indent heuristic.\n \n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/diff-lib.sh\n \ndiff --git a/t/t4066-diff-emit-delay.sh b/t/t4066-diff-emit-delay.sh\nindex 6331f63b12..1983f1ebbe 100755\n--- a/t/t4066-diff-emit-delay.sh\n+++ b/t/t4066-diff-emit-delay.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test combined/stat/moved interaction'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # This test covers a weird 3-way interaction between \"--cc -p\", which will run\ndiff --git a/t/t4068-diff-symmetric-merge-base.sh b/t/t4068-diff-symmetric-merge-base.sh\nindex 03487cc945..55d47352ba 100755\n--- a/t/t4068-diff-symmetric-merge-base.sh\n+++ b/t/t4068-diff-symmetric-merge-base.sh\n@@ -2,6 +2,9 @@\n \n test_description='behavior of diff with symmetric-diff setups and --merge-base'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # build these situations:\ndiff --git a/t/t4103-apply-binary.sh b/t/t4103-apply-binary.sh\nindex 1b420e3b5f..ee4a74b132 100755\n--- a/t/t4103-apply-binary.sh\n+++ b/t/t4103-apply-binary.sh\n@@ -6,6 +6,9 @@\n test_description='git apply handling binary patches\n \n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t4108-apply-threeway.sh b/t/t4108-apply-threeway.sh\nindex d7349ced6b..0a091dc5a0 100755\n--- a/t/t4108-apply-threeway.sh\n+++ b/t/t4108-apply-threeway.sh\n@@ -2,6 +2,9 @@\n \n test_description='git apply --3way'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n print_sanitized_conflicted_diff () {\ndiff --git a/t/t4121-apply-diffs.sh b/t/t4121-apply-diffs.sh\nindex 66368effd5..60deb3bf78 100755\n--- a/t/t4121-apply-diffs.sh\n+++ b/t/t4121-apply-diffs.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='git apply for contextually independent diffs'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n echo '1\ndiff --git a/t/t4122-apply-symlink-inside.sh b/t/t4122-apply-symlink-inside.sh\nindex 4acb3f336e..71deaf779d 100755\n--- a/t/t4122-apply-symlink-inside.sh\n+++ b/t/t4122-apply-symlink-inside.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='apply to deeper directory without getting fooled with symlink'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t4150-am.sh b/t/t4150-am.sh\nindex 3ecbef6f8e..e1ffc04852 100755\n--- a/t/t4150-am.sh\n+++ b/t/t4150-am.sh\n@@ -2,6 +2,9 @@\n \n test_description='git am running'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup: messages' '\ndiff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh\nindex b12b43e9e9..1f1a809c60 100755\n--- a/t/t4200-rerere.sh\n+++ b/t/t4200-rerere.sh\n@@ -22,6 +22,9 @@ test_description='git rerere\n ++++++ [master] initial\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh\nindex 3d5c4a2086..ad6d3eebe5 100755\n--- a/t/t4201-shortlog.sh\n+++ b/t/t4201-shortlog.sh\n@@ -6,6 +6,9 @@\n test_description='git shortlog\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex 56d34ed465..6c7a3cfc2c 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -2,6 +2,9 @@\n \n test_description='git log'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY/lib-gpg.sh\"\n . \"$TEST_DIRECTORY/lib-terminal.sh\"\ndiff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh\nindex 586c3a86b1..8a2f8984f6 100755\n--- a/t/t4203-mailmap.sh\n+++ b/t/t4203-mailmap.sh\n@@ -2,6 +2,9 @@\n \n test_description='.mailmap configurations'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n fuzz_blame () {\ndiff --git a/t/t4204-patch-id.sh b/t/t4204-patch-id.sh\nindex 8ff8bd84c7..46ecb777f4 100755\n--- a/t/t4204-patch-id.sh\n+++ b/t/t4204-patch-id.sh\n@@ -2,6 +2,9 @@\n \n test_description='git patch-id'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t4207-log-decoration-colors.sh b/t/t4207-log-decoration-colors.sh\nindex 60f040cab8..6c868df38d 100755\n--- a/t/t4207-log-decoration-colors.sh\n+++ b/t/t4207-log-decoration-colors.sh\n@@ -5,6 +5,9 @@\n \n test_description='Test for \"git log --decorate\" colors'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t4208-log-magic-pathspec.sh b/t/t4208-log-magic-pathspec.sh\nindex 6cdbe4747a..1938d4a58f 100755\n--- a/t/t4208-log-magic-pathspec.sh\n+++ b/t/t4208-log-magic-pathspec.sh\n@@ -2,6 +2,9 @@\n \n test_description='magic pathspec tests using git-log'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t4211-line-log.sh b/t/t4211-line-log.sh\nindex 85d151423d..59c258429d 100755\n--- a/t/t4211-line-log.sh\n+++ b/t/t4211-line-log.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test log -L'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup (import history)' '\ndiff --git a/t/t4214-log-graph-octopus.sh b/t/t4214-log-graph-octopus.sh\nindex a080325098..981b83513a 100755\n--- a/t/t4214-log-graph-octopus.sh\n+++ b/t/t4214-log-graph-octopus.sh\n@@ -2,6 +2,9 @@\n \n test_description='git log --graph of skewed left octopus merge.'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-log-graph.sh\n \ndiff --git a/t/t4216-log-bloom.sh b/t/t4216-log-bloom.sh\nindex d11040ce41..b3f3820dbb 100755\n--- a/t/t4216-log-bloom.sh\n+++ b/t/t4216-log-bloom.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='git log for a path with Bloom filters'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n GIT_TEST_COMMIT_GRAPH=0\ndiff --git a/t/t4253-am-keep-cr-dos.sh b/t/t4253-am-keep-cr-dos.sh\nindex 6e1b73ec3a..ec7ba62d67 100755\n--- a/t/t4253-am-keep-cr-dos.sh\n+++ b/t/t4253-am-keep-cr-dos.sh\n@@ -6,6 +6,9 @@\n test_description='git-am mbox with dos line ending.\n \n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # Three patches which will be added as files with dos line ending.\ndiff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh\nindex c1811ea0f4..752e1fb2d2 100755\n--- a/t/t5150-request-pull.sh\n+++ b/t/t5150-request-pull.sh\n@@ -2,6 +2,9 @@\n \n test_description='Test workflows involving pull request.'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n if ! test_have_prereq PERL\ndiff --git a/t/t5304-prune.sh b/t/t5304-prune.sh\nindex df60f18fb8..bd5f71e396 100755\n--- a/t/t5304-prune.sh\n+++ b/t/t5304-prune.sh\n@@ -4,6 +4,9 @@\n #\n \n test_description='prune'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n day=$((60*60*24))\ndiff --git a/t/t5305-include-tag.sh b/t/t5305-include-tag.sh\nindex a5eca210b8..2e56887ed5 100755\n--- a/t/t5305-include-tag.sh\n+++ b/t/t5305-include-tag.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='git pack-object --include-tag'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n TRASH=$(pwd)\ndiff --git a/t/t5310-pack-bitmaps.sh b/t/t5310-pack-bitmaps.sh\nindex 8318781d2b..7842eb0977 100755\n--- a/t/t5310-pack-bitmaps.sh\n+++ b/t/t5310-pack-bitmaps.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='exercise basic bitmap functionality'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n objpath () {\ndiff --git a/t/t5312-prune-corruption.sh b/t/t5312-prune-corruption.sh\nindex da9d59940d..c70b5db2a0 100755\n--- a/t/t5312-prune-corruption.sh\n+++ b/t/t5312-prune-corruption.sh\n@@ -8,6 +8,9 @@ bail out or to proceed using it as a reachable tip, but it is _not_\n OK to proceed as if it did not exist. Otherwise we might silently\n delete objects that cannot be recovered.\n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'disable reflogs' '\ndiff --git a/t/t5317-pack-objects-filter-objects.sh b/t/t5317-pack-objects-filter-objects.sh\nindex dc0446574b..f19c521292 100755\n--- a/t/t5317-pack-objects-filter-objects.sh\n+++ b/t/t5317-pack-objects-filter-objects.sh\n@@ -2,6 +2,9 @@\n \n test_description='git pack-objects using object filtering'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # Test blob:none filter.\ndiff --git a/t/t5322-pack-objects-sparse.sh b/t/t5322-pack-objects-sparse.sh\nindex a581eaf529..c92658d026 100755\n--- a/t/t5322-pack-objects-sparse.sh\n+++ b/t/t5322-pack-objects-sparse.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='pack-objects object selection using sparse algorithm'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup repo' '\ndiff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh\nindex cc86ef213e..6be028f3e2 100755\n--- a/t/t5400-send-pack.sh\n+++ b/t/t5400-send-pack.sh\n@@ -6,6 +6,9 @@\n test_description='See why rewinding head breaks send-pack\n \n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n cnt=64\ndiff --git a/t/t5402-post-merge-hook.sh b/t/t5402-post-merge-hook.sh\nindex 4aeea8f5b7..27fc6ec4f3 100755\n--- a/t/t5402-post-merge-hook.sh\n+++ b/t/t5402-post-merge-hook.sh\n@@ -4,6 +4,9 @@\n #\n \n test_description='Test the post-merge hook.'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t5403-post-checkout-hook.sh b/t/t5403-post-checkout-hook.sh\nindex a39b3b5c78..ed91aadd95 100755\n--- a/t/t5403-post-checkout-hook.sh\n+++ b/t/t5403-post-checkout-hook.sh\n@@ -4,6 +4,9 @@\n #\n \n test_description='Test the post-checkout hook.'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t5404-tracking-branches.sh b/t/t5404-tracking-branches.sh\nindex 2762f420bc..da37b22fc5 100755\n--- a/t/t5404-tracking-branches.sh\n+++ b/t/t5404-tracking-branches.sh\n@@ -2,6 +2,9 @@\n \n test_description='tracking branch update checks for git push'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t5405-send-pack-rewind.sh b/t/t5405-send-pack-rewind.sh\nindex 235fb7686a..1f5b33b562 100755\n--- a/t/t5405-send-pack-rewind.sh\n+++ b/t/t5405-send-pack-rewind.sh\n@@ -2,6 +2,9 @@\n \n test_description='forced push to replace commit we do not have'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t5407-post-rewrite-hook.sh b/t/t5407-post-rewrite-hook.sh\nindex 80750a817e..78bffa64d7 100755\n--- a/t/t5407-post-rewrite-hook.sh\n+++ b/t/t5407-post-rewrite-hook.sh\n@@ -4,6 +4,9 @@\n #\n \n test_description='Test the post-rewrite hook.'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t5410-receive-pack-alternates.sh b/t/t5410-receive-pack-alternates.sh\nindex f00d0da860..30a4e6bb1a 100755\n--- a/t/t5410-receive-pack-alternates.sh\n+++ b/t/t5410-receive-pack-alternates.sh\n@@ -2,6 +2,9 @@\n \n test_description='git receive-pack with alternate ref filtering'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh\nindex 3557374312..4edb8c196e 100755\n--- a/t/t5500-fetch-pack.sh\n+++ b/t/t5500-fetch-pack.sh\n@@ -5,6 +5,9 @@\n \n test_description='Testing multi_ack pack fetching'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # Test fetch-pack/upload-pack pair.\ndiff --git a/t/t5501-fetch-push-alternates.sh b/t/t5501-fetch-push-alternates.sh\nindex 1bc57ac03f..96ce28b6ba 100755\n--- a/t/t5501-fetch-push-alternates.sh\n+++ b/t/t5501-fetch-push-alternates.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='fetch/push involving alternates'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n count_objects () {\ndiff --git a/t/t5502-quickfetch.sh b/t/t5502-quickfetch.sh\nindex 7a46cbdbe6..e15a472e4c 100755\n--- a/t/t5502-quickfetch.sh\n+++ b/t/t5502-quickfetch.sh\n@@ -2,6 +2,9 @@\n \n test_description='test quickfetch from local'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t5503-tagfollow.sh b/t/t5503-tagfollow.sh\nindex 6041a4dd32..cd1f407174 100755\n--- a/t/t5503-tagfollow.sh\n+++ b/t/t5503-tagfollow.sh\n@@ -2,6 +2,9 @@\n \n test_description='test automatic tag following'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # End state of the repository:\ndiff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh\nindex 1a16ac4c0d..7fe21b176d 100755\n--- a/t/t5504-fetch-receive-strict.sh\n+++ b/t/t5504-fetch-receive-strict.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='fetch/receive strict mode'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup and inject \"corrupt or missing\" object' '\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex eaa6e90220..2b6e1f50f8 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -2,6 +2,9 @@\n \n test_description='git remote porcelain-ish'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n setup_repository () {\ndiff --git a/t/t5506-remote-groups.sh b/t/t5506-remote-groups.sh\nindex 83d5558c0e..bf3aa85da5 100755\n--- a/t/t5506-remote-groups.sh\n+++ b/t/t5506-remote-groups.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='git remote group handling'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n mark() {\ndiff --git a/t/t5509-fetch-push-namespaces.sh b/t/t5509-fetch-push-namespaces.sh\nindex a67f792adf..f234dba91a 100755\n--- a/t/t5509-fetch-push-namespaces.sh\n+++ b/t/t5509-fetch-push-namespaces.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='fetch/push involving ref namespaces'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh\nindex 5d673358f9..4af490b6db 100755\n--- a/t/t5510-fetch.sh\n+++ b/t/t5510-fetch.sh\n@@ -5,6 +5,9 @@ test_description='Per branch config variables affects \"git fetch\".\n \n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n D=$(pwd)\ndiff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh\nindex e98c3a0174..a892807de2 100755\n--- a/t/t5512-ls-remote.sh\n+++ b/t/t5512-ls-remote.sh\n@@ -2,6 +2,9 @@\n \n test_description='git ls-remote'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n generate_references () {\ndiff --git a/t/t5514-fetch-multiple.sh b/t/t5514-fetch-multiple.sh\nindex bd202ec6f3..f12a83f82b 100755\n--- a/t/t5514-fetch-multiple.sh\n+++ b/t/t5514-fetch-multiple.sh\n@@ -2,6 +2,9 @@\n \n test_description='fetch --all works correctly'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n setup_repository () {\ndiff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh\nindex d11382f769..7003467523 100755\n--- a/t/t5516-fetch-push.sh\n+++ b/t/t5516-fetch-push.sh\n@@ -14,6 +14,9 @@ This test checks the following functionality:\n * reflogs\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n D=$(pwd)\ndiff --git a/t/t5517-push-mirror.sh b/t/t5517-push-mirror.sh\nindex e4edd56404..aa6405b452 100755\n--- a/t/t5517-push-mirror.sh\n+++ b/t/t5517-push-mirror.sh\n@@ -2,6 +2,9 @@\n \n test_description='pushing to a mirror repository'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n D=$(pwd)\ndiff --git a/t/t5518-fetch-exit-status.sh b/t/t5518-fetch-exit-status.sh\nindex c2060bb870..a94d0744d0 100755\n--- a/t/t5518-fetch-exit-status.sh\n+++ b/t/t5518-fetch-exit-status.sh\n@@ -5,6 +5,9 @@\n \n test_description='fetch exit status test'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t5519-push-alternates.sh b/t/t5519-push-alternates.sh\nindex 11fcd37700..0f199d0ccb 100755\n--- a/t/t5519-push-alternates.sh\n+++ b/t/t5519-push-alternates.sh\n@@ -2,6 +2,9 @@\n \n test_description='push to a repository that borrows from elsewhere'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\nindex 9fae07cdfa..b6b21c6cd1 100755\n--- a/t/t5520-pull.sh\n+++ b/t/t5520-pull.sh\n@@ -2,6 +2,9 @@\n \n test_description='pulling into void'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n modify () {\ndiff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh\nindex db1a381cd9..f0806f3eb5 100755\n--- a/t/t5521-pull-options.sh\n+++ b/t/t5521-pull-options.sh\n@@ -2,6 +2,9 @@\n \n test_description='pull options'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t5523-push-upstream.sh b/t/t5523-push-upstream.sh\nindex e47b5db5d6..0e6c7c251b 100755\n--- a/t/t5523-push-upstream.sh\n+++ b/t/t5523-push-upstream.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='push with --set-upstream'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-terminal.sh\n \ndiff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh\nindex dd8e423d25..40fb276e0e 100755\n--- a/t/t5526-fetch-submodules.sh\n+++ b/t/t5526-fetch-submodules.sh\n@@ -3,6 +3,9 @@\n \n test_description='Recursive \"git fetch\" for submodules'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n pwd=$(pwd)\ndiff --git a/t/t5527-fetch-odd-refs.sh b/t/t5527-fetch-odd-refs.sh\nindex 3b0cb98422..4aa1fb7281 100755\n--- a/t/t5527-fetch-odd-refs.sh\n+++ b/t/t5527-fetch-odd-refs.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test fetching of oddly-named refs'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # afterwards we will have:\ndiff --git a/t/t5528-push-default.sh b/t/t5528-push-default.sh\nindex f0a287d97d..b39b5171dc 100755\n--- a/t/t5528-push-default.sh\n+++ b/t/t5528-push-default.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='check various push.default settings'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup bare remotes' '\ndiff --git a/t/t5531-deep-submodule-push.sh b/t/t5531-deep-submodule-push.sh\nindex 4ad059e6be..010f5a0207 100755\n--- a/t/t5531-deep-submodule-push.sh\n+++ b/t/t5531-deep-submodule-push.sh\n@@ -2,6 +2,9 @@\n \n test_description='test push with submodules'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t5533-push-cas.sh b/t/t5533-push-cas.sh\nindex 7813e8470e..a7f0f098dd 100755\n--- a/t/t5533-push-cas.sh\n+++ b/t/t5533-push-cas.sh\n@@ -2,6 +2,9 @@\n \n test_description='compare & swap push force/delete safety'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n setup_srcdst_basic () {\ndiff --git a/t/t5534-push-signed.sh b/t/t5534-push-signed.sh\nindex af0385fb89..6ab458684d 100755\n--- a/t/t5534-push-signed.sh\n+++ b/t/t5534-push-signed.sh\n@@ -2,6 +2,9 @@\n \n test_description='signed push'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-gpg.sh\n \ndiff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh\nindex a55202d2d3..6de384a5ea 100755\n--- a/t/t5537-fetch-shallow.sh\n+++ b/t/t5537-fetch-shallow.sh\n@@ -2,6 +2,9 @@\n \n test_description='fetch/clone from a shallow clone'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n commit() {\ndiff --git a/t/t5538-push-shallow.sh b/t/t5538-push-shallow.sh\nindex ecbf84d21c..1253429d5d 100755\n--- a/t/t5538-push-shallow.sh\n+++ b/t/t5538-push-shallow.sh\n@@ -2,6 +2,9 @@\n \n test_description='push from/to a shallow clone'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n commit() {\ndiff --git a/t/t5539-fetch-http-shallow.sh b/t/t5539-fetch-http-shallow.sh\nindex 82aa99ae87..1da2a7533e 100755\n--- a/t/t5539-fetch-http-shallow.sh\n+++ b/t/t5539-fetch-http-shallow.sh\n@@ -2,6 +2,9 @@\n \n test_description='fetch/clone from a shallow clone over http'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-httpd.sh\n start_httpd\ndiff --git a/t/t5540-http-push-webdav.sh b/t/t5540-http-push-webdav.sh\nindex 450321fddb..751116e123 100755\n--- a/t/t5540-http-push-webdav.sh\n+++ b/t/t5540-http-push-webdav.sh\n@@ -7,6 +7,9 @@ test_description='test WebDAV http-push\n \n This test runs various sanity checks on http-push.'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n if git http-push > /dev/null 2>&1 || [ $? -eq 128 ]\ndiff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh\nindex 187454f5dd..2836b87239 100755\n--- a/t/t5541-http-push-smart.sh\n+++ b/t/t5541-http-push-smart.sh\n@@ -4,6 +4,9 @@\n #\n \n test_description='test smart pushing over http via http-backend'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n ROOT_PATH=\"$PWD\"\ndiff --git a/t/t5542-push-http-shallow.sh b/t/t5542-push-http-shallow.sh\nindex ddc1db722d..0feec9c449 100755\n--- a/t/t5542-push-http-shallow.sh\n+++ b/t/t5542-push-http-shallow.sh\n@@ -2,6 +2,9 @@\n \n test_description='push from/to a shallow clone over http'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-httpd.sh\n start_httpd\ndiff --git a/t/t5543-atomic-push.sh b/t/t5543-atomic-push.sh\nindex 620c30d58f..16a8fc7535 100755\n--- a/t/t5543-atomic-push.sh\n+++ b/t/t5543-atomic-push.sh\n@@ -2,6 +2,9 @@\n \n test_description='pushing to a repository using the atomic push option'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n mk_repo_pair () {\ndiff --git a/t/t5545-push-options.sh b/t/t5545-push-options.sh\nindex 38e6f7340e..202d75aebe 100755\n--- a/t/t5545-push-options.sh\n+++ b/t/t5545-push-options.sh\n@@ -2,6 +2,9 @@\n \n test_description='pushing to a repository using push options'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n mk_repo_pair () {\ndiff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh\nindex 483578b2d7..9ec91792c3 100755\n--- a/t/t5550-http-fetch-dumb.sh\n+++ b/t/t5550-http-fetch-dumb.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test dumb fetching over http via static file'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-httpd.sh\n start_httpd\ndiff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh\nindex e40e9ed52f..310b89dbab 100755\n--- a/t/t5551-http-fetch-smart.sh\n+++ b/t/t5551-http-fetch-smart.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test smart fetching over http via http-backend'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-httpd.sh\n start_httpd\ndiff --git a/t/t5553-set-upstream.sh b/t/t5553-set-upstream.sh\nindex 7622981cbf..e78a21881f 100755\n--- a/t/t5553-set-upstream.sh\n+++ b/t/t5553-set-upstream.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='\"git fetch/pull --set-upstream\" basic tests.'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n check_config () {\ndiff --git a/t/t5560-http-backend-noserver.sh b/t/t5560-http-backend-noserver.sh\nindex 9fafcf1945..5561b7d012 100755\n--- a/t/t5560-http-backend-noserver.sh\n+++ b/t/t5560-http-backend-noserver.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test git-http-backend-noserver'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n HTTPD_DOCUMENT_ROOT_PATH=\"$TRASH_DIRECTORY\"\ndiff --git a/t/t5561-http-backend.sh b/t/t5561-http-backend.sh\nindex 6eb0294978..cba2dffdb0 100755\n--- a/t/t5561-http-backend.sh\n+++ b/t/t5561-http-backend.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test git-http-backend'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-httpd.sh\n \ndiff --git a/t/t5570-git-daemon.sh b/t/t5570-git-daemon.sh\nindex 8f69a7854f..2e99a331c5 100755\n--- a/t/t5570-git-daemon.sh\n+++ b/t/t5570-git-daemon.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test fetching over git protocol'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n . \"$TEST_DIRECTORY\"/lib-git-daemon.sh\ndiff --git a/t/t5571-pre-push-hook.sh b/t/t5571-pre-push-hook.sh\nindex ac53d63869..971ed3da4b 100755\n--- a/t/t5571-pre-push-hook.sh\n+++ b/t/t5571-pre-push-hook.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='check pre-push hooks'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # Setup hook that always succeeds\ndiff --git a/t/t5580-unc-paths.sh b/t/t5580-unc-paths.sh\nindex cf768b3a27..da4c94cce1 100755\n--- a/t/t5580-unc-paths.sh\n+++ b/t/t5580-unc-paths.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='various Windows-only path tests'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n if test_have_prereq CYGWIN\ndiff --git a/t/t5581-http-curl-verbose.sh b/t/t5581-http-curl-verbose.sh\nindex 927aad0820..907bb062d6 100755\n--- a/t/t5581-http-curl-verbose.sh\n+++ b/t/t5581-http-curl-verbose.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test GIT_CURL_VERBOSE'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-httpd.sh\n start_httpd\ndiff --git a/t/t5582-fetch-negative-refspec.sh b/t/t5582-fetch-negative-refspec.sh\nindex 8c61e28fec..608e9aa189 100755\n--- a/t/t5582-fetch-negative-refspec.sh\n+++ b/t/t5582-fetch-negative-refspec.sh\n@@ -5,6 +5,9 @@ test_description='\"git fetch\" with negative refspecs.\n \n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\nindex 7df3c5373a..e01c5fe02d 100755\n--- a/t/t5601-clone.sh\n+++ b/t/t5601-clone.sh\n@@ -2,6 +2,9 @@\n \n test_description=clone\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n X=\ndiff --git a/t/t5604-clone-reference.sh b/t/t5604-clone-reference.sh\nindex 2f7be23044..20fbb1e9a3 100755\n--- a/t/t5604-clone-reference.sh\n+++ b/t/t5604-clone-reference.sh\n@@ -4,6 +4,9 @@\n #\n \n test_description='test clone --reference'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n base_dir=$(pwd)\ndiff --git a/t/t5605-clone-local.sh b/t/t5605-clone-local.sh\nindex af23419ebf..94028044b0 100755\n--- a/t/t5605-clone-local.sh\n+++ b/t/t5605-clone-local.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test local clone'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n repo_is_hardlinked() {\ndiff --git a/t/t5606-clone-options.sh b/t/t5606-clone-options.sh\nindex 7f082fb23b..3893a49e6d 100755\n--- a/t/t5606-clone-options.sh\n+++ b/t/t5606-clone-options.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='basic clone options'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t5607-clone-bundle.sh b/t/t5607-clone-bundle.sh\nindex 26985f4b44..6e2e4adbb4 100755\n--- a/t/t5607-clone-bundle.sh\n+++ b/t/t5607-clone-bundle.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='some bundle related tests'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t5609-clone-branch.sh b/t/t5609-clone-branch.sh\nindex 6e7a7be052..e4d5124f89 100755\n--- a/t/t5609-clone-branch.sh\n+++ b/t/t5609-clone-branch.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='clone --branch option'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n check_HEAD() {\ndiff --git a/t/t5610-clone-detached.sh b/t/t5610-clone-detached.sh\nindex 8b0d607df1..ba63ba8f42 100755\n--- a/t/t5610-clone-detached.sh\n+++ b/t/t5610-clone-detached.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test cloning a repository with detached HEAD'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n head_is_detached() {\ndiff --git a/t/t5611-clone-config.sh b/t/t5611-clone-config.sh\nindex 8e0fd39823..be4ae10c82 100755\n--- a/t/t5611-clone-config.sh\n+++ b/t/t5611-clone-config.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='tests for git clone -c key=value'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'clone -c sets config in cloned repo' '\ndiff --git a/t/t5612-clone-refspec.sh b/t/t5612-clone-refspec.sh\nindex e3b436d8ae..9e37f7fef7 100755\n--- a/t/t5612-clone-refspec.sh\n+++ b/t/t5612-clone-refspec.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test refspec written by clone-command'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh\nindex f4d49d8335..b2c3ed4088 100755\n--- a/t/t5616-partial-clone.sh\n+++ b/t/t5616-partial-clone.sh\n@@ -2,6 +2,9 @@\n \n test_description='git partial clone'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # create a normal \"src\" repo where we can later create new commits.\ndiff --git a/t/t5617-clone-submodules-remote.sh b/t/t5617-clone-submodules-remote.sh\nindex 1a041df10b..cba468fc53 100755\n--- a/t/t5617-clone-submodules-remote.sh\n+++ b/t/t5617-clone-submodules-remote.sh\n@@ -2,6 +2,9 @@\n \n test_description='Test cloning repos with submodules using remote-tracking branches'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n pwd=$(pwd)\ndiff --git a/t/t5700-protocol-v1.sh b/t/t5700-protocol-v1.sh\nindex 022901b9eb..7f0056c1ed 100755\n--- a/t/t5700-protocol-v1.sh\n+++ b/t/t5700-protocol-v1.sh\n@@ -8,6 +8,9 @@ TEST_NO_CREATE_REPO=1\n GIT_TEST_PROTOCOL_VERSION=0\n export GIT_TEST_PROTOCOL_VERSION\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # Test protocol v1 with 'git://' transport\ndiff --git a/t/t5701-git-serve.sh b/t/t5701-git-serve.sh\nindex a1f5fdc9fd..66c47e61d8 100755\n--- a/t/t5701-git-serve.sh\n+++ b/t/t5701-git-serve.sh\n@@ -2,6 +2,9 @@\n \n test_description='test protocol v2 server commands'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'test capability advertisement' '\ndiff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh\nindex 7d5b17909b..f1f77fe089 100755\n--- a/t/t5702-protocol-v2.sh\n+++ b/t/t5702-protocol-v2.sh\n@@ -4,6 +4,9 @@ test_description='test git wire-protocol version 2'\n \n TEST_NO_CREATE_REPO=1\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # Test protocol v2 with 'git://' transport\ndiff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\nindex b46940b725..c3a52d478f 100755\n--- a/t/t5703-upload-pack-ref-in-want.sh\n+++ b/t/t5703-upload-pack-ref-in-want.sh\n@@ -2,6 +2,9 @@\n \n test_description='upload-pack ref-in-want'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n get_actual_refs () {\ndiff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh\nindex 0f04b6cddb..1ecefb57fe 100755\n--- a/t/t5801-remote-helpers.sh\n+++ b/t/t5801-remote-helpers.sh\n@@ -5,6 +5,9 @@\n \n test_description='Test remote-helper import and export commands'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-gpg.sh\n \ndiff --git a/t/t6000-rev-list-misc.sh b/t/t6000-rev-list-misc.sh\nindex fc4d55dcb2..664000adf0 100755\n--- a/t/t6000-rev-list-misc.sh\n+++ b/t/t6000-rev-list-misc.sh\n@@ -2,6 +2,9 @@\n \n test_description='miscellaneous rev-list tests'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t6001-rev-list-graft.sh b/t/t6001-rev-list-graft.sh\nindex 7504ba4751..67c384f1e8 100755\n--- a/t/t6001-rev-list-graft.sh\n+++ b/t/t6001-rev-list-graft.sh\n@@ -2,6 +2,9 @@\n \n test_description='Revision traversal vs grafts and path limiter'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t6004-rev-list-path-optim.sh b/t/t6004-rev-list-path-optim.sh\nindex 3e8c42ee0b..ff788199e3 100755\n--- a/t/t6004-rev-list-path-optim.sh\n+++ b/t/t6004-rev-list-path-optim.sh\n@@ -13,6 +13,9 @@ test_description='git rev-list trivial path optimization test\n \n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh\nindex 99a1eaf332..bbbd577f10 100755\n--- a/t/t6006-rev-list-format.sh\n+++ b/t/t6006-rev-list-format.sh\n@@ -5,6 +5,9 @@\n \n test_description='git rev-list --pretty=format test'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-terminal.sh\n \ndiff --git a/t/t6007-rev-list-cherry-pick-file.sh b/t/t6007-rev-list-cherry-pick-file.sh\nindex f0268372d2..51547ac3a5 100755\n--- a/t/t6007-rev-list-cherry-pick-file.sh\n+++ b/t/t6007-rev-list-cherry-pick-file.sh\n@@ -2,6 +2,9 @@\n \n test_description='test git rev-list --cherry-pick -- file'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # A---B---D---F\ndiff --git a/t/t6008-rev-list-submodule.sh b/t/t6008-rev-list-submodule.sh\nindex c4af9ca0a7..871ace31e2 100755\n--- a/t/t6008-rev-list-submodule.sh\n+++ b/t/t6008-rev-list-submodule.sh\n@@ -5,6 +5,9 @@\n \n test_description='git rev-list involving submodules that this repo has'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t6009-rev-list-parent.sh b/t/t6009-rev-list-parent.sh\nindex 916d9692bc..114f755d52 100755\n--- a/t/t6009-rev-list-parent.sh\n+++ b/t/t6009-rev-list-parent.sh\n@@ -2,6 +2,9 @@\n \n test_description='ancestor culling and limiting by parent number'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n check_revlist () {\ndiff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh\nindex fd202fcb94..d163c24859 100755\n--- a/t/t6012-rev-list-simplify.sh\n+++ b/t/t6012-rev-list-simplify.sh\n@@ -2,6 +2,9 @@\n \n test_description='merge simplification'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n note () {\ndiff --git a/t/t6013-rev-list-reverse-parents.sh b/t/t6013-rev-list-reverse-parents.sh\nindex 89458d370f..0298174956 100755\n--- a/t/t6013-rev-list-reverse-parents.sh\n+++ b/t/t6013-rev-list-reverse-parents.sh\n@@ -2,6 +2,9 @@\n \n test_description='--reverse combines with --parents'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n \ndiff --git a/t/t6016-rev-list-graph-simplify-history.sh b/t/t6016-rev-list-graph-simplify-history.sh\nindex f5e6e92f5b..3fb7ee0be4 100755\n--- a/t/t6016-rev-list-graph-simplify-history.sh\n+++ b/t/t6016-rev-list-graph-simplify-history.sh\n@@ -7,6 +7,9 @@\n \n test_description='--graph and simplified history'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'set up rev-list --graph test' '\ndiff --git a/t/t6017-rev-list-stdin.sh b/t/t6017-rev-list-stdin.sh\nindex 667b37564e..e51fe7b9bc 100755\n--- a/t/t6017-rev-list-stdin.sh\n+++ b/t/t6017-rev-list-stdin.sh\n@@ -5,6 +5,9 @@\n \n test_description='log family learns --stdin'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n check () {\ndiff --git a/t/t6018-rev-list-glob.sh b/t/t6018-rev-list-glob.sh\nindex fe2f3cec3d..60a351c26a 100755\n--- a/t/t6018-rev-list-glob.sh\n+++ b/t/t6018-rev-list-glob.sh\n@@ -2,6 +2,9 @@\n \n test_description='rev-list/rev-parse --glob'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n commit () {\ndiff --git a/t/t6019-rev-list-ancestry-path.sh b/t/t6019-rev-list-ancestry-path.sh\nindex 353f84313f..aeb7defaa3 100755\n--- a/t/t6019-rev-list-ancestry-path.sh\n+++ b/t/t6019-rev-list-ancestry-path.sh\n@@ -21,6 +21,9 @@ test_description='--ancestry-path'\n #  --ancestry-path G..M -- G.t == L\n #  --ancestry-path --simplify-merges G^..M -- G.t == G L\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_merge () {\ndiff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh\nindex aa226381be..7dc65c73cd 100755\n--- a/t/t6030-bisect-porcelain.sh\n+++ b/t/t6030-bisect-porcelain.sh\n@@ -6,6 +6,9 @@ test_description='Tests git bisect functionality'\n \n exec </dev/null\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n add_line_into_file()\ndiff --git a/t/t6040-tracking-info.sh b/t/t6040-tracking-info.sh\nindex 50a934e1b2..bc95ff6f54 100755\n--- a/t/t6040-tracking-info.sh\n+++ b/t/t6040-tracking-info.sh\n@@ -2,6 +2,9 @@\n \n test_description='remote tracking stats'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n advance () {\ndiff --git a/t/t6050-replace.sh b/t/t6050-replace.sh\nindex c80dc10b8f..0a53462a61 100755\n--- a/t/t6050-replace.sh\n+++ b/t/t6050-replace.sh\n@@ -4,6 +4,9 @@\n #\n test_description='Tests replace refs functionality'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY/lib-gpg.sh\"\n \ndiff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh\nindex 7531262a5e..19a56f4a4d 100755\n--- a/t/t6101-rev-parse-parents.sh\n+++ b/t/t6101-rev-parse-parents.sh\n@@ -5,6 +5,9 @@\n \n test_description='Test git rev-parse with different parent options'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_cmp_rev_output () {\ndiff --git a/t/t6110-rev-list-sparse.sh b/t/t6110-rev-list-sparse.sh\nindex 656ac7fe9d..69411862d6 100755\n--- a/t/t6110-rev-list-sparse.sh\n+++ b/t/t6110-rev-list-sparse.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='operations that cull histories in unusual ways'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t6111-rev-list-treesame.sh b/t/t6111-rev-list-treesame.sh\nindex 4244638285..58b8d42bf3 100755\n--- a/t/t6111-rev-list-treesame.sh\n+++ b/t/t6111-rev-list-treesame.sh\n@@ -13,6 +13,9 @@\n \n test_description='TREESAME and limiting'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n note () {\ndiff --git a/t/t6112-rev-list-filters-objects.sh b/t/t6112-rev-list-filters-objects.sh\nindex de0e5a5d36..5f39c3adb3 100755\n--- a/t/t6112-rev-list-filters-objects.sh\n+++ b/t/t6112-rev-list-filters-objects.sh\n@@ -2,6 +2,9 @@\n \n test_description='git rev-list using object filtering'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # Test the blob:none filter.\ndiff --git a/t/t6120-describe.sh b/t/t6120-describe.sh\nindex f822d5d328..360e65d3b9 100755\n--- a/t/t6120-describe.sh\n+++ b/t/t6120-describe.sh\n@@ -11,6 +11,9 @@ test_description='test describe'\n #\n # First parent of a merge commit is on the same line, second parent below.\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n check_describe () {\ndiff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh\nindex f3e66eaf9b..725b356d1e 100755\n--- a/t/t6200-fmt-merge-msg.sh\n+++ b/t/t6200-fmt-merge-msg.sh\n@@ -5,6 +5,9 @@\n \n test_description='fmt-merge-msg test'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY/lib-gpg.sh\"\n \ndiff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh\nindex b359023189..b03740d634 100755\n--- a/t/t6300-for-each-ref.sh\n+++ b/t/t6300-for-each-ref.sh\n@@ -5,6 +5,9 @@\n \n test_description='for-each-ref test'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-gpg.sh\n . \"$TEST_DIRECTORY\"/lib-terminal.sh\ndiff --git a/t/t6302-for-each-ref-filter.sh b/t/t6302-for-each-ref-filter.sh\nindex 0a21669f56..0f3e6aa011 100755\n--- a/t/t6302-for-each-ref-filter.sh\n+++ b/t/t6302-for-each-ref-filter.sh\n@@ -2,6 +2,9 @@\n \n test_description='test for-each-refs usage of ref-filter APIs'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-gpg.sh\n \ndiff --git a/t/t6400-merge-df.sh b/t/t6400-merge-df.sh\nindex 9da0838216..5fab2d2dd7 100755\n--- a/t/t6400-merge-df.sh\n+++ b/t/t6400-merge-df.sh\n@@ -4,6 +4,9 @@\n #\n \n test_description='Test merge with directory/file conflicts'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'prepare repository' '\ndiff --git a/t/t6402-merge-rename.sh b/t/t6402-merge-rename.sh\nindex 3f64f62224..227c2feb08 100755\n--- a/t/t6402-merge-rename.sh\n+++ b/t/t6402-merge-rename.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='Merge-recursive merging renames'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n modify () {\ndiff --git a/t/t6404-recursive-merge.sh b/t/t6404-recursive-merge.sh\nindex b1c3d4dda4..bdf8169456 100755\n--- a/t/t6404-recursive-merge.sh\n+++ b/t/t6404-recursive-merge.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='Test merge without common ancestors'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # This scenario is based on a real-world repository of Shawn Pearce.\ndiff --git a/t/t6405-merge-symlinks.sh b/t/t6405-merge-symlinks.sh\nindex 6c0a90d044..140e9e6ce6 100755\n--- a/t/t6405-merge-symlinks.sh\n+++ b/t/t6405-merge-symlinks.sh\n@@ -8,6 +8,9 @@ test_description='merging symlinks on filesystem w/o symlink support.\n This tests that git merge-recursive writes merge results as plain files\n if core.symlinks is false.'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t6406-merge-attr.sh b/t/t6406-merge-attr.sh\nindex 76a55f838c..7fe4034d58 100755\n--- a/t/t6406-merge-attr.sh\n+++ b/t/t6406-merge-attr.sh\n@@ -5,6 +5,9 @@\n \n test_description='per path merge controlled by merge attribute'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t6407-merge-binary.sh b/t/t6407-merge-binary.sh\nindex 4e6c7cb77e..826deacfd7 100755\n--- a/t/t6407-merge-binary.sh\n+++ b/t/t6407-merge-binary.sh\n@@ -2,6 +2,9 @@\n \n test_description='ask merge-recursive to merge binary files'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t6409-merge-subtree.sh b/t/t6409-merge-subtree.sh\nindex b8e8b6f642..e2c1cfc9fe 100755\n--- a/t/t6409-merge-subtree.sh\n+++ b/t/t6409-merge-subtree.sh\n@@ -2,6 +2,9 @@\n \n test_description='subtree merge strategy'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t6411-merge-filemode.sh b/t/t6411-merge-filemode.sh\nindex 87741efad3..7b66abfdbb 100755\n--- a/t/t6411-merge-filemode.sh\n+++ b/t/t6411-merge-filemode.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='merge: handle file mode'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'set up mode change in one branch' '\ndiff --git a/t/t6412-merge-large-rename.sh b/t/t6412-merge-large-rename.sh\nindex 80777386dc..d6840078c4 100755\n--- a/t/t6412-merge-large-rename.sh\n+++ b/t/t6412-merge-large-rename.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='merging with large rename matrix'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n count() {\ndiff --git a/t/t6413-merge-crlf.sh b/t/t6413-merge-crlf.sh\nindex e8d65eefb5..3bd8e3e899 100755\n--- a/t/t6413-merge-crlf.sh\n+++ b/t/t6413-merge-crlf.sh\n@@ -8,6 +8,9 @@ test_description='merge conflict in crlf repo\n \n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t6414-merge-rename-nocruft.sh b/t/t6414-merge-rename-nocruft.sh\nindex a25e730460..42824dcf49 100755\n--- a/t/t6414-merge-rename-nocruft.sh\n+++ b/t/t6414-merge-rename-nocruft.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='Merge-recursive merging renames'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t6415-merge-dir-to-symlink.sh b/t/t6415-merge-dir-to-symlink.sh\nindex 2eddcc7664..32c0b62496 100755\n--- a/t/t6415-merge-dir-to-symlink.sh\n+++ b/t/t6415-merge-dir-to-symlink.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='merging when a directory was replaced with a symlink'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'create a commit where dir a/b changed to symlink' '\ndiff --git a/t/t6416-recursive-corner-cases.sh b/t/t6416-recursive-corner-cases.sh\nindex 887c2195a9..6a740771ed 100755\n--- a/t/t6416-recursive-corner-cases.sh\n+++ b/t/t6416-recursive-corner-cases.sh\n@@ -2,6 +2,9 @@\n \n test_description='recursive merge corner cases involving criss-cross merges'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-merge.sh\n \ndiff --git a/t/t6417-merge-ours-theirs.sh b/t/t6417-merge-ours-theirs.sh\nindex 0aebc6c028..e7883f890a 100755\n--- a/t/t6417-merge-ours-theirs.sh\n+++ b/t/t6417-merge-ours-theirs.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='Merge-recursive ours and theirs variants'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t6418-merge-text-auto.sh b/t/t6418-merge-text-auto.sh\nindex 30983d18b1..91b43de00d 100755\n--- a/t/t6418-merge-text-auto.sh\n+++ b/t/t6418-merge-text-auto.sh\n@@ -12,6 +12,9 @@ test_description='CRLF merge conflict across text=auto change\n *+ [side^] Initial\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b\ndiff --git a/t/t6419-merge-ignorecase.sh b/t/t6419-merge-ignorecase.sh\nindex 531850d834..9996a94431 100755\n--- a/t/t6419-merge-ignorecase.sh\n+++ b/t/t6419-merge-ignorecase.sh\n@@ -2,6 +2,9 @@\n \n test_description='git-merge with case-changing rename on case-insensitive file system'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n if ! test_have_prereq CASE_INSENSITIVE_FS\ndiff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh\nindex 78bfaf17f0..70c8af7f51 100755\n--- a/t/t6422-merge-rename-corner-cases.sh\n+++ b/t/t6422-merge-rename-corner-cases.sh\n@@ -3,6 +3,9 @@\n test_description=\"recursive merge corner cases w/ renames but not criss-crosses\"\n # t6036 has corner cases that involve both criss-cross merges and renames\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-merge.sh\n \ndiff --git a/t/t6425-merge-rename-delete.sh b/t/t6425-merge-rename-delete.sh\nindex f79d021590..e58e3dfba1 100755\n--- a/t/t6425-merge-rename-delete.sh\n+++ b/t/t6425-merge-rename-delete.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='Merge-recursive rename/delete conflict message'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'rename/delete' '\ndiff --git a/t/t6427-diff3-conflict-markers.sh b/t/t6427-diff3-conflict-markers.sh\nindex f4655bb358..c192ee4e42 100755\n--- a/t/t6427-diff3-conflict-markers.sh\n+++ b/t/t6427-diff3-conflict-markers.sh\n@@ -2,6 +2,9 @@\n \n test_description='recursive merge diff3 style conflict markers'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # Setup:\ndiff --git a/t/t6430-merge-recursive.sh b/t/t6430-merge-recursive.sh\nindex 9c08e63af2..acb2868260 100755\n--- a/t/t6430-merge-recursive.sh\n+++ b/t/t6430-merge-recursive.sh\n@@ -2,6 +2,9 @@\n \n test_description='merge-recursive backend test'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-merge.sh\n \ndiff --git a/t/t6432-merge-recursive-space-options.sh b/t/t6432-merge-recursive-space-options.sh\nindex b56180ee4a..1333cbb148 100755\n--- a/t/t6432-merge-recursive-space-options.sh\n+++ b/t/t6432-merge-recursive-space-options.sh\n@@ -11,6 +11,9 @@ test_description='merge-recursive space options\n *   ok 1: setup\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b\ndiff --git a/t/t6433-merge-toplevel.sh b/t/t6433-merge-toplevel.sh\nindex e29c284b9b..2d51b2d08c 100755\n--- a/t/t6433-merge-toplevel.sh\n+++ b/t/t6433-merge-toplevel.sh\n@@ -2,6 +2,9 @@\n \n test_description='\"git merge\" top-level frontend'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n t3033_reset () {\ndiff --git a/t/t6434-merge-recursive-rename-options.sh b/t/t6434-merge-recursive-rename-options.sh\nindex 3d9fae68c4..7e877e96e2 100755\n--- a/t/t6434-merge-recursive-rename-options.sh\n+++ b/t/t6434-merge-recursive-rename-options.sh\n@@ -26,6 +26,9 @@ they are rounded down (see, e.g., Documentation/diff-generate-patch.txt, which\n mentions this in a different context).\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n get_expected_stages () {\ndiff --git a/t/t6436-merge-overwrite.sh b/t/t6436-merge-overwrite.sh\nindex dd9376842f..7d5691c1b4 100755\n--- a/t/t6436-merge-overwrite.sh\n+++ b/t/t6436-merge-overwrite.sh\n@@ -4,6 +4,9 @@ test_description='git-merge\n \n Do not overwrite changes.'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t6437-submodule-merge.sh b/t/t6437-submodule-merge.sh\nindex 3ead2b726f..14fa46edf3 100755\n--- a/t/t6437-submodule-merge.sh\n+++ b/t/t6437-submodule-merge.sh\n@@ -2,6 +2,9 @@\n \n test_description='merging with submodules'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n #\ndiff --git a/t/t6439-merge-co-error-msgs.sh b/t/t6439-merge-co-error-msgs.sh\nindex 5c8894d94f..e5542ceb24 100755\n--- a/t/t6439-merge-co-error-msgs.sh\n+++ b/t/t6439-merge-co-error-msgs.sh\n@@ -2,6 +2,9 @@\n \n test_description='unpack-trees error messages'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n \ndiff --git a/t/t6501-freshen-objects.sh b/t/t6501-freshen-objects.sh\nindex 8a3bb4105b..bda5069044 100755\n--- a/t/t6501-freshen-objects.sh\n+++ b/t/t6501-freshen-objects.sh\n@@ -25,6 +25,9 @@\n #      to refer to an existing tree).\n \n test_description='check pruning of dependent objects'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # We care about reachability, so we do not want to use\ndiff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh\nindex 36477cb1f4..db496fa039 100755\n--- a/t/t7003-filter-branch.sh\n+++ b/t/t7003-filter-branch.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='git filter-branch'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY/lib-gpg.sh\"\n \ndiff --git a/t/t7004-tag.sh b/t/t7004-tag.sh\nindex 05f411c821..0e3086c4a6 100755\n--- a/t/t7004-tag.sh\n+++ b/t/t7004-tag.sh\n@@ -7,6 +7,9 @@ test_description='git tag\n \n Tests for operations with tags.'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-gpg.sh\n . \"$TEST_DIRECTORY\"/lib-terminal.sh\ndiff --git a/t/t7030-verify-tag.sh b/t/t7030-verify-tag.sh\nindex 5c5bc32ccb..bcb3c4f035 100755\n--- a/t/t7030-verify-tag.sh\n+++ b/t/t7030-verify-tag.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='signed tag tests'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY/lib-gpg.sh\"\n \ndiff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh\nindex d5218743e9..e65ca019eb 100755\n--- a/t/t7060-wtstatus.sh\n+++ b/t/t7060-wtstatus.sh\n@@ -2,6 +2,9 @@\n \n test_description='basic work tree status reporting'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh\nindex a682a3d826..ae60942347 100755\n--- a/t/t7063-status-untracked-cache.sh\n+++ b/t/t7063-status-untracked-cache.sh\n@@ -2,6 +2,9 @@\n \n test_description='test untracked cache'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # On some filesystems (e.g. FreeBSD's ext2 and ufs) directory mtime\ndiff --git a/t/t7064-wtstatus-pv2.sh b/t/t7064-wtstatus-pv2.sh\nindex 537787e598..07954b2142 100755\n--- a/t/t7064-wtstatus-pv2.sh\n+++ b/t/t7064-wtstatus-pv2.sh\n@@ -5,6 +5,9 @@ test_description='git status --porcelain=v2\n This test exercises porcelain V2 output for git status.'\n \n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n \ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex b1affb001f..4af43d26f1 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -7,6 +7,9 @@ test_description='git reset\n \n Documented tests for git reset'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n commit_msg () {\ndiff --git a/t/t7113-post-index-change-hook.sh b/t/t7113-post-index-change-hook.sh\nindex f011ad7eec..8872c32f94 100755\n--- a/t/t7113-post-index-change-hook.sh\n+++ b/t/t7113-post-index-change-hook.sh\n@@ -2,6 +2,9 @@\n \n test_description='post index change hook'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex b36a93056f..12567543c4 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -20,6 +20,9 @@ Test switching across them.\n \n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_tick\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex fec7e0299d..8addc0c8c9 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -9,6 +9,9 @@ This test tries to verify basic sanity of the init, update and status\n subcommands of git submodule.\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'submodule deinit works on empty repository' '\ndiff --git a/t/t7403-submodule-sync.sh b/t/t7403-submodule-sync.sh\nindex 0726799e74..c95559bed5 100755\n--- a/t/t7403-submodule-sync.sh\n+++ b/t/t7403-submodule-sync.sh\n@@ -8,6 +8,9 @@ test_description='git submodule sync\n These tests exercise the \"git submodule sync\" subcommand.\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh\nindex acb8766ac2..825b1a7e0c 100755\n--- a/t/t7406-submodule-update.sh\n+++ b/t/t7406-submodule-update.sh\n@@ -9,6 +9,9 @@ This test verifies that \"git submodule update\" detaches the HEAD of the\n submodule and \"git submodule update --rebase/--merge\" does not detach the HEAD.\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n \ndiff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh\nindex 6b2aa917e1..632defc53b 100755\n--- a/t/t7407-submodule-foreach.sh\n+++ b/t/t7407-submodule-foreach.sh\n@@ -9,6 +9,9 @@ This test verifies that \"git submodule foreach\" correctly visits all submodules\n that are currently checked out.\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n \ndiff --git a/t/t7409-submodule-detached-work-tree.sh b/t/t7409-submodule-detached-work-tree.sh\nindex fc018e3638..e9428e2b59 100755\n--- a/t/t7409-submodule-detached-work-tree.sh\n+++ b/t/t7409-submodule-detached-work-tree.sh\n@@ -10,6 +10,9 @@ on detached working trees\n '\n \n TEST_NO_CREATE_REPO=1\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'submodule on detached working tree' '\ndiff --git a/t/t7417-submodule-path-url.sh b/t/t7417-submodule-path-url.sh\nindex f7e7e94d7b..0a514e951c 100755\n--- a/t/t7417-submodule-path-url.sh\n+++ b/t/t7417-submodule-path-url.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='check handling of .gitmodule path with dash'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'create submodule with dash in path' '\ndiff --git a/t/t7501-commit-basic-functionality.sh b/t/t7501-commit-basic-functionality.sh\nindex 110b4bf459..9a1414f31d 100755\n--- a/t/t7501-commit-basic-functionality.sh\n+++ b/t/t7501-commit-basic-functionality.sh\n@@ -7,6 +7,9 @@\n # signoff\n \n test_description='git commit'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY/diff-lib.sh\"\n \ndiff --git a/t/t7502-commit-porcelain.sh b/t/t7502-commit-porcelain.sh\nindex 14c92e4c25..c8c16bf1c9 100755\n--- a/t/t7502-commit-porcelain.sh\n+++ b/t/t7502-commit-porcelain.sh\n@@ -2,6 +2,9 @@\n \n test_description='git commit porcelain-ish'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n commit_msg_is () {\ndiff --git a/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh b/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh\nindex b3485450a2..8d3f4ab0d7 100755\n--- a/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh\n+++ b/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh\n@@ -2,6 +2,9 @@\n \n test_description='pre-commit and pre-merge-commit hooks'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n HOOKDIR=\"$(git rev-parse --git-dir)/hooks\"\ndiff --git a/t/t7504-commit-msg-hook.sh b/t/t7504-commit-msg-hook.sh\nindex 31b9c6a2c1..17fb1d8499 100755\n--- a/t/t7504-commit-msg-hook.sh\n+++ b/t/t7504-commit-msg-hook.sh\n@@ -2,6 +2,9 @@\n \n test_description='commit-msg hook'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'with no hook' '\ndiff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh\nindex 94f85cdf83..978c90abbb 100755\n--- a/t/t7505-prepare-commit-msg-hook.sh\n+++ b/t/t7505-prepare-commit-msg-hook.sh\n@@ -2,6 +2,9 @@\n \n test_description='prepare-commit-msg hook'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'set up commits for rebasing' '\ndiff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh\nindex 6baaa1ad91..a5a36cab85 100755\n--- a/t/t7510-signed-commit.sh\n+++ b/t/t7510-signed-commit.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='signed commit tests'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n GNUPGHOME_NOT_USED=$GNUPGHOME\n . \"$TEST_DIRECTORY/lib-gpg.sh\"\ndiff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh\nindex 29518e0949..fbd760f7e6 100755\n--- a/t/t7512-status-help.sh\n+++ b/t/t7512-status-help.sh\n@@ -7,6 +7,9 @@\n \n test_description='git status advice'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n . \"$TEST_DIRECTORY\"/lib-rebase.sh\ndiff --git a/t/t7517-per-repo-email.sh b/t/t7517-per-repo-email.sh\nindex b2401cec3e..344d72a5c0 100755\n--- a/t/t7517-per-repo-email.sh\n+++ b/t/t7517-per-repo-email.sh\n@@ -6,6 +6,9 @@\n \n test_description='per-repo forced setting of email address'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup a likely user.useConfigOnly use case' '\ndiff --git a/t/t7600-merge.sh b/t/t7600-merge.sh\nindex 1c85f75555..0ad866c08c 100755\n--- a/t/t7600-merge.sh\n+++ b/t/t7600-merge.sh\n@@ -26,6 +26,9 @@ Testing basic merge operations/option parsing.\n +++++++* [c0] commit 0\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-gpg.sh\n \ndiff --git a/t/t7608-merge-messages.sh b/t/t7608-merge-messages.sh\nindex 8e7e0a5865..7059c2a54b 100755\n--- a/t/t7608-merge-messages.sh\n+++ b/t/t7608-merge-messages.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='test auto-generated merge messages'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n check_oneline() {\ndiff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh\nindex 70afdd06fa..e65645d5e9 100755\n--- a/t/t7610-mergetool.sh\n+++ b/t/t7610-mergetool.sh\n@@ -7,6 +7,9 @@ test_description='git mergetool\n \n Testing basic merge tool invocation'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # All the mergetool test work by checking out a temporary branch based\ndiff --git a/t/t7611-merge-abort.sh b/t/t7611-merge-abort.sh\nindex 7c84a518aa..ed072bfb19 100755\n--- a/t/t7611-merge-abort.sh\n+++ b/t/t7611-merge-abort.sh\n@@ -22,6 +22,9 @@ Next, test git merge --abort with the following variables:\n - changed/unchanged worktree after merge\n - changed/unchanged index after merge\n '\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t7612-merge-verify-signatures.sh b/t/t7612-merge-verify-signatures.sh\nindex a426f3a89a..b4ec88f996 100755\n--- a/t/t7612-merge-verify-signatures.sh\n+++ b/t/t7612-merge-verify-signatures.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='merge signature verification tests'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY/lib-gpg.sh\"\n \ndiff --git a/t/t7614-merge-signoff.sh b/t/t7614-merge-signoff.sh\nindex c1b8446f49..ea4eeee35f 100755\n--- a/t/t7614-merge-signoff.sh\n+++ b/t/t7614-merge-signoff.sh\n@@ -5,6 +5,9 @@ test_description='git merge --signoff\n This test runs git merge --signoff and makes sure that it works.\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # Setup test files\ndiff --git a/t/t7701-repack-unpack-unreachable.sh b/t/t7701-repack-unpack-unreachable.sh\nindex 48261ba080..375f43a721 100755\n--- a/t/t7701-repack-unpack-unreachable.sh\n+++ b/t/t7701-repack-unpack-unreachable.sh\n@@ -2,6 +2,9 @@\n \n test_description='git repack works correctly'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n fsha1=\ndiff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh\nindex a578b35761..f938efa296 100755\n--- a/t/t7800-difftool.sh\n+++ b/t/t7800-difftool.sh\n@@ -8,6 +8,9 @@ test_description='git-difftool\n Testing basic diff tool invocation\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n difftool_test_setup ()\ndiff --git a/t/t7810-grep.sh b/t/t7810-grep.sh\nindex 991d5bd9c0..47ec993962 100755\n--- a/t/t7810-grep.sh\n+++ b/t/t7810-grep.sh\n@@ -6,6 +6,9 @@\n test_description='git grep various.\n '\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n cat >hello.c <<EOF\ndiff --git a/t/t8001-annotate.sh b/t/t8001-annotate.sh\nindex 72176e42c1..f661007c85 100755\n--- a/t/t8001-annotate.sh\n+++ b/t/t8001-annotate.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='git annotate'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n PROG='git annotate'\ndiff --git a/t/t8002-blame.sh b/t/t8002-blame.sh\nindex 015973e8fe..89a319d2c7 100755\n--- a/t/t8002-blame.sh\n+++ b/t/t8002-blame.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='git blame'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n PROG='git blame -c'\ndiff --git a/t/t8003-blame-corner-cases.sh b/t/t8003-blame-corner-cases.sh\nindex ba8013b002..0613d889db 100755\n--- a/t/t8003-blame-corner-cases.sh\n+++ b/t/t8003-blame-corner-cases.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='git blame corner cases'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n pick_fc='s/^[0-9a-f^]* *\\([^ ]*\\) *(\\([^ ]*\\) .*/\\1-\\2/'\ndiff --git a/t/t8004-blame-with-conflicts.sh b/t/t8004-blame-with-conflicts.sh\nindex 9c353ab222..ffce1d1195 100755\n--- a/t/t8004-blame-with-conflicts.sh\n+++ b/t/t8004-blame-with-conflicts.sh\n@@ -3,6 +3,9 @@\n # Based on a test case submitted by Björn Steinbrink.\n \n test_description='git blame on conflicted files'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup first case' '\ndiff --git a/t/t8012-blame-colors.sh b/t/t8012-blame-colors.sh\nindex ed38f74de9..d55b3e22c9 100755\n--- a/t/t8012-blame-colors.sh\n+++ b/t/t8012-blame-colors.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='colored git blame'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n PROG='git blame -c'\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex a08f72596a..3d160d939e 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='git send-email'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n # May be altered later in the test\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex e4bb22034e..9a6f2c38f1 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -6,6 +6,9 @@\n test_description='git svn basic tests'\n GIT_SVN_LC_ALL=${LC_ALL:-$LANG}\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-git-svn.sh\n \n case \"$GIT_SVN_LC_ALL\" in\ndiff --git a/t/t9145-git-svn-master-branch.sh b/t/t9145-git-svn-master-branch.sh\nindex 3bbf341f6a..053571ca5c 100755\n--- a/t/t9145-git-svn-master-branch.sh\n+++ b/t/t9145-git-svn-master-branch.sh\n@@ -3,6 +3,9 @@\n # Copyright (c) 2009 Eric Wong\n #\n test_description='git svn initial master branch is \"trunk\" if possible'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-git-svn.sh\n \n test_expect_success 'setup test repository' '\ndiff --git a/t/t9151-svn-mergeinfo.sh b/t/t9151-svn-mergeinfo.sh\nindex 4f6c06ecb2..9188c761de 100755\n--- a/t/t9151-svn-mergeinfo.sh\n+++ b/t/t9151-svn-mergeinfo.sh\n@@ -5,6 +5,9 @@\n \n test_description='git-svn svn mergeinfo properties'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-git-svn.sh\n \n test_expect_success 'load svn dump' \"\ndiff --git a/t/t9155-git-svn-fetch-deleted-tag.sh b/t/t9155-git-svn-fetch-deleted-tag.sh\nindex 184336f346..9d6cc40add 100755\n--- a/t/t9155-git-svn-fetch-deleted-tag.sh\n+++ b/t/t9155-git-svn-fetch-deleted-tag.sh\n@@ -2,6 +2,9 @@\n \n test_description='git svn fetch deleted tag'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-git-svn.sh\n \n test_expect_success 'setup svn repo' '\ndiff --git a/t/t9156-git-svn-fetch-deleted-tag-2.sh b/t/t9156-git-svn-fetch-deleted-tag-2.sh\nindex 7a6e33ba3c..ba78bfb676 100755\n--- a/t/t9156-git-svn-fetch-deleted-tag-2.sh\n+++ b/t/t9156-git-svn-fetch-deleted-tag-2.sh\n@@ -2,6 +2,9 @@\n \n test_description='git svn fetch deleted tag 2'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-git-svn.sh\n \n test_expect_success 'setup svn repo' '\ndiff --git a/t/t9163-git-svn-reset-clears-caches.sh b/t/t9163-git-svn-reset-clears-caches.sh\nindex d6245cee08..e48faf92af 100755\n--- a/t/t9163-git-svn-reset-clears-caches.sh\n+++ b/t/t9163-git-svn-reset-clears-caches.sh\n@@ -4,6 +4,9 @@\n #\n \n test_description='git svn reset clears memoized caches'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-git-svn.sh\n \n svn_ver=\"$(svn --version --quiet)\"\ndiff --git a/t/t9169-git-svn-dcommit-crlf.sh b/t/t9169-git-svn-dcommit-crlf.sh\nindex 54b1f61a2a..47ae51c54f 100755\n--- a/t/t9169-git-svn-dcommit-crlf.sh\n+++ b/t/t9169-git-svn-dcommit-crlf.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='git svn dcommit CRLF'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-git-svn.sh\n \n test_expect_success 'setup commit repository' '\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex 308c1ef42c..404a42999e 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -4,6 +4,9 @@\n #\n \n test_description='test git fast-import utility'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/diff-lib.sh ;# test-lib chdir's into trash\n \ndiff --git a/t/t9301-fast-import-notes.sh b/t/t9301-fast-import-notes.sh\nindex 14c1baa739..0c5bfbde0e 100755\n--- a/t/t9301-fast-import-notes.sh\n+++ b/t/t9301-fast-import-notes.sh\n@@ -4,6 +4,9 @@\n #\n \n test_description='test git fast-import of notes objects'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n \ndiff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh\nindex 1372842559..6c8830ece5 100755\n--- a/t/t9350-fast-export.sh\n+++ b/t/t9350-fast-export.sh\n@@ -4,6 +4,9 @@\n #\n \n test_description='git fast-export'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t9351-fast-export-anonymize.sh b/t/t9351-fast-export-anonymize.sh\nindex 5ac2c3b5ee..4130c8a837 100755\n--- a/t/t9351-fast-export-anonymize.sh\n+++ b/t/t9351-fast-export-anonymize.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='basic tests for fast-export --anonymize'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n test_expect_success 'setup simple repo' '\ndiff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh\nindex 4a46f31c41..7d23e6ba94 100755\n--- a/t/t9400-git-cvsserver-server.sh\n+++ b/t/t9400-git-cvsserver-server.sh\n@@ -8,6 +8,9 @@ test_description='git-cvsserver access\n tests read access to a git repository with the\n cvs CLI client via git-cvsserver server'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n if ! test_have_prereq PERL; then\ndiff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh\nindex c7a0dd84a4..0062341dbf 100755\n--- a/t/t9401-git-cvsserver-crlf.sh\n+++ b/t/t9401-git-cvsserver-crlf.sh\n@@ -9,6 +9,9 @@ test_description='git-cvsserver -kb modes\n tests -kb mode for binary files when accessing a git\n repository using cvs CLI client via git-cvsserver server'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n marked_as () {\ndiff --git a/t/t9402-git-cvsserver-refs.sh b/t/t9402-git-cvsserver-refs.sh\nindex 6436c91a3c..33b6db1648 100755\n--- a/t/t9402-git-cvsserver-refs.sh\n+++ b/t/t9402-git-cvsserver-refs.sh\n@@ -5,6 +5,9 @@ test_description='git-cvsserver and git refspecs\n tests ability for git-cvsserver to switch between and compare\n tags, branches and other git refspecs'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n #########\ndiff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\nindex b484e3e250..fa36bf5e83 100755\n--- a/t/t9500-gitweb-standalone-no-errors.sh\n+++ b/t/t9500-gitweb-standalone-no-errors.sh\n@@ -10,6 +10,9 @@ commandline, and checks that it would not write any errors\n or warnings to log.'\n \n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./gitweb-lib.sh\n \n # ----------------------------------------------------------------------\ndiff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-status.sh\nindex 2a0ffed870..6b0adf28d2 100755\n--- a/t/t9501-gitweb-standalone-http-status.sh\n+++ b/t/t9501-gitweb-standalone-http-status.sh\n@@ -10,6 +10,9 @@ commandline, and checks that it returns the expected HTTP status\n code and message.'\n \n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./gitweb-lib.sh\n \n #\ndiff --git a/t/t9502-gitweb-standalone-parse-output.sh b/t/t9502-gitweb-standalone-parse-output.sh\nindex e38cbc97d3..76d90eccd8 100755\n--- a/t/t9502-gitweb-standalone-parse-output.sh\n+++ b/t/t9502-gitweb-standalone-parse-output.sh\n@@ -10,6 +10,9 @@ commandline, and checks that it produces the correct output, either\n in the HTTP header or the actual script output.'\n \n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./gitweb-lib.sh\n \n # ----------------------------------------------------------------------\ndiff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh\nindex 251fdd66c4..9257d664f2 100755\n--- a/t/t9600-cvsimport.sh\n+++ b/t/t9600-cvsimport.sh\n@@ -1,6 +1,9 @@\n #!/bin/sh\n \n test_description='git cvsimport basic tests'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-cvs.sh\n \n if ! test_have_prereq NOT_ROOT; then\ndiff --git a/t/t9601-cvsimport-vendor-branch.sh b/t/t9601-cvsimport-vendor-branch.sh\nindex 827d39f5bf..700c2688d2 100755\n--- a/t/t9601-cvsimport-vendor-branch.sh\n+++ b/t/t9601-cvsimport-vendor-branch.sh\n@@ -32,6 +32,9 @@\n #       tag has been removed.\n \n test_description='git cvsimport handling of vendor branches'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-cvs.sh\n \n setup_cvs_test_repository t9601\ndiff --git a/t/t9602-cvsimport-branches-tags.sh b/t/t9602-cvsimport-branches-tags.sh\nindex e1db323f54..7b1fb36e67 100755\n--- a/t/t9602-cvsimport-branches-tags.sh\n+++ b/t/t9602-cvsimport-branches-tags.sh\n@@ -4,6 +4,9 @@\n # t9602/README.\n \n test_description='git cvsimport handling of branches and tags'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-cvs.sh\n \n setup_cvs_test_repository t9602\ndiff --git a/t/t9603-cvsimport-patchsets.sh b/t/t9603-cvsimport-patchsets.sh\nindex e7a91611dc..87cd8c0c6b 100755\n--- a/t/t9603-cvsimport-patchsets.sh\n+++ b/t/t9603-cvsimport-patchsets.sh\n@@ -12,6 +12,9 @@\n # bug.\n \n test_description='git cvsimport testing for correct patchset estimation'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-cvs.sh\n \n setup_cvs_test_repository t9603\ndiff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh\nindex c98c1dfc23..c920b84778 100755\n--- a/t/t9800-git-p4-basic.sh\n+++ b/t/t9800-git-p4-basic.sh\n@@ -2,6 +2,9 @@\n \n test_description='git p4 tests'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh\nindex a3abd778f9..ebfe9d8195 100755\n--- a/t/t9801-git-p4-branch.sh\n+++ b/t/t9801-git-p4-branch.sh\n@@ -2,6 +2,9 @@\n \n test_description='git p4 tests for p4 branches'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9806-git-p4-options.sh b/t/t9806-git-p4-options.sh\nindex 4e794a01bf..c7629b6c7d 100755\n--- a/t/t9806-git-p4-options.sh\n+++ b/t/t9806-git-p4-options.sh\n@@ -2,6 +2,9 @@\n \n test_description='git p4 options'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh\nindex eaaae414a1..f12e6f7206 100755\n--- a/t/t9807-git-p4-submit.sh\n+++ b/t/t9807-git-p4-submit.sh\n@@ -2,6 +2,9 @@\n \n test_description='git p4 submit'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh\nindex c1446f26ab..c53952ac14 100755\n--- a/t/t9811-git-p4-label-import.sh\n+++ b/t/t9811-git-p4-label-import.sh\n@@ -2,6 +2,9 @@\n \n test_description='git p4 label tests'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-git-p4.sh\n \n test_expect_success 'start p4d' '\ndiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\nindex 5c01c75d40..ac436df3b4 100755\n--- a/t/t9902-completion.sh\n+++ b/t/t9902-completion.sh\n@@ -5,6 +5,9 @@\n \n test_description='test bash completion'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-bash.sh\n \n complete ()\ndiff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh\nindex ab5da2cabc..f5b5935c2c 100755\n--- a/t/t9903-bash-prompt.sh\n+++ b/t/t9903-bash-prompt.sh\n@@ -5,6 +5,9 @@\n \n test_description='test git-specific bash prompt functions'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./lib-bash.sh\n \n . \"$GIT_BUILD_DIR/contrib/completion/git-prompt.sh\"\n-- \ngitgitgadget\n\n"},{"id":"410286","messageId":"36d633a5ec90c960df51a004a2d097ed4c31dfae.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 10/28] t5323: prepare centered comment for `master` -> `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:28Z","receivedAt":"2020-11-18T23:45:19Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe are about to search-and-replace all mentions of `master` in t5323 by\n`main`, which is two characters shorter. To prepare for that, let's add\npadding to centered lines that will make them briefly uncentered, but\nwill be re-centered in the commit that performs that rename.\n\nDoing it this way (instead of padding after replacing) makes it easier\nto verify the validity of the patch that replaces `master` by `main`.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5323-pack-redundant.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh\nindex 6b4d1ca353..3903148926 100755\n--- a/t/t5323-pack-redundant.sh\n+++ b/t/t5323-pack-redundant.sh\n@@ -312,7 +312,7 @@ test_expect_success 'shared: all packs are redundant, but no output without --al\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================ master.git ===============\n+#     ================= master.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------+\n #     ----+--------------------------------------             |\n #     P1  | x x x x x x x                       x             |\n@@ -394,7 +394,7 @@ test_expect_success 'shared: no redundant without --alt-odb' '\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================ master.git ===============\n+#     ================= master.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------------+\n #     ----+--------------------------------------                   |\n #     P1  | x x x x x x x                       x                   |\n@@ -426,7 +426,7 @@ test_expect_success 'shared: one pack is redundant with --alt-odb' '\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================ master.git ===============\n+#     ================= master.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------------+\n #     ----+--------------------------------------                   |\n #     P1  | x x x x x x x                       x                   |\n-- \ngitgitgadget\n\n"},{"id":"410287","messageId":"f5dbc0d5bbc3540560d9b7de52e88a1f8d183d08.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 04/28] t2*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:22Z","receivedAt":"2020-11-18T23:45:19Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t2106, which sees independent development elsewhere\nat the time of writing, we transition above-mentioned tests to the\ndefault branch name `main`. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t2*.sh &&\n\t   git checkout HEAD -- t2106\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t2007-checkout-symlink.sh      | 12 +++---\n t/t2009-checkout-statinfo.sh     | 10 ++---\n t/t2010-checkout-ambiguous.sh    |  6 +--\n t/t2011-checkout-invalid-head.sh | 18 ++++----\n t/t2012-checkout-last.sh         | 50 +++++++++++------------\n t/t2015-checkout-unborn.sh       |  4 +-\n t/t2017-checkout-orphan.sh       | 46 ++++++++++-----------\n t/t2020-checkout-detach.sh       | 30 +++++++-------\n t/t2022-checkout-paths.sh        | 24 +++++------\n t/t2023-checkout-m.sh            | 12 +++---\n t/t2024-checkout-dwim.sh         | 70 ++++++++++++++++----------------\n t/t2027-checkout-track.sh        |  8 ++--\n t/t2030-unresolve-info.sh        |  8 ++--\n t/t2060-switch.sh                | 32 +++++++--------\n t/t2070-restore.sh               |  6 +--\n t/t2400-worktree-add.sh          | 68 +++++++++++++++----------------\n t/t2401-worktree-prune.sh        |  4 +-\n t/t2402-worktree-list.sh         | 22 +++++-----\n t/t2405-worktree-submodule.sh    |  8 ++--\n 19 files changed, 219 insertions(+), 219 deletions(-)\n\ndiff --git a/t/t2007-checkout-symlink.sh b/t/t2007-checkout-symlink.sh\nindex 8879a78b85..6f0b90ce12 100755\n--- a/t/t2007-checkout-symlink.sh\n+++ b/t/t2007-checkout-symlink.sh\n@@ -4,7 +4,7 @@\n \n test_description='git checkout to switch between branches with symlink<->dir'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -15,14 +15,14 @@ test_expect_success setup '\n \techo hello >frotz/filfre &&\n \tgit add frotz/filfre &&\n \ttest_tick &&\n-\tgit commit -m \"master has file frotz/filfre\" &&\n+\tgit commit -m \"main has file frotz/filfre\" &&\n \n \tgit branch side &&\n \n \techo goodbye >nitfol &&\n \tgit add nitfol &&\n \ttest_tick &&\n-\tgit commit -m \"master adds file nitfol\" &&\n+\tgit commit -m \"main adds file nitfol\" &&\n \n \tgit checkout side &&\n \n@@ -37,13 +37,13 @@ test_expect_success setup '\n \n test_expect_success 'switch from symlink to dir' '\n \n-\tgit checkout master\n+\tgit checkout main\n \n '\n \n-test_expect_success 'Remove temporary directories & switch to master' '\n+test_expect_success 'Remove temporary directories & switch to main' '\n \trm -fr frotz xyzzy nitfol &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'switch from dir to symlink' '\ndiff --git a/t/t2009-checkout-statinfo.sh b/t/t2009-checkout-statinfo.sh\nindex 9af4d6ca5e..b0540636ae 100755\n--- a/t/t2009-checkout-statinfo.sh\n+++ b/t/t2009-checkout-statinfo.sh\n@@ -2,7 +2,7 @@\n \n test_description='checkout should leave clean stat info'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -24,13 +24,13 @@ test_expect_success 'branch switching' '\n \tgit reset --hard &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n \tgit checkout side &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest \"$(git diff-files --raw)\" = \"\"\n \n '\n@@ -40,13 +40,13 @@ test_expect_success 'path checkout' '\n \tgit reset --hard &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n-\tgit checkout master world &&\n+\tgit checkout main world &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n \tgit checkout side world &&\n \ttest \"$(git diff-files --raw)\" = \"\" &&\n \n-\tgit checkout master world &&\n+\tgit checkout main world &&\n \ttest \"$(git diff-files --raw)\" = \"\"\n \n '\ndiff --git a/t/t2010-checkout-ambiguous.sh b/t/t2010-checkout-ambiguous.sh\nindex 3f5431e033..6e8757387d 100755\n--- a/t/t2010-checkout-ambiguous.sh\n+++ b/t/t2010-checkout-ambiguous.sh\n@@ -2,7 +2,7 @@\n \n test_description='checkout and pathspecs/refspecs ambiguities'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -20,7 +20,7 @@ test_expect_success 'reference must be a tree' '\n '\n \n test_expect_success 'branch switching' '\n-\ttest \"refs/heads/master\" = \"$(git symbolic-ref HEAD)\" &&\n+\ttest \"refs/heads/main\" = \"$(git symbolic-ref HEAD)\" &&\n \tgit checkout world -- &&\n \ttest \"refs/heads/world\" = \"$(git symbolic-ref HEAD)\"\n '\n@@ -60,7 +60,7 @@ test_expect_success 'disambiguate checking out from a tree-ish' '\n '\n \n test_expect_success 'accurate error message with more than one ref' '\n-\ttest_must_fail git checkout HEAD master -- 2>actual &&\n+\ttest_must_fail git checkout HEAD main -- 2>actual &&\n \ttest_i18ngrep 2 actual &&\n \ttest_i18ngrep \"one reference expected, 2 given\" actual\n '\ndiff --git a/t/t2011-checkout-invalid-head.sh b/t/t2011-checkout-invalid-head.sh\nindex fede33ff1f..e52022e152 100755\n--- a/t/t2011-checkout-invalid-head.sh\n+++ b/t/t2011-checkout-invalid-head.sh\n@@ -2,7 +2,7 @@\n \n test_description='checkout switching away from an invalid branch'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -14,12 +14,12 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'checkout should not start branch from a tree' '\n-\ttest_must_fail git checkout -b newbranch master^{tree}\n+\ttest_must_fail git checkout -b newbranch main^{tree}\n '\n \n-test_expect_success 'checkout master from invalid HEAD' '\n+test_expect_success 'checkout main from invalid HEAD' '\n \techo $ZERO_OID >.git/HEAD &&\n-\tgit checkout master --\n+\tgit checkout main --\n '\n \n test_expect_success 'checkout notices failure to lock HEAD' '\n@@ -29,7 +29,7 @@ test_expect_success 'checkout notices failure to lock HEAD' '\n '\n \n test_expect_success 'create ref directory/file conflict scenario' '\n-\tgit update-ref refs/heads/outer/inner master &&\n+\tgit update-ref refs/heads/outer/inner main &&\n \n \t# do not rely on symbolic-ref to get a known state,\n \t# as it may use the same code we are testing\n@@ -40,12 +40,12 @@ test_expect_success 'create ref directory/file conflict scenario' '\n \n test_expect_success 'checkout away from d/f HEAD (unpacked, to branch)' '\n \treset_to_df &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'checkout away from d/f HEAD (unpacked, to detached)' '\n \treset_to_df &&\n-\tgit checkout --detach master\n+\tgit checkout --detach main\n '\n \n test_expect_success 'pack refs' '\n@@ -54,11 +54,11 @@ test_expect_success 'pack refs' '\n \n test_expect_success 'checkout away from d/f HEAD (packed, to branch)' '\n \treset_to_df &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'checkout away from d/f HEAD (packed, to detached)' '\n \treset_to_df &&\n-\tgit checkout --detach master\n+\tgit checkout --detach main\n '\n test_done\ndiff --git a/t/t2012-checkout-last.sh b/t/t2012-checkout-last.sh\nindex 16bf19f7ee..028a00d6ba 100755\n--- a/t/t2012-checkout-last.sh\n+++ b/t/t2012-checkout-last.sh\n@@ -2,7 +2,7 @@\n \n test_description='checkout can switch to last branch and merge base'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -27,7 +27,7 @@ test_expect_success 'first branch switch' '\n \n test_expect_success '\"checkout -\" switches back' '\n \tgit checkout - &&\n-\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/master\"\n+\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/main\"\n '\n \n test_expect_success '\"checkout -\" switches forth' '\n@@ -101,56 +101,56 @@ test_expect_success 'merge base test setup' '\n \tgit commit -m third\n '\n \n-test_expect_success 'another...master' '\n+test_expect_success 'another...main' '\n \tgit checkout another &&\n-\tgit checkout another...master &&\n-\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify master^)\"\n+\tgit checkout another...main &&\n+\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify main^)\"\n '\n \n-test_expect_success '...master' '\n+test_expect_success '...main' '\n \tgit checkout another &&\n-\tgit checkout ...master &&\n-\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify master^)\"\n+\tgit checkout ...main &&\n+\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify main^)\"\n '\n \n-test_expect_success 'master...' '\n+test_expect_success 'main...' '\n \tgit checkout another &&\n-\tgit checkout master... &&\n-\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify master^)\"\n+\tgit checkout main... &&\n+\ttest \"z$(git rev-parse --verify HEAD)\" = \"z$(git rev-parse --verify main^)\"\n '\n \n test_expect_success '\"checkout -\" works after a rebase A' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout other &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \tgit checkout - &&\n-\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/master\"\n+\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/main\"\n '\n \n test_expect_success '\"checkout -\" works after a rebase A B' '\n-\tgit branch moodle master~1 &&\n-\tgit checkout master &&\n+\tgit branch moodle main~1 &&\n+\tgit checkout main &&\n \tgit checkout other &&\n-\tgit rebase master moodle &&\n+\tgit rebase main moodle &&\n \tgit checkout - &&\n-\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/master\"\n+\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/main\"\n '\n \n test_expect_success '\"checkout -\" works after a rebase -i A' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout other &&\n-\tgit rebase -i master &&\n+\tgit rebase -i main &&\n \tgit checkout - &&\n-\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/master\"\n+\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/main\"\n '\n \n test_expect_success '\"checkout -\" works after a rebase -i A B' '\n-\tgit branch foodle master~1 &&\n-\tgit checkout master &&\n+\tgit branch foodle main~1 &&\n+\tgit checkout main &&\n \tgit checkout other &&\n-\tgit rebase master foodle &&\n+\tgit rebase main foodle &&\n \tgit checkout - &&\n-\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/master\"\n+\ttest \"z$(git symbolic-ref HEAD)\" = \"zrefs/heads/main\"\n '\n \n test_done\ndiff --git a/t/t2015-checkout-unborn.sh b/t/t2015-checkout-unborn.sh\nindex 669a70c76f..a9721215fa 100755\n--- a/t/t2015-checkout-unborn.sh\n+++ b/t/t2015-checkout-unborn.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='checkout from unborn branch'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -14,7 +14,7 @@ test_expect_success 'setup' '\n \t git add file &&\n \t git commit -m base\n \t) &&\n-\tgit fetch parent master:origin\n+\tgit fetch parent main:origin\n '\n \n test_expect_success 'checkout from unborn preserves untracked files' '\ndiff --git a/t/t2017-checkout-orphan.sh b/t/t2017-checkout-orphan.sh\nindex 999e976c62..c7adbdd39a 100755\n--- a/t/t2017-checkout-orphan.sh\n+++ b/t/t2017-checkout-orphan.sh\n@@ -7,7 +7,7 @@ test_description='git checkout --orphan\n \n Main Tests for --orphan functionality.'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -32,34 +32,34 @@ test_expect_success '--orphan creates a new orphan branch from HEAD' '\n \ttest_tick &&\n \tgit commit -m \"Third Commit\" &&\n \ttest_must_fail git rev-parse --verify HEAD^ &&\n-\tgit diff-tree --quiet master alpha\n+\tgit diff-tree --quiet main alpha\n '\n \n test_expect_success '--orphan creates a new orphan branch from <start_point>' '\n-\tgit checkout master &&\n-\tgit checkout --orphan beta master^ &&\n+\tgit checkout main &&\n+\tgit checkout --orphan beta main^ &&\n \ttest_must_fail git rev-parse --verify HEAD &&\n \ttest \"refs/heads/beta\" = \"$(git symbolic-ref HEAD)\" &&\n \ttest_tick &&\n \tgit commit -m \"Fourth Commit\" &&\n \ttest_must_fail git rev-parse --verify HEAD^ &&\n-\tgit diff-tree --quiet master^ beta\n+\tgit diff-tree --quiet main^ beta\n '\n \n test_expect_success '--orphan must be rejected with -b' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git checkout --orphan new -b newer &&\n-\ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n+\ttest refs/heads/main = \"$(git symbolic-ref HEAD)\"\n '\n \n test_expect_success '--orphan must be rejected with -t' '\n-\tgit checkout master &&\n-\ttest_must_fail git checkout --orphan new -t master &&\n-\ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n+\tgit checkout main &&\n+\ttest_must_fail git checkout --orphan new -t main &&\n+\ttest refs/heads/main = \"$(git symbolic-ref HEAD)\"\n '\n \n test_expect_success '--orphan ignores branch.autosetupmerge' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config branch.autosetupmerge always &&\n \tgit checkout --orphan gamma &&\n \ttest -z \"$(git config branch.gamma.merge)\" &&\n@@ -68,7 +68,7 @@ test_expect_success '--orphan ignores branch.autosetupmerge' '\n '\n \n test_expect_success '--orphan makes reflog by default' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config --unset core.logAllRefUpdates &&\n \tgit checkout --orphan delta &&\n \ttest_must_fail git rev-parse --verify delta@{0} &&\n@@ -77,7 +77,7 @@ test_expect_success '--orphan makes reflog by default' '\n '\n \n test_expect_success '--orphan does not make reflog when core.logAllRefUpdates = false' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config core.logAllRefUpdates false &&\n \tgit checkout --orphan epsilon &&\n \ttest_must_fail git rev-parse --verify epsilon@{0} &&\n@@ -86,7 +86,7 @@ test_expect_success '--orphan does not make reflog when core.logAllRefUpdates =\n '\n \n test_expect_success '--orphan with -l makes reflog when core.logAllRefUpdates = false' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -l --orphan zeta &&\n \ttest_must_fail git rev-parse --verify zeta@{0} &&\n \tgit commit -m Zeta &&\n@@ -94,33 +94,33 @@ test_expect_success '--orphan with -l makes reflog when core.logAllRefUpdates =\n '\n \n test_expect_success 'giving up --orphan not committed when -l and core.logAllRefUpdates = false deletes reflog' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -l --orphan eta &&\n \ttest_must_fail git rev-parse --verify eta@{0} &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git rev-parse --verify eta@{0}\n '\n \n test_expect_success '--orphan is rejected with an existing name' '\n-\tgit checkout master &&\n-\ttest_must_fail git checkout --orphan master &&\n-\ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n+\tgit checkout main &&\n+\ttest_must_fail git checkout --orphan main &&\n+\ttest refs/heads/main = \"$(git symbolic-ref HEAD)\"\n '\n \n test_expect_success '--orphan refuses to switch if a merge is needed' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard &&\n \techo local >>\"$TEST_FILE\" &&\n \tcat \"$TEST_FILE\" >\"$TEST_FILE.saved\" &&\n-\ttest_must_fail git checkout --orphan new master^ &&\n-\ttest refs/heads/master = \"$(git symbolic-ref HEAD)\" &&\n+\ttest_must_fail git checkout --orphan new main^ &&\n+\ttest refs/heads/main = \"$(git symbolic-ref HEAD)\" &&\n \ttest_cmp \"$TEST_FILE\" \"$TEST_FILE.saved\" &&\n \tgit diff-index --quiet --cached HEAD &&\n \tgit reset --hard\n '\n \n test_expect_success 'cannot --detach on an unborn branch' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout --orphan new &&\n \ttest_must_fail git checkout --detach\n '\ndiff --git a/t/t2020-checkout-detach.sh b/t/t2020-checkout-detach.sh\nindex 45d87c23b1..b432b6427b 100755\n--- a/t/t2020-checkout-detach.sh\n+++ b/t/t2020-checkout-detach.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='checkout into detached HEAD state'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -25,7 +25,7 @@ check_no_orphan_warning() {\n }\n \n reset () {\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcheck_not_detached\n }\n \n@@ -88,7 +88,7 @@ test_expect_success 'checkout --detach errors out for non-commit' '\n \n test_expect_success 'checkout --detach errors out for extra argument' '\n \treset &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git checkout --detach tag one.t &&\n \tcheck_not_detached\n '\n@@ -116,7 +116,7 @@ test_expect_success 'checkout warns on orphan commits' '\n \techo new content >orphan &&\n \tgit commit -a -m orphan2 &&\n \torphan2=$(git rev-parse HEAD) &&\n-\tgit checkout master 2>stderr\n+\tgit checkout main 2>stderr\n '\n \n test_expect_success 'checkout warns on orphan commits: output' '\n@@ -135,7 +135,7 @@ test_expect_success 'checkout warns orphaning 1 of 2 commits: output' '\n test_expect_success 'checkout does not warn leaving ref tip' '\n \treset &&\n \tgit checkout --detach two &&\n-\tgit checkout master 2>stderr\n+\tgit checkout main 2>stderr\n '\n \n test_expect_success 'checkout does not warn leaving ref tip' '\n@@ -145,7 +145,7 @@ test_expect_success 'checkout does not warn leaving ref tip' '\n test_expect_success 'checkout does not warn leaving reachable commit' '\n \treset &&\n \tgit checkout --detach HEAD^ &&\n-\tgit checkout master 2>stderr\n+\tgit checkout main 2>stderr\n '\n \n test_expect_success 'checkout does not warn leaving reachable commit' '\n@@ -153,14 +153,14 @@ test_expect_success 'checkout does not warn leaving reachable commit' '\n '\n \n cat >expect <<'EOF'\n-Your branch is behind 'master' by 1 commit, and can be fast-forwarded.\n+Your branch is behind 'main' by 1 commit, and can be fast-forwarded.\n   (use \"git pull\" to update your local branch)\n EOF\n test_expect_success 'tracking count is accurate after orphan check' '\n \treset &&\n-\tgit branch child master^ &&\n+\tgit branch child main^ &&\n \tgit config branch.child.remote . &&\n-\tgit config branch.child.merge refs/heads/master &&\n+\tgit config branch.child.merge refs/heads/main &&\n \tgit checkout child^ &&\n \tgit checkout child >stdout &&\n \ttest_i18ncmp expect stdout\n@@ -192,9 +192,9 @@ test_expect_success 'no advice given for explicit detached head state' '\n # Detached HEAD tests for GIT_PRINT_SHA1_ELLIPSIS (new format)\n test_expect_success 'describe_detached_head prints no SHA-1 ellipsis when not asked to' \"\n \n-\tcommit=$(git rev-parse --short=12 master^) &&\n-\tcommit2=$(git rev-parse --short=12 master~2) &&\n-\tcommit3=$(git rev-parse --short=12 master~3) &&\n+\tcommit=$(git rev-parse --short=12 main^) &&\n+\tcommit2=$(git rev-parse --short=12 main~2) &&\n+\tcommit3=$(git rev-parse --short=12 main~3) &&\n \n \t# The first detach operation is more chatty than the following ones.\n \tcat >1st_detach <<-EOF &&\n@@ -274,9 +274,9 @@ test_expect_success 'describe_detached_head prints no SHA-1 ellipsis when not as\n # Detached HEAD tests for GIT_PRINT_SHA1_ELLIPSIS (old format)\n test_expect_success 'describe_detached_head does print SHA-1 ellipsis when asked to' \"\n \n-\tcommit=$(git rev-parse --short=12 master^) &&\n-\tcommit2=$(git rev-parse --short=12 master~2) &&\n-\tcommit3=$(git rev-parse --short=12 master~3) &&\n+\tcommit=$(git rev-parse --short=12 main^) &&\n+\tcommit2=$(git rev-parse --short=12 main~2) &&\n+\tcommit3=$(git rev-parse --short=12 main~3) &&\n \n \t# The first detach operation is more chatty than the following ones.\n \tcat >1st_detach <<-EOF &&\ndiff --git a/t/t2022-checkout-paths.sh b/t/t2022-checkout-paths.sh\nindex fc0f5b775c..c49ba7f9bd 100755\n--- a/t/t2022-checkout-paths.sh\n+++ b/t/t2022-checkout-paths.sh\n@@ -1,22 +1,22 @@\n #!/bin/sh\n \n test_description='checkout $tree -- $paths'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n \n test_expect_success setup '\n \tmkdir dir &&\n-\t>dir/master &&\n+\t>dir/main &&\n \techo common >dir/common &&\n-\tgit add dir/master dir/common &&\n-\ttest_tick && git commit -m \"master has dir/master\" &&\n+\tgit add dir/main dir/common &&\n+\ttest_tick && git commit -m \"main has dir/main\" &&\n \tgit checkout -b next &&\n-\tgit mv dir/master dir/next0 &&\n+\tgit mv dir/main dir/next0 &&\n \techo next >dir/next1 &&\n \tgit add dir &&\n-\ttest_tick && git commit -m \"next has dir/next but not dir/master\"\n+\ttest_tick && git commit -m \"next has dir/next but not dir/main\"\n '\n \n test_expect_success 'checking out paths out of a tree does not clobber unrelated paths' '\n@@ -29,11 +29,11 @@ test_expect_success 'checking out paths out of a tree does not clobber unrelated\n \techo untracked >expect.next2 &&\n \tcat expect.next2 >dir/next2 &&\n \n-\tgit checkout master dir &&\n+\tgit checkout main dir &&\n \n \ttest_cmp expect.common dir/common &&\n-\ttest_path_is_file dir/master &&\n-\tgit diff --exit-code master dir/master &&\n+\ttest_path_is_file dir/main &&\n+\tgit diff --exit-code main dir/main &&\n \n \ttest_path_is_missing dir/next0 &&\n \ttest_cmp expect.next1 dir/next1 &&\n@@ -55,11 +55,11 @@ test_expect_success 'do not touch unmerged entries matching $path but not in $tr\n \tEOF\n \tgit update-index --index-info <expect.next0 &&\n \n-\tgit checkout master dir &&\n+\tgit checkout main dir &&\n \n \ttest_cmp expect.common dir/common &&\n-\ttest_path_is_file dir/master &&\n-\tgit diff --exit-code master dir/master &&\n+\ttest_path_is_file dir/main &&\n+\tgit diff --exit-code main dir/main &&\n \tgit ls-files -s dir/next0 >actual.next0 &&\n \ttest_cmp expect.next0 actual.next0\n '\ndiff --git a/t/t2023-checkout-m.sh b/t/t2023-checkout-m.sh\nindex f2f4f5b3ac..7b327b7544 100755\n--- a/t/t2023-checkout-m.sh\n+++ b/t/t2023-checkout-m.sh\n@@ -4,7 +4,7 @@ test_description='checkout -m -- <conflicted path>\n \n Ensures that checkout -m on a resolved file restores the conflicted file'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -13,15 +13,15 @@ test_expect_success setup '\n \ttest_tick &&\n \ttest_commit both.txt both.txt initial &&\n \tgit branch topic &&\n-\ttest_commit modified_in_master both.txt in_master &&\n-\ttest_commit added_in_master each.txt in_master &&\n+\ttest_commit modified_in_main both.txt in_main &&\n+\ttest_commit added_in_main each.txt in_main &&\n \tgit checkout topic &&\n \ttest_commit modified_in_topic both.txt in_topic &&\n \ttest_commit added_in_topic each.txt in_topic\n '\n \n-test_expect_success 'git merge master' '\n-    test_must_fail git merge master\n+test_expect_success 'git merge main' '\n+    test_must_fail git merge main\n '\n \n clean_branchnames () {\n@@ -64,7 +64,7 @@ test_expect_success 'force checkout a conflict file creates stage zero entry' '\n \t\tgit checkout topic &&\n \t\techo c >a &&\n \t\tC_OBJ=$(git hash-object a) &&\n-\t\tgit checkout -m master &&\n+\t\tgit checkout -m main &&\n \t\ttest_cmp_rev :1:a $A_OBJ &&\n \t\ttest_cmp_rev :2:a $B_OBJ &&\n \t\ttest_cmp_rev :3:a $C_OBJ &&\ndiff --git a/t/t2024-checkout-dwim.sh b/t/t2024-checkout-dwim.sh\nindex a4f8d3a67e..4a1c901456 100755\n--- a/t/t2024-checkout-dwim.sh\n+++ b/t/t2024-checkout-dwim.sh\n@@ -29,11 +29,11 @@ status_uno_is_clean () {\n }\n \n test_expect_success 'setup' '\n-\ttest_commit my_master &&\n+\ttest_commit my_main &&\n \tgit init repo_a &&\n \t(\n \t\tcd repo_a &&\n-\t\ttest_commit a_master &&\n+\t\ttest_commit a_main &&\n \t\tgit checkout -b foo &&\n \t\ttest_commit a_foo &&\n \t\tgit checkout -b bar &&\n@@ -44,7 +44,7 @@ test_expect_success 'setup' '\n \tgit init repo_b &&\n \t(\n \t\tcd repo_b &&\n-\t\ttest_commit b_master &&\n+\t\ttest_commit b_main &&\n \t\tgit checkout -b foo &&\n \t\ttest_commit b_foo &&\n \t\tgit checkout -b baz &&\n@@ -60,23 +60,23 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'checkout of non-existing branch fails' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D xyzzy &&\n \n \ttest_must_fail git checkout xyzzy &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/xyzzy &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout of branch from multiple remotes fails #1' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D foo &&\n \n \ttest_must_fail git checkout foo &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/foo &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'when arg matches multiple remotes, do not fallback to interpreting as pathspec' '\n@@ -100,21 +100,21 @@ test_expect_success 'when arg matches multiple remotes, do not fallback to inter\n '\n \n test_expect_success 'checkout of branch from multiple remotes fails with advice' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D foo &&\n \ttest_must_fail git checkout foo 2>stderr &&\n-\ttest_branch master &&\n+\ttest_branch main &&\n \tstatus_uno_is_clean &&\n \ttest_i18ngrep \"^hint: \" stderr &&\n \ttest_must_fail git -c advice.checkoutAmbiguousRemoteBranchName=false \\\n \t\tcheckout foo 2>stderr &&\n-\ttest_branch master &&\n+\ttest_branch main &&\n \tstatus_uno_is_clean &&\n \ttest_i18ngrep ! \"^hint: \" stderr\n '\n \n test_expect_success PERL 'checkout -p with multiple remotes does not print advice' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D foo &&\n \n \tgit checkout -p foo 2>stderr &&\n@@ -123,7 +123,7 @@ test_expect_success PERL 'checkout -p with multiple remotes does not print advic\n '\n \n test_expect_success 'checkout of branch from multiple remotes succeeds with checkout.defaultRemote #1' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D foo &&\n \n@@ -135,7 +135,7 @@ test_expect_success 'checkout of branch from multiple remotes succeeds with chec\n '\n \n test_expect_success 'checkout of branch from a single remote succeeds #1' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D bar &&\n \n \tgit checkout bar &&\n@@ -146,7 +146,7 @@ test_expect_success 'checkout of branch from a single remote succeeds #1' '\n '\n \n test_expect_success 'checkout of branch from a single remote succeeds #2' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \ttest_might_fail git branch -D baz &&\n \n \tgit checkout baz &&\n@@ -157,33 +157,33 @@ test_expect_success 'checkout of branch from a single remote succeeds #2' '\n '\n \n test_expect_success '--no-guess suppresses branch auto-vivification' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D bar &&\n \n \ttest_must_fail git checkout --no-guess bar &&\n \ttest_must_fail git rev-parse --verify refs/heads/bar &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout.guess = false suppresses branch auto-vivification' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D bar &&\n \n \ttest_config checkout.guess false &&\n \ttest_must_fail git checkout bar &&\n \ttest_must_fail git rev-parse --verify refs/heads/bar &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'setup more remotes with unconventional refspecs' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \tgit init repo_c &&\n \t(\n \t\tcd repo_c &&\n-\t\ttest_commit c_master &&\n+\t\ttest_commit c_main &&\n \t\tgit checkout -b bar &&\n \t\ttest_commit c_bar &&\n \t\tgit checkout -b spam &&\n@@ -192,7 +192,7 @@ test_expect_success 'setup more remotes with unconventional refspecs' '\n \tgit init repo_d &&\n \t(\n \t\tcd repo_d &&\n-\t\ttest_commit d_master &&\n+\t\ttest_commit d_main &&\n \t\tgit checkout -b baz &&\n \t\ttest_commit d_baz &&\n \t\tgit checkout -b eggs &&\n@@ -208,29 +208,29 @@ test_expect_success 'setup more remotes with unconventional refspecs' '\n '\n \n test_expect_success 'checkout of branch from multiple remotes fails #2' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D bar &&\n \n \ttest_must_fail git checkout bar &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/bar &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout of branch from multiple remotes fails #3' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D baz &&\n \n \ttest_must_fail git checkout baz &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/baz &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout of branch from a single remote succeeds #3' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D spam &&\n \n@@ -242,7 +242,7 @@ test_expect_success 'checkout of branch from a single remote succeeds #3' '\n '\n \n test_expect_success 'checkout of branch from a single remote succeeds #4' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D eggs &&\n \n@@ -254,7 +254,7 @@ test_expect_success 'checkout of branch from a single remote succeeds #4' '\n '\n \n test_expect_success 'checkout of branch with a file having the same name fails' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D spam &&\n \n@@ -262,11 +262,11 @@ test_expect_success 'checkout of branch with a file having the same name fails'\n \ttest_must_fail git checkout spam &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/spam &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout of branch with a file in subdir having the same name fails' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D spam &&\n \n@@ -276,11 +276,11 @@ test_expect_success 'checkout of branch with a file in subdir having the same na\n \ttest_must_fail git -C sub checkout spam &&\n \tstatus_uno_is_clean &&\n \ttest_must_fail git rev-parse --verify refs/heads/spam &&\n-\ttest_branch master\n+\ttest_branch main\n '\n \n test_expect_success 'checkout <branch> -- succeeds, even if a file with the same name exists' '\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tstatus_uno_is_clean &&\n \ttest_might_fail git branch -D spam &&\n \n@@ -294,7 +294,7 @@ test_expect_success 'checkout <branch> -- succeeds, even if a file with the same\n \n test_expect_success 'loosely defined local base branch is reported correctly' '\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tstatus_uno_is_clean &&\n \tgit branch strict &&\n \tgit branch loose &&\n@@ -302,8 +302,8 @@ test_expect_success 'loosely defined local base branch is reported correctly' '\n \n \ttest_config branch.strict.remote . &&\n \ttest_config branch.loose.remote . &&\n-\ttest_config branch.strict.merge refs/heads/master &&\n-\ttest_config branch.loose.merge master &&\n+\ttest_config branch.strict.merge refs/heads/main &&\n+\ttest_config branch.loose.merge main &&\n \n \tgit checkout strict | sed -e \"s/strict/BRANCHNAME/g\" >expect &&\n \tstatus_uno_is_clean &&\ndiff --git a/t/t2027-checkout-track.sh b/t/t2027-checkout-track.sh\nindex 4e1419ca98..4453741b96 100755\n--- a/t/t2027-checkout-track.sh\n+++ b/t/t2027-checkout-track.sh\n@@ -2,7 +2,7 @@\n \n test_description='tests for git branch --track'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -13,14 +13,14 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'checkout --track -b creates a new tracking branch' '\n-\tgit checkout --track -b branch1 master &&\n+\tgit checkout --track -b branch1 main &&\n \ttest $(git rev-parse --abbrev-ref HEAD) = branch1 &&\n \ttest $(git config --get branch.branch1.remote) = . &&\n-\ttest $(git config --get branch.branch1.merge) = refs/heads/master\n+\ttest $(git config --get branch.branch1.merge) = refs/heads/main\n '\n \n test_expect_success 'checkout --track -b rejects an extra path argument' '\n-\ttest_must_fail git checkout --track -b branch2 master one.t 2>err &&\n+\ttest_must_fail git checkout --track -b branch2 main one.t 2>err &&\n \ttest_i18ngrep \"cannot be used with updating paths\" err\n '\n \ndiff --git a/t/t2030-unresolve-info.sh b/t/t2030-unresolve-info.sh\nindex 3fe29fc3ee..be6c84c52a 100755\n--- a/t/t2030-unresolve-info.sh\n+++ b/t/t2030-unresolve-info.sh\n@@ -2,7 +2,7 @@\n \n test_description='undoing resolution'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -62,7 +62,7 @@ test_expect_success setup '\n \ttest_commit fourth fi/le fourth &&\n \tgit checkout add-add &&\n \ttest_commit fifth add-differently &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'add records switch clears' '\n@@ -186,8 +186,8 @@ test_expect_success 'rerere forget (binary)' '\n '\n \n test_expect_success 'rerere forget (add-add conflict)' '\n-\tgit checkout -f master &&\n-\techo master >add-differently &&\n+\tgit checkout -f main &&\n+\techo main >add-differently &&\n \tgit add add-differently &&\n \tgit commit -m \"add differently\" &&\n \ttest_must_fail git merge fifth &&\ndiff --git a/t/t2060-switch.sh b/t/t2060-switch.sh\nindex 4de9299705..9bc6a3aa5c 100755\n--- a/t/t2060-switch.sh\n+++ b/t/t2060-switch.sh\n@@ -2,7 +2,7 @@\n \n test_description='switch basic functionality'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -26,41 +26,41 @@ test_expect_success 'switch branch' '\n '\n \n test_expect_success 'switch and detach' '\n-\ttest_when_finished git switch master &&\n-\ttest_must_fail git switch master^{commit} &&\n-\tgit switch --detach master^{commit} &&\n+\ttest_when_finished git switch main &&\n+\ttest_must_fail git switch main^{commit} &&\n+\tgit switch --detach main^{commit} &&\n \ttest_must_fail git symbolic-ref HEAD\n '\n \n test_expect_success 'switch and detach current branch' '\n-\ttest_when_finished git switch master &&\n-\tgit switch master &&\n+\ttest_when_finished git switch main &&\n+\tgit switch main &&\n \tgit switch --detach &&\n \ttest_must_fail git symbolic-ref HEAD\n '\n \n test_expect_success 'switch and create branch' '\n-\ttest_when_finished git switch master &&\n-\tgit switch -c temp master^ &&\n-\ttest_cmp_rev master^ refs/heads/temp &&\n+\ttest_when_finished git switch main &&\n+\tgit switch -c temp main^ &&\n+\ttest_cmp_rev main^ refs/heads/temp &&\n \techo refs/heads/temp >expected-branch &&\n \tgit symbolic-ref HEAD >actual-branch &&\n \ttest_cmp expected-branch actual-branch\n '\n \n test_expect_success 'force create branch from HEAD' '\n-\ttest_when_finished git switch master &&\n-\tgit switch --detach master &&\n+\ttest_when_finished git switch main &&\n+\tgit switch --detach main &&\n \ttest_must_fail git switch -c temp &&\n \tgit switch -C temp &&\n-\ttest_cmp_rev master refs/heads/temp &&\n+\ttest_cmp_rev main refs/heads/temp &&\n \techo refs/heads/temp >expected-branch &&\n \tgit symbolic-ref HEAD >actual-branch &&\n \ttest_cmp expected-branch actual-branch\n '\n \n test_expect_success 'new orphan branch from empty' '\n-\ttest_when_finished git switch master &&\n+\ttest_when_finished git switch main &&\n \ttest_must_fail git switch --orphan new-orphan HEAD &&\n \tgit switch --orphan new-orphan &&\n \ttest_commit orphan &&\n@@ -72,7 +72,7 @@ test_expect_success 'new orphan branch from empty' '\n '\n \n test_expect_success 'orphan branch works with --discard-changes' '\n-\ttest_when_finished git switch master &&\n+\ttest_when_finished git switch main &&\n \techo foo >foo.txt &&\n \tgit switch --discard-changes --orphan new-orphan2 &&\n \tgit ls-files >tracked-files &&\n@@ -80,7 +80,7 @@ test_expect_success 'orphan branch works with --discard-changes' '\n '\n \n test_expect_success 'switching ignores file of same branch name' '\n-\ttest_when_finished git switch master &&\n+\ttest_when_finished git switch main &&\n \t: >first-branch &&\n \tgit switch first-branch &&\n \techo refs/heads/first-branch >expected &&\n@@ -89,7 +89,7 @@ test_expect_success 'switching ignores file of same branch name' '\n '\n \n test_expect_success 'guess and create branch' '\n-\ttest_when_finished git switch master &&\n+\ttest_when_finished git switch main &&\n \ttest_must_fail git switch --no-guess foo &&\n \ttest_config checkout.guess false &&\n \ttest_must_fail git switch foo &&\ndiff --git a/t/t2070-restore.sh b/t/t2070-restore.sh\nindex 6941769c9a..7c43ddf1d9 100755\n--- a/t/t2070-restore.sh\n+++ b/t/t2070-restore.sh\n@@ -2,7 +2,7 @@\n \n test_description='restore basic functionality'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -18,7 +18,7 @@ test_expect_success 'setup' '\n \techo ignored >ignored &&\n \techo /ignored >.gitignore &&\n \tgit add one two .gitignore &&\n-\tgit update-ref refs/heads/one master\n+\tgit update-ref refs/heads/one main\n '\n \n test_expect_success 'restore without pathspec is not ok' '\n@@ -94,7 +94,7 @@ test_expect_success 'restore --ignore-unmerged ignores unmerged entries' '\n \t\tgit switch -c first &&\n \t\techo first >unmerged &&\n \t\tgit commit -am first &&\n-\t\tgit switch -c second master &&\n+\t\tgit switch -c second main &&\n \t\techo second >unmerged &&\n \t\tgit commit -am second &&\n \t\ttest_must_fail git merge first &&\ndiff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh\nindex 35cef266e9..96dfca1554 100755\n--- a/t/t2400-worktree-add.sh\n+++ b/t/t2400-worktree-add.sh\n@@ -2,7 +2,7 @@\n \n test_description='test git worktree add'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -15,12 +15,12 @@ test_expect_success 'setup' '\n \n test_expect_success '\"add\" an existing worktree' '\n \tmkdir -p existing/subtree &&\n-\ttest_must_fail git worktree add --detach existing master\n+\ttest_must_fail git worktree add --detach existing main\n '\n \n test_expect_success '\"add\" an existing empty worktree' '\n \tmkdir existing_empty &&\n-\tgit worktree add --detach existing_empty master\n+\tgit worktree add --detach existing_empty main\n '\n \n test_expect_success '\"add\" using shorthand - fails when no previous branch' '\n@@ -32,7 +32,7 @@ test_expect_success '\"add\" using - shorthand' '\n \techo hello >myworld &&\n \tgit add myworld &&\n \tgit commit -m myworld &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit worktree add short-hand - &&\n \techo refs/heads/newbranch >expect &&\n \tgit -C short-hand rev-parse --symbolic-full-name HEAD >actual &&\n@@ -40,7 +40,7 @@ test_expect_success '\"add\" using - shorthand' '\n '\n \n test_expect_success '\"add\" refuses to checkout locked branch' '\n-\ttest_must_fail git worktree add zere master &&\n+\ttest_must_fail git worktree add zere main &&\n \t! test -d zere &&\n \t! test -d .git/worktrees/zere\n '\n@@ -49,13 +49,13 @@ test_expect_success 'checking out paths not complaining about linked checkouts'\n \t(\n \tcd existing_empty &&\n \techo dirty >>init.t &&\n-\tgit checkout master -- init.t\n+\tgit checkout main -- init.t\n \t)\n '\n \n test_expect_success '\"add\" worktree' '\n \tgit rev-parse HEAD >expect &&\n-\tgit worktree add --detach here master &&\n+\tgit worktree add --detach here main &&\n \t(\n \t\tcd here &&\n \t\ttest_cmp ../init.t init.t &&\n@@ -68,7 +68,7 @@ test_expect_success '\"add\" worktree' '\n \n test_expect_success '\"add\" worktree with lock' '\n \tgit rev-parse HEAD >expect &&\n-\tgit worktree add --detach --lock here-with-lock master &&\n+\tgit worktree add --detach --lock here-with-lock main &&\n \ttest -f .git/worktrees/here-with-lock/locked\n '\n \n@@ -76,7 +76,7 @@ test_expect_success '\"add\" worktree from a subdir' '\n \t(\n \t\tmkdir sub &&\n \t\tcd sub &&\n-\t\tgit worktree add --detach here master &&\n+\t\tgit worktree add --detach here main &&\n \t\tcd here &&\n \t\ttest_cmp ../../init.t init.t\n \t)\n@@ -85,19 +85,19 @@ test_expect_success '\"add\" worktree from a subdir' '\n test_expect_success '\"add\" from a linked checkout' '\n \t(\n \t\tcd here &&\n-\t\tgit worktree add --detach nested-here master &&\n+\t\tgit worktree add --detach nested-here main &&\n \t\tcd nested-here &&\n \t\tgit fsck\n \t)\n '\n \n test_expect_success '\"add\" worktree creating new branch' '\n-\tgit worktree add -b newmaster there master &&\n+\tgit worktree add -b newmain there main &&\n \t(\n \t\tcd there &&\n \t\ttest_cmp ../init.t init.t &&\n \t\tgit symbolic-ref HEAD >actual &&\n-\t\techo refs/heads/newmaster >expect &&\n+\t\techo refs/heads/newmain >expect &&\n \t\ttest_cmp expect actual &&\n \t\tgit fsck\n \t)\n@@ -106,7 +106,7 @@ test_expect_success '\"add\" worktree creating new branch' '\n test_expect_success 'die the same branch is already checked out' '\n \t(\n \t\tcd here &&\n-\t\ttest_must_fail git checkout newmaster\n+\t\ttest_must_fail git checkout newmain\n \t)\n '\n \n@@ -115,20 +115,20 @@ test_expect_success SYMLINKS 'die the same branch is already checked out (symlin\n \tref=$(git -C there symbolic-ref HEAD) &&\n \trm \"$head\" &&\n \tln -s \"$ref\" \"$head\" &&\n-\ttest_must_fail git -C here checkout newmaster\n+\ttest_must_fail git -C here checkout newmain\n '\n \n test_expect_success 'not die the same branch is already checked out' '\n \t(\n \t\tcd here &&\n-\t\tgit worktree add --force anothernewmaster newmaster\n+\t\tgit worktree add --force anothernewmain newmain\n \t)\n '\n \n test_expect_success 'not die on re-checking out current branch' '\n \t(\n \t\tcd there &&\n-\t\tgit checkout newmaster\n+\t\tgit checkout newmain\n \t)\n '\n \n@@ -136,14 +136,14 @@ test_expect_success '\"add\" from a bare repo' '\n \t(\n \t\tgit clone --bare . bare &&\n \t\tcd bare &&\n-\t\tgit worktree add -b bare-master ../there2 master\n+\t\tgit worktree add -b bare-main ../there2 main\n \t)\n '\n \n test_expect_success 'checkout from a bare repo without \"add\"' '\n \t(\n \t\tcd bare &&\n-\t\ttest_must_fail git checkout master\n+\t\ttest_must_fail git checkout main\n \t)\n '\n \n@@ -151,7 +151,7 @@ test_expect_success '\"add\" default branch of a bare repo' '\n \t(\n \t\tgit clone --bare . bare2 &&\n \t\tcd bare2 &&\n-\t\tgit worktree add ../there3 master\n+\t\tgit worktree add ../there3 main\n \t)\n '\n \n@@ -168,7 +168,7 @@ test_expect_success 'checkout with grafts' '\n \tEOF\n \tgit log --format=%s -2 >actual &&\n \ttest_cmp expected actual &&\n-\tgit worktree add --detach grafted master &&\n+\tgit worktree add --detach grafted main &&\n \tgit --git-dir=grafted/.git log --format=%s -2 >actual &&\n \ttest_cmp expected actual\n '\n@@ -229,34 +229,34 @@ test_expect_success '\"add\" no auto-vivify with --detach and <branch> omitted' '\n '\n \n test_expect_success '\"add\" -b/-B mutually exclusive' '\n-\ttest_must_fail git worktree add -b poodle -B poodle bamboo master\n+\ttest_must_fail git worktree add -b poodle -B poodle bamboo main\n '\n \n test_expect_success '\"add\" -b/--detach mutually exclusive' '\n-\ttest_must_fail git worktree add -b poodle --detach bamboo master\n+\ttest_must_fail git worktree add -b poodle --detach bamboo main\n '\n \n test_expect_success '\"add\" -B/--detach mutually exclusive' '\n-\ttest_must_fail git worktree add -B poodle --detach bamboo master\n+\ttest_must_fail git worktree add -B poodle --detach bamboo main\n '\n \n test_expect_success '\"add -B\" fails if the branch is checked out' '\n-\tgit rev-parse newmaster >before &&\n-\ttest_must_fail git worktree add -B newmaster bamboo master &&\n-\tgit rev-parse newmaster >after &&\n+\tgit rev-parse newmain >before &&\n+\ttest_must_fail git worktree add -B newmain bamboo main &&\n+\tgit rev-parse newmain >after &&\n \ttest_cmp before after\n '\n \n test_expect_success 'add -B' '\n-\tgit worktree add -B poodle bamboo2 master^ &&\n+\tgit worktree add -B poodle bamboo2 main^ &&\n \tgit -C bamboo2 symbolic-ref HEAD >actual &&\n \techo refs/heads/poodle >expected &&\n \ttest_cmp expected actual &&\n-\ttest_cmp_rev master^ poodle\n+\ttest_cmp_rev main^ poodle\n '\n \n test_expect_success 'add --quiet' '\n-\tgit worktree add --quiet another-worktree master 2>actual &&\n+\tgit worktree add --quiet another-worktree main 2>actual &&\n \ttest_must_be_empty actual\n '\n \n@@ -351,24 +351,24 @@ test_branch_upstream () {\n \n test_expect_success '--track sets up tracking' '\n \ttest_when_finished rm -rf track &&\n-\tgit worktree add --track -b track track master &&\n-\ttest_branch_upstream track . master\n+\tgit worktree add --track -b track track main &&\n+\ttest_branch_upstream track . main\n '\n \n # setup remote repository $1 and repository $2 with $1 set up as\n-# remote.  The remote has two branches, master and foo.\n+# remote.  The remote has two branches, main and foo.\n setup_remote_repo () {\n \tgit init $1 &&\n \t(\n \t\tcd $1 &&\n-\t\ttest_commit $1_master &&\n+\t\ttest_commit $1_main &&\n \t\tgit checkout -b foo &&\n \t\ttest_commit upstream_foo\n \t) &&\n \tgit init $2 &&\n \t(\n \t\tcd $2 &&\n-\t\ttest_commit $2_master &&\n+\t\ttest_commit $2_main &&\n \t\tgit remote add $1 ../$1 &&\n \t\tgit config remote.$1.fetch \\\n \t\t\t\"refs/heads/*:refs/remotes/$1/*\" &&\ndiff --git a/t/t2401-worktree-prune.sh b/t/t2401-worktree-prune.sh\nindex e6fc27de1e..aff877590d 100755\n--- a/t/t2401-worktree-prune.sh\n+++ b/t/t2401-worktree-prune.sh\n@@ -2,7 +2,7 @@\n \n test_description='prune $GIT_DIR/worktrees'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -90,7 +90,7 @@ test_expect_success 'not prune recent checkouts' '\n \n test_expect_success 'not prune proper checkouts' '\n \ttest_when_finished rm -r .git/worktrees &&\n-\tgit worktree add --detach \"$PWD/nop\" master &&\n+\tgit worktree add --detach \"$PWD/nop\" main &&\n \tgit worktree prune &&\n \ttest -d .git/worktrees/nop\n '\ndiff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh\nindex 3b23b0fdb7..821a20f3d6 100755\n--- a/t/t2402-worktree-list.sh\n+++ b/t/t2402-worktree-list.sh\n@@ -2,7 +2,7 @@\n \n test_description='test git worktree list'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -24,7 +24,7 @@ test_expect_success 'rev-parse --git-common-dir on main worktree' '\n test_expect_success 'rev-parse --git-path objects linked worktree' '\n \techo \"$(git rev-parse --show-toplevel)/.git/objects\" >expect &&\n \ttest_when_finished \"rm -rf linked-tree actual expect && git worktree prune\" &&\n-\tgit worktree add --detach linked-tree master &&\n+\tgit worktree add --detach linked-tree main &&\n \tgit -C linked-tree rev-parse --git-path objects >actual &&\n \ttest_cmp expect actual\n '\n@@ -32,7 +32,7 @@ test_expect_success 'rev-parse --git-path objects linked worktree' '\n test_expect_success '\"list\" all worktrees from main' '\n \techo \"$(git rev-parse --show-toplevel) $(git rev-parse --short HEAD) [$(git symbolic-ref --short HEAD)]\" >expect &&\n \ttest_when_finished \"rm -rf here out actual expect && git worktree prune\" &&\n-\tgit worktree add --detach here master &&\n+\tgit worktree add --detach here main &&\n \techo \"$(git -C here rev-parse --show-toplevel) $(git rev-parse --short HEAD) (detached HEAD)\" >>expect &&\n \tgit worktree list >out &&\n \tsed \"s/  */ /g\" <out >actual &&\n@@ -42,7 +42,7 @@ test_expect_success '\"list\" all worktrees from main' '\n test_expect_success '\"list\" all worktrees from linked' '\n \techo \"$(git rev-parse --show-toplevel) $(git rev-parse --short HEAD) [$(git symbolic-ref --short HEAD)]\" >expect &&\n \ttest_when_finished \"rm -rf here out actual expect && git worktree prune\" &&\n-\tgit worktree add --detach here master &&\n+\tgit worktree add --detach here main &&\n \techo \"$(git -C here rev-parse --show-toplevel) $(git rev-parse --short HEAD) (detached HEAD)\" >>expect &&\n \tgit -C here worktree list >out &&\n \tsed \"s/  */ /g\" <out >actual &&\n@@ -55,7 +55,7 @@ test_expect_success '\"list\" all worktrees --porcelain' '\n \techo \"branch $(git symbolic-ref HEAD)\" >>expect &&\n \techo >>expect &&\n \ttest_when_finished \"rm -rf here actual expect && git worktree prune\" &&\n-\tgit worktree add --detach here master &&\n+\tgit worktree add --detach here main &&\n \techo \"worktree $(git -C here rev-parse --show-toplevel)\" >>expect &&\n \techo \"HEAD $(git rev-parse HEAD)\" >>expect &&\n \techo \"detached\" >>expect &&\n@@ -66,8 +66,8 @@ test_expect_success '\"list\" all worktrees --porcelain' '\n \n test_expect_success '\"list\" all worktrees with locked annotation' '\n \ttest_when_finished \"rm -rf locked unlocked out && git worktree prune\" &&\n-\tgit worktree add --detach locked master &&\n-\tgit worktree add --detach unlocked master &&\n+\tgit worktree add --detach locked main &&\n+\tgit worktree add --detach unlocked main &&\n \tgit worktree lock locked &&\n \tgit worktree list >out &&\n \tgrep \"/locked  *[0-9a-f].* locked$\" out &&\n@@ -79,13 +79,13 @@ test_expect_success 'bare repo setup' '\n \techo \"data\" >file1 &&\n \tgit add file1 &&\n \tgit commit -m\"File1: add data\" &&\n-\tgit push bare1 master &&\n+\tgit push bare1 main &&\n \tgit reset --hard HEAD^\n '\n \n test_expect_success '\"list\" all worktrees from bare main' '\n \ttest_when_finished \"rm -rf there out actual expect && git -C bare1 worktree prune\" &&\n-\tgit -C bare1 worktree add --detach ../there master &&\n+\tgit -C bare1 worktree add --detach ../there main &&\n \techo \"$(pwd)/bare1 (bare)\" >expect &&\n \techo \"$(git -C there rev-parse --show-toplevel) $(git -C there rev-parse --short HEAD) (detached HEAD)\" >>expect &&\n \tgit -C bare1 worktree list >out &&\n@@ -95,7 +95,7 @@ test_expect_success '\"list\" all worktrees from bare main' '\n \n test_expect_success '\"list\" all worktrees --porcelain from bare main' '\n \ttest_when_finished \"rm -rf there actual expect && git -C bare1 worktree prune\" &&\n-\tgit -C bare1 worktree add --detach ../there master &&\n+\tgit -C bare1 worktree add --detach ../there main &&\n \techo \"worktree $(pwd)/bare1\" >expect &&\n \techo \"bare\" >>expect &&\n \techo >>expect &&\n@@ -109,7 +109,7 @@ test_expect_success '\"list\" all worktrees --porcelain from bare main' '\n \n test_expect_success '\"list\" all worktrees from linked with a bare main' '\n \ttest_when_finished \"rm -rf there out actual expect && git -C bare1 worktree prune\" &&\n-\tgit -C bare1 worktree add --detach ../there master &&\n+\tgit -C bare1 worktree add --detach ../there main &&\n \techo \"$(pwd)/bare1 (bare)\" >expect &&\n \techo \"$(git -C there rev-parse --show-toplevel) $(git -C there rev-parse --short HEAD) (detached HEAD)\" >>expect &&\n \tgit -C there worktree list >out &&\ndiff --git a/t/t2405-worktree-submodule.sh b/t/t2405-worktree-submodule.sh\nindex cca2aea658..b172c26ca4 100755\n--- a/t/t2405-worktree-submodule.sh\n+++ b/t/t2405-worktree-submodule.sh\n@@ -2,7 +2,7 @@\n \n test_description='Combination of submodules and multiple worktrees'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -34,7 +34,7 @@ test_expect_success 'add superproject worktree' '\n '\n \n test_expect_failure 'submodule is checked out just after worktree add' '\n-\tgit -C worktree diff --submodule master\"^!\" >out &&\n+\tgit -C worktree diff --submodule main\"^!\" >out &&\n \tgrep \"file1 updated\" out\n '\n \n@@ -44,7 +44,7 @@ test_expect_success 'add superproject worktree and initialize submodules' '\n '\n \n test_expect_success 'submodule is checked out just after submodule update in linked worktree' '\n-\tgit -C worktree-submodule-update diff --submodule master\"^!\" >out &&\n+\tgit -C worktree-submodule-update diff --submodule main\"^!\" >out &&\n \tgrep \"file1 updated\" out\n '\n \n@@ -54,7 +54,7 @@ test_expect_success 'add superproject worktree and manually add submodule worktr\n '\n \n test_expect_success 'submodule is checked out after manually adding submodule worktree' '\n-\tgit -C linked_submodule diff --submodule master\"^!\" >out &&\n+\tgit -C linked_submodule diff --submodule main\"^!\" >out &&\n \tgrep \"file1 updated\" out\n '\n \n-- \ngitgitgadget\n\n"},{"id":"410295","messageId":"c0d02e4d9d91d34c0d39470b0851cf56a91030ce.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 07/28] t34*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:25Z","receivedAt":"2020-11-18T23:45:19Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t3404, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in\nt34*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t34*.sh &&\n\t   git checkout HEAD -- t34\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3400-rebase.sh                 | 62 +++++++++++++++----------------\n t/t3402-rebase-merge.sh           | 46 +++++++++++------------\n t/t3403-rebase-skip.sh            |  8 ++--\n t/t3405-rebase-malformed.sh       | 10 ++---\n t/t3406-rebase-message.sh         | 26 ++++++-------\n t/t3407-rebase-abort.sh           | 20 +++++-----\n t/t3408-rebase-multi-line.sh      |  4 +-\n t/t3409-rebase-preserve-merges.sh | 12 +++---\n t/t3412-rebase-root.sh            | 30 +++++++--------\n t/t3413-rebase-hook.sh            | 44 +++++++++++-----------\n t/t3415-rebase-autosquash.sh      |  4 +-\n t/t3416-rebase-onto-threedots.sh  | 56 ++++++++++++++--------------\n t/t3418-rebase-continue.sh        | 26 ++++++-------\n t/t3419-rebase-patch-id.sh        | 14 +++----\n t/t3420-rebase-autostash.sh       | 10 ++---\n t/t3423-rebase-reword.sh          |  6 +--\n t/t3427-rebase-subtree.sh         | 22 +++++------\n t/t3430-rebase-merges.sh          | 18 ++++-----\n t/t3431-rebase-fork-point.sh      | 34 ++++++++---------\n t/t3432-rebase-fast-forward.sh    | 36 +++++++++---------\n t/t3434-rebase-i18n.sh            | 10 ++---\n t/t3435-rebase-gpg-sign.sh        |  6 +--\n t/t3436-rebase-more-options.sh    |  2 +-\n 23 files changed, 253 insertions(+), 253 deletions(-)\n\ndiff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\nindex 61577591d0..5e88a10f8d 100755\n--- a/t/t3400-rebase.sh\n+++ b/t/t3400-rebase.sh\n@@ -8,7 +8,7 @@ test_description='git rebase assorted tests\n This test runs git rebase and checks that the author information is not lost\n among other things.\n '\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -27,15 +27,15 @@ test_expect_success 'prepare repository with topic branches' '\n \tgit update-index --add Y &&\n \tgit commit -m \"Add Y.\" &&\n \tgit checkout -b filemove &&\n-\tgit reset --soft master &&\n+\tgit reset --soft main &&\n \tmkdir D &&\n \tgit mv A D/A &&\n \tgit commit -m \"Move A.\" &&\n-\tgit checkout -b my-topic-branch master &&\n+\tgit checkout -b my-topic-branch main &&\n \techo Second >B &&\n \tgit update-index --add B &&\n \tgit commit -m \"Add B.\" &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \techo Third >>A &&\n \tgit update-index A &&\n \tgit commit -m \"Modify A.\" &&\n@@ -49,23 +49,23 @@ test_expect_success 'prepare repository with topic branches' '\n \n test_expect_success 'rebase on dirty worktree' '\n \techo dirty >>A &&\n-\ttest_must_fail git rebase master\n+\ttest_must_fail git rebase main\n '\n \n test_expect_success 'rebase on dirty cache' '\n \tgit add A &&\n-\ttest_must_fail git rebase master\n+\ttest_must_fail git rebase main\n '\n \n-test_expect_success 'rebase against master' '\n+test_expect_success 'rebase against main' '\n \tgit reset --hard HEAD &&\n-\tgit rebase master\n+\tgit rebase main\n '\n \n test_expect_success 'rebase sets ORIG_HEAD to pre-rebase state' '\n \tgit checkout -b orig-head topic &&\n \tpre=\"$(git rev-parse --verify HEAD)\" &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \ttest_cmp_rev \"$pre\" ORIG_HEAD &&\n \ttest_cmp_rev ! \"$pre\" HEAD\n '\n@@ -96,19 +96,19 @@ test_expect_success 'HEAD was detached during rebase' '\n \n test_expect_success 'rebase from ambiguous branch name' '\n \tgit checkout -b topic side &&\n-\tgit rebase master\n+\tgit rebase main\n '\n \n test_expect_success 'rebase off of the previous branch using \"-\"' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout HEAD^ &&\n \tgit rebase @{-1} >expect.messages &&\n-\tgit merge-base master HEAD >expect.forkpoint &&\n+\tgit merge-base main HEAD >expect.forkpoint &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout HEAD^ &&\n \tgit rebase - >actual.messages &&\n-\tgit merge-base master HEAD >actual.forkpoint &&\n+\tgit merge-base main HEAD >actual.forkpoint &&\n \n \ttest_cmp expect.forkpoint actual.forkpoint &&\n \t# the next one is dubious---we may want to say \"-\",\n@@ -117,7 +117,7 @@ test_expect_success 'rebase off of the previous branch using \"-\"' '\n '\n \n test_expect_success 'rebase a single mode change' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -D topic &&\n \techo 1 >X &&\n \tgit add X &&\n@@ -129,7 +129,7 @@ test_expect_success 'rebase a single mode change' '\n \ttest_chmod +x A &&\n \ttest_tick &&\n \tgit commit -m modechange &&\n-\tGIT_TRACE=1 git rebase master\n+\tGIT_TRACE=1 git rebase main\n '\n \n test_expect_success 'rebase is not broken by diff.renames' '\n@@ -165,11 +165,11 @@ test_expect_success 'fail when upstream arg is missing and not configured' '\n test_expect_success 'rebase works with format.useAutoBase' '\n \ttest_config format.useAutoBase true &&\n \tgit checkout topic &&\n-\tgit rebase master\n+\tgit rebase main\n '\n \n test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg (--merge)' '\n-\tgit checkout -b default-base master &&\n+\tgit checkout -b default-base main &&\n \tgit checkout -b default topic &&\n \tgit config branch.default.remote . &&\n \tgit config branch.default.merge refs/heads/default-base &&\n@@ -187,7 +187,7 @@ test_expect_success 'default to common base in @{upstream}s reflog if no upstrea\n '\n \n test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg (--apply)' '\n-\tgit checkout -B default-base master &&\n+\tgit checkout -B default-base main &&\n \tgit checkout -B default topic &&\n \tgit config branch.default.remote . &&\n \tgit config branch.default.merge refs/heads/default-base &&\n@@ -229,13 +229,13 @@ test_expect_success 'cherry-picked commits and fork-point work together' '\n \n test_expect_success 'rebase --apply -q is quiet' '\n \tgit checkout -b quiet topic &&\n-\tgit rebase --apply -q master >output.out 2>&1 &&\n+\tgit rebase --apply -q main >output.out 2>&1 &&\n \ttest_must_be_empty output.out\n '\n \n test_expect_success 'rebase --merge -q is quiet' '\n \tgit checkout -B quiet topic &&\n-\tgit rebase --merge -q master >output.out 2>&1 &&\n+\tgit rebase --merge -q main >output.out 2>&1 &&\n \ttest_must_be_empty output.out\n '\n \n@@ -297,7 +297,7 @@ test_expect_success 'rebase commit with an ancient timestamp' '\n '\n \n test_expect_success 'rebase with \"From \" line in commit message' '\n-\tgit checkout -b preserve-from master~1 &&\n+\tgit checkout -b preserve-from main~1 &&\n \tcat >From_.msg <<EOF &&\n Somebody embedded an mbox in a commit message\n \n@@ -313,7 +313,7 @@ EOF\n \t>From_ &&\n \tgit add From_ &&\n \tgit commit -F From_.msg &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \tgit log -1 --pretty=format:%B >out &&\n \ttest_cmp From_.msg out\n '\n@@ -360,12 +360,12 @@ test_expect_success 'rebase --apply and .gitattributes' '\n \t\tgit cherry-pick test &&\n \n \t\tgit checkout test &&\n-\t\tgit rebase master &&\n+\t\tgit rebase main &&\n \t\tgrep \"smudged\" a.txt &&\n \n \t\tgit checkout removal &&\n \t\tgit reset --hard &&\n-\t\tgit rebase master &&\n+\t\tgit rebase main &&\n \t\tgrep \"clean\" a.txt\n \t)\n '\n@@ -405,20 +405,20 @@ test_expect_success 'rebase -c rebase.useBuiltin=false warning' '\n '\n \n test_expect_success 'switch to branch checked out here' '\n-\tgit checkout master &&\n-\tgit rebase master master\n+\tgit checkout main &&\n+\tgit rebase main main\n '\n \n test_expect_success 'switch to branch not checked out' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch other &&\n-\tgit rebase master other\n+\tgit rebase main other\n '\n \n test_expect_success 'refuse to switch to branch checked out elsewhere' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit worktree add wt &&\n-\ttest_must_fail git -C wt rebase master master 2>err &&\n+\ttest_must_fail git -C wt rebase main main 2>err &&\n \ttest_i18ngrep \"already checked out\" err\n '\n \ndiff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh\nindex d79a11b686..cfde68f193 100755\n--- a/t/t3402-rebase-merge.sh\n+++ b/t/t3402-rebase-merge.sh\n@@ -5,7 +5,7 @@\n \n test_description='git rebase --merge test'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -22,10 +22,10 @@ test_expect_success setup '\n \tgit commit -m\"initial\" &&\n \tgit branch side &&\n \techo \"11 $T\" >>original &&\n-\tgit commit -a -m\"master updates a bit.\" &&\n+\tgit commit -a -m\"main updates a bit.\" &&\n \n \techo \"12 $T\" >>original &&\n-\tgit commit -a -m\"master updates a bit more.\" &&\n+\tgit commit -a -m\"main updates a bit more.\" &&\n \n \tgit checkout side &&\n \t(echo \"0 $T\" && cat original) >renamed &&\n@@ -50,13 +50,13 @@ test_expect_success setup '\n '\n \n test_expect_success 'reference merge' '\n-\tgit merge -s recursive -m \"reference merge\" master\n+\tgit merge -s recursive -m \"reference merge\" main\n '\n \n PRE_REBASE=$(git rev-parse test-rebase)\n test_expect_success rebase '\n \tgit checkout test-rebase &&\n-\tGIT_TRACE=1 git rebase --merge master\n+\tGIT_TRACE=1 git rebase --merge main\n '\n \n test_expect_success 'test-rebase@{1} is pre rebase' '\n@@ -75,24 +75,24 @@ test_expect_success 'merge and rebase should match' '\n '\n \n test_expect_success 'rebase the other way' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit rebase --merge side\n '\n \n test_expect_success 'rebase -Xtheirs' '\n-\tgit checkout -b conflicting master~2 &&\n+\tgit checkout -b conflicting main~2 &&\n \techo \"AB $T\" >> original &&\n \tgit commit -mconflicting original &&\n-\tgit rebase -Xtheirs master &&\n+\tgit rebase -Xtheirs main &&\n \tgrep AB original &&\n \t! grep 11 original\n '\n \n test_expect_success 'rebase -Xtheirs from orphan' '\n-\tgit checkout --orphan orphan-conflicting master~2 &&\n+\tgit checkout --orphan orphan-conflicting main~2 &&\n \techo \"AB $T\" >> original &&\n \tgit commit -morphan-conflicting original &&\n-\tgit rebase -Xtheirs master &&\n+\tgit rebase -Xtheirs main &&\n \tgrep AB original &&\n \t! grep 11 original\n '\n@@ -110,9 +110,9 @@ test_expect_success 'merge and rebase should match' '\n \n test_expect_success 'picking rebase' '\n \tgit reset --hard side &&\n-\tgit rebase --merge --onto master side^^ &&\n-\tmb=$(git merge-base master HEAD) &&\n-\tif test \"$mb\" = \"$(git rev-parse master)\"\n+\tgit rebase --merge --onto main side^^ &&\n+\tmb=$(git merge-base main HEAD) &&\n+\tif test \"$mb\" = \"$(git rev-parse main)\"\n \tthen\n \t\techo happy\n \telse\n@@ -143,11 +143,11 @@ test_expect_success 'rebase -s funny -Xopt' '\n \tEOF\n \tchmod +x test-bin/git-merge-funny &&\n \tgit reset --hard &&\n-\tgit checkout -b test-funny master^ &&\n+\tgit checkout -b test-funny main^ &&\n \ttest_commit funny &&\n \t(\n \t\tPATH=./test-bin:$PATH &&\n-\t\tgit rebase -s funny -Xopt master\n+\t\tgit rebase -s funny -Xopt main\n \t) &&\n \ttest -f funny.was.run\n '\n@@ -168,7 +168,7 @@ test_expect_success 'rebase --skip works with two conflicts in a row' '\n test_expect_success '--reapply-cherry-picks' '\n \tgit init repo &&\n \n-\t# O(1-10) -- O(1-11) -- O(0-10) master\n+\t# O(1-10) -- O(1-11) -- O(0-10) main\n \t#        \\\n \t#         -- O(1-11) -- O(1-12) otherbranch\n \n@@ -190,18 +190,18 @@ test_expect_success '--reapply-cherry-picks' '\n \tgit -C repo commit -a -m \"add 12 in another branch\" &&\n \n \t# Regular rebase fails, because the 1-11 commit is deduplicated\n-\ttest_must_fail git -C repo rebase --merge master 2> err &&\n+\ttest_must_fail git -C repo rebase --merge main 2> err &&\n \ttest_i18ngrep \"error: could not apply.*add 12 in another branch\" err &&\n \tgit -C repo rebase --abort &&\n \n \t# With --reapply-cherry-picks, it works\n-\tgit -C repo rebase --merge --reapply-cherry-picks master\n+\tgit -C repo rebase --merge --reapply-cherry-picks main\n '\n \n test_expect_success '--reapply-cherry-picks refrains from reading unneeded blobs' '\n \tgit init server &&\n \n-\t# O(1-10) -- O(1-11) -- O(1-12) master\n+\t# O(1-10) -- O(1-11) -- O(1-12) main\n \t#        \\\n \t#         -- O(0-10) otherbranch\n \n@@ -223,18 +223,18 @@ test_expect_success '--reapply-cherry-picks refrains from reading unneeded blobs\n \ttest_config -C server uploadpack.allowanysha1inwant 1 &&\n \n \tgit clone --filter=blob:none \"file://$(pwd)/server\" client &&\n-\tgit -C client checkout origin/master &&\n+\tgit -C client checkout origin/main &&\n \tgit -C client checkout origin/otherbranch &&\n \n \t# Sanity check to ensure that the blobs from the merge base and \"add\n \t# 11\" are missing\n \tgit -C client rev-list --objects --all --missing=print >missing_list &&\n-\tMERGE_BASE_BLOB=$(git -C server rev-parse master^^:file.txt) &&\n-\tADD_11_BLOB=$(git -C server rev-parse master^:file.txt) &&\n+\tMERGE_BASE_BLOB=$(git -C server rev-parse main^^:file.txt) &&\n+\tADD_11_BLOB=$(git -C server rev-parse main^:file.txt) &&\n \tgrep \"[?]$MERGE_BASE_BLOB\" missing_list &&\n \tgrep \"[?]$ADD_11_BLOB\" missing_list &&\n \n-\tgit -C client rebase --merge --reapply-cherry-picks origin/master &&\n+\tgit -C client rebase --merge --reapply-cherry-picks origin/main &&\n \n \t# The blob from the merge base had to be fetched, but not \"add 11\"\n \tgit -C client rev-list --objects --all --missing=print >missing_list &&\ndiff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh\nindex c9936cb1d9..e26762d0b2 100755\n--- a/t/t3403-rebase-skip.sh\n+++ b/t/t3403-rebase-skip.sh\n@@ -5,7 +5,7 @@\n \n test_description='git rebase --merge --skip tests'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -51,7 +51,7 @@ test_expect_success setup '\n \t'\n \n test_expect_success 'rebase with git am -3 (default)' '\n-\ttest_must_fail git rebase master\n+\ttest_must_fail git rebase main\n '\n \n test_expect_success 'rebase --skip can not be used with other options' '\n@@ -67,7 +67,7 @@ test_expect_success 'rebase moves back to skip-reference' '\n \ttest refs/heads/skip-reference = $(git symbolic-ref HEAD) &&\n \tgit branch post-rebase &&\n \tgit reset --hard pre-rebase &&\n-\ttest_must_fail git rebase master &&\n+\ttest_must_fail git rebase main &&\n \techo \"hello\" > hello &&\n \tgit add hello &&\n \tgit rebase --continue &&\n@@ -78,7 +78,7 @@ test_expect_success 'rebase moves back to skip-reference' '\n test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge'\n \n test_expect_success 'rebase with --merge' '\n-\ttest_must_fail git rebase --merge master\n+\ttest_must_fail git rebase --merge main\n '\n \n test_expect_success 'rebase --skip with --merge' '\ndiff --git a/t/t3405-rebase-malformed.sh b/t/t3405-rebase-malformed.sh\nindex d8f6d2e3cb..2524331861 100755\n--- a/t/t3405-rebase-malformed.sh\n+++ b/t/t3405-rebase-malformed.sh\n@@ -2,7 +2,7 @@\n \n test_description='rebase should handle arbitrary git message'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -55,7 +55,7 @@ test_expect_success setup '\n \tgit add file3 &&\n \tgit commit --allow-empty-message -m \"\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \techo One >file1 &&\n \ttest_tick &&\n@@ -65,7 +65,7 @@ test_expect_success setup '\n \n test_expect_success 'rebase commit with multi-line subject' '\n \n-\tgit rebase master multi-line-subject &&\n+\tgit rebase main multi-line-subject &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >F1 &&\n \n \ttest_cmp F0 F1 &&\n@@ -73,14 +73,14 @@ test_expect_success 'rebase commit with multi-line subject' '\n '\n \n test_expect_success 'rebase commit with diff in message' '\n-\tgit rebase master diff-in-message &&\n+\tgit rebase main diff-in-message &&\n \tgit cat-file commit HEAD | sed -e \"1,/^$/d\" >G1 &&\n \ttest_cmp G0 G1 &&\n \ttest_cmp G G0\n '\n \n test_expect_success 'rebase -m commit with empty message' '\n-\tgit rebase -m master empty-message-merge\n+\tgit rebase -m main empty-message-merge\n '\n \n test_expect_success 'rebase -i commit with empty message' '\ndiff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh\nindex 863db3ac4c..c02729d5ea 100755\n--- a/t/t3406-rebase-message.sh\n+++ b/t/t3406-rebase-message.sh\n@@ -2,7 +2,7 @@\n \n test_description='messages from rebase operation'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -21,27 +21,27 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'rebase -m' '\n-\tgit rebase -m master >actual &&\n+\tgit rebase -m main >actual &&\n \ttest_must_be_empty actual\n '\n \n-test_expect_success 'rebase against master twice' '\n-\tgit rebase --apply master >out &&\n+test_expect_success 'rebase against main twice' '\n+\tgit rebase --apply main >out &&\n \ttest_i18ngrep \"Current branch topic is up to date\" out\n '\n \n-test_expect_success 'rebase against master twice with --force' '\n-\tgit rebase --force-rebase --apply master >out &&\n+test_expect_success 'rebase against main twice with --force' '\n+\tgit rebase --force-rebase --apply main >out &&\n \ttest_i18ngrep \"Current branch topic is up to date, rebase forced\" out\n '\n \n-test_expect_success 'rebase against master twice from another branch' '\n+test_expect_success 'rebase against main twice from another branch' '\n \tgit checkout topic^ &&\n-\tgit rebase --apply master topic >out &&\n+\tgit rebase --apply main topic >out &&\n \ttest_i18ngrep \"Current branch topic is up to date\" out\n '\n \n-test_expect_success 'rebase fast-forward to master' '\n+test_expect_success 'rebase fast-forward to main' '\n \tgit checkout topic^ &&\n \tgit rebase --apply topic >out &&\n \ttest_i18ngrep \"Fast-forwarded HEAD to topic\" out\n@@ -49,21 +49,21 @@ test_expect_success 'rebase fast-forward to master' '\n \n test_expect_success 'rebase --stat' '\n \tgit reset --hard start &&\n-\tgit rebase --stat master >diffstat.txt &&\n+\tgit rebase --stat main >diffstat.txt &&\n \tgrep \"^ fileX |  *1 +$\" diffstat.txt\n '\n \n test_expect_success 'rebase w/config rebase.stat' '\n \tgit reset --hard start &&\n \tgit config rebase.stat true &&\n-\tgit rebase master >diffstat.txt &&\n+\tgit rebase main >diffstat.txt &&\n \tgrep \"^ fileX |  *1 +$\" diffstat.txt\n '\n \n test_expect_success 'rebase -n overrides config rebase.stat config' '\n \tgit reset --hard start &&\n \tgit config rebase.stat true &&\n-\tgit rebase -n master >diffstat.txt &&\n+\tgit rebase -n main >diffstat.txt &&\n \t! grep \"^ fileX |  *1 +$\" diffstat.txt\n '\n \n@@ -116,7 +116,7 @@ test_expect_success 'rebase -i onto unrelated history' '\n \tgit init unrelated &&\n \ttest_commit -C unrelated 1 &&\n \tgit -C unrelated remote add -f origin \"$PWD\" &&\n-\tgit -C unrelated branch --set-upstream-to=origin/master &&\n+\tgit -C unrelated branch --set-upstream-to=origin/main &&\n \tgit -C unrelated -c core.editor=true rebase -i -v --stat >actual &&\n \ttest_i18ngrep \"Changes to \" actual &&\n \ttest_i18ngrep \"5 files changed\" actual\ndiff --git a/t/t3407-rebase-abort.sh b/t/t3407-rebase-abort.sh\nindex e3c1851f40..7c381fbc89 100755\n--- a/t/t3407-rebase-abort.sh\n+++ b/t/t3407-rebase-abort.sh\n@@ -2,7 +2,7 @@\n \n test_description='git rebase --abort tests'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -40,7 +40,7 @@ testrebase() {\n \t\tcd \"$work_dir\" &&\n \t\t# Clean up the state from the previous one\n \t\tgit reset --hard pre-rebase &&\n-\t\ttest_must_fail git rebase$type master &&\n+\t\ttest_must_fail git rebase$type main &&\n \t\ttest_path_is_dir \"$dotest\" &&\n \t\tgit rebase --abort &&\n \t\ttest $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&\n@@ -51,10 +51,10 @@ testrebase() {\n \t\tcd \"$work_dir\" &&\n \t\t# Clean up the state from the previous one\n \t\tgit reset --hard pre-rebase &&\n-\t\ttest_must_fail git rebase$type master &&\n+\t\ttest_must_fail git rebase$type main &&\n \t\ttest_path_is_dir \"$dotest\" &&\n \t\ttest_must_fail git rebase --skip &&\n-\t\ttest $(git rev-parse HEAD) = $(git rev-parse master) &&\n+\t\ttest $(git rev-parse HEAD) = $(git rev-parse main) &&\n \t\tgit rebase --abort &&\n \t\ttest $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&\n \t\ttest ! -d \"$dotest\"\n@@ -64,13 +64,13 @@ testrebase() {\n \t\tcd \"$work_dir\" &&\n \t\t# Clean up the state from the previous one\n \t\tgit reset --hard pre-rebase &&\n-\t\ttest_must_fail git rebase$type master &&\n+\t\ttest_must_fail git rebase$type main &&\n \t\ttest_path_is_dir \"$dotest\" &&\n \t\techo c > a &&\n \t\techo d >> a &&\n \t\tgit add a &&\n \t\ttest_must_fail git rebase --continue &&\n-\t\ttest $(git rev-parse HEAD) != $(git rev-parse master) &&\n+\t\ttest $(git rev-parse HEAD) != $(git rev-parse main) &&\n \t\tgit rebase --abort &&\n \t\ttest $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&\n \t\ttest ! -d \"$dotest\"\n@@ -81,7 +81,7 @@ testrebase() {\n \t\t# Clean up the state from the previous one\n \t\tgit reset --hard pre-rebase &&\n \t\tgit reflog show to-rebase > reflog_before &&\n-\t\ttest_must_fail git rebase$type master &&\n+\t\ttest_must_fail git rebase$type main &&\n \t\tgit rebase --abort &&\n \t\tgit reflog show to-rebase > reflog_after &&\n \t\ttest_cmp reflog_before reflog_after &&\n@@ -92,7 +92,7 @@ testrebase() {\n \t\tcd \"$work_dir\" &&\n \t\t# Clean up the state from the previous one\n \t\tgit reset --hard pre-rebase &&\n-\t\ttest_must_fail git rebase$type master &&\n+\t\ttest_must_fail git rebase$type main &&\n \t\ttest_must_fail git rebase -v --abort &&\n \t\ttest_must_fail git rebase --abort -v &&\n \t\tgit rebase --abort\n@@ -106,7 +106,7 @@ test_expect_success 'rebase --apply --quit' '\n \tcd \"$work_dir\" &&\n \t# Clean up the state from the previous one\n \tgit reset --hard pre-rebase &&\n-\ttest_must_fail git rebase --apply master &&\n+\ttest_must_fail git rebase --apply main &&\n \ttest_path_is_dir .git/rebase-apply &&\n \thead_before=$(git rev-parse HEAD) &&\n \tgit rebase --quit &&\n@@ -118,7 +118,7 @@ test_expect_success 'rebase --merge --quit' '\n \tcd \"$work_dir\" &&\n \t# Clean up the state from the previous one\n \tgit reset --hard pre-rebase &&\n-\ttest_must_fail git rebase --merge master &&\n+\ttest_must_fail git rebase --merge main &&\n \ttest_path_is_dir .git/rebase-merge &&\n \thead_before=$(git rev-parse HEAD) &&\n \tgit rebase --quit &&\ndiff --git a/t/t3408-rebase-multi-line.sh b/t/t3408-rebase-multi-line.sh\nindex 6dd56c4c15..ab0960e6d9 100755\n--- a/t/t3408-rebase-multi-line.sh\n+++ b/t/t3408-rebase-multi-line.sh\n@@ -2,7 +2,7 @@\n \n test_description='rebasing a commit with multi-line first paragraph.'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -49,7 +49,7 @@ But otherwise with a sane description.\" side2 &&\n test_expect_success rebase '\n \n \tgit checkout side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n \tgit cat-file commit side@{1} | sed -e \"1,/^\\$/d\" >expect &&\n \ttest_cmp expect actual\ndiff --git a/t/t3409-rebase-preserve-merges.sh b/t/t3409-rebase-preserve-merges.sh\nindex 609efc96f9..ec8062a66a 100755\n--- a/t/t3409-rebase-preserve-merges.sh\n+++ b/t/t3409-rebase-preserve-merges.sh\n@@ -6,7 +6,7 @@ test_description='git rebase -p should preserve merges\n \n Run \"git rebase -p\" and check that merges are properly carried along\n '\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -21,7 +21,7 @@ export GIT_AUTHOR_EMAIL\n \n # Clone 2 (conflicting merge):\n #\n-# A1--A2--B3   <-- origin/master\n+# A1--A2--B3   <-- origin/main\n #  \\       \\\n #   B1------M  <-- topic\n #    \\\n@@ -29,7 +29,7 @@ export GIT_AUTHOR_EMAIL\n #\n # Clone 3 (no-ff merge):\n #\n-# A1--A2--B3   <-- origin/master\n+# A1--A2--B3   <-- origin/main\n #  \\\n #   B1------M  <-- topic\n #    \\     /\n@@ -47,7 +47,7 @@ test_expect_success 'setup for merge-preserving rebase' \\\n \techo Second > B &&\n \tgit add B &&\n \tgit commit -m \"Add B1\" &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \techo Third >> A &&\n \tgit commit -a -m \"Modify A2\" &&\n \techo Fifth > B &&\n@@ -58,10 +58,10 @@ test_expect_success 'setup for merge-preserving rebase' \\\n \t(\n \t\tcd clone2 &&\n \t\tgit checkout -b topic origin/topic &&\n-\t\ttest_must_fail git merge origin/master &&\n+\t\ttest_must_fail git merge origin/main &&\n \t\techo Resolved >B &&\n \t\tgit add B &&\n-\t\tgit commit -m \"Merge origin/master into topic\"\n+\t\tgit commit -m \"Merge origin/main into topic\"\n \t) &&\n \n \tgit clone ./. clone3 &&\ndiff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh\nindex 07597643c5..fda62c65bd 100755\n--- a/t/t3412-rebase-root.sh\n+++ b/t/t3412-rebase-root.sh\n@@ -4,7 +4,7 @@ test_description='git rebase --root\n \n Tests if git rebase --root --onto <newparent> can rebase the root commit.\n '\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -27,7 +27,7 @@ test_expect_success 'prepare repository' '\n \n test_expect_success 'rebase --root fails with too many args' '\n \tgit checkout -B fail other &&\n-\ttest_must_fail git rebase --onto master --root fail fail\n+\ttest_must_fail git rebase --onto main --root fail fail\n '\n \n test_expect_success 'setup pre-rebase hook' '\n@@ -47,7 +47,7 @@ EOF\n \n test_expect_success 'rebase --root --onto <newbase>' '\n \tgit checkout -b work other &&\n-\tgit rebase --root --onto master &&\n+\tgit rebase --root --onto main &&\n \tgit log --pretty=tformat:\"%s\" > rebased &&\n \ttest_cmp expect rebased\n '\n@@ -58,7 +58,7 @@ test_expect_success 'pre-rebase got correct input (1)' '\n \n test_expect_success 'rebase --root --onto <newbase> <branch>' '\n \tgit branch work2 other &&\n-\tgit rebase --root --onto master work2 &&\n+\tgit rebase --root --onto main work2 &&\n \tgit log --pretty=tformat:\"%s\" > rebased2 &&\n \ttest_cmp expect rebased2\n '\n@@ -69,7 +69,7 @@ test_expect_success 'pre-rebase got correct input (2)' '\n \n test_expect_success 'rebase -i --root --onto <newbase>' '\n \tgit checkout -b work3 other &&\n-\tgit rebase -i --root --onto master &&\n+\tgit rebase -i --root --onto main &&\n \tgit log --pretty=tformat:\"%s\" > rebased3 &&\n \ttest_cmp expect rebased3\n '\n@@ -80,7 +80,7 @@ test_expect_success 'pre-rebase got correct input (3)' '\n \n test_expect_success 'rebase -i --root --onto <newbase> <branch>' '\n \tgit branch work4 other &&\n-\tgit rebase -i --root --onto master work4 &&\n+\tgit rebase -i --root --onto main work4 &&\n \tgit log --pretty=tformat:\"%s\" > rebased4 &&\n \ttest_cmp expect rebased4\n '\n@@ -91,7 +91,7 @@ test_expect_success 'pre-rebase got correct input (4)' '\n \n test_expect_success REBASE_P 'rebase -i -p with linear history' '\n \tgit checkout -b work5 other &&\n-\tgit rebase -i -p --root --onto master &&\n+\tgit rebase -i -p --root --onto main &&\n \tgit log --pretty=tformat:\"%s\" > rebased5 &&\n \ttest_cmp expect rebased5\n '\n@@ -125,7 +125,7 @@ EOF\n \n test_expect_success REBASE_P 'rebase -i -p with merge' '\n \tgit checkout -b work6 other &&\n-\tgit rebase -i -p --root --onto master &&\n+\tgit rebase -i -p --root --onto main &&\n \tlog_with_names work6 > rebased6 &&\n \ttest_cmp expect-side rebased6\n '\n@@ -160,7 +160,7 @@ EOF\n \n test_expect_success REBASE_P 'rebase -i -p with two roots' '\n \tgit checkout -b work7 other &&\n-\tgit rebase -i -p --root --onto master &&\n+\tgit rebase -i -p --root --onto main &&\n \tlog_with_names work7 > rebased7 &&\n \ttest_cmp expect-third rebased7\n '\n@@ -176,14 +176,14 @@ EOF\n \n test_expect_success 'pre-rebase hook stops rebase' '\n \tgit checkout -b stops1 other &&\n-\ttest_must_fail git rebase --root --onto master &&\n+\ttest_must_fail git rebase --root --onto main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/stops1 &&\n \ttest 0 = $(git rev-list other...stops1 | wc -l)\n '\n \n test_expect_success 'pre-rebase hook stops rebase -i' '\n \tgit checkout -b stops2 other &&\n-\ttest_must_fail git rebase --root --onto master &&\n+\ttest_must_fail git rebase --root --onto main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/stops2 &&\n \ttest 0 = $(git rev-list other...stops2 | wc -l)\n '\n@@ -193,7 +193,7 @@ test_expect_success 'remove pre-rebase hook' '\n '\n \n test_expect_success 'set up a conflict' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo conflict > B &&\n \tgit add B &&\n \tgit commit -m conflict\n@@ -201,7 +201,7 @@ test_expect_success 'set up a conflict' '\n \n test_expect_success 'rebase --root with conflict (first part)' '\n \tgit checkout -b conflict1 other &&\n-\ttest_must_fail git rebase --root --onto master &&\n+\ttest_must_fail git rebase --root --onto main &&\n \tgit ls-files -u | grep \"B$\"\n '\n \n@@ -228,7 +228,7 @@ test_expect_success 'rebase --root with conflict (second part)' '\n \n test_expect_success 'rebase -i --root with conflict (first part)' '\n \tgit checkout -b conflict2 other &&\n-\ttest_must_fail git rebase -i --root --onto master &&\n+\ttest_must_fail git rebase -i --root --onto main &&\n \tgit ls-files -u | grep \"B$\"\n '\n \n@@ -266,7 +266,7 @@ EOF\n \n test_expect_success REBASE_P 'rebase -i -p --root with conflict (first part)' '\n \tgit checkout -b conflict3 other &&\n-\ttest_must_fail git rebase -i -p --root --onto master &&\n+\ttest_must_fail git rebase -i -p --root --onto main &&\n \tgit ls-files -u | grep \"B$\"\n '\n \ndiff --git a/t/t3413-rebase-hook.sh b/t/t3413-rebase-hook.sh\nindex 86a1b82d65..b4acb3be5c 100755\n--- a/t/t3413-rebase-hook.sh\n+++ b/t/t3413-rebase-hook.sh\n@@ -2,7 +2,7 @@\n \n test_description='git rebase with its hook(s)'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -21,7 +21,7 @@ test_expect_success setup '\n \tgit add git &&\n \ttest_tick &&\n \tgit commit -m side &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit log --pretty=oneline --abbrev-commit --graph --all &&\n \tgit branch test side\n '\n@@ -29,14 +29,14 @@ test_expect_success setup '\n test_expect_success 'rebase' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \ttest \"z$(cat git)\" = zworld\n '\n \n test_expect_success 'rebase -i' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tEDITOR=true git rebase -i master &&\n+\tEDITOR=true git rebase -i main &&\n \ttest \"z$(cat git)\" = zworld\n '\n \n@@ -52,53 +52,53 @@ EOF\n test_expect_success 'pre-rebase hook gets correct input (1)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,\n \n '\n \n test_expect_success 'pre-rebase hook gets correct input (2)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit rebase master test &&\n+\tgit rebase main test &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,test\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,test\n '\n \n test_expect_success 'pre-rebase hook gets correct input (3)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit checkout master &&\n-\tgit rebase master test &&\n+\tgit checkout main &&\n+\tgit rebase main test &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,test\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,test\n '\n \n test_expect_success 'pre-rebase hook gets correct input (4)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tEDITOR=true git rebase -i master &&\n+\tEDITOR=true git rebase -i main &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,\n \n '\n \n test_expect_success 'pre-rebase hook gets correct input (5)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tEDITOR=true git rebase -i master test &&\n+\tEDITOR=true git rebase -i main test &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,test\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,test\n '\n \n test_expect_success 'pre-rebase hook gets correct input (6)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit checkout master &&\n-\tEDITOR=true git rebase -i master test &&\n+\tgit checkout main &&\n+\tEDITOR=true git rebase -i main test &&\n \ttest \"z$(cat git)\" = zworld &&\n-\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmaster,test\n+\ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = zmain,test\n '\n \n test_expect_success 'setup pre-rebase hook that fails' '\n@@ -113,7 +113,7 @@ EOF\n test_expect_success 'pre-rebase hook stops rebase (1)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\ttest_must_fail git rebase master &&\n+\ttest_must_fail git rebase main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/test &&\n \ttest 0 = $(git rev-list HEAD...side | wc -l)\n '\n@@ -121,7 +121,7 @@ test_expect_success 'pre-rebase hook stops rebase (1)' '\n test_expect_success 'pre-rebase hook stops rebase (2)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\ttest_must_fail env EDITOR=: git rebase -i master &&\n+\ttest_must_fail env EDITOR=: git rebase -i main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/test &&\n \ttest 0 = $(git rev-list HEAD...side | wc -l)\n '\n@@ -129,7 +129,7 @@ test_expect_success 'pre-rebase hook stops rebase (2)' '\n test_expect_success 'rebase --no-verify overrides pre-rebase (1)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tgit rebase --no-verify master &&\n+\tgit rebase --no-verify main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/test &&\n \ttest \"z$(cat git)\" = zworld\n '\n@@ -137,7 +137,7 @@ test_expect_success 'rebase --no-verify overrides pre-rebase (1)' '\n test_expect_success 'rebase --no-verify overrides pre-rebase (2)' '\n \tgit checkout test &&\n \tgit reset --hard side &&\n-\tEDITOR=true git rebase --no-verify -i master &&\n+\tEDITOR=true git rebase --no-verify -i main &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/test &&\n \ttest \"z$(cat git)\" = zworld\n '\ndiff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh\nindex 35eb8e2bb2..e7087befd4 100755\n--- a/t/t3415-rebase-autosquash.sh\n+++ b/t/t3415-rebase-autosquash.sh\n@@ -2,7 +2,7 @@\n \n test_description='auto squash'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -410,7 +410,7 @@ test_expect_success 'wrapped original subject' '\n \n test_expect_success 'abort last squash' '\n \ttest_when_finished \"test_might_fail git rebase --abort\" &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \n \tgit checkout -b some-squashes &&\n \tgit commit --allow-empty -m first &&\ndiff --git a/t/t3416-rebase-onto-threedots.sh b/t/t3416-rebase-onto-threedots.sh\nindex d0476fbb28..3716a42e81 100755\n--- a/t/t3416-rebase-onto-threedots.sh\n+++ b/t/t3416-rebase-onto-threedots.sh\n@@ -2,20 +2,20 @@\n \n test_description='git rebase --onto A...B'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n . \"$TEST_DIRECTORY/lib-rebase.sh\"\n \n-# Rebase only the tip commit of \"topic\" on merge base between \"master\"\n-# and \"topic\".  Cannot do this for \"side\" with \"master\" because there\n+# Rebase only the tip commit of \"topic\" on merge base between \"main\"\n+# and \"topic\".  Cannot do this for \"side\" with \"main\" because there\n # is no single merge base.\n #\n #\n #\t    F---G topic                             G'\n #\t   /                                       /\n-# A---B---C---D---E master        -->       A---B---C---D---E\n+# A---B---C---D---E main        -->       A---B---C---D---E\n #      \\   \\ /\n #\t\\   x\n #\t \\ / \\\n@@ -29,7 +29,7 @@ test_expect_success setup '\n \tgit branch topic &&\n \tgit checkout side &&\n \ttest_commit H &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit merge H &&\n \tgit tag D &&\n@@ -45,83 +45,83 @@ test_expect_success setup '\n \ttest_commit K\n '\n \n-test_expect_success 'rebase --onto master...topic' '\n+test_expect_success 'rebase --onto main...topic' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \n-\tgit rebase --onto master...topic F &&\n+\tgit rebase --onto main...topic F &&\n \tgit rev-parse HEAD^1 >actual &&\n \tgit rev-parse C^0 >expect &&\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase --onto master...' '\n+test_expect_success 'rebase --onto main...' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \n-\tgit rebase --onto master... F &&\n+\tgit rebase --onto main... F &&\n \tgit rev-parse HEAD^1 >actual &&\n \tgit rev-parse C^0 >expect &&\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase --onto master...side' '\n+test_expect_success 'rebase --onto main...side' '\n \tgit reset --hard &&\n \tgit checkout side &&\n \tgit reset --hard K &&\n \n-\ttest_must_fail git rebase --onto master...side J\n+\ttest_must_fail git rebase --onto main...side J\n '\n \n-test_expect_success 'rebase -i --onto master...topic' '\n+test_expect_success 'rebase -i --onto main...topic' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \tset_fake_editor &&\n-\tEXPECT_COUNT=1 git rebase -i --onto master...topic F &&\n+\tEXPECT_COUNT=1 git rebase -i --onto main...topic F &&\n \tgit rev-parse HEAD^1 >actual &&\n \tgit rev-parse C^0 >expect &&\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase -i --onto master...' '\n+test_expect_success 'rebase -i --onto main...' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \tset_fake_editor &&\n-\tEXPECT_COUNT=1 git rebase -i --onto master... F &&\n+\tEXPECT_COUNT=1 git rebase -i --onto main... F &&\n \tgit rev-parse HEAD^1 >actual &&\n \tgit rev-parse C^0 >expect &&\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase -i --onto master...side' '\n+test_expect_success 'rebase -i --onto main...side' '\n \tgit reset --hard &&\n \tgit checkout side &&\n \tgit reset --hard K &&\n \n \tset_fake_editor &&\n-\ttest_must_fail git rebase -i --onto master...side J\n+\ttest_must_fail git rebase -i --onto main...side J\n '\n \n test_expect_success 'rebase --keep-base --onto incompatible' '\n-\ttest_must_fail git rebase --keep-base --onto master...\n+\ttest_must_fail git rebase --keep-base --onto main...\n '\n \n test_expect_success 'rebase --keep-base --root incompatible' '\n \ttest_must_fail git rebase --keep-base --root\n '\n \n-test_expect_success 'rebase --keep-base master from topic' '\n+test_expect_success 'rebase --keep-base main from topic' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \n-\tgit rebase --keep-base master &&\n+\tgit rebase --keep-base main &&\n \tgit rev-parse C >base.expect &&\n-\tgit merge-base master HEAD >base.actual &&\n+\tgit merge-base main HEAD >base.actual &&\n \ttest_cmp base.expect base.actual &&\n \n \tgit rev-parse HEAD~2 >actual &&\n@@ -129,23 +129,23 @@ test_expect_success 'rebase --keep-base master from topic' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase --keep-base master from side' '\n+test_expect_success 'rebase --keep-base main from side' '\n \tgit reset --hard &&\n \tgit checkout side &&\n \tgit reset --hard K &&\n \n-\ttest_must_fail git rebase --keep-base master\n+\ttest_must_fail git rebase --keep-base main\n '\n \n-test_expect_success 'rebase -i --keep-base master from topic' '\n+test_expect_success 'rebase -i --keep-base main from topic' '\n \tgit reset --hard &&\n \tgit checkout topic &&\n \tgit reset --hard G &&\n \n \tset_fake_editor &&\n-\tEXPECT_COUNT=2 git rebase -i --keep-base master &&\n+\tEXPECT_COUNT=2 git rebase -i --keep-base main &&\n \tgit rev-parse C >base.expect &&\n-\tgit merge-base master HEAD >base.actual &&\n+\tgit merge-base main HEAD >base.actual &&\n \ttest_cmp base.expect base.actual &&\n \n \tgit rev-parse HEAD~2 >actual &&\n@@ -153,13 +153,13 @@ test_expect_success 'rebase -i --keep-base master from topic' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'rebase -i --keep-base master from side' '\n+test_expect_success 'rebase -i --keep-base main from side' '\n \tgit reset --hard &&\n \tgit checkout side &&\n \tgit reset --hard K &&\n \n \tset_fake_editor &&\n-\ttest_must_fail git rebase -i --keep-base master\n+\ttest_must_fail git rebase -i --keep-base main\n '\n \n test_done\ndiff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh\nindex 445cb843ba..0838f4e798 100755\n--- a/t/t3418-rebase-continue.sh\n+++ b/t/t3418-rebase-continue.sh\n@@ -2,7 +2,7 @@\n \n test_description='git rebase --continue tests'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -18,13 +18,13 @@ test_expect_success 'setup' '\n \tgit checkout -b topic HEAD^ &&\n \ttest_commit \"commit-new-file-F2-on-topic-branch\" F2 22 &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'interactive rebase --continue works with touched file' '\n \trm -fr .git/rebase-* &&\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tFAKE_LINES=\"edit 1\" git rebase -i HEAD^ &&\n \ttest-tool chmtime =-60 F1 &&\n@@ -34,9 +34,9 @@ test_expect_success 'interactive rebase --continue works with touched file' '\n test_expect_success 'non-interactive rebase --continue works with touched file' '\n \trm -fr .git/rebase-* &&\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n-\ttest_must_fail git rebase --onto master master topic &&\n+\ttest_must_fail git rebase --onto main main topic &&\n \techo \"Resolved\" >F2 &&\n \tgit add F2 &&\n \ttest-tool chmtime =-60 F1 &&\n@@ -64,7 +64,7 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '\n \tchmod +x test-bin/git-merge-funny &&\n \t(\n \t\tPATH=./test-bin:$PATH &&\n-\t\ttest_must_fail git rebase -s funny -Xopt master topic\n+\t\ttest_must_fail git rebase -s funny -Xopt main topic\n \t) &&\n \ttest -f funny.was.run &&\n \trm funny.was.run &&\n@@ -96,7 +96,7 @@ test_expect_success 'rebase -i --continue handles merge strategy and options' '\n \tchmod +x test-bin/git-merge-funny &&\n \t(\n \t\tPATH=./test-bin:$PATH &&\n-\t\ttest_must_fail git rebase -i -s funny -Xopt -Xfoo master topic\n+\t\ttest_must_fail git rebase -i -s funny -Xopt -Xfoo main topic\n \t) &&\n \ttest -f funny.was.run &&\n \trm funny.was.run &&\n@@ -191,11 +191,11 @@ test_expect_success '--skip after failed fixup cleans commit message' '\n test_expect_success 'setup rerere database' '\n \trm -fr .git/rebase-* &&\n \tgit reset --hard commit-new-file-F3-on-topic-branch &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit \"commit-new-file-F3\" F3 3 &&\n \ttest_config rerere.enabled true &&\n \tgit update-ref refs/heads/topic commit-new-file-F3-on-topic-branch &&\n-\ttest_must_fail git rebase -m master topic &&\n+\ttest_must_fail git rebase -m main topic &&\n \techo \"Resolved\" >F2 &&\n \tcp F2 expected-F2 &&\n \tgit add F2 &&\n@@ -210,7 +210,7 @@ test_expect_success 'setup rerere database' '\n prepare () {\n \trm -fr .git/rebase-* &&\n \tgit reset --hard commit-new-file-F3-on-topic-branch &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_config rerere.enabled true\n }\n \n@@ -218,7 +218,7 @@ test_rerere_autoupdate () {\n \taction=$1 &&\n \ttest_expect_success \"rebase $action --continue remembers --rerere-autoupdate\" '\n \t\tprepare &&\n-\t\ttest_must_fail git rebase $action --rerere-autoupdate master topic &&\n+\t\ttest_must_fail git rebase $action --rerere-autoupdate main topic &&\n \t\ttest_cmp expected-F2 F2 &&\n \t\tgit diff-files --quiet &&\n \t\ttest_must_fail git rebase --continue &&\n@@ -230,7 +230,7 @@ test_rerere_autoupdate () {\n \ttest_expect_success \"rebase $action --continue honors rerere.autoUpdate\" '\n \t\tprepare &&\n \t\ttest_config rerere.autoupdate true &&\n-\t\ttest_must_fail git rebase $action master topic &&\n+\t\ttest_must_fail git rebase $action main topic &&\n \t\ttest_cmp expected-F2 F2 &&\n \t\tgit diff-files --quiet &&\n \t\ttest_must_fail git rebase --continue &&\n@@ -242,7 +242,7 @@ test_rerere_autoupdate () {\n \ttest_expect_success \"rebase $action --continue remembers --no-rerere-autoupdate\" '\n \t\tprepare &&\n \t\ttest_config rerere.autoupdate true &&\n-\t\ttest_must_fail git rebase $action --no-rerere-autoupdate master topic &&\n+\t\ttest_must_fail git rebase $action --no-rerere-autoupdate main topic &&\n \t\ttest_cmp expected-F2 F2 &&\n \t\ttest_must_fail git diff-files --quiet &&\n \t\tgit add F2 &&\ndiff --git a/t/t3419-rebase-patch-id.sh b/t/t3419-rebase-patch-id.sh\nindex c5fe58d68b..295040f2fe 100755\n--- a/t/t3419-rebase-patch-id.sh\n+++ b/t/t3419-rebase-patch-id.sh\n@@ -2,7 +2,7 @@\n \n test_description='git rebase - test patch id computation'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -27,7 +27,7 @@ test_expect_success 'setup' '\n \n test_expect_success 'setup: 500 lines' '\n \trm -f .gitattributes &&\n-\tgit checkout -q -f master &&\n+\tgit checkout -q -f main &&\n \tgit reset --hard root &&\n \ttest_seq 500 >file &&\n \tgit add file &&\n@@ -43,7 +43,7 @@ test_expect_success 'setup: 500 lines' '\n \tgit add newfile &&\n \tgit commit -q -m \"add small file\" &&\n \n-\tgit cherry-pick master >/dev/null 2>&1\n+\tgit cherry-pick main >/dev/null 2>&1\n '\n \n test_expect_success 'setup attributes' '\n@@ -51,18 +51,18 @@ test_expect_success 'setup attributes' '\n '\n \n test_expect_success 'detect upstream patch' '\n-\tgit checkout -q master &&\n+\tgit checkout -q main &&\n \tscramble file &&\n \tgit add file &&\n \tgit commit -q -m \"change big file again\" &&\n \tgit checkout -q other^{} &&\n-\tgit rebase master &&\n-\tgit rev-list master...HEAD~ >revs &&\n+\tgit rebase main &&\n+\tgit rev-list main...HEAD~ >revs &&\n \ttest_must_be_empty revs\n '\n \n test_expect_success 'do not drop patch' '\n-\tgit branch -f squashed master &&\n+\tgit branch -f squashed main &&\n \tgit checkout -q -f squashed &&\n \tgit reset -q --soft HEAD~2 &&\n \tgit commit -q -m squashed &&\ndiff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh\nindex 95facc49aa..4caa014c71 100755\n--- a/t/t3420-rebase-autostash.sh\n+++ b/t/t3420-rebase-autostash.sh\n@@ -4,7 +4,7 @@\n #\n \n test_description='git rebase --autostash tests'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -24,12 +24,12 @@ test_expect_success setup '\n \tgit add . &&\n \ttest_tick &&\n \tgit commit -m \"third commit\" &&\n-\tgit checkout -b unrelated-onto-branch master &&\n+\tgit checkout -b unrelated-onto-branch main &&\n \techo unrelated >file4 &&\n \tgit add . &&\n \ttest_tick &&\n \tgit commit -m \"unrelated commit\" &&\n-\tgit checkout -b related-onto-branch master &&\n+\tgit checkout -b related-onto-branch main &&\n \techo conflicting-change >file2 &&\n \tgit add . &&\n \ttest_tick &&\n@@ -308,7 +308,7 @@ test_expect_success 'autostash is saved on editor failure with conflict' '\n '\n \n test_expect_success 'autostash with dirty submodules' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \tgit checkout -b with-submodule &&\n \tgit submodule add ./ sub &&\n \ttest_tick &&\n@@ -327,7 +327,7 @@ test_expect_success 'branch is left alone when possible' '\n \n test_expect_success 'never change active branch' '\n \tgit checkout -b not-the-feature-branch unrelated-onto-branch &&\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \techo changed >file0 &&\n \tgit rebase --autostash not-the-feature-branch feature-branch &&\n \ttest_cmp_rev not-the-feature-branch unrelated-onto-branch\ndiff --git a/t/t3423-rebase-reword.sh b/t/t3423-rebase-reword.sh\nindex 6963750794..4859bb8f72 100755\n--- a/t/t3423-rebase-reword.sh\n+++ b/t/t3423-rebase-reword.sh\n@@ -7,7 +7,7 @@ test_description='git rebase interactive with rewording'\n . \"$TEST_DIRECTORY\"/lib-rebase.sh\n \n test_expect_success 'setup' '\n-\ttest_commit master file-1 test &&\n+\ttest_commit main file-1 test &&\n \n \tgit checkout -b stuff &&\n \n@@ -22,7 +22,7 @@ test_expect_success 'reword without issues functions as intended' '\n \n \tset_fake_editor &&\n \tFAKE_LINES=\"pick 1 reword 2\" FAKE_COMMIT_MESSAGE=\"feature_b_reworded\" \\\n-\t\tgit rebase -i -v master &&\n+\t\tgit rebase -i -v main &&\n \n \ttest \"$(git log -1 --format=%B)\" = \"feature_b_reworded\" &&\n \ttest $(git rev-list --count HEAD) = 3\n@@ -35,7 +35,7 @@ test_expect_success 'reword after a conflict preserves commit' '\n \n \tset_fake_editor &&\n \ttest_must_fail env FAKE_LINES=\"reword 2\" \\\n-\t\tgit rebase -i -v master &&\n+\t\tgit rebase -i -v main &&\n \n \tgit checkout --theirs file-2 &&\n \tgit add file-2 &&\ndiff --git a/t/t3427-rebase-subtree.sh b/t/t3427-rebase-subtree.sh\nindex 254ed18452..e78c7e3796 100755\n--- a/t/t3427-rebase-subtree.sh\n+++ b/t/t3427-rebase-subtree.sh\n@@ -4,7 +4,7 @@ test_description='git rebase tests for -Xsubtree\n \n This test runs git rebase and tests the subtree strategy.\n '\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -20,7 +20,7 @@ commit_message() {\n #\n # topic_1 - topic_2 - topic_3\n #                             \\\n-# README ---------------------- Add subproject master - topic_4 - files_subtree/topic_5\n+# README ---------------------- Add subproject main - topic_4 - files_subtree/topic_5\n #\n # Where the merge moves the files topic_[123].t into the subdirectory\n # files_subtree/ and topic_4 as well as files_subtree/topic_5 add files to that\n@@ -31,7 +31,7 @@ commit_message() {\n # an empty commit is added on top. The pre-rebase commit history looks like\n # this:\n #\n-# Add subproject master - topic_4 - files_subtree/topic_5 - Empty commit\n+# Add subproject main - topic_4 - files_subtree/topic_5 - Empty commit\n #\n # where the root commit adds three files: topic_1.t, topic_2.t and topic_3.t.\n #\n@@ -51,11 +51,11 @@ test_expect_success 'setup' '\n \ttest_commit -C files topic_3 &&\n \n \t: perform subtree merge into files_subtree/ &&\n-\tgit fetch files refs/heads/master:refs/heads/files-master &&\n+\tgit fetch files refs/heads/main:refs/heads/files-main &&\n \tgit merge -s ours --no-commit --allow-unrelated-histories \\\n-\t\tfiles-master &&\n-\tgit read-tree --prefix=files_subtree -u files-master &&\n-\tgit commit -m \"Add subproject master\" &&\n+\t\tfiles-main &&\n+\tgit read-tree --prefix=files_subtree -u files-main &&\n+\tgit commit -m \"Add subproject main\" &&\n \n \t: add two extra commits to rebase &&\n \ttest_commit -C files_subtree topic_4 &&\n@@ -73,7 +73,7 @@ test_expect_success 'setup' '\n test_expect_failure REBASE_P 'Rebase -Xsubtree --preserve-merges --onto commit' '\n \treset_rebase &&\n \tgit checkout -b rebase-preserve-merges to-rebase &&\n-\tgit rebase -Xsubtree=files_subtree --preserve-merges --onto files-master master &&\n+\tgit rebase -Xsubtree=files_subtree --preserve-merges --onto files-main main &&\n \tverbose test \"$(commit_message HEAD~)\" = \"topic_4\" &&\n \tverbose test \"$(commit_message HEAD)\" = \"files_subtree/topic_5\"\n '\n@@ -82,7 +82,7 @@ test_expect_failure REBASE_P 'Rebase -Xsubtree --preserve-merges --onto commit'\n test_expect_failure REBASE_P 'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit' '\n \treset_rebase &&\n \tgit checkout -b rebase-keep-empty to-rebase &&\n-\tgit rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-master master &&\n+\tgit rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-main main &&\n \tverbose test \"$(commit_message HEAD~2)\" = \"topic_4\" &&\n \tverbose test \"$(commit_message HEAD~)\" = \"files_subtree/topic_5\" &&\n \tverbose test \"$(commit_message HEAD)\" = \"Empty commit\"\n@@ -91,7 +91,7 @@ test_expect_failure REBASE_P 'Rebase -Xsubtree --keep-empty --preserve-merges --\n test_expect_success 'Rebase -Xsubtree --empty=ask --onto commit' '\n \treset_rebase &&\n \tgit checkout -b rebase-onto to-rebase &&\n-\ttest_must_fail git rebase -Xsubtree=files_subtree --empty=ask --onto files-master master &&\n+\ttest_must_fail git rebase -Xsubtree=files_subtree --empty=ask --onto files-main main &&\n \t: first pick results in no changes &&\n \tgit rebase --skip &&\n \tverbose test \"$(commit_message HEAD~2)\" = \"topic_4\" &&\n@@ -102,7 +102,7 @@ test_expect_success 'Rebase -Xsubtree --empty=ask --onto commit' '\n test_expect_success 'Rebase -Xsubtree --empty=ask --rebase-merges --onto commit' '\n \treset_rebase &&\n \tgit checkout -b rebase-merges-onto to-rebase &&\n-\ttest_must_fail git rebase -Xsubtree=files_subtree --empty=ask --rebase-merges --onto files-master --root &&\n+\ttest_must_fail git rebase -Xsubtree=files_subtree --empty=ask --rebase-merges --onto files-main --root &&\n \t: first pick results in no changes &&\n \tgit rebase --skip &&\n \tverbose test \"$(commit_message HEAD~2)\" = \"topic_4\" &&\ndiff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh\nindex 22d929bd31..6748070df5 100755\n--- a/t/t3430-rebase-merges.sh\n+++ b/t/t3430-rebase-merges.sh\n@@ -12,13 +12,13 @@ Initial setup:\n \n     -- B --                   (first)\n    /       \\\n- A - C - D - E - H            (master)\n+ A - C - D - E - H            (main)\n    \\    \\       /\n     \\    F - G                (second)\n      \\\n       Conflicting-G\n '\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -40,7 +40,7 @@ test_expect_success 'setup' '\n \tgit checkout -b first &&\n \ttest_commit B &&\n \tb=$(git rev-parse --short HEAD) &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit C &&\n \tc=$(git rev-parse --short HEAD) &&\n \ttest_commit D &&\n@@ -55,7 +55,7 @@ test_expect_success 'setup' '\n \tf=$(git rev-parse --short HEAD) &&\n \ttest_commit G &&\n \tg=$(git rev-parse --short HEAD) &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge --no-commit G &&\n \ttest_tick &&\n \tgit commit -m H &&\n@@ -85,7 +85,7 @@ test_expect_success 'create completely different structure' '\n \tEOF\n \ttest_config sequence.editor \\\"\"$PWD\"/replace-editor.sh\\\" &&\n \ttest_tick &&\n-\tgit rebase -i -r A master &&\n+\tgit rebase -i -r A main &&\n \ttest_cmp_graph <<-\\EOF\n \t*   Merge the topic branch '\\''onebranch'\\''\n \t|\\\n@@ -186,7 +186,7 @@ test_expect_success 'fast-forward merge -c still rewords' '\n '\n \n test_expect_success 'with a branch tip that was cherry-picked already' '\n-\tgit checkout -b already-upstream master &&\n+\tgit checkout -b already-upstream main &&\n \tbase=\"$(git rev-parse --verify HEAD)\" &&\n \n \ttest_commit A1 &&\n@@ -214,7 +214,7 @@ test_expect_success 'with a branch tip that was cherry-picked already' '\n '\n \n test_expect_success 'do not rebase cousins unless asked for' '\n-\tgit checkout -b cousins master &&\n+\tgit checkout -b cousins main &&\n \tbefore=\"$(git rev-parse --verify HEAD)\" &&\n \ttest_tick &&\n \tgit rebase -r HEAD^ &&\n@@ -343,7 +343,7 @@ test_expect_success 'a \"merge\" into a root commit is a fast-forward' '\n test_expect_success 'A root commit can be a cousin, treat it that way' '\n \tgit checkout --orphan khnum &&\n \ttest_commit yama &&\n-\tgit checkout -b asherah master &&\n+\tgit checkout -b asherah main &&\n \ttest_commit shamkat &&\n \tgit merge --allow-unrelated-histories khnum &&\n \ttest_tick &&\n@@ -370,7 +370,7 @@ test_expect_success 'labels that are object IDs are rewritten' '\n \tgit checkout -b third B &&\n \ttest_commit I &&\n \tthird=$(git rev-parse HEAD) &&\n-\tgit checkout -b labels master &&\n+\tgit checkout -b labels main &&\n \tgit merge --no-commit third &&\n \ttest_tick &&\n \tgit commit -m \"Merge commit '\\''$third'\\'' into labels\" &&\ndiff --git a/t/t3431-rebase-fork-point.sh b/t/t3431-rebase-fork-point.sh\nindex af862e5bcc..2dab893c75 100755\n--- a/t/t3431-rebase-fork-point.sh\n+++ b/t/t3431-rebase-fork-point.sh\n@@ -5,16 +5,16 @@\n \n test_description='git rebase --fork-point test'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n \n-# A---B---D---E    (master)\n+# A---B---D---E    (main)\n #      \\\n #       C*---F---G (side)\n #\n-# C was formerly part of master but master was rewound to remove C\n+# C was formerly part of main but main was rewound to remove C\n #\n test_expect_success setup '\n \ttest_commit A &&\n@@ -33,7 +33,7 @@ test_rebase () {\n \texpected=\"$1\" &&\n \tshift &&\n \ttest_expect_success \"git rebase $*\" \"\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit reset --hard E &&\n \t\tgit checkout side &&\n \t\tgit reset --hard G &&\n@@ -51,26 +51,26 @@ test_rebase 'G F C E D B A' --no-fork-point\n test_rebase 'G F C D B A' --no-fork-point --onto D\n test_rebase 'G F C B A' --no-fork-point --keep-base\n \n-test_rebase 'G F E D B A' --fork-point refs/heads/master\n-test_rebase 'G F E D B A' --fork-point master\n+test_rebase 'G F E D B A' --fork-point refs/heads/main\n+test_rebase 'G F E D B A' --fork-point main\n \n-test_rebase 'G F D B A' --fork-point --onto D refs/heads/master\n-test_rebase 'G F D B A' --fork-point --onto D master\n+test_rebase 'G F D B A' --fork-point --onto D refs/heads/main\n+test_rebase 'G F D B A' --fork-point --onto D main\n \n-test_rebase 'G F B A' --fork-point --keep-base refs/heads/master\n-test_rebase 'G F B A' --fork-point --keep-base master\n+test_rebase 'G F B A' --fork-point --keep-base refs/heads/main\n+test_rebase 'G F B A' --fork-point --keep-base main\n \n-test_rebase 'G F C E D B A' refs/heads/master\n-test_rebase 'G F C E D B A' master\n+test_rebase 'G F C E D B A' refs/heads/main\n+test_rebase 'G F C E D B A' main\n \n-test_rebase 'G F C D B A' --onto D refs/heads/master\n-test_rebase 'G F C D B A' --onto D master\n+test_rebase 'G F C D B A' --onto D refs/heads/main\n+test_rebase 'G F C D B A' --onto D main\n \n-test_rebase 'G F C B A' --keep-base refs/heads/master\n-test_rebase 'G F C B A' --keep-base master\n+test_rebase 'G F C B A' --keep-base refs/heads/main\n+test_rebase 'G F C B A' --keep-base main\n \n test_expect_success 'git rebase --fork-point with ambigous refname' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -b one &&\n \tgit checkout side &&\n \tgit tag one &&\ndiff --git a/t/t3432-rebase-fast-forward.sh b/t/t3432-rebase-fast-forward.sh\nindex 112a18d630..5086e14c02 100755\n--- a/t/t3432-rebase-fast-forward.sh\n+++ b/t/t3432-rebase-fast-forward.sh\n@@ -5,7 +5,7 @@\n \n test_description='ensure rebase fast-forwards commits when possible'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -87,19 +87,19 @@ test_rebase_same_head_ () {\n \n changes='no changes'\n test_rebase_same_head success noop same success work same\n-test_rebase_same_head success noop same success work same master\n+test_rebase_same_head success noop same success work same main\n test_rebase_same_head success noop same success work diff --onto B B\n test_rebase_same_head success noop same success work diff --onto B... B\n-test_rebase_same_head success noop same success work same --onto master... master\n-test_rebase_same_head success noop same success work same --keep-base master\n+test_rebase_same_head success noop same success work same --onto main... main\n+test_rebase_same_head success noop same success work same --keep-base main\n test_rebase_same_head success noop same success work same --keep-base\n test_rebase_same_head success noop same success work same --no-fork-point\n test_rebase_same_head success noop same success work same --keep-base --no-fork-point\n-test_rebase_same_head success noop same success work same --fork-point master\n+test_rebase_same_head success noop same success work same --fork-point main\n test_rebase_same_head success noop same success work diff --fork-point --onto B B\n test_rebase_same_head success noop same success work diff --fork-point --onto B... B\n-test_rebase_same_head success noop same success work same --fork-point --onto master... master\n-test_rebase_same_head success noop same success work same --keep-base --keep-base master\n+test_rebase_same_head success noop same success work same --fork-point --onto main... main\n+test_rebase_same_head success noop same success work same --keep-base --keep-base main\n \n test_expect_success 'add work same to side' '\n \ttest_commit E\n@@ -107,22 +107,22 @@ test_expect_success 'add work same to side' '\n \n changes='our changes'\n test_rebase_same_head success noop same success work same\n-test_rebase_same_head success noop same success work same master\n+test_rebase_same_head success noop same success work same main\n test_rebase_same_head success noop same success work diff --onto B B\n test_rebase_same_head success noop same success work diff --onto B... B\n-test_rebase_same_head success noop same success work same --onto master... master\n-test_rebase_same_head success noop same success work same --keep-base master\n+test_rebase_same_head success noop same success work same --onto main... main\n+test_rebase_same_head success noop same success work same --keep-base main\n test_rebase_same_head success noop same success work same --keep-base\n test_rebase_same_head success noop same success work same --no-fork-point\n test_rebase_same_head success noop same success work same --keep-base --no-fork-point\n-test_rebase_same_head success noop same success work same --fork-point master\n+test_rebase_same_head success noop same success work same --fork-point main\n test_rebase_same_head success noop same success work diff --fork-point --onto B B\n test_rebase_same_head success noop same success work diff --fork-point --onto B... B\n-test_rebase_same_head success noop same success work same --fork-point --onto master... master\n-test_rebase_same_head success noop same success work same --fork-point --keep-base master\n+test_rebase_same_head success noop same success work same --fork-point --onto main... main\n+test_rebase_same_head success noop same success work same --fork-point --keep-base main\n \n test_expect_success 'add work same to upstream' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit F &&\n \tgit checkout side\n '\n@@ -130,12 +130,12 @@ test_expect_success 'add work same to upstream' '\n changes='our and their changes'\n test_rebase_same_head success noop same success work diff --onto B B\n test_rebase_same_head success noop same success work diff --onto B... B\n-test_rebase_same_head success noop same success work diff --onto master... master\n-test_rebase_same_head success noop same success work diff --keep-base master\n+test_rebase_same_head success noop same success work diff --onto main... main\n+test_rebase_same_head success noop same success work diff --keep-base main\n test_rebase_same_head success noop same success work diff --keep-base\n test_rebase_same_head failure work same success work diff --fork-point --onto B B\n test_rebase_same_head failure work same success work diff --fork-point --onto B... B\n-test_rebase_same_head success noop same success work diff --fork-point --onto master... master\n-test_rebase_same_head success noop same success work diff --fork-point --keep-base master\n+test_rebase_same_head success noop same success work diff --fork-point --onto main... main\n+test_rebase_same_head success noop same success work diff --fork-point --keep-base main\n \n test_done\ndiff --git a/t/t3434-rebase-i18n.sh b/t/t3434-rebase-i18n.sh\nindex 26fd33cbed..e6fef696bb 100755\n--- a/t/t3434-rebase-i18n.sh\n+++ b/t/t3434-rebase-i18n.sh\n@@ -7,14 +7,14 @@ test_description='rebase with changing encoding\n \n Initial setup:\n \n-1 - 2              master\n+1 - 2              main\n  \\\n   3 - 4            first\n    \\\n     5 - 6          second\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -44,7 +44,7 @@ test_expect_success 'rebase --rebase-merges update encoding eucJP to UTF-8' '\n \tgit config i18n.commitencoding eucJP &&\n \tgit merge -F \"$TEST_DIRECTORY/t3434/eucJP.txt\" second &&\n \tgit config i18n.commitencoding UTF-8 &&\n-\tgit rebase --rebase-merges master &&\n+\tgit rebase --rebase-merges main &&\n \tcompare_msg eucJP.txt eucJP UTF-8\n '\n \n@@ -53,7 +53,7 @@ test_expect_success 'rebase --rebase-merges update encoding eucJP to ISO-2022-JP\n \tgit config i18n.commitencoding eucJP &&\n \tgit merge -F \"$TEST_DIRECTORY/t3434/eucJP.txt\" second &&\n \tgit config i18n.commitencoding ISO-2022-JP &&\n-\tgit rebase --rebase-merges master &&\n+\tgit rebase --rebase-merges main &&\n \tcompare_msg eucJP.txt eucJP ISO-2022-JP\n '\n \n@@ -69,7 +69,7 @@ test_rebase_continue_update_encode () {\n \t\tgit config i18n.commitencoding $old &&\n \t\tgit commit -F \"$TEST_DIRECTORY/t3434/$msgfile\" &&\n \t\tgit config i18n.commitencoding $new &&\n-\t\ttest_must_fail git rebase -m master &&\n+\t\ttest_must_fail git rebase -m main &&\n \t\ttest -f .git/rebase-merge/message &&\n \t\tgit stripspace <.git/rebase-merge/message >two.t &&\n \t\tgit add two.t &&\ndiff --git a/t/t3435-rebase-gpg-sign.sh b/t/t3435-rebase-gpg-sign.sh\nindex d169bc511d..ec10766858 100755\n--- a/t/t3435-rebase-gpg-sign.sh\n+++ b/t/t3435-rebase-gpg-sign.sh\n@@ -5,7 +5,7 @@\n \n test_description='test rebase --[no-]gpg-sign'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -49,7 +49,7 @@ test_expect_success 'setup: merge commit' '\n \ttest_commit fork-point &&\n \tgit switch -c side &&\n \ttest_commit three &&\n-\tgit switch master &&\n+\tgit switch main &&\n \tgit merge --no-ff side &&\n \tgit tag merged\n '\n@@ -67,7 +67,7 @@ test_rebase_gpg_sign   false -i --no-gpg-sign --gpg-sign\n test_expect_failure 'rebase -p --no-gpg-sign override commit.gpgsign' '\n \tgit reset --hard merged &&\n \tgit config commit.gpgsign true &&\n-\tgit rebase -p --no-gpg-sign --onto=one fork-point master &&\n+\tgit rebase -p --no-gpg-sign --onto=one fork-point main &&\n \ttest_must_fail git verify-commit HEAD\n '\n \ndiff --git a/t/t3436-rebase-more-options.sh b/t/t3436-rebase-more-options.sh\nindex eaaf4c8d1d..4d106642ba 100755\n--- a/t/t3436-rebase-more-options.sh\n+++ b/t/t3436-rebase-more-options.sh\n@@ -28,7 +28,7 @@ test_expect_success 'setup' '\n \ttest_commit commit2 foo foo2 &&\n \ttest_commit commit3 foo foo3 &&\n \n-\tgit checkout --orphan master &&\n+\tgit checkout --orphan main &&\n \trm foo &&\n \ttest_write_lines \"line 1\" \"        line 2\" \"line 3\" >file &&\n \tgit commit -am \"add file\" &&\n-- \ngitgitgadget\n\n"},{"id":"410288","messageId":"d9d1d14681c474a10c34efbd5bbf2fe856e21553.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 11/28] t5[0-4]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:29Z","receivedAt":"2020-11-18T23:45:20Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t5310, which is developed independently of the\ncurrent patch series at the time of writing, we now use `main` as\ndefault branch in t5[0-4]*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t5[0-4]*.sh &&\n\t   git checkout HEAD -- t5310\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5150-request-pull.sh                | 36 +++++++-------\n t/t5304-prune.sh                       |  4 +-\n t/t5305-include-tag.sh                 |  4 +-\n t/t5312-prune-corruption.sh            | 18 +++----\n t/t5317-pack-objects-filter-objects.sh |  4 +-\n t/t5322-pack-objects-sparse.sh         |  4 +-\n t/t5323-pack-redundant.sh              | 66 +++++++++++++-------------\n t/t5400-send-pack.sh                   | 62 ++++++++++++------------\n t/t5401-update-hooks.sh                | 24 +++++-----\n t/t5402-post-merge-hook.sh             |  4 +-\n t/t5403-post-checkout-hook.sh          |  8 ++--\n t/t5404-tracking-branches.sh           | 10 ++--\n t/t5405-send-pack-rewind.sh            |  8 ++--\n t/t5407-post-rewrite-hook.sh           |  4 +-\n t/t5410-receive-pack-alternates.sh     |  6 +--\n 15 files changed, 131 insertions(+), 131 deletions(-)\n\ndiff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh\nindex 752e1fb2d2..db4e15fd59 100755\n--- a/t/t5150-request-pull.sh\n+++ b/t/t5150-request-pull.sh\n@@ -2,7 +2,7 @@\n \n test_description='Test workflows involving pull request.'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -34,13 +34,13 @@ test_expect_success 'setup' '\n \t\ttest_tick &&\n \t\tgit commit -m \"\\\"Thirty days\\\", a reminder of month lengths\" &&\n \t\tgit tag -m \"version 1\" -a initial &&\n-\t\tgit push --tags origin master\n+\t\tgit push --tags origin main\n \t) &&\n \t(\n \t\tcd local &&\n \t\tgit remote add upstream \"$trash_url/upstream.git\" &&\n \t\tgit fetch upstream &&\n-\t\tgit pull upstream master &&\n+\t\tgit pull upstream main &&\n \t\tcat <<-\\EOT >>mnemonic.txt &&\n \t\tOf twyecescore-eightt is but eine,\n \t\tAnd all the remnante be thrycescore-eine.\n@@ -62,7 +62,7 @@ test_expect_success 'setup' '\n \t\tgit commit -a -m \"Adapt to use modern, simpler English\n \n But keep the old version, too, in case some people prefer it.\" &&\n-\t\tgit checkout master\n+\t\tgit checkout main\n \t)\n \n '\n@@ -132,7 +132,7 @@ test_expect_success 'pull request when forgot to push' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n+\t\tgit merge --ff-only main &&\n \t\ttest_must_fail git request-pull initial \"$downstream_url\" \\\n \t\t\t2>../err\n \t) &&\n@@ -148,9 +148,9 @@ test_expect_success 'pull request after push' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n-\t\tgit push origin master:for-upstream &&\n-\t\tgit request-pull initial origin master:for-upstream >../request\n+\t\tgit merge --ff-only main &&\n+\t\tgit push origin main:for-upstream &&\n+\t\tgit request-pull initial origin main:for-upstream >../request\n \t) &&\n \tsed -nf read-request.sed <request >digest &&\n \t{\n@@ -175,9 +175,9 @@ test_expect_success 'request asks HEAD to be pulled' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n-\t\tgit push --tags origin master simplify &&\n-\t\tgit push origin master:for-upstream &&\n+\t\tgit merge --ff-only main &&\n+\t\tgit push --tags origin main simplify &&\n+\t\tgit push origin main:for-upstream &&\n \t\tgit request-pull initial \"$downstream_url\" >../request\n \t) &&\n \tsed -nf read-request.sed <request >digest &&\n@@ -218,7 +218,7 @@ test_expect_success 'pull request format' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n+\t\tgit merge --ff-only main &&\n \t\tgit push origin tags/full &&\n \t\tgit request-pull initial \"$downstream_url\" tags/full >../request\n \t) &&\n@@ -246,9 +246,9 @@ test_expect_success 'request-pull ignores OPTIONS_KEEPDASHDASH poison' '\n \t\tOPTIONS_KEEPDASHDASH=Yes &&\n \t\texport OPTIONS_KEEPDASHDASH &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n-\t\tgit push origin master:for-upstream &&\n-\t\tgit request-pull -- initial \"$downstream_url\" master:for-upstream >../request\n+\t\tgit merge --ff-only main &&\n+\t\tgit push origin main:for-upstream &&\n+\t\tgit request-pull -- initial \"$downstream_url\" main:for-upstream >../request\n \t)\n \n '\n@@ -260,7 +260,7 @@ test_expect_success 'request-pull quotes regex metacharacters properly' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n+\t\tgit merge --ff-only main &&\n \t\tgit tag -mrelease v2.0 &&\n \t\tgit push origin refs/tags/v2.0:refs/tags/v2-0 &&\n \t\ttest_must_fail git request-pull initial \"$downstream_url\" tags/v2.0 \\\n@@ -278,7 +278,7 @@ test_expect_success 'pull request with mismatched object' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n+\t\tgit merge --ff-only main &&\n \t\tgit push origin HEAD:refs/tags/full &&\n \t\ttest_must_fail git request-pull initial \"$downstream_url\" tags/full \\\n \t\t\t2>../err\n@@ -295,7 +295,7 @@ test_expect_success 'pull request with stale object' '\n \t(\n \t\tcd local &&\n \t\tgit checkout initial &&\n-\t\tgit merge --ff-only master &&\n+\t\tgit merge --ff-only main &&\n \t\tgit push origin refs/tags/full &&\n \t\tgit tag -f -m\"Thirty-one days\" full &&\n \t\ttest_must_fail git request-pull initial \"$downstream_url\" tags/full \\\ndiff --git a/t/t5304-prune.sh b/t/t5304-prune.sh\nindex bd5f71e396..b447ce56a9 100755\n--- a/t/t5304-prune.sh\n+++ b/t/t5304-prune.sh\n@@ -4,7 +4,7 @@\n #\n \n test_description='prune'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -122,7 +122,7 @@ test_expect_success 'prune: do not prune detached HEAD with no reflog' '\n test_expect_success 'prune: prune former HEAD after checking out branch' '\n \n \thead_oid=$(git rev-parse HEAD) &&\n-\tgit checkout --quiet master &&\n+\tgit checkout --quiet main &&\n \tgit prune -v >prune_actual &&\n \tgrep \"$head_oid\" prune_actual\n \ndiff --git a/t/t5305-include-tag.sh b/t/t5305-include-tag.sh\nindex 2e56887ed5..44bd9ef45f 100755\n--- a/t/t5305-include-tag.sh\n+++ b/t/t5305-include-tag.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='git pack-object --include-tag'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -114,7 +114,7 @@ test_expect_success 'check unpacked result (have all objects)' '\n \n test_expect_success 'single-branch clone can transfer tag' '\n \trm -rf clone.git &&\n-\tgit clone --no-local --single-branch -b master . clone.git &&\n+\tgit clone --no-local --single-branch -b main . clone.git &&\n \tgit -C clone.git fsck\n '\n \ndiff --git a/t/t5312-prune-corruption.sh b/t/t5312-prune-corruption.sh\nindex c70b5db2a0..11423b3cb2 100755\n--- a/t/t5312-prune-corruption.sh\n+++ b/t/t5312-prune-corruption.sh\n@@ -8,7 +8,7 @@ bail out or to proceed using it as a reachable tip, but it is _not_\n OK to proceed as if it did not exist. Otherwise we might silently\n delete objects that cannot be recovered.\n '\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -19,7 +19,7 @@ test_expect_success 'disable reflogs' '\n '\n \n test_expect_success 'create history reachable only from a bogus-named ref' '\n-\ttest_tick && git commit --allow-empty -m master &&\n+\ttest_tick && git commit --allow-empty -m main &&\n \tbase=$(git rev-parse HEAD) &&\n \ttest_tick && git commit --allow-empty -m bogus &&\n \tbogus=$(git rev-parse HEAD) &&\n@@ -54,7 +54,7 @@ test_expect_success 'clean up bogus ref' '\n '\n \n # We create two new objects here, \"one\" and \"two\". Our\n-# master branch points to \"two\", which is deleted,\n+# main branch points to \"two\", which is deleted,\n # corrupting the repository. But we'd like to make sure\n # that the otherwise unreachable \"one\" is not pruned\n # (since it is the user's best bet for recovering\n@@ -84,7 +84,7 @@ test_expect_success 'pruning with a corrupted tip does not drop history' '\n test_expect_success 'pack-refs does not silently delete broken loose ref' '\n \tgit pack-refs --all --prune &&\n \techo $missing >expect &&\n-\tgit rev-parse refs/heads/master >actual &&\n+\tgit rev-parse refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -92,25 +92,25 @@ test_expect_success 'pack-refs does not silently delete broken loose ref' '\n # actually pack it, as it is perfectly reasonable to\n # skip processing a broken ref\n test_expect_success 'create packed-refs file with broken ref' '\n-\trm -f .git/refs/heads/master &&\n+\trm -f .git/refs/heads/main &&\n \tcat >.git/packed-refs <<-EOF &&\n-\t$missing refs/heads/master\n+\t$missing refs/heads/main\n \t$recoverable refs/heads/other\n \tEOF\n \techo $missing >expect &&\n-\tgit rev-parse refs/heads/master >actual &&\n+\tgit rev-parse refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'pack-refs does not silently delete broken packed ref' '\n \tgit pack-refs --all --prune &&\n-\tgit rev-parse refs/heads/master >actual &&\n+\tgit rev-parse refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'pack-refs does not drop broken refs during deletion' '\n \tgit update-ref -d refs/heads/other &&\n-\tgit rev-parse refs/heads/master >actual &&\n+\tgit rev-parse refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t5317-pack-objects-filter-objects.sh b/t/t5317-pack-objects-filter-objects.sh\nindex f19c521292..13ed3eb136 100755\n--- a/t/t5317-pack-objects-filter-objects.sh\n+++ b/t/t5317-pack-objects-filter-objects.sh\n@@ -2,7 +2,7 @@\n \n test_description='git pack-objects using object filtering'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -385,7 +385,7 @@ test_expect_success 'verify sparse:oid=oid-ish' '\n \tawk -f print_2.awk ls_files_result |\n \tsort >expected &&\n \n-\tgit -C r4 pack-objects --revs --stdout --filter=sparse:oid=master:pattern >filter.pack <<-EOF &&\n+\tgit -C r4 pack-objects --revs --stdout --filter=sparse:oid=main:pattern >filter.pack <<-EOF &&\n \tHEAD\n \tEOF\n \tgit -C r4 index-pack ../filter.pack &&\ndiff --git a/t/t5322-pack-objects-sparse.sh b/t/t5322-pack-objects-sparse.sh\nindex c92658d026..61cb907a90 100755\n--- a/t/t5322-pack-objects-sparse.sh\n+++ b/t/t5322-pack-objects-sparse.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='pack-objects object selection using sparse algorithm'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -21,7 +21,7 @@ test_expect_success 'setup repo' '\n \tgit commit -m \"Initialized trees\" &&\n \tfor i in $(test_seq 1 3)\n \tdo\n-\t\tgit checkout -b topic$i master &&\n+\t\tgit checkout -b topic$i main &&\n \t\techo change-$i >f$i/f$i/data.txt &&\n \t\tgit commit -a -m \"Changed f$i/f$i/data.txt\"\n \tdone &&\ndiff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh\nindex 3903148926..89c8688647 100755\n--- a/t/t5323-pack-redundant.sh\n+++ b/t/t5323-pack-redundant.sh\n@@ -6,7 +6,7 @@\n test_description='Test git pack-redundant\n \n In order to test git-pack-redundant, we will create a number of objects and\n-packs in the repository `master.git`. The relationship between packs (P1-P8)\n+packs in the repository `main.git`. The relationship between packs (P1-P8)\n and objects (T, A-R) is showed in the following chart. Objects of a pack will\n be marked with letter x, while objects of redundant packs will be marked with\n exclamation point, and redundant pack itself will be marked with asterisk.\n@@ -25,7 +25,7 @@ exclamation point, and redundant pack itself will be marked with asterisk.\n     ALL | x x x x x x x x x x x x x x x x x x x\n \n Another repository `shared.git` has unique objects (X-Z), while other objects\n-(marked with letter s) are shared through alt-odb (of `master.git`). The\n+(marked with letter s) are shared through alt-odb (of `main.git`). The\n relationship between packs and objects is as follows:\n \n \t| T A B C D E F G H I J K L M N O P Q R   X Y Z\n@@ -36,7 +36,7 @@ relationship between packs and objects is as follows:\n \n . ./test-lib.sh\n \n-master_repo=master.git\n+main_repo=main.git\n shared_repo=shared.git\n \n # Create commits in <repo> and assign each commit's oid to shell variables\n@@ -69,7 +69,7 @@ create_commits_in () {\n \t\tshift ||\n \t\treturn 1\n \tdone &&\n-\tgit -C \"$repo\" update-ref refs/heads/master $oid\n+\tgit -C \"$repo\" update-ref refs/heads/main $oid\n }\n \n # Create pack in <repo> and assign pack id to variable given in the 2nd argument\n@@ -107,9 +107,9 @@ format_packfiles () {\n \tsort\n }\n \n-test_expect_success 'setup master repo' '\n-\tgit init --bare \"$master_repo\" &&\n-\tcreate_commits_in \"$master_repo\" A B C D E F G H I J K L M N O P Q R\n+test_expect_success 'setup main repo' '\n+\tgit init --bare \"$main_repo\" &&\n+\tcreate_commits_in \"$main_repo\" A B C D E F G H I J K L M N O P Q R\n '\n \n #############################################################################\n@@ -124,8 +124,8 @@ test_expect_success 'setup master repo' '\n #     ALL | x x x x x x x x x x x x x x         x\n #\n #############################################################################\n-test_expect_success 'master: no redundant for pack 1, 2, 3' '\n-\tcreate_pack_in \"$master_repo\" P1 <<-EOF &&\n+test_expect_success 'main: no redundant for pack 1, 2, 3' '\n+\tcreate_pack_in \"$main_repo\" P1 <<-EOF &&\n \t\t$T\n \t\t$A\n \t\t$B\n@@ -135,7 +135,7 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '\n \t\t$F\n \t\t$R\n \t\tEOF\n-\tcreate_pack_in \"$master_repo\" P2 <<-EOF &&\n+\tcreate_pack_in \"$main_repo\" P2 <<-EOF &&\n \t\t$B\n \t\t$C\n \t\t$D\n@@ -144,7 +144,7 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '\n \t\t$H\n \t\t$I\n \t\tEOF\n-\tcreate_pack_in \"$master_repo\" P3 <<-EOF &&\n+\tcreate_pack_in \"$main_repo\" P3 <<-EOF &&\n \t\t$F\n \t\t$I\n \t\t$J\n@@ -153,7 +153,7 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '\n \t\t$M\n \t\tEOF\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tgit pack-redundant --all >out &&\n \t\ttest_must_be_empty out\n \t)\n@@ -173,22 +173,22 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '\n #     ALL | x x x x x x x x x x x x x x x x x   x\n #\n #############################################################################\n-test_expect_success 'master: one of pack-2/pack-3 is redundant' '\n-\tcreate_pack_in \"$master_repo\" P4 <<-EOF &&\n+test_expect_success 'main: one of pack-2/pack-3 is redundant' '\n+\tcreate_pack_in \"$main_repo\" P4 <<-EOF &&\n \t\t$J\n \t\t$K\n \t\t$L\n \t\t$M\n \t\t$P\n \t\tEOF\n-\tcreate_pack_in \"$master_repo\" P5 <<-EOF &&\n+\tcreate_pack_in \"$main_repo\" P5 <<-EOF &&\n \t\t$G\n \t\t$H\n \t\t$N\n \t\t$O\n \t\tEOF\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tcat >expect <<-EOF &&\n \t\t\tP3:$P3\n \t\t\tEOF\n@@ -214,18 +214,18 @@ test_expect_success 'master: one of pack-2/pack-3 is redundant' '\n #     ALL | x x x x x x x x x x x x x x x x x x x\n #\n #############################################################################\n-test_expect_success 'master: pack 2, 4, and 6 are redundant' '\n-\tcreate_pack_in \"$master_repo\" P6 <<-EOF &&\n+test_expect_success 'main: pack 2, 4, and 6 are redundant' '\n+\tcreate_pack_in \"$main_repo\" P6 <<-EOF &&\n \t\t$N\n \t\t$O\n \t\t$Q\n \t\tEOF\n-\tcreate_pack_in \"$master_repo\" P7 <<-EOF &&\n+\tcreate_pack_in \"$main_repo\" P7 <<-EOF &&\n \t\t$P\n \t\t$Q\n \t\tEOF\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tcat >expect <<-EOF &&\n \t\t\tP2:$P2\n \t\t\tP4:$P4\n@@ -254,12 +254,12 @@ test_expect_success 'master: pack 2, 4, and 6 are redundant' '\n #     ALL | x x x x x x x x x x x x x x x x x x x\n #\n #############################################################################\n-test_expect_success 'master: pack-8 (subset of pack-1) is also redundant' '\n-\tcreate_pack_in \"$master_repo\" P8 <<-EOF &&\n+test_expect_success 'main: pack-8 (subset of pack-1) is also redundant' '\n+\tcreate_pack_in \"$main_repo\" P8 <<-EOF &&\n \t\t$A\n \t\tEOF\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tcat >expect <<-EOF &&\n \t\t\tP2:$P2\n \t\t\tP4:$P4\n@@ -272,18 +272,18 @@ test_expect_success 'master: pack-8 (subset of pack-1) is also redundant' '\n \t)\n '\n \n-test_expect_success 'master: clean loose objects' '\n+test_expect_success 'main: clean loose objects' '\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tgit prune-packed &&\n \t\tfind objects -type f | sed -e \"/objects\\/pack\\//d\" >out &&\n \t\ttest_must_be_empty out\n \t)\n '\n \n-test_expect_success 'master: remove redundant packs and pass fsck' '\n+test_expect_success 'main: remove redundant packs and pass fsck' '\n \t(\n-\t\tcd \"$master_repo\" &&\n+\t\tcd \"$main_repo\" &&\n \t\tgit pack-redundant --all | xargs rm &&\n \t\tgit fsck &&\n \t\tgit pack-redundant --all >out &&\n@@ -292,12 +292,12 @@ test_expect_success 'master: remove redundant packs and pass fsck' '\n '\n \n # The following test cases will execute inside `shared.git`, instead of\n-# inside `master.git`.\n+# inside `main.git`.\n test_expect_success 'setup shared.git' '\n-\tgit clone --mirror \"$master_repo\" \"$shared_repo\" &&\n+\tgit clone --mirror \"$main_repo\" \"$shared_repo\" &&\n \t(\n \t\tcd \"$shared_repo\" &&\n-\t\tprintf \"../../$master_repo/objects\\n\" >objects/info/alternates\n+\t\tprintf \"../../$main_repo/objects\\n\" >objects/info/alternates\n \t)\n '\n \n@@ -312,7 +312,7 @@ test_expect_success 'shared: all packs are redundant, but no output without --al\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================= master.git ================\n+#     ================= main.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------+\n #     ----+--------------------------------------             |\n #     P1  | x x x x x x x                       x             |\n@@ -394,7 +394,7 @@ test_expect_success 'shared: no redundant without --alt-odb' '\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================= master.git ================\n+#     ================= main.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------------+\n #     ----+--------------------------------------                   |\n #     P1  | x x x x x x x                       x                   |\n@@ -426,7 +426,7 @@ test_expect_success 'shared: one pack is redundant with --alt-odb' '\n #############################################################################\n # Chart of packs and objects for this test case\n #\n-#     ================= master.git ================\n+#     ================= main.git ================\n #         | T A B C D E F G H I J K L M N O P Q R  <----------------+\n #     ----+--------------------------------------                   |\n #     P1  | x x x x x x x                       x                   |\ndiff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh\nindex 6be028f3e2..3f81f16e13 100755\n--- a/t/t5400-send-pack.sh\n+++ b/t/t5400-send-pack.sh\n@@ -6,7 +6,7 @@\n test_description='See why rewinding head breaks send-pack\n \n '\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -69,20 +69,20 @@ test_expect_success 'pack the destination repository' '\n '\n \n test_expect_success 'refuse pushing rewound head without --force' '\n-\tpushed_head=$(git rev-parse --verify master) &&\n-\tvictim_orig=$(cd victim && git rev-parse --verify master) &&\n-\ttest_must_fail git send-pack ./victim master &&\n-\tvictim_head=$(cd victim && git rev-parse --verify master) &&\n+\tpushed_head=$(git rev-parse --verify main) &&\n+\tvictim_orig=$(cd victim && git rev-parse --verify main) &&\n+\ttest_must_fail git send-pack ./victim main &&\n+\tvictim_head=$(cd victim && git rev-parse --verify main) &&\n \ttest \"$victim_head\" = \"$victim_orig\" &&\n \t# this should update\n-\tgit send-pack --force ./victim master &&\n-\tvictim_head=$(cd victim && git rev-parse --verify master) &&\n+\tgit send-pack --force ./victim main &&\n+\tvictim_head=$(cd victim && git rev-parse --verify main) &&\n \ttest \"$victim_head\" = \"$pushed_head\"\n '\n \n test_expect_success 'push can be used to delete a ref' '\n-\t( cd victim && git branch extra master ) &&\n-\tgit send-pack ./victim :extra master &&\n+\t( cd victim && git branch extra main ) &&\n+\tgit send-pack ./victim :extra main &&\n \t( cd victim &&\n \t  test_must_fail git rev-parse --verify extra )\n '\n@@ -92,9 +92,9 @@ test_expect_success 'refuse deleting push with denyDeletes' '\n \t\tcd victim &&\n \t\ttest_might_fail git branch -D extra &&\n \t\tgit config receive.denyDeletes true &&\n-\t\tgit branch extra master\n+\t\tgit branch extra main\n \t) &&\n-\ttest_must_fail git send-pack ./victim :extra master\n+\ttest_must_fail git send-pack ./victim :extra main\n '\n \n test_expect_success 'cannot override denyDeletes with git -c send-pack' '\n@@ -102,10 +102,10 @@ test_expect_success 'cannot override denyDeletes with git -c send-pack' '\n \t\tcd victim &&\n \t\ttest_might_fail git branch -D extra &&\n \t\tgit config receive.denyDeletes true &&\n-\t\tgit branch extra master\n+\t\tgit branch extra main\n \t) &&\n \ttest_must_fail git -c receive.denyDeletes=false \\\n-\t\t\t\t\tsend-pack ./victim :extra master\n+\t\t\t\t\tsend-pack ./victim :extra main\n '\n \n test_expect_success 'override denyDeletes with git -c receive-pack' '\n@@ -113,11 +113,11 @@ test_expect_success 'override denyDeletes with git -c receive-pack' '\n \t\tcd victim &&\n \t\ttest_might_fail git branch -D extra &&\n \t\tgit config receive.denyDeletes true &&\n-\t\tgit branch extra master\n+\t\tgit branch extra main\n \t) &&\n \tgit send-pack \\\n \t\t--receive-pack=\"git -c receive.denyDeletes=false receive-pack\" \\\n-\t\t./victim :extra master\n+\t\t./victim :extra main\n '\n \n test_expect_success 'denyNonFastforwards trumps --force' '\n@@ -126,9 +126,9 @@ test_expect_success 'denyNonFastforwards trumps --force' '\n \t\ttest_might_fail git branch -D extra &&\n \t\tgit config receive.denyNonFastforwards true\n \t) &&\n-\tvictim_orig=$(cd victim && git rev-parse --verify master) &&\n-\ttest_must_fail git send-pack --force ./victim master^:master &&\n-\tvictim_head=$(cd victim && git rev-parse --verify master) &&\n+\tvictim_orig=$(cd victim && git rev-parse --verify main) &&\n+\ttest_must_fail git send-pack --force ./victim main^:main &&\n+\tvictim_head=$(cd victim && git rev-parse --verify main) &&\n \ttest \"$victim_orig\" = \"$victim_head\"\n '\n \n@@ -213,41 +213,41 @@ rewound_push_setup() {\n \n test_expect_success 'pushing explicit refspecs respects forcing' '\n \trewound_push_setup &&\n-\tparent_orig=$(cd parent && git rev-parse --verify master) &&\n+\tparent_orig=$(cd parent && git rev-parse --verify main) &&\n \t(\n \t\tcd child &&\n \t\ttest_must_fail git send-pack ../parent \\\n-\t\t\trefs/heads/master:refs/heads/master\n+\t\t\trefs/heads/main:refs/heads/main\n \t) &&\n-\tparent_head=$(cd parent && git rev-parse --verify master) &&\n+\tparent_head=$(cd parent && git rev-parse --verify main) &&\n \ttest \"$parent_orig\" = \"$parent_head\" &&\n \t(\n \t\tcd child &&\n \t\tgit send-pack ../parent \\\n-\t\t\t+refs/heads/master:refs/heads/master\n+\t\t\t+refs/heads/main:refs/heads/main\n \t) &&\n-\tparent_head=$(cd parent && git rev-parse --verify master) &&\n-\tchild_head=$(cd child && git rev-parse --verify master) &&\n+\tparent_head=$(cd parent && git rev-parse --verify main) &&\n+\tchild_head=$(cd child && git rev-parse --verify main) &&\n \ttest \"$parent_head\" = \"$child_head\"\n '\n \n test_expect_success 'pushing wildcard refspecs respects forcing' '\n \trewound_push_setup &&\n-\tparent_orig=$(cd parent && git rev-parse --verify master) &&\n+\tparent_orig=$(cd parent && git rev-parse --verify main) &&\n \t(\n \t\tcd child &&\n \t\ttest_must_fail git send-pack ../parent \\\n \t\t\t\"refs/heads/*:refs/heads/*\"\n \t) &&\n-\tparent_head=$(cd parent && git rev-parse --verify master) &&\n+\tparent_head=$(cd parent && git rev-parse --verify main) &&\n \ttest \"$parent_orig\" = \"$parent_head\" &&\n \t(\n \t\tcd child &&\n \t\tgit send-pack ../parent \\\n \t\t\t\"+refs/heads/*:refs/heads/*\"\n \t) &&\n-\tparent_head=$(cd parent && git rev-parse --verify master) &&\n-\tchild_head=$(cd child && git rev-parse --verify master) &&\n+\tparent_head=$(cd parent && git rev-parse --verify main) &&\n+\tchild_head=$(cd child && git rev-parse --verify main) &&\n \ttest \"$parent_head\" = \"$child_head\"\n '\n \n@@ -255,7 +255,7 @@ test_expect_success 'deny pushing to delete current branch' '\n \trewound_push_setup &&\n \t(\n \t\tcd child &&\n-\t\ttest_must_fail git send-pack ../parent :refs/heads/master 2>errs\n+\t\ttest_must_fail git send-pack ../parent :refs/heads/main 2>errs\n \t)\n '\n \n@@ -286,9 +286,9 @@ test_expect_success 'receive-pack de-dupes .have lines' '\n \tlocal=$(git -C fork rev-parse HEAD) &&\n \tshared=$(git -C shared rev-parse only-shared) &&\n \tcat >expect <<-EOF &&\n-\t$local refs/heads/master\n+\t$local refs/heads/main\n \t$local refs/remotes/origin/HEAD\n-\t$local refs/remotes/origin/master\n+\t$local refs/remotes/origin/main\n \t$shared .have\n \tEOF\n \ndiff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh\nindex 956d69f5b1..6012cc8172 100755\n--- a/t/t5401-update-hooks.sh\n+++ b/t/t5401-update-hooks.sh\n@@ -15,11 +15,11 @@ test_expect_success setup '\n \tgit update-index a &&\n \ttree1=$(git write-tree) &&\n \tcommit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&\n-\tgit update-ref refs/heads/master $commit0 &&\n+\tgit update-ref refs/heads/main $commit0 &&\n \tgit update-ref refs/heads/tofail $commit1 &&\n \tgit clone --bare ./. victim.git &&\n \tGIT_DIR=victim.git git update-ref refs/heads/tofail $commit1 &&\n-\tgit update-ref refs/heads/master $commit1 &&\n+\tgit update-ref refs/heads/main $commit1 &&\n \tgit update-ref refs/heads/tofail $commit0\n '\n \n@@ -38,7 +38,7 @@ echo \"$@\" >>$GIT_DIR/update.args\n read x; printf %s \"$x\" >$GIT_DIR/update.stdin\n echo STDOUT update $1\n echo STDERR update $1 >&2\n-test \"$1\" = refs/heads/master || exit\n+test \"$1\" = refs/heads/main || exit\n EOF\n chmod u+x victim.git/hooks/update\n \n@@ -62,11 +62,11 @@ chmod u+x victim.git/hooks/post-update\n \n test_expect_success push '\n \ttest_must_fail git send-pack --force ./victim.git \\\n-\t\tmaster tofail >send.out 2>send.err\n+\t\tmain tofail >send.out 2>send.err\n '\n \n test_expect_success 'updated as expected' '\n-\ttest $(GIT_DIR=victim.git git rev-parse master) = $commit1 &&\n+\ttest $(GIT_DIR=victim.git git rev-parse main) = $commit1 &&\n \ttest $(GIT_DIR=victim.git git rev-parse tofail) = $commit1\n '\n \n@@ -82,24 +82,24 @@ test_expect_success 'hooks ran' '\n '\n \n test_expect_success 'pre-receive hook input' '\n-\t(echo $commit0 $commit1 refs/heads/master &&\n+\t(echo $commit0 $commit1 refs/heads/main &&\n \t echo $commit1 $commit0 refs/heads/tofail\n \t) | test_cmp - victim.git/pre-receive.stdin\n '\n \n test_expect_success 'update hook arguments' '\n-\t(echo refs/heads/master $commit0 $commit1 &&\n+\t(echo refs/heads/main $commit0 $commit1 &&\n \t echo refs/heads/tofail $commit1 $commit0\n \t) | test_cmp - victim.git/update.args\n '\n \n test_expect_success 'post-receive hook input' '\n-\techo $commit0 $commit1 refs/heads/master |\n+\techo $commit0 $commit1 refs/heads/main |\n \ttest_cmp - victim.git/post-receive.stdin\n '\n \n test_expect_success 'post-update hook arguments' '\n-\techo refs/heads/master |\n+\techo refs/heads/main |\n \ttest_cmp - victim.git/post-update.args\n '\n \n@@ -120,8 +120,8 @@ test_expect_success 'send-pack produced no output' '\n cat <<EOF >expect\n remote: STDOUT pre-receive\n remote: STDERR pre-receive\n-remote: STDOUT update refs/heads/master\n-remote: STDERR update refs/heads/master\n+remote: STDOUT update refs/heads/main\n+remote: STDERR update refs/heads/main\n remote: STDOUT update refs/heads/tofail\n remote: STDERR update refs/heads/tofail\n remote: error: hook declined to update refs/heads/tofail\n@@ -143,7 +143,7 @@ test_expect_success 'pre-receive hook that forgets to read its input' '\n \n \tfor v in $(test_seq 100 999)\n \tdo\n-\t\tgit branch branch_$v master || return\n+\t\tgit branch branch_$v main || return\n \tdone &&\n \tgit push ./victim.git \"+refs/heads/*:refs/heads/*\"\n '\ndiff --git a/t/t5402-post-merge-hook.sh b/t/t5402-post-merge-hook.sh\nindex 27fc6ec4f3..3e5e19c719 100755\n--- a/t/t5402-post-merge-hook.sh\n+++ b/t/t5402-post-merge-hook.sh\n@@ -4,7 +4,7 @@\n #\n \n test_description='Test the post-merge hook.'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -18,7 +18,7 @@ test_expect_success setup '\n \tgit update-index a &&\n \ttree1=$(git write-tree) &&\n \tcommit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&\n-\tgit update-ref refs/heads/master $commit0 &&\n+\tgit update-ref refs/heads/main $commit0 &&\n \tgit clone ./. clone1 &&\n \tGIT_DIR=clone1/.git git update-index --add a &&\n \tgit clone ./. clone2 &&\ndiff --git a/t/t5403-post-checkout-hook.sh b/t/t5403-post-checkout-hook.sh\nindex ed91aadd95..1ec9e23be7 100755\n--- a/t/t5403-post-checkout-hook.sh\n+++ b/t/t5403-post-checkout-hook.sh\n@@ -4,7 +4,7 @@\n #\n \n test_description='Test the post-checkout hook.'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -23,7 +23,7 @@ test_expect_success setup '\n \n test_expect_success 'post-checkout receives the right arguments with HEAD unchanged ' '\n \ttest_when_finished \"rm -f .git/post-checkout.args\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tread old new flag <.git/post-checkout.args &&\n \ttest $old = $new && test $flag = 1\n '\n@@ -44,14 +44,14 @@ test_expect_success 'post-checkout receives the right args with HEAD changed ' '\n \n test_expect_success 'post-checkout receives the right args when not switching branches ' '\n \ttest_when_finished \"rm -f .git/post-checkout.args\" &&\n-\tgit checkout master -- three.t &&\n+\tgit checkout main -- three.t &&\n \tread old new flag <.git/post-checkout.args &&\n \ttest $old = $new && test $flag = 0\n '\n \n test_expect_success 'post-checkout is triggered on rebase' '\n \ttest_when_finished \"rm -f .git/post-checkout.args\" &&\n-\tgit checkout -b rebase-test master &&\n+\tgit checkout -b rebase-test main &&\n \trm -f .git/post-checkout.args &&\n \tgit rebase rebase-on-me &&\n \tread old new flag <.git/post-checkout.args &&\ndiff --git a/t/t5404-tracking-branches.sh b/t/t5404-tracking-branches.sh\nindex da37b22fc5..cc07889667 100755\n--- a/t/t5404-tracking-branches.sh\n+++ b/t/t5404-tracking-branches.sh\n@@ -2,7 +2,7 @@\n \n test_description='tracking branch update checks for git push'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -33,9 +33,9 @@ test_expect_success 'prepare pushable branches' '\n \tgit checkout -b b2 origin/b2 &&\n \techo aa-b2 >>file &&\n \tgit commit -a -m aa-b2 &&\n-\tgit checkout master &&\n-\techo aa-master >>file &&\n-\tgit commit -a -m aa-master\n+\tgit checkout main &&\n+\techo aa-main >>file &&\n+\tgit commit -a -m aa-main\n '\n \n test_expect_success 'mixed-success push returns error' '\n@@ -43,7 +43,7 @@ test_expect_success 'mixed-success push returns error' '\n '\n \n test_expect_success 'check tracking branches updated correctly after push' '\n-\ttest \"$(git rev-parse origin/master)\" = \"$(git rev-parse master)\"\n+\ttest \"$(git rev-parse origin/main)\" = \"$(git rev-parse main)\"\n '\n \n test_expect_success 'check tracking branches not updated for failed refs' '\ndiff --git a/t/t5405-send-pack-rewind.sh b/t/t5405-send-pack-rewind.sh\nindex 1f5b33b562..11f03239a0 100755\n--- a/t/t5405-send-pack-rewind.sh\n+++ b/t/t5405-send-pack-rewind.sh\n@@ -2,7 +2,7 @@\n \n test_description='forced push to replace commit we do not have'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -16,7 +16,7 @@ test_expect_success setup '\n \tmkdir another && (\n \t\tcd another &&\n \t\tgit init &&\n-\t\tgit fetch --update-head-ok .. master:master\n+\t\tgit fetch --update-head-ok .. main:main\n \t) &&\n \n \t>file2 && git add file2 && test_tick &&\n@@ -28,7 +28,7 @@ test_expect_success 'non forced push should die not segfault' '\n \n \t(\n \t\tcd another &&\n-\t\ttest_must_fail git push .. master:master\n+\t\ttest_must_fail git push .. main:main\n \t)\n \n '\n@@ -37,7 +37,7 @@ test_expect_success 'forced push should succeed' '\n \n \t(\n \t\tcd another &&\n-\t\tgit push .. +master:master\n+\t\tgit push .. +main:main\n \t)\n \n '\ndiff --git a/t/t5407-post-rewrite-hook.sh b/t/t5407-post-rewrite-hook.sh\nindex 78bffa64d7..5bb23cc3a4 100755\n--- a/t/t5407-post-rewrite-hook.sh\n+++ b/t/t5407-post-rewrite-hook.sh\n@@ -4,7 +4,7 @@\n #\n \n test_description='Test the post-rewrite hook.'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -17,7 +17,7 @@ test_expect_success 'setup' '\n \tgit checkout A^0 &&\n \ttest_commit E bar E &&\n \ttest_commit F foo F &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n mkdir .git/hooks\ndiff --git a/t/t5410-receive-pack-alternates.sh b/t/t5410-receive-pack-alternates.sh\nindex 30a4e6bb1a..0b28e4e452 100755\n--- a/t/t5410-receive-pack-alternates.sh\n+++ b/t/t5410-receive-pack-alternates.sh\n@@ -2,7 +2,7 @@\n \n test_description='git receive-pack with alternate ref filtering'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -10,9 +10,9 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n test_expect_success 'setup' '\n \ttest_commit base &&\n \tgit clone -s --bare . fork &&\n-\tgit checkout -b public/branch master &&\n+\tgit checkout -b public/branch main &&\n \ttest_commit public &&\n-\tgit checkout -b private/branch master &&\n+\tgit checkout -b private/branch main &&\n \ttest_commit private\n '\n \n-- \ngitgitgadget\n\n"},{"id":"410289","messageId":"4d7eb7dc28094557fe72348382bf692d2e542478.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 13/28] t550*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:31Z","receivedAt":"2020-11-18T23:45:20Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t550*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5500-fetch-pack.sh            |  30 +++----\n t/t5501-fetch-push-alternates.sh |   6 +-\n t/t5502-quickfetch.sh            |   8 +-\n t/t5503-tagfollow.sh             |  14 +--\n t/t5504-fetch-receive-strict.sh  |  22 ++---\n t/t5505-remote.sh                | 142 +++++++++++++++----------------\n t/t5506-remote-groups.sh         |   6 +-\n t/t5509-fetch-push-namespaces.sh |  32 +++----\n 8 files changed, 130 insertions(+), 130 deletions(-)\n\ndiff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh\nindex 4edb8c196e..1f4cc873a8 100755\n--- a/t/t5500-fetch-pack.sh\n+++ b/t/t5500-fetch-pack.sh\n@@ -5,7 +5,7 @@\n \n test_description='Testing multi_ack pack fetching'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -410,14 +410,14 @@ test_expect_success 'in_vain resetted upon ACK' '\n \trm -rf myserver myclient &&\n \tgit init myserver &&\n \n-\t# Linked list of commits on master. The first is common; the rest are\n+\t# Linked list of commits on main. The first is common; the rest are\n \t# not.\n-\ttest_commit -C myserver first_master_commit &&\n+\ttest_commit -C myserver first_main_commit &&\n \tgit clone \"file://$(pwd)/myserver\" myclient &&\n \ttest_commit_bulk -C myclient 255 &&\n \n \t# Another linked list of commits on anotherbranch with no connection to\n-\t# master. The first is common; the rest are not.\n+\t# main. The first is common; the rest are not.\n \tgit -C myserver checkout --orphan anotherbranch &&\n \ttest_commit -C myserver first_anotherbranch_commit &&\n \tgit -C myclient fetch origin anotherbranch:refs/heads/anotherbranch &&\n@@ -425,14 +425,14 @@ test_expect_success 'in_vain resetted upon ACK' '\n \ttest_commit_bulk -C myclient 255 &&\n \n \t# The new commit that the client wants to fetch.\n-\tgit -C myserver checkout master &&\n+\tgit -C myserver checkout main &&\n \ttest_commit -C myserver to_fetch &&\n \n \t# The client will send (as \"have\"s) all 256 commits in anotherbranch\n \t# first. The 256th commit is common between the client and the server,\n \t# and should reset in_vain. This allows negotiation to continue until\n \t# the client reports that first_anotherbranch_commit is common.\n-\tgit -C myclient fetch --progress origin master 2>log &&\n+\tgit -C myclient fetch --progress origin main 2>log &&\n \ttest_i18ngrep \"Total 3 \" log\n '\n \n@@ -640,7 +640,7 @@ test_expect_success 'shallow fetch with tags does not break the repository' '\n \t\tmkdir repo2 &&\n \t\tcd repo2 &&\n \t\tgit init &&\n-\t\tgit fetch --depth=2 ../.git master:branch &&\n+\t\tgit fetch --depth=2 ../.git main:branch &&\n \t\tgit fsck\n \t)\n '\n@@ -665,7 +665,7 @@ test_expect_success 'fetch-pack can fetch a raw sha1 that is advertised as a ref\n \n \tgit init client &&\n \tgit -C client fetch-pack ../server \\\n-\t\t$(git -C server rev-parse refs/heads/master)\n+\t\t$(git -C server rev-parse refs/heads/main)\n '\n \n test_expect_success 'fetch-pack can fetch a raw sha1 overlapping a named ref' '\n@@ -691,7 +691,7 @@ test_expect_success 'fetch-pack cannot fetch a raw sha1 that is not advertised a\n \t# Some protocol versions (e.g. 2) support fetching\n \t# unadvertised objects, so restrict this test to v0.\n \ttest_must_fail env GIT_TEST_PROTOCOL_VERSION=0 git -C client fetch-pack ../server \\\n-\t\t$(git -C server rev-parse refs/heads/master^) 2>err &&\n+\t\t$(git -C server rev-parse refs/heads/main^) 2>err &&\n \ttest_i18ngrep \"Server does not allow request for unadvertised object\" err\n '\n \n@@ -825,7 +825,7 @@ test_expect_success 'clone shallow since ...' '\n \n test_expect_success 'fetch shallow since ...' '\n \tgit -C shallow11 fetch --shallow-since \"200000000 +0700\" origin &&\n-\tgit -C shallow11 log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C shallow11 log --pretty=tformat:%s origin/main >actual &&\n \tcat >expected <<-\\EOF &&\n \tthree\n \ttwo\n@@ -866,7 +866,7 @@ test_expect_success 'shallow since with commit graph and already-seen commit' '\n \t(\n \tcd shallow-since-graph &&\n \ttest_commit base &&\n-\ttest_commit master &&\n+\ttest_commit main &&\n \tgit checkout -b other HEAD^ &&\n \ttest_commit other &&\n \tgit commit-graph write --reachable &&\n@@ -877,7 +877,7 @@ test_expect_success 'shallow since with commit graph and already-seen commit' '\n \t$(echo \"object-format=$(test_oid algo)\" | packetize)\n \t00010013deepen-since 1\n \t$(echo \"want $(git rev-parse other)\" | packetize)\n-\t$(echo \"have $(git rev-parse master)\" | packetize)\n+\t$(echo \"have $(git rev-parse main)\" | packetize)\n \t0000\n \tEOF\n \t)\n@@ -899,7 +899,7 @@ test_expect_success 'shallow clone exclude tag two' '\n \n test_expect_success 'fetch exclude tag one' '\n \tgit -C shallow12 fetch --shallow-exclude one origin &&\n-\tgit -C shallow12 log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C shallow12 log --pretty=tformat:%s origin/main >actual &&\n \ttest_write_lines three two >expected &&\n \ttest_cmp expected actual\n '\n@@ -913,11 +913,11 @@ test_expect_success 'fetching deepen' '\n \ttest_commit three &&\n \tgit clone --depth 1 \"file://$(pwd)/.\" deepen &&\n \ttest_commit four &&\n-\tgit -C deepen log --pretty=tformat:%s master >actual &&\n+\tgit -C deepen log --pretty=tformat:%s main >actual &&\n \techo three >expected &&\n \ttest_cmp expected actual &&\n \tgit -C deepen fetch --deepen=1 &&\n-\tgit -C deepen log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C deepen log --pretty=tformat:%s origin/main >actual &&\n \tcat >expected <<-\\EOF &&\n \tfour\n \tthree\ndiff --git a/t/t5501-fetch-push-alternates.sh b/t/t5501-fetch-push-alternates.sh\nindex 96ce28b6ba..66f19a4ef2 100755\n--- a/t/t5501-fetch-push-alternates.sh\n+++ b/t/t5501-fetch-push-alternates.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='fetch/push involving alternates'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -48,7 +48,7 @@ test_expect_success setup '\n test_expect_success 'pushing into a repository with the same alternate' '\n \t(\n \t\tcd one &&\n-\t\tgit push ../receiver master:refs/heads/it\n+\t\tgit push ../receiver main:refs/heads/it\n \t) &&\n \t(\n \t\tcd receiver &&\n@@ -60,7 +60,7 @@ test_expect_success 'pushing into a repository with the same alternate' '\n test_expect_success 'fetching from a repository with the same alternate' '\n \t(\n \t\tcd fetcher &&\n-\t\tgit fetch ../one master:refs/heads/it &&\n+\t\tgit fetch ../one main:refs/heads/it &&\n \t\tcount_objects >../fetcher.count\n \t) &&\n \ttest_cmp one.count fetcher.count\ndiff --git a/t/t5502-quickfetch.sh b/t/t5502-quickfetch.sh\nindex e15a472e4c..8c05c7715b 100755\n--- a/t/t5502-quickfetch.sh\n+++ b/t/t5502-quickfetch.sh\n@@ -2,7 +2,7 @@\n \n test_description='test quickfetch from local'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -111,14 +111,14 @@ test_expect_success 'quickfetch should not copy from alternate' '\n \t\t\t\tq\n \t\t\t}\"\n \t) ) &&\n-\torigin_master=$( (\n+\torigin_main=$( (\n \t\tcd quickclone &&\n-\t\tgit rev-parse origin/master\n+\t\tgit rev-parse origin/main\n \t) ) &&\n \techo \"loose objects: $obj_cnt, packfiles: $pck_cnt\" &&\n \ttest $obj_cnt -eq 0 &&\n \ttest $pck_cnt -eq 0 &&\n-\ttest z$origin_master = z$(git rev-parse master)\n+\ttest z$origin_main = z$(git rev-parse main)\n \n '\n \ndiff --git a/t/t5503-tagfollow.sh b/t/t5503-tagfollow.sh\nindex 525dd21ecb..195fc64dd4 100755\n--- a/t/t5503-tagfollow.sh\n+++ b/t/t5503-tagfollow.sh\n@@ -2,7 +2,7 @@\n \n test_description='test automatic tag following'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -14,7 +14,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n #   L - A ------ O ------ B\n #    \\   \\                 \\\n #     \\   C - origin/cat    \\\n-#      origin/master           master\n+#      origin/main           main\n \n test_expect_success setup '\n \ttest_tick &&\n@@ -60,7 +60,7 @@ test_expect_success 'fetch A (new commit : 1 connection)' '\n \t(\n \t\tcd cloned &&\n \t\tGIT_TRACE_PACKET=$UPATH git fetch &&\n-\t\ttest $A = $(git rev-parse --verify origin/master)\n+\t\ttest $A = $(git rev-parse --verify origin/main)\n \t) &&\n \tget_needs $U >actual &&\n \ttest_cmp expect actual\n@@ -75,7 +75,7 @@ test_expect_success \"create tag T on A, create C on branch cat\" '\n \tgit add file &&\n \tgit commit -m C &&\n \tC=$(git rev-parse --verify HEAD) &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'setup expect' '\n@@ -126,7 +126,7 @@ test_expect_success 'fetch B, S (commit and tag : 1 connection)' '\n \t(\n \t\tcd cloned &&\n \t\tGIT_TRACE_PACKET=$UPATH git fetch &&\n-\t\ttest $B = $(git rev-parse --verify origin/master) &&\n+\t\ttest $B = $(git rev-parse --verify origin/main) &&\n \t\ttest $B = $(git rev-parse --verify tag2^0) &&\n \t\ttest $S = $(git rev-parse --verify tag2)\n \t) &&\n@@ -141,7 +141,7 @@ want $S\n EOF\n '\n \n-test_expect_success 'new clone fetch master and tags' '\n+test_expect_success 'new clone fetch main and tags' '\n \ttest_might_fail git branch -D cat &&\n \trm -f $U &&\n \t(\n@@ -150,7 +150,7 @@ test_expect_success 'new clone fetch master and tags' '\n \t\tgit init &&\n \t\tgit remote add origin .. &&\n \t\tGIT_TRACE_PACKET=$UPATH git fetch &&\n-\t\ttest $B = $(git rev-parse --verify origin/master) &&\n+\t\ttest $B = $(git rev-parse --verify origin/main) &&\n \t\ttest $S = $(git rev-parse --verify tag2) &&\n \t\ttest $B = $(git rev-parse --verify tag2^0) &&\n \t\ttest $T = $(git rev-parse --verify tag1) &&\ndiff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh\nindex 7fe21b176d..6e5a9c20e7 100755\n--- a/t/t5504-fetch-receive-strict.sh\n+++ b/t/t5504-fetch-receive-strict.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='fetch/receive strict mode'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -28,7 +28,7 @@ test_expect_success 'fetch without strict' '\n \t\tcd dst &&\n \t\tgit config fetch.fsckobjects false &&\n \t\tgit config transfer.fsckobjects false &&\n-\t\ttest_must_fail git fetch ../.git master\n+\t\ttest_must_fail git fetch ../.git main\n \t)\n '\n \n@@ -39,7 +39,7 @@ test_expect_success 'fetch with !fetch.fsckobjects' '\n \t\tcd dst &&\n \t\tgit config fetch.fsckobjects false &&\n \t\tgit config transfer.fsckobjects true &&\n-\t\ttest_must_fail git fetch ../.git master\n+\t\ttest_must_fail git fetch ../.git main\n \t)\n '\n \n@@ -50,7 +50,7 @@ test_expect_success 'fetch with fetch.fsckobjects' '\n \t\tcd dst &&\n \t\tgit config fetch.fsckobjects true &&\n \t\tgit config transfer.fsckobjects false &&\n-\t\ttest_must_fail git fetch ../.git master\n+\t\ttest_must_fail git fetch ../.git main\n \t)\n '\n \n@@ -60,13 +60,13 @@ test_expect_success 'fetch with transfer.fsckobjects' '\n \t(\n \t\tcd dst &&\n \t\tgit config transfer.fsckobjects true &&\n-\t\ttest_must_fail git fetch ../.git master\n+\t\ttest_must_fail git fetch ../.git main\n \t)\n '\n \n cat >exp <<EOF\n To dst\n-!\trefs/heads/master:refs/heads/test\t[remote rejected] (missing necessary objects)\n+!\trefs/heads/main:refs/heads/test\t[remote rejected] (missing necessary objects)\n Done\n EOF\n \n@@ -78,7 +78,7 @@ test_expect_success 'push without strict' '\n \t\tgit config fetch.fsckobjects false &&\n \t\tgit config transfer.fsckobjects false\n \t) &&\n-\ttest_must_fail git push --porcelain dst master:refs/heads/test >act &&\n+\ttest_must_fail git push --porcelain dst main:refs/heads/test >act &&\n \ttest_cmp exp act\n '\n \n@@ -90,13 +90,13 @@ test_expect_success 'push with !receive.fsckobjects' '\n \t\tgit config receive.fsckobjects false &&\n \t\tgit config transfer.fsckobjects true\n \t) &&\n-\ttest_must_fail git push --porcelain dst master:refs/heads/test >act &&\n+\ttest_must_fail git push --porcelain dst main:refs/heads/test >act &&\n \ttest_cmp exp act\n '\n \n cat >exp <<EOF\n To dst\n-!\trefs/heads/master:refs/heads/test\t[remote rejected] (unpacker error)\n+!\trefs/heads/main:refs/heads/test\t[remote rejected] (unpacker error)\n EOF\n \n test_expect_success 'push with receive.fsckobjects' '\n@@ -107,7 +107,7 @@ test_expect_success 'push with receive.fsckobjects' '\n \t\tgit config receive.fsckobjects true &&\n \t\tgit config transfer.fsckobjects false\n \t) &&\n-\ttest_must_fail git push --porcelain dst master:refs/heads/test >act &&\n+\ttest_must_fail git push --porcelain dst main:refs/heads/test >act &&\n \ttest_cmp exp act\n '\n \n@@ -118,7 +118,7 @@ test_expect_success 'push with transfer.fsckobjects' '\n \t\tcd dst &&\n \t\tgit config transfer.fsckobjects true\n \t) &&\n-\ttest_must_fail git push --porcelain dst master:refs/heads/test >act &&\n+\ttest_must_fail git push --porcelain dst main:refs/heads/test >act &&\n \ttest_cmp exp act\n '\n \ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex 2b6e1f50f8..f7e3c9b1e7 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -2,7 +2,7 @@\n \n test_description='git remote porcelain-ish'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -20,7 +20,7 @@ setup_repository () {\n \tgit add elif &&\n \ttest_tick &&\n \tgit commit -m \"Second\" &&\n-\tgit checkout master\n+\tgit checkout main\n \t)\n }\n \n@@ -63,8 +63,8 @@ test_expect_success C_LOCALE_OUTPUT 'remote information for the origin' '\n \t(\n \t\tcd test &&\n \t\ttokens_match origin \"$(git remote)\" &&\n-\t\tcheck_remote_track origin master side &&\n-\t\tcheck_tracking_branch origin HEAD master side\n+\t\tcheck_remote_track origin main side &&\n+\t\tcheck_tracking_branch origin HEAD main side\n \t)\n '\n \n@@ -73,7 +73,7 @@ test_expect_success 'add another remote' '\n \t\tcd test &&\n \t\tgit remote add -f second ../two &&\n \t\ttokens_match \"origin second\" \"$(git remote)\" &&\n-\t\tcheck_tracking_branch second master side another &&\n+\t\tcheck_tracking_branch second main side another &&\n \t\tgit for-each-ref \"--format=%(refname)\" refs/remotes |\n \t\tsed -e \"/^refs\\/remotes\\/origin\\//d\" \\\n \t\t    -e \"/^refs\\/remotes\\/second\\//d\" >actual &&\n@@ -84,8 +84,8 @@ test_expect_success 'add another remote' '\n test_expect_success C_LOCALE_OUTPUT 'check remote-tracking' '\n \t(\n \t\tcd test &&\n-\t\tcheck_remote_track origin master side &&\n-\t\tcheck_remote_track second master side another\n+\t\tcheck_remote_track origin main side &&\n+\t\tcheck_remote_track second main side another\n \t)\n '\n \n@@ -102,7 +102,7 @@ test_expect_success 'remote forces tracking branches' '\n test_expect_success 'remove remote' '\n \t(\n \t\tcd test &&\n-\t\tgit symbolic-ref refs/remotes/second/HEAD refs/remotes/second/master &&\n+\t\tgit symbolic-ref refs/remotes/second/HEAD refs/remotes/second/main &&\n \t\tgit remote rm second\n \t)\n '\n@@ -111,7 +111,7 @@ test_expect_success C_LOCALE_OUTPUT 'remove remote' '\n \t(\n \t\tcd test &&\n \t\ttokens_match origin \"$(git remote)\" &&\n-\t\tcheck_remote_track origin master side &&\n+\t\tcheck_remote_track origin main side &&\n \t\tgit for-each-ref \"--format=%(refname)\" refs/remotes |\n \t\tsed -e \"/^refs\\/remotes\\/origin\\//d\" >actual &&\n \t\ttest_must_be_empty actual\n@@ -124,13 +124,13 @@ test_expect_success 'remove remote protects local branches' '\n \t\tcat >expect1 <<-\\EOF &&\n \t\tNote: A branch outside the refs/remotes/ hierarchy was not removed;\n \t\tto delete it, use:\n-\t\t  git branch -d master\n+\t\t  git branch -d main\n \t\tEOF\n \t\tcat >expect2 <<-\\EOF &&\n \t\tNote: Some branches outside the refs/remotes/ hierarchy were not removed;\n \t\tto delete them, use:\n \t\t  git branch -d foobranch\n-\t\t  git branch -d master\n+\t\t  git branch -d main\n \t\tEOF\n \t\tgit tag footag &&\n \t\tgit config --add remote.oops.fetch \"+refs/*:refs/*\" &&\n@@ -156,7 +156,7 @@ test_expect_success 'remove errors out early when deleting non-existent branch'\n \n test_expect_success 'remove remote with a branch without configured merge' '\n \ttest_when_finished \"(\n-\t\tgit -C test checkout master;\n+\t\tgit -C test checkout main;\n \t\tgit -C test branch -D two;\n \t\tgit -C test config --remove-section remote.two;\n \t\tgit -C test config --remove-section branch.second;\n@@ -166,9 +166,9 @@ test_expect_success 'remove remote with a branch without configured merge' '\n \t\tcd test &&\n \t\tgit remote add two ../two &&\n \t\tgit fetch two &&\n-\t\tgit checkout -b second two/master^0 &&\n+\t\tgit checkout -b second two/main^0 &&\n \t\tgit config branch.second.remote two &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit remote rm two\n \t)\n '\n@@ -214,7 +214,7 @@ cat >test/expect <<EOF\n * remote origin\n   Fetch URL: $(pwd)/one\n   Push  URL: $(pwd)/one\n-  HEAD branch: master\n+  HEAD branch: main\n   Remote branches:\n     main new (next fetch will store in remotes/origin)\n     side tracked\n@@ -224,14 +224,14 @@ cat >test/expect <<EOF\n     octopus  merges with remote topic-a\n                 and with remote topic-b\n                 and with remote topic-c\n-    rebase  rebases onto remote master\n+    rebase  rebases onto remote main\n   Local refs configured for 'git push':\n     main pushes to main     (local out of date)\n     main pushes to upstream (create)\n * remote two\n   Fetch URL: ../two\n   Push  URL: ../three\n-  HEAD branch: master\n+  HEAD branch: main\n   Local refs configured for 'git push':\n     ahead forces to main    (fast-forwardable)\n     main  pushes to another (up to date)\n@@ -240,16 +240,16 @@ EOF\n test_expect_success PREPARE_FOR_MAIN_BRANCH 'show' '\n \t(\n \t\tcd test &&\n-\t\tgit config --add remote.origin.fetch refs/heads/master:refs/heads/upstream &&\n+\t\tgit config --add remote.origin.fetch refs/heads/main:refs/heads/upstream &&\n \t\tgit fetch &&\n-\t\tgit checkout -b ahead origin/master &&\n+\t\tgit checkout -b ahead origin/main &&\n \t\techo 1 >>file &&\n \t\ttest_tick &&\n \t\tgit commit -m update file &&\n-\t\tgit checkout master &&\n-\t\tgit branch --track octopus origin/master &&\n-\t\tgit branch --track rebase origin/master &&\n-\t\tgit branch -d -r origin/master &&\n+\t\tgit checkout main &&\n+\t\tgit branch --track octopus origin/main &&\n+\t\tgit branch --track rebase origin/main &&\n+\t\tgit branch -d -r origin/main &&\n \t\tgit config --add remote.two.url ../two &&\n \t\tgit config --add remote.two.pushurl ../three &&\n \t\tgit config branch.rebase.rebase true &&\n@@ -261,10 +261,10 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'show' '\n \t\t\tgit commit -m update file\n \t\t) &&\n \t\tgit config --add remote.origin.push : &&\n-\t\tgit config --add remote.origin.push refs/heads/master:refs/heads/upstream &&\n+\t\tgit config --add remote.origin.push refs/heads/main:refs/heads/upstream &&\n \t\tgit config --add remote.origin.push +refs/tags/lastbackup &&\n-\t\tgit config --add remote.two.push +refs/heads/ahead:refs/heads/master &&\n-\t\tgit config --add remote.two.push refs/heads/master:refs/heads/another &&\n+\t\tgit config --add remote.two.push +refs/heads/ahead:refs/heads/main &&\n+\t\tgit config --add remote.two.push refs/heads/main:refs/heads/another &&\n \t\tgit remote show origin two >output &&\n \t\tgit branch -d rebase octopus &&\n \t\ttest_i18ncmp expect output\n@@ -277,7 +277,7 @@ cat >test/expect <<EOF\n   Push  URL: $(pwd)/one\n   HEAD branch: (not queried)\n   Remote branches: (status not queried)\n-    master\n+    main\n     side\n   Local branches configured for 'git pull':\n     ahead merges with remote main\n@@ -325,7 +325,7 @@ test_expect_success 'set-head --auto' '\n \t(\n \t\tcd test &&\n \t\tgit remote set-head --auto origin &&\n-\t\techo refs/remotes/origin/master >expect &&\n+\t\techo refs/remotes/origin/main >expect &&\n \t\tgit symbolic-ref refs/remotes/origin/HEAD >output &&\n \t\ttest_cmp expect output\n \t)\n@@ -336,7 +336,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'set-head --auto has no problem w/mu\n \t\tcd test &&\n \t\tgit fetch two \"refs/heads/*:refs/remotes/two/*\" &&\n \t\tgit remote set-head --auto two >output 2>&1 &&\n-\t\techo \"two/HEAD set to master\" >expect &&\n+\t\techo \"two/HEAD set to main\" >expect &&\n \t\ttest_i18ncmp expect output\n \t)\n '\n@@ -350,7 +350,7 @@ test_expect_success 'set-head explicit' '\n \t\tcd test &&\n \t\tgit remote set-head origin side2 &&\n \t\tgit symbolic-ref refs/remotes/origin/HEAD >output &&\n-\t\tgit remote set-head origin master &&\n+\t\tgit remote set-head origin main &&\n \t\ttest_cmp expect output\n \t)\n '\n@@ -413,7 +413,7 @@ test_expect_success 'fetch mirrors act as mirrors during fetch' '\n \t(\n \t\tcd mirror-fetch/parent &&\n \t\tgit branch new &&\n-\t\tgit branch -m master renamed\n+\t\tgit branch -m main renamed\n \t) &&\n \t(\n \t\tcd mirror-fetch/child &&\n@@ -427,7 +427,7 @@ test_expect_success 'fetch mirrors can prune' '\n \t(\n \t\tcd mirror-fetch/child &&\n \t\tgit remote prune parent &&\n-\t\ttest_must_fail git rev-parse --verify refs/heads/master\n+\t\ttest_must_fail git rev-parse --verify refs/heads/main\n \t)\n '\n \n@@ -480,14 +480,14 @@ test_expect_success 'push mirrors act as mirrors during push' '\n \t(\n \t\tcd mirror-push/private &&\n \t\tgit branch new &&\n-\t\tgit branch -m master renamed &&\n+\t\tgit branch -m main renamed &&\n \t\tgit push public\n \t) &&\n \t(\n \t\tcd mirror-push/private &&\n \t\tgit rev-parse --verify refs/heads/new &&\n \t\tgit rev-parse --verify refs/heads/renamed &&\n-\t\ttest_must_fail git rev-parse --verify refs/heads/master\n+\t\ttest_must_fail git rev-parse --verify refs/heads/main\n \t)\n '\n \n@@ -613,10 +613,10 @@ test_expect_success 'reject --no-no-tags' '\n '\n \n cat >one/expect <<\\EOF\n-  apis/master\n+  apis/main\n   apis/side\n   drosophila/another\n-  drosophila/master\n+  drosophila/main\n   drosophila/side\n EOF\n \n@@ -633,11 +633,11 @@ test_expect_success 'update' '\n \n cat >one/expect <<\\EOF\n   drosophila/another\n-  drosophila/master\n+  drosophila/main\n   drosophila/side\n-  manduca/master\n+  manduca/main\n   manduca/side\n-  megaloprepus/master\n+  megaloprepus/main\n   megaloprepus/side\n EOF\n \n@@ -676,11 +676,11 @@ test_expect_success 'update --prune' '\n '\n \n cat >one/expect <<-\\EOF\n-  apis/master\n+  apis/main\n   apis/side\n-  manduca/master\n+  manduca/main\n   manduca/side\n-  megaloprepus/master\n+  megaloprepus/main\n   megaloprepus/side\n EOF\n \n@@ -700,7 +700,7 @@ test_expect_success 'update default' '\n \n cat >one/expect <<\\EOF\n   drosophila/another\n-  drosophila/master\n+  drosophila/main\n   drosophila/side\n EOF\n \n@@ -754,14 +754,14 @@ test_expect_success 'rename a remote' '\n \tgit clone one four &&\n \t(\n \t\tcd four &&\n-\t\tgit config branch.master.pushRemote origin &&\n+\t\tgit config branch.main.pushRemote origin &&\n \t\tgit remote rename origin upstream &&\n \t\ttest -z \"$(git for-each-ref refs/remotes/origin)\" &&\n-\t\ttest \"$(git symbolic-ref refs/remotes/upstream/HEAD)\" = \"refs/remotes/upstream/master\" &&\n-\t\ttest \"$(git rev-parse upstream/master)\" = \"$(git rev-parse master)\" &&\n+\t\ttest \"$(git symbolic-ref refs/remotes/upstream/HEAD)\" = \"refs/remotes/upstream/main\" &&\n+\t\ttest \"$(git rev-parse upstream/main)\" = \"$(git rev-parse main)\" &&\n \t\ttest \"$(git config remote.upstream.fetch)\" = \"+refs/heads/*:refs/remotes/upstream/*\" &&\n-\t\ttest \"$(git config branch.master.remote)\" = \"upstream\" &&\n-\t\ttest \"$(git config branch.master.pushRemote)\" = \"upstream\" &&\n+\t\ttest \"$(git config branch.main.remote)\" = \"upstream\" &&\n+\t\ttest \"$(git config branch.main.pushRemote)\" = \"upstream\" &&\n \t\ttest \"$(git config --global remote.pushDefault)\" = \"origin\"\n \t)\n '\n@@ -807,7 +807,7 @@ test_expect_success 'rename does not update a non-default fetch refspec' '\n \t\tgit config remote.origin.fetch +refs/heads/*:refs/heads/origin/* &&\n \t\tgit remote rename origin upstream &&\n \t\ttest \"$(git config remote.upstream.fetch)\" = \"+refs/heads/*:refs/heads/origin/*\" &&\n-\t\tgit rev-parse -q origin/master\n+\t\tgit rev-parse -q origin/main\n \t)\n '\n \n@@ -827,7 +827,7 @@ test_expect_success 'rename a remote with name prefix of other remote' '\n \t\tcd four.three &&\n \t\tgit remote add o git://example.com/repo.git &&\n \t\tgit remote rename o upstream &&\n-\t\ttest \"$(git rev-parse origin/master)\" = \"$(git rev-parse master)\"\n+\t\ttest \"$(git rev-parse origin/main)\" = \"$(git rev-parse main)\"\n \t)\n '\n \n@@ -843,11 +843,11 @@ test_expect_success 'remove a remote' '\n \tgit clone one four.five &&\n \t(\n \t\tcd four.five &&\n-\t\tgit config branch.master.pushRemote origin &&\n+\t\tgit config branch.main.pushRemote origin &&\n \t\tgit remote remove origin &&\n \t\ttest -z \"$(git for-each-ref refs/remotes/origin)\" &&\n-\t\ttest_must_fail git config branch.master.remote &&\n-\t\ttest_must_fail git config branch.master.pushRemote &&\n+\t\ttest_must_fail git config branch.main.remote &&\n+\t\ttest_must_fail git config branch.main.pushRemote &&\n \t\ttest \"$(git config --global remote.pushDefault)\" = \"origin\"\n \t)\n '\n@@ -888,9 +888,9 @@ test_expect_success 'remove a remote removes repo remote.pushDefault but keeps g\n \n cat >remotes_origin <<EOF\n URL: $(pwd)/one\n-Push: refs/heads/master:refs/heads/upstream\n+Push: refs/heads/main:refs/heads/upstream\n Push: refs/heads/next:refs/heads/upstream2\n-Pull: refs/heads/master:refs/heads/origin\n+Pull: refs/heads/main:refs/heads/origin\n Pull: refs/heads/next:refs/heads/origin2\n EOF\n \n@@ -906,11 +906,11 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '\n \t\ttest_path_is_missing .git/remotes/origin &&\n \t\ttest \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n \t\tcat >push_expected <<-\\EOF &&\n-\t\trefs/heads/master:refs/heads/upstream\n+\t\trefs/heads/main:refs/heads/upstream\n \t\trefs/heads/next:refs/heads/upstream2\n \t\tEOF\n \t\tcat >fetch_expected <<-\\EOF &&\n-\t\trefs/heads/master:refs/heads/origin\n+\t\trefs/heads/main:refs/heads/origin\n \t\trefs/heads/next:refs/heads/origin2\n \t\tEOF\n \t\tgit config --get-all remote.origin.push >push_actual &&\n@@ -930,8 +930,8 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '\n \t\tgit remote rename origin origin &&\n \t\ttest_path_is_missing .git/branches/origin &&\n \t\ttest \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n-\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\" &&\n-\t\ttest \"$(git config remote.origin.push)\" = \"HEAD:refs/heads/master\"\n+\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/main:refs/heads/origin\" &&\n+\t\ttest \"$(git config remote.origin.push)\" = \"HEAD:refs/heads/main\"\n \t)\n '\n \n@@ -954,7 +954,7 @@ test_expect_success 'remote prune to cause a dangling symref' '\n \t(\n \t\tcd one &&\n \t\tgit checkout side2 &&\n-\t\tgit branch -D master\n+\t\tgit branch -D main\n \t) &&\n \t(\n \t\tcd eight &&\n@@ -997,22 +997,22 @@ test_expect_success 'remote set-branches' '\n \tEOF\n \tsort <<-\\EOF >expect.replace &&\n \t+refs/heads/maint:refs/remotes/scratch/maint\n-\t+refs/heads/master:refs/remotes/scratch/master\n+\t+refs/heads/main:refs/remotes/scratch/main\n \t+refs/heads/next:refs/remotes/scratch/next\n \tEOF\n \tsort <<-\\EOF >expect.add-two &&\n \t+refs/heads/maint:refs/remotes/scratch/maint\n-\t+refs/heads/master:refs/remotes/scratch/master\n+\t+refs/heads/main:refs/remotes/scratch/main\n \t+refs/heads/next:refs/remotes/scratch/next\n \t+refs/heads/seen:refs/remotes/scratch/seen\n \t+refs/heads/t/topic:refs/remotes/scratch/t/topic\n \tEOF\n \tsort <<-\\EOF >expect.setup-ffonly &&\n-\trefs/heads/master:refs/remotes/scratch/master\n+\trefs/heads/main:refs/remotes/scratch/main\n \t+refs/heads/next:refs/remotes/scratch/next\n \tEOF\n \tsort <<-\\EOF >expect.respect-ffonly &&\n-\trefs/heads/master:refs/remotes/scratch/master\n+\trefs/heads/main:refs/remotes/scratch/main\n \t+refs/heads/next:refs/remotes/scratch/next\n \t+refs/heads/seen:refs/remotes/scratch/seen\n \tEOF\n@@ -1028,7 +1028,7 @@ test_expect_success 'remote set-branches' '\n \t\tgit config --get-all remote.scratch.fetch >config-result &&\n \t\tsort <config-result >../actual.add &&\n \n-\t\tgit remote set-branches scratch maint master next &&\n+\t\tgit remote set-branches scratch maint main next &&\n \t\tgit config --get-all remote.scratch.fetch >config-result &&\n \t\tsort <config-result >../actual.replace &&\n \n@@ -1038,7 +1038,7 @@ test_expect_success 'remote set-branches' '\n \n \t\tgit config --unset-all remote.scratch.fetch &&\n \t\tgit config remote.scratch.fetch \\\n-\t\t\trefs/heads/master:refs/remotes/scratch/master &&\n+\t\t\trefs/heads/main:refs/remotes/scratch/main &&\n \t\tgit config --add remote.scratch.fetch \\\n \t\t\t+refs/heads/next:refs/remotes/scratch/next &&\n \t\tgit config --get-all remote.scratch.fetch >config-result &&\n@@ -1058,14 +1058,14 @@ test_expect_success 'remote set-branches' '\n \n test_expect_success 'remote set-branches with --mirror' '\n \techo \"+refs/*:refs/*\" >expect.initial &&\n-\techo \"+refs/heads/master:refs/heads/master\" >expect.replace &&\n+\techo \"+refs/heads/main:refs/heads/main\" >expect.replace &&\n \tgit clone --mirror .git/ setbranches-mirror &&\n \t(\n \t\tcd setbranches-mirror &&\n \t\tgit remote rename origin scratch &&\n \t\tgit config --get-all remote.scratch.fetch >../actual.initial &&\n \n-\t\tgit remote set-branches scratch heads/master &&\n+\t\tgit remote set-branches scratch heads/main &&\n \t\tgit config --get-all remote.scratch.fetch >../actual.replace\n \t) &&\n \ttest_cmp expect.initial actual.initial &&\n@@ -1311,7 +1311,7 @@ test_extra_arg () {\n test_extra_arg add nick url\n test_extra_arg rename origin newname\n test_extra_arg remove origin\n-test_extra_arg set-head origin master\n+test_extra_arg set-head origin main\n # set-branches takes any number of args\n test_extra_arg get-url origin newurl\n test_extra_arg set-url origin newurl oldurl\n@@ -1328,7 +1328,7 @@ test_expect_success 'unqualified <dst> refspec DWIM and advice' '\n \ttest_when_finished \"(cd test && git tag -d some-tag)\" &&\n \t(\n \t\tcd test &&\n-\t\tgit tag -a -m \"Some tag\" some-tag master &&\n+\t\tgit tag -a -m \"Some tag\" some-tag main &&\n \t\texit_with=true &&\n \t\tfor type in commit tag tree blob\n \t\tdo\n@@ -1354,7 +1354,7 @@ test_expect_success 'unqualified <dst> refspec DWIM and advice' '\n test_expect_success PREPARE_FOR_MAIN_BRANCH 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '\n \t(\n \t\tcd two &&\n-\t\tgit tag -a -m \"Some tag\" my-tag master &&\n+\t\tgit tag -a -m \"Some tag\" my-tag main &&\n \t\tgit update-ref refs/trees/my-head-tree HEAD^{tree} &&\n \t\tgit update-ref refs/blobs/my-file-blob HEAD:file\n \t) &&\ndiff --git a/t/t5506-remote-groups.sh b/t/t5506-remote-groups.sh\nindex bf3aa85da5..8f150c0793 100755\n--- a/t/t5506-remote-groups.sh\n+++ b/t/t5506-remote-groups.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='git remote group handling'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -34,8 +34,8 @@ repo_fetched() {\n test_expect_success 'setup' '\n \tmkdir one && (cd one && git init) &&\n \tmkdir two && (cd two && git init) &&\n-\tgit remote add -m master one one &&\n-\tgit remote add -m master two two\n+\tgit remote add -m main one one &&\n+\tgit remote add -m main two two\n '\n \n test_expect_success 'no group updates all' '\ndiff --git a/t/t5509-fetch-push-namespaces.sh b/t/t5509-fetch-push-namespaces.sh\nindex f234dba91a..31553b48df 100755\n--- a/t/t5509-fetch-push-namespaces.sh\n+++ b/t/t5509-fetch-push-namespaces.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='fetch/push involving ref namespaces'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -30,9 +30,9 @@ test_expect_success setup '\n test_expect_success 'pushing into a repository using a ref namespace' '\n \t(\n \t\tcd original &&\n-\t\tgit push pushee-namespaced master &&\n+\t\tgit push pushee-namespaced main &&\n \t\tgit ls-remote pushee-namespaced >actual &&\n-\t\tprintf \"$commit1\\trefs/heads/master\\n\" >expected &&\n+\t\tprintf \"$commit1\\trefs/heads/main\\n\" >expected &&\n \t\ttest_cmp expected actual &&\n \t\tgit push pushee-namespaced --tags &&\n \t\tgit ls-remote pushee-namespaced >actual &&\n@@ -59,7 +59,7 @@ test_expect_success 'pulling from a repository using a ref namespace' '\n \t\tcd puller &&\n \t\tgit remote add -f pushee-namespaced \"ext::git --namespace=namespace %s ../pushee\" &&\n \t\tgit for-each-ref refs/ >actual &&\n-\t\tprintf \"$commit1 commit\\trefs/remotes/pushee-namespaced/master\\n\" >expected &&\n+\t\tprintf \"$commit1 commit\\trefs/remotes/pushee-namespaced/main\\n\" >expected &&\n \t\tprintf \"$commit0 commit\\trefs/tags/0\\n\" >>expected &&\n \t\tprintf \"$commit1 commit\\trefs/tags/1\\n\" >>expected &&\n \t\ttest_cmp expected actual\n@@ -79,7 +79,7 @@ test_expect_success 'mirroring a repository using a ref namespace' '\n \t(\n \t\tcd mirror &&\n \t\tgit for-each-ref refs/ >actual &&\n-\t\tprintf \"$commit1 commit\\trefs/namespaces/namespace/refs/heads/master\\n\" >expected &&\n+\t\tprintf \"$commit1 commit\\trefs/namespaces/namespace/refs/heads/main\\n\" >expected &&\n \t\tprintf \"$commit0 commit\\trefs/namespaces/namespace/refs/tags/0\\n\" >>expected &&\n \t\tprintf \"$commit1 commit\\trefs/namespaces/namespace/refs/tags/1\\n\" >>expected &&\n \t\ttest_cmp expected actual\n@@ -90,7 +90,7 @@ test_expect_success 'hide namespaced refs with transfer.hideRefs' '\n \tGIT_NAMESPACE=namespace \\\n \t\tgit -C pushee -c transfer.hideRefs=refs/tags \\\n \t\tls-remote \"ext::git %s .\" >actual &&\n-\tprintf \"$commit1\\trefs/heads/master\\n\" >expected &&\n+\tprintf \"$commit1\\trefs/heads/main\\n\" >expected &&\n \ttest_cmp expected actual\n '\n \n@@ -98,7 +98,7 @@ test_expect_success 'check that transfer.hideRefs does not match unstripped refs\n \tGIT_NAMESPACE=namespace \\\n \t\tgit -C pushee -c transfer.hideRefs=refs/namespaces/namespace/refs/tags \\\n \t\tls-remote \"ext::git %s .\" >actual &&\n-\tprintf \"$commit1\\trefs/heads/master\\n\" >expected &&\n+\tprintf \"$commit1\\trefs/heads/main\\n\" >expected &&\n \tprintf \"$commit0\\trefs/tags/0\\n\" >>expected &&\n \tprintf \"$commit1\\trefs/tags/1\\n\" >>expected &&\n \ttest_cmp expected actual\n@@ -108,23 +108,23 @@ test_expect_success 'hide full refs with transfer.hideRefs' '\n \tGIT_NAMESPACE=namespace \\\n \t\tgit -C pushee -c transfer.hideRefs=\"^refs/namespaces/namespace/refs/tags\" \\\n \t\tls-remote \"ext::git %s .\" >actual &&\n-\tprintf \"$commit1\\trefs/heads/master\\n\" >expected &&\n+\tprintf \"$commit1\\trefs/heads/main\\n\" >expected &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'try to update a hidden ref' '\n-\ttest_config -C pushee transfer.hideRefs refs/heads/master &&\n-\ttest_must_fail git -C original push pushee-namespaced master\n+\ttest_config -C pushee transfer.hideRefs refs/heads/main &&\n+\ttest_must_fail git -C original push pushee-namespaced main\n '\n \n test_expect_success 'try to update a ref that is not hidden' '\n-\ttest_config -C pushee transfer.hideRefs refs/namespaces/namespace/refs/heads/master &&\n-\tgit -C original push pushee-namespaced master\n+\ttest_config -C pushee transfer.hideRefs refs/namespaces/namespace/refs/heads/main &&\n+\tgit -C original push pushee-namespaced main\n '\n \n test_expect_success 'try to update a hidden full ref' '\n-\ttest_config -C pushee transfer.hideRefs \"^refs/namespaces/namespace/refs/heads/master\" &&\n-\ttest_must_fail git -C original push pushee-namespaced master\n+\ttest_config -C pushee transfer.hideRefs \"^refs/namespaces/namespace/refs/heads/main\" &&\n+\ttest_must_fail git -C original push pushee-namespaced main\n '\n \n test_expect_success 'set up ambiguous HEAD' '\n@@ -160,9 +160,9 @@ test_expect_success 'denyCurrentBranch and unborn branch with ref namespace' '\n \t\tcd original &&\n \t\tgit init unborn &&\n \t\tgit remote add unborn-namespaced \"ext::git --namespace=namespace %s unborn\" &&\n-\t\ttest_must_fail git push unborn-namespaced HEAD:master &&\n+\t\ttest_must_fail git push unborn-namespaced HEAD:main &&\n \t\tgit -C unborn config receive.denyCurrentBranch updateInstead &&\n-\t\tgit push unborn-namespaced HEAD:master\n+\t\tgit push unborn-namespaced HEAD:main\n \t)\n '\n \n-- \ngitgitgadget\n\n"},{"id":"410290","messageId":"5c57fbe695e90ca7fedaa4b9843daee925250435.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 16/28] t55[4-9]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:34Z","receivedAt":"2020-11-18T23:45:20Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -e 's/retsam/niam/g' \\\n\t\t-- t55[4-9]*.sh t556x*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nNote that t5541 uses the reversed `master` name: `retsam`. We replace it\nby the equivalent for `main`: `niam`.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5540-http-push-webdav.sh          | 10 ++--\n t/t5541-http-push-smart.sh           | 42 +++++++-------\n t/t5542-push-http-shallow.sh         | 10 ++--\n t/t5543-atomic-push.sh               | 82 +++++++++++++--------------\n t/t5545-push-options.sh              | 64 ++++++++++-----------\n t/t5548-push-porcelain.sh            | 64 ++++++++++-----------\n t/t5550-http-fetch-dumb.sh           | 22 ++++----\n t/t5551-http-fetch-smart.sh          | 22 ++++----\n t/t5552-skipping-fetch-negotiator.sh |  2 +-\n t/t5553-set-upstream.sh              | 84 ++++++++++++++--------------\n t/t5560-http-backend-noserver.sh     |  2 +-\n t/t5561-http-backend.sh              |  6 +-\n t/t556x_common                       |  8 +--\n t/t5570-git-daemon.sh                | 18 +++---\n t/t5571-pre-push-hook.sh             |  6 +-\n t/t5572-pull-submodule.sh            |  4 +-\n t/t5580-unc-paths.sh                 |  4 +-\n t/t5581-http-curl-verbose.sh         |  4 +-\n t/t5582-fetch-negative-refspec.sh    | 24 ++++----\n 19 files changed, 239 insertions(+), 239 deletions(-)\n\ndiff --git a/t/t5540-http-push-webdav.sh b/t/t5540-http-push-webdav.sh\nindex 751116e123..8b68bb38a4 100755\n--- a/t/t5540-http-push-webdav.sh\n+++ b/t/t5540-http-push-webdav.sh\n@@ -7,7 +7,7 @@ test_description='test WebDAV http-push\n \n This test runs various sanity checks on http-push.'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -74,7 +74,7 @@ test_expect_success 'push already up-to-date' '\n test_expect_success 'push to remote repository with unpacked refs' '\n \t(cd \"$HTTPD_DOCUMENT_ROOT_PATH\"/test_repo.git &&\n \t rm packed-refs &&\n-\t git update-ref refs/heads/master $ORIG_HEAD &&\n+\t git update-ref refs/heads/main $ORIG_HEAD &&\n \t git --bare update-server-info) &&\n \tgit push &&\n \t(cd \"$HTTPD_DOCUMENT_ROOT_PATH\"/test_repo.git &&\n@@ -94,7 +94,7 @@ test_expect_success 'http-push fetches unpacked objects' '\n \t git remote rm origin &&\n \t git reflog expire --expire=0 --all &&\n \t git prune &&\n-\t git push -f -v $HTTPD_URL/dumb/test_repo_unpacked.git master)\n+\t git push -f -v $HTTPD_URL/dumb/test_repo_unpacked.git main)\n '\n \n test_expect_success 'http-push fetches packed objects' '\n@@ -114,7 +114,7 @@ test_expect_success 'http-push fetches packed objects' '\n \t git remote remove origin &&\n \t git reflog expire --expire=0 --all &&\n \t git prune &&\n-\t git push -f -v $HTTPD_URL/dumb/test_repo_packed.git master)\n+\t git push -f -v $HTTPD_URL/dumb/test_repo_packed.git main)\n '\n \n test_expect_success 'create and delete remote branch' '\n@@ -166,7 +166,7 @@ test_expect_success 'PUT and MOVE sends object to URLs with SHA-1 hash suffix' '\n '\n \n test_http_push_nonff \"$HTTPD_DOCUMENT_ROOT_PATH\"/test_repo.git \\\n-\t\"$ROOT_PATH\"/test_repo_clone master\n+\t\"$ROOT_PATH\"/test_repo_clone main\n \n test_expect_success 'push to password-protected repository (user in URL)' '\n \ttest_commit pw-user &&\ndiff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh\nindex 2836b87239..bc5ccf233f 100755\n--- a/t/t5541-http-push-smart.sh\n+++ b/t/t5541-http-push-smart.sh\n@@ -4,7 +4,7 @@\n #\n \n test_description='test smart pushing over http via http-backend'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -145,23 +145,23 @@ test_expect_success 'used receive-pack service' '\n '\n \n test_http_push_nonff \"$HTTPD_DOCUMENT_ROOT_PATH\"/test_repo.git \\\n-\t\"$ROOT_PATH\"/test_repo_clone master \t\tsuccess\n+\t\"$ROOT_PATH\"/test_repo_clone main \t\tsuccess\n \n test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper' '\n \t# create a dissimilarly-named remote ref so that git is unable to match the\n \t# two refs (viz. local, remote) unless an explicit refspec is provided.\n-\tgit push origin master:retsam &&\n+\tgit push origin main:niam &&\n \n \techo \"change changed\" > path2 &&\n \tgit commit -a -m path2 --amend &&\n \n-\t# push master too; this ensures there is at least one '\"'push'\"' command to\n+\t# push main too; this ensures there is at least one '\"'push'\"' command to\n \t# the remote helper and triggers interaction with the helper.\n-\ttest_must_fail git push -v origin +master master:retsam >output 2>&1'\n+\ttest_must_fail git push -v origin +main main:niam >output 2>&1'\n \n test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper: remote output' '\n-\tgrep \"^ + [a-f0-9]*\\.\\.\\.[a-f0-9]* *master -> master (forced update)$\" output &&\n-\tgrep \"^ ! \\[rejected\\] *master -> retsam (non-fast-forward)$\" output\n+\tgrep \"^ + [a-f0-9]*\\.\\.\\.[a-f0-9]* *main -> main (forced update)$\" output &&\n+\tgrep \"^ ! \\[rejected\\] *main -> niam (non-fast-forward)$\" output\n '\n \n test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper: our output' '\n@@ -170,7 +170,7 @@ test_expect_success 'push fails for non-fast-forward refs unmatched by remote he\n '\n \n test_expect_success 'push (chunked)' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit commit path3 &&\n \tHEAD=$(git rev-parse --verify HEAD) &&\n \ttest_config http.postbuffer 4 &&\n@@ -180,9 +180,9 @@ test_expect_success 'push (chunked)' '\n \t test $HEAD = $(git rev-parse --verify HEAD))\n '\n \n-## References of remote: atomic1(1)            master(2) collateral(2) other(2)\n-## References of local :            atomic2(2) master(1) collateral(3) other(2) collateral1(3) atomic(1)\n-## Atomic push         :                       master(1) collateral(3)                         atomic(1)\n+## References of remote: atomic1(1)            main(2) collateral(2) other(2)\n+## References of local :            atomic2(2) main(1) collateral(3) other(2) collateral1(3) atomic(1)\n+## Atomic push         :                       main(1) collateral(3)                         atomic(1)\n test_expect_success 'push --atomic also prevents branch creation, reports collateral' '\n \t# Setup upstream repo - empty for now\n \td=$HTTPD_DOCUMENT_ROOT_PATH/atomic-branches.git &&\n@@ -195,15 +195,15 @@ test_expect_success 'push --atomic also prevents branch creation, reports collat\n \ttest_commit atomic2 &&\n \tgit branch collateral &&\n \tgit branch other &&\n-\tgit push \"$up\" atomic1 master collateral other &&\n+\tgit push \"$up\" atomic1 main collateral other &&\n \tgit tag -d atomic1 &&\n \n \t# collateral is a valid push, but should be failed by atomic push\n \tgit checkout collateral &&\n \ttest_commit collateral1 &&\n \n-\t# Make master incompatible with upstream to provoke atomic\n-\tgit checkout master &&\n+\t# Make main incompatible with upstream to provoke atomic\n+\tgit checkout main &&\n \tgit reset --hard HEAD^ &&\n \n \t# Add a new branch which should be failed by atomic push. This is a\n@@ -211,7 +211,7 @@ test_expect_success 'push --atomic also prevents branch creation, reports collat\n \tgit branch atomic &&\n \n \t# --atomic should cause entire push to be rejected\n-\ttest_must_fail git push --atomic \"$up\" master atomic collateral 2>output &&\n+\ttest_must_fail git push --atomic \"$up\" main atomic collateral 2>output &&\n \n \t# the new branch should not have been created upstream\n \ttest_must_fail git -C \"$d\" show-ref --verify refs/heads/atomic &&\n@@ -219,15 +219,15 @@ test_expect_success 'push --atomic also prevents branch creation, reports collat\n \t# upstream should still reflect atomic2, the last thing we pushed\n \t# successfully\n \tgit rev-parse atomic2 >expected &&\n-\t# on master...\n-\tgit -C \"$d\" rev-parse refs/heads/master >actual &&\n+\t# on main...\n+\tgit -C \"$d\" rev-parse refs/heads/main >actual &&\n \ttest_cmp expected actual &&\n \t# ...and collateral.\n \tgit -C \"$d\" rev-parse refs/heads/collateral >actual &&\n \ttest_cmp expected actual &&\n \n \t# the failed refs should be indicated to the user\n-\tgrep \"^ ! .*rejected.* master -> master\" output &&\n+\tgrep \"^ ! .*rejected.* main -> main\" output &&\n \n \t# the collateral failure refs should be indicated to the user\n \tgrep \"^ ! .*rejected.* atomic -> atomic .*atomic push failed\" output &&\n@@ -475,9 +475,9 @@ test_expect_success 'clone/fetch scrubs password from reflogs' '\n \ttest_commit prepare-for-force-fetch &&\n \tgit switch -c away &&\n \tgit fetch \"$HTTPD_URL_USER_PASS/smart/test_repo.git\" \\\n-\t\t+master:master &&\n+\t\t+main:main &&\n \t# should have been scrubbed down to vanilla URL\n-\tgit log -g master >reflog &&\n+\tgit log -g main >reflog &&\n \tgrep \"$HTTPD_URL\" reflog &&\n \t! grep \"$HTTPD_URL_USER_PASS\" reflog\n '\n@@ -501,7 +501,7 @@ test_expect_success 'colorize errors/hints' '\n \tcd \"$ROOT_PATH\"/test_repo_clone &&\n \ttest_must_fail git -c color.transport=always -c color.advice=always \\\n \t\t-c color.push=always \\\n-\t\tpush origin origin/master^:master 2>act &&\n+\t\tpush origin origin/main^:main 2>act &&\n \ttest_decode_color <act >decoded &&\n \ttest_i18ngrep \"<RED>.*rejected.*<RESET>\" decoded &&\n \ttest_i18ngrep \"<RED>error: failed to push some refs\" decoded &&\ndiff --git a/t/t5542-push-http-shallow.sh b/t/t5542-push-http-shallow.sh\nindex 0feec9c449..c2cc83182f 100755\n--- a/t/t5542-push-http-shallow.sh\n+++ b/t/t5542-push-http-shallow.sh\n@@ -2,7 +2,7 @@\n \n test_description='push from/to a shallow clone over http'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -54,12 +54,12 @@ test_expect_success 'push to shallow repo via http' '\n \t(\n \tcd full &&\n \tcommit 9 &&\n-\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master\n+\tgit push $HTTPD_URL/smart/repo.git +main:refs/remotes/top/main\n \t) &&\n \t(\n \tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n \tgit fsck &&\n-\tgit log --format=%s top/master >actual &&\n+\tgit log --format=%s top/main >actual &&\n \tcat <<EOF >expect &&\n 9\n 4\n@@ -77,11 +77,11 @@ test_expect_success 'push from shallow repo via http' '\n \tgit config http.receivepack true\n \t) &&\n \tcommit 10 &&\n-\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master &&\n+\tgit push $HTTPD_URL/smart/repo.git +main:refs/remotes/top/main &&\n \t(\n \tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n \tgit fsck &&\n-\tgit log --format=%s top/master >actual &&\n+\tgit log --format=%s top/main >actual &&\n \tcat <<EOF >expect &&\n 10\n 4\ndiff --git a/t/t5543-atomic-push.sh b/t/t5543-atomic-push.sh\nindex 16a8fc7535..bfee461861 100755\n--- a/t/t5543-atomic-push.sh\n+++ b/t/t5543-atomic-push.sh\n@@ -2,7 +2,7 @@\n \n test_description='pushing to a repository using the atomic push option'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -43,9 +43,9 @@ test_expect_success 'atomic push works for a single branch' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit push --atomic up master\n+\t\tgit push --atomic up main\n \t) &&\n-\ttest_refs master master\n+\ttest_refs main main\n '\n \n test_expect_success 'atomic push works for two branches' '\n@@ -58,9 +58,9 @@ test_expect_success 'atomic push works for two branches' '\n \t\ttest_commit two &&\n \t\tgit checkout second &&\n \t\ttest_commit three &&\n-\t\tgit push --atomic up master second\n+\t\tgit push --atomic up main second\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \ttest_refs second second\n '\n \n@@ -73,7 +73,7 @@ test_expect_success 'atomic push works in combination with --mirror' '\n \t\ttest_commit two &&\n \t\tgit push --atomic --mirror up\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \ttest_refs second second\n '\n \n@@ -82,7 +82,7 @@ test_expect_success 'atomic push works in combination with --force' '\n \t(\n \t\tcd workbench &&\n \t\ttest_commit one &&\n-\t\tgit branch second master &&\n+\t\tgit branch second main &&\n \t\ttest_commit two_a &&\n \t\tgit checkout second &&\n \t\ttest_commit two_b &&\n@@ -90,36 +90,36 @@ test_expect_success 'atomic push works in combination with --force' '\n \t\ttest_commit four &&\n \t\tgit push --mirror up &&\n \t\t# The actual test is below\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit three_a &&\n \t\tgit checkout second &&\n \t\tgit reset --hard HEAD^ &&\n-\t\tgit push --force --atomic up master second\n+\t\tgit push --force --atomic up main second\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \ttest_refs second second\n '\n \n-# set up two branches where master can be pushed but second can not\n+# set up two branches where main can be pushed but second can not\n # (non-fast-forward). Since second can not be pushed the whole operation\n-# will fail and leave master untouched.\n+# will fail and leave main untouched.\n test_expect_success 'atomic push fails if one branch fails' '\n \tmk_repo_pair &&\n \t(\n \t\tcd workbench &&\n \t\ttest_commit one &&\n-\t\tgit checkout -b second master &&\n+\t\tgit checkout -b second main &&\n \t\ttest_commit two &&\n \t\ttest_commit three &&\n \t\ttest_commit four &&\n \t\tgit push --mirror up &&\n \t\tgit reset --hard HEAD~2 &&\n \t\ttest_commit five &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit six &&\n \t\ttest_must_fail git push --atomic --all up\n \t) &&\n-\ttest_refs master HEAD@{7} &&\n+\ttest_refs main HEAD@{7} &&\n \ttest_refs second HEAD@{4}\n '\n \n@@ -129,7 +129,7 @@ test_expect_success 'atomic push fails if one tag fails remotely' '\n \t(\n \t\tcd workbench &&\n \t\ttest_commit one &&\n-\t\tgit checkout -b second master &&\n+\t\tgit checkout -b second main &&\n \t\ttest_commit two &&\n \t\tgit push --mirror up\n \t) &&\n@@ -142,14 +142,14 @@ test_expect_success 'atomic push fails if one tag fails remotely' '\n \t# see if we can now push both branches.\n \t(\n \t\tcd workbench &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit three &&\n \t\tgit checkout second &&\n \t\ttest_commit four &&\n \t\tgit tag test_tag &&\n-\t\ttest_must_fail git push --tags --atomic up master second\n+\t\ttest_must_fail git push --tags --atomic up main second\n \t) &&\n-\ttest_refs master HEAD@{3} &&\n+\ttest_refs main HEAD@{3} &&\n \ttest_refs second HEAD@{1}\n '\n \n@@ -158,7 +158,7 @@ test_expect_success 'atomic push obeys update hook preventing a branch to be pus\n \t(\n \t\tcd workbench &&\n \t\ttest_commit one &&\n-\t\tgit checkout -b second master &&\n+\t\tgit checkout -b second main &&\n \t\ttest_commit two &&\n \t\tgit push --mirror up\n \t) &&\n@@ -168,19 +168,19 @@ test_expect_success 'atomic push obeys update hook preventing a branch to be pus\n \t\tHOOK=\"$HOOKDIR/update\" &&\n \t\tmkdir -p \"$HOOKDIR\" &&\n \t\twrite_script \"$HOOK\" <<-\\EOF\n-\t\t\t# only allow update to master from now on\n-\t\t\ttest \"$1\" = \"refs/heads/master\"\n+\t\t\t# only allow update to main from now on\n+\t\t\ttest \"$1\" = \"refs/heads/main\"\n \t\tEOF\n \t) &&\n \t(\n \t\tcd workbench &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit three &&\n \t\tgit checkout second &&\n \t\ttest_commit four &&\n-\t\ttest_must_fail git push --atomic up master second\n+\t\ttest_must_fail git push --atomic up main second\n \t) &&\n-\ttest_refs master HEAD@{3} &&\n+\ttest_refs main HEAD@{3} &&\n \ttest_refs second HEAD@{1}\n '\n \n@@ -195,21 +195,21 @@ test_expect_success 'atomic push is not advertised if configured' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\ttest_must_fail git push --atomic up master\n+\t\ttest_must_fail git push --atomic up main\n \t) &&\n-\ttest_refs master HEAD@{1}\n+\ttest_refs main HEAD@{1}\n '\n \n-# References in upstream : master(1) one(1) foo(1)\n-# References in workbench: master(2)        foo(1) two(2) bar(2)\n-# Atomic push            : master(2)               two(2) bar(2)\n+# References in upstream : main(1) one(1) foo(1)\n+# References in workbench: main(2)        foo(1) two(2) bar(2)\n+# Atomic push            : main(2)               two(2) bar(2)\n test_expect_success 'atomic push reports (reject by update hook)' '\n \tmk_repo_pair &&\n \t(\n \t\tcd workbench &&\n \t\ttest_commit one &&\n \t\tgit branch foo &&\n-\t\tgit push up master one foo &&\n+\t\tgit push up main one foo &&\n \t\tgit tag -d one\n \t) &&\n \t(\n@@ -231,19 +231,19 @@ test_expect_success 'atomic push reports (reject by update hook)' '\n \t\tgit branch bar\n \t) &&\n \ttest_must_fail git -C workbench \\\n-\t\tpush --atomic up master two bar >out 2>&1 &&\n+\t\tpush --atomic up main two bar >out 2>&1 &&\n \tfmt_status_report <out >actual &&\n \tcat >expect <<-EOF &&\n \tTo ../upstream\n-\t ! [remote rejected] master -> master (atomic push failure)\n+\t ! [remote rejected] main -> main (atomic push failure)\n \t ! [remote rejected] two -> two (atomic push failure)\n \t ! [remote rejected] bar -> bar (hook declined)\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# References in upstream : master(1) one(1) foo(1)\n-# References in workbench: master(2)        foo(1) two(2) bar(2)\n+# References in upstream : main(1) one(1) foo(1)\n+# References in workbench: main(2)        foo(1) two(2) bar(2)\n test_expect_success 'atomic push reports (mirror, but reject by update hook)' '\n \t(\n \t\tcd workbench &&\n@@ -255,7 +255,7 @@ test_expect_success 'atomic push reports (mirror, but reject by update hook)' '\n \tfmt_status_report <out >actual &&\n \tcat >expect <<-EOF &&\n \tTo ../upstream\n-\t ! [remote rejected] master -> master (atomic push failure)\n+\t ! [remote rejected] main -> main (atomic push failure)\n \t ! [remote rejected] one (atomic push failure)\n \t ! [remote rejected] bar -> bar (hook declined)\n \t ! [remote rejected] two -> two (atomic push failure)\n@@ -263,21 +263,21 @@ test_expect_success 'atomic push reports (mirror, but reject by update hook)' '\n \ttest_cmp expect actual\n '\n \n-# References in upstream : master(2) one(1) foo(1)\n-# References in workbench: master(1)        foo(1) two(2) bar(2)\n+# References in upstream : main(2) one(1) foo(1)\n+# References in workbench: main(1)        foo(1) two(2) bar(2)\n test_expect_success 'atomic push reports (reject by non-ff)' '\n \trm upstream/.git/hooks/update &&\n \t(\n \t\tcd workbench &&\n-\t\tgit push up master &&\n+\t\tgit push up main &&\n \t\tgit reset --hard HEAD^\n \t) &&\n \ttest_must_fail git -C workbench \\\n-\t\tpush --atomic up master foo bar >out 2>&1 &&\n+\t\tpush --atomic up main foo bar >out 2>&1 &&\n \tfmt_status_report <out >actual &&\n \tcat >expect <<-EOF &&\n \tTo ../upstream\n-\t ! [rejected] master -> master (non-fast-forward)\n+\t ! [rejected] main -> main (non-fast-forward)\n \t ! [rejected] bar -> bar (atomic push failed)\n \tEOF\n \ttest_cmp expect actual\ndiff --git a/t/t5545-push-options.sh b/t/t5545-push-options.sh\nindex 202d75aebe..58c7add7ee 100755\n--- a/t/t5545-push-options.sh\n+++ b/t/t5545-push-options.sh\n@@ -2,7 +2,7 @@\n \n test_description='pushing to a repository using push options'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -66,9 +66,9 @@ test_expect_success 'one push option works for a single branch' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit push --push-option=asdf up master\n+\t\tgit push --push-option=asdf up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \techo \"asdf\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -82,9 +82,9 @@ test_expect_success 'push option denied by remote' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\ttest_must_fail git push --push-option=asdf up master\n+\t\ttest_must_fail git push --push-option=asdf up main\n \t) &&\n-\ttest_refs master HEAD@{1}\n+\ttest_refs main HEAD@{1}\n '\n \n test_expect_success 'two push options work' '\n@@ -95,9 +95,9 @@ test_expect_success 'two push options work' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit push --push-option=asdf --push-option=\"more structured text\" up master\n+\t\tgit push --push-option=asdf --push-option=\"more structured text\" up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \tprintf \"asdf\\nmore structured text\\n\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -126,14 +126,14 @@ test_expect_success 'push options and submodules' '\n \n \tgit -C parent push \\\n \t\t--push-option=asdf --push-option=\"more structured text\" \\\n-\t\t--recurse-submodules=on-demand up master &&\n+\t\t--recurse-submodules=on-demand up main &&\n \n-\tgit -C upstream rev-parse --verify master >expect &&\n-\tgit -C parent/workbench rev-parse --verify master >actual &&\n+\tgit -C upstream rev-parse --verify main >expect &&\n+\tgit -C parent/workbench rev-parse --verify main >actual &&\n \ttest_cmp expect actual &&\n \n-\tgit -C parent_upstream rev-parse --verify master >expect &&\n-\tgit -C parent rev-parse --verify master >actual &&\n+\tgit -C parent_upstream rev-parse --verify main >expect &&\n+\tgit -C parent rev-parse --verify main >actual &&\n \ttest_cmp expect actual &&\n \n \tprintf \"asdf\\nmore structured text\\n\" >expect &&\n@@ -151,9 +151,9 @@ test_expect_success 'default push option' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit -c push.pushOption=default push up master\n+\t\tgit -c push.pushOption=default push up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \techo \"default\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -167,9 +167,9 @@ test_expect_success 'two default push options' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit -c push.pushOption=default1 -c push.pushOption=default2 push up master\n+\t\tgit -c push.pushOption=default1 -c push.pushOption=default2 push up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \tprintf \"default1\\ndefault2\\n\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -183,9 +183,9 @@ test_expect_success 'push option from command line overrides from-config push op\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit -c push.pushOption=default push --push-option=manual up master\n+\t\tgit -c push.pushOption=default push --push-option=manual up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \techo \"manual\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -199,9 +199,9 @@ test_expect_success 'empty value of push.pushOption in config clears the list' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\tgit -c push.pushOption=default1 -c push.pushOption= -c push.pushOption=default2 push up master\n+\t\tgit -c push.pushOption=default1 -c push.pushOption= -c push.pushOption=default2 push up main\n \t) &&\n-\ttest_refs master master &&\n+\ttest_refs main main &&\n \techo \"default2\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect upstream/.git/hooks/post-receive.push_options\n@@ -215,16 +215,16 @@ test_expect_success 'invalid push option in config' '\n \t\ttest_commit one &&\n \t\tgit push --mirror up &&\n \t\ttest_commit two &&\n-\t\ttest_must_fail git -c push.pushOption push up master\n+\t\ttest_must_fail git -c push.pushOption push up main\n \t) &&\n-\ttest_refs master HEAD@{1}\n+\ttest_refs main HEAD@{1}\n '\n \n test_expect_success 'push options keep quoted characters intact (direct)' '\n \tmk_repo_pair &&\n \tgit -C upstream config receive.advertisePushOptions true &&\n \ttest_commit -C workbench one &&\n-\tgit -C workbench push --push-option=\"\\\"embedded quotes\\\"\" up master &&\n+\tgit -C workbench push --push-option=\"\\\"embedded quotes\\\"\" up main &&\n \techo \"\\\"embedded quotes\\\"\" >expect &&\n \ttest_cmp expect upstream/.git/hooks/pre-receive.push_options\n '\n@@ -247,28 +247,28 @@ mk_http_pair () {\n test_expect_success 'push option denied properly by http server' '\n \tmk_http_pair false &&\n \ttest_commit -C test_http_clone one &&\n-\ttest_must_fail git -C test_http_clone push --push-option=asdf origin master 2>actual &&\n+\ttest_must_fail git -C test_http_clone push --push-option=asdf origin main 2>actual &&\n \ttest_i18ngrep \"the receiving end does not support push options\" actual &&\n-\tgit -C test_http_clone push origin master\n+\tgit -C test_http_clone push origin main\n '\n \n test_expect_success 'push options work properly across http' '\n \tmk_http_pair true &&\n \n \ttest_commit -C test_http_clone one &&\n-\tgit -C test_http_clone push origin master &&\n-\tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git rev-parse --verify master >expect &&\n-\tgit -C test_http_clone rev-parse --verify master >actual &&\n+\tgit -C test_http_clone push origin main &&\n+\tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git rev-parse --verify main >expect &&\n+\tgit -C test_http_clone rev-parse --verify main >actual &&\n \ttest_cmp expect actual &&\n \n \ttest_commit -C test_http_clone two &&\n-\tgit -C test_http_clone push --push-option=asdf --push-option=\"more structured text\" origin master &&\n+\tgit -C test_http_clone push --push-option=asdf --push-option=\"more structured text\" origin main &&\n \tprintf \"asdf\\nmore structured text\\n\" >expect &&\n \ttest_cmp expect \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git/hooks/pre-receive.push_options &&\n \ttest_cmp expect \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git/hooks/post-receive.push_options &&\n \n-\tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git rev-parse --verify master >expect &&\n-\tgit -C test_http_clone rev-parse --verify master >actual &&\n+\tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git rev-parse --verify main >expect &&\n+\tgit -C test_http_clone rev-parse --verify main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -276,7 +276,7 @@ test_expect_success 'push options keep quoted characters intact (http)' '\n \tmk_http_pair true &&\n \n \ttest_commit -C test_http_clone one &&\n-\tgit -C test_http_clone push --push-option=\"\\\"embedded quotes\\\"\" origin master &&\n+\tgit -C test_http_clone push --push-option=\"\\\"embedded quotes\\\"\" origin main &&\n \techo \"\\\"embedded quotes\\\"\" >expect &&\n \ttest_cmp expect \"$HTTPD_DOCUMENT_ROOT_PATH\"/upstream.git/hooks/pre-receive.push_options\n '\ndiff --git a/t/t5548-push-porcelain.sh b/t/t5548-push-porcelain.sh\nindex 1b19b3ef55..5a761f3642 100755\n--- a/t/t5548-push-porcelain.sh\n+++ b/t/t5548-push-porcelain.sh\n@@ -36,7 +36,7 @@ create_commits_in () {\n \t\tshift ||\n \t\treturn 1\n \tdone &&\n-\tgit -C \"$repo\" update-ref refs/heads/master $oid\n+\tgit -C \"$repo\" update-ref refs/heads/main $oid\n }\n \n # Format the output of git-push, git-show-ref and other commands to make a\n@@ -57,8 +57,8 @@ make_user_friendly_and_stable_output () {\n }\n \n setup_upstream_and_workbench () {\n-\t# Upstream  after setup : master(B)  foo(A)  bar(A)  baz(A)\n-\t# Workbench after setup : master(A)\n+\t# Upstream  after setup : main(B)  foo(A)  bar(A)  baz(A)\n+\t# Workbench after setup : main(A)\n \ttest_expect_success \"setup upstream repository and workbench\" '\n \t\trm -rf upstream.git workbench &&\n \t\tgit init --bare upstream.git &&\n@@ -70,9 +70,9 @@ setup_upstream_and_workbench () {\n \t\t\t# this fixed-width oid will be replaced with \"<OID>\".\n \t\t\tgit config core.abbrev 7 &&\n \t\t\tgit remote add origin ../upstream.git &&\n-\t\t\tgit update-ref refs/heads/master $A &&\n+\t\t\tgit update-ref refs/heads/main $A &&\n \t\t\tgit push origin \\\n-\t\t\t\t$B:refs/heads/master \\\n+\t\t\t\t$B:refs/heads/main \\\n \t\t\t\t$A:refs/heads/foo \\\n \t\t\t\t$A:refs/heads/bar \\\n \t\t\t\t$A:refs/heads/baz\n@@ -94,17 +94,17 @@ run_git_push_porcelain_output_test() {\n \t\t;;\n \tesac\n \n-\t# Refs of upstream : master(B)  foo(A)  bar(A)  baz(A)\n-\t# Refs of workbench: master(A)                  baz(A)  next(A)\n-\t# git-push         : master(A)  NULL    (B)     baz(A)  next(A)\n+\t# Refs of upstream : main(B)  foo(A)  bar(A)  baz(A)\n+\t# Refs of workbench: main(A)                  baz(A)  next(A)\n+\t# git-push         : main(A)  NULL    (B)     baz(A)  next(A)\n \ttest_expect_success \"porcelain output of successful git-push ($PROTOCOL)\" '\n \t\t(\n \t\t\tcd workbench &&\n-\t\t\tgit update-ref refs/heads/master $A &&\n+\t\t\tgit update-ref refs/heads/main $A &&\n \t\t\tgit update-ref refs/heads/baz $A &&\n \t\t\tgit update-ref refs/heads/next $A &&\n \t\t\tgit push --porcelain --force origin \\\n-\t\t\t\tmaster \\\n+\t\t\t\tmain \\\n \t\t\t\t:refs/heads/foo \\\n \t\t\t\t$B:bar \\\n \t\t\t\tbaz \\\n@@ -116,7 +116,7 @@ run_git_push_porcelain_output_test() {\n \t\t=    refs/heads/baz:refs/heads/baz    [up to date]\n \t\t     <COMMIT-B>:refs/heads/bar    <OID-A>..<OID-B>\n \t\t-    :refs/heads/foo    [deleted]\n-\t\t+    refs/heads/master:refs/heads/master    <OID-B>...<OID-A> (forced update)\n+\t\t+    refs/heads/main:refs/heads/main    <OID-B>...<OID-A> (forced update)\n \t\t*    refs/heads/next:refs/heads/next    [new branch]\n \t\tDone\n \t\tEOF\n@@ -127,22 +127,22 @@ run_git_push_porcelain_output_test() {\n \t\tcat >expect <<-EOF &&\n \t\t<COMMIT-B> refs/heads/bar\n \t\t<COMMIT-A> refs/heads/baz\n-\t\t<COMMIT-A> refs/heads/master\n+\t\t<COMMIT-A> refs/heads/main\n \t\t<COMMIT-A> refs/heads/next\n \t\tEOF\n \t\ttest_cmp expect actual\n \t'\n \n-\t# Refs of upstream : master(A)  bar(B)  baz(A)  next(A)\n-\t# Refs of workbench: master(B)  bar(A)  baz(A)  next(A)\n-\t# git-push         : master(B)  bar(A)  NULL    next(A)\n+\t# Refs of upstream : main(A)  bar(B)  baz(A)  next(A)\n+\t# Refs of workbench: main(B)  bar(A)  baz(A)  next(A)\n+\t# git-push         : main(B)  bar(A)  NULL    next(A)\n \ttest_expect_success \"atomic push failed ($PROTOCOL)\" '\n \t\t(\n \t\t\tcd workbench &&\n-\t\t\tgit update-ref refs/heads/master $B &&\n+\t\t\tgit update-ref refs/heads/main $B &&\n \t\t\tgit update-ref refs/heads/bar $A &&\n \t\t\ttest_must_fail git push --atomic --porcelain origin \\\n-\t\t\t\tmaster \\\n+\t\t\t\tmain \\\n \t\t\t\tbar \\\n \t\t\t\t:baz \\\n \t\t\t\tnext\n@@ -153,7 +153,7 @@ run_git_push_porcelain_output_test() {\n \t\t=    refs/heads/next:refs/heads/next    [up to date]\n \t\t!    refs/heads/bar:refs/heads/bar    [rejected] (non-fast-forward)\n \t\t!    (delete):refs/heads/baz    [rejected] (atomic push failed)\n-\t\t!    refs/heads/master:refs/heads/master    [rejected] (atomic push failed)\n+\t\t!    refs/heads/main:refs/heads/main    [rejected] (atomic push failed)\n \t\tDone\n \t\tEOF\n \t\ttest_cmp expect actual &&\n@@ -163,7 +163,7 @@ run_git_push_porcelain_output_test() {\n \t\tcat >expect <<-EOF &&\n \t\t<COMMIT-B> refs/heads/bar\n \t\t<COMMIT-A> refs/heads/baz\n-\t\t<COMMIT-A> refs/heads/master\n+\t\t<COMMIT-A> refs/heads/main\n \t\t<COMMIT-A> refs/heads/next\n \t\tEOF\n \t\ttest_cmp expect actual\n@@ -174,16 +174,16 @@ run_git_push_porcelain_output_test() {\n \t\tEOF\n \t'\n \n-\t# Refs of upstream : master(A)  bar(B)  baz(A)  next(A)\n-\t# Refs of workbench: master(B)  bar(A)  baz(A)  next(A)\n-\t# git-push         : master(B)  bar(A)  NULL    next(A)\n+\t# Refs of upstream : main(A)  bar(B)  baz(A)  next(A)\n+\t# Refs of workbench: main(B)  bar(A)  baz(A)  next(A)\n+\t# git-push         : main(B)  bar(A)  NULL    next(A)\n \ttest_expect_success \"pre-receive hook declined ($PROTOCOL)\" '\n \t\t(\n \t\t\tcd workbench &&\n-\t\t\tgit update-ref refs/heads/master $B &&\n+\t\t\tgit update-ref refs/heads/main $B &&\n \t\t\tgit update-ref refs/heads/bar $A &&\n \t\t\ttest_must_fail git push --porcelain --force origin \\\n-\t\t\t\tmaster \\\n+\t\t\t\tmain \\\n \t\t\t\tbar \\\n \t\t\t\t:baz \\\n \t\t\t\tnext\n@@ -194,7 +194,7 @@ run_git_push_porcelain_output_test() {\n \t\t=    refs/heads/next:refs/heads/next    [up to date]\n \t\t!    refs/heads/bar:refs/heads/bar    [remote rejected] (pre-receive hook declined)\n \t\t!    :refs/heads/baz    [remote rejected] (pre-receive hook declined)\n-\t\t!    refs/heads/master:refs/heads/master    [remote rejected] (pre-receive hook declined)\n+\t\t!    refs/heads/main:refs/heads/main    [remote rejected] (pre-receive hook declined)\n \t\tDone\n \t\tEOF\n \t\ttest_cmp expect actual &&\n@@ -204,7 +204,7 @@ run_git_push_porcelain_output_test() {\n \t\tcat >expect <<-EOF &&\n \t\t<COMMIT-B> refs/heads/bar\n \t\t<COMMIT-A> refs/heads/baz\n-\t\t<COMMIT-A> refs/heads/master\n+\t\t<COMMIT-A> refs/heads/main\n \t\t<COMMIT-A> refs/heads/next\n \t\tEOF\n \t\ttest_cmp expect actual\n@@ -214,14 +214,14 @@ run_git_push_porcelain_output_test() {\n \t\trm \"$upstream/hooks/pre-receive\"\n \t'\n \n-\t# Refs of upstream : master(A)  bar(B)  baz(A)  next(A)\n-\t# Refs of workbench: master(B)  bar(A)  baz(A)  next(A)\n-\t# git-push         : master(B)  bar(A)  NULL    next(A)\n+\t# Refs of upstream : main(A)  bar(B)  baz(A)  next(A)\n+\t# Refs of workbench: main(B)  bar(A)  baz(A)  next(A)\n+\t# git-push         : main(B)  bar(A)  NULL    next(A)\n \ttest_expect_success \"non-fastforward push ($PROTOCOL)\" '\n \t\t(\n \t\t\tcd workbench &&\n \t\t\ttest_must_fail git push --porcelain origin \\\n-\t\t\t\tmaster \\\n+\t\t\t\tmain \\\n \t\t\t\tbar \\\n \t\t\t\t:baz \\\n \t\t\t\tnext\n@@ -231,7 +231,7 @@ run_git_push_porcelain_output_test() {\n \t\tTo <URL/of/upstream.git>\n \t\t=    refs/heads/next:refs/heads/next    [up to date]\n \t\t-    :refs/heads/baz    [deleted]\n-\t\t     refs/heads/master:refs/heads/master    <OID-A>..<OID-B>\n+\t\t     refs/heads/main:refs/heads/main    <OID-A>..<OID-B>\n \t\t!    refs/heads/bar:refs/heads/bar    [rejected] (non-fast-forward)\n \t\tDone\n \t\tEOF\n@@ -241,7 +241,7 @@ run_git_push_porcelain_output_test() {\n \t\tmake_user_friendly_and_stable_output <out >actual &&\n \t\tcat >expect <<-EOF &&\n \t\t<COMMIT-B> refs/heads/bar\n-\t\t<COMMIT-B> refs/heads/master\n+\t\t<COMMIT-B> refs/heads/main\n \t\t<COMMIT-A> refs/heads/next\n \t\tEOF\n \t\ttest_cmp expect actual\ndiff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh\nindex 9ec91792c3..2ecb06bb63 100755\n--- a/t/t5550-http-fetch-dumb.sh\n+++ b/t/t5550-http-fetch-dumb.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='test dumb fetching over http via static file'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -29,7 +29,7 @@ test_expect_success 'create http-accessible bare repository with loose objects'\n \t hooks/post-update\n \t) &&\n \tgit remote add public \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit push public master:master\n+\tgit push public main:main\n '\n \n test_expect_success 'clone http repository' '\n@@ -40,8 +40,8 @@ test_expect_success 'clone http repository' '\n \n test_expect_success 'list refs from outside any repository' '\n \tcat >expect <<-EOF &&\n-\t$(git rev-parse master)\tHEAD\n-\t$(git rev-parse master)\trefs/heads/master\n+\t$(git rev-parse main)\tHEAD\n+\t$(git rev-parse main)\trefs/heads/main\n \tEOF\n \tnongit git ls-remote \"$HTTPD_URL/dumb/repo.git\" >actual &&\n \ttest_cmp expect actual\n@@ -184,8 +184,8 @@ test_expect_success 'fetch changes via manual http-fetch' '\n \n \tHEAD=$(git rev-parse --verify HEAD) &&\n \t(cd clone2 &&\n-\t git http-fetch -a -w heads/master-new $HEAD $(git config remote.origin.url) &&\n-\t git checkout master-new &&\n+\t git http-fetch -a -w heads/main-new $HEAD $(git config remote.origin.url) &&\n+\t git checkout main-new &&\n \t test $HEAD = $(git rev-parse --verify HEAD)) &&\n \ttest_cmp file clone2/file\n '\n@@ -195,19 +195,19 @@ test_expect_success 'manual http-fetch without -a works just as well' '\n \n \tHEAD=$(git rev-parse --verify HEAD) &&\n \t(cd clone3 &&\n-\t git http-fetch -w heads/master-new $HEAD $(git config remote.origin.url) &&\n-\t git checkout master-new &&\n+\t git http-fetch -w heads/main-new $HEAD $(git config remote.origin.url) &&\n+\t git checkout main-new &&\n \t test $HEAD = $(git rev-parse --verify HEAD)) &&\n \ttest_cmp file clone3/file\n '\n \n test_expect_success 'http remote detects correct HEAD' '\n-\tgit push public master:other &&\n+\tgit push public main:other &&\n \t(cd clone &&\n \t git remote set-head origin -d &&\n \t git remote set-head origin -a &&\n \t git symbolic-ref refs/remotes/origin/HEAD > output &&\n-\t echo refs/remotes/origin/master > expect &&\n+\t echo refs/remotes/origin/main > expect &&\n \t test_cmp expect output\n \t)\n '\n@@ -419,7 +419,7 @@ test_expect_success 'set up evil alternates scheme' '\n \tevil=$HTTPD_DOCUMENT_ROOT_PATH/evil.git &&\n \tgit init --bare \"$evil\" &&\n \t# do this by hand to avoid object existence check\n-\tprintf \"%s\\\\t%s\\\\n\" $sha1 refs/heads/master >\"$evil/info/refs\"\n+\tprintf \"%s\\\\t%s\\\\n\" $sha1 refs/heads/main >\"$evil/info/refs\"\n '\n \n # Here we'll just redirect via HTTP. In a real-world attack these would be on\ndiff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh\nindex 310b89dbab..984dba22af 100755\n--- a/t/t5551-http-fetch-smart.sh\n+++ b/t/t5551-http-fetch-smart.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='test smart fetching over http via http-backend'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -21,7 +21,7 @@ test_expect_success 'create http-accessible bare repository' '\n \t git --bare init\n \t) &&\n \tgit remote add public \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit push public master:master\n+\tgit push public main:main\n '\n \n setup_askpass_helper\n@@ -241,9 +241,9 @@ test_expect_success 'invalid Content-Type rejected' '\n \n test_expect_success 'create namespaced refs' '\n \ttest_commit namespaced &&\n-\tgit push public HEAD:refs/namespaces/ns/refs/heads/master &&\n+\tgit push public HEAD:refs/namespaces/ns/refs/heads/main &&\n \tgit --git-dir=\"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" \\\n-\t\tsymbolic-ref refs/namespaces/ns/HEAD refs/namespaces/ns/refs/heads/master\n+\t\tsymbolic-ref refs/namespaces/ns/HEAD refs/namespaces/ns/refs/heads/main\n '\n \n test_expect_success 'smart clone respects namespace' '\n@@ -274,7 +274,7 @@ test_expect_success 'cookies stored in http.cookiefile when http.savecookies set\n \tEOF\n \tgit config http.cookiefile cookies.txt &&\n \tgit config http.savecookies true &&\n-\tgit ls-remote $HTTPD_URL/smart_cookies/repo.git master &&\n+\tgit ls-remote $HTTPD_URL/smart_cookies/repo.git main &&\n \n \t# NEEDSWORK: If the overspecification of the expected result is reduced, we\n \t# might be able to run this test in all protocol versions.\n@@ -347,12 +347,12 @@ test_expect_success 'large fetch-pack requests can be sent using chunked encodin\n test_expect_success 'test allowreachablesha1inwant' '\n \ttest_when_finished \"rm -rf test_reachable.git\" &&\n \tserver=\"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tmaster_sha=$(git -C \"$server\" rev-parse refs/heads/master) &&\n+\tmain_sha=$(git -C \"$server\" rev-parse refs/heads/main) &&\n \tgit -C \"$server\" config uploadpack.allowreachablesha1inwant 1 &&\n \n \tgit init --bare test_reachable.git &&\n \tgit -C test_reachable.git remote add origin \"$HTTPD_URL/smart/repo.git\" &&\n-\tgit -C test_reachable.git fetch origin \"$master_sha\"\n+\tgit -C test_reachable.git fetch origin \"$main_sha\"\n '\n \n test_expect_success 'test allowreachablesha1inwant with unreachable' '\n@@ -366,7 +366,7 @@ test_expect_success 'test allowreachablesha1inwant with unreachable' '\n \tgit push public :refs/heads/doomed &&\n \n \tserver=\"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tmaster_sha=$(git -C \"$server\" rev-parse refs/heads/master) &&\n+\tmain_sha=$(git -C \"$server\" rev-parse refs/heads/main) &&\n \tgit -C \"$server\" config uploadpack.allowreachablesha1inwant 1 &&\n \n \tgit init --bare test_reachable.git &&\n@@ -388,7 +388,7 @@ test_expect_success 'test allowanysha1inwant with unreachable' '\n \tgit push public :refs/heads/doomed &&\n \n \tserver=\"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tmaster_sha=$(git -C \"$server\" rev-parse refs/heads/master) &&\n+\tmain_sha=$(git -C \"$server\" rev-parse refs/heads/main) &&\n \tgit -C \"$server\" config uploadpack.allowreachablesha1inwant 1 &&\n \n \tgit init --bare test_reachable.git &&\n@@ -447,8 +447,8 @@ test_expect_success 'using fetch command in remote-curl updates refs' '\n \ttest_commit -C \"$SERVER\" bar &&\n \tgit -C client -c protocol.version=0 fetch &&\n \n-\tgit -C \"$SERVER\" rev-parse master >expect &&\n-\tgit -C client rev-parse origin/master >actual &&\n+\tgit -C \"$SERVER\" rev-parse main >expect &&\n+\tgit -C client rev-parse origin/main >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t5552-skipping-fetch-negotiator.sh b/t/t5552-skipping-fetch-negotiator.sh\nindex 156c704040..7b9fb4ff02 100755\n--- a/t/t5552-skipping-fetch-negotiator.sh\n+++ b/t/t5552-skipping-fetch-negotiator.sh\n@@ -100,7 +100,7 @@ test_expect_success 'use ref advertisement to filter out commits' '\n \tgit -C server checkout --orphan anotherbranch &&\n \ttest_commit -C server to_fetch &&\n \n-\t# The server advertising \"c3\" (as \"refs/heads/master\") means that we do\n+\t# The server advertising \"c3\" (as \"refs/heads/main\") means that we do\n \t# not need to send any ancestors of \"c3\", but we still need to send \"c3\"\n \t# itself.\n \ttest_config -C client fetch.negotiationalgorithm skipping &&\ndiff --git a/t/t5553-set-upstream.sh b/t/t5553-set-upstream.sh\nindex e78a21881f..b1d614ce18 100755\n--- a/t/t5553-set-upstream.sh\n+++ b/t/t5553-set-upstream.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='\"git fetch/pull --set-upstream\" basic tests.'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -35,9 +35,9 @@ test_expect_success 'setup bare parent fetch' '\n \tgit remote add upstream parent\n '\n \n-test_expect_success 'setup commit on master and other fetch' '\n+test_expect_success 'setup commit on main and other fetch' '\n \ttest_commit one &&\n-\tgit push upstream master &&\n+\tgit push upstream main &&\n \tgit checkout -b other &&\n \ttest_commit two &&\n \tgit push upstream other\n@@ -46,38 +46,38 @@ test_expect_success 'setup commit on master and other fetch' '\n # tests for fetch --set-upstream\n \n test_expect_success 'fetch --set-upstream does not set upstream w/o branch' '\n-\tclear_config master other &&\n-\tgit checkout master &&\n+\tclear_config main other &&\n+\tgit checkout main &&\n \tgit fetch --set-upstream upstream &&\n-\tcheck_config_missing master &&\n+\tcheck_config_missing main &&\n \tcheck_config_missing other\n '\n \n-test_expect_success 'fetch --set-upstream upstream master sets branch master but not other' '\n-\tclear_config master other &&\n-\tgit fetch --set-upstream upstream master &&\n-\tcheck_config master upstream refs/heads/master &&\n+test_expect_success 'fetch --set-upstream upstream main sets branch main but not other' '\n+\tclear_config main other &&\n+\tgit fetch --set-upstream upstream main &&\n+\tcheck_config main upstream refs/heads/main &&\n \tcheck_config_missing other\n '\n \n test_expect_success 'fetch --set-upstream upstream other sets branch other' '\n-\tclear_config master other &&\n+\tclear_config main other &&\n \tgit fetch --set-upstream upstream other &&\n-\tcheck_config master upstream refs/heads/other &&\n+\tcheck_config main upstream refs/heads/other &&\n \tcheck_config_missing other\n '\n \n-test_expect_success 'fetch --set-upstream master:other does not set the branch other2' '\n+test_expect_success 'fetch --set-upstream main:other does not set the branch other2' '\n \tclear_config other2 &&\n-\tgit fetch --set-upstream upstream master:other2 &&\n+\tgit fetch --set-upstream upstream main:other2 &&\n \tcheck_config_missing other2\n '\n \n test_expect_success 'fetch --set-upstream http://nosuchdomain.example.com fails with invalid url' '\n-\t# master explicitly not cleared, we check that it is not touched from previous value\n+\t# main explicitly not cleared, we check that it is not touched from previous value\n \tclear_config other other2 &&\n \ttest_must_fail git fetch --set-upstream http://nosuchdomain.example.com &&\n-\tcheck_config master upstream refs/heads/other &&\n+\tcheck_config main upstream refs/heads/other &&\n \tcheck_config_missing other &&\n \tcheck_config_missing other2\n '\n@@ -86,7 +86,7 @@ test_expect_success 'fetch --set-upstream with valid URL sets upstream to URL' '\n \tclear_config other other2 &&\n \turl=\"file://$PWD\" &&\n \tgit fetch --set-upstream \"$url\" &&\n-\tcheck_config master \"$url\" HEAD &&\n+\tcheck_config main \"$url\" HEAD &&\n \tcheck_config_missing other &&\n \tcheck_config_missing other2\n '\n@@ -99,30 +99,30 @@ test_expect_success 'setup bare parent pull' '\n \tgit remote add upstream parent\n '\n \n-test_expect_success 'setup commit on master and other pull' '\n+test_expect_success 'setup commit on main and other pull' '\n \ttest_commit three &&\n-\tgit push --tags upstream master &&\n+\tgit push --tags upstream main &&\n \ttest_commit four &&\n \tgit push upstream other\n '\n \n-test_expect_success 'pull --set-upstream upstream master sets branch master but not other' '\n-\tclear_config master other &&\n-\tgit pull --set-upstream upstream master &&\n-\tcheck_config master upstream refs/heads/master &&\n+test_expect_success 'pull --set-upstream upstream main sets branch main but not other' '\n+\tclear_config main other &&\n+\tgit pull --set-upstream upstream main &&\n+\tcheck_config main upstream refs/heads/main &&\n \tcheck_config_missing other\n '\n \n-test_expect_success 'pull --set-upstream master:other2 does not set the branch other2' '\n+test_expect_success 'pull --set-upstream main:other2 does not set the branch other2' '\n \tclear_config other2 &&\n-\tgit pull --set-upstream upstream master:other2 &&\n+\tgit pull --set-upstream upstream main:other2 &&\n \tcheck_config_missing other2\n '\n \n-test_expect_success 'pull --set-upstream upstream other sets branch master' '\n-\tclear_config master other &&\n+test_expect_success 'pull --set-upstream upstream other sets branch main' '\n+\tclear_config main other &&\n \tgit pull --set-upstream upstream other &&\n-\tcheck_config master upstream refs/heads/other &&\n+\tcheck_config main upstream refs/heads/other &&\n \tcheck_config_missing other\n '\n \n@@ -133,47 +133,47 @@ test_expect_success 'pull --set-upstream upstream tag does not set the tag' '\n '\n \n test_expect_success 'pull --set-upstream http://nosuchdomain.example.com fails with invalid url' '\n-\t# master explicitly not cleared, we check that it is not touched from previous value\n+\t# main explicitly not cleared, we check that it is not touched from previous value\n \tclear_config other other2 three &&\n \ttest_must_fail git pull --set-upstream http://nosuchdomain.example.com &&\n-\tcheck_config master upstream refs/heads/other &&\n+\tcheck_config main upstream refs/heads/other &&\n \tcheck_config_missing other &&\n \tcheck_config_missing other2 &&\n \tcheck_config_missing three\n '\n \n test_expect_success 'pull --set-upstream upstream HEAD sets branch HEAD' '\n-\tclear_config master other &&\n+\tclear_config main other &&\n \tgit pull --set-upstream upstream HEAD &&\n-\tcheck_config master upstream HEAD &&\n+\tcheck_config main upstream HEAD &&\n \tgit checkout other &&\n \tgit pull --set-upstream upstream HEAD &&\n \tcheck_config other upstream HEAD\n '\n \n test_expect_success 'pull --set-upstream upstream with more than one branch does nothing' '\n-\tclear_config master three &&\n-\tgit pull --set-upstream upstream master three &&\n-\tcheck_config_missing master &&\n+\tclear_config main three &&\n+\tgit pull --set-upstream upstream main three &&\n+\tcheck_config_missing main &&\n \tcheck_config_missing three\n '\n \n test_expect_success 'pull --set-upstream with valid URL sets upstream to URL' '\n-\tclear_config master other other2 &&\n-\tgit checkout master &&\n+\tclear_config main other other2 &&\n+\tgit checkout main &&\n \turl=\"file://$PWD\" &&\n \tgit pull --set-upstream \"$url\" &&\n-\tcheck_config master \"$url\" HEAD &&\n+\tcheck_config main \"$url\" HEAD &&\n \tcheck_config_missing other &&\n \tcheck_config_missing other2\n '\n \n test_expect_success 'pull --set-upstream with valid URL and branch sets branch' '\n-\tclear_config master other other2 &&\n-\tgit checkout master &&\n+\tclear_config main other other2 &&\n+\tgit checkout main &&\n \turl=\"file://$PWD\" &&\n-\tgit pull --set-upstream \"$url\" master &&\n-\tcheck_config master \"$url\" refs/heads/master &&\n+\tgit pull --set-upstream \"$url\" main &&\n+\tcheck_config main \"$url\" refs/heads/main &&\n \tcheck_config_missing other &&\n \tcheck_config_missing other2\n '\ndiff --git a/t/t5560-http-backend-noserver.sh b/t/t5560-http-backend-noserver.sh\nindex 5561b7d012..d30cf4f5b8 100755\n--- a/t/t5560-http-backend-noserver.sh\n+++ b/t/t5560-http-backend-noserver.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='test git-http-backend-noserver'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\ndiff --git a/t/t5561-http-backend.sh b/t/t5561-http-backend.sh\nindex cba2dffdb0..9c57d84315 100755\n--- a/t/t5561-http-backend.sh\n+++ b/t/t5561-http-backend.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='test git-http-backend'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -42,9 +42,9 @@ POST() {\n \n grep '^[^#]' >exp <<EOF\n \n-###  refs/heads/master\n+###  refs/heads/main\n ###\n-GET  /smart/repo.git/refs/heads/master HTTP/1.1 404 -\n+GET  /smart/repo.git/refs/heads/main HTTP/1.1 404 -\n \n ###  getanyfile default\n ###\ndiff --git a/t/t556x_common b/t/t556x_common\nindex 359fcfe32b..670fb89477 100755\n--- a/t/t556x_common\n+++ b/t/t556x_common\n@@ -22,7 +22,7 @@ test_expect_success 'setup repository' '\n \t : >objects/info/http-alternates\n \t) &&\n \tgit remote add public \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit push public master:master &&\n+\tgit push public main:main &&\n \n \t(cd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n \t git repack -a -d\n@@ -31,7 +31,7 @@ test_expect_success 'setup repository' '\n \techo other >file &&\n \tgit add file &&\n \tgit commit -m two &&\n-\tgit push public master:master &&\n+\tgit push public main:main &&\n \n \tLOOSE_URL=$(find_file objects/??) &&\n \tPACK_URL=$(find_file objects/pack/*.pack) &&\n@@ -51,8 +51,8 @@ get_static_files() {\n \n SMART=smart\n GIT_HTTP_EXPORT_ALL=1 && export GIT_HTTP_EXPORT_ALL\n-test_expect_success 'direct refs/heads/master not found' '\n-\tGET refs/heads/master \"404 Not Found\"\n+test_expect_success 'direct refs/heads/main not found' '\n+\tGET refs/heads/main \"404 Not Found\"\n '\n test_expect_success 'static file is ok' '\n \tget_static_files \"200 OK\"\ndiff --git a/t/t5570-git-daemon.sh b/t/t5570-git-daemon.sh\nindex 2e99a331c5..3332a0c595 100755\n--- a/t/t5570-git-daemon.sh\n+++ b/t/t5570-git-daemon.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='test fetching over git protocol'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -29,7 +29,7 @@ test_expect_success 'create git-accessible bare repository' '\n \t : >git-daemon-export-ok\n \t) &&\n \tgit remote add public \"$GIT_DAEMON_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit push public master:master\n+\tgit push public main:main\n '\n \n test_expect_success 'clone git repository' '\n@@ -58,12 +58,12 @@ test_expect_success 'no-op fetch without \"-v\" is quiet' '\n '\n \n test_expect_success 'remote detects correct HEAD' '\n-\tgit push public master:other &&\n+\tgit push public main:other &&\n \t(cd clone &&\n \t git remote set-head -d origin &&\n \t git remote set-head -a origin &&\n \t git symbolic-ref refs/remotes/origin/HEAD > output &&\n-\t echo refs/remotes/origin/master > expect &&\n+\t echo refs/remotes/origin/main > expect &&\n \t test_cmp expect output\n \t)\n '\n@@ -151,7 +151,7 @@ test_remote_error()\n \n msg=\"access denied or repository not exported\"\n test_expect_success 'clone non-existent' \"test_remote_error    '$msg' clone nowhere.git\"\n-test_expect_success 'push disabled'      \"test_remote_error    '$msg' push  repo.git master\"\n+test_expect_success 'push disabled'      \"test_remote_error    '$msg' push  repo.git main\"\n test_expect_success 'read access denied' \"test_remote_error -x '$msg' fetch repo.git\"\n test_expect_success 'not exported'       \"test_remote_error -n '$msg' fetch repo.git\"\n \n@@ -159,7 +159,7 @@ stop_git_daemon\n start_git_daemon --informative-errors\n \n test_expect_success 'clone non-existent' \"test_remote_error    'no such repository'      clone nowhere.git\"\n-test_expect_success 'push disabled'      \"test_remote_error    'service not enabled'     push  repo.git master\"\n+test_expect_success 'push disabled'      \"test_remote_error    'service not enabled'     push  repo.git main\"\n test_expect_success 'read access denied' \"test_remote_error -x 'no such repository'      fetch repo.git\"\n test_expect_success 'not exported'       \"test_remote_error -n 'repository not exported' fetch repo.git\"\n \n@@ -195,10 +195,10 @@ test_expect_success FAKENC 'hostname interpolation works after LF-stripping' '\n \tfake_nc \"$GIT_DAEMON_HOST_PORT\" <input >output &&\n \tdepacketize <output >output.raw &&\n \n-\t# just pick out the value of master, which avoids any protocol\n+\t# just pick out the value of main, which avoids any protocol\n \t# particulars\n-\tperl -lne \"print \\$1 if m{^(\\\\S+) refs/heads/master}\" <output.raw >actual &&\n-\tgit -C \"$repo\" rev-parse master >expect &&\n+\tperl -lne \"print \\$1 if m{^(\\\\S+) refs/heads/main}\" <output.raw >actual &&\n+\tgit -C \"$repo\" rev-parse main >expect &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t5571-pre-push-hook.sh b/t/t5571-pre-push-hook.sh\nindex 971ed3da4b..ad8d5804f7 100755\n--- a/t/t5571-pre-push-hook.sh\n+++ b/t/t5571-pre-push-hook.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='check pre-push hooks'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -51,11 +51,11 @@ EOF\n cat >expected <<EOF\n parent1\n repo1\n-refs/heads/master $COMMIT2 refs/heads/foreign $COMMIT1\n+refs/heads/main $COMMIT2 refs/heads/foreign $COMMIT1\n EOF\n \n test_expect_success 'push with hook' '\n-\tgit push parent1 master:foreign &&\n+\tgit push parent1 main:foreign &&\n \tdiff expected actual\n '\n \ndiff --git a/t/t5572-pull-submodule.sh b/t/t5572-pull-submodule.sh\nindex 1d75e3b12b..d6a75964d8 100755\n--- a/t/t5572-pull-submodule.sh\n+++ b/t/t5572-pull-submodule.sh\n@@ -148,8 +148,8 @@ test_expect_success 'branch has no merge base with remote-tracking counterpart'\n \n \tgit clone parent child &&\n \n-\t# Reset master so that it has no merge base with\n-\t# refs/remotes/origin/master.\n+\t# Reset main so that it has no merge base with\n+\t# refs/remotes/origin/main.\n \tOTHER=$(git -C child commit-tree -m bar \\\n \t\t$(git -C child rev-parse HEAD^{tree})) &&\n \tgit -C child reset --hard \"$OTHER\" &&\ndiff --git a/t/t5580-unc-paths.sh b/t/t5580-unc-paths.sh\nindex da4c94cce1..cd803ae8bf 100755\n--- a/t/t5580-unc-paths.sh\n+++ b/t/t5580-unc-paths.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='various Windows-only path tests'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -56,7 +56,7 @@ test_expect_success fetch '\n \tgit init to-fetch &&\n \t(\n \t\tcd to-fetch &&\n-\t\tgit fetch \"$UNCPATH\" master\n+\t\tgit fetch \"$UNCPATH\" main\n \t)\n '\n \ndiff --git a/t/t5581-http-curl-verbose.sh b/t/t5581-http-curl-verbose.sh\nindex 907bb062d6..cded79c16b 100755\n--- a/t/t5581-http-curl-verbose.sh\n+++ b/t/t5581-http-curl-verbose.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='test GIT_CURL_VERBOSE'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -16,7 +16,7 @@ test_expect_success 'setup repository' '\n \tgit add file &&\n \tgit commit -m one &&\n \tgit remote add public \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit push public master:master\n+\tgit push public main:main\n '\n \n test_expect_success 'failure in git-upload-pack is shown' '\ndiff --git a/t/t5582-fetch-negative-refspec.sh b/t/t5582-fetch-negative-refspec.sh\nindex 608e9aa189..6af143c140 100755\n--- a/t/t5582-fetch-negative-refspec.sh\n+++ b/t/t5582-fetch-negative-refspec.sh\n@@ -5,7 +5,7 @@ test_description='\"git fetch\" with negative refspecs.\n \n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -25,12 +25,12 @@ test_expect_success \"clone and setup child repos\" '\n \t\tgit switch -c alternate &&\n \t\techo >file updated again by one &&\n \t\tgit commit -a -m \"updated by one again\" &&\n-\t\tgit switch master\n+\t\tgit switch main\n \t) &&\n \tgit clone . two &&\n \t(\n \t\tcd two &&\n-\t\tgit config branch.master.remote one &&\n+\t\tgit config branch.main.remote one &&\n \t\tgit config remote.one.url ../one/.git/ &&\n \t\tgit config remote.one.fetch +refs/heads/*:refs/remotes/one/* &&\n \t\tgit config --add remote.one.fetch ^refs/heads/alternate\n@@ -46,9 +46,9 @@ test_expect_success \"fetch one\" '\n \t\ttest_must_fail git rev-parse --verify refs/remotes/one/alternate &&\n \t\tgit fetch one &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/one/alternate &&\n-\t\tgit rev-parse --verify refs/remotes/one/master &&\n-\t\tmine=$(git rev-parse refs/remotes/one/master) &&\n-\t\this=$(cd ../one && git rev-parse refs/heads/master) &&\n+\t\tgit rev-parse --verify refs/remotes/one/main &&\n+\t\tmine=$(git rev-parse refs/remotes/one/main) &&\n+\t\this=$(cd ../one && git rev-parse refs/heads/main) &&\n \t\ttest \"z$mine\" = \"z$his\"\n \t)\n '\n@@ -60,7 +60,7 @@ test_expect_success \"fetch with negative refspec on commandline\" '\n \t\tcd three &&\n \t\talternate_in_one=$(cd ../one && git rev-parse refs/heads/alternate) &&\n \t\techo $alternate_in_one >expect &&\n-\t\tgit fetch ../one/.git refs/heads/*:refs/remotes/one/* ^refs/heads/master &&\n+\t\tgit fetch ../one/.git refs/heads/*:refs/remotes/one/* ^refs/heads/main &&\n \t\tcut -f -1 .git/FETCH_HEAD >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -71,8 +71,8 @@ test_expect_success \"fetch with negative sha1 refspec fails\" '\n \tgit commit -a -m \"updated by origin yet again\" &&\n \t(\n \t\tcd three &&\n-\t\tmaster_in_one=$(cd ../one && git rev-parse refs/heads/master) &&\n-\t\ttest_must_fail git fetch ../one/.git refs/heads/*:refs/remotes/one/* ^$master_in_one\n+\t\tmain_in_one=$(cd ../one && git rev-parse refs/heads/main) &&\n+\t\ttest_must_fail git fetch ../one/.git refs/heads/*:refs/remotes/one/* ^$main_in_one\n \t)\n '\n \n@@ -95,10 +95,10 @@ test_expect_success \"fetch with negative pattern refspec does not expand prefix\"\n \t(\n \t\tcd three &&\n \t\talternate_in_one=$(cd ../one && git rev-parse refs/heads/alternate) &&\n-\t\tmaster_in_one=$(cd ../one && git rev-parse refs/heads/master) &&\n+\t\tmain_in_one=$(cd ../one && git rev-parse refs/heads/main) &&\n \t\techo $alternate_in_one >expect &&\n-\t\techo $master_in_one >>expect &&\n-\t\tgit fetch ../one/.git refs/heads/*:refs/remotes/one/* ^master &&\n+\t\techo $main_in_one >>expect &&\n+\t\tgit fetch ../one/.git refs/heads/*:refs/remotes/one/* ^main &&\n \t\tcut -f -1 .git/FETCH_HEAD >actual &&\n \t\ttest_cmp expect actual\n \t)\n-- \ngitgitgadget\n\n"},{"id":"410291","messageId":"090ac6e9a15afa5d76c37e7b9c93a01e6933146c.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 05/28] t3[0-3]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:23Z","receivedAt":"2020-11-18T23:45:20Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t3040, which sees independent development elsewhere\nat the time of writing, we transition above-mentioned tests to the\ndefault branch name `main`. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t3[0-3]*.sh t3206/* &&\n\t   git checkout HEAD -- t3040\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3200-branch.sh                     | 244 +++++++++++++-------------\n t/t3201-branch-contains.sh            |  82 ++++-----\n t/t3202-show-branch-octopus.sh        |   4 +-\n t/t3203-branch-output.sh              |  40 ++---\n t/t3204-branch-name-interpretation.sh |   8 +-\n t/t3205-branch-color.sh               |   8 +-\n t/t3206-range-diff.sh                 |  42 ++---\n t/t3206/history.export                |   2 +-\n t/t3210-pack-refs.sh                  |   6 +-\n t/t3211-peel-ref.sh                   |   6 +-\n t/t3301-notes.sh                      |   6 +-\n t/t3302-notes-index-expensive.sh      |   4 +-\n t/t3303-notes-subtrees.sh             |  10 +-\n t/t3304-notes-mixed.sh                |  10 +-\n t/t3308-notes-merge.sh                |   2 +-\n t/t3320-notes-merge-worktrees.sh      |   6 +-\n 16 files changed, 240 insertions(+), 240 deletions(-)\n\ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex 04b568cf21..56517dd9c3 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -5,7 +5,7 @@\n \n test_description='git branch assorted tests'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -31,7 +31,7 @@ test_expect_success 'branch -h in broken repository' '\n \t(\n \t\tcd broken &&\n \t\tgit init &&\n-\t\t>.git/refs/heads/master &&\n+\t\t>.git/refs/heads/main &&\n \t\ttest_expect_code 129 git branch -h >usage 2>&1\n \t) &&\n \ttest_i18ngrep \"[Uu]sage\" broken/usage\n@@ -45,8 +45,8 @@ test_expect_success 'git branch a/b/c should create a branch' '\n \tgit branch a/b/c && test_path_is_file .git/refs/heads/a/b/c\n '\n \n-test_expect_success 'git branch mb master... should create a branch' '\n-\tgit branch mb master... && test_path_is_file .git/refs/heads/mb\n+test_expect_success 'git branch mb main... should create a branch' '\n+\tgit branch mb main... && test_path_is_file .git/refs/heads/mb\n '\n \n test_expect_success 'git branch HEAD should fail' '\n@@ -54,7 +54,7 @@ test_expect_success 'git branch HEAD should fail' '\n '\n \n cat >expect <<EOF\n-$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tbranch: Created from master\n+$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tbranch: Created from main\n EOF\n test_expect_success 'git branch --create-reflog d/e/f should create a branch and a log' '\n \tGIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n@@ -113,7 +113,7 @@ test_expect_success 'git branch -m n/n n should work' '\n \n test_expect_success 'git branch -m bbb should rename checked out branch' '\n \ttest_when_finished git branch -D bbb &&\n-\ttest_when_finished git checkout master &&\n+\ttest_when_finished git checkout main &&\n \tgit checkout -b aaa &&\n \tgit commit --allow-empty -m \"a new commit\" &&\n \tgit rev-parse aaa@{0} >expect &&\n@@ -127,7 +127,7 @@ test_expect_success 'git branch -m bbb should rename checked out branch' '\n \n test_expect_success 'renaming checked out branch works with d/f conflict' '\n \ttest_when_finished \"git branch -D foo/bar || git branch -D foo\" &&\n-\ttest_when_finished git checkout master &&\n+\ttest_when_finished git checkout main &&\n \tgit checkout -b foo &&\n \tgit branch -m foo/bar &&\n \tgit symbolic-ref HEAD >actual &&\n@@ -188,7 +188,7 @@ test_expect_success 'git branch -M should leave orphaned HEAD alone' '\n \t\tgit checkout --orphan lonely &&\n \t\tgrep lonely .git/HEAD &&\n \t\ttest_path_is_missing .git/refs/head/lonely &&\n-\t\tgit branch -M master mistress &&\n+\t\tgit branch -M main mistress &&\n \t\tgrep lonely .git/HEAD\n \t)\n '\n@@ -204,7 +204,7 @@ test_expect_success 'resulting reflog can be shown by log -g' '\n '\n \n test_expect_success 'git branch -M baz bam should succeed when baz is checked out as linked working tree' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit worktree add -b baz bazdir &&\n \tgit worktree add -f bazdir2 baz &&\n \tgit branch -M baz bam &&\n@@ -227,18 +227,18 @@ test_expect_success 'git branch -M baz bam should succeed within a worktree in w\n \tgit worktree prune\n '\n \n-test_expect_success 'git branch -M master should work when master is checked out' '\n-\tgit checkout master &&\n-\tgit branch -M master\n+test_expect_success 'git branch -M main should work when main is checked out' '\n+\tgit checkout main &&\n+\tgit branch -M main\n '\n \n-test_expect_success 'git branch -M master master should work when master is checked out' '\n-\tgit checkout master &&\n-\tgit branch -M master master\n+test_expect_success 'git branch -M main main should work when main is checked out' '\n+\tgit checkout main &&\n+\tgit branch -M main main\n '\n \n-test_expect_success 'git branch -M topic topic should work when master is checked out' '\n-\tgit checkout master &&\n+test_expect_success 'git branch -M topic topic should work when main is checked out' '\n+\tgit checkout main &&\n \tgit branch topic &&\n \tgit branch -M topic topic\n '\n@@ -295,8 +295,8 @@ test_expect_success 'bare main worktree has HEAD at branch deleted by secondary\n \tgit init nonbare &&\n \ttest_commit -C nonbare x &&\n \tgit clone --bare nonbare bare &&\n-\tgit -C bare worktree add --detach ../secondary master &&\n-\tgit -C secondary branch -D master\n+\tgit -C bare worktree add --detach ../secondary main &&\n+\tgit -C secondary branch -D main\n '\n \n test_expect_success 'git branch --list -v with --abbrev' '\n@@ -348,7 +348,7 @@ test_expect_success 'git branch --column with an extremely long branch name' '\n   j/k\n   l\n   m/m\n-* master\n+* main\n   mb\n   n\n   o/o\n@@ -391,7 +391,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch -v with column.ui ignore\n   j/k\n   l\n   m/m\n-* master\n+* main\n   mb\n   n\n   o/o\n@@ -430,8 +430,8 @@ test_expect_success 'config information was renamed, too' '\n '\n \n test_expect_success 'git branch -m correctly renames multiple config sections' '\n-\ttest_when_finished \"git checkout master\" &&\n-\tgit checkout -b source master &&\n+\ttest_when_finished \"git checkout main\" &&\n+\tgit checkout -b source main &&\n \n \t# Assert that a config file with multiple config sections has\n \t# those sections preserved...\n@@ -590,18 +590,18 @@ test_expect_success 'git branch -C c1 c2 should never touch HEAD' '\n \t! grep \"$msg$\" .git/logs/HEAD\n '\n \n-test_expect_success 'git branch -C master should work when master is checked out' '\n-\tgit checkout master &&\n-\tgit branch -C master\n+test_expect_success 'git branch -C main should work when main is checked out' '\n+\tgit checkout main &&\n+\tgit branch -C main\n '\n \n-test_expect_success 'git branch -C master master should work when master is checked out' '\n-\tgit checkout master &&\n-\tgit branch -C master master\n+test_expect_success 'git branch -C main main should work when main is checked out' '\n+\tgit checkout main &&\n+\tgit branch -C main main\n '\n \n-test_expect_success 'git branch -C main5 main5 should work when master is checked out' '\n-\tgit checkout master &&\n+test_expect_success 'git branch -C main5 main5 should work when main is checked out' '\n+\tgit checkout main &&\n \tgit branch main5 &&\n \tgit branch -C main5 main5\n '\n@@ -623,8 +623,8 @@ test_expect_success 'git branch -C ab cd should overwrite existing config for cd\n test_expect_success 'git branch -c correctly copies multiple config sections' '\n \tFOO=1 &&\n \texport FOO &&\n-\ttest_when_finished \"git checkout master\" &&\n-\tgit checkout -b source2 master &&\n+\ttest_when_finished \"git checkout main\" &&\n+\tgit checkout -b source2 main &&\n \n \t# Assert that a config file with multiple config sections has\n \t# those sections preserved...\n@@ -714,10 +714,10 @@ test_expect_success 'deleting a self-referential symref' '\n '\n \n test_expect_success 'renaming a symref is not allowed' '\n-\tgit symbolic-ref refs/heads/topic refs/heads/master &&\n+\tgit symbolic-ref refs/heads/topic refs/heads/main &&\n \ttest_must_fail git branch -m topic new-topic &&\n \tgit symbolic-ref refs/heads/topic &&\n-\ttest_path_is_file .git/refs/heads/master &&\n+\ttest_path_is_file .git/refs/heads/main &&\n \ttest_path_is_missing .git/refs/heads/new-topic\n '\n \n@@ -731,27 +731,27 @@ test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for\n test_expect_success 'test tracking setup via --track' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track my1 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track my1 local/main &&\n \ttest $(git config branch.my1.remote) = local &&\n-\ttest $(git config branch.my1.merge) = refs/heads/master\n+\ttest $(git config branch.my1.merge) = refs/heads/main\n '\n \n test_expect_success 'test tracking setup (non-wildcard, matching)' '\n \tgit config remote.local.url . &&\n-\tgit config remote.local.fetch refs/heads/master:refs/remotes/local/master &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track my4 local/master &&\n+\tgit config remote.local.fetch refs/heads/main:refs/remotes/local/main &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track my4 local/main &&\n \ttest $(git config branch.my4.remote) = local &&\n-\ttest $(git config branch.my4.merge) = refs/heads/master\n+\ttest $(git config branch.my4.merge) = refs/heads/main\n '\n \n test_expect_success 'tracking setup fails on non-matching refspec' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit config remote.local.fetch refs/heads/s:refs/remotes/local/s &&\n-\ttest_must_fail git branch --track my5 local/master &&\n+\ttest_must_fail git branch --track my5 local/main &&\n \ttest_must_fail git config branch.my5.remote &&\n \ttest_must_fail git config branch.my5.merge\n '\n@@ -760,21 +760,21 @@ test_expect_success 'test tracking setup via config' '\n \tgit config branch.autosetupmerge true &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch my3 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch my3 local/main &&\n \ttest $(git config branch.my3.remote) = local &&\n-\ttest $(git config branch.my3.merge) = refs/heads/master\n+\ttest $(git config branch.my3.merge) = refs/heads/main\n '\n \n test_expect_success 'test overriding tracking setup via --no-track' '\n \tgit config branch.autosetupmerge true &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track my2 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track my2 local/main &&\n \tgit config branch.autosetupmerge false &&\n \t! test \"$(git config branch.my2.remote)\" = local &&\n-\t! test \"$(git config branch.my2.merge)\" = refs/heads/master\n+\t! test \"$(git config branch.my2.merge)\" = refs/heads/main\n '\n \n test_expect_success 'no tracking without .fetch entries' '\n@@ -839,26 +839,26 @@ test_expect_success 'branch from tag w/--track causes failure' '\n \n test_expect_success '--set-upstream-to fails on multiple branches' '\n \techo \"fatal: too many arguments to set new upstream\" >expect &&\n-\ttest_must_fail git branch --set-upstream-to master a b c 2>err &&\n+\ttest_must_fail git branch --set-upstream-to main a b c 2>err &&\n \ttest_i18ncmp expect err\n '\n \n test_expect_success '--set-upstream-to fails on detached HEAD' '\n \tgit checkout HEAD^{} &&\n \ttest_when_finished git checkout - &&\n-\techo \"fatal: could not set upstream of HEAD to master when it does not point to any branch.\" >expect &&\n-\ttest_must_fail git branch --set-upstream-to master 2>err &&\n+\techo \"fatal: could not set upstream of HEAD to main when it does not point to any branch.\" >expect &&\n+\ttest_must_fail git branch --set-upstream-to main 2>err &&\n \ttest_i18ncmp expect err\n '\n \n test_expect_success '--set-upstream-to fails on a missing dst branch' '\n \techo \"fatal: branch '\"'\"'does-not-exist'\"'\"' does not exist\" >expect &&\n-\ttest_must_fail git branch --set-upstream-to master does-not-exist 2>err &&\n+\ttest_must_fail git branch --set-upstream-to main does-not-exist 2>err &&\n \ttest_i18ncmp expect err\n '\n \n test_expect_success '--set-upstream-to fails on a missing src branch' '\n-\ttest_must_fail git branch --set-upstream-to does-not-exist master 2>err &&\n+\ttest_must_fail git branch --set-upstream-to does-not-exist main 2>err &&\n \ttest_i18ngrep \"the requested upstream branch '\"'\"'does-not-exist'\"'\"' does not exist\" err\n '\n \n@@ -877,20 +877,20 @@ test_expect_success '--set-upstream-to fails on locked config' '\n '\n \n test_expect_success 'use --set-upstream-to modify HEAD' '\n-\ttest_config branch.master.remote foo &&\n-\ttest_config branch.master.merge foo &&\n+\ttest_config branch.main.remote foo &&\n+\ttest_config branch.main.merge foo &&\n \tgit branch my12 &&\n \tgit branch --set-upstream-to my12 &&\n-\ttest \"$(git config branch.master.remote)\" = \".\" &&\n-\ttest \"$(git config branch.master.merge)\" = \"refs/heads/my12\"\n+\ttest \"$(git config branch.main.remote)\" = \".\" &&\n+\ttest \"$(git config branch.main.merge)\" = \"refs/heads/my12\"\n '\n \n test_expect_success 'use --set-upstream-to modify a particular branch' '\n \tgit branch my13 &&\n-\tgit branch --set-upstream-to master my13 &&\n+\tgit branch --set-upstream-to main my13 &&\n \ttest_when_finished \"git branch --unset-upstream my13\" &&\n \ttest \"$(git config branch.my13.remote)\" = \".\" &&\n-\ttest \"$(git config branch.my13.merge)\" = \"refs/heads/master\"\n+\ttest \"$(git config branch.my13.merge)\" = \"refs/heads/main\"\n '\n \n test_expect_success '--unset-upstream should fail if given a non-existent branch' '\n@@ -909,14 +909,14 @@ test_expect_success '--unset-upstream should fail if config is locked' '\n \n test_expect_success 'test --unset-upstream on HEAD' '\n \tgit branch my14 &&\n-\ttest_config branch.master.remote foo &&\n-\ttest_config branch.master.merge foo &&\n+\ttest_config branch.main.remote foo &&\n+\ttest_config branch.main.merge foo &&\n \tgit branch --set-upstream-to my14 &&\n \tgit branch --unset-upstream &&\n-\ttest_must_fail git config branch.master.remote &&\n-\ttest_must_fail git config branch.master.merge &&\n+\ttest_must_fail git config branch.main.remote &&\n+\ttest_must_fail git config branch.main.merge &&\n \t# fail for a branch without upstream set\n-\techo \"fatal: Branch '\"'\"'master'\"'\"' has no upstream information\" >expect &&\n+\techo \"fatal: Branch '\"'\"'main'\"'\"' has no upstream information\" >expect &&\n \ttest_must_fail git branch --unset-upstream 2>err &&\n \ttest_i18ncmp expect err\n '\n@@ -937,14 +937,14 @@ test_expect_success '--unset-upstream should fail on detached HEAD' '\n \n test_expect_success 'test --unset-upstream on a particular branch' '\n \tgit branch my15 &&\n-\tgit branch --set-upstream-to master my14 &&\n+\tgit branch --set-upstream-to main my14 &&\n \tgit branch --unset-upstream my14 &&\n \ttest_must_fail git config branch.my14.remote &&\n \ttest_must_fail git config branch.my14.merge\n '\n \n test_expect_success 'disabled option --set-upstream fails' '\n-\ttest_must_fail git branch --set-upstream origin/master\n+\ttest_must_fail git branch --set-upstream origin/main\n '\n \n test_expect_success '--set-upstream-to notices an error to set branch as own upstream' '\n@@ -959,32 +959,32 @@ test_expect_success '--set-upstream-to notices an error to set branch as own ups\n \n # Keep this test last, as it changes the current branch\n cat >expect <<EOF\n-$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tbranch: Created from master\n+$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tbranch: Created from main\n EOF\n test_expect_success 'git checkout -b g/h/i -l should create a branch and a log' '\n \tGIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n-\tgit checkout -b g/h/i -l master &&\n+\tgit checkout -b g/h/i -l main &&\n \ttest_path_is_file .git/refs/heads/g/h/i &&\n \ttest_path_is_file .git/logs/refs/heads/g/h/i &&\n \ttest_cmp expect .git/logs/refs/heads/g/h/i\n '\n \n test_expect_success 'checkout -b makes reflog by default' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config --unset core.logAllRefUpdates &&\n \tgit checkout -b alpha &&\n \tgit rev-parse --verify alpha@{0}\n '\n \n test_expect_success 'checkout -b does not make reflog when core.logAllRefUpdates = false' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config core.logAllRefUpdates false &&\n \tgit checkout -b beta &&\n \ttest_must_fail git rev-parse --verify beta@{0}\n '\n \n test_expect_success 'checkout -b with -l makes reflog when core.logAllRefUpdates = false' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -lb gamma &&\n \tgit config --unset core.logAllRefUpdates &&\n \tgit rev-parse --verify gamma@{0}\n@@ -993,10 +993,10 @@ test_expect_success 'checkout -b with -l makes reflog when core.logAllRefUpdates\n test_expect_success 'avoid ambiguous track' '\n \tgit config branch.autosetupmerge true &&\n \tgit config remote.ambi1.url lalala &&\n-\tgit config remote.ambi1.fetch refs/heads/lalala:refs/heads/master &&\n+\tgit config remote.ambi1.fetch refs/heads/lalala:refs/heads/main &&\n \tgit config remote.ambi2.url lilili &&\n-\tgit config remote.ambi2.fetch refs/heads/lilili:refs/heads/master &&\n-\ttest_must_fail git branch all1 master &&\n+\tgit config remote.ambi2.fetch refs/heads/lilili:refs/heads/main &&\n+\ttest_must_fail git branch all1 main &&\n \ttest -z \"$(git config branch.all1.merge)\"\n '\n \n@@ -1052,10 +1052,10 @@ test_expect_success 'autosetuprebase local on a tracked remote branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n \tgit config branch.autosetuprebase local &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track myr5 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track myr5 local/main &&\n \ttest \"$(git config branch.myr5.remote)\" = local &&\n-\ttest \"$(git config branch.myr5.merge)\" = refs/heads/master &&\n+\ttest \"$(git config branch.myr5.merge)\" = refs/heads/main &&\n \t! test \"$(git config branch.myr5.rebase)\" = true\n '\n \n@@ -1063,10 +1063,10 @@ test_expect_success 'autosetuprebase never on a tracked remote branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n \tgit config branch.autosetuprebase never &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track myr6 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track myr6 local/main &&\n \ttest \"$(git config branch.myr6.remote)\" = local &&\n-\ttest \"$(git config branch.myr6.merge)\" = refs/heads/master &&\n+\ttest \"$(git config branch.myr6.merge)\" = refs/heads/main &&\n \t! test \"$(git config branch.myr6.rebase)\" = true\n '\n \n@@ -1074,10 +1074,10 @@ test_expect_success 'autosetuprebase remote on a tracked remote branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n \tgit config branch.autosetuprebase remote &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track myr7 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track myr7 local/main &&\n \ttest \"$(git config branch.myr7.remote)\" = local &&\n-\ttest \"$(git config branch.myr7.merge)\" = refs/heads/master &&\n+\ttest \"$(git config branch.myr7.merge)\" = refs/heads/main &&\n \ttest \"$(git config branch.myr7.rebase)\" = true\n '\n \n@@ -1085,10 +1085,10 @@ test_expect_success 'autosetuprebase always on a tracked remote branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n \tgit config branch.autosetuprebase remote &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track myr8 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track myr8 local/main &&\n \ttest \"$(git config branch.myr8.remote)\" = local &&\n-\ttest \"$(git config branch.myr8.merge)\" = refs/heads/master &&\n+\ttest \"$(git config branch.myr8.merge)\" = refs/heads/main &&\n \ttest \"$(git config branch.myr8.rebase)\" = true\n '\n \n@@ -1096,10 +1096,10 @@ test_expect_success 'autosetuprebase unconfigured on a tracked remote branch' '\n \tgit config --unset branch.autosetuprebase &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --track myr9 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --track myr9 local/main &&\n \ttest \"$(git config branch.myr9.remote)\" = local &&\n-\ttest \"$(git config branch.myr9.merge)\" = refs/heads/master &&\n+\ttest \"$(git config branch.myr9.merge)\" = refs/heads/main &&\n \ttest \"z$(git config branch.myr9.rebase)\" = z\n '\n \n@@ -1117,7 +1117,7 @@ test_expect_success 'autosetuprebase unconfigured on a tracked local branch' '\n test_expect_success 'autosetuprebase unconfigured on untracked local branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit branch --no-track myr11 mybase2 &&\n \ttest \"z$(git config branch.myr11.remote)\" = z &&\n \ttest \"z$(git config branch.myr11.merge)\" = z &&\n@@ -1127,8 +1127,8 @@ test_expect_success 'autosetuprebase unconfigured on untracked local branch' '\n test_expect_success 'autosetuprebase unconfigured on untracked remote branch' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track myr12 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track myr12 local/main &&\n \ttest \"z$(git config branch.myr12.remote)\" = z &&\n \ttest \"z$(git config branch.myr12.merge)\" = z &&\n \ttest \"z$(git config branch.myr12.rebase)\" = z\n@@ -1138,7 +1138,7 @@ test_expect_success 'autosetuprebase never on an untracked local branch' '\n \tgit config branch.autosetuprebase never &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit branch --no-track myr13 mybase2 &&\n \ttest \"z$(git config branch.myr13.remote)\" = z &&\n \ttest \"z$(git config branch.myr13.merge)\" = z &&\n@@ -1149,7 +1149,7 @@ test_expect_success 'autosetuprebase local on an untracked local branch' '\n \tgit config branch.autosetuprebase local &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit branch --no-track myr14 mybase2 &&\n \ttest \"z$(git config branch.myr14.remote)\" = z &&\n \ttest \"z$(git config branch.myr14.merge)\" = z &&\n@@ -1160,7 +1160,7 @@ test_expect_success 'autosetuprebase remote on an untracked local branch' '\n \tgit config branch.autosetuprebase remote &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit branch --no-track myr15 mybase2 &&\n \ttest \"z$(git config branch.myr15.remote)\" = z &&\n \ttest \"z$(git config branch.myr15.merge)\" = z &&\n@@ -1171,7 +1171,7 @@ test_expect_success 'autosetuprebase always on an untracked local branch' '\n \tgit config branch.autosetuprebase always &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n \tgit branch --no-track myr16 mybase2 &&\n \ttest \"z$(git config branch.myr16.remote)\" = z &&\n \ttest \"z$(git config branch.myr16.merge)\" = z &&\n@@ -1182,8 +1182,8 @@ test_expect_success 'autosetuprebase never on an untracked remote branch' '\n \tgit config branch.autosetuprebase never &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track myr17 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track myr17 local/main &&\n \ttest \"z$(git config branch.myr17.remote)\" = z &&\n \ttest \"z$(git config branch.myr17.merge)\" = z &&\n \ttest \"z$(git config branch.myr17.rebase)\" = z\n@@ -1193,8 +1193,8 @@ test_expect_success 'autosetuprebase local on an untracked remote branch' '\n \tgit config branch.autosetuprebase local &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track myr18 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track myr18 local/main &&\n \ttest \"z$(git config branch.myr18.remote)\" = z &&\n \ttest \"z$(git config branch.myr18.merge)\" = z &&\n \ttest \"z$(git config branch.myr18.rebase)\" = z\n@@ -1204,8 +1204,8 @@ test_expect_success 'autosetuprebase remote on an untracked remote branch' '\n \tgit config branch.autosetuprebase remote &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track myr19 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track myr19 local/main &&\n \ttest \"z$(git config branch.myr19.remote)\" = z &&\n \ttest \"z$(git config branch.myr19.merge)\" = z &&\n \ttest \"z$(git config branch.myr19.rebase)\" = z\n@@ -1215,8 +1215,8 @@ test_expect_success 'autosetuprebase always on an untracked remote branch' '\n \tgit config branch.autosetuprebase always &&\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n-\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n-\tgit branch --no-track myr20 local/master &&\n+\t(git show-ref -q refs/remotes/local/main || git fetch local) &&\n+\tgit branch --no-track myr20 local/main &&\n \ttest \"z$(git config branch.myr20.remote)\" = z &&\n \ttest \"z$(git config branch.myr20.merge)\" = z &&\n \ttest \"z$(git config branch.myr20.rebase)\" = z\n@@ -1224,7 +1224,7 @@ test_expect_success 'autosetuprebase always on an untracked remote branch' '\n \n test_expect_success 'autosetuprebase always on detached HEAD' '\n \tgit config branch.autosetupmerge always &&\n-\ttest_when_finished git checkout master &&\n+\ttest_when_finished git checkout main &&\n \tgit checkout HEAD^0 &&\n \tgit branch my11 &&\n \ttest -z \"$(git config branch.my11.remote)\" &&\n@@ -1252,18 +1252,18 @@ test_expect_success 'attempt to delete a branch without base and unmerged to HEA\n test_expect_success 'attempt to delete a branch merged to its base' '\n \t# we are on my9 which is the initial commit; traditionally\n \t# we would not have allowed deleting my8 that is not merged\n-\t# to my9, but it is set to track master that already has my8\n-\tgit config branch.my8.merge refs/heads/master &&\n+\t# to my9, but it is set to track main that already has my8\n+\tgit config branch.my8.merge refs/heads/main &&\n \tgit branch -d my8\n '\n \n test_expect_success 'attempt to delete a branch merged to its base' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo Third >>A &&\n \tgit commit -m \"Third commit\" A &&\n \tgit branch -t my10 my9 &&\n \tgit branch -f my10 HEAD^ &&\n-\t# we are on master which is at the third commit, and my10\n+\t# we are on main which is at the third commit, and my10\n \t# is behind us, so traditionally we would have allowed deleting\n \t# it; but my10 is set to track my9 that is further behind.\n \ttest_must_fail git branch -d my10\n@@ -1290,7 +1290,7 @@ test_expect_success 'detect typo in branch name when using --edit-description' '\n '\n \n test_expect_success 'refuse --edit-description on unborn branch for now' '\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \twrite_script editor <<-\\EOF &&\n \t\techo \"New contents\" >\"$1\"\n \tEOF\n@@ -1304,18 +1304,18 @@ test_expect_success '--merged catches invalid object names' '\n \n test_expect_success '--list during rebase' '\n \ttest_when_finished \"reset_rebase\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tFAKE_LINES=\"1 edit 2\" &&\n \texport FAKE_LINES &&\n \tset_fake_editor &&\n \tgit rebase -i HEAD~2 &&\n \tgit branch --list >actual &&\n-\ttest_i18ngrep \"rebasing master\" actual\n+\ttest_i18ngrep \"rebasing main\" actual\n '\n \n test_expect_success '--list during rebase from detached HEAD' '\n-\ttest_when_finished \"reset_rebase && git checkout master\" &&\n-\tgit checkout master^0 &&\n+\ttest_when_finished \"reset_rebase && git checkout main\" &&\n+\tgit checkout main^0 &&\n \toid=$(git rev-parse --short HEAD) &&\n \tFAKE_LINES=\"1 edit 2\" &&\n \texport FAKE_LINES &&\n@@ -1351,11 +1351,11 @@ test_expect_success 'tracking with unexpected .fetch refspec' '\n \t\tgit remote add c ../c &&\n \t\tgit config remote.c.fetch \"+refs/remotes/*:refs/remotes/*\" &&\n \t\tgit fetch c &&\n-\t\tgit branch --track local/a/master remotes/a/master &&\n-\t\ttest \"$(git config branch.local/a/master.remote)\" = \"c\" &&\n-\t\ttest \"$(git config branch.local/a/master.merge)\" = \"refs/remotes/a/master\" &&\n+\t\tgit branch --track local/a/main remotes/a/main &&\n+\t\ttest \"$(git config branch.local/a/main.remote)\" = \"c\" &&\n+\t\ttest \"$(git config branch.local/a/main.merge)\" = \"refs/remotes/a/main\" &&\n \t\tgit rev-parse --verify a >expect &&\n-\t\tgit rev-parse --verify local/a/master >actual &&\n+\t\tgit rev-parse --verify local/a/main >actual &&\n \t\ttest_cmp expect actual\n \t)\n '\n@@ -1374,7 +1374,7 @@ test_expect_success 'configured committerdate sort' '\n \t\ttest_commit b &&\n \t\tgit branch >actual &&\n \t\tcat >expect <<-\\EOF &&\n-\t\t  master\n+\t\t  main\n \t\t  a\n \t\t  c\n \t\t* b\n@@ -1392,7 +1392,7 @@ test_expect_success 'option override configured sort' '\n \t\t  a\n \t\t* b\n \t\t  c\n-\t\t  master\n+\t\t  main\n \t\tEOF\n \t\ttest_cmp expect actual\n \t)\ndiff --git a/t/t3201-branch-contains.sh b/t/t3201-branch-contains.sh\nindex 532cdbe9ae..8e626afbb9 100755\n--- a/t/t3201-branch-contains.sh\n+++ b/t/t3201-branch-contains.sh\n@@ -2,7 +2,7 @@\n \n test_description='branch --contains <commit>, --no-contains <commit> --merged, and --no-merged'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -17,47 +17,47 @@ test_expect_success setup '\n \n \techo 1 >file &&\n \ttest_tick &&\n-\tgit commit -a -m \"second on master\" &&\n+\tgit commit -a -m \"second on main\" &&\n \n \tgit checkout side &&\n \techo 1 >file &&\n \ttest_tick &&\n \tgit commit -a -m \"second on side\" &&\n \n-\tgit merge master\n+\tgit merge main\n \n '\n \n-test_expect_success 'branch --contains=master' '\n+test_expect_success 'branch --contains=main' '\n \n-\tgit branch --contains=master >actual &&\n+\tgit branch --contains=main >actual &&\n \t{\n-\t\techo \"  master\" && echo \"* side\"\n+\t\techo \"  main\" && echo \"* side\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n '\n \n-test_expect_success 'branch --contains master' '\n+test_expect_success 'branch --contains main' '\n \n-\tgit branch --contains master >actual &&\n+\tgit branch --contains main >actual &&\n \t{\n-\t\techo \"  master\" && echo \"* side\"\n+\t\techo \"  main\" && echo \"* side\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n '\n \n-test_expect_success 'branch --no-contains=master' '\n+test_expect_success 'branch --no-contains=main' '\n \n-\tgit branch --no-contains=master >actual &&\n+\tgit branch --no-contains=main >actual &&\n \ttest_must_be_empty actual\n \n '\n \n-test_expect_success 'branch --no-contains master' '\n+test_expect_success 'branch --no-contains main' '\n \n-\tgit branch --no-contains master >actual &&\n+\tgit branch --no-contains main >actual &&\n \ttest_must_be_empty actual\n \n '\n@@ -76,7 +76,7 @@ test_expect_success 'branch --no-contains=side' '\n \n \tgit branch --no-contains=side >actual &&\n \t{\n-\t\techo \"  master\"\n+\t\techo \"  main\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n@@ -84,9 +84,9 @@ test_expect_success 'branch --no-contains=side' '\n \n test_expect_success 'branch --contains with pattern implies --list' '\n \n-\tgit branch --contains=master master >actual &&\n+\tgit branch --contains=main main >actual &&\n \t{\n-\t\techo \"  master\"\n+\t\techo \"  main\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n@@ -94,7 +94,7 @@ test_expect_success 'branch --contains with pattern implies --list' '\n \n test_expect_success 'branch --no-contains with pattern implies --list' '\n \n-\tgit branch --no-contains=master master >actual &&\n+\tgit branch --no-contains=main main >actual &&\n \ttest_must_be_empty actual\n \n '\n@@ -103,7 +103,7 @@ test_expect_success 'side: branch --merged' '\n \n \tgit branch --merged >actual &&\n \t{\n-\t\techo \"  master\" &&\n+\t\techo \"  main\" &&\n \t\techo \"* side\"\n \t} >expect &&\n \ttest_cmp expect actual\n@@ -112,9 +112,9 @@ test_expect_success 'side: branch --merged' '\n \n test_expect_success 'branch --merged with pattern implies --list' '\n \n-\tgit branch --merged=side master >actual &&\n+\tgit branch --merged=side main >actual &&\n \t{\n-\t\techo \"  master\"\n+\t\techo \"  main\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n@@ -127,18 +127,18 @@ test_expect_success 'side: branch --no-merged' '\n \n '\n \n-test_expect_success 'master: branch --merged' '\n+test_expect_success 'main: branch --merged' '\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch --merged >actual &&\n \t{\n-\t\techo \"* master\"\n+\t\techo \"* main\"\n \t} >expect &&\n \ttest_cmp expect actual\n \n '\n \n-test_expect_success 'master: branch --no-merged' '\n+test_expect_success 'main: branch --no-merged' '\n \n \tgit branch --no-merged >actual &&\n \t{\n@@ -150,22 +150,22 @@ test_expect_success 'master: branch --no-merged' '\n \n test_expect_success 'branch --no-merged with pattern implies --list' '\n \n-\tgit branch --no-merged=master master >actual &&\n+\tgit branch --no-merged=main main >actual &&\n \ttest_must_be_empty actual\n \n '\n \n test_expect_success 'implicit --list conflicts with modification options' '\n \n-\ttest_must_fail git branch --contains=master -d &&\n-\ttest_must_fail git branch --contains=master -m foo &&\n-\ttest_must_fail git branch --no-contains=master -d &&\n-\ttest_must_fail git branch --no-contains=master -m foo\n+\ttest_must_fail git branch --contains=main -d &&\n+\ttest_must_fail git branch --contains=main -m foo &&\n+\ttest_must_fail git branch --no-contains=main -d &&\n+\ttest_must_fail git branch --no-contains=main -m foo\n \n '\n \n test_expect_success 'Assert that --contains only works on commits, not trees & blobs' '\n-\ttest_must_fail git branch --contains master^{tree} &&\n+\ttest_must_fail git branch --contains main^{tree} &&\n \tblob=$(git hash-object -w --stdin <<-\\EOF\n \tSome blob\n \tEOF\n@@ -175,11 +175,11 @@ test_expect_success 'Assert that --contains only works on commits, not trees & b\n '\n \n test_expect_success 'multiple branch --contains' '\n-\tgit checkout -b side2 master &&\n+\tgit checkout -b side2 main &&\n \t>feature &&\n \tgit add feature &&\n \tgit commit -m \"add feature\" &&\n-\tgit checkout -b next master &&\n+\tgit checkout -b next main &&\n \tgit merge side &&\n \tgit branch --contains side --contains side2 >actual &&\n \tcat >expect <<-\\EOF &&\n@@ -191,9 +191,9 @@ test_expect_success 'multiple branch --contains' '\n '\n \n test_expect_success 'multiple branch --merged' '\n-\tgit branch --merged next --merged master >actual &&\n+\tgit branch --merged next --merged main >actual &&\n \tcat >expect <<-\\EOF &&\n-\t  master\n+\t  main\n \t* next\n \t  side\n \tEOF\n@@ -203,13 +203,13 @@ test_expect_success 'multiple branch --merged' '\n test_expect_success 'multiple branch --no-contains' '\n \tgit branch --no-contains side --no-contains side2 >actual &&\n \tcat >expect <<-\\EOF &&\n-\t  master\n+\t  main\n \tEOF\n \ttest_cmp expect actual\n '\n \n test_expect_success 'multiple branch --no-merged' '\n-\tgit branch --no-merged next --no-merged master >actual &&\n+\tgit branch --no-merged next --no-merged main >actual &&\n \tcat >expect <<-\\EOF &&\n \t  side2\n \tEOF\n@@ -217,7 +217,7 @@ test_expect_success 'multiple branch --no-merged' '\n '\n \n test_expect_success 'branch --contains combined with --no-contains' '\n-\tgit checkout -b seen master &&\n+\tgit checkout -b seen main &&\n \tgit merge side &&\n \tgit merge side2 &&\n \tgit branch --contains side --no-contains side2 >actual &&\n@@ -242,17 +242,17 @@ test_expect_success 'branch --merged combined with --no-merged' '\n # that the latter walk does not mess up our flag to see if it was\n # merged).\n #\n-# Here \"topic\" tracks \"master\" with one extra commit, and \"zzz\" points to the\n-# same tip as master The name \"zzz\" must come alphabetically after \"topic\"\n+# Here \"topic\" tracks \"main\" with one extra commit, and \"zzz\" points to the\n+# same tip as main The name \"zzz\" must come alphabetically after \"topic\"\n # as we process them in that order.\n test_expect_success PREPARE_FOR_MAIN_BRANCH 'branch --merged with --verbose' '\n-\tgit branch --track topic master &&\n+\tgit branch --track topic main &&\n \tgit branch zzz topic &&\n \tgit checkout topic &&\n \ttest_commit foo &&\n \tgit branch --merged topic >actual &&\n \tcat >expect <<-\\EOF &&\n-\t  master\n+\t  main\n \t* topic\n \t  zzz\n \tEOF\ndiff --git a/t/t3202-show-branch-octopus.sh b/t/t3202-show-branch-octopus.sh\nindex bbf7129dd8..5cb0126cfe 100755\n--- a/t/t3202-show-branch-octopus.sh\n+++ b/t/t3202-show-branch-octopus.sh\n@@ -2,7 +2,7 @@\n \n test_description='test show-branch with more than 8 heads'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -18,7 +18,7 @@ test_expect_success 'setup' '\n \n \tfor i in $numbers\n \tdo\n-\t\tgit checkout -b branch$i master &&\n+\t\tgit checkout -b branch$i main &&\n \t\t> file$i &&\n \t\tgit add file$i &&\n \t\ttest_tick &&\ndiff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh\nindex a2144dd8e5..a7d2edd988 100755\n--- a/t/t3203-branch-output.sh\n+++ b/t/t3203-branch-output.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='git branch display tests'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -29,7 +29,7 @@ test_expect_success 'make remote branches' '\n cat >expect <<'EOF'\n   branch-one\n   branch-two\n-* master\n+* main\n EOF\n test_expect_success 'git branch shows local branches' '\n \tgit branch >actual &&\n@@ -63,7 +63,7 @@ test_expect_success 'git branch -r shows remote branches' '\n cat >expect <<'EOF'\n   branch-one\n   branch-two\n-* master\n+* main\n   remotes/origin/HEAD -> origin/branch-one\n   remotes/origin/branch-one\n   remotes/origin/branch-two\n@@ -155,7 +155,7 @@ test_expect_success 'git branch shows detached HEAD properly' '\n * (HEAD detached at $(git rev-parse --short HEAD^0))\n   branch-one\n   branch-two\n-  master\n+  main\n EOF\n \tgit checkout HEAD^0 &&\n \tgit branch >actual &&\n@@ -163,12 +163,12 @@ EOF\n '\n \n test_expect_success 'git branch shows detached HEAD properly after checkout --detach' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcat >expect <<EOF &&\n * (HEAD detached at $(git rev-parse --short HEAD^0))\n   branch-one\n   branch-two\n-  master\n+  main\n EOF\n \tgit checkout --detach &&\n \tgit branch >actual &&\n@@ -180,7 +180,7 @@ test_expect_success 'git branch shows detached HEAD properly after moving' '\n * (HEAD detached from $(git rev-parse --short HEAD))\n   branch-one\n   branch-two\n-  master\n+  main\n EOF\n \tgit reset --hard HEAD^1 &&\n \tgit branch >actual &&\n@@ -192,9 +192,9 @@ test_expect_success 'git branch shows detached HEAD properly from tag' '\n * (HEAD detached at fromtag)\n   branch-one\n   branch-two\n-  master\n+  main\n EOF\n-\tgit tag fromtag master &&\n+\tgit tag fromtag main &&\n \tgit checkout fromtag &&\n \tgit branch >actual &&\n \ttest_i18ncmp expect actual\n@@ -205,7 +205,7 @@ test_expect_success 'git branch shows detached HEAD properly after moving from t\n * (HEAD detached from fromtag)\n   branch-one\n   branch-two\n-  master\n+  main\n EOF\n \tgit reset --hard HEAD^1 &&\n \tgit branch >actual &&\n@@ -217,7 +217,7 @@ test_expect_success 'git branch `--sort` option' '\n \t* (HEAD detached from fromtag)\n \t  branch-two\n \t  branch-one\n-\t  master\n+\t  main\n \tEOF\n \tgit branch --sort=objectsize >actual &&\n \ttest_i18ncmp expect actual\n@@ -226,7 +226,7 @@ test_expect_success 'git branch `--sort` option' '\n test_expect_success 'git branch --points-at option' '\n \tcat >expect <<-\\EOF &&\n \t  branch-one\n-\t  master\n+\t  main\n \tEOF\n \tgit branch --points-at=branch-one >actual &&\n \ttest_cmp expect actual\n@@ -263,14 +263,14 @@ test_expect_success 'sort branches, ignore case' '\n \t\tcat >expected <<-\\EOF &&\n \t\tBRANCH-two\n \t\tbranch-one\n-\t\tmaster\n+\t\tmain\n \t\tEOF\n \t\ttest_cmp expected actual &&\n \t\tgit branch --list -i | awk \"{print \\$NF}\" >actual &&\n \t\tcat >expected <<-\\EOF &&\n \t\tbranch-one\n \t\tBRANCH-two\n-\t\tmaster\n+\t\tmain\n \t\tEOF\n \t\ttest_cmp expected actual\n \t)\n@@ -282,7 +282,7 @@ test_expect_success 'git branch --format option' '\n \tRefname is refs/heads/ambiguous\n \tRefname is refs/heads/branch-one\n \tRefname is refs/heads/branch-two\n-\tRefname is refs/heads/master\n+\tRefname is refs/heads/main\n \tRefname is refs/heads/ref-to-branch\n \tRefname is refs/heads/ref-to-remote\n \tEOF\n@@ -296,7 +296,7 @@ test_expect_success 'worktree colors correct' '\n \t  ambiguous<RESET>\n \t  branch-one<RESET>\n \t+ <CYAN>branch-two<RESET>\n-\t  master<RESET>\n+\t  main<RESET>\n \t  ref-to-branch<RESET> -> branch-one\n \t  ref-to-remote<RESET> -> origin/branch-one\n \tEOF\n@@ -309,9 +309,9 @@ test_expect_success 'worktree colors correct' '\n '\n \n test_expect_success \"set up color tests\" '\n-\techo \"<RED>master<RESET>\" >expect.color &&\n-\techo \"master\" >expect.bare &&\n-\tcolor_args=\"--format=%(color:red)%(refname:short) --list master\"\n+\techo \"<RED>main<RESET>\" >expect.color &&\n+\techo \"main\" >expect.bare &&\n+\tcolor_args=\"--format=%(color:red)%(refname:short) --list main\"\n '\n \n test_expect_success '%(color) omitted without tty' '\n@@ -334,7 +334,7 @@ test_expect_success '--color overrides auto-color' '\n \n test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output lists worktree path' '\n \tone=$(git rev-parse --short HEAD) &&\n-\ttwo=$(git rev-parse --short master) &&\n+\ttwo=$(git rev-parse --short main) &&\n \tcat >expect <<-EOF &&\n \t* (HEAD detached from fromtag) $one one\n \t  ambiguous                    $one one\ndiff --git a/t/t3204-branch-name-interpretation.sh b/t/t3204-branch-name-interpretation.sh\nindex dd315ebf04..993a6b5eff 100755\n--- a/t/t3204-branch-name-interpretation.sh\n+++ b/t/t3204-branch-name-interpretation.sh\n@@ -6,7 +6,7 @@ Branch name arguments are usually names which are taken to be inside of\n refs/heads/, but we interpret some magic syntax like @{-1}, @{upstream}, etc.\n This script aims to check the behavior of those corner cases.\n '\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -31,7 +31,7 @@ test_expect_success 'update branch via @{-1}' '\n \tgit branch previous one &&\n \n \tgit checkout previous &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit branch -f @{-1} two &&\n \texpect_branch previous two\n@@ -61,7 +61,7 @@ test_expect_success 'delete branch via @{-1}' '\n \tgit branch previous-del &&\n \n \tgit checkout previous-del &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit branch -D @{-1} &&\n \texpect_deleted previous-del\n@@ -101,7 +101,7 @@ test_expect_success 'disallow deleting remote branch via @{-1}' '\n \tgit update-ref refs/remotes/origin/previous one &&\n \n \tgit checkout -b origin/previous two &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \ttest_must_fail git branch -r -D @{-1} &&\n \texpect_branch refs/remotes/origin/previous one &&\ndiff --git a/t/t3205-branch-color.sh b/t/t3205-branch-color.sh\nindex 8b54a9252b..b905dc4867 100755\n--- a/t/t3205-branch-color.sh\n+++ b/t/t3205-branch-color.sh\n@@ -1,14 +1,14 @@\n #!/bin/sh\n \n test_description='basic branch output coloring'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n \n test_expect_success 'set up some sample branches' '\n \ttest_commit foo &&\n-\tgit update-ref refs/remotes/origin/master HEAD &&\n+\tgit update-ref refs/remotes/origin/main HEAD &&\n \tgit update-ref refs/heads/other HEAD\n '\n \n@@ -22,9 +22,9 @@ test_expect_success 'set up some color config' '\n \n test_expect_success 'regular output shows colors' '\n \tcat >expect <<-\\EOF &&\n-\t* <CYAN>master<RESET>\n+\t* <CYAN>main<RESET>\n \t  <BLUE>other<RESET>\n-\t  <YELLOW>remotes/origin/master<RESET>\n+\t  <YELLOW>remotes/origin/main<RESET>\n \tEOF\n \tgit branch --color -a >actual.raw &&\n \ttest_decode_color <actual.raw >actual &&\ndiff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh\nindex 3813ddc85e..ce24b5d735 100755\n--- a/t/t3206-range-diff.sh\n+++ b/t/t3206-range-diff.sh\n@@ -2,7 +2,7 @@\n \n test_description='range-diff tests'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -130,7 +130,7 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'simple A..B A..C (unmodified)' '\n-\tgit range-diff --no-color master..topic master..unmodified \\\n+\tgit range-diff --no-color main..topic main..unmodified \\\n \t\t>actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid u1) s/5/A/\n@@ -148,13 +148,13 @@ test_expect_success 'simple B...C (unmodified)' '\n '\n \n test_expect_success 'simple A B C (unmodified)' '\n-\tgit range-diff --no-color master topic unmodified >actual &&\n+\tgit range-diff --no-color main topic unmodified >actual &&\n \t# same \"expect\" as above\n \ttest_cmp expect actual\n '\n \n test_expect_success 'trivial reordering' '\n-\tgit range-diff --no-color master topic reordered >actual &&\n+\tgit range-diff --no-color main topic reordered >actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid r1) s/5/A/\n \t3:  $(test_oid t3) = 2:  $(test_oid r2) s/11/B/\n@@ -165,7 +165,7 @@ test_expect_success 'trivial reordering' '\n '\n \n test_expect_success 'removed a commit' '\n-\tgit range-diff --no-color master topic removed >actual &&\n+\tgit range-diff --no-color main topic removed >actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid d1) s/5/A/\n \t2:  $(test_oid t2) < -:  $(test_oid __) s/4/A/\n@@ -176,7 +176,7 @@ test_expect_success 'removed a commit' '\n '\n \n test_expect_success 'added a commit' '\n-\tgit range-diff --no-color master topic added >actual &&\n+\tgit range-diff --no-color main topic added >actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid a1) s/5/A/\n \t2:  $(test_oid t2) = 2:  $(test_oid a2) s/4/A/\n@@ -188,7 +188,7 @@ test_expect_success 'added a commit' '\n '\n \n test_expect_success 'new base, A B C' '\n-\tgit range-diff --no-color master topic rebased >actual &&\n+\tgit range-diff --no-color main topic rebased >actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid b1) s/5/A/\n \t2:  $(test_oid t2) = 2:  $(test_oid b2) s/4/A/\n@@ -199,7 +199,7 @@ test_expect_success 'new base, A B C' '\n '\n \n test_expect_success 'new base, B...C' '\n-\t# this syntax includes the commits from master!\n+\t# this syntax includes the commits from main!\n \tgit range-diff --no-color topic...rebased >actual &&\n \tcat >expect <<-EOF &&\n \t-:  $(test_oid __) > 1:  $(test_oid b5) unrelated\n@@ -423,7 +423,7 @@ test_expect_success 'file added and later removed' '\n \n test_expect_success 'no commits on one side' '\n \tgit commit --amend -m \"new message\" &&\n-\tgit range-diff master HEAD@{1} HEAD\n+\tgit range-diff main HEAD@{1} HEAD\n '\n \n test_expect_success 'changed message' '\n@@ -485,11 +485,11 @@ test_expect_success 'dual-coloring' '\n \ttest_cmp expect actual\n '\n \n-for prev in topic master..topic\n+for prev in topic main..topic\n do\n \ttest_expect_success \"format-patch --range-diff=$prev\" '\n \t\tgit format-patch --cover-letter --range-diff=$prev \\\n-\t\t\tmaster..unmodified >actual &&\n+\t\t\tmain..unmodified >actual &&\n \t\ttest_when_finished \"rm 000?-*\" &&\n \t\ttest_line_count = 5 actual &&\n \t\ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\n@@ -514,19 +514,19 @@ test_expect_success 'range-diff overrides diff.noprefix internally' '\n \n test_expect_success 'basic with modified format.pretty with suffix' '\n \tgit -c format.pretty=\"format:commit %H%d%n\" range-diff \\\n-\t\tmaster..topic master..unmodified\n+\t\tmain..topic main..unmodified\n '\n \n test_expect_success 'basic with modified format.pretty without \"commit \"' '\n \tgit -c format.pretty=\"format:%H%n\" range-diff \\\n-\t\tmaster..topic master..unmodified\n+\t\tmain..topic main..unmodified\n '\n \n test_expect_success 'range-diff compares notes by default' '\n \tgit notes add -m \"topic note\" topic &&\n \tgit notes add -m \"unmodified note\" unmodified &&\n \ttest_when_finished git notes remove topic unmodified &&\n-\tgit range-diff --no-color master..topic master..unmodified \\\n+\tgit range-diff --no-color main..topic main..unmodified \\\n \t\t>actual &&\n \tsed s/Z/\\ /g >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid u1) s/5/A/\n@@ -550,7 +550,7 @@ test_expect_success 'range-diff with --no-notes' '\n \tgit notes add -m \"topic note\" topic &&\n \tgit notes add -m \"unmodified note\" unmodified &&\n \ttest_when_finished git notes remove topic unmodified &&\n-\tgit range-diff --no-color --no-notes master..topic master..unmodified \\\n+\tgit range-diff --no-color --no-notes main..topic main..unmodified \\\n \t\t>actual &&\n \tcat >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid u1) s/5/A/\n@@ -568,7 +568,7 @@ test_expect_success 'range-diff with multiple --notes' '\n \tgit notes --ref=note2 add -m \"topic note2\" topic &&\n \tgit notes --ref=note2 add -m \"unmodified note2\" unmodified &&\n \ttest_when_finished git notes --ref=note2 remove topic unmodified &&\n-\tgit range-diff --no-color --notes=note1 --notes=note2 master..topic master..unmodified \\\n+\tgit range-diff --no-color --notes=note1 --notes=note2 main..topic main..unmodified \\\n \t\t>actual &&\n \tsed s/Z/\\ /g >expect <<-EOF &&\n \t1:  $(test_oid t1) = 1:  $(test_oid u1) s/5/A/\n@@ -598,7 +598,7 @@ test_expect_success 'format-patch --range-diff does not compare notes by default\n \tgit notes add -m \"unmodified note\" unmodified &&\n \ttest_when_finished git notes remove topic unmodified &&\n \tgit format-patch --cover-letter --range-diff=$prev \\\n-\t\tmaster..unmodified >actual &&\n+\t\tmain..unmodified >actual &&\n \ttest_when_finished \"rm 000?-*\" &&\n \ttest_line_count = 5 actual &&\n \ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\n@@ -615,7 +615,7 @@ test_expect_success 'format-patch --range-diff with --no-notes' '\n \tgit notes add -m \"unmodified note\" unmodified &&\n \ttest_when_finished git notes remove topic unmodified &&\n \tgit format-patch --no-notes --cover-letter --range-diff=$prev \\\n-\t\tmaster..unmodified >actual &&\n+\t\tmain..unmodified >actual &&\n \ttest_when_finished \"rm 000?-*\" &&\n \ttest_line_count = 5 actual &&\n \ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\n@@ -632,7 +632,7 @@ test_expect_success 'format-patch --range-diff with --notes' '\n \tgit notes add -m \"unmodified note\" unmodified &&\n \ttest_when_finished git notes remove topic unmodified &&\n \tgit format-patch --notes --cover-letter --range-diff=$prev \\\n-\t\tmaster..unmodified >actual &&\n+\t\tmain..unmodified >actual &&\n \ttest_when_finished \"rm 000?-*\" &&\n \ttest_line_count = 5 actual &&\n \ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\n@@ -661,7 +661,7 @@ test_expect_success 'format-patch --range-diff with format.notes config' '\n \ttest_when_finished git notes remove topic unmodified &&\n \ttest_config format.notes true &&\n \tgit format-patch --cover-letter --range-diff=$prev \\\n-\t\tmaster..unmodified >actual &&\n+\t\tmain..unmodified >actual &&\n \ttest_when_finished \"rm 000?-*\" &&\n \ttest_line_count = 5 actual &&\n \ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\n@@ -692,7 +692,7 @@ test_expect_success 'format-patch --range-diff with multiple notes' '\n \tgit notes --ref=note2 add -m \"unmodified note2\" unmodified &&\n \ttest_when_finished git notes --ref=note2 remove topic unmodified &&\n \tgit format-patch --notes=note1 --notes=note2 --cover-letter --range-diff=$prev \\\n-\t\tmaster..unmodified >actual &&\n+\t\tmain..unmodified >actual &&\n \ttest_when_finished \"rm 000?-*\" &&\n \ttest_line_count = 5 actual &&\n \ttest_i18ngrep \"^Range-diff:$\" 0000-* &&\ndiff --git a/t/t3206/history.export b/t/t3206/history.export\nindex 4c808e5b3b..4485adc37b 100644\n--- a/t/t3206/history.export\n+++ b/t/t3206/history.export\n@@ -168,7 +168,7 @@ mark :11\n data 10\n unrelated\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :12\n author Thomas Rast <trast@inf.ethz.ch> 1374485127 +0200\n committer Thomas Rast <trast@inf.ethz.ch> 1374485127 +0200\ndiff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh\nindex 90eea19564..3b7cdc56ec 100755\n--- a/t/t3210-pack-refs.sh\n+++ b/t/t3210-pack-refs.sh\n@@ -9,7 +9,7 @@ test_description='git pack-refs should not change the branch semantic\n This test runs git pack-refs and git show-ref and checks that the branch\n semantic is still the same.\n '\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -138,7 +138,7 @@ test_expect_success 'delete ref with dangling packed version' '\n \tgit commit --allow-empty -m \"future garbage\" &&\n \tgit pack-refs --all &&\n \tgit reset --hard HEAD^ &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reflog expire --expire=all --all &&\n \tgit prune --expire=all &&\n \tgit branch -d lamb 2>result &&\n@@ -243,7 +243,7 @@ test_expect_success 'retry acquiring packed-refs.lock' '\n \n test_expect_success SYMLINKS 'pack symlinked packed-refs' '\n \t# First make sure that symlinking works when reading:\n-\tgit update-ref refs/heads/lossy refs/heads/master &&\n+\tgit update-ref refs/heads/lossy refs/heads/main &&\n \tgit for-each-ref >all-refs-before &&\n \tmv .git/packed-refs .git/my-deviant-packed-refs &&\n \tln -s my-deviant-packed-refs .git/packed-refs &&\ndiff --git a/t/t3211-peel-ref.sh b/t/t3211-peel-ref.sh\nindex f3d9c6b6b6..37b9d26f4b 100755\n--- a/t/t3211-peel-ref.sh\n+++ b/t/t3211-peel-ref.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='tests for the peel_ref optimization of packed-refs'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -22,7 +22,7 @@ print_ref() {\n \n test_expect_success 'set up expected show-ref output' '\n \t{\n-\t\tprint_ref \"refs/heads/master\" &&\n+\t\tprint_ref \"refs/heads/main\" &&\n \t\tprint_ref \"refs/outside/foo\" &&\n \t\tprint_ref \"refs/outside/foo^{}\" &&\n \t\tprint_ref \"refs/tags/base\" &&\n@@ -50,7 +50,7 @@ test_expect_success 'create old-style pack-refs without fully-peeled' '\n \t# know we are emulating exactly what an older git would have written.\n \t{\n \t\techo \"# pack-refs with: peeled \" &&\n-\t\tprint_ref \"refs/heads/master\" &&\n+\t\tprint_ref \"refs/heads/main\" &&\n \t\tprint_ref \"refs/outside/foo\" &&\n \t\tprint_ref \"refs/tags/base\" &&\n \t\tprint_ref \"refs/tags/foo\" &&\ndiff --git a/t/t3301-notes.sh b/t/t3301-notes.sh\nindex 8f43303007..2b685580b6 100755\n--- a/t/t3301-notes.sh\n+++ b/t/t3301-notes.sh\n@@ -1295,11 +1295,11 @@ test_expect_success 'git notes copy diagnoses too many or too few parameters' '\n \ttest_i18ngrep \"too many parameters\" error\n '\n \n-test_expect_success 'git notes get-ref expands refs/heads/master to refs/notes/refs/heads/master' '\n+test_expect_success 'git notes get-ref expands refs/heads/main to refs/notes/refs/heads/main' '\n \ttest_unconfig core.notesRef &&\n \tsane_unset GIT_NOTES_REF &&\n-\techo refs/notes/refs/heads/master >expect &&\n-\tgit notes --ref=refs/heads/master get-ref >actual &&\n+\techo refs/notes/refs/heads/main >expect &&\n+\tgit notes --ref=refs/heads/main get-ref >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t3302-notes-index-expensive.sh b/t/t3302-notes-index-expensive.sh\nindex 1564befe00..ef8b63952e 100755\n--- a/t/t3302-notes-index-expensive.sh\n+++ b/t/t3302-notes-index-expensive.sh\n@@ -5,7 +5,7 @@\n \n test_description='Test commit notes index (expensive!)'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -23,7 +23,7 @@ create_repo () {\n \t\t\tnotemark=$(($mark+1))\n \t\t\ttest_tick &&\n \t\t\tcat <<-INPUT_END &&\n-\t\t\tcommit refs/heads/master\n+\t\t\tcommit refs/heads/main\n \t\t\tmark :$mark\n \t\t\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \t\t\tdata <<COMMIT\ndiff --git a/t/t3303-notes-subtrees.sh b/t/t3303-notes-subtrees.sh\nindex 16f3438355..d47ce00f69 100755\n--- a/t/t3303-notes-subtrees.sh\n+++ b/t/t3303-notes-subtrees.sh\n@@ -2,7 +2,7 @@\n \n test_description='Test commit notes organized in subtrees'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -43,7 +43,7 @@ test_expect_success \"setup: create $number_of_commits commits\" '\n \t\t\tnr=$(($nr+1)) &&\n \t\t\ttest_tick &&\n \t\t\tcat <<INPUT_END\n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n commit #$nr\n@@ -78,7 +78,7 @@ test_sha1_based () {\n \t(\n \t\tstart_note_commit &&\n \t\tnr=$number_of_commits &&\n-\t\tgit rev-list refs/heads/master |\n+\t\tgit rev-list refs/heads/main |\n \t\twhile read sha1; do\n \t\t\tnote_path=$(echo \"$sha1\" | sed \"$1\")\n \t\t\tcat <<INPUT_END &&\n@@ -108,7 +108,7 @@ test_same_notes () {\n \t(\n \t\tstart_note_commit &&\n \t\tnr=$number_of_commits &&\n-\t\tgit rev-list refs/heads/master |\n+\t\tgit rev-list refs/heads/main |\n \t\twhile read sha1; do\n \t\t\tfirst_note_path=$(echo \"$sha1\" | sed \"$1\")\n \t\t\tsecond_note_path=$(echo \"$sha1\" | sed \"$2\")\n@@ -147,7 +147,7 @@ test_concatenated_notes () {\n \t(\n \t\tstart_note_commit &&\n \t\tnr=$number_of_commits &&\n-\t\tgit rev-list refs/heads/master |\n+\t\tgit rev-list refs/heads/main |\n \t\twhile read sha1; do\n \t\t\tfirst_note_path=$(echo \"$sha1\" | sed \"$1\")\n \t\t\tsecond_note_path=$(echo \"$sha1\" | sed \"$2\")\ndiff --git a/t/t3304-notes-mixed.sh b/t/t3304-notes-mixed.sh\nindex 6a7b8e2829..03dfcd3954 100755\n--- a/t/t3304-notes-mixed.sh\n+++ b/t/t3304-notes-mixed.sh\n@@ -2,7 +2,7 @@\n \n test_description='Test notes trees that also contain non-notes'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -39,7 +39,7 @@ test_expect_success \"setup: create a couple of commits\" '\n \n \ttest_tick &&\n \tcat <<INPUT_END >input &&\n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n commit #1\n@@ -54,7 +54,7 @@ INPUT_END\n \n \ttest_tick &&\n \tcat <<INPUT_END >>input &&\n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n commit #2\n@@ -71,8 +71,8 @@ INPUT_END\n \n test_expect_success \"create a notes tree with both notes and non-notes\" '\n \n-\tcommit1=$(git rev-parse refs/heads/master^) &&\n-\tcommit2=$(git rev-parse refs/heads/master) &&\n+\tcommit1=$(git rev-parse refs/heads/main^) &&\n+\tcommit2=$(git rev-parse refs/heads/main) &&\n \ttest_tick &&\n \tcat <<INPUT_END >input &&\n commit refs/notes/commits\ndiff --git a/t/t3308-notes-merge.sh b/t/t3308-notes-merge.sh\nindex d69c84c640..202702be1a 100755\n--- a/t/t3308-notes-merge.sh\n+++ b/t/t3308-notes-merge.sh\n@@ -108,7 +108,7 @@ test_expect_success 'fail to merge into various non-notes refs' '\n \tgit update-ref refs/notes/dir/foo HEAD &&\n \ttest_must_fail git -c \"core.notesRef=refs/notes/dir\" notes merge x &&\n \ttest_must_fail git -c \"core.notesRef=refs/notes/dir/\" notes merge x &&\n-\ttest_must_fail git -c \"core.notesRef=refs/heads/master\" notes merge x &&\n+\ttest_must_fail git -c \"core.notesRef=refs/heads/main\" notes merge x &&\n \ttest_must_fail git -c \"core.notesRef=refs/notes/y:\" notes merge x &&\n \ttest_must_fail git -c \"core.notesRef=refs/notes/y:foo\" notes merge x &&\n \ttest_must_fail git -c \"core.notesRef=refs/notes/foo^{bar\" notes merge x\ndiff --git a/t/t3320-notes-merge-worktrees.sh b/t/t3320-notes-merge-worktrees.sh\nindex f86975414c..052516e6c6 100755\n--- a/t/t3320-notes-merge-worktrees.sh\n+++ b/t/t3320-notes-merge-worktrees.sh\n@@ -5,7 +5,7 @@\n \n test_description='Test merging of notes trees in multiple worktrees'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -39,8 +39,8 @@ test_expect_success 'modify notes ref ourselves (x)' '\n '\n \n test_expect_success 'create some new worktrees' '\n-\tgit worktree add -b newbranch worktree master &&\n-\tgit worktree add -b newbranch2 worktree2 master\n+\tgit worktree add -b newbranch worktree main &&\n+\tgit worktree add -b newbranch2 worktree2 main\n '\n \n test_expect_success 'merge z into y fails and sets NOTES_MERGE_REF' '\n-- \ngitgitgadget\n\n"},{"id":"410292","messageId":"3b73811af4769b57d2f596897c6470883969ad64.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 15/28] t55[23]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:33Z","receivedAt":"2020-11-18T23:45:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t5526, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in\nt55[23]*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -e 's/naster/nain/g' -- \\\n\t\tt55[23]*.sh &&\n\t   git checkout HEAD -- t5526\\*)\n\nNote that t5533 contains a variation of the name `master` (`naster`)\nthat we rename here, too.\n\nThis commit allows us to define\n`GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for that range of tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5520-pull.sh                |  32 +++---\n t/t5521-pull-options.sh        |  18 ++--\n t/t5523-push-upstream.sh       |  32 +++---\n t/t5527-fetch-odd-refs.sh      |  16 +--\n t/t5528-push-default.sh        | 100 ++++++++---------\n t/t5529-push-errors.sh         |   2 +-\n t/t5530-upload-pack-error.sh   |   2 +-\n t/t5531-deep-submodule-push.sh | 190 ++++++++++++++++-----------------\n t/t5533-push-cas.sh            | 144 ++++++++++++-------------\n t/t5534-push-signed.sh         |   6 +-\n t/t5537-fetch-shallow.sh       |  32 +++---\n t/t5538-push-shallow.sh        |  24 ++---\n t/t5539-fetch-http-shallow.sh  |  16 +--\n 13 files changed, 307 insertions(+), 307 deletions(-)\n\ndiff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\nindex b6b21c6cd1..a09411327f 100755\n--- a/t/t5520-pull.sh\n+++ b/t/t5520-pull.sh\n@@ -2,7 +2,7 @@\n \n test_description='pulling into void'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -51,11 +51,11 @@ test_expect_success 'pulling into void' '\n \ttest_cmp file cloned/file\n '\n \n-test_expect_success 'pulling into void using master:master' '\n+test_expect_success 'pulling into void using main:main' '\n \tgit init cloned-uho &&\n \t(\n \t\tcd cloned-uho &&\n-\t\tgit pull .. master:master\n+\t\tgit pull .. main:main\n \t) &&\n \ttest_path_is_file file &&\n \ttest_path_is_file cloned-uho/file &&\n@@ -67,7 +67,7 @@ test_expect_success 'pulling into void does not overwrite untracked files' '\n \t(\n \t\tcd cloned-untracked &&\n \t\techo untracked >file &&\n-\t\ttest_must_fail git pull .. master &&\n+\t\ttest_must_fail git pull .. main &&\n \t\techo untracked >expect &&\n \t\ttest_cmp expect file\n \t)\n@@ -79,7 +79,7 @@ test_expect_success 'pulling into void does not overwrite staged files' '\n \t\tcd cloned-staged-colliding &&\n \t\techo \"alternate content\" >file &&\n \t\tgit add file &&\n-\t\ttest_must_fail git pull .. master &&\n+\t\ttest_must_fail git pull .. main &&\n \t\techo \"alternate content\" >expect &&\n \t\ttest_cmp expect file &&\n \t\tgit cat-file blob :file >file.index &&\n@@ -93,7 +93,7 @@ test_expect_success 'pulling into void does not remove new staged files' '\n \t\tcd cloned-staged-new &&\n \t\techo \"new tracked file\" >newfile &&\n \t\tgit add newfile &&\n-\t\tgit pull .. master &&\n+\t\tgit pull .. main &&\n \t\techo \"new tracked file\" >expect &&\n \t\ttest_cmp expect newfile &&\n \t\tgit cat-file blob :newfile >newfile.index &&\n@@ -105,15 +105,15 @@ test_expect_success 'pulling into void must not create an octopus' '\n \tgit init cloned-octopus &&\n \t(\n \t\tcd cloned-octopus &&\n-\t\ttest_must_fail git pull .. master master &&\n+\t\ttest_must_fail git pull .. main main &&\n \t\ttest_path_is_missing file\n \t)\n '\n \n test_expect_success 'test . as a remote' '\n-\tgit branch copy master &&\n+\tgit branch copy main &&\n \tgit config branch.copy.remote . &&\n-\tgit config branch.copy.merge refs/heads/master &&\n+\tgit config branch.copy.merge refs/heads/main &&\n \techo updated >file &&\n \tgit commit -a -m updated &&\n \tgit checkout copy &&\n@@ -129,7 +129,7 @@ test_expect_success 'test . as a remote' '\n '\n \n test_expect_success 'the default remote . should not break explicit pull' '\n-\tgit checkout -b second master^ &&\n+\tgit checkout -b second main^ &&\n \techo modified >file &&\n \tgit commit -a -m modified &&\n \tgit checkout copy &&\n@@ -364,7 +364,7 @@ test_expect_success 'failed --rebase shows advice' '\n \n test_expect_success '--rebase fails with multiple branches' '\n \tgit reset --hard before-rebase &&\n-\ttest_must_fail git pull --rebase . copy master 2>err &&\n+\ttest_must_fail git pull --rebase . copy main 2>err &&\n \ttest_cmp_rev HEAD before-rebase &&\n \ttest_i18ngrep \"Cannot rebase onto multiple branches\" err &&\n \techo modified >expect &&\n@@ -503,7 +503,7 @@ test_expect_success 'pull --rebase does not warn on --no-verify-signatures' '\n \ttest_i18ngrep ! \"verify-signatures\" err\n '\n \n-# add a feature branch, keep-merge, that is merged into master, so the\n+# add a feature branch, keep-merge, that is merged into main, so the\n # test can try preserving the merge commit (or not) with various\n # --rebase flags/pull.rebase settings.\n test_expect_success 'preserve merge setup' '\n@@ -702,12 +702,12 @@ test_expect_success 'pull --rebase dies early with dirty working directory' '\n '\n \n test_expect_success 'pull --rebase works on branch yet to be born' '\n-\tgit rev-parse master >expect &&\n+\tgit rev-parse main >expect &&\n \tmkdir empty_repo &&\n \t(\n \t\tcd empty_repo &&\n \t\tgit init &&\n-\t\tgit pull --rebase .. master &&\n+\t\tgit pull --rebase .. main &&\n \t\tgit rev-parse HEAD >../actual\n \t) &&\n \ttest_cmp expect actual\n@@ -723,7 +723,7 @@ test_expect_success 'pull --rebase fails on unborn branch with staged changes' '\n \t\techo staged-file >expect &&\n \t\tgit ls-files >actual &&\n \t\ttest_cmp expect actual &&\n-\t\ttest_must_fail git pull --rebase .. master 2>err &&\n+\t\ttest_must_fail git pull --rebase .. main 2>err &&\n \t\tgit ls-files >actual &&\n \t\ttest_cmp expect actual &&\n \t\tgit show :staged-file >actual &&\n@@ -782,7 +782,7 @@ test_expect_success 'setup for avoiding reapplying old patches' '\n \t(\n \t\tcd dst &&\n \t\ttest_might_fail git rebase --abort &&\n-\t\tgit reset --hard origin/master\n+\t\tgit reset --hard origin/main\n \t) &&\n \tgit clone --bare src src-replace.git &&\n \trm -rf src &&\ndiff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh\nindex f0806f3eb5..63a688bdbf 100755\n--- a/t/t5521-pull-options.sh\n+++ b/t/t5521-pull-options.sh\n@@ -2,7 +2,7 @@\n \n test_description='pull options'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -102,13 +102,13 @@ test_expect_success 'git pull --force' '\n \tcat >>.git/config <<-\\EOF &&\n \t[remote \"one\"]\n \t\turl = ../parent\n-\t\tfetch = refs/heads/master:refs/heads/mirror\n+\t\tfetch = refs/heads/main:refs/heads/mirror\n \t[remote \"two\"]\n \t\turl = ../parent\n-\t\tfetch = refs/heads/master:refs/heads/origin\n-\t[branch \"master\"]\n+\t\tfetch = refs/heads/main:refs/heads/origin\n+\t[branch \"main\"]\n \t\tremote = two\n-\t\tmerge = refs/heads/master\n+\t\tmerge = refs/heads/main\n \tEOF\n \tgit pull two &&\n \ttest_commit A &&\n@@ -127,9 +127,9 @@ test_expect_success 'git pull --all' '\n \t[remote \"two\"]\n \t\turl = ../parent\n \t\tfetch = refs/heads/*:refs/remotes/two/*\n-\t[branch \"master\"]\n+\t[branch \"main\"]\n \t\tremote = one\n-\t\tmerge = refs/heads/master\n+\t\tmerge = refs/heads/main\n \tEOF\n \tgit pull --all\n \t)\n@@ -142,7 +142,7 @@ test_expect_success 'git pull --dry-run' '\n \t\tcd clonedry &&\n \t\tgit pull --dry-run ../parent &&\n \t\ttest_path_is_missing .git/FETCH_HEAD &&\n-\t\ttest_path_is_missing .git/refs/heads/master &&\n+\t\ttest_path_is_missing .git/refs/heads/main &&\n \t\ttest_path_is_missing .git/index &&\n \t\ttest_path_is_missing file\n \t)\n@@ -156,7 +156,7 @@ test_expect_success 'git pull --all --dry-run' '\n \t\tgit remote add origin ../parent &&\n \t\tgit pull --all --dry-run &&\n \t\ttest_path_is_missing .git/FETCH_HEAD &&\n-\t\ttest_path_is_missing .git/refs/remotes/origin/master &&\n+\t\ttest_path_is_missing .git/refs/remotes/origin/main &&\n \t\ttest_path_is_missing .git/index &&\n \t\ttest_path_is_missing file\n \t)\ndiff --git a/t/t5523-push-upstream.sh b/t/t5523-push-upstream.sh\nindex 0e6c7c251b..9fbe7f784d 100755\n--- a/t/t5523-push-upstream.sh\n+++ b/t/t5523-push-upstream.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='push with --set-upstream'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -29,19 +29,19 @@ check_config() {\n \ttest_cmp expect.$1 actual.$1\n }\n \n-test_expect_success 'push -u master:master' '\n-\tgit push -u upstream master:master &&\n-\tcheck_config master upstream refs/heads/master\n+test_expect_success 'push -u main:main' '\n+\tgit push -u upstream main:main &&\n+\tcheck_config main upstream refs/heads/main\n '\n \n-test_expect_success 'push -u master:other' '\n-\tgit push -u upstream master:other &&\n-\tcheck_config master upstream refs/heads/other\n+test_expect_success 'push -u main:other' '\n+\tgit push -u upstream main:other &&\n+\tcheck_config main upstream refs/heads/other\n '\n \n-test_expect_success 'push -u --dry-run master:otherX' '\n-\tgit push -u --dry-run upstream master:otherX &&\n-\tcheck_config master upstream refs/heads/other\n+test_expect_success 'push -u --dry-run main:otherX' '\n+\tgit push -u --dry-run upstream main:otherX &&\n+\tcheck_config main upstream refs/heads/other\n '\n \n test_expect_success 'push -u topic_2:topic_2' '\n@@ -77,7 +77,7 @@ test_expect_success 'push -u HEAD' '\n test_expect_success TTY 'progress messages go to tty' '\n \tensure_fresh_upstream &&\n \n-\ttest_terminal git push -u upstream master >out 2>err &&\n+\ttest_terminal git push -u upstream main >out 2>err &&\n \ttest_i18ngrep \"Writing objects\" err\n '\n \n@@ -85,7 +85,7 @@ test_expect_success 'progress messages do not go to non-tty' '\n \tensure_fresh_upstream &&\n \n \t# skip progress messages, since stderr is non-tty\n-\tgit push -u upstream master >out 2>err &&\n+\tgit push -u upstream main >out 2>err &&\n \ttest_i18ngrep ! \"Writing objects\" err\n '\n \n@@ -93,21 +93,21 @@ test_expect_success 'progress messages go to non-tty (forced)' '\n \tensure_fresh_upstream &&\n \n \t# force progress messages to stderr, even though it is non-tty\n-\tgit push -u --progress upstream master >out 2>err &&\n+\tgit push -u --progress upstream main >out 2>err &&\n \ttest_i18ngrep \"Writing objects\" err\n '\n \n test_expect_success TTY 'push -q suppresses progress' '\n \tensure_fresh_upstream &&\n \n-\ttest_terminal git push -u -q upstream master >out 2>err &&\n+\ttest_terminal git push -u -q upstream main >out 2>err &&\n \ttest_i18ngrep ! \"Writing objects\" err\n '\n \n test_expect_success TTY 'push --no-progress suppresses progress' '\n \tensure_fresh_upstream &&\n \n-\ttest_terminal git push -u --no-progress upstream master >out 2>err &&\n+\ttest_terminal git push -u --no-progress upstream main >out 2>err &&\n \ttest_i18ngrep ! \"Unpacking objects\" err &&\n \ttest_i18ngrep ! \"Writing objects\" err\n '\n@@ -115,7 +115,7 @@ test_expect_success TTY 'push --no-progress suppresses progress' '\n test_expect_success TTY 'quiet push' '\n \tensure_fresh_upstream &&\n \n-\ttest_terminal git push --quiet --no-progress upstream master 2>&1 | tee output &&\n+\ttest_terminal git push --quiet --no-progress upstream main 2>&1 | tee output &&\n \ttest_must_be_empty output\n '\n \ndiff --git a/t/t5527-fetch-odd-refs.sh b/t/t5527-fetch-odd-refs.sh\nindex 4aa1fb7281..e2770e4541 100755\n--- a/t/t5527-fetch-odd-refs.sh\n+++ b/t/t5527-fetch-odd-refs.sh\n@@ -1,20 +1,20 @@\n #!/bin/sh\n \n test_description='test fetching of oddly-named refs'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n \n # afterwards we will have:\n #  HEAD - two\n-#  refs/for/refs/heads/master - one\n-#  refs/heads/master - three\n+#  refs/for/refs/heads/main - one\n+#  refs/heads/main - three\n test_expect_success 'setup repo with odd suffix ref' '\n \techo content >file &&\n \tgit add . &&\n \tgit commit -m one &&\n-\tgit update-ref refs/for/refs/heads/master HEAD &&\n+\tgit update-ref refs/for/refs/heads/main HEAD &&\n \techo content >>file &&\n \tgit commit -a -m two &&\n \techo content >>file &&\n@@ -25,7 +25,7 @@ test_expect_success 'setup repo with odd suffix ref' '\n test_expect_success 'suffix ref is ignored during fetch' '\n \tgit clone --bare file://\"$PWD\" suffix &&\n \techo three >expect &&\n-\tgit --git-dir=suffix log -1 --format=%s refs/heads/master >actual &&\n+\tgit --git-dir=suffix log -1 --format=%s refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -36,7 +36,7 @@ test_expect_success 'try to create repo with absurdly long refname' '\n \t(\n \t\tcd long &&\n \t\ttest_commit long &&\n-\t\ttest_commit master\n+\t\ttest_commit main\n \t) &&\n \tif git -C long update-ref refs/heads/$ref1440 long; then\n \t\ttest_set_prereq LONG_REF\n@@ -49,7 +49,7 @@ test_expect_success LONG_REF 'fetch handles extremely long refname' '\n \tgit fetch long refs/heads/*:refs/remotes/long/* &&\n \tcat >expect <<-\\EOF &&\n \tlong\n-\tmaster\n+\tmain\n \tEOF\n \tgit for-each-ref --format=\"%(subject)\" refs/remotes/long >actual &&\n \ttest_cmp expect actual\n@@ -58,7 +58,7 @@ test_expect_success LONG_REF 'fetch handles extremely long refname' '\n test_expect_success LONG_REF 'push handles extremely long refname' '\n \tgit push long :refs/heads/$ref1440 &&\n \tgit -C long for-each-ref --format=\"%(subject)\" refs/heads >actual &&\n-\techo master >expect &&\n+\techo main >expect &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t5528-push-default.sh b/t/t5528-push-default.sh\nindex b39b5171dc..f280e00eb7 100755\n--- a/t/t5528-push-default.sh\n+++ b/t/t5528-push-default.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='check various push.default settings'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -44,7 +44,7 @@ test_push_failure () {\n \n # $1 = success or failure\n # $2 = push.default value\n-# $3 = branch to check for actual output (master or foo)\n+# $3 = branch to check for actual output (main or foo)\n # $4 = [optional] switch to triangular workflow\n test_pushdefault_workflow () {\n \tworkflow=central\n@@ -54,8 +54,8 @@ test_pushdefault_workflow () {\n \t\tpushdefault=parent2\n \tfi\n \ttest_expect_success \"push.default = $2 $1 in $workflow workflows\" \"\n-\t\ttest_config branch.master.remote parent1 &&\n-\t\ttest_config branch.master.merge refs/heads/foo &&\n+\t\ttest_config branch.main.remote parent1 &&\n+\t\ttest_config branch.main.merge refs/heads/foo &&\n \t\ttest_config remote.pushdefault $pushdefault &&\n \t\ttest_commit commit-for-$2${4+-triangular} &&\n \t\ttest_push_$1 $2 $3 ${4+repo2}\n@@ -63,32 +63,32 @@ test_pushdefault_workflow () {\n }\n \n test_expect_success '\"upstream\" pushes to configured upstream' '\n-\tgit checkout master &&\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_config branch.master.merge refs/heads/foo &&\n+\tgit checkout main &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_config branch.main.merge refs/heads/foo &&\n \ttest_commit two &&\n \ttest_push_success upstream foo\n '\n \n test_expect_success '\"upstream\" does not push on unconfigured remote' '\n-\tgit checkout master &&\n-\ttest_unconfig branch.master.remote &&\n+\tgit checkout main &&\n+\ttest_unconfig branch.main.remote &&\n \ttest_commit three &&\n \ttest_push_failure upstream\n '\n \n test_expect_success '\"upstream\" does not push on unconfigured branch' '\n-\tgit checkout master &&\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_unconfig branch.master.merge &&\n+\tgit checkout main &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_unconfig branch.main.merge &&\n \ttest_commit four &&\n \ttest_push_failure upstream\n '\n \n test_expect_success '\"upstream\" does not push when remotes do not match' '\n-\tgit checkout master &&\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_config branch.master.merge refs/heads/foo &&\n+\tgit checkout main &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_config branch.main.merge refs/heads/foo &&\n \ttest_config push.default upstream &&\n \ttest_commit five &&\n \ttest_must_fail git push parent2\n@@ -124,99 +124,99 @@ test_expect_success 'push from/to new branch with current creates remote branch'\n '\n \n test_expect_success 'push to existing branch, with no upstream configured' '\n-\ttest_config branch.master.remote repo1 &&\n-\tgit checkout master &&\n+\ttest_config branch.main.remote repo1 &&\n+\tgit checkout main &&\n \ttest_push_failure simple &&\n \ttest_push_failure upstream\n '\n \n test_expect_success 'push to existing branch, upstream configured with same name' '\n-\ttest_config branch.master.remote repo1 &&\n-\ttest_config branch.master.merge refs/heads/master &&\n-\tgit checkout master &&\n+\ttest_config branch.main.remote repo1 &&\n+\ttest_config branch.main.merge refs/heads/main &&\n+\tgit checkout main &&\n \ttest_commit six &&\n-\ttest_push_success upstream master &&\n+\ttest_push_success upstream main &&\n \ttest_commit seven &&\n-\ttest_push_success simple master\n+\ttest_push_success simple main\n '\n \n test_expect_success 'push to existing branch, upstream configured with different name' '\n-\ttest_config branch.master.remote repo1 &&\n-\ttest_config branch.master.merge refs/heads/other-name &&\n-\tgit checkout master &&\n+\ttest_config branch.main.remote repo1 &&\n+\ttest_config branch.main.merge refs/heads/other-name &&\n+\tgit checkout main &&\n \ttest_commit eight &&\n \ttest_push_success upstream other-name &&\n \ttest_commit nine &&\n \ttest_push_failure simple &&\n \tgit --git-dir=repo1 log -1 --format=\"%h %s\" \"other-name\" >expect-other-name &&\n-\ttest_push_success current master &&\n+\ttest_push_success current main &&\n \tgit --git-dir=repo1 log -1 --format=\"%h %s\" \"other-name\" >actual-other-name &&\n \ttest_cmp expect-other-name actual-other-name\n '\n \n-# We are on 'master', which integrates with 'foo' from parent1\n+# We are on 'main', which integrates with 'foo' from parent1\n # remote (set in test_pushdefault_workflow helper).  Push to\n # parent1 in centralized, and push to parent2 in triangular workflow.\n-# The parent1 repository has 'master' and 'foo' branches, while\n-# the parent2 repository has only 'master' branch.\n+# The parent1 repository has 'main' and 'foo' branches, while\n+# the parent2 repository has only 'main' branch.\n #\n # test_pushdefault_workflow() arguments:\n # $1 = success or failure\n # $2 = push.default value\n-# $3 = branch to check for actual output (master or foo)\n+# $3 = branch to check for actual output (main or foo)\n # $4 = [optional] switch to triangular workflow\n \n-# update parent1's master (which is not our upstream)\n-test_pushdefault_workflow success current master\n+# update parent1's main (which is not our upstream)\n+test_pushdefault_workflow success current main\n \n # update parent1's foo (which is our upstream)\n test_pushdefault_workflow success upstream foo\n \n # upstream is foo which is not the name of the current branch\n-test_pushdefault_workflow failure simple master\n+test_pushdefault_workflow failure simple main\n \n-# master and foo are updated\n-test_pushdefault_workflow success matching master\n+# main and foo are updated\n+test_pushdefault_workflow success matching main\n \n-# master is updated\n-test_pushdefault_workflow success current master triangular\n+# main is updated\n+test_pushdefault_workflow success current main triangular\n \n # upstream mode cannot be used in triangular\n test_pushdefault_workflow failure upstream foo triangular\n \n # in triangular, 'simple' works as 'current' and update the branch\n # with the same name.\n-test_pushdefault_workflow success simple master triangular\n+test_pushdefault_workflow success simple main triangular\n \n-# master is updated (parent2 does not have foo)\n-test_pushdefault_workflow success matching master triangular\n+# main is updated (parent2 does not have foo)\n+test_pushdefault_workflow success matching main triangular\n \n # default tests, when no push-default is specified. This\n # should behave the same as \"simple\" in non-triangular\n # settings, and as \"current\" otherwise.\n \n test_expect_success 'default behavior allows \"simple\" push' '\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_config branch.master.merge refs/heads/master &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_config branch.main.merge refs/heads/main &&\n \ttest_config remote.pushdefault parent1 &&\n-\ttest_commit default-master-master &&\n-\ttest_push_success \"\" master\n+\ttest_commit default-main-main &&\n+\ttest_push_success \"\" main\n '\n \n test_expect_success 'default behavior rejects non-simple push' '\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_config branch.master.merge refs/heads/foo &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_config branch.main.merge refs/heads/foo &&\n \ttest_config remote.pushdefault parent1 &&\n-\ttest_commit default-master-foo &&\n+\ttest_commit default-main-foo &&\n \ttest_push_failure \"\"\n '\n \n test_expect_success 'default triangular behavior acts like \"current\"' '\n-\ttest_config branch.master.remote parent1 &&\n-\ttest_config branch.master.merge refs/heads/foo &&\n+\ttest_config branch.main.remote parent1 &&\n+\ttest_config branch.main.merge refs/heads/foo &&\n \ttest_config remote.pushdefault parent2 &&\n \ttest_commit default-triangular &&\n-\ttest_push_success \"\" master repo2\n+\ttest_push_success \"\" main repo2\n '\n \n test_done\ndiff --git a/t/t5529-push-errors.sh b/t/t5529-push-errors.sh\nindex 9871307fd4..ce85fd30ad 100755\n--- a/t/t5529-push-errors.sh\n+++ b/t/t5529-push-errors.sh\n@@ -32,7 +32,7 @@ test_expect_success 'detect missing branches early' '\n test_expect_success 'detect missing sha1 expressions early' '\n \techo no >rp-ran &&\n \techo no >expect &&\n-\ttest_must_fail git push origin master~2:master &&\n+\ttest_must_fail git push origin main~2:main &&\n \ttest_cmp expect rp-ran\n '\n \ndiff --git a/t/t5530-upload-pack-error.sh b/t/t5530-upload-pack-error.sh\nindex 9dd2d2457a..7c1460eaa9 100755\n--- a/t/t5530-upload-pack-error.sh\n+++ b/t/t5530-upload-pack-error.sh\n@@ -115,7 +115,7 @@ test_expect_success 'create empty repository' '\n \n test_expect_success 'fetch fails' '\n \n-\ttest_must_fail git fetch .. master\n+\ttest_must_fail git fetch .. main\n \n '\n \ndiff --git a/t/t5531-deep-submodule-push.sh b/t/t5531-deep-submodule-push.sh\nindex 010f5a0207..d573ca496a 100755\n--- a/t/t5531-deep-submodule-push.sh\n+++ b/t/t5531-deep-submodule-push.sh\n@@ -2,7 +2,7 @@\n \n test_description='test push with submodules'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -33,7 +33,7 @@ test_expect_success setup '\n test_expect_success 'push works with recorded gitlink' '\n \t(\n \t\tcd work &&\n-\t\tgit push ../pub.git master\n+\t\tgit push ../pub.git main\n \t)\n '\n \n@@ -48,7 +48,7 @@ test_expect_success 'push if submodule has no remote' '\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Second commit for gar/bage\" &&\n-\t\tgit push --recurse-submodules=check ../pub.git master\n+\t\tgit push --recurse-submodules=check ../pub.git main\n \t)\n '\n \n@@ -69,21 +69,21 @@ test_expect_success 'push fails if submodule commit not on remote' '\n \t\tgit commit -m \"Third commit for gar/bage\" &&\n \t\t# the push should fail with --recurse-submodules=check\n \t\t# on the command line...\n-\t\ttest_must_fail git push --recurse-submodules=check ../pub.git master &&\n+\t\ttest_must_fail git push --recurse-submodules=check ../pub.git main &&\n \n \t\t# ...or if specified in the configuration..\n-\t\ttest_must_fail git -c push.recurseSubmodules=check push ../pub.git master\n+\t\ttest_must_fail git -c push.recurseSubmodules=check push ../pub.git main\n \t)\n '\n \n test_expect_success 'push succeeds after commit was pushed to remote' '\n \t(\n \t\tcd work/gar/bage &&\n-\t\tgit push origin master\n+\t\tgit push origin main\n \t) &&\n \t(\n \t\tcd work &&\n-\t\tgit push --recurse-submodules=check ../pub.git master\n+\t\tgit push --recurse-submodules=check ../pub.git main\n \t)\n '\n \n@@ -98,13 +98,13 @@ test_expect_success 'push succeeds if submodule commit not on remote but using o\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse on-demand on command line for gar/bage\" &&\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master &&\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# Check that the submodule commit got there too\n \t\tcd gar/bage &&\n-\t\tgit diff --quiet origin/master master\n+\t\tgit diff --quiet origin/main main\n \t)\n '\n \n@@ -119,13 +119,13 @@ test_expect_success 'push succeeds if submodule commit not on remote but using o\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse on-demand from config for gar/bage\" &&\n-\t\tgit -c push.recurseSubmodules=on-demand push ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=on-demand push ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# Check that the submodule commit got there too\n \t\tcd gar/bage &&\n-\t\tgit diff --quiet origin/master master\n+\t\tgit diff --quiet origin/main main\n \t)\n '\n \n@@ -140,13 +140,13 @@ test_expect_success 'push succeeds if submodule commit not on remote but using a\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse submodule.recurse from config for gar/bage\" &&\n-\t\tgit -c submodule.recurse push ../pub.git master &&\n+\t\tgit -c submodule.recurse push ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# Check that the submodule commit got there too\n \t\tcd gar/bage &&\n-\t\tgit diff --quiet origin/master master\n+\t\tgit diff --quiet origin/main main\n \t)\n '\n \n@@ -164,34 +164,34 @@ test_expect_success 'push recurse-submodules on command line overrides config' '\n \n \t\t# Ensure that we can override on-demand in the config\n \t\t# to just check submodules\n-\t\ttest_must_fail git -c push.recurseSubmodules=on-demand push --recurse-submodules=check ../pub.git master &&\n+\t\ttest_must_fail git -c push.recurseSubmodules=on-demand push --recurse-submodules=check ../pub.git main &&\n \t\t# Check that the supermodule commit did not get there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master^ &&\n+\t\tgit diff --quiet FETCH_HEAD main^ &&\n \t\t# Check that the submodule commit did not get there\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# Ensure that we can override check in the config to\n \t\t# disable submodule recursion entirely\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n-\t\tgit -c push.recurseSubmodules=on-demand push --recurse-submodules=no ../pub.git master &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n+\t\tgit -c push.recurseSubmodules=on-demand push --recurse-submodules=no ../pub.git main &&\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# Ensure that we can override check in the config to\n \t\t# disable submodule recursion entirely (alternative form)\n-\t\tgit -c push.recurseSubmodules=on-demand push --no-recurse-submodules ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=on-demand push --no-recurse-submodules ../pub.git main &&\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# Ensure that we can override check in the config to\n \t\t# push the submodule too\n-\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=on-demand ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=on-demand ../pub.git main &&\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n-\t\t(cd gar/bage && git diff --quiet origin/master master)\n+\t\tgit diff --quiet FETCH_HEAD main &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main)\n \t)\n '\n \n@@ -208,31 +208,31 @@ test_expect_success 'push recurse-submodules last one wins on command line' '\n \t\tgit commit -m \"Recurse on command-line overriding earlier command-line for gar/bage\" &&\n \n \t\t# should result in \"check\"\n-\t\ttest_must_fail git push --recurse-submodules=on-demand --recurse-submodules=check ../pub.git master &&\n+\t\ttest_must_fail git push --recurse-submodules=on-demand --recurse-submodules=check ../pub.git main &&\n \t\t# Check that the supermodule commit did not get there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master^ &&\n+\t\tgit diff --quiet FETCH_HEAD main^ &&\n \t\t# Check that the submodule commit did not get there\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# should result in \"no\"\n-\t\tgit push --recurse-submodules=on-demand --recurse-submodules=no ../pub.git master &&\n+\t\tgit push --recurse-submodules=on-demand --recurse-submodules=no ../pub.git main &&\n \t\t# Check that the supermodule commit did get there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# Check that the submodule commit did not get there\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# should result in \"no\"\n-\t\tgit push --recurse-submodules=on-demand --no-recurse-submodules ../pub.git master &&\n+\t\tgit push --recurse-submodules=on-demand --no-recurse-submodules ../pub.git main &&\n \t\t# Check that the submodule commit did not get there\n-\t\t(cd gar/bage && git diff --quiet origin/master master^) &&\n+\t\t(cd gar/bage && git diff --quiet origin/main main^) &&\n \n \t\t# But the options in the other order should push the submodule\n-\t\tgit push --recurse-submodules=check --recurse-submodules=on-demand ../pub.git master &&\n+\t\tgit push --recurse-submodules=check --recurse-submodules=on-demand ../pub.git main &&\n \t\t# Check that the submodule commit did get there\n \t\tgit fetch ../pub.git &&\n-\t\t(cd gar/bage && git diff --quiet origin/master master)\n+\t\t(cd gar/bage && git diff --quiet origin/main main)\n \t)\n '\n \n@@ -247,13 +247,13 @@ test_expect_success 'push succeeds if submodule commit not on remote using on-de\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse on-demand on command-line overriding config for gar/bage\" &&\n-\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=on-demand ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=on-demand ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# Check that the submodule commit got there\n \t\tcd gar/bage &&\n-\t\tgit diff --quiet origin/master master\n+\t\tgit diff --quiet origin/main main\n \t)\n '\n \n@@ -268,14 +268,14 @@ test_expect_success 'push succeeds if submodule commit disabling recursion from\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse disable on command-line overriding config for gar/bage\" &&\n-\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=no ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=check push --recurse-submodules=no ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# But that the submodule commit did not\n-\t\t( cd gar/bage && git diff --quiet origin/master master^ ) &&\n+\t\t( cd gar/bage && git diff --quiet origin/main main^ ) &&\n \t\t# Now push it to avoid confusing future tests\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t)\n '\n \n@@ -290,14 +290,14 @@ test_expect_success 'push succeeds if submodule commit disabling recursion from\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse disable on command-line alternative overriding config for gar/bage\" &&\n-\t\tgit -c push.recurseSubmodules=check push --no-recurse-submodules ../pub.git master &&\n+\t\tgit -c push.recurseSubmodules=check push --no-recurse-submodules ../pub.git main &&\n \t\t# Check that the supermodule commit got there\n \t\tgit fetch ../pub.git &&\n-\t\tgit diff --quiet FETCH_HEAD master &&\n+\t\tgit diff --quiet FETCH_HEAD main &&\n \t\t# But that the submodule commit did not\n-\t\t( cd gar/bage && git diff --quiet origin/master master^ ) &&\n+\t\t( cd gar/bage && git diff --quiet origin/main main^ ) &&\n \t\t# Now push it to avoid confusing future tests\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t)\n '\n \n@@ -307,7 +307,7 @@ test_expect_success 'submodule entry pointing at a tag is error' '\n \tgit -C work update-index --cacheinfo 160000 \"$tag\" gar/bage &&\n \tgit -C work commit -m \"bad commit\" &&\n \ttest_when_finished \"git -C work reset --hard HEAD^\" &&\n-\ttest_must_fail git -C work push --recurse-submodules=on-demand ../pub.git master 2>err &&\n+\ttest_must_fail git -C work push --recurse-submodules=on-demand ../pub.git main 2>err &&\n \ttest_i18ngrep \"is a tag, not a commit\" err\n '\n \n@@ -322,9 +322,9 @@ test_expect_success 'push fails if recurse submodules option passed as yes' '\n \t\tcd work &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Recurse push fails if recurse submodules option passed as yes for gar/bage\" &&\n-\t\ttest_must_fail git push --recurse-submodules=yes ../pub.git master &&\n-\t\ttest_must_fail git -c push.recurseSubmodules=yes push ../pub.git master &&\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\ttest_must_fail git push --recurse-submodules=yes ../pub.git main &&\n+\t\ttest_must_fail git -c push.recurseSubmodules=yes push ../pub.git main &&\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t)\n '\n \n@@ -366,7 +366,7 @@ test_expect_success 'push succeeds if submodule has no remote and is on the firs\n \t\t) &&\n \t\tgit add b &&\n \t\tgit commit -m \"added submodule\" &&\n-\t\tgit push --recurse-submodules=check origin master\n+\t\tgit push --recurse-submodules=check origin main\n \t)\n '\n \n@@ -375,21 +375,21 @@ test_expect_success 'push unpushed submodules when not needed' '\n \t\tcd work &&\n \t\t(\n \t\t\tcd gar/bage &&\n-\t\t\tgit checkout master &&\n+\t\t\tgit checkout main &&\n \t\t\t>junk5 &&\n \t\t\tgit add junk5 &&\n \t\t\tgit commit -m \"Fifth junk\" &&\n \t\t\tgit push &&\n-\t\t\tgit rev-parse origin/master >../../../expected\n+\t\t\tgit rev-parse origin/main >../../../expected\n \t\t) &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Fifth commit for gar/bage\" &&\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t) &&\n \t(\n \t\tcd submodule.git &&\n-\t\tgit rev-parse master >../actual\n+\t\tgit rev-parse main >../actual\n \t) &&\n \ttest_cmp expected actual\n '\n@@ -397,7 +397,7 @@ test_expect_success 'push unpushed submodules when not needed' '\n test_expect_success 'push unpushed submodules when not needed 2' '\n \t(\n \t\tcd submodule.git &&\n-\t\tgit rev-parse master >../expected\n+\t\tgit rev-parse main >../expected\n \t) &&\n \t(\n \t\tcd work &&\n@@ -410,11 +410,11 @@ test_expect_success 'push unpushed submodules when not needed 2' '\n \t\t>junk2 &&\n \t\tgit add junk2 &&\n \t\tgit commit -m \"Second junk for work\" &&\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t) &&\n \t(\n \t\tcd submodule.git &&\n-\t\tgit rev-parse master >../actual\n+\t\tgit rev-parse main >../actual\n \t) &&\n \ttest_cmp expected actual\n '\n@@ -424,20 +424,20 @@ test_expect_success 'push unpushed submodules recursively' '\n \t\tcd work &&\n \t\t(\n \t\t\tcd gar/bage &&\n-\t\t\tgit checkout master &&\n+\t\t\tgit checkout main &&\n \t\t\t> junk7 &&\n \t\t\tgit add junk7 &&\n \t\t\tgit commit -m \"Seventh junk\" &&\n-\t\t\tgit rev-parse master >../../../expected\n+\t\t\tgit rev-parse main >../../../expected\n \t\t) &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Seventh commit for gar/bage\" &&\n-\t\tgit push --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --recurse-submodules=on-demand ../pub.git main\n \t) &&\n \t(\n \t\tcd submodule.git &&\n-\t\tgit rev-parse master >../actual\n+\t\tgit rev-parse main >../actual\n \t) &&\n \ttest_cmp expected actual\n '\n@@ -447,64 +447,64 @@ test_expect_success 'push unpushable submodule recursively fails' '\n \t\tcd work &&\n \t\t(\n \t\t\tcd gar/bage &&\n-\t\t\tgit rev-parse origin/master >../../../expected &&\n-\t\t\tgit checkout master~0 &&\n+\t\t\tgit rev-parse origin/main >../../../expected &&\n+\t\t\tgit checkout main~0 &&\n \t\t\t> junk8 &&\n \t\t\tgit add junk8 &&\n \t\t\tgit commit -m \"Eighth junk\"\n \t\t) &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Eighth commit for gar/bage\" &&\n-\t\ttest_must_fail git push --recurse-submodules=on-demand ../pub.git master\n+\t\ttest_must_fail git push --recurse-submodules=on-demand ../pub.git main\n \t) &&\n \t(\n \t\tcd submodule.git &&\n-\t\tgit rev-parse master >../actual\n+\t\tgit rev-parse main >../actual\n \t) &&\n-\ttest_when_finished git -C work reset --hard master^ &&\n+\ttest_when_finished git -C work reset --hard main^ &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'push --dry-run does not recursively update submodules' '\n \t(\n \t\tcd work/gar/bage &&\n-\t\tgit checkout master &&\n-\t\tgit rev-parse master >../../../expected_submodule &&\n+\t\tgit checkout main &&\n+\t\tgit rev-parse main >../../../expected_submodule &&\n \t\t> junk9 &&\n \t\tgit add junk9 &&\n \t\tgit commit -m \"Ninth junk\" &&\n \n \t\t# Go up to 'work' directory\n \t\tcd ../.. &&\n-\t\tgit checkout master &&\n-\t\tgit rev-parse master >../expected_pub &&\n+\t\tgit checkout main &&\n+\t\tgit rev-parse main >../expected_pub &&\n \t\tgit add gar/bage &&\n \t\tgit commit -m \"Ninth commit for gar/bage\" &&\n-\t\tgit push --dry-run --recurse-submodules=on-demand ../pub.git master\n+\t\tgit push --dry-run --recurse-submodules=on-demand ../pub.git main\n \t) &&\n-\tgit -C submodule.git rev-parse master >actual_submodule &&\n-\tgit -C pub.git rev-parse master >actual_pub &&\n+\tgit -C submodule.git rev-parse main >actual_submodule &&\n+\tgit -C pub.git rev-parse main >actual_pub &&\n \ttest_cmp expected_pub actual_pub &&\n \ttest_cmp expected_submodule actual_submodule\n '\n \n test_expect_success 'push --dry-run does not recursively update submodules' '\n-\tgit -C work push --dry-run --recurse-submodules=only ../pub.git master &&\n+\tgit -C work push --dry-run --recurse-submodules=only ../pub.git main &&\n \n-\tgit -C submodule.git rev-parse master >actual_submodule &&\n-\tgit -C pub.git rev-parse master >actual_pub &&\n+\tgit -C submodule.git rev-parse main >actual_submodule &&\n+\tgit -C pub.git rev-parse main >actual_pub &&\n \ttest_cmp expected_pub actual_pub &&\n \ttest_cmp expected_submodule actual_submodule\n '\n \n test_expect_success 'push only unpushed submodules recursively' '\n-\tgit -C work/gar/bage rev-parse master >expected_submodule &&\n-\tgit -C pub.git rev-parse master >expected_pub &&\n+\tgit -C work/gar/bage rev-parse main >expected_submodule &&\n+\tgit -C pub.git rev-parse main >expected_pub &&\n \n-\tgit -C work push --recurse-submodules=only ../pub.git master &&\n+\tgit -C work push --recurse-submodules=only ../pub.git main &&\n \n-\tgit -C submodule.git rev-parse master >actual_submodule &&\n-\tgit -C pub.git rev-parse master >actual_pub &&\n+\tgit -C submodule.git rev-parse main >actual_submodule &&\n+\tgit -C pub.git rev-parse main >actual_pub &&\n \ttest_cmp expected_submodule actual_submodule &&\n \ttest_cmp expected_pub actual_pub\n '\n@@ -520,14 +520,14 @@ test_expect_success 'push propagating the remotes name to a submodule' '\n \tgit -C work commit -m \"Tenth junk added to gar/bage\" &&\n \n \t# Fails when submodule does not have a matching remote\n-\ttest_must_fail git -C work push --recurse-submodules=on-demand pub master &&\n+\ttest_must_fail git -C work push --recurse-submodules=on-demand pub main &&\n \t# Succeeds when submodules has matching remote and refspec\n-\tgit -C work push --recurse-submodules=on-demand origin master &&\n+\tgit -C work push --recurse-submodules=on-demand origin main &&\n \n-\tgit -C submodule.git rev-parse master >actual_submodule &&\n-\tgit -C pub.git rev-parse master >actual_pub &&\n-\tgit -C work/gar/bage rev-parse master >expected_submodule &&\n-\tgit -C work rev-parse master >expected_pub &&\n+\tgit -C submodule.git rev-parse main >actual_submodule &&\n+\tgit -C pub.git rev-parse main >actual_pub &&\n+\tgit -C work/gar/bage rev-parse main >expected_submodule &&\n+\tgit -C work rev-parse main >expected_pub &&\n \ttest_cmp expected_submodule actual_submodule &&\n \ttest_cmp expected_pub actual_pub\n '\n@@ -551,7 +551,7 @@ test_expect_success 'push propagating refspec to a submodule' '\n \ttest_must_fail git -C work push --recurse-submodules=on-demand origin \\\n \t\tHEAD:refs/heads/branch2 &&\n \n-\tgit -C work/gar/bage branch branch2 master &&\n+\tgit -C work/gar/bage branch branch2 main &&\n \tgit -C work push --recurse-submodules=on-demand origin branch2 &&\n \n \tgit -C submodule.git rev-parse branch2 >actual_submodule &&\ndiff --git a/t/t5533-push-cas.sh b/t/t5533-push-cas.sh\nindex a7f0f098dd..cba26a872d 100755\n--- a/t/t5533-push-cas.sh\n+++ b/t/t5533-push-cas.sh\n@@ -2,7 +2,7 @@\n \n test_description='compare & swap push force/delete safety'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -32,22 +32,22 @@ setup_src_dup_dst () {\n \t(\n \t\tcd dup &&\n \t\tgit fetch &&\n-\t\tgit merge origin/master &&\n-\t\tgit switch -c branch master~2 &&\n+\t\tgit merge origin/main &&\n+\t\tgit switch -c branch main~2 &&\n \t\ttest_commit D &&\n \t\ttest_commit E &&\n \t\tgit push origin --all\n \t) &&\n \t(\n \t\tcd src &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\tgit fetch --all &&\n \t\tgit branch branch --track origin/branch &&\n-\t\tgit rebase origin/master\n+\t\tgit rebase origin/main\n \t) &&\n \t(\n \t\tcd dup &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit F &&\n \t\ttest_commit G &&\n \t\tgit switch branch &&\n@@ -68,11 +68,11 @@ test_expect_success 'push to update (protected)' '\n \t(\n \t\tcd dst &&\n \t\ttest_commit D &&\n-\t\ttest_must_fail git push --force-with-lease=master:master origin master 2>err &&\n+\t\ttest_must_fail git push --force-with-lease=main:main origin main 2>err &&\n \t\tgrep \"stale info\" err\n \t) &&\n-\tgit ls-remote . refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote . refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -81,11 +81,11 @@ test_expect_success 'push to update (protected, forced)' '\n \t(\n \t\tcd dst &&\n \t\ttest_commit D &&\n-\t\tgit push --force --force-with-lease=master:master origin master 2>err &&\n+\t\tgit push --force --force-with-lease=main:main origin main 2>err &&\n \t\tgrep \"forced update\" err\n \t) &&\n-\tgit ls-remote dst refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote dst refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -93,20 +93,20 @@ test_expect_success 'push to update (protected, tracking)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit D &&\n \t\tgit checkout HEAD^0\n \t) &&\n-\tgit ls-remote src refs/heads/master >expect &&\n+\tgit ls-remote src refs/heads/main >expect &&\n \t(\n \t\tcd dst &&\n \t\ttest_commit E &&\n-\t\tgit ls-remote . refs/remotes/origin/master >expect &&\n-\t\ttest_must_fail git push --force-with-lease=master origin master &&\n-\t\tgit ls-remote . refs/remotes/origin/master >actual &&\n+\t\tgit ls-remote . refs/remotes/origin/main >expect &&\n+\t\ttest_must_fail git push --force-with-lease=main origin main &&\n+\t\tgit ls-remote . refs/remotes/origin/main >actual &&\n \t\ttest_cmp expect actual\n \t) &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -114,18 +114,18 @@ test_expect_success 'push to update (protected, tracking, forced)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit D &&\n \t\tgit checkout HEAD^0\n \t) &&\n \t(\n \t\tcd dst &&\n \t\ttest_commit E &&\n-\t\tgit ls-remote . refs/remotes/origin/master >expect &&\n-\t\tgit push --force --force-with-lease=master origin master\n+\t\tgit ls-remote . refs/remotes/origin/main >expect &&\n+\t\tgit push --force --force-with-lease=main origin main\n \t) &&\n-\tgit ls-remote dst refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote dst refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -134,10 +134,10 @@ test_expect_success 'push to update (allowed)' '\n \t(\n \t\tcd dst &&\n \t\ttest_commit D &&\n-\t\tgit push --force-with-lease=master:master^ origin master\n+\t\tgit push --force-with-lease=main:main^ origin main\n \t) &&\n-\tgit ls-remote dst refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote dst refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -146,11 +146,11 @@ test_expect_success 'push to update (allowed, tracking)' '\n \t(\n \t\tcd dst &&\n \t\ttest_commit D &&\n-\t\tgit push --force-with-lease=master origin master 2>err &&\n+\t\tgit push --force-with-lease=main origin main 2>err &&\n \t\t! grep \"forced update\" err\n \t) &&\n-\tgit ls-remote dst refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote dst refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -160,22 +160,22 @@ test_expect_success 'push to update (allowed even though no-ff)' '\n \t\tcd dst &&\n \t\tgit reset --hard HEAD^ &&\n \t\ttest_commit D &&\n-\t\tgit push --force-with-lease=master origin master 2>err &&\n+\t\tgit push --force-with-lease=main origin main 2>err &&\n \t\tgrep \"forced update\" err\n \t) &&\n-\tgit ls-remote dst refs/heads/master >expect &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote dst refs/heads/main >expect &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'push to delete (protected)' '\n \tsetup_srcdst_basic &&\n-\tgit ls-remote src refs/heads/master >expect &&\n+\tgit ls-remote src refs/heads/main >expect &&\n \t(\n \t\tcd dst &&\n-\t\ttest_must_fail git push --force-with-lease=master:master^ origin :master\n+\t\ttest_must_fail git push --force-with-lease=main:main^ origin :main\n \t) &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -183,9 +183,9 @@ test_expect_success 'push to delete (protected, forced)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd dst &&\n-\t\tgit push --force --force-with-lease=master:master^ origin :master\n+\t\tgit push --force --force-with-lease=main:main^ origin :main\n \t) &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_must_be_empty actual\n '\n \n@@ -193,10 +193,10 @@ test_expect_success 'push to delete (allowed)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd dst &&\n-\t\tgit push --force-with-lease=master origin :master 2>err &&\n+\t\tgit push --force-with-lease=main origin :main 2>err &&\n \t\tgrep deleted err\n \t) &&\n-\tgit ls-remote src refs/heads/master >actual &&\n+\tgit ls-remote src refs/heads/main >actual &&\n \ttest_must_be_empty actual\n '\n \n@@ -204,12 +204,12 @@ test_expect_success 'cover everything with default force-with-lease (protected)'\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit branch naster master^\n+\t\tgit branch nain main^\n \t) &&\n \tgit ls-remote src refs/heads/\\* >expect &&\n \t(\n \t\tcd dst &&\n-\t\ttest_must_fail git push --force-with-lease origin master master:naster\n+\t\ttest_must_fail git push --force-with-lease origin main main:nain\n \t) &&\n \tgit ls-remote src refs/heads/\\* >actual &&\n \ttest_cmp expect actual\n@@ -219,16 +219,16 @@ test_expect_success 'cover everything with default force-with-lease (allowed)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit branch naster master^\n+\t\tgit branch nain main^\n \t) &&\n \t(\n \t\tcd dst &&\n \t\tgit fetch &&\n-\t\tgit push --force-with-lease origin master master:naster\n+\t\tgit push --force-with-lease origin main main:nain\n \t) &&\n-\tgit ls-remote dst refs/heads/master |\n-\tsed -e \"s/master/naster/\" >expect &&\n-\tgit ls-remote src refs/heads/naster >actual &&\n+\tgit ls-remote dst refs/heads/main |\n+\tsed -e \"s/main/nain/\" >expect &&\n+\tgit ls-remote src refs/heads/nain >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -236,7 +236,7 @@ test_expect_success 'new branch covered by force-with-lease' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd dst &&\n-\t\tgit branch branch master &&\n+\t\tgit branch branch main &&\n \t\tgit push --force-with-lease=branch origin branch\n \t) &&\n \tgit ls-remote dst refs/heads/branch >expect &&\n@@ -248,7 +248,7 @@ test_expect_success 'new branch covered by force-with-lease (explicit)' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd dst &&\n-\t\tgit branch branch master &&\n+\t\tgit branch branch main &&\n \t\tgit push --force-with-lease=branch: origin branch\n \t) &&\n \tgit ls-remote dst refs/heads/branch >expect &&\n@@ -260,12 +260,12 @@ test_expect_success 'new branch already exists' '\n \tsetup_srcdst_basic &&\n \t(\n \t\tcd src &&\n-\t\tgit checkout -b branch master &&\n+\t\tgit checkout -b branch main &&\n \t\ttest_commit F\n \t) &&\n \t(\n \t\tcd dst &&\n-\t\tgit branch branch master &&\n+\t\tgit branch branch main &&\n \t\ttest_must_fail git push --force-with-lease=branch: origin branch\n \t)\n '\n@@ -280,7 +280,7 @@ test_expect_success 'background updates of REMOTE can be mitigated with a non-up\n \t\tcd dst &&\n \t\ttest_commit G &&\n \t\tgit remote add origin-push ../src.bare &&\n-\t\tgit push origin-push master:master\n+\t\tgit push origin-push main:main\n \t) &&\n \tgit clone --no-local src.bare dst2 &&\n \ttest_when_finished \"rm -rf dst2\" &&\n@@ -302,58 +302,58 @@ test_expect_success 'background updates of REMOTE can be mitigated with a non-up\n test_expect_success 'background updates to remote can be mitigated with \"--force-if-includes\"' '\n \tsetup_src_dup_dst &&\n \ttest_when_finished \"rm -fr dst src dup\" &&\n-\tgit ls-remote dst refs/heads/master >expect.master &&\n+\tgit ls-remote dst refs/heads/main >expect.main &&\n \tgit ls-remote dst refs/heads/branch >expect.branch &&\n \t(\n \t\tcd src &&\n \t\tgit switch branch &&\n \t\ttest_commit I &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit J &&\n \t\tgit fetch --all &&\n \t\ttest_must_fail git push --force-with-lease --force-if-includes --all\n \t) &&\n-\tgit ls-remote dst refs/heads/master >actual.master &&\n+\tgit ls-remote dst refs/heads/main >actual.main &&\n \tgit ls-remote dst refs/heads/branch >actual.branch &&\n-\ttest_cmp expect.master actual.master &&\n+\ttest_cmp expect.main actual.main &&\n \ttest_cmp expect.branch actual.branch\n '\n \n test_expect_success 'background updates to remote can be mitigated with \"push.useForceIfIncludes\"' '\n \tsetup_src_dup_dst &&\n \ttest_when_finished \"rm -fr dst src dup\" &&\n-\tgit ls-remote dst refs/heads/master >expect.master &&\n+\tgit ls-remote dst refs/heads/main >expect.main &&\n \t(\n \t\tcd src &&\n \t\tgit switch branch &&\n \t\ttest_commit I &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit J &&\n \t\tgit fetch --all &&\n \t\tgit config --local push.useForceIfIncludes true &&\n-\t\ttest_must_fail git push --force-with-lease=master origin master\n+\t\ttest_must_fail git push --force-with-lease=main origin main\n \t) &&\n-\tgit ls-remote dst refs/heads/master >actual.master &&\n-\ttest_cmp expect.master actual.master\n+\tgit ls-remote dst refs/heads/main >actual.main &&\n+\ttest_cmp expect.main actual.main\n '\n \n test_expect_success '\"--force-if-includes\" should be disabled for --force-with-lease=\"<refname>:<expect>\"' '\n \tsetup_src_dup_dst &&\n \ttest_when_finished \"rm -fr dst src dup\" &&\n-\tgit ls-remote dst refs/heads/master >expect.master &&\n+\tgit ls-remote dst refs/heads/main >expect.main &&\n \t(\n \t\tcd src &&\n \t\tgit switch branch &&\n \t\ttest_commit I &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit J &&\n-\t\tremote_head=\"$(git rev-parse refs/remotes/origin/master)\" &&\n+\t\tremote_head=\"$(git rev-parse refs/remotes/origin/main)\" &&\n \t\tgit fetch --all &&\n-\t\ttest_must_fail git push --force-if-includes --force-with-lease=\"master:$remote_head\" 2>err &&\n+\t\ttest_must_fail git push --force-if-includes --force-with-lease=\"main:$remote_head\" 2>err &&\n \t\tgrep \"stale info\" err\n \t) &&\n-\tgit ls-remote dst refs/heads/master >actual.master &&\n-\ttest_cmp expect.master actual.master\n+\tgit ls-remote dst refs/heads/main >actual.main &&\n+\ttest_cmp expect.main actual.main\n '\n \n test_expect_success '\"--force-if-includes\" should allow forced update after a rebase (\"pull --rebase\")' '\n@@ -363,10 +363,10 @@ test_expect_success '\"--force-if-includes\" should allow forced update after a re\n \t\tcd src &&\n \t\tgit switch branch &&\n \t\ttest_commit I &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit J &&\n-\t\tgit pull --rebase origin master &&\n-\t\tgit push --force-if-includes --force-with-lease=\"master\"\n+\t\tgit pull --rebase origin main &&\n+\t\tgit push --force-if-includes --force-with-lease=\"main\"\n \t)\n '\n \n@@ -377,11 +377,11 @@ test_expect_success '\"--force-if-includes\" should allow forced update after a re\n \t\tcd src &&\n \t\tgit switch branch &&\n \t\ttest_commit I &&\n-\t\tgit switch master &&\n+\t\tgit switch main &&\n \t\ttest_commit J &&\n-\t\tgit pull --rebase origin master &&\n+\t\tgit pull --rebase origin main &&\n \t\tgit rebase --onto HEAD~4 HEAD~1 &&\n-\t\tgit push --force-if-includes --force-with-lease=\"master\"\n+\t\tgit push --force-if-includes --force-with-lease=\"main\"\n \t)\n '\n \ndiff --git a/t/t5534-push-signed.sh b/t/t5534-push-signed.sh\nindex 6ab458684d..bba768f5de 100755\n--- a/t/t5534-push-signed.sh\n+++ b/t/t5534-push-signed.sh\n@@ -2,7 +2,7 @@\n \n test_description='signed push'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -12,11 +12,11 @@ prepare_dst () {\n \trm -fr dst &&\n \ttest_create_repo dst &&\n \n-\tgit push dst master:noop master:ff master:noff\n+\tgit push dst main:noop main:ff main:noff\n }\n \n test_expect_success setup '\n-\t# master, ff and noff branches pointing at the same commit\n+\t# main, ff and noff branches pointing at the same commit\n \ttest_tick &&\n \tgit commit --allow-empty -m initial &&\n \ndiff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh\nindex 6de384a5ea..11d5ea54a9 100755\n--- a/t/t5537-fetch-shallow.sh\n+++ b/t/t5537-fetch-shallow.sh\n@@ -2,7 +2,7 @@\n \n test_description='fetch/clone from a shallow clone'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -52,7 +52,7 @@ test_expect_success 'fetch from shallow clone' '\n \tcd shallow2 &&\n \tgit fetch &&\n \tgit fsck &&\n-\tgit log --format=%s origin/master >actual &&\n+\tgit log --format=%s origin/main >actual &&\n \ttest_write_lines 5 4 3 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -67,7 +67,7 @@ test_expect_success 'fetch --depth from shallow clone' '\n \tcd shallow2 &&\n \tgit fetch --depth=2 &&\n \tgit fsck &&\n-\tgit log --format=%s origin/master >actual &&\n+\tgit log --format=%s origin/main >actual &&\n \ttest_write_lines 6 5 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -78,7 +78,7 @@ test_expect_success 'fetch --unshallow from shallow clone' '\n \tcd shallow2 &&\n \tgit fetch --unshallow &&\n \tgit fsck &&\n-\tgit log --format=%s origin/master >actual &&\n+\tgit log --format=%s origin/main >actual &&\n \ttest_write_lines 6 5 4 3 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -92,7 +92,7 @@ test_expect_success 'fetch --unshallow from a full clone' '\n \ttest_write_lines 4 3 >expect &&\n \ttest_cmp expect actual &&\n \tgit -c fetch.writeCommitGraph fetch --unshallow &&\n-\tgit log origin/master --format=%s >actual &&\n+\tgit log origin/main --format=%s >actual &&\n \ttest_write_lines 4 3 2 1 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -107,9 +107,9 @@ test_expect_success 'fetch something upstream has but hidden by clients shallow\n \tgit commit -m add-1-back &&\n \t(\n \tcd shallow2 &&\n-\tgit fetch ../.git +refs/heads/master:refs/remotes/top/master &&\n+\tgit fetch ../.git +refs/heads/main:refs/remotes/top/main &&\n \tgit fsck &&\n-\tgit log --format=%s top/master >actual &&\n+\tgit log --format=%s top/main >actual &&\n \ttest_write_lines add-1-back 4 3 >expect &&\n \ttest_cmp expect actual\n \t) &&\n@@ -138,7 +138,7 @@ test_expect_success 'fetch that requires changes in .git/shallow is filtered' '\n test_expect_success 'fetch --update-shallow' '\n \t(\n \tcd shallow &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcommit 7 &&\n \tgit tag -m foo heavy-tag HEAD^ &&\n \tgit tag light-tag HEAD^:tracked\n@@ -149,13 +149,13 @@ test_expect_success 'fetch --update-shallow' '\n \tgit fsck &&\n \tgit for-each-ref --sort=refname --format=\"%(refname)\" >actual.refs &&\n \tcat <<-\\EOF >expect.refs &&\n-\trefs/remotes/shallow/master\n+\trefs/remotes/shallow/main\n \trefs/remotes/shallow/no-shallow\n \trefs/tags/heavy-tag\n \trefs/tags/light-tag\n \tEOF\n \ttest_cmp expect.refs actual.refs &&\n-\tgit log --format=%s shallow/master >actual &&\n+\tgit log --format=%s shallow/main >actual &&\n \ttest_write_lines 7 6 5 4 3 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -164,7 +164,7 @@ test_expect_success 'fetch --update-shallow' '\n test_expect_success 'fetch --update-shallow (with fetch.writeCommitGraph)' '\n \t(\n \tcd shallow &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcommit 8 &&\n \tgit tag -m foo heavy-tag-for-graph HEAD^ &&\n \tgit tag light-tag-for-graph HEAD^:tracked\n@@ -176,7 +176,7 @@ test_expect_success 'fetch --update-shallow (with fetch.writeCommitGraph)' '\n \tgit fsck &&\n \tgit for-each-ref --sort=refname --format=\"%(refname)\" >actual.refs &&\n \tcat <<-EOF >expect.refs &&\n-\trefs/remotes/shallow/master\n+\trefs/remotes/shallow/main\n \trefs/remotes/shallow/no-shallow\n \trefs/tags/heavy-tag\n \trefs/tags/heavy-tag-for-graph\n@@ -184,7 +184,7 @@ test_expect_success 'fetch --update-shallow (with fetch.writeCommitGraph)' '\n \trefs/tags/light-tag-for-graph\n \tEOF\n \ttest_cmp expect.refs actual.refs &&\n-\tgit log --format=%s shallow/master >actual &&\n+\tgit log --format=%s shallow/main >actual &&\n \ttest_write_lines 8 7 6 5 4 3 >expect &&\n \ttest_cmp expect actual\n \t)\n@@ -209,7 +209,7 @@ test_expect_success '.git/shallow is edited by repack' '\n \ttest_commit -C shallow-server E &&\n \ttest_commit -C shallow-server D &&\n \td=\"$(git -C shallow-server rev-parse --verify D^0)\" &&\n-\tgit -C shallow-server checkout master &&\n+\tgit -C shallow-server checkout main &&\n \n \tgit clone --depth=1 --no-tags --no-single-branch \\\n \t\t\"file://$PWD/shallow-server\" shallow-client &&\n@@ -247,7 +247,7 @@ test_expect_success 'shallow fetches check connectivity before writing shallow f\n \tgit -C \"$REPO\" config protocol.version 2 &&\n \tgit -C client config protocol.version 2 &&\n \n-\tgit -C client fetch --depth=2 \"$HTTPD_URL/one_time_perl/repo\" master:a_branch &&\n+\tgit -C client fetch --depth=2 \"$HTTPD_URL/one_time_perl/repo\" main:a_branch &&\n \n \t# Craft a situation in which the server sends back an unshallow request\n \t# with an empty packfile. This is done by refetching with a shorter\n@@ -259,7 +259,7 @@ test_expect_success 'shallow fetches check connectivity before writing shallow f\n \t       >\"$HTTPD_ROOT_PATH/one-time-perl\" &&\n \ttest_must_fail env GIT_TEST_SIDEBAND_ALL=0 git -C client \\\n \t\tfetch --depth=1 \"$HTTPD_URL/one_time_perl/repo\" \\\n-\t\tmaster:a_branch &&\n+\t\tmain:a_branch &&\n \n \t# Ensure that the one-time-perl script was used.\n \t! test -e \"$HTTPD_ROOT_PATH/one-time-perl\" &&\ndiff --git a/t/t5538-push-shallow.sh b/t/t5538-push-shallow.sh\nindex 1253429d5d..e91fcc173e 100755\n--- a/t/t5538-push-shallow.sh\n+++ b/t/t5538-push-shallow.sh\n@@ -2,7 +2,7 @@\n \n test_description='push from/to a shallow clone'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -47,9 +47,9 @@ test_expect_success 'push from shallow clone' '\n \t(\n \tcd shallow &&\n \tcommit 5 &&\n-\tgit push ../.git +master:refs/remotes/shallow/master\n+\tgit push ../.git +main:refs/remotes/shallow/main\n \t) &&\n-\tgit log --format=%s shallow/master >actual &&\n+\tgit log --format=%s shallow/main >actual &&\n \tgit fsck &&\n \tcat <<EOF >expect &&\n 5\n@@ -64,10 +64,10 @@ EOF\n test_expect_success 'push from shallow clone, with grafted roots' '\n \t(\n \tcd shallow2 &&\n-\ttest_must_fail git push ../.git +master:refs/remotes/shallow2/master 2>err &&\n-\tgrep \"shallow2/master.*shallow update not allowed\" err\n+\ttest_must_fail git push ../.git +main:refs/remotes/shallow2/main 2>err &&\n+\tgrep \"shallow2/main.*shallow update not allowed\" err\n \t) &&\n-\ttest_must_fail git rev-parse shallow2/master &&\n+\ttest_must_fail git rev-parse shallow2/main &&\n \tgit fsck\n '\n \n@@ -75,9 +75,9 @@ test_expect_success 'add new shallow root with receive.updateshallow on' '\n \ttest_config receive.shallowupdate true &&\n \t(\n \tcd shallow2 &&\n-\tgit push ../.git +master:refs/remotes/shallow2/master\n+\tgit push ../.git +main:refs/remotes/shallow2/main\n \t) &&\n-\tgit log --format=%s shallow2/master >actual &&\n+\tgit log --format=%s shallow2/main >actual &&\n \tgit fsck &&\n \tcat <<EOF >expect &&\n c\n@@ -90,12 +90,12 @@ test_expect_success 'push from shallow to shallow' '\n \t(\n \tcd shallow &&\n \tgit --git-dir=../shallow2/.git config receive.shallowupdate true &&\n-\tgit push ../shallow2/.git +master:refs/remotes/shallow/master &&\n+\tgit push ../shallow2/.git +main:refs/remotes/shallow/main &&\n \tgit --git-dir=../shallow2/.git config receive.shallowupdate false\n \t) &&\n \t(\n \tcd shallow2 &&\n-\tgit log --format=%s shallow/master >actual &&\n+\tgit log --format=%s shallow/main >actual &&\n \tgit fsck &&\n \tcat <<EOF >expect &&\n 5\n@@ -109,10 +109,10 @@ EOF\n test_expect_success 'push from full to shallow' '\n \t! git --git-dir=shallow2/.git cat-file blob $(echo 1|git hash-object --stdin) &&\n \tcommit 1 &&\n-\tgit push shallow2/.git +master:refs/remotes/top/master &&\n+\tgit push shallow2/.git +main:refs/remotes/top/main &&\n \t(\n \tcd shallow2 &&\n-\tgit log --format=%s top/master >actual &&\n+\tgit log --format=%s top/main >actual &&\n \tgit fsck &&\n \tcat <<EOF >expect &&\n 1\ndiff --git a/t/t5539-fetch-http-shallow.sh b/t/t5539-fetch-http-shallow.sh\nindex 1da2a7533e..3ea75d34ca 100755\n--- a/t/t5539-fetch-http-shallow.sh\n+++ b/t/t5539-fetch-http-shallow.sh\n@@ -2,7 +2,7 @@\n \n test_description='fetch/clone from a shallow clone over http'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -35,7 +35,7 @@ test_expect_success 'clone http repository' '\n \t(\n \tcd clone &&\n \tgit fsck &&\n-\tgit log --format=%s origin/master >actual &&\n+\tgit log --format=%s origin/main >actual &&\n \tcat <<EOF >expect &&\n 7\n 6\n@@ -63,9 +63,9 @@ test_expect_success 'no shallow lines after receiving ACK ready' '\n \t\t\t\trefs/heads/unrelated$i:refs/heads/unrelated$i ||\n \t\t\texit 1\n \t\tdone &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit new &&\n-\t\tgit push  \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" master\n+\t\tgit push  \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" main\n \t) &&\n \t(\n \t\tcd clone &&\n@@ -98,7 +98,7 @@ test_expect_success 'clone shallow since ...' '\n \n test_expect_success 'fetch shallow since ...' '\n \tgit -C shallow11 fetch --shallow-since \"200000000 +0700\" origin &&\n-\tgit -C shallow11 log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C shallow11 log --pretty=tformat:%s origin/main >actual &&\n \tcat >expected <<-\\EOF &&\n \tthree\n \ttwo\n@@ -123,7 +123,7 @@ test_expect_success 'shallow clone exclude tag two' '\n \n test_expect_success 'fetch exclude tag one' '\n \tgit -C shallow12 fetch --shallow-exclude one origin &&\n-\tgit -C shallow12 log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C shallow12 log --pretty=tformat:%s origin/main >actual &&\n \ttest_write_lines three two >expected &&\n \ttest_cmp expected actual\n '\n@@ -139,12 +139,12 @@ test_expect_success 'fetching deepen' '\n \tgit clone --depth 1 $HTTPD_URL/smart/shallow-deepen.git deepen &&\n \tmv \"$HTTPD_DOCUMENT_ROOT_PATH/shallow-deepen.git\" .git &&\n \ttest_commit four &&\n-\tgit -C deepen log --pretty=tformat:%s master >actual &&\n+\tgit -C deepen log --pretty=tformat:%s main >actual &&\n \techo three >expected &&\n \ttest_cmp expected actual &&\n \tmv .git \"$HTTPD_DOCUMENT_ROOT_PATH/shallow-deepen.git\" &&\n \tgit -C deepen fetch --deepen=1 &&\n-\tgit -C deepen log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C deepen log --pretty=tformat:%s origin/main >actual &&\n \tcat >expected <<-\\EOF &&\n \tfour\n \tthree\n-- \ngitgitgadget\n\n"},{"id":"410294","messageId":"f7a9bc07c7a2ee702082aedb58ccc8c540286ec9.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 12/28] t5503: prepare aligned comment for replacing `master` with `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:30Z","receivedAt":"2020-11-18T23:45:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn an upcoming commit, we will use `main` as the default branch name in\nt5503 instead of `master`. This will require extra padding in ASCII-art\ncommit graphs, which we hereby add preemptively.\n\nBy doing this preemptively rather than after the commit applying the\nsearch-and-replace, it is more obvious that we caught all aligned\ncomments that are affected by the latter commit.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5503-tagfollow.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t5503-tagfollow.sh b/t/t5503-tagfollow.sh\nindex cd1f407174..525dd21ecb 100755\n--- a/t/t5503-tagfollow.sh\n+++ b/t/t5503-tagfollow.sh\n@@ -14,7 +14,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n #   L - A ------ O ------ B\n #    \\   \\                 \\\n #     \\   C - origin/cat    \\\n-#      origin/master         master\n+#      origin/master           master\n \n test_expect_success setup '\n \ttest_tick &&\n-- \ngitgitgadget\n\n"},{"id":"410303","messageId":"9b7749dcdedf7dbc73f91bcf04c3d96c1340f7c1.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 03/28] t[01]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:21Z","receivedAt":"2020-11-18T23:45:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t1309, which sees independent development elsewhere\nat the time of writing, we transition above-mentioned tests to the\ndefault branch name `main`. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -e 's/naster/nain/g' -- t[01]*.sh &&\n\t   git checkout HEAD -- t1309\\*)\n\nNote that t5533 contains a variation of the name `master` (`naster`)\nthat we rename here, too.\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nHelped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t0002-gitfile.sh                   |  8 ++--\n t/t0020-crlf.sh                      | 10 ++--\n t/t0021-conversion.sh                | 42 ++++++++---------\n t/t0027-auto-crlf.sh                 |  4 +-\n t/t0028-working-tree-encoding.sh     |  6 +--\n t/t0041-usage.sh                     | 12 ++---\n t/t0050-filesystem.sh                |  8 ++--\n t/t0060-path-utils.sh                |  4 +-\n t/t0100-previous.sh                  | 20 ++++----\n t/t1004-read-tree-m-u-wf.sh          | 42 ++++++++---------\n t/t1008-read-tree-overlay.sh         |  4 +-\n t/t1009-read-tree-new-index.sh       |  6 +--\n t/t1011-read-tree-sparse-checkout.sh |  2 +-\n t/t1021-rerere-in-workdir.sh         |  4 +-\n t/t1090-sparse-checkout-scope.sh     | 12 ++---\n t/t1091-sparse-checkout-builtin.sh   |  4 +-\n t/t1300-config.sh                    | 10 ++--\n t/t1301-shared-repo.sh               |  6 +--\n t/t1305-config-include.sh            |  2 +-\n t/t1400-update-ref.sh                | 70 ++++++++++++++--------------\n t/t1402-check-ref-format.sh          | 32 ++++++-------\n t/t1403-show-ref.sh                  | 20 ++++----\n t/t1405-main-ref-store.sh            | 44 ++++++++---------\n t/t1406-submodule-ref-store.sh       | 32 ++++++-------\n t/t1407-worktree-ref-store.sh        | 34 +++++++-------\n t/t1408-packed-refs.sh               | 14 +++---\n t/t1410-reflog.sh                    | 58 +++++++++++------------\n t/t1411-reflog-show.sh               |  4 +-\n t/t1413-reflog-detach.sh             | 26 +++++------\n t/t1414-reflog-walk.sh               | 14 +++---\n t/t1416-ref-transaction-hooks.sh     | 12 ++---\n t/t1430-bad-ref-name.sh              | 54 ++++++++++-----------\n t/t1450-fsck.sh                      |  2 +-\n t/t1500-rev-parse.sh                 |  6 +--\n t/t1503-rev-parse-verify.sh          | 30 ++++++------\n t/t1505-rev-parse-last.sh            | 10 ++--\n t/t1506-rev-parse-diagnosis.sh       |  6 +--\n t/t1507-rev-parse-upstream.sh        | 42 ++++++++---------\n t/t1508-at-combinations.sh           | 12 ++---\n t/t1511-rev-parse-caret.sh           | 28 +++++------\n t/t1512-rev-parse-disambiguation.sh  |  4 +-\n t/t1513-rev-parse-prefix.sh          |  6 +--\n t/t1514-rev-parse-push.sh            | 18 +++----\n t/t1700-split-index.sh               |  4 +-\n 44 files changed, 394 insertions(+), 394 deletions(-)\n\ndiff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh\nindex 0a396c95e5..8440e6add1 100755\n--- a/t/t0002-gitfile.sh\n+++ b/t/t0002-gitfile.sh\n@@ -4,7 +4,7 @@ test_description='.git file\n \n Verify that plumbing commands work when .git is a file\n '\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -99,7 +99,7 @@ test_expect_success 'enter_repo non-strict mode' '\n \tgit ls-remote enter_repo >actual &&\n \tcat >expected <<-EOF &&\n \t$head\tHEAD\n-\t$head\trefs/heads/master\n+\t$head\trefs/heads/main\n \t$head\trefs/tags/foo\n \tEOF\n \ttest_cmp expected actual\n@@ -114,7 +114,7 @@ test_expect_success 'enter_repo linked checkout' '\n \tgit ls-remote foo >actual &&\n \tcat >expected <<-EOF &&\n \t$head\tHEAD\n-\t$head\trefs/heads/master\n+\t$head\trefs/heads/main\n \t$head\trefs/tags/foo\n \tEOF\n \ttest_cmp expected actual\n@@ -125,7 +125,7 @@ test_expect_success 'enter_repo strict mode' '\n \tgit ls-remote --upload-pack=\"git upload-pack --strict\" foo/.git >actual &&\n \tcat >expected <<-EOF &&\n \t$head\tHEAD\n-\t$head\trefs/heads/master\n+\t$head\trefs/heads/main\n \t$head\trefs/tags/foo\n \tEOF\n \ttest_cmp expected actual\ndiff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh\nindex 0d43189048..375cf94398 100755\n--- a/t/t0020-crlf.sh\n+++ b/t/t0020-crlf.sh\n@@ -2,7 +2,7 @@\n \n test_description='CRLF conversion'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -321,8 +321,8 @@ test_expect_success 'checkout with existing .gitattributes' '\n \tgit add .gitattributes .file &&\n \tgit commit -m second &&\n \n-\tgit checkout master~1 &&\n-\tgit checkout master &&\n+\tgit checkout main~1 &&\n+\tgit checkout main &&\n \ttest \"$(git diff-files --raw)\" = \"\"\n \n '\n@@ -334,8 +334,8 @@ test_expect_success 'checkout when deleting .gitattributes' '\n \tgit add .file2 &&\n \tgit commit -m third &&\n \n-\tgit checkout master~1 &&\n-\tgit checkout master &&\n+\tgit checkout main~1 &&\n+\tgit checkout main &&\n \thas_cr .file2\n \n '\ndiff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh\nindex adf862aef1..e4c4de5c74 100755\n--- a/t/t0021-conversion.sh\n+++ b/t/t0021-conversion.sh\n@@ -2,7 +2,7 @@\n \n test_description='blob conversion via gitattributes'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -381,8 +381,8 @@ test_expect_success PERL 'required process filter should filter data' '\n \t\ttest_cmp_count expected.log debug.log &&\n \n \t\tgit commit -m \"test commit 2\" &&\n-\t\tMASTER=$(git rev-parse --verify master) &&\n-\t\tMETA=\"ref=refs/heads/master treeish=$MASTER\" &&\n+\t\tMAIN=$(git rev-parse --verify main) &&\n+\t\tMETA=\"ref=refs/heads/main treeish=$MAIN\" &&\n \t\trm -f test2.r \"testsubdir/test3 '\\''sq'\\'',\\$x=.r\" &&\n \n \t\tfilter_git checkout --quiet --no-progress . &&\n@@ -407,7 +407,7 @@ test_expect_success PERL 'required process filter should filter data' '\n \t\tEOF\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n-\t\tfilter_git checkout --quiet --no-progress master &&\n+\t\tfilter_git checkout --quiet --no-progress main &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -439,15 +439,15 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\tM3=$(git hash-object \"testsubdir/test3 '\\''sq'\\'',\\$x=.r\") &&\n \t\tEMPTY=$(git hash-object /dev/null) &&\n \n-\t\tMASTER=$(git rev-parse --verify master) &&\n+\t\tMAIN=$(git rev-parse --verify main) &&\n \n \t\tcp \"$TEST_ROOT/test.o\" test5.r &&\n \t\tgit add test5.r &&\n \t\tgit commit -m \"test commit 3\" &&\n \t\tgit checkout empty-branch &&\n-\t\tfilter_git rebase --onto empty-branch master^^ master &&\n-\t\tMASTER2=$(git rev-parse --verify master) &&\n-\t\tMETA=\"ref=refs/heads/master treeish=$MASTER2\" &&\n+\t\tfilter_git rebase --onto empty-branch main^^ main &&\n+\t\tMAIN2=$(git rev-parse --verify main) &&\n+\t\tMETA=\"ref=refs/heads/main treeish=$MAIN2\" &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -461,8 +461,8 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n \t\tgit reset --hard empty-branch &&\n-\t\tfilter_git reset --hard $MASTER &&\n-\t\tMETA=\"treeish=$MASTER\" &&\n+\t\tfilter_git reset --hard $MAIN &&\n+\t\tMETA=\"treeish=$MAIN\" &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -474,10 +474,10 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\tEOF\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n-\t\tgit branch old-master $MASTER &&\n+\t\tgit branch old-main $MAIN &&\n \t\tgit reset --hard empty-branch &&\n-\t\tfilter_git reset --hard old-master &&\n-\t\tMETA=\"ref=refs/heads/old-master treeish=$MASTER\" &&\n+\t\tfilter_git reset --hard old-main &&\n+\t\tMETA=\"ref=refs/heads/old-main treeish=$MAIN\" &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -490,9 +490,9 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n \t\tgit checkout -b merge empty-branch &&\n-\t\tgit branch -f master $MASTER2 &&\n-\t\tfilter_git merge master &&\n-\t\tMETA=\"treeish=$MASTER2\" &&\n+\t\tgit branch -f main $MAIN2 &&\n+\t\tfilter_git merge main &&\n+\t\tMETA=\"treeish=$MAIN2\" &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -505,8 +505,8 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\tEOF\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n-\t\tfilter_git archive master >/dev/null &&\n-\t\tMETA=\"ref=refs/heads/master treeish=$MASTER2\" &&\n+\t\tfilter_git archive main >/dev/null &&\n+\t\tMETA=\"ref=refs/heads/main treeish=$MAIN2\" &&\n \t\tcat >expected.log <<-EOF &&\n \t\t\tSTART\n \t\t\tinit handshake complete\n@@ -519,7 +519,7 @@ test_expect_success PERL 'required process filter should filter data for various\n \t\tEOF\n \t\ttest_cmp_exclude_clean expected.log debug.log &&\n \n-\t\tTREE=\"$(git rev-parse $MASTER2^{tree})\" &&\n+\t\tTREE=\"$(git rev-parse $MAIN2^{tree})\" &&\n \t\tfilter_git archive $TREE >/dev/null &&\n \t\tMETA=\"treeish=$TREE\" &&\n \t\tcat >expected.log <<-EOF &&\n@@ -859,8 +859,8 @@ test_expect_success PERL 'delayed checkout in process filter' '\n \t) &&\n \n \tS=$(test_file_size \"$TEST_ROOT/test.o\") &&\n-\tPM=\"ref=refs/heads/master treeish=$(git -C repo rev-parse --verify master) \" &&\n-\tM=\"${PM}blob=$(git -C repo rev-parse --verify master:test.a)\" &&\n+\tPM=\"ref=refs/heads/main treeish=$(git -C repo rev-parse --verify main) \" &&\n+\tM=\"${PM}blob=$(git -C repo rev-parse --verify main:test.a)\" &&\n \tcat >a.exp <<-EOF &&\n \t\tSTART\n \t\tinit handshake complete\ndiff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh\nindex 9fcd56fab3..51f74a3ddf 100755\n--- a/t/t0027-auto-crlf.sh\n+++ b/t/t0027-auto-crlf.sh\n@@ -368,9 +368,9 @@ test_expect_success 'ls-files --eol -o Text/Binary' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'setup master' '\n+test_expect_success 'setup main' '\n \techo >.gitattributes &&\n-\tgit checkout -b master &&\n+\tgit checkout -b main &&\n \tgit add .gitattributes &&\n \tgit commit -m \"add .gitattributes\" . &&\n \tprintf \"\\$Id: 0000000000000000000000000000000000000000 \\$\\nLINEONE\\nLINETWO\\nLINETHREE\"     >LF &&\ndiff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh\nindex ccdc91c41c..f970a9806b 100755\n--- a/t/t0028-working-tree-encoding.sh\n+++ b/t/t0028-working-tree-encoding.sh\n@@ -2,7 +2,7 @@\n \n test_description='working-tree-encoding conversion via gitattributes'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -218,7 +218,7 @@ test_expect_success 'error if encoding round trip is not the same during refresh\n \tTEST_HASH=$(git hash-object --no-filters -w nonsense.utf16le) &&\n \tgit update-index --add --cacheinfo 100644 $TEST_HASH nonsense.utf16le &&\n \tCOMMIT=$(git commit-tree -p $(git rev-parse HEAD) -m \"plain commit\" $(git write-tree)) &&\n-\tgit update-ref refs/heads/master $COMMIT &&\n+\tgit update-ref refs/heads/main $COMMIT &&\n \n \ttest_must_fail git checkout HEAD^ 2>err.out &&\n \ttest_i18ngrep \"error: .* overwritten by checkout:\" err.out\n@@ -234,7 +234,7 @@ test_expect_success 'error if encoding garbage is already in Git' '\n \tTEST_HASH=$(git hash-object --no-filters -w nonsense.utf16) &&\n \tgit update-index --add --cacheinfo 100644 $TEST_HASH nonsense.utf16 &&\n \tCOMMIT=$(git commit-tree -p $(git rev-parse HEAD) -m \"plain commit\" $(git write-tree)) &&\n-\tgit update-ref refs/heads/master $COMMIT &&\n+\tgit update-ref refs/heads/main $COMMIT &&\n \n \tgit diff 2>err.out &&\n \ttest_i18ngrep \"error: BOM is required\" err.out\ndiff --git a/t/t0041-usage.sh b/t/t0041-usage.sh\nindex 068b784e72..c4fc34eb18 100755\n--- a/t/t0041-usage.sh\n+++ b/t/t0041-usage.sh\n@@ -2,7 +2,7 @@\n \n test_description='Test commands behavior when given invalid argument value'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -44,8 +44,8 @@ test_expect_success 'tag usage error' '\n '\n \n test_expect_success 'branch --contains <existent_commit>' '\n-\tgit branch --contains \"master\" >actual 2>actual.err &&\n-\ttest_i18ngrep \"master\" actual &&\n+\tgit branch --contains \"main\" >actual 2>actual.err &&\n+\ttest_i18ngrep \"main\" actual &&\n \ttest_line_count = 0 actual.err\n '\n \n@@ -57,7 +57,7 @@ test_expect_success 'branch --contains <inexistent_commit>' '\n '\n \n test_expect_success 'branch --no-contains <existent_commit>' '\n-\tgit branch --no-contains \"master\" >actual 2>actual.err &&\n+\tgit branch --no-contains \"main\" >actual 2>actual.err &&\n \ttest_line_count = 0 actual &&\n \ttest_line_count = 0 actual.err\n '\n@@ -76,7 +76,7 @@ test_expect_success 'branch usage error' '\n '\n \n test_expect_success 'for-each-ref --contains <existent_object>' '\n-\tgit for-each-ref --contains \"master\" >actual 2>actual.err &&\n+\tgit for-each-ref --contains \"main\" >actual 2>actual.err &&\n \ttest_line_count = 2 actual &&\n \ttest_line_count = 0 actual.err\n '\n@@ -89,7 +89,7 @@ test_expect_success 'for-each-ref --contains <inexistent_object>' '\n '\n \n test_expect_success 'for-each-ref --no-contains <existent_object>' '\n-\tgit for-each-ref --no-contains \"master\" >actual 2>actual.err &&\n+\tgit for-each-ref --no-contains \"main\" >actual 2>actual.err &&\n \ttest_line_count = 0 actual &&\n \ttest_line_count = 0 actual.err\n '\ndiff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh\nindex 368f7d515b..afc343cf9b 100755\n--- a/t/t0050-filesystem.sh\n+++ b/t/t0050-filesystem.sh\n@@ -2,7 +2,7 @@\n \n test_description='Various filesystem issues'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -68,7 +68,7 @@ test_expect_success \"setup case tests\" '\n \tgit mv camelcase tmp &&\n \tgit mv tmp CamelCase &&\n \tgit commit -m \"rename\" &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'rename (case change)' '\n@@ -121,7 +121,7 @@ test_expect_success \"setup unicode normalization tests\" '\n \tgit mv $aumlcdiar tmp &&\n \tgit mv tmp \"$auml\" &&\n \tgit commit -m rename &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n $test_unicode 'rename (silent unicode normalization)' '\n@@ -150,7 +150,7 @@ test_expect_success CASE_INSENSITIVE_FS 'checkout with no pathspec and a case in\n \t\tgit add gitweb &&\n \t\tgit commit -m \"add gitweb/subdir/file\" &&\n \n-\t\tgit checkout master\n+\t\tgit checkout main\n \t)\n '\n \ndiff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh\nindex 928eebbdc0..fab077b6f7 100755\n--- a/t/t0060-path-utils.sh\n+++ b/t/t0060-path-utils.sh\n@@ -312,8 +312,8 @@ test_git_path GIT_COMMON_DIR=bar info/sparse-checkout     .git/info/sparse-check\n test_git_path GIT_COMMON_DIR=bar info//sparse-checkout    .git/info//sparse-checkout\n test_git_path GIT_COMMON_DIR=bar remotes/bar              bar/remotes/bar\n test_git_path GIT_COMMON_DIR=bar branches/bar             bar/branches/bar\n-test_git_path GIT_COMMON_DIR=bar logs/refs/heads/master     bar/logs/refs/heads/master\n-test_git_path GIT_COMMON_DIR=bar refs/heads/master          bar/refs/heads/master\n+test_git_path GIT_COMMON_DIR=bar logs/refs/heads/main     bar/logs/refs/heads/main\n+test_git_path GIT_COMMON_DIR=bar refs/heads/main          bar/refs/heads/main\n test_git_path GIT_COMMON_DIR=bar refs/bisect/foo          .git/refs/bisect/foo\n test_git_path GIT_COMMON_DIR=bar hooks/me                 bar/hooks/me\n test_git_path GIT_COMMON_DIR=bar config                   bar/config\ndiff --git a/t/t0100-previous.sh b/t/t0100-previous.sh\nindex c3c2770ab3..69beb59f62 100755\n--- a/t/t0100-previous.sh\n+++ b/t/t0100-previous.sh\n@@ -2,7 +2,7 @@\n \n test_description='previous branch syntax @{-n}'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -11,7 +11,7 @@ test_expect_success 'branch -d @{-1}' '\n \ttest_commit A &&\n \tgit checkout -b junk &&\n \tgit checkout - &&\n-\ttest \"$(git symbolic-ref HEAD)\" = refs/heads/master &&\n+\ttest \"$(git symbolic-ref HEAD)\" = refs/heads/main &&\n \tgit branch -d @{-1} &&\n \ttest_must_fail git rev-parse --verify refs/heads/junk\n '\n@@ -20,9 +20,9 @@ test_expect_success 'branch -d @{-12} when there is not enough switches yet' '\n \tgit reflog expire --expire=now &&\n \tgit checkout -b junk2 &&\n \tgit checkout - &&\n-\ttest \"$(git symbolic-ref HEAD)\" = refs/heads/master &&\n+\ttest \"$(git symbolic-ref HEAD)\" = refs/heads/main &&\n \ttest_must_fail git branch -d @{-12} &&\n-\tgit rev-parse --verify refs/heads/master\n+\tgit rev-parse --verify refs/heads/main\n '\n \n test_expect_success 'merge @{-1}' '\n@@ -31,19 +31,19 @@ test_expect_success 'merge @{-1}' '\n \tgit checkout A &&\n \ttest_commit C &&\n \ttest_commit D &&\n-\tgit branch -f master B &&\n+\tgit branch -f main B &&\n \tgit branch -f other &&\n \tgit checkout other &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge @{-1} &&\n \tgit cat-file commit HEAD | grep \"Merge branch '\\''other'\\''\"\n '\n \n test_expect_success 'merge @{-1}~1' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard B &&\n \tgit checkout other &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge @{-1}~1 &&\n \tgit cat-file commit HEAD >actual &&\n \tgrep \"Merge branch '\\''other'\\''\" actual\n@@ -51,11 +51,11 @@ test_expect_success 'merge @{-1}~1' '\n \n test_expect_success 'merge @{-100} before checking out that many branches yet' '\n \tgit reflog expire --expire=now &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard B &&\n \tgit branch -f other C &&\n \tgit checkout other &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git merge @{-100}\n '\n \ndiff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh\nindex 57caa3a73f..11bf10424f 100755\n--- a/t/t1004-read-tree-m-u-wf.sh\n+++ b/t/t1004-read-tree-m-u-wf.sh\n@@ -2,7 +2,7 @@\n \n test_description='read-tree -m -u checks working tree files'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -23,17 +23,17 @@ test_expect_success 'two-way setup' '\n \tgit branch side &&\n \tgit tag -f branch-point &&\n \n-\techo file2 is not tracked on the master branch anymore &&\n+\techo file2 is not tracked on the main branch anymore &&\n \trm -f file2 subdir/file2 &&\n \tgit update-index --remove file2 subdir/file2 &&\n-\tgit commit -a -m \"master removes file2 and subdir/file2\"\n+\tgit commit -a -m \"main removes file2 and subdir/file2\"\n '\n \n test_expect_success 'two-way not clobbering' '\n \n-\techo >file2 master creates untracked file2 &&\n-\techo >subdir/file2 master creates untracked subdir/file2 &&\n-\tif err=$(read_tree_u_must_succeed -m -u master side 2>&1)\n+\techo >file2 main creates untracked file2 &&\n+\techo >subdir/file2 main creates untracked subdir/file2 &&\n+\tif err=$(read_tree_u_must_succeed -m -u main side 2>&1)\n \tthen\n \t\techo should have complained\n \t\tfalse\n@@ -46,7 +46,7 @@ echo file2 >.gitignore\n \n test_expect_success 'two-way with incorrect --exclude-per-directory (1)' '\n \n-\tif err=$(read_tree_u_must_succeed -m --exclude-per-directory=.gitignore master side 2>&1)\n+\tif err=$(read_tree_u_must_succeed -m --exclude-per-directory=.gitignore main side 2>&1)\n \tthen\n \t\techo should have complained\n \t\tfalse\n@@ -57,7 +57,7 @@ test_expect_success 'two-way with incorrect --exclude-per-directory (1)' '\n \n test_expect_success 'two-way with incorrect --exclude-per-directory (2)' '\n \n-\tif err=$(read_tree_u_must_succeed -m -u --exclude-per-directory=foo --exclude-per-directory=.gitignore master side 2>&1)\n+\tif err=$(read_tree_u_must_succeed -m -u --exclude-per-directory=foo --exclude-per-directory=.gitignore main side 2>&1)\n \tthen\n \t\techo should have complained\n \t\tfalse\n@@ -68,7 +68,7 @@ test_expect_success 'two-way with incorrect --exclude-per-directory (2)' '\n \n test_expect_success 'two-way clobbering a ignored file' '\n \n-\tread_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore master side\n+\tread_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore main side\n '\n \n rm -f .gitignore\n@@ -84,21 +84,21 @@ test_expect_success 'three-way not complaining on an untracked path in both' '\n \tgit update-index --add file3 subdir/file3 &&\n \tgit commit -a -m \"side adds file3 and removes file2\" &&\n \n-\tgit checkout master &&\n-\techo >file2 file two is untracked on the master side &&\n-\techo >subdir/file2 file two is untracked on the master side &&\n+\tgit checkout main &&\n+\techo >file2 file two is untracked on the main side &&\n+\techo >subdir/file2 file two is untracked on the main side &&\n \n-\tread_tree_u_must_succeed -m -u branch-point master side\n+\tread_tree_u_must_succeed -m -u branch-point main side\n '\n \n test_expect_success 'three-way not clobbering a working tree file' '\n \n \tgit reset --hard &&\n \trm -f file2 subdir/file2 file3 subdir/file3 &&\n-\tgit checkout master &&\n-\techo >file3 file three created in master, untracked &&\n-\techo >subdir/file3 file three created in master, untracked &&\n-\tif err=$(read_tree_u_must_succeed -m -u branch-point master side 2>&1)\n+\tgit checkout main &&\n+\techo >file3 file three created in main, untracked &&\n+\techo >subdir/file3 file three created in main, untracked &&\n+\tif err=$(read_tree_u_must_succeed -m -u branch-point main side 2>&1)\n \tthen\n \t\techo should have complained\n \t\tfalse\n@@ -113,11 +113,11 @@ test_expect_success 'three-way not complaining on an untracked file' '\n \n \tgit reset --hard &&\n \trm -f file2 subdir/file2 file3 subdir/file3 &&\n-\tgit checkout master &&\n-\techo >file3 file three created in master, untracked &&\n-\techo >subdir/file3 file three created in master, untracked &&\n+\tgit checkout main &&\n+\techo >file3 file three created in main, untracked &&\n+\techo >subdir/file3 file three created in main, untracked &&\n \n-\tread_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore branch-point master side\n+\tread_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore branch-point main side\n '\n \n test_expect_success '3-way not overwriting local changes (setup)' '\ndiff --git a/t/t1008-read-tree-overlay.sh b/t/t1008-read-tree-overlay.sh\nindex edb89447c7..4512fb0b6e 100755\n--- a/t/t1008-read-tree-overlay.sh\n+++ b/t/t1008-read-tree-overlay.sh\n@@ -2,7 +2,7 @@\n \n test_description='test multi-tree read-tree without merging'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -25,7 +25,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'multi-read' '\n-\tread_tree_must_succeed initial master side &&\n+\tread_tree_must_succeed initial main side &&\n \ttest_write_lines a b/c >expect &&\n \tgit ls-files >actual &&\n \ttest_cmp expect actual\ndiff --git a/t/t1009-read-tree-new-index.sh b/t/t1009-read-tree-new-index.sh\nindex b9bab37ac0..2935f68f8d 100755\n--- a/t/t1009-read-tree-new-index.sh\n+++ b/t/t1009-read-tree-new-index.sh\n@@ -2,7 +2,7 @@\n \n test_description='test read-tree into a fresh index file'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -15,13 +15,13 @@ test_expect_success setup '\n \n test_expect_success 'non-existent index file' '\n \trm -f new-index &&\n-\tGIT_INDEX_FILE=new-index git read-tree master\n+\tGIT_INDEX_FILE=new-index git read-tree main\n '\n \n test_expect_success 'empty index file' '\n \trm -f new-index &&\n \t> new-index &&\n-\tGIT_INDEX_FILE=new-index git read-tree master\n+\tGIT_INDEX_FILE=new-index git read-tree main\n '\n \n test_done\ndiff --git a/t/t1011-read-tree-sparse-checkout.sh b/t/t1011-read-tree-sparse-checkout.sh\nindex 140f459977..dfe9794a74 100755\n--- a/t/t1011-read-tree-sparse-checkout.sh\n+++ b/t/t1011-read-tree-sparse-checkout.sh\n@@ -2,7 +2,7 @@\n \n test_description='sparse checkout tests\n \n-* (tag: removed, master) removed\n+* (tag: removed, main) removed\n | D\tsub/added\n * (HEAD, tag: top) modified and added\n | M\tinit.t\ndiff --git a/t/t1021-rerere-in-workdir.sh b/t/t1021-rerere-in-workdir.sh\nindex 9177871c99..0b892894eb 100755\n--- a/t/t1021-rerere-in-workdir.sh\n+++ b/t/t1021-rerere-in-workdir.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='rerere run in a workdir'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -22,7 +22,7 @@ test_expect_success SYMLINKS setup '\n \ttest_tick &&\n \tgit commit -a -m goodbye &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success SYMLINKS 'rerere in workdir' '\ndiff --git a/t/t1090-sparse-checkout-scope.sh b/t/t1090-sparse-checkout-scope.sh\nindex d731322633..3deb490187 100755\n--- a/t/t1090-sparse-checkout-scope.sh\n+++ b/t/t1090-sparse-checkout-scope.sh\n@@ -2,7 +2,7 @@\n \n test_description='sparse checkout scope tests'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -23,18 +23,18 @@ test_expect_success 'create feature branch' '\n \tgit commit -m \"modification\"\n '\n \n-test_expect_success 'perform sparse checkout of master' '\n+test_expect_success 'perform sparse checkout of main' '\n \tgit config --local --bool core.sparsecheckout true &&\n \techo \"!/*\" >.git/info/sparse-checkout &&\n \techo \"/a\" >>.git/info/sparse-checkout &&\n \techo \"/c\" >>.git/info/sparse-checkout &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_path_is_file a &&\n \ttest_path_is_missing b &&\n \ttest_path_is_file c\n '\n \n-test_expect_success 'merge feature branch into sparse checkout of master' '\n+test_expect_success 'merge feature branch into sparse checkout of main' '\n \tgit merge feature &&\n \ttest_path_is_file a &&\n \ttest_path_is_missing b &&\n@@ -42,10 +42,10 @@ test_expect_success 'merge feature branch into sparse checkout of master' '\n \ttest \"$(cat c)\" = \"modified\"\n '\n \n-test_expect_success 'return to full checkout of master' '\n+test_expect_success 'return to full checkout of main' '\n \tgit checkout feature &&\n \techo \"/*\" >.git/info/sparse-checkout &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_path_is_file a &&\n \ttest_path_is_file b &&\n \ttest_path_is_file c &&\ndiff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh\nindex 25e68ca036..fc64e9ed99 100755\n--- a/t/t1091-sparse-checkout-builtin.sh\n+++ b/t/t1091-sparse-checkout-builtin.sh\n@@ -2,7 +2,7 @@\n \n test_description='sparse checkout builtin tests'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -120,7 +120,7 @@ test_expect_success 'interaction with clone --no-checkout (unborn index)' '\n \ttest_path_is_missing clone_no_checkout/.git/index &&\n \n \t# No branch is checked out until we manually switch to one\n-\tgit -C clone_no_checkout switch master &&\n+\tgit -C clone_no_checkout switch main &&\n \ttest_path_is_file clone_no_checkout/.git/index &&\n \tcheck_files clone_no_checkout a folder1\n '\ndiff --git a/t/t1300-config.sh b/t/t1300-config.sh\nindex 67e201b5c1..c809ab90f9 100755\n--- a/t/t1300-config.sh\n+++ b/t/t1300-config.sh\n@@ -5,7 +5,7 @@\n \n test_description='Test git config in different settings'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -1057,8 +1057,8 @@ test_expect_success 'check split_cmdline return' \"\n \techo foo > foo &&\n \tgit add foo &&\n \tgit commit -m 'initial commit' &&\n-\tgit config branch.master.mergeoptions 'echo \\\"' &&\n-\ttest_must_fail git merge master\n+\tgit config branch.main.mergeoptions 'echo \\\"' &&\n+\ttest_must_fail git merge main\n \"\n \n test_expect_success 'git -c \"key=value\" support' '\n@@ -1772,11 +1772,11 @@ test_expect_success '--show-origin blob' '\n \n test_expect_success '--show-origin blob ref' '\n \tcat >expect <<-\\EOF &&\n-\tblob:master:custom.conf\tuser.custom=true\n+\tblob:main:custom.conf\tuser.custom=true\n \tEOF\n \tgit add \"$CUSTOM_CONFIG_FILE\" &&\n \tgit commit -m \"new config file\" &&\n-\tgit config --blob=master:\"$CUSTOM_CONFIG_FILE\" --show-origin --list >output &&\n+\tgit config --blob=main:\"$CUSTOM_CONFIG_FILE\" --show-origin --list >output &&\n \ttest_cmp expect output\n '\n \ndiff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh\nindex c573438f98..ac947bff9f 100755\n--- a/t/t1301-shared-repo.sh\n+++ b/t/t1301-shared-repo.sh\n@@ -5,7 +5,7 @@\n \n test_description='Test shared repository initialization'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -118,13 +118,13 @@ test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '\n \tumask 077 &&\n \tgit config core.sharedRepository group &&\n \tgit reflog expire --all &&\n-\tactual=\"$(ls -l .git/logs/refs/heads/master)\" &&\n+\tactual=\"$(ls -l .git/logs/refs/heads/main)\" &&\n \tcase \"$actual\" in\n \t-rw-rw-*)\n \t\t: happy\n \t\t;;\n \t*)\n-\t\techo Ooops, .git/logs/refs/heads/master is not 0662 [$actual]\n+\t\techo Ooops, .git/logs/refs/heads/main is not 0662 [$actual]\n \t\tfalse\n \t\t;;\n \tesac\ndiff --git a/t/t1305-config-include.sh b/t/t1305-config-include.sh\nindex f1e1b289f9..938ca17d78 100755\n--- a/t/t1305-config-include.sh\n+++ b/t/t1305-config-include.sh\n@@ -312,7 +312,7 @@ test_expect_success SYMLINKS 'conditional include, gitdir matching symlink, icas\n test_expect_success 'conditional include, onbranch' '\n \techo \"[includeIf \\\"onbranch:foo-branch\\\"]path=bar9\" >>.git/config &&\n \techo \"[test]nine=9\" >.git/bar9 &&\n-\tgit checkout -b master &&\n+\tgit checkout -b main &&\n \ttest_must_fail git config test.nine &&\n \tgit checkout -b foo-branch &&\n \techo 9 >expect &&\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex 4ae6f50c02..1ad0bbbc53 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -4,14 +4,14 @@\n #\n \n test_description='Test git update-ref and basic ref logging'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n \n Z=$ZERO_OID\n \n-m=refs/heads/master\n+m=refs/heads/main\n n_dir=refs/heads/gu\n n=$n_dir/fixes\n outside=refs/foo\n@@ -261,7 +261,7 @@ test_expect_success \"(not) changed .git/$m\" '\n \t! test $B = $(git show-ref -s --verify $m)\n '\n \n-rm -f .git/logs/refs/heads/master\n+rm -f .git/logs/refs/heads/main\n test_expect_success \"create $m (logged by touch)\" '\n \ttest_config core.logAllRefUpdates false &&\n \tGIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n@@ -297,7 +297,7 @@ test_expect_success 'symref empty directory removal' '\n \tgit branch e1/e2/r1 HEAD &&\n \tgit branch e1/r2 HEAD &&\n \tgit checkout e1/e2/r1 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_path_is_file .git/refs/heads/e1/e2/r1 &&\n \ttest_path_is_file .git/logs/refs/heads/e1/e2/r1 &&\n \tgit update-ref -d HEAD &&\n@@ -361,68 +361,68 @@ test_expect_success 'set up for querying the reflog' '\n ed=\"Thu, 26 May 2005 18:32:00 -0500\"\n gd=\"Thu, 26 May 2005 18:33:00 -0500\"\n ld=\"Thu, 26 May 2005 18:43:00 -0500\"\n-test_expect_success 'Query \"master@{May 25 2005}\" (before history)' '\n+test_expect_success 'Query \"main@{May 25 2005}\" (before history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{May 25 2005}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{May 25 2005}\" >o 2>e &&\n \techo \"$C\" >expect &&\n \ttest_cmp expect o &&\n-\techo \"warning: log for '\\''master'\\'' only goes back to $ed\" >expect &&\n+\techo \"warning: log for '\\''main'\\'' only goes back to $ed\" >expect &&\n \ttest_i18ncmp expect e\n '\n-test_expect_success 'Query master@{2005-05-25} (before history)' '\n+test_expect_success 'Query main@{2005-05-25} (before history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify master@{2005-05-25} >o 2>e &&\n+\tgit rev-parse --verify main@{2005-05-25} >o 2>e &&\n \techo \"$C\" >expect &&\n \ttest_cmp expect o &&\n-\techo \"warning: log for '\\''master'\\'' only goes back to $ed\" >expect &&\n+\techo \"warning: log for '\\''main'\\'' only goes back to $ed\" >expect &&\n \ttest_i18ncmp expect e\n '\n-test_expect_success 'Query \"master@{May 26 2005 23:31:59}\" (1 second before history)' '\n+test_expect_success 'Query \"main@{May 26 2005 23:31:59}\" (1 second before history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{May 26 2005 23:31:59}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{May 26 2005 23:31:59}\" >o 2>e &&\n \techo \"$C\" >expect &&\n \ttest_cmp expect o &&\n-\techo \"warning: log for '\\''master'\\'' only goes back to $ed\" >expect &&\n+\techo \"warning: log for '\\''main'\\'' only goes back to $ed\" >expect &&\n \ttest_i18ncmp expect e\n '\n-test_expect_success 'Query \"master@{May 26 2005 23:32:00}\" (exactly history start)' '\n+test_expect_success 'Query \"main@{May 26 2005 23:32:00}\" (exactly history start)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{May 26 2005 23:32:00}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{May 26 2005 23:32:00}\" >o 2>e &&\n \techo \"$C\" >expect &&\n \ttest_cmp expect o &&\n \ttest_must_be_empty e\n '\n-test_expect_success 'Query \"master@{May 26 2005 23:32:30}\" (first non-creation change)' '\n+test_expect_success 'Query \"main@{May 26 2005 23:32:30}\" (first non-creation change)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{May 26 2005 23:32:30}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{May 26 2005 23:32:30}\" >o 2>e &&\n \techo \"$A\" >expect &&\n \ttest_cmp expect o &&\n \ttest_must_be_empty e\n '\n-test_expect_success 'Query \"master@{2005-05-26 23:33:01}\" (middle of history with gap)' '\n+test_expect_success 'Query \"main@{2005-05-26 23:33:01}\" (middle of history with gap)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{2005-05-26 23:33:01}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{2005-05-26 23:33:01}\" >o 2>e &&\n \techo \"$B\" >expect &&\n \ttest_cmp expect o &&\n \ttest_i18ngrep -F \"warning: log for ref $m has gap after $gd\" e\n '\n-test_expect_success 'Query \"master@{2005-05-26 23:38:00}\" (middle of history)' '\n+test_expect_success 'Query \"main@{2005-05-26 23:38:00}\" (middle of history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{2005-05-26 23:38:00}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{2005-05-26 23:38:00}\" >o 2>e &&\n \techo \"$Z\" >expect &&\n \ttest_cmp expect o &&\n \ttest_must_be_empty e\n '\n-test_expect_success 'Query \"master@{2005-05-26 23:43:00}\" (exact end of history)' '\n+test_expect_success 'Query \"main@{2005-05-26 23:43:00}\" (exact end of history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{2005-05-26 23:43:00}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{2005-05-26 23:43:00}\" >o 2>e &&\n \techo \"$E\" >expect &&\n \ttest_cmp expect o &&\n \ttest_must_be_empty e\n '\n-test_expect_success 'Query \"master@{2005-05-28}\" (past end of history)' '\n+test_expect_success 'Query \"main@{2005-05-28}\" (past end of history)' '\n \ttest_when_finished \"rm -f o e\" &&\n-\tgit rev-parse --verify \"master@{2005-05-28}\" >o 2>e &&\n+\tgit rev-parse --verify \"main@{2005-05-28}\" >o 2>e &&\n \techo \"$D\" >expect &&\n \ttest_cmp expect o &&\n \ttest_i18ngrep -F \"warning: log for ref $m unexpectedly ended on $ld\" e\n@@ -464,14 +464,14 @@ test_expect_success 'git commit logged updates' '\n '\n unset h_TEST h_OTHER h_FIXED h_MERGED\n \n-test_expect_success 'git cat-file blob master:F (expect OTHER)' '\n-\ttest OTHER = $(git cat-file blob master:F)\n+test_expect_success 'git cat-file blob main:F (expect OTHER)' '\n+\ttest OTHER = $(git cat-file blob main:F)\n '\n-test_expect_success 'git cat-file blob master@{2005-05-26 23:30}:F (expect TEST)' '\n-\ttest TEST = $(git cat-file blob \"master@{2005-05-26 23:30}:F\")\n+test_expect_success 'git cat-file blob main@{2005-05-26 23:30}:F (expect TEST)' '\n+\ttest TEST = $(git cat-file blob \"main@{2005-05-26 23:30}:F\")\n '\n-test_expect_success 'git cat-file blob master@{2005-05-26 23:42}:F (expect OTHER)' '\n-\ttest OTHER = $(git cat-file blob \"master@{2005-05-26 23:42}:F\")\n+test_expect_success 'git cat-file blob main@{2005-05-26 23:42}:F (expect OTHER)' '\n+\ttest OTHER = $(git cat-file blob \"main@{2005-05-26 23:42}:F\")\n '\n \n # Test adding and deleting pseudorefs\n@@ -583,9 +583,9 @@ test_expect_success 'stdin fails on unknown command' '\n '\n \n test_expect_success 'stdin fails on unbalanced quotes' '\n-\techo \"create $a \\\"master\" >stdin &&\n+\techo \"create $a \\\"main\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n-\tgrep \"fatal: badly quoted argument: \\\\\\\"master\" err\n+\tgrep \"fatal: badly quoted argument: \\\\\\\"main\" err\n '\n \n test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin fails on invalid escape' '\n@@ -595,9 +595,9 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin fails on invalid escape' '\n '\n \n test_expect_success 'stdin fails on junk after quoted argument' '\n-\techo \"create \\\"$a\\\"master\" >stdin &&\n+\techo \"create \\\"$a\\\"main\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n-\tgrep \"fatal: unexpected character after quoted argument: \\\\\\\"$a\\\\\\\"master\" err\n+\tgrep \"fatal: unexpected character after quoted argument: \\\\\\\"$a\\\\\\\"main\" err\n '\n \n test_expect_success 'stdin fails create with no ref' '\ndiff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh\nindex 98e4a8613b..cabc516ae9 100755\n--- a/t/t1402-check-ref-format.sh\n+++ b/t/t1402-check-ref-format.sh\n@@ -134,18 +134,18 @@ valid_ref !MINGW \"$ref\" '--refspec-pattern --allow-onelevel --normalize'\n test_expect_success \"check-ref-format --branch @{-1}\" '\n \tT=$(git write-tree) &&\n \tsha1=$(echo A | git commit-tree $T) &&\n-\tgit update-ref refs/heads/master $sha1 &&\n-\tgit update-ref refs/remotes/origin/master $sha1 &&\n-\tgit checkout master &&\n-\tgit checkout origin/master &&\n-\tgit checkout master &&\n+\tgit update-ref refs/heads/main $sha1 &&\n+\tgit update-ref refs/remotes/origin/main $sha1 &&\n+\tgit checkout main &&\n+\tgit checkout origin/main &&\n+\tgit checkout main &&\n \trefname=$(git check-ref-format --branch @{-1}) &&\n \ttest \"$refname\" = \"$sha1\" &&\n \trefname2=$(git check-ref-format --branch @{-2}) &&\n-\ttest \"$refname2\" = master'\n+\ttest \"$refname2\" = main'\n \n-test_expect_success 'check-ref-format --branch -naster' '\n-\ttest_must_fail git check-ref-format --branch -naster >actual &&\n+test_expect_success 'check-ref-format --branch -nain' '\n+\ttest_must_fail git check-ref-format --branch -nain >actual &&\n \ttest_must_be_empty actual\n '\n \n@@ -154,11 +154,11 @@ test_expect_success 'check-ref-format --branch from subdir' '\n \n \tT=$(git write-tree) &&\n \tsha1=$(echo A | git commit-tree $T) &&\n-\tgit update-ref refs/heads/master $sha1 &&\n-\tgit update-ref refs/remotes/origin/master $sha1 &&\n-\tgit checkout master &&\n-\tgit checkout origin/master &&\n-\tgit checkout master &&\n+\tgit update-ref refs/heads/main $sha1 &&\n+\tgit update-ref refs/remotes/origin/main $sha1 &&\n+\tgit checkout main &&\n+\tgit checkout origin/main &&\n+\tgit checkout main &&\n \trefname=$(\n \t\tcd subdir &&\n \t\tgit check-ref-format --branch @{-1}\n@@ -171,9 +171,9 @@ test_expect_success 'check-ref-format --branch @{-1} from non-repo' '\n \ttest_must_be_empty actual\n '\n \n-test_expect_success 'check-ref-format --branch master from non-repo' '\n-\techo master >expect &&\n-\tnongit git check-ref-format --branch master >actual &&\n+test_expect_success 'check-ref-format --branch main from non-repo' '\n+\techo main >expect &&\n+\tnongit git check-ref-format --branch main >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t1403-show-ref.sh b/t/t1403-show-ref.sh\nindex aaf32f3b07..6ce62f878c 100755\n--- a/t/t1403-show-ref.sh\n+++ b/t/t1403-show-ref.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='show-ref'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -12,7 +12,7 @@ test_expect_success setup '\n \tgit checkout -b side &&\n \ttest_commit B &&\n \tgit tag -f -a -m \"annotated B\" B &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit C &&\n \tgit branch B A^0\n '\n@@ -95,23 +95,23 @@ test_expect_success 'show-ref -d' '\n \tgit show-ref --verify -d refs/tags/A refs/tags/C >actual &&\n \ttest_cmp expect actual &&\n \n-\techo $(git rev-parse refs/heads/master) refs/heads/master >expect &&\n-\tgit show-ref -d master >actual &&\n+\techo $(git rev-parse refs/heads/main) refs/heads/main >expect &&\n+\tgit show-ref -d main >actual &&\n \ttest_cmp expect actual &&\n \n-\tgit show-ref -d heads/master >actual &&\n+\tgit show-ref -d heads/main >actual &&\n \ttest_cmp expect actual &&\n \n-\tgit show-ref -d refs/heads/master >actual &&\n+\tgit show-ref -d refs/heads/main >actual &&\n \ttest_cmp expect actual &&\n \n-\tgit show-ref -d --verify refs/heads/master >actual &&\n+\tgit show-ref -d --verify refs/heads/main >actual &&\n \ttest_cmp expect actual &&\n \n-\ttest_must_fail git show-ref -d --verify master >actual &&\n+\ttest_must_fail git show-ref -d --verify main >actual &&\n \ttest_must_be_empty actual &&\n \n-\ttest_must_fail git show-ref -d --verify heads/master >actual &&\n+\ttest_must_fail git show-ref -d --verify heads/main >actual &&\n \ttest_must_be_empty actual &&\n \n \ttest_must_fail git show-ref --verify -d A C >actual &&\n@@ -123,7 +123,7 @@ test_expect_success 'show-ref -d' '\n '\n \n test_expect_success 'show-ref --heads, --tags, --head, pattern' '\n-\tfor branch in B master side\n+\tfor branch in B main side\n \tdo\n \t\techo $(git rev-parse refs/heads/$branch) refs/heads/$branch\n \tdone >expect.heads &&\ndiff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh\nindex 531059b871..602e21957b 100755\n--- a/t/t1405-main-ref-store.sh\n+++ b/t/t1405-main-ref-store.sh\n@@ -2,7 +2,7 @@\n \n test_description='test main ref store api'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -24,9 +24,9 @@ test_expect_success 'peel_ref(new-tag)' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'create_symref(FOO, refs/heads/master)' '\n-\t$RUN create-symref FOO refs/heads/master nothing &&\n-\techo refs/heads/master >expected &&\n+test_expect_success 'create_symref(FOO, refs/heads/main)' '\n+\t$RUN create-symref FOO refs/heads/main nothing &&\n+\techo refs/heads/main >expected &&\n \tgit symbolic-ref FOO >actual &&\n \ttest_cmp expected actual\n '\n@@ -34,7 +34,7 @@ test_expect_success 'create_symref(FOO, refs/heads/master)' '\n test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' '\n \tgit rev-parse FOO -- &&\n \tgit rev-parse refs/tags/new-tag -- &&\n-\tm=$(git rev-parse master) &&\n+\tm=$(git rev-parse main) &&\n \tREF_NO_DEREF=1 &&\n \t$RUN delete-refs $REF_NO_DEREF nothing FOO refs/tags/new-tag &&\n \ttest_must_fail git rev-parse --symbolic-full-name FOO &&\n@@ -42,19 +42,19 @@ test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' '\n \ttest_must_fail git rev-parse refs/tags/new-tag --\n '\n \n-test_expect_success 'rename_refs(master, new-master)' '\n-\tgit rev-parse master >expected &&\n-\t$RUN rename-ref refs/heads/master refs/heads/new-master &&\n-\tgit rev-parse new-master >actual &&\n+test_expect_success 'rename_refs(main, new-main)' '\n+\tgit rev-parse main >expected &&\n+\t$RUN rename-ref refs/heads/main refs/heads/new-main &&\n+\tgit rev-parse new-main >actual &&\n \ttest_cmp expected actual &&\n-\ttest_commit recreate-master\n+\ttest_commit recreate-main\n '\n \n test_expect_success 'for_each_ref(refs/heads/)' '\n \t$RUN for-each-ref refs/heads/ | cut -d\" \" -f 2- >actual &&\n \tcat >expected <<-\\EOF &&\n-\tmaster 0x0\n-\tnew-master 0x0\n+\tmain 0x0\n+\tnew-main 0x0\n \tEOF\n \ttest_cmp expected actual\n '\n@@ -65,23 +65,23 @@ test_expect_success 'for_each_ref() is sorted' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'resolve_ref(new-master)' '\n-\tSHA1=`git rev-parse new-master` &&\n-\techo \"$SHA1 refs/heads/new-master 0x0\" >expected &&\n-\t$RUN resolve-ref refs/heads/new-master 0 >actual &&\n+test_expect_success 'resolve_ref(new-main)' '\n+\tSHA1=`git rev-parse new-main` &&\n+\techo \"$SHA1 refs/heads/new-main 0x0\" >expected &&\n+\t$RUN resolve-ref refs/heads/new-main 0 >actual &&\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'verify_ref(new-master)' '\n-\t$RUN verify-ref refs/heads/new-master\n+test_expect_success 'verify_ref(new-main)' '\n+\t$RUN verify-ref refs/heads/new-main\n '\n \n test_expect_success 'for_each_reflog()' '\n \t$RUN for-each-reflog | sort -k2 | cut -d\" \" -f 2- >actual &&\n \tcat >expected <<-\\EOF &&\n \tHEAD 0x1\n-\trefs/heads/master 0x0\n-\trefs/heads/new-master 0x0\n+\trefs/heads/main 0x0\n+\trefs/heads/new-main 0x0\n \tEOF\n \ttest_cmp expected actual\n '\n@@ -89,12 +89,12 @@ test_expect_success 'for_each_reflog()' '\n test_expect_success 'for_each_reflog_ent()' '\n \t$RUN for-each-reflog-ent HEAD >actual &&\n \thead -n1 actual | grep one &&\n-\ttail -n2 actual | head -n1 | grep recreate-master\n+\ttail -n2 actual | head -n1 | grep recreate-main\n '\n \n test_expect_success 'for_each_reflog_ent_reverse()' '\n \t$RUN for-each-reflog-ent-reverse HEAD >actual &&\n-\thead -n1 actual | grep recreate-master &&\n+\thead -n1 actual | grep recreate-main &&\n \ttail -n2 actual | head -n1 | grep one\n '\n \ndiff --git a/t/t1406-submodule-ref-store.sh b/t/t1406-submodule-ref-store.sh\nindex 126518c155..a68c8f11a2 100755\n--- a/t/t1406-submodule-ref-store.sh\n+++ b/t/t1406-submodule-ref-store.sh\n@@ -2,7 +2,7 @@\n \n test_description='test submodule ref store api'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -14,7 +14,7 @@ test_expect_success 'setup' '\n \t(\n \t\tcd sub &&\n \t\ttest_commit first &&\n-\t\tgit checkout -b new-master\n+\t\tgit checkout -b new-main\n \t)\n '\n \n@@ -30,7 +30,7 @@ test_expect_success 'peel_ref(new-tag)' '\n '\n \n test_expect_success 'create_symref() not allowed' '\n-\ttest_must_fail $RUN create-symref FOO refs/heads/master nothing\n+\ttest_must_fail $RUN create-symref FOO refs/heads/main nothing\n '\n \n test_expect_success 'delete_refs() not allowed' '\n@@ -38,14 +38,14 @@ test_expect_success 'delete_refs() not allowed' '\n '\n \n test_expect_success 'rename_refs() not allowed' '\n-\ttest_must_fail $RUN rename-ref refs/heads/master refs/heads/new-master\n+\ttest_must_fail $RUN rename-ref refs/heads/main refs/heads/new-main\n '\n \n test_expect_success 'for_each_ref(refs/heads/)' '\n \t$RUN for-each-ref refs/heads/ | cut -d\" \" -f 2- >actual &&\n \tcat >expected <<-\\EOF &&\n-\tmaster 0x0\n-\tnew-master 0x0\n+\tmain 0x0\n+\tnew-main 0x0\n \tEOF\n \ttest_cmp expected actual\n '\n@@ -56,23 +56,23 @@ test_expect_success 'for_each_ref() is sorted' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'resolve_ref(master)' '\n-\tSHA1=`git -C sub rev-parse master` &&\n-\techo \"$SHA1 refs/heads/master 0x0\" >expected &&\n-\t$RUN resolve-ref refs/heads/master 0 >actual &&\n+test_expect_success 'resolve_ref(main)' '\n+\tSHA1=`git -C sub rev-parse main` &&\n+\techo \"$SHA1 refs/heads/main 0x0\" >expected &&\n+\t$RUN resolve-ref refs/heads/main 0 >actual &&\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'verify_ref(new-master)' '\n-\t$RUN verify-ref refs/heads/new-master\n+test_expect_success 'verify_ref(new-main)' '\n+\t$RUN verify-ref refs/heads/new-main\n '\n \n test_expect_success 'for_each_reflog()' '\n \t$RUN for-each-reflog | sort | cut -d\" \" -f 2- >actual &&\n \tcat >expected <<-\\EOF &&\n \tHEAD 0x1\n-\trefs/heads/master 0x0\n-\trefs/heads/new-master 0x0\n+\trefs/heads/main 0x0\n+\trefs/heads/new-main 0x0\n \tEOF\n \ttest_cmp expected actual\n '\n@@ -80,12 +80,12 @@ test_expect_success 'for_each_reflog()' '\n test_expect_success 'for_each_reflog_ent()' '\n \t$RUN for-each-reflog-ent HEAD >actual &&\n \thead -n1 actual | grep first &&\n-\ttail -n2 actual | head -n1 | grep master.to.new\n+\ttail -n2 actual | head -n1 | grep main.to.new\n '\n \n test_expect_success 'for_each_reflog_ent_reverse()' '\n \t$RUN for-each-reflog-ent-reverse HEAD >actual &&\n-\thead -n1 actual | grep master.to.new &&\n+\thead -n1 actual | grep main.to.new &&\n \ttail -n2 actual | head -n1 | grep first\n '\n \ndiff --git a/t/t1407-worktree-ref-store.sh b/t/t1407-worktree-ref-store.sh\nindex aede1c20d7..d3fe777511 100755\n--- a/t/t1407-worktree-ref-store.sh\n+++ b/t/t1407-worktree-ref-store.sh\n@@ -2,7 +2,7 @@\n \n test_description='test worktree ref store api'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -12,7 +12,7 @@ RMAIN=\"test-tool ref-store worktree:main\"\n \n test_expect_success 'setup' '\n \ttest_commit first &&\n-\tgit worktree add -b wt-master wt &&\n+\tgit worktree add -b wt-main wt &&\n \t(\n \t\tcd wt &&\n \t\ttest_commit second\n@@ -20,34 +20,34 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'resolve_ref(<shared-ref>)' '\n-\tSHA1=`git rev-parse master` &&\n-\techo \"$SHA1 refs/heads/master 0x0\" >expected &&\n-\t$RWT resolve-ref refs/heads/master 0 >actual &&\n+\tSHA1=`git rev-parse main` &&\n+\techo \"$SHA1 refs/heads/main 0x0\" >expected &&\n+\t$RWT resolve-ref refs/heads/main 0 >actual &&\n \ttest_cmp expected actual &&\n-\t$RMAIN resolve-ref refs/heads/master 0 >actual &&\n+\t$RMAIN resolve-ref refs/heads/main 0 >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'resolve_ref(<per-worktree-ref>)' '\n \tSHA1=`git -C wt rev-parse HEAD` &&\n-\techo \"$SHA1 refs/heads/wt-master 0x1\" >expected &&\n+\techo \"$SHA1 refs/heads/wt-main 0x1\" >expected &&\n \t$RWT resolve-ref HEAD 0 >actual &&\n \ttest_cmp expected actual &&\n \n \tSHA1=`git rev-parse HEAD` &&\n-\techo \"$SHA1 refs/heads/master 0x1\" >expected &&\n+\techo \"$SHA1 refs/heads/main 0x1\" >expected &&\n \t$RMAIN resolve-ref HEAD 0 >actual &&\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'create_symref(FOO, refs/heads/master)' '\n-\t$RWT create-symref FOO refs/heads/master nothing &&\n-\techo refs/heads/master >expected &&\n+test_expect_success 'create_symref(FOO, refs/heads/main)' '\n+\t$RWT create-symref FOO refs/heads/main nothing &&\n+\techo refs/heads/main >expected &&\n \tgit -C wt symbolic-ref FOO >actual &&\n \ttest_cmp expected actual &&\n \n-\t$RMAIN create-symref FOO refs/heads/wt-master nothing &&\n-\techo refs/heads/wt-master >expected &&\n+\t$RMAIN create-symref FOO refs/heads/wt-main nothing &&\n+\techo refs/heads/wt-main >expected &&\n \tgit symbolic-ref FOO >actual &&\n \ttest_cmp expected actual\n '\n@@ -66,8 +66,8 @@ test_expect_success 'for_each_reflog()' '\n \tHEAD 0x1\n \tPSEUDO-WT 0x0\n \trefs/bisect/wt-random 0x0\n-\trefs/heads/master 0x0\n-\trefs/heads/wt-master 0x0\n+\trefs/heads/main 0x0\n+\trefs/heads/wt-main 0x0\n \tEOF\n \ttest_cmp expected actual &&\n \n@@ -76,8 +76,8 @@ test_expect_success 'for_each_reflog()' '\n \tHEAD 0x1\n \tPSEUDO-MAIN 0x0\n \trefs/bisect/random 0x0\n-\trefs/heads/master 0x0\n-\trefs/heads/wt-master 0x0\n+\trefs/heads/main 0x0\n+\trefs/heads/wt-main 0x0\n \tEOF\n \ttest_cmp expected actual\n '\ndiff --git a/t/t1408-packed-refs.sh b/t/t1408-packed-refs.sh\nindex fd58388232..41ba1f1d7f 100755\n--- a/t/t1408-packed-refs.sh\n+++ b/t/t1408-packed-refs.sh\n@@ -2,7 +2,7 @@\n \n test_description='packed-refs entries are covered by loose refs'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -12,32 +12,32 @@ test_expect_success setup '\n \tgit commit --allow-empty -m one &&\n \tone=$(git rev-parse HEAD) &&\n \tgit for-each-ref >actual &&\n-\techo \"$one commit\trefs/heads/master\" >expect &&\n+\techo \"$one commit\trefs/heads/main\" >expect &&\n \ttest_cmp expect actual &&\n \n \tgit pack-refs --all &&\n \tgit for-each-ref >actual &&\n-\techo \"$one commit\trefs/heads/master\" >expect &&\n+\techo \"$one commit\trefs/heads/main\" >expect &&\n \ttest_cmp expect actual &&\n \n \tgit checkout --orphan another &&\n \ttest_tick &&\n \tgit commit --allow-empty -m two &&\n \ttwo=$(git rev-parse HEAD) &&\n-\tgit checkout -B master &&\n+\tgit checkout -B main &&\n \tgit branch -D another &&\n \n \tgit for-each-ref >actual &&\n-\techo \"$two commit\trefs/heads/master\" >expect &&\n+\techo \"$two commit\trefs/heads/main\" >expect &&\n \ttest_cmp expect actual &&\n \n \tgit reflog expire --expire=now --all &&\n \tgit prune &&\n-\tgit tag -m v1.0 v1.0 master\n+\tgit tag -m v1.0 v1.0 main\n '\n \n test_expect_success 'no error from stale entry in packed-refs' '\n-\tgit describe master >actual 2>&1 &&\n+\tgit describe main >actual 2>&1 &&\n \techo \"v1.0\" >expect &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh\nindex aa02ca488d..ecccaa0634 100755\n--- a/t/t1410-reflog.sh\n+++ b/t/t1410-reflog.sh\n@@ -4,7 +4,7 @@\n #\n \n test_description='Test prune and reflog expiration'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -102,7 +102,7 @@ test_expect_success setup '\n \n \tcheck_fsck &&\n \n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 4 output\n '\n \n@@ -119,7 +119,7 @@ test_expect_success rewind '\n \n \tcheck_have A B C D E F G H I J K L &&\n \n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 5 output\n '\n \n@@ -138,7 +138,7 @@ test_expect_success 'reflog expire --dry-run should not touch reflog' '\n \t\t--stale-fix \\\n \t\t--all &&\n \n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 5 output &&\n \n \tcheck_fsck \"missing blob $F\"\n@@ -152,7 +152,7 @@ test_expect_success 'reflog expire' '\n \t\t--stale-fix \\\n \t\t--all &&\n \n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 2 output &&\n \n \tcheck_fsck \"dangling commit $K\"\n@@ -189,29 +189,29 @@ test_expect_success 'delete' '\n \tgit commit -m tiger C &&\n \n \tHEAD_entry_count=$(git reflog | wc -l) &&\n-\tmaster_entry_count=$(git reflog show master | wc -l) &&\n+\tmain_entry_count=$(git reflog show main | wc -l) &&\n \n \ttest $HEAD_entry_count = 5 &&\n-\ttest $master_entry_count = 5 &&\n+\ttest $main_entry_count = 5 &&\n \n \n-\tgit reflog delete master@{1} &&\n-\tgit reflog show master > output &&\n-\ttest_line_count = $(($master_entry_count - 1)) output &&\n+\tgit reflog delete main@{1} &&\n+\tgit reflog show main > output &&\n+\ttest_line_count = $(($main_entry_count - 1)) output &&\n \ttest $HEAD_entry_count = $(git reflog | wc -l) &&\n \t! grep ox < output &&\n \n-\tmaster_entry_count=$(wc -l < output) &&\n+\tmain_entry_count=$(wc -l < output) &&\n \n \tgit reflog delete HEAD@{1} &&\n \ttest $(($HEAD_entry_count -1)) = $(git reflog | wc -l) &&\n-\ttest $master_entry_count = $(git reflog show master | wc -l) &&\n+\ttest $main_entry_count = $(git reflog show main | wc -l) &&\n \n \tHEAD_entry_count=$(git reflog | wc -l) &&\n \n-\tgit reflog delete master@{07.04.2005.15:15:00.-0700} &&\n-\tgit reflog show master > output &&\n-\ttest_line_count = $(($master_entry_count - 1)) output &&\n+\tgit reflog delete main@{07.04.2005.15:15:00.-0700} &&\n+\tgit reflog show main > output &&\n+\ttest_line_count = $(($main_entry_count - 1)) output &&\n \t! grep dragon < output\n \n '\n@@ -219,7 +219,7 @@ test_expect_success 'delete' '\n test_expect_success 'rewind2' '\n \n \ttest_tick && git reset --hard HEAD~2 &&\n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 4 output\n '\n \n@@ -229,7 +229,7 @@ test_expect_success '--expire=never' '\n \t\t--expire=never \\\n \t\t--expire-unreachable=never \\\n \t\t--all &&\n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 4 output\n '\n \n@@ -240,7 +240,7 @@ test_expect_success 'gc.reflogexpire=never' '\n \tgit reflog expire --verbose --all >output &&\n \ttest_line_count = 9 output &&\n \n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 4 output\n '\n \n@@ -249,7 +249,7 @@ test_expect_success 'gc.reflogexpire=false' '\n \ttest_config gc.reflogexpireunreachable false &&\n \n \tgit reflog expire --verbose --all &&\n-\tgit reflog refs/heads/master >output &&\n+\tgit reflog refs/heads/main >output &&\n \ttest_line_count = 4 output\n \n '\n@@ -258,33 +258,33 @@ test_expect_success 'git reflog expire unknown reference' '\n \ttest_config gc.reflogexpire never &&\n \ttest_config gc.reflogexpireunreachable never &&\n \n-\ttest_must_fail git reflog expire master@{123} 2>stderr &&\n+\ttest_must_fail git reflog expire main@{123} 2>stderr &&\n \ttest_i18ngrep \"points nowhere\" stderr &&\n \ttest_must_fail git reflog expire does-not-exist 2>stderr &&\n \ttest_i18ngrep \"points nowhere\" stderr\n '\n \n test_expect_success 'checkout should not delete log for packed ref' '\n-\ttest $(git reflog master | wc -l) = 4 &&\n+\ttest $(git reflog main | wc -l) = 4 &&\n \tgit branch foo &&\n \tgit pack-refs --all &&\n \tgit checkout foo &&\n-\ttest $(git reflog master | wc -l) = 4\n+\ttest $(git reflog main | wc -l) = 4\n '\n \n test_expect_success 'stale dirs do not cause d/f conflicts (reflogs on)' '\n \ttest_when_finished \"git branch -d one || git branch -d one/two\" &&\n \n-\tgit branch one/two master &&\n-\techo \"one/two@{0} branch: Created from master\" >expect &&\n+\tgit branch one/two main &&\n+\techo \"one/two@{0} branch: Created from main\" >expect &&\n \tgit log -g --format=\"%gd %gs\" one/two >actual &&\n \ttest_cmp expect actual &&\n \tgit branch -d one/two &&\n \n \t# now logs/refs/heads/one is a stale directory, but\n \t# we should move it out of the way to create \"one\" reflog\n-\tgit branch one master &&\n-\techo \"one@{0} branch: Created from master\" >expect &&\n+\tgit branch one main &&\n+\techo \"one@{0} branch: Created from main\" >expect &&\n \tgit log -g --format=\"%gd %gs\" one >actual &&\n \ttest_cmp expect actual\n '\n@@ -292,15 +292,15 @@ test_expect_success 'stale dirs do not cause d/f conflicts (reflogs on)' '\n test_expect_success 'stale dirs do not cause d/f conflicts (reflogs off)' '\n \ttest_when_finished \"git branch -d one || git branch -d one/two\" &&\n \n-\tgit branch one/two master &&\n-\techo \"one/two@{0} branch: Created from master\" >expect &&\n+\tgit branch one/two main &&\n+\techo \"one/two@{0} branch: Created from main\" >expect &&\n \tgit log -g --format=\"%gd %gs\" one/two >actual &&\n \ttest_cmp expect actual &&\n \tgit branch -d one/two &&\n \n \t# same as before, but we only create a reflog for \"one\" if\n \t# it already exists, which it does not\n-\tgit -c core.logallrefupdates=false branch one master &&\n+\tgit -c core.logallrefupdates=false branch one main &&\n \tgit log -g --format=\"%gd %gs\" one >actual &&\n \ttest_must_be_empty actual\n '\ndiff --git a/t/t1411-reflog-show.sh b/t/t1411-reflog-show.sh\nindex f6fecff671..0bb319b944 100755\n--- a/t/t1411-reflog-show.sh\n+++ b/t/t1411-reflog-show.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='Test reflog display routines'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -170,7 +170,7 @@ test_expect_success 'git log -g -p shows diffs vs. parents' '\n '\n \n test_expect_success 'reflog exists works' '\n-\tgit reflog exists refs/heads/master &&\n+\tgit reflog exists refs/heads/main &&\n \t! git reflog exists refs/heads/nonexistent\n '\n \ndiff --git a/t/t1413-reflog-detach.sh b/t/t1413-reflog-detach.sh\nindex 140914aa29..bde05208ae 100755\n--- a/t/t1413-reflog-detach.sh\n+++ b/t/t1413-reflog-detach.sh\n@@ -1,13 +1,13 @@\n #!/bin/sh\n \n test_description='Test reflog interaction with detached HEAD'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n \n reset_state () {\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcp saved_reflog .git/logs/HEAD\n }\n \n@@ -22,14 +22,14 @@ test_expect_success setup '\n \n test_expect_success baseline '\n \treset_state &&\n-\tgit rev-parse master master^ >expect &&\n+\tgit rev-parse main main^ >expect &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'switch to branch' '\n \treset_state &&\n-\tgit rev-parse side master master^ >expect &&\n+\tgit rev-parse side main main^ >expect &&\n \tgit checkout side &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\n@@ -37,34 +37,34 @@ test_expect_success 'switch to branch' '\n \n test_expect_success 'detach to other' '\n \treset_state &&\n-\tgit rev-parse master side master master^ >expect &&\n+\tgit rev-parse main side main main^ >expect &&\n \tgit checkout side &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'detach to self' '\n \treset_state &&\n-\tgit rev-parse master master master^ >expect &&\n-\tgit checkout master^0 &&\n+\tgit rev-parse main main main^ >expect &&\n+\tgit checkout main^0 &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'attach to self' '\n \treset_state &&\n-\tgit rev-parse master master master master^ >expect &&\n-\tgit checkout master^0 &&\n-\tgit checkout master &&\n+\tgit rev-parse main main main main^ >expect &&\n+\tgit checkout main^0 &&\n+\tgit checkout main &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'attach to other' '\n \treset_state &&\n-\tgit rev-parse side master master master^ >expect &&\n-\tgit checkout master^0 &&\n+\tgit rev-parse side main main main^ >expect &&\n+\tgit checkout main^0 &&\n \tgit checkout side &&\n \tgit log -g --format=%H >actual &&\n \ttest_cmp expect actual\ndiff --git a/t/t1414-reflog-walk.sh b/t/t1414-reflog-walk.sh\nindex c463b5fc29..80d94704d0 100755\n--- a/t/t1414-reflog-walk.sh\n+++ b/t/t1414-reflog-walk.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='various tests of reflog walk (log -g) behavior'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -11,7 +11,7 @@ test_expect_success 'set up some reflog entries' '\n \ttest_commit two &&\n \tgit checkout -b side HEAD^ &&\n \ttest_commit three &&\n-\tgit merge --no-commit master &&\n+\tgit merge --no-commit main &&\n \techo evil-merge-content >>one.t &&\n \ttest_tick &&\n \tgit commit --no-edit -a\n@@ -23,9 +23,9 @@ do_walk () {\n \n test_expect_success 'set up expected reflog' '\n \tcat >expect.all <<-EOF\n-\tHEAD@{0} commit (merge): Merge branch ${SQ}master${SQ} into side\n+\tHEAD@{0} commit (merge): Merge branch ${SQ}main${SQ} into side\n \tHEAD@{1} commit: three\n-\tHEAD@{2} checkout: moving from master to side\n+\tHEAD@{2} checkout: moving from main to side\n \tHEAD@{3} commit: two\n \tHEAD@{4} commit (initial): one\n \tEOF\n@@ -76,15 +76,15 @@ test_expect_success 'walking multiple reflogs shows all' '\n \t#      sort ignores the bits after the timestamp.\n \t#\n \t#   2. POSIX leaves undefined whether this is a stable sort or not. So\n-\t#      we use \"-k 1\" to ensure that we see HEAD before master before\n+\t#      we use \"-k 1\" to ensure that we see HEAD before main before\n \t#      side when breaking ties.\n \t{\n \t\tdo_walk --date=unix HEAD &&\n \t\tdo_walk --date=unix side &&\n-\t\tdo_walk --date=unix master\n+\t\tdo_walk --date=unix main\n \t} >expect.raw &&\n \tsort -t \"{\" -k 2nr -k 1 <expect.raw >expect &&\n-\tdo_walk --date=unix HEAD master side >actual &&\n+\tdo_walk --date=unix HEAD main side >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t1416-ref-transaction-hooks.sh b/t/t1416-ref-transaction-hooks.sh\nindex a26a6b782d..6c941027a8 100755\n--- a/t/t1416-ref-transaction-hooks.sh\n+++ b/t/t1416-ref-transaction-hooks.sh\n@@ -2,7 +2,7 @@\n \n test_description='reference transaction hooks'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -56,11 +56,11 @@ test_expect_success 'hook gets all queued updates in prepared state' '\n \tEOF\n \tcat >expect <<-EOF &&\n \t\t$ZERO_OID $POST_OID HEAD\n-\t\t$ZERO_OID $POST_OID refs/heads/master\n+\t\t$ZERO_OID $POST_OID refs/heads/main\n \tEOF\n \tgit update-ref HEAD POST <<-EOF &&\n \t\tupdate HEAD $ZERO_OID $POST_OID\n-\t\tupdate refs/heads/master $ZERO_OID $POST_OID\n+\t\tupdate refs/heads/main $ZERO_OID $POST_OID\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -79,7 +79,7 @@ test_expect_success 'hook gets all queued updates in committed state' '\n \tEOF\n \tcat >expect <<-EOF &&\n \t\t$ZERO_OID $POST_OID HEAD\n-\t\t$ZERO_OID $POST_OID refs/heads/master\n+\t\t$ZERO_OID $POST_OID refs/heads/main\n \tEOF\n \tgit update-ref HEAD POST &&\n \ttest_cmp expect actual\n@@ -99,12 +99,12 @@ test_expect_success 'hook gets all queued updates in aborted state' '\n \tEOF\n \tcat >expect <<-EOF &&\n \t\t$ZERO_OID $POST_OID HEAD\n-\t\t$ZERO_OID $POST_OID refs/heads/master\n+\t\t$ZERO_OID $POST_OID refs/heads/main\n \tEOF\n \tgit update-ref --stdin <<-EOF &&\n \t\tstart\n \t\tupdate HEAD POST $ZERO_OID\n-\t\tupdate refs/heads/master POST $ZERO_OID\n+\t\tupdate refs/heads/main POST $ZERO_OID\n \t\tabort\n \tEOF\n \ttest_cmp expect actual\ndiff --git a/t/t1430-bad-ref-name.sh b/t/t1430-bad-ref-name.sh\nindex 8c4353746b..354902e514 100755\n--- a/t/t1430-bad-ref-name.sh\n+++ b/t/t1430-bad-ref-name.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='Test handling of ref names that check-ref-format rejects'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -20,7 +20,7 @@ test_expect_success 'fast-import: fail on invalid branch name \".badbranchname\"'\n \t\tcorrupt\n \t\tCOMMIT\n \n-\t\tfrom refs/heads/master\n+\t\tfrom refs/heads/main\n \n \tINPUT_END\n \ttest_must_fail git fast-import <input\n@@ -35,14 +35,14 @@ test_expect_success 'fast-import: fail on invalid branch name \"bad[branch]name\"'\n \t\tcorrupt\n \t\tCOMMIT\n \n-\t\tfrom refs/heads/master\n+\t\tfrom refs/heads/main\n \n \tINPUT_END\n \ttest_must_fail git fast-import <input\n '\n \n test_expect_success 'git branch shows badly named ref as warning' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch >output 2>error &&\n \ttest_i18ngrep -e \"ignoring ref with broken name refs/heads/broken\\.\\.\\.ref\" error &&\n@@ -50,7 +50,7 @@ test_expect_success 'git branch shows badly named ref as warning' '\n '\n \n test_expect_success 'branch -d can delete badly named ref' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch -d broken...ref &&\n \tgit branch >output 2>error &&\n@@ -59,7 +59,7 @@ test_expect_success 'branch -d can delete badly named ref' '\n '\n \n test_expect_success 'branch -D can delete badly named ref' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch -D broken...ref &&\n \tgit branch >output 2>error &&\n@@ -101,17 +101,17 @@ test_expect_success 'branch -m cannot rename to a bad ref name' '\n \ttest_might_fail git branch -D goodref &&\n \tgit branch goodref &&\n \ttest_must_fail git branch -m goodref broken...ref &&\n-\ttest_cmp_rev master goodref &&\n+\ttest_cmp_rev main goodref &&\n \tgit branch >output 2>error &&\n \t! grep -e \"broken\\.\\.\\.ref\" error &&\n \t! grep -e \"broken\\.\\.\\.ref\" output\n '\n \n test_expect_failure 'branch -m can rename from a bad ref name' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch -m broken...ref renamed &&\n-\ttest_cmp_rev master renamed &&\n+\ttest_cmp_rev main renamed &&\n \tgit branch >output 2>error &&\n \t! grep -e \"broken\\.\\.\\.ref\" error &&\n \t! grep -e \"broken\\.\\.\\.ref\" output\n@@ -138,7 +138,7 @@ test_expect_failure C_LOCALE_OUTPUT 'push --mirror can delete badly named ref' '\n \t\tcd dest &&\n \t\ttest_commit two &&\n \t\tgit checkout --detach &&\n-\t\tcp .git/refs/heads/master .git/refs/heads/broken...ref\n+\t\tcp .git/refs/heads/main .git/refs/heads/broken...ref\n \t) &&\n \tgit -C src push --mirror \"file://$top/dest\" &&\n \tgit -C dest branch >output 2>error &&\n@@ -149,7 +149,7 @@ test_expect_failure C_LOCALE_OUTPUT 'push --mirror can delete badly named ref' '\n test_expect_success 'rev-parse skips symref pointing to broken name' '\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch shadow one &&\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \tprintf \"ref: refs/heads/broken...ref\\n\" >.git/refs/tags/shadow &&\n \ttest_when_finished \"rm -f .git/refs/tags/shadow\" &&\n \tgit rev-parse --verify one >expect &&\n@@ -159,11 +159,11 @@ test_expect_success 'rev-parse skips symref pointing to broken name' '\n '\n \n test_expect_success 'for-each-ref emits warnings for broken names' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tprintf \"ref: refs/heads/broken...ref\\n\" >.git/refs/heads/badname &&\n \ttest_when_finished \"rm -f .git/refs/heads/badname\" &&\n-\tprintf \"ref: refs/heads/master\\n\" >.git/refs/heads/broken...symref &&\n+\tprintf \"ref: refs/heads/main\\n\" >.git/refs/heads/broken...symref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...symref\" &&\n \tgit for-each-ref >output 2>error &&\n \t! grep -e \"broken\\.\\.\\.ref\" output &&\n@@ -175,7 +175,7 @@ test_expect_success 'for-each-ref emits warnings for broken names' '\n '\n \n test_expect_success 'update-ref -d can delete broken name' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit update-ref -d refs/heads/broken...ref >output 2>error &&\n \ttest_must_be_empty output &&\n@@ -186,7 +186,7 @@ test_expect_success 'update-ref -d can delete broken name' '\n '\n \n test_expect_success 'branch -d can delete broken name' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tgit branch -d broken...ref >output 2>error &&\n \ttest_i18ngrep \"Deleted branch broken...ref (was broken)\" output &&\n@@ -197,7 +197,7 @@ test_expect_success 'branch -d can delete broken name' '\n '\n \n test_expect_success 'update-ref --no-deref -d can delete symref to broken name' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tprintf \"ref: refs/heads/broken...ref\\n\" >.git/refs/heads/badname &&\n \ttest_when_finished \"rm -f .git/refs/heads/badname\" &&\n@@ -208,7 +208,7 @@ test_expect_success 'update-ref --no-deref -d can delete symref to broken name'\n '\n \n test_expect_success 'branch -d can delete symref to broken name' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tprintf \"ref: refs/heads/broken...ref\\n\" >.git/refs/heads/badname &&\n \ttest_when_finished \"rm -f .git/refs/heads/badname\" &&\n@@ -237,7 +237,7 @@ test_expect_success 'branch -d can delete dangling symref to broken name' '\n '\n \n test_expect_success 'update-ref -d can delete broken name through symref' '\n-\tcp .git/refs/heads/master .git/refs/heads/broken...ref &&\n+\tcp .git/refs/heads/main .git/refs/heads/broken...ref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...ref\" &&\n \tprintf \"ref: refs/heads/broken...ref\\n\" >.git/refs/heads/badname &&\n \ttest_when_finished \"rm -f .git/refs/heads/badname\" &&\n@@ -248,7 +248,7 @@ test_expect_success 'update-ref -d can delete broken name through symref' '\n '\n \n test_expect_success 'update-ref --no-deref -d can delete symref with broken name' '\n-\tprintf \"ref: refs/heads/master\\n\" >.git/refs/heads/broken...symref &&\n+\tprintf \"ref: refs/heads/main\\n\" >.git/refs/heads/broken...symref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...symref\" &&\n \tgit update-ref --no-deref -d refs/heads/broken...symref >output 2>error &&\n \ttest_path_is_missing .git/refs/heads/broken...symref &&\n@@ -257,11 +257,11 @@ test_expect_success 'update-ref --no-deref -d can delete symref with broken name\n '\n \n test_expect_success 'branch -d can delete symref with broken name' '\n-\tprintf \"ref: refs/heads/master\\n\" >.git/refs/heads/broken...symref &&\n+\tprintf \"ref: refs/heads/main\\n\" >.git/refs/heads/broken...symref &&\n \ttest_when_finished \"rm -f .git/refs/heads/broken...symref\" &&\n \tgit branch -d broken...symref >output 2>error &&\n \ttest_path_is_missing .git/refs/heads/broken...symref &&\n-\ttest_i18ngrep \"Deleted branch broken...symref (was refs/heads/master)\" output &&\n+\ttest_i18ngrep \"Deleted branch broken...symref (was refs/heads/main)\" output &&\n \ttest_must_be_empty error\n '\n \n@@ -299,37 +299,37 @@ test_expect_success 'update-ref -d cannot delete absolute path' '\n '\n \n test_expect_success 'update-ref --stdin fails create with bad ref name' '\n-\techo \"create ~a refs/heads/master\" >stdin &&\n+\techo \"create ~a refs/heads/main\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a\" err\n '\n \n test_expect_success 'update-ref --stdin fails update with bad ref name' '\n-\techo \"update ~a refs/heads/master\" >stdin &&\n+\techo \"update ~a refs/heads/main\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a\" err\n '\n \n test_expect_success 'update-ref --stdin fails delete with bad ref name' '\n-\techo \"delete ~a refs/heads/master\" >stdin &&\n+\techo \"delete ~a refs/heads/main\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a\" err\n '\n \n test_expect_success 'update-ref --stdin -z fails create with bad ref name' '\n-\tprintf \"%s\\0\" \"create ~a \" refs/heads/master >stdin &&\n+\tprintf \"%s\\0\" \"create ~a \" refs/heads/main >stdin &&\n \ttest_must_fail git update-ref -z --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a \" err\n '\n \n test_expect_success 'update-ref --stdin -z fails update with bad ref name' '\n-\tprintf \"%s\\0\" \"update ~a\" refs/heads/master \"\" >stdin &&\n+\tprintf \"%s\\0\" \"update ~a\" refs/heads/main \"\" >stdin &&\n \ttest_must_fail git update-ref -z --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a\" err\n '\n \n test_expect_success 'update-ref --stdin -z fails delete with bad ref name' '\n-\tprintf \"%s\\0\" \"delete ~a\" refs/heads/master >stdin &&\n+\tprintf \"%s\\0\" \"delete ~a\" refs/heads/main >stdin &&\n \ttest_must_fail git update-ref -z --stdin <stdin 2>err &&\n \tgrep \"fatal: invalid ref format: ~a\" err\n '\ndiff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh\nindex b17f5c21fb..a30fc5f74a 100755\n--- a/t/t1450-fsck.sh\n+++ b/t/t1450-fsck.sh\n@@ -3,7 +3,7 @@\n test_description='git fsck random collection of tests\n \n * (HEAD) B\n-* (master) A\n+* (main) A\n '\n \n . ./test-lib.sh\ndiff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh\nindex d23da4e8de..9e911e0054 100755\n--- a/t/t1500-rev-parse.sh\n+++ b/t/t1500-rev-parse.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='test git rev-parse'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -177,8 +177,8 @@ test_expect_success 'showing the superproject correctly' '\n \ttest_commit -C super/dir/sub branch1_commit &&\n \tgit -C super add dir/sub &&\n \ttest_commit -C super branch1_commit &&\n-\tgit -C super checkout -b branch2 master &&\n-\tgit -C super/dir/sub checkout -b branch2 master &&\n+\tgit -C super checkout -b branch2 main &&\n+\tgit -C super/dir/sub checkout -b branch2 main &&\n \ttest_commit -C super/dir/sub branch2_commit &&\n \tgit -C super add dir/sub &&\n \ttest_commit -C super branch2_commit &&\ndiff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh\nindex e4343c49b2..a3d6877588 100755\n--- a/t/t1503-rev-parse-verify.sh\n+++ b/t/t1503-rev-parse-verify.sh\n@@ -6,7 +6,7 @@ test_description='test git rev-parse --verify'\n \n exec </dev/null\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -54,8 +54,8 @@ test_expect_success 'works with one good rev' '\n \ttest \"$rev_hash3\" = \"$HASH3\" &&\n \trev_hash4=$(git rev-parse --verify $HASH4) &&\n \ttest \"$rev_hash4\" = \"$HASH4\" &&\n-\trev_master=$(git rev-parse --verify master) &&\n-\ttest \"$rev_master\" = \"$HASH4\" &&\n+\trev_main=$(git rev-parse --verify main) &&\n+\ttest \"$rev_main\" = \"$HASH4\" &&\n \trev_head=$(git rev-parse --verify HEAD) &&\n \ttest \"$rev_head\" = \"$HASH4\"\n '\n@@ -119,27 +119,27 @@ test_expect_success 'no stdout output on error' '\n '\n \n test_expect_success 'use --default' '\n-\tgit rev-parse --verify --default master &&\n-\tgit rev-parse --verify --default master HEAD &&\n-\tgit rev-parse --default master --verify &&\n-\tgit rev-parse --default master --verify HEAD &&\n-\tgit rev-parse --verify HEAD --default master &&\n-\ttest_must_fail git rev-parse --verify foo --default master &&\n+\tgit rev-parse --verify --default main &&\n+\tgit rev-parse --verify --default main HEAD &&\n+\tgit rev-parse --default main --verify &&\n+\tgit rev-parse --default main --verify HEAD &&\n+\tgit rev-parse --verify HEAD --default main &&\n+\ttest_must_fail git rev-parse --verify foo --default main &&\n \ttest_must_fail git rev-parse --default HEAD --verify bar &&\n \ttest_must_fail git rev-parse --verify --default HEAD baz &&\n \ttest_must_fail git rev-parse --default foo --verify &&\n \ttest_must_fail git rev-parse --verify --default bar\n '\n \n-test_expect_success 'master@{n} for various n' '\n+test_expect_success 'main@{n} for various n' '\n \tN=$(git reflog | wc -l) &&\n \tNm1=$(($N-1)) &&\n \tNp1=$(($N+1)) &&\n-\tgit rev-parse --verify master@{0} &&\n-\tgit rev-parse --verify master@{1} &&\n-\tgit rev-parse --verify master@{$Nm1} &&\n-\ttest_must_fail git rev-parse --verify master@{$N} &&\n-\ttest_must_fail git rev-parse --verify master@{$Np1}\n+\tgit rev-parse --verify main@{0} &&\n+\tgit rev-parse --verify main@{1} &&\n+\tgit rev-parse --verify main@{$Nm1} &&\n+\ttest_must_fail git rev-parse --verify main@{$N} &&\n+\ttest_must_fail git rev-parse --verify main@{$Np1}\n '\n \n test_expect_success SYMLINKS 'ref resolution not confused by broken symlinks' '\ndiff --git a/t/t1505-rev-parse-last.sh b/t/t1505-rev-parse-last.sh\nindex 9bd0307b5d..2803ca9489 100755\n--- a/t/t1505-rev-parse-last.sh\n+++ b/t/t1505-rev-parse-last.sh\n@@ -2,7 +2,7 @@\n \n test_description='test @{-N} syntax'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -23,12 +23,12 @@ test_expect_success 'setup' '\n \tmake_commit 3 &&\n \tgit checkout side &&\n \tmake_commit 4 &&\n-\tgit merge master &&\n-\tgit checkout master\n+\tgit merge main &&\n+\tgit checkout main\n \n '\n \n-# 1 -- 2 -- 3 master\n+# 1 -- 2 -- 3 main\n #  \\         \\\n #   \\         \\\n #    --- 4 --- 5 side\n@@ -52,7 +52,7 @@ test_expect_success '@{-1}@{1} works' '\n '\n \n test_expect_success '@{-2} works' '\n-\ttest_cmp_rev master @{-2}\n+\ttest_cmp_rev main @{-2}\n '\n \n test_expect_success '@{-3} fails' '\ndiff --git a/t/t1506-rev-parse-diagnosis.sh b/t/t1506-rev-parse-diagnosis.sh\nindex 694d74fc01..f6e6f23f7e 100755\n--- a/t/t1506-rev-parse-diagnosis.sh\n+++ b/t/t1506-rev-parse-diagnosis.sh\n@@ -4,7 +4,7 @@ test_description='test git rev-parse diagnosis for invalid argument'\n \n exec </dev/null\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -140,10 +140,10 @@ test_expect_success 'incorrect file in :path and :N:path' '\n '\n \n test_expect_success 'invalid @{n} reference' '\n-\ttest_must_fail git rev-parse master@{99999} >output 2>error &&\n+\ttest_must_fail git rev-parse main@{99999} >output 2>error &&\n \ttest_must_be_empty output &&\n \ttest_i18ngrep \"log for [^ ]* only has [0-9][0-9]* entries\" error  &&\n-\ttest_must_fail git rev-parse --verify master@{99999} >output 2>error &&\n+\ttest_must_fail git rev-parse --verify main@{99999} >output 2>error &&\n \ttest_must_be_empty output &&\n \ttest_i18ngrep \"log for [^ ]* only has [0-9][0-9]* entries\" error\n '\ndiff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh\nindex 521233a3c3..73b4f34c6e 100755\n--- a/t/t1507-rev-parse-upstream.sh\n+++ b/t/t1507-rev-parse-upstream.sh\n@@ -2,7 +2,7 @@\n \n test_description='test <branch>@{upstream} syntax'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -13,20 +13,20 @@ test_expect_success 'setup' '\n \ttest_commit 1 &&\n \tgit checkout -b side &&\n \ttest_commit 2 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit clone . clone &&\n \ttest_commit 3 &&\n \t(cd clone &&\n \t test_commit 4 &&\n \t git branch --track my-side origin/side &&\n-\t git branch --track local-master master &&\n+\t git branch --track local-main main &&\n \t git branch --track fun@ny origin/side &&\n \t git branch --track @funny origin/side &&\n \t git branch --track funny@ origin/side &&\n-\t git remote add -t master master-only .. &&\n-\t git fetch master-only &&\n+\t git remote add -t main main-only .. &&\n+\t git fetch main-only &&\n \t git branch bad-upstream &&\n-\t git config branch.bad-upstream.remote master-only &&\n+\t git config branch.bad-upstream.remote main-only &&\n \t git config branch.bad-upstream.merge refs/heads/side\n \t)\n '\n@@ -42,7 +42,7 @@ error_message () {\n }\n \n test_expect_success '@{upstream} resolves to correct full name' '\n-\techo refs/remotes/origin/master >expect &&\n+\techo refs/remotes/origin/main >expect &&\n \tgit -C clone rev-parse --symbolic-full-name @{upstream} >actual &&\n \ttest_cmp expect actual &&\n \tgit -C clone rev-parse --symbolic-full-name @{UPSTREAM} >actual &&\n@@ -52,7 +52,7 @@ test_expect_success '@{upstream} resolves to correct full name' '\n '\n \n test_expect_success '@{u} resolves to correct full name' '\n-\techo refs/remotes/origin/master >expect &&\n+\techo refs/remotes/origin/main >expect &&\n \tgit -C clone rev-parse --symbolic-full-name @{u} >actual &&\n \ttest_cmp expect actual &&\n \tgit -C clone rev-parse --symbolic-full-name @{U} >actual &&\n@@ -135,7 +135,7 @@ test_expect_success 'checkout -b new my-side@{u} forks from the same' '\n test_expect_success 'merge my-side@{u} records the correct name' '\n (\n \tcd clone &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_might_fail git branch -D new &&\n \tgit branch -t new my-side@{u} &&\n \tgit merge -s ours new@{u} &&\n@@ -146,24 +146,24 @@ test_expect_success 'merge my-side@{u} records the correct name' '\n '\n \n test_expect_success 'branch -d other@{u}' '\n-\tgit checkout -t -b other master &&\n+\tgit checkout -t -b other main &&\n \tgit branch -d @{u} &&\n-\tgit for-each-ref refs/heads/master >actual &&\n+\tgit for-each-ref refs/heads/main >actual &&\n \ttest_must_be_empty actual\n '\n \n test_expect_success 'checkout other@{u}' '\n-\tgit branch -f master HEAD &&\n-\tgit checkout -t -b another master &&\n+\tgit branch -f main HEAD &&\n+\tgit checkout -t -b another main &&\n \tgit checkout @{u} &&\n \tgit symbolic-ref HEAD >actual &&\n-\techo refs/heads/master >expect &&\n+\techo refs/heads/main >expect &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'branch@{u} works when tracking a local branch' '\n-\techo refs/heads/master >expect &&\n-\tgit -C clone rev-parse --symbolic-full-name local-master@{u} >actual &&\n+\techo refs/heads/main >expect &&\n+\tgit -C clone rev-parse --symbolic-full-name local-main@{u} >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -177,7 +177,7 @@ test_expect_success 'branch@{u} error message when no upstream' '\n \n test_expect_success '@{u} error message when no upstream' '\n \tcat >expect <<-EOF &&\n-\tfatal: no upstream configured for branch ${SQ}master${SQ}\n+\tfatal: no upstream configured for branch ${SQ}main${SQ}\n \tEOF\n \ttest_must_fail git rev-parse --verify @{u} 2>actual &&\n \ttest_i18ncmp expect actual\n@@ -211,14 +211,14 @@ test_expect_success 'branch@{u} error message if upstream branch not fetched' '\n test_expect_success 'pull works when tracking a local branch' '\n (\n \tcd clone &&\n-\tgit checkout local-master &&\n+\tgit checkout local-main &&\n \tgit pull\n )\n '\n \n # makes sense if the previous one succeeded\n test_expect_success '@{u} works when tracking a local branch' '\n-\techo refs/heads/master >expect &&\n+\techo refs/heads/main >expect &&\n \tgit -C clone rev-parse --symbolic-full-name @{u} >actual &&\n \ttest_cmp expect actual\n '\n@@ -227,7 +227,7 @@ test_expect_success 'log -g other@{u}' '\n \tcommit=$(git rev-parse HEAD) &&\n \tcat >expect <<-EOF &&\n \tcommit $commit\n-\tReflog: master@{0} (C O Mitter <committer@example.com>)\n+\tReflog: main@{0} (C O Mitter <committer@example.com>)\n \tReflog message: branch: Created from HEAD\n \tAuthor: A U Thor <author@example.com>\n \tDate:   Thu Apr 7 15:15:13 2005 -0700\n@@ -242,7 +242,7 @@ test_expect_success 'log -g other@{u}@{now}' '\n \tcommit=$(git rev-parse HEAD) &&\n \tcat >expect <<-EOF &&\n \tcommit $commit\n-\tReflog: master@{Thu Apr 7 15:17:13 2005 -0700} (C O Mitter <committer@example.com>)\n+\tReflog: main@{Thu Apr 7 15:17:13 2005 -0700} (C O Mitter <committer@example.com>)\n \tReflog message: branch: Created from HEAD\n \tAuthor: A U Thor <author@example.com>\n \tDate:   Thu Apr 7 15:15:13 2005 -0700\ndiff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh\nindex 8e73633761..17421a368d 100755\n--- a/t/t1508-at-combinations.sh\n+++ b/t/t1508-at-combinations.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='test various @{X} syntax combinations together'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -33,8 +33,8 @@ fail() {\n }\n \n test_expect_success 'setup' '\n-\ttest_commit master-one &&\n-\ttest_commit master-two &&\n+\ttest_commit main-one &&\n+\ttest_commit main-two &&\n \tgit checkout -b upstream-branch &&\n \ttest_commit upstream-one &&\n \ttest_commit upstream-two &&\n@@ -50,7 +50,7 @@ test_expect_success 'setup' '\n \tgit checkout -b new-branch &&\n \ttest_commit new-one &&\n \ttest_commit new-two &&\n-\tgit branch -u master old-branch &&\n+\tgit branch -u main old-branch &&\n \tgit branch -u upstream-branch new-branch\n '\n \n@@ -65,8 +65,8 @@ check \"@{-1}@{1}\" commit old-one\n check \"@{u}\" ref refs/heads/upstream-branch\n check \"HEAD@{u}\" ref refs/heads/upstream-branch\n check \"@{u}@{1}\" commit upstream-one\n-check \"@{-1}@{u}\" ref refs/heads/master\n-check \"@{-1}@{u}@{1}\" commit master-one\n+check \"@{-1}@{u}\" ref refs/heads/main\n+check \"@{-1}@{u}@{1}\" commit main-one\n check \"@\" commit new-two\n check \"@@{u}\" ref refs/heads/upstream-branch\n check \"@@/at-test\" ref refs/heads/@@/at-test\ndiff --git a/t/t1511-rev-parse-caret.sh b/t/t1511-rev-parse-caret.sh\nindex cfb2ea5e04..6ecfed86bc 100755\n--- a/t/t1511-rev-parse-caret.sh\n+++ b/t/t1511-rev-parse-caret.sh\n@@ -2,7 +2,7 @@\n \n test_description='tests for ref^{stuff}'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -18,7 +18,7 @@ test_expect_success 'setup' '\n \tgit commit -m Initial &&\n \tgit tag -a -m commit commit-tag &&\n \tgit branch ref &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo modified >>a-blob &&\n \tgit add -u &&\n \tgit commit -m Modified &&\n@@ -76,52 +76,52 @@ test_expect_success 'ref^{tag}' '\n '\n \n test_expect_success 'ref^{/.}' '\n-\tgit rev-parse master >expected &&\n-\tgit rev-parse master^{/.} >actual &&\n+\tgit rev-parse main >expected &&\n+\tgit rev-parse main^{/.} >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'ref^{/non-existent}' '\n-\ttest_must_fail git rev-parse master^{/non-existent}\n+\ttest_must_fail git rev-parse main^{/non-existent}\n '\n \n test_expect_success 'ref^{/Initial}' '\n \tgit rev-parse ref >expected &&\n-\tgit rev-parse master^{/Initial} >actual &&\n+\tgit rev-parse main^{/Initial} >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'ref^{/!Exp}' '\n-\ttest_must_fail git rev-parse master^{/!Exp}\n+\ttest_must_fail git rev-parse main^{/!Exp}\n '\n \n test_expect_success 'ref^{/!}' '\n-\ttest_must_fail git rev-parse master^{/!}\n+\ttest_must_fail git rev-parse main^{/!}\n '\n \n test_expect_success 'ref^{/!!Exp}' '\n \tgit rev-parse expref >expected &&\n-\tgit rev-parse master^{/!!Exp} >actual &&\n+\tgit rev-parse main^{/!!Exp} >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'ref^{/!-}' '\n-\ttest_must_fail git rev-parse master^{/!-}\n+\ttest_must_fail git rev-parse main^{/!-}\n '\n \n test_expect_success 'ref^{/!-.}' '\n-\ttest_must_fail git rev-parse master^{/!-.}\n+\ttest_must_fail git rev-parse main^{/!-.}\n '\n \n test_expect_success 'ref^{/!-non-existent}' '\n-\tgit rev-parse master >expected &&\n-\tgit rev-parse master^{/!-non-existent} >actual &&\n+\tgit rev-parse main >expected &&\n+\tgit rev-parse main^{/!-non-existent} >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'ref^{/!-Changed}' '\n \tgit rev-parse expref >expected &&\n-\tgit rev-parse master^{/!-Changed} >actual &&\n+\tgit rev-parse main^{/!-Changed} >actual &&\n \ttest_cmp expected actual\n '\n \ndiff --git a/t/t1512-rev-parse-disambiguation.sh b/t/t1512-rev-parse-disambiguation.sh\nindex 2ef1f2b7e8..b70c9dbce8 100755\n--- a/t/t1512-rev-parse-disambiguation.sh\n+++ b/t/t1512-rev-parse-disambiguation.sh\n@@ -20,7 +20,7 @@ one tagged as v1.0.0.  They all have one regular file each.\n \n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -215,7 +215,7 @@ test_expect_success 'more history' '\n \tside=$(git rev-parse HEAD) &&\n \n \t# commit 000000000066\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \t# If you use recursive, merge will fail and you will need to\n \t# clean up a0blgqsjc as well.  If you use resolve, merge will\ndiff --git a/t/t1513-rev-parse-prefix.sh b/t/t1513-rev-parse-prefix.sh\nindex d151ef9218..5f437be8c9 100755\n--- a/t/t1513-rev-parse-prefix.sh\n+++ b/t/t1513-rev-parse-prefix.sh\n@@ -2,7 +2,7 @@\n \n test_description='Tests for rev-parse --prefix'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -79,9 +79,9 @@ test_expect_success 'disambiguate path with valid prefix' '\n '\n \n test_expect_success 'file and refs with prefix' '\n-\tgit rev-parse --prefix sub1/ master file1 >actual &&\n+\tgit rev-parse --prefix sub1/ main file1 >actual &&\n \tcat <<-EOF >expected &&\n-\t$(git rev-parse master)\n+\t$(git rev-parse main)\n \tsub1/file1\n \tEOF\n \ttest_cmp expected actual\ndiff --git a/t/t1514-rev-parse-push.sh b/t/t1514-rev-parse-push.sh\nindex 173ba2792b..d868a08110 100755\n--- a/t/t1514-rev-parse-push.sh\n+++ b/t/t1514-rev-parse-push.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='test <branch>@{push} syntax'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -19,24 +19,24 @@ test_expect_success 'setup' '\n \tgit remote add other other.git &&\n \ttest_commit base &&\n \tgit push origin HEAD &&\n-\tgit branch --set-upstream-to=origin/master master &&\n-\tgit branch --track topic origin/master &&\n+\tgit branch --set-upstream-to=origin/main main &&\n+\tgit branch --track topic origin/main &&\n \tgit push origin topic &&\n \tgit push other topic\n '\n \n test_expect_success '@{push} with default=nothing' '\n \ttest_config push.default nothing &&\n-\ttest_must_fail git rev-parse master@{push} &&\n-\ttest_must_fail git rev-parse master@{PUSH} &&\n-\ttest_must_fail git rev-parse master@{PuSH}\n+\ttest_must_fail git rev-parse main@{push} &&\n+\ttest_must_fail git rev-parse main@{PUSH} &&\n+\ttest_must_fail git rev-parse main@{PuSH}\n '\n \n test_expect_success '@{push} with default=simple' '\n \ttest_config push.default simple &&\n-\tresolve master@{push} refs/remotes/origin/master &&\n-\tresolve master@{PUSH} refs/remotes/origin/master &&\n-\tresolve master@{pUSh} refs/remotes/origin/master\n+\tresolve main@{push} refs/remotes/origin/main &&\n+\tresolve main@{PUSH} refs/remotes/origin/main &&\n+\tresolve main@{pUSh} refs/remotes/origin/main\n '\n \n test_expect_success 'triangular @{push} fails with default=simple' '\ndiff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh\nindex 7d4a6f1e93..986baa612e 100755\n--- a/t/t1700-split-index.sh\n+++ b/t/t1700-split-index.sh\n@@ -2,7 +2,7 @@\n \n test_description='split index mode tests'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -499,7 +499,7 @@ test_expect_success 'do not refresh null base index' '\n \t\ttest_commit initial &&\n \t\tgit checkout -b side-branch &&\n \t\ttest_commit extra &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit update-index --split-index &&\n \t\ttest_commit more &&\n \t\t# must not write a new shareindex, or we wont catch the problem\n-- \ngitgitgadget\n\n"},{"id":"410293","messageId":"db3a10475007b9fd616dc19465bc475822bcd679.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 08/28] t3[5-9]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:26Z","receivedAt":"2020-11-18T23:45:22Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t3[5-9]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3500-cherry.sh                   | 14 +++++-----\n t/t3501-revert-cherry-pick.sh       |  6 ++---\n t/t3502-cherry-pick-merge.sh        |  4 +--\n t/t3503-cherry-pick-root.sh         | 12 ++++-----\n t/t3504-cherry-pick-rerere.sh       | 26 +++++++++---------\n t/t3505-cherry-pick-empty.sh        | 26 +++++++++---------\n t/t3506-cherry-pick-ff.sh           | 10 +++----\n t/t3507-cherry-pick-conflict.sh     |  4 +--\n t/t3508-cherry-pick-many-commits.sh | 40 +++++++++++++--------------\n t/t3509-cherry-pick-merge-df.sh     |  4 +--\n t/t3512-cherry-pick-submodule.sh    |  4 +--\n t/t3600-rm.sh                       | 12 ++++-----\n t/t3701-add-interactive.sh          |  6 ++---\n t/t3901-i18n-patch.sh               | 42 ++++++++++++++---------------\n t/t3903-stash.sh                    | 34 +++++++++++------------\n t/t3910-mac-os-precompose.sh        |  8 +++---\n 16 files changed, 126 insertions(+), 126 deletions(-)\n\ndiff --git a/t/t3500-cherry.sh b/t/t3500-cherry.sh\nindex 99905dd49a..0458a58b4b 100755\n--- a/t/t3500-cherry.sh\n+++ b/t/t3500-cherry.sh\n@@ -5,10 +5,10 @@\n \n test_description='git cherry should detect patches integrated upstream\n \n-This test cherry-picks one local change of two into master branch, and\n+This test cherry-picks one local change of two into main branch, and\n checks that git cherry only returns the second patch in the local branch\n '\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -35,7 +35,7 @@ test_expect_success \\\n      test_tick &&\n      git commit -m \"Add C.\" &&\n \n-     git checkout -f master &&\n+     git checkout -f main &&\n      rm -f B C &&\n \n      echo Third >> A &&\n@@ -43,19 +43,19 @@ test_expect_success \\\n      test_tick &&\n      git commit -m \"Modify A.\" &&\n \n-     expr \"$(echo $(git cherry master my-topic-branch) )\" : \"+ [^ ]* + .*\"\n+     expr \"$(echo $(git cherry main my-topic-branch) )\" : \"+ [^ ]* + .*\"\n '\n \n test_expect_success \\\n     'check that cherry with limit returns only the top patch'\\\n-    'expr \"$(echo $(git cherry master my-topic-branch my-topic-branch^1) )\" : \"+ [^ ]*\"\n+    'expr \"$(echo $(git cherry main my-topic-branch my-topic-branch^1) )\" : \"+ [^ ]*\"\n '\n \n test_expect_success \\\n     'cherry-pick one of the 2 patches, and check cherry recognized one and only one as new' \\\n     'git cherry-pick my-topic-branch^0 &&\n-     echo $(git cherry master my-topic-branch) &&\n-     expr \"$(echo $(git cherry master my-topic-branch) )\" : \"+ [^ ]* - .*\"\n+     echo $(git cherry main my-topic-branch) &&\n+     expr \"$(echo $(git cherry main my-topic-branch) )\" : \"+ [^ ]* - .*\"\n '\n \n test_expect_success 'cherry ignores whitespace' '\ndiff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh\nindex 6a10714e22..9d100cd188 100755\n--- a/t/t3501-revert-cherry-pick.sh\n+++ b/t/t3501-revert-cherry-pick.sh\n@@ -10,7 +10,7 @@ test_description='test cherry-pick and revert with renames\n \n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -115,7 +115,7 @@ test_expect_success 'cherry-pick on unborn branch' '\n test_expect_success 'cherry-pick \"-\" to pick from previous branch' '\n \tgit checkout unborn &&\n \ttest_commit to-pick actual content &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit cherry-pick - &&\n \techo content >expect &&\n \ttest_cmp expect actual\n@@ -135,7 +135,7 @@ test_expect_success 'cherry-pick \"-\" is meaningless without checkout' '\n test_expect_success 'cherry-pick \"-\" works with arguments' '\n \tgit checkout -b side-branch &&\n \ttest_commit change actual change &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit cherry-pick -s - &&\n \techo \"Signed-off-by: C O Mitter <committer@example.com>\" >expect &&\n \tgit cat-file commit HEAD | grep ^Signed-off-by: >signoff &&\ndiff --git a/t/t3502-cherry-pick-merge.sh b/t/t3502-cherry-pick-merge.sh\nindex 774ad9ce14..5495eacfec 100755\n--- a/t/t3502-cherry-pick-merge.sh\n+++ b/t/t3502-cherry-pick-merge.sh\n@@ -8,7 +8,7 @@ test_description='cherry picking and reverting a merge\n \n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -28,7 +28,7 @@ test_expect_success setup '\n \techo new line >B &&\n \tgit commit -m \"add line to B\" B &&\n \tgit tag b &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge side &&\n \tgit tag c\n \ndiff --git a/t/t3503-cherry-pick-root.sh b/t/t3503-cherry-pick-root.sh\nindex 00c622d5dc..95fe4feaee 100755\n--- a/t/t3503-cherry-pick-root.sh\n+++ b/t/t3503-cherry-pick-root.sh\n@@ -2,7 +2,7 @@\n \n test_description='test cherry-picking (and reverting) a root commit'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -33,7 +33,7 @@ test_expect_success setup '\n test_expect_success 'cherry-pick a root commit' '\n \n \tgit checkout second^0 &&\n-\tgit cherry-pick master &&\n+\tgit cherry-pick main &&\n \techo first >expect &&\n \ttest_cmp expect file1\n \n@@ -41,14 +41,14 @@ test_expect_success 'cherry-pick a root commit' '\n \n test_expect_success 'revert a root commit' '\n \n-\tgit revert master &&\n+\tgit revert main &&\n \ttest_path_is_missing file1\n \n '\n \n test_expect_success 'cherry-pick a root commit with an external strategy' '\n \n-\tgit cherry-pick --strategy=resolve master &&\n+\tgit cherry-pick --strategy=resolve main &&\n \techo first >expect &&\n \ttest_cmp expect file1\n \n@@ -56,7 +56,7 @@ test_expect_success 'cherry-pick a root commit with an external strategy' '\n \n test_expect_success 'revert a root commit with an external strategy' '\n \n-\tgit revert --strategy=resolve master &&\n+\tgit revert --strategy=resolve main &&\n \ttest_path_is_missing file1\n \n '\n@@ -68,7 +68,7 @@ test_expect_success 'cherry-pick two root commits' '\n \techo third >expect.file3 &&\n \n \tgit checkout second^0 &&\n-\tgit cherry-pick master third &&\n+\tgit cherry-pick main third &&\n \n \ttest_cmp expect.file1 file1 &&\n \ttest_cmp expect.file2 file2 &&\ndiff --git a/t/t3504-cherry-pick-rerere.sh b/t/t3504-cherry-pick-rerere.sh\nindex 860ba0b496..9198535874 100755\n--- a/t/t3504-cherry-pick-rerere.sh\n+++ b/t/t3504-cherry-pick-rerere.sh\n@@ -2,15 +2,15 @@\n \n test_description='cherry-pick should rerere for conflicts'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n \n test_expect_success setup '\n \ttest_commit foo &&\n-\ttest_commit foo-master foo &&\n-\ttest_commit bar-master bar &&\n+\ttest_commit foo-main foo &&\n+\ttest_commit bar-main bar &&\n \n \tgit checkout -b dev foo &&\n \ttest_commit foo-dev foo &&\n@@ -19,7 +19,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'conflicting merge' '\n-\ttest_must_fail git merge master\n+\ttest_must_fail git merge main\n '\n \n test_expect_success 'fixup' '\n@@ -32,7 +32,7 @@ test_expect_success 'fixup' '\n '\n \n test_expect_success 'cherry-pick conflict with --rerere-autoupdate' '\n-\ttest_must_fail git cherry-pick --rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --rerere-autoupdate foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \tgit diff-files --quiet &&\n \ttest_must_fail git cherry-pick --continue &&\n@@ -44,7 +44,7 @@ test_expect_success 'cherry-pick conflict with --rerere-autoupdate' '\n \n test_expect_success 'cherry-pick conflict repsects rerere.autoUpdate' '\n \ttest_config rerere.autoUpdate true &&\n-\ttest_must_fail git cherry-pick foo..bar-master &&\n+\ttest_must_fail git cherry-pick foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \tgit diff-files --quiet &&\n \ttest_must_fail git cherry-pick --continue &&\n@@ -56,7 +56,7 @@ test_expect_success 'cherry-pick conflict repsects rerere.autoUpdate' '\n \n test_expect_success 'cherry-pick conflict with --no-rerere-autoupdate' '\n \ttest_config rerere.autoUpdate true &&\n-\ttest_must_fail git cherry-pick --no-rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --no-rerere-autoupdate foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \ttest_must_fail git diff-files --quiet &&\n \tgit add foo &&\n@@ -69,7 +69,7 @@ test_expect_success 'cherry-pick conflict with --no-rerere-autoupdate' '\n '\n \n test_expect_success 'cherry-pick --continue rejects --rerere-autoupdate' '\n-\ttest_must_fail git cherry-pick --rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --rerere-autoupdate foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \tgit diff-files --quiet &&\n \ttest_must_fail git cherry-pick --continue --rerere-autoupdate >actual 2>&1 &&\n@@ -82,25 +82,25 @@ test_expect_success 'cherry-pick --continue rejects --rerere-autoupdate' '\n '\n \n test_expect_success 'cherry-pick --rerere-autoupdate more than once' '\n-\ttest_must_fail git cherry-pick --rerere-autoupdate --rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --rerere-autoupdate --rerere-autoupdate foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \tgit diff-files --quiet &&\n \tgit cherry-pick --abort &&\n-\ttest_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate foo..bar-main &&\n \ttest_cmp foo-expect foo &&\n \tgit diff-files --quiet &&\n \tgit cherry-pick --abort &&\n-\ttest_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate foo..bar-master &&\n+\ttest_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate foo..bar-main &&\n \ttest_must_fail git diff-files --quiet &&\n \tgit cherry-pick --abort\n '\n \n test_expect_success 'cherry-pick conflict without rerere' '\n \ttest_config rerere.enabled false &&\n-\ttest_must_fail git cherry-pick foo-master &&\n+\ttest_must_fail git cherry-pick foo-main &&\n \tgrep ===== foo &&\n \tgrep foo-dev foo &&\n-\tgrep foo-master foo\n+\tgrep foo-main foo\n '\n \n test_done\ndiff --git a/t/t3505-cherry-pick-empty.sh b/t/t3505-cherry-pick-empty.sh\nindex 20cd4052d4..eba3c38d5a 100755\n--- a/t/t3505-cherry-pick-empty.sh\n+++ b/t/t3505-cherry-pick-empty.sh\n@@ -2,7 +2,7 @@\n \n test_description='test cherry-picking an empty commit'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -20,7 +20,7 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit --allow-empty-message -m \"\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -b empty-change-branch &&\n \ttest_tick &&\n \tgit commit --allow-empty -m \"empty\"\n@@ -28,7 +28,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'cherry-pick an empty commit' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_expect_code 1 git cherry-pick empty-change-branch\n '\n \n@@ -38,7 +38,7 @@ test_expect_success 'index lockfile was removed' '\n \n test_expect_success 'cherry-pick a commit with an empty message' '\n \ttest_when_finished \"git reset --hard empty-message-branch~1\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit cherry-pick empty-message-branch\n '\n \n@@ -47,12 +47,12 @@ test_expect_success 'index lockfile was removed' '\n '\n \n test_expect_success 'cherry-pick a commit with an empty message with --allow-empty-message' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit cherry-pick --allow-empty-message empty-message-branch\n '\n \n test_expect_success 'cherry pick an empty non-ff commit without --allow-empty' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo fourth >>file2 &&\n \tgit add file2 &&\n \tgit commit -m \"fourth\" &&\n@@ -60,22 +60,22 @@ test_expect_success 'cherry pick an empty non-ff commit without --allow-empty' '\n '\n \n test_expect_success 'cherry pick an empty non-ff commit with --allow-empty' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit cherry-pick --allow-empty empty-change-branch\n '\n \n test_expect_success 'cherry pick with --keep-redundant-commits' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit cherry-pick --keep-redundant-commits HEAD^\n '\n \n test_expect_success 'cherry-pick a commit that becomes no-op (prep)' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch fork &&\n \techo foo >file2 &&\n \tgit add file2 &&\n \ttest_tick &&\n-\tgit commit -m \"add file2 on master\" &&\n+\tgit commit -m \"add file2 on main\" &&\n \n \tgit checkout fork &&\n \techo foo >file2 &&\n@@ -87,15 +87,15 @@ test_expect_success 'cherry-pick a commit that becomes no-op (prep)' '\n test_expect_success 'cherry-pick a no-op without --keep-redundant' '\n \tgit reset --hard &&\n \tgit checkout fork^0 &&\n-\ttest_must_fail git cherry-pick master\n+\ttest_must_fail git cherry-pick main\n '\n \n test_expect_success 'cherry-pick a no-op with --keep-redundant' '\n \tgit reset --hard &&\n \tgit checkout fork^0 &&\n-\tgit cherry-pick --keep-redundant-commits master &&\n+\tgit cherry-pick --keep-redundant-commits main &&\n \tgit show -s --format=%s >actual &&\n-\techo \"add file2 on master\" >expect &&\n+\techo \"add file2 on main\" >expect &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t3506-cherry-pick-ff.sh b/t/t3506-cherry-pick-ff.sh\nindex a105a782f6..7e11bd4a4c 100755\n--- a/t/t3506-cherry-pick-ff.sh\n+++ b/t/t3506-cherry-pick-ff.sh\n@@ -2,7 +2,7 @@\n \n test_description='test cherry-picking with --ff option'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -27,7 +27,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'cherry-pick using --ff fast forwards' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick --ff second &&\n@@ -35,7 +35,7 @@ test_expect_success 'cherry-pick using --ff fast forwards' '\n '\n \n test_expect_success 'cherry-pick not using --ff does not fast forwards' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick second &&\n@@ -52,7 +52,7 @@ test_expect_success 'cherry-pick not using --ff does not fast forwards' '\n # (This has been taken from t3502-cherry-pick-merge.sh)\n #\n test_expect_success 'merge setup' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard first &&\n \techo new line >A &&\n \tgit add A &&\n@@ -65,7 +65,7 @@ test_expect_success 'merge setup' '\n \ttest_tick &&\n \tgit commit -m \"add line to B\" B &&\n \tgit tag B &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge side &&\n \tgit tag C &&\n \tgit checkout -b new A\ndiff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh\nindex e94264e578..5f4564c830 100755\n--- a/t/t3507-cherry-pick-conflict.sh\n+++ b/t/t3507-cherry-pick-conflict.sh\n@@ -9,7 +9,7 @@ test_description='test cherry-pick and revert with conflicts\n \n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -32,7 +32,7 @@ test_expect_success setup '\n \ttest_commit redundant-pick foo c redundant &&\n \tgit commit --allow-empty --allow-empty-message &&\n \tgit tag empty &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit config advice.detachedhead false\n \n '\ndiff --git a/t/t3508-cherry-pick-many-commits.sh b/t/t3508-cherry-pick-many-commits.sh\nindex b967bf0639..ec7a2c9fcf 100755\n--- a/t/t3508-cherry-pick-many-commits.sh\n+++ b/t/t3508-cherry-pick-many-commits.sh\n@@ -2,7 +2,7 @@\n \n test_description='test cherry-picking many commits'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -34,7 +34,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'cherry-pick first..fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick first..fourth &&\n@@ -48,7 +48,7 @@ test_expect_success 'cherry-pick three one two works' '\n \ttest_commit one &&\n \ttest_commit two &&\n \ttest_commit three &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \tgit cherry-pick three one two &&\n \tgit diff --quiet three &&\n@@ -59,28 +59,28 @@ two\"\n '\n \n test_expect_success 'cherry-pick three one two: fails' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_must_fail git cherry-pick three one two:\n '\n \n test_expect_success 'output to keep user entertained during multi-pick' '\n \tcat <<-\\EOF >expected &&\n-\t[master OBJID] second\n+\t[main OBJID] second\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:14:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n-\t[master OBJID] third\n+\t[main OBJID] third\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:15:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n-\t[master OBJID] fourth\n+\t[main OBJID] fourth\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:16:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n \tEOF\n \n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick first..fourth >actual &&\n@@ -90,7 +90,7 @@ test_expect_success 'output to keep user entertained during multi-pick' '\n '\n \n test_expect_success 'cherry-pick --strategy resolve first..fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick --strategy resolve first..fourth &&\n@@ -102,23 +102,23 @@ test_expect_success 'cherry-pick --strategy resolve first..fourth works' '\n test_expect_success 'output during multi-pick indicates merge strategy' '\n \tcat <<-\\EOF >expected &&\n \tTrying simple merge.\n-\t[master OBJID] second\n+\t[main OBJID] second\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:14:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n \tTrying simple merge.\n-\t[master OBJID] third\n+\t[main OBJID] third\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:15:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n \tTrying simple merge.\n-\t[master OBJID] fourth\n+\t[main OBJID] fourth\n \t Author: A U Thor <author@example.com>\n \t Date: Thu Apr 7 15:16:13 2005 -0700\n \t 1 file changed, 1 insertion(+)\n \tEOF\n \n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick --strategy resolve first..fourth >actual &&\n@@ -127,7 +127,7 @@ test_expect_success 'output during multi-pick indicates merge strategy' '\n '\n \n test_expect_success 'cherry-pick --ff first..fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick --ff first..fourth &&\n@@ -137,7 +137,7 @@ test_expect_success 'cherry-pick --ff first..fourth works' '\n '\n \n test_expect_success 'cherry-pick -n first..fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick -n first..fourth &&\n@@ -147,7 +147,7 @@ test_expect_success 'cherry-pick -n first..fourth works' '\n '\n \n test_expect_success 'revert first..fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard fourth &&\n \ttest_tick &&\n \tgit revert first..fourth &&\n@@ -157,7 +157,7 @@ test_expect_success 'revert first..fourth works' '\n '\n \n test_expect_success 'revert ^first fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard fourth &&\n \ttest_tick &&\n \tgit revert ^first fourth &&\n@@ -167,7 +167,7 @@ test_expect_success 'revert ^first fourth works' '\n '\n \n test_expect_success 'revert fourth fourth~1 fourth~2 works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard fourth &&\n \ttest_tick &&\n \tgit revert fourth fourth~1 fourth~2 &&\n@@ -177,7 +177,7 @@ test_expect_success 'revert fourth fourth~1 fourth~2 works' '\n '\n \n test_expect_success 'cherry-pick -3 fourth works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick -3 fourth &&\n@@ -187,7 +187,7 @@ test_expect_success 'cherry-pick -3 fourth works' '\n '\n \n test_expect_success 'cherry-pick --stdin works' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit rev-list --reverse first..fourth | git cherry-pick --stdin &&\ndiff --git a/t/t3509-cherry-pick-merge-df.sh b/t/t3509-cherry-pick-merge-df.sh\nindex 83cab7b2ed..f4159246e1 100755\n--- a/t/t3509-cherry-pick-merge-df.sh\n+++ b/t/t3509-cherry-pick-merge-df.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='Test cherry-pick with directory/file conflicts'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -31,7 +31,7 @@ test_expect_success 'Setup rename across paths each below D/F conflicts' '\n \n test_expect_success 'Cherry-pick succeeds with rename across D/F conflicts' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit cherry-pick branch\n '\n \ndiff --git a/t/t3512-cherry-pick-submodule.sh b/t/t3512-cherry-pick-submodule.sh\nindex ff33c6d5c9..822f2d4bfb 100755\n--- a/t/t3512-cherry-pick-submodule.sh\n+++ b/t/t3512-cherry-pick-submodule.sh\n@@ -2,7 +2,7 @@\n \n test_description='cherry-pick can handle submodules'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -38,7 +38,7 @@ test_expect_success 'unrelated submodule/file conflict is ignored' '\n \t\tgit add a_file &&\n \t\tgit commit -m \"modify a file\" &&\n \n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \n \t\tgit submodule add ../sub sub &&\n \t\tgit submodule update sub &&\ndiff --git a/t/t3600-rm.sh b/t/t3600-rm.sh\nindex 3baa64bf99..dff1228669 100755\n--- a/t/t3600-rm.sh\n+++ b/t/t3600-rm.sh\n@@ -5,7 +5,7 @@\n \n test_description='Test of the various options to git rm.'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -486,16 +486,16 @@ test_expect_success 'setup submodule conflict' '\n \techo 1 >nitfol &&\n \tgit add nitfol &&\n \tgit commit -m \"added nitfol 1\" &&\n-\tgit checkout -b branch2 master &&\n+\tgit checkout -b branch2 main &&\n \techo 2 >nitfol &&\n \tgit add nitfol &&\n \tgit commit -m \"added nitfol 2\" &&\n-\tgit checkout -b conflict1 master &&\n+\tgit checkout -b conflict1 main &&\n \tgit -C submod fetch &&\n \tgit -C submod checkout branch1 &&\n \tgit add submod &&\n \tgit commit -m \"submod 1\" &&\n-\tgit checkout -b conflict2 master &&\n+\tgit checkout -b conflict2 main &&\n \tgit -C submod checkout branch2 &&\n \tgit add submod &&\n \tgit commit -m \"submod 2\"\n@@ -607,7 +607,7 @@ test_expect_success 'rm of a conflicted unpopulated submodule succeeds' '\n '\n \n test_expect_success 'rm of a populated submodule with a .git directory migrates git dir' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard &&\n \tgit submodule update &&\n \t(\n@@ -720,7 +720,7 @@ test_expect_success 'checking out a commit after submodule removal needs manual\n \tgit checkout HEAD^ &&\n \tgit submodule update &&\n \tgit checkout -q HEAD^ &&\n-\tgit checkout -q master 2>actual &&\n+\tgit checkout -q main 2>actual &&\n \ttest_i18ngrep \"^warning: unable to rmdir '\\''submod'\\'':\" actual &&\n \tgit status -s submod >actual &&\n \techo \"?? submod/\" >expected &&\ndiff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh\nindex 9be7527531..8c7f23cc53 100755\n--- a/t/t3701-add-interactive.sh\n+++ b/t/t3701-add-interactive.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='add -i basic tests'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -552,8 +552,8 @@ test_expect_success 'patch mode ignores unmerged entries' '\n \ttest_commit non-conflict &&\n \tgit checkout -b side &&\n \ttest_commit side conflict.t &&\n-\tgit checkout master &&\n-\ttest_commit master conflict.t &&\n+\tgit checkout main &&\n+\ttest_commit main conflict.t &&\n \ttest_must_fail git merge side &&\n \techo changed >non-conflict.t &&\n \techo y | git add -p >output &&\ndiff --git a/t/t3901-i18n-patch.sh b/t/t3901-i18n-patch.sh\nindex bde27227b6..4f16a735d9 100755\n--- a/t/t3901-i18n-patch.sh\n+++ b/t/t3901-i18n-patch.sh\n@@ -5,7 +5,7 @@\n \n test_description='i18n settings and format-patch | am pipe'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -48,7 +48,7 @@ test_expect_success setup '\n \n \t# the first commit on the side branch is UTF-8\n \ttest_tick &&\n-\tgit checkout -b side master^ &&\n+\tgit checkout -b side main^ &&\n \techo Another file >yours &&\n \tgit add yours &&\n \tgit commit -s -m \"Second on side\" &&\n@@ -72,7 +72,7 @@ test_expect_success setup '\n test_expect_success 'format-patch output (ISO-8859-1)' '\n \tgit config i18n.logoutputencoding ISO8859-1 &&\n \n-\tgit format-patch --stdout master..HEAD^ >out-l1 &&\n+\tgit format-patch --stdout main..HEAD^ >out-l1 &&\n \tgit format-patch --stdout HEAD^ >out-l2 &&\n \tgrep \"^Content-Type: text/plain; charset=ISO8859-1\" out-l1 &&\n \tgrep \"^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=\" out-l1 &&\n@@ -83,7 +83,7 @@ test_expect_success 'format-patch output (ISO-8859-1)' '\n test_expect_success 'format-patch output (UTF-8)' '\n \tgit config i18n.logoutputencoding UTF-8 &&\n \n-\tgit format-patch --stdout master..HEAD^ >out-u1 &&\n+\tgit format-patch --stdout main..HEAD^ >out-u1 &&\n \tgit format-patch --stdout HEAD^ >out-u2 &&\n \tgrep \"^Content-Type: text/plain; charset=UTF-8\" out-u1 &&\n \tgrep \"^From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?=\" out-u1 &&\n@@ -105,7 +105,7 @@ test_expect_success 'rebase (U/U)' '\n \t# we want UTF-8 encoded name.\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \tgit checkout -b test &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \n \tcheck_encoding 2\n '\n@@ -116,7 +116,7 @@ test_expect_success 'rebase (U/L)' '\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \n \tcheck_encoding 2\n '\n@@ -128,7 +128,7 @@ test_expect_success !MINGW 'rebase (L/L)' '\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \n \tcheck_encoding 2 8859\n '\n@@ -141,7 +141,7 @@ test_expect_success !MINGW 'rebase (L/U)' '\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase master &&\n+\tgit rebase main &&\n \n \tcheck_encoding 2 8859\n '\n@@ -153,7 +153,7 @@ test_expect_success 'cherry-pick(U/U)' '\n \tgit config i18n.logoutputencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit cherry-pick side^ &&\n \tgit cherry-pick side &&\n \tgit revert HEAD &&\n@@ -168,7 +168,7 @@ test_expect_success !MINGW 'cherry-pick(L/L)' '\n \tgit config i18n.logoutputencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit cherry-pick side^ &&\n \tgit cherry-pick side &&\n \tgit revert HEAD &&\n@@ -183,7 +183,7 @@ test_expect_success 'cherry-pick(U/L)' '\n \tgit config i18n.logoutputencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit cherry-pick side^ &&\n \tgit cherry-pick side &&\n \tgit revert HEAD &&\n@@ -199,7 +199,7 @@ test_expect_success !MINGW 'cherry-pick(L/U)' '\n \tgit config i18n.logoutputencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit cherry-pick side^ &&\n \tgit cherry-pick side &&\n \tgit revert HEAD &&\n@@ -213,7 +213,7 @@ test_expect_success 'rebase --merge (U/U)' '\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase --merge master &&\n+\tgit rebase --merge main &&\n \n \tcheck_encoding 2\n '\n@@ -224,7 +224,7 @@ test_expect_success 'rebase --merge (U/L)' '\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase --merge master &&\n+\tgit rebase --merge main &&\n \n \tcheck_encoding 2\n '\n@@ -236,7 +236,7 @@ test_expect_success 'rebase --merge (L/L)' '\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase --merge master &&\n+\tgit rebase --merge main &&\n \n \tcheck_encoding 2 8859\n '\n@@ -249,7 +249,7 @@ test_expect_success 'rebase --merge (L/U)' '\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n \tgit reset --hard side &&\n-\tgit rebase --merge master &&\n+\tgit rebase --merge main &&\n \n \tcheck_encoding 2 8859\n '\n@@ -259,7 +259,7 @@ test_expect_success 'am (U/U)' '\n \tgit config i18n.commitencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit am out-u1 out-u2 &&\n \n \tcheck_encoding 2\n@@ -270,7 +270,7 @@ test_expect_success !MINGW 'am (L/L)' '\n \tgit config i18n.commitencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit am out-l1 out-l2 &&\n \n \tcheck_encoding 2 8859\n@@ -280,7 +280,7 @@ test_expect_success 'am (U/L)' '\n \t# Apply ISO-8859-1 patches with UTF-8 commitencoding\n \tgit config i18n.commitencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \n \t# am specifies --utf8 by default.\n \tgit am out-l1 out-l2 &&\n@@ -293,7 +293,7 @@ test_expect_success 'am --no-utf8 (U/L)' '\n \tgit config i18n.commitencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit am --no-utf8 out-l1 out-l2 2>err &&\n \n \t# commit-tree will warn that the commit message does not contain valid UTF-8\n@@ -308,7 +308,7 @@ test_expect_success !MINGW 'am (L/U)' '\n \tgit config i18n.commitencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \t# mailinfo will re-code the commit message to the charset specified by\n \t# i18n.commitencoding\n \tgit am out-u1 out-u2 &&\ndiff --git a/t/t3903-stash.sh b/t/t3903-stash.sh\nindex 49d52c46ad..84b039e573 100755\n--- a/t/t3903-stash.sh\n+++ b/t/t3903-stash.sh\n@@ -5,7 +5,7 @@\n \n test_description='Test git stash'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -223,14 +223,14 @@ test_expect_success 'stash branch' '\n \tgit commit file -m second &&\n \tgit stash branch stashbranch &&\n \ttest refs/heads/stashbranch = $(git symbolic-ref HEAD) &&\n-\ttest $(git rev-parse HEAD) = $(git rev-parse master^) &&\n+\ttest $(git rev-parse HEAD) = $(git rev-parse main^) &&\n \tgit diff --cached >output &&\n \tdiff_cmp expect output &&\n \tgit diff >output &&\n \tdiff_cmp expect1 output &&\n \tgit add file &&\n \tgit commit -m alternate\\ second &&\n-\tgit diff master..stashbranch >output &&\n+\tgit diff main..stashbranch >output &&\n \tdiff_cmp output expect2 &&\n \ttest 0 = $(git stash list | wc -l)\n '\n@@ -523,7 +523,7 @@ test_expect_success 'stash branch - no stashes on stack, stash-like argument' '\n \tSTASH_ID=$(git stash create) &&\n \tgit reset --hard &&\n \tgit stash branch stash-branch ${STASH_ID} &&\n-\ttest_when_finished \"git reset --hard HEAD && git checkout master &&\n+\ttest_when_finished \"git reset --hard HEAD && git checkout main &&\n \tgit branch -D stash-branch\" &&\n \ttest $(git ls-files --modified | wc -l) -eq 1\n '\n@@ -539,7 +539,7 @@ test_expect_success 'stash branch - stashes on stack, stash-like argument' '\n \tSTASH_ID=$(git stash create) &&\n \tgit reset --hard &&\n \tgit stash branch stash-branch ${STASH_ID} &&\n-\ttest_when_finished \"git reset --hard HEAD && git checkout master &&\n+\ttest_when_finished \"git reset --hard HEAD && git checkout main &&\n \tgit branch -D stash-branch\" &&\n \ttest $(git ls-files --modified | wc -l) -eq 1\n '\n@@ -741,7 +741,7 @@ test_expect_success 'valid ref of the form \"n\", n < N' '\n \tgit stash &&\n \tgit stash show 0 &&\n \tgit stash branch tmp 0 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit stash &&\n \tgit stash apply 0 &&\n \tgit reset --hard &&\n@@ -758,7 +758,7 @@ test_expect_success 'branch: do not drop the stash if the branch exists' '\n \tgit commit -m initial &&\n \techo bar >file &&\n \tgit stash &&\n-\ttest_must_fail git stash branch master stash@{0} &&\n+\ttest_must_fail git stash branch main stash@{0} &&\n \tgit rev-parse stash@{0} --\n '\n \n@@ -771,7 +771,7 @@ test_expect_success 'branch: should not drop the stash if the apply fails' '\n \techo bar >file &&\n \tgit stash &&\n \techo baz >file &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_must_fail git stash branch new_branch stash@{0} &&\n \tgit rev-parse stash@{0} --\n '\n@@ -905,7 +905,7 @@ test_expect_success 'push -m shows right message' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push -m \"test message\" &&\n-\techo \"stash@{0}: On master: test message\" >expect &&\n+\techo \"stash@{0}: On main: test message\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -914,7 +914,7 @@ test_expect_success 'push -m also works without space' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push -m\"unspaced test message\" &&\n-\techo \"stash@{0}: On master: unspaced test message\" >expect &&\n+\techo \"stash@{0}: On main: unspaced test message\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -971,7 +971,7 @@ test_expect_success 'push -mfoo uses right message' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push -m\"test mfoo\" &&\n-\techo \"stash@{0}: On master: test mfoo\" >expect &&\n+\techo \"stash@{0}: On main: test mfoo\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -980,7 +980,7 @@ test_expect_success 'push --message foo is synonym for -mfoo' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push --message \"test message foo\" &&\n-\techo \"stash@{0}: On master: test message foo\" >expect &&\n+\techo \"stash@{0}: On main: test message foo\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -989,7 +989,7 @@ test_expect_success 'push --message=foo is synonym for -mfoo' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push --message=\"test message=foo\" &&\n-\techo \"stash@{0}: On master: test message=foo\" >expect &&\n+\techo \"stash@{0}: On main: test message=foo\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -998,7 +998,7 @@ test_expect_success 'push -m shows right message' '\n \t>foo &&\n \tgit add foo &&\n \tgit stash push -m \"test m foo\" &&\n-\techo \"stash@{0}: On master: test m foo\" >expect &&\n+\techo \"stash@{0}: On main: test m foo\" >expect &&\n \tgit stash list -1 >actual &&\n \ttest_cmp expect actual\n '\n@@ -1007,7 +1007,7 @@ test_expect_success 'create stores correct message' '\n \t>foo &&\n \tgit add foo &&\n \tSTASH_ID=$(git stash create \"create test message\") &&\n-\techo \"On master: create test message\" >expect &&\n+\techo \"On main: create test message\" >expect &&\n \tgit show --pretty=%s -s ${STASH_ID} >actual &&\n \ttest_cmp expect actual\n '\n@@ -1016,13 +1016,13 @@ test_expect_success 'create with multiple arguments for the message' '\n \t>foo &&\n \tgit add foo &&\n \tSTASH_ID=$(git stash create test untracked) &&\n-\techo \"On master: test untracked\" >expect &&\n+\techo \"On main: test untracked\" >expect &&\n \tgit show --pretty=%s -s ${STASH_ID} >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'create in a detached state' '\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit checkout HEAD~1 &&\n \t>foo &&\n \tgit add foo &&\ndiff --git a/t/t3910-mac-os-precompose.sh b/t/t3910-mac-os-precompose.sh\nindex a2d1cdec6d..a0b9208ce8 100755\n--- a/t/t3910-mac-os-precompose.sh\n+++ b/t/t3910-mac-os-precompose.sh\n@@ -5,7 +5,7 @@\n \n test_description='utf-8 decomposed (nfd) converted to precomposed (nfc)'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -154,7 +154,7 @@ test_expect_success \"git checkout link nfd\" '\n \tgit checkout l.$Odiarnfd\n '\n test_expect_success \"setup case mac2\" '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard &&\n \tgit checkout -b mac_os_2\n '\n@@ -166,7 +166,7 @@ test_expect_success \"commit file d2.Adiarnfd/f.Adiarnfd\" '\n \tgit commit -m \"add d2.$Adiarnfd/f.$Adiarnfd\" -- d2.$Adiarnfd/f.$Adiarnfd\n '\n test_expect_success \"setup for long decomposed filename\" '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard &&\n \tgit checkout -b mac_os_long_nfd_fn\n '\n@@ -176,7 +176,7 @@ test_expect_success \"Add long decomposed filename\" '\n \tgit commit -m \"Long filename\"\n '\n test_expect_success \"setup for long precomposed filename\" '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard &&\n \tgit checkout -b mac_os_long_nfc_fn\n '\n-- \ngitgitgadget\n\n"},{"id":"410300","messageId":"0164eb9745d010f04cafa3564bc65f874811d190.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 09/28] t4*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:27Z","receivedAt":"2020-11-18T23:45:22Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t4013 and t4015, which see independent development\nelsewhere at the time of writing, we use `main` as the default branch\nname in t4*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t4*.sh t4211/*.export &&\n\t   git checkout HEAD -- t4013\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t4014-format-patch.sh              | 178 +++++++++++++--------------\n t/t4017-diff-retval.sh               |   4 +-\n t/t4038-diff-combined.sh             |  16 +--\n t/t4041-diff-submodule-option.sh     |   4 +-\n t/t4048-diff-combined-binary.sh      |  12 +-\n t/t4052-stat-output.sh               |   6 +-\n t/t4056-diff-order.sh                |   4 +-\n t/t4057-diff-combined-paths.sh       |  22 ++--\n t/t4061-diff-indent.sh               |  26 ++--\n t/t4066-diff-emit-delay.sh           |   4 +-\n t/t4068-diff-symmetric-merge-base.sh |  50 ++++----\n t/t4103-apply-binary.sh              |  38 +++---\n t/t4108-apply-threeway.sh            |  16 +--\n t/t4121-apply-diffs.sh               |   4 +-\n t/t4122-apply-symlink-inside.sh      |   8 +-\n t/t4150-am.sh                        |  28 ++---\n t/t4200-rerere.sh                    |  22 ++--\n t/t4201-shortlog.sh                  |   4 +-\n t/t4202-log.sh                       | 108 ++++++++--------\n t/t4203-mailmap.sh                   |   4 +-\n t/t4204-patch-id.sh                  |  28 ++---\n t/t4207-log-decoration-colors.sh     |   8 +-\n t/t4208-log-magic-pathspec.sh        |   6 +-\n t/t4211-line-log.sh                  |   2 +-\n t/t4211/history.export               |   2 +-\n t/t4214-log-graph-octopus.sh         |   4 +-\n t/t4216-log-bloom.sh                 |   6 +-\n t/t4253-am-keep-cr-dos.sh            |  22 ++--\n t/t4257-am-interactive.sh            |   2 +-\n 29 files changed, 319 insertions(+), 319 deletions(-)\n\ndiff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh\nindex 276aea32a6..66630c8413 100755\n--- a/t/t4014-format-patch.sh\n+++ b/t/t4014-format-patch.sh\n@@ -5,7 +5,7 @@\n \n test_description='various format-patch tests'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -35,11 +35,11 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m \"Side changes #3 with \\\\n backslash-n in it.\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit diff-tree -p C2 >patch &&\n \tgit apply --index <patch &&\n \ttest_tick &&\n-\tgit commit -m \"Master accepts moral equivalent of #2\" &&\n+\tgit commit -m \"Main accepts moral equivalent of #2\" &&\n \n \tgit checkout side &&\n \tgit checkout -b patchid &&\n@@ -59,39 +59,39 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m \"patchid 3\" &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'format-patch --ignore-if-in-upstream' '\n-\tgit format-patch --stdout master..side >patch0 &&\n+\tgit format-patch --stdout main..side >patch0 &&\n \tgrep \"^From \" patch0 >from0 &&\n \ttest_line_count = 3 from0\n '\n \n test_expect_success 'format-patch --ignore-if-in-upstream' '\n \tgit format-patch --stdout \\\n-\t\t--ignore-if-in-upstream master..side >patch1 &&\n+\t\t--ignore-if-in-upstream main..side >patch1 &&\n \tgrep \"^From \" patch1 >from1 &&\n \ttest_line_count = 2 from1\n '\n \n test_expect_success 'format-patch --ignore-if-in-upstream handles tags' '\n \tgit tag -a v1 -m tag side &&\n-\tgit tag -a v2 -m tag master &&\n+\tgit tag -a v2 -m tag main &&\n \tgit format-patch --stdout --ignore-if-in-upstream v2..v1 >patch1 &&\n \tgrep \"^From \" patch1 >from1 &&\n \ttest_line_count = 2 from1\n '\n \n test_expect_success \"format-patch doesn't consider merge commits\" '\n-\tgit checkout -b feature master &&\n+\tgit checkout -b feature main &&\n \techo \"Another line\" >>file &&\n \ttest_tick &&\n \tgit commit -am \"Feature branch change #1\" &&\n \techo \"Yet another line\" >>file &&\n \ttest_tick &&\n \tgit commit -am \"Feature branch change #2\" &&\n-\tgit checkout -b merger master &&\n+\tgit checkout -b merger main &&\n \ttest_tick &&\n \tgit merge --no-ff feature &&\n \tgit format-patch -3 --stdout >patch &&\n@@ -100,16 +100,16 @@ test_expect_success \"format-patch doesn't consider merge commits\" '\n '\n \n test_expect_success 'format-patch result applies' '\n-\tgit checkout -b rebuild-0 master &&\n+\tgit checkout -b rebuild-0 main &&\n \tgit am -3 patch0 &&\n-\tgit rev-list master.. >list &&\n+\tgit rev-list main.. >list &&\n \ttest_line_count = 2 list\n '\n \n test_expect_success 'format-patch --ignore-if-in-upstream result applies' '\n-\tgit checkout -b rebuild-1 master &&\n+\tgit checkout -b rebuild-1 main &&\n \tgit am -3 patch1 &&\n-\tgit rev-list master.. >list &&\n+\tgit rev-list main.. >list &&\n \ttest_line_count = 2 list\n '\n \n@@ -133,7 +133,7 @@ test_expect_success 'extra headers' '\n \" &&\n \tgit config --add format.headers \"Cc: S E Cipient <scipient@example.com>\n \" &&\n-\tgit format-patch --stdout master..side >patch2 &&\n+\tgit format-patch --stdout main..side >patch2 &&\n \tsed -e \"/^\\$/q\" patch2 >hdrs2 &&\n \tgrep \"^To: R E Cipient <rcipient@example.com>\\$\" hdrs2 &&\n \tgrep \"^Cc: S E Cipient <scipient@example.com>\\$\" hdrs2\n@@ -142,7 +142,7 @@ test_expect_success 'extra headers' '\n test_expect_success 'extra headers without newlines' '\n \tgit config --replace-all format.headers \"To: R E Cipient <rcipient@example.com>\" &&\n \tgit config --add format.headers \"Cc: S E Cipient <scipient@example.com>\" &&\n-\tgit format-patch --stdout master..side >patch3 &&\n+\tgit format-patch --stdout main..side >patch3 &&\n \tsed -e \"/^\\$/q\" patch3 >hdrs3 &&\n \tgrep \"^To: R E Cipient <rcipient@example.com>\\$\" hdrs3 &&\n \tgrep \"^Cc: S E Cipient <scipient@example.com>\\$\" hdrs3\n@@ -151,7 +151,7 @@ test_expect_success 'extra headers without newlines' '\n test_expect_success 'extra headers with multiple To:s' '\n \tgit config --replace-all format.headers \"To: R E Cipient <rcipient@example.com>\" &&\n \tgit config --add format.headers \"To: S E Cipient <scipient@example.com>\" &&\n-\tgit format-patch --stdout master..side >patch4 &&\n+\tgit format-patch --stdout main..side >patch4 &&\n \tsed -e \"/^\\$/q\" patch4 >hdrs4 &&\n \tgrep \"^To: R E Cipient <rcipient@example.com>,\\$\" hdrs4 &&\n \tgrep \"^ *S E Cipient <scipient@example.com>\\$\" hdrs4\n@@ -159,7 +159,7 @@ test_expect_success 'extra headers with multiple To:s' '\n \n test_expect_success 'additional command line cc (ascii)' '\n \tgit config --replace-all format.headers \"Cc: R E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --cc=\"S E Cipient <scipient@example.com>\" --stdout master..side >patch5 &&\n+\tgit format-patch --cc=\"S E Cipient <scipient@example.com>\" --stdout main..side >patch5 &&\n \tsed -e \"/^\\$/q\" patch5 >hdrs5 &&\n \tgrep \"^Cc: R E Cipient <rcipient@example.com>,\\$\" hdrs5 &&\n \tgrep \"^ *S E Cipient <scipient@example.com>\\$\" hdrs5\n@@ -167,7 +167,7 @@ test_expect_success 'additional command line cc (ascii)' '\n \n test_expect_failure 'additional command line cc (rfc822)' '\n \tgit config --replace-all format.headers \"Cc: R E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --cc=\"S. E. Cipient <scipient@example.com>\" --stdout master..side >patch5 &&\n+\tgit format-patch --cc=\"S. E. Cipient <scipient@example.com>\" --stdout main..side >patch5 &&\n \tsed -e \"/^\\$/q\" patch5 >hdrs5 &&\n \tgrep \"^Cc: R E Cipient <rcipient@example.com>,\\$\" hdrs5 &&\n \tgrep \"^ *\\\"S. E. Cipient\\\" <scipient@example.com>\\$\" hdrs5\n@@ -175,14 +175,14 @@ test_expect_failure 'additional command line cc (rfc822)' '\n \n test_expect_success 'command line headers' '\n \tgit config --unset-all format.headers &&\n-\tgit format-patch --add-header=\"Cc: R E Cipient <rcipient@example.com>\" --stdout master..side >patch6 &&\n+\tgit format-patch --add-header=\"Cc: R E Cipient <rcipient@example.com>\" --stdout main..side >patch6 &&\n \tsed -e \"/^\\$/q\" patch6 >hdrs6 &&\n \tgrep \"^Cc: R E Cipient <rcipient@example.com>\\$\" hdrs6\n '\n \n test_expect_success 'configuration headers and command line headers' '\n \tgit config --replace-all format.headers \"Cc: R E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --add-header=\"Cc: S E Cipient <scipient@example.com>\" --stdout master..side >patch7 &&\n+\tgit format-patch --add-header=\"Cc: S E Cipient <scipient@example.com>\" --stdout main..side >patch7 &&\n \tsed -e \"/^\\$/q\" patch7 >hdrs7 &&\n \tgrep \"^Cc: R E Cipient <rcipient@example.com>,\\$\" hdrs7 &&\n \tgrep \"^ *S E Cipient <scipient@example.com>\\$\" hdrs7\n@@ -190,40 +190,40 @@ test_expect_success 'configuration headers and command line headers' '\n \n test_expect_success 'command line To: header (ascii)' '\n \tgit config --unset-all format.headers &&\n-\tgit format-patch --to=\"R E Cipient <rcipient@example.com>\" --stdout master..side >patch8 &&\n+\tgit format-patch --to=\"R E Cipient <rcipient@example.com>\" --stdout main..side >patch8 &&\n \tsed -e \"/^\\$/q\" patch8 >hdrs8 &&\n \tgrep \"^To: R E Cipient <rcipient@example.com>\\$\" hdrs8\n '\n \n test_expect_failure 'command line To: header (rfc822)' '\n-\tgit format-patch --to=\"R. E. Cipient <rcipient@example.com>\" --stdout master..side >patch8 &&\n+\tgit format-patch --to=\"R. E. Cipient <rcipient@example.com>\" --stdout main..side >patch8 &&\n \tsed -e \"/^\\$/q\" patch8 >hdrs8 &&\n \tgrep \"^To: \\\"R. E. Cipient\\\" <rcipient@example.com>\\$\" hdrs8\n '\n \n test_expect_failure 'command line To: header (rfc2047)' '\n-\tgit format-patch --to=\"R Ä Cipient <rcipient@example.com>\" --stdout master..side >patch8 &&\n+\tgit format-patch --to=\"R Ä Cipient <rcipient@example.com>\" --stdout main..side >patch8 &&\n \tsed -e \"/^\\$/q\" patch8 >hdrs8 &&\n \tgrep \"^To: =?UTF-8?q?R=20=C3=84=20Cipient?= <rcipient@example.com>\\$\" hdrs8\n '\n \n test_expect_success 'configuration To: header (ascii)' '\n \tgit config format.to \"R E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --stdout master..side >patch9 &&\n+\tgit format-patch --stdout main..side >patch9 &&\n \tsed -e \"/^\\$/q\" patch9 >hdrs9 &&\n \tgrep \"^To: R E Cipient <rcipient@example.com>\\$\" hdrs9\n '\n \n test_expect_failure 'configuration To: header (rfc822)' '\n \tgit config format.to \"R. E. Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --stdout master..side >patch9 &&\n+\tgit format-patch --stdout main..side >patch9 &&\n \tsed -e \"/^\\$/q\" patch9 >hdrs9 &&\n \tgrep \"^To: \\\"R. E. Cipient\\\" <rcipient@example.com>\\$\" hdrs9\n '\n \n test_expect_failure 'configuration To: header (rfc2047)' '\n \tgit config format.to \"R Ä Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --stdout master..side >patch9 &&\n+\tgit format-patch --stdout main..side >patch9 &&\n \tsed -e \"/^\\$/q\" patch9 >hdrs9 &&\n \tgrep \"^To: =?UTF-8?q?R=20=C3=84=20Cipient?= <rcipient@example.com>\\$\" hdrs9\n '\n@@ -237,35 +237,35 @@ check_patch () {\n }\n \n test_expect_success 'format.from=false' '\n-\tgit -c format.from=false format-patch --stdout master..side >patch &&\n+\tgit -c format.from=false format-patch --stdout main..side >patch &&\n \tsed -e \"/^\\$/q\" patch >hdrs &&\n \tcheck_patch patch &&\n \t! grep \"^From: C O Mitter <committer@example.com>\\$\" hdrs\n '\n \n test_expect_success 'format.from=true' '\n-\tgit -c format.from=true format-patch --stdout master..side >patch &&\n+\tgit -c format.from=true format-patch --stdout main..side >patch &&\n \tsed -e \"/^\\$/q\" patch >hdrs &&\n \tcheck_patch hdrs &&\n \tgrep \"^From: C O Mitter <committer@example.com>\\$\" hdrs\n '\n \n test_expect_success 'format.from with address' '\n-\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --stdout master..side >patch &&\n+\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --stdout main..side >patch &&\n \tsed -e \"/^\\$/q\" patch >hdrs &&\n \tcheck_patch hdrs &&\n \tgrep \"^From: F R Om <from@example.com>\\$\" hdrs\n '\n \n test_expect_success '--no-from overrides format.from' '\n-\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --no-from --stdout master..side >patch &&\n+\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --no-from --stdout main..side >patch &&\n \tsed -e \"/^\\$/q\" patch >hdrs &&\n \tcheck_patch hdrs &&\n \t! grep \"^From: F R Om <from@example.com>\\$\" hdrs\n '\n \n test_expect_success '--from overrides format.from' '\n-\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --from --stdout master..side >patch &&\n+\tgit -c format.from=\"F R Om <from@example.com>\" format-patch --from --stdout main..side >patch &&\n \tsed -e \"/^\\$/q\" patch >hdrs &&\n \tcheck_patch hdrs &&\n \t! grep \"^From: F R Om <from@example.com>\\$\" hdrs\n@@ -274,7 +274,7 @@ test_expect_success '--from overrides format.from' '\n test_expect_success '--no-to overrides config.to' '\n \tgit config --replace-all format.to \\\n \t\t\"R E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --no-to --stdout master..side >patch10 &&\n+\tgit format-patch --no-to --stdout main..side >patch10 &&\n \tsed -e \"/^\\$/q\" patch10 >hdrs10 &&\n \tcheck_patch hdrs10 &&\n \t! grep \"^To: R E Cipient <rcipient@example.com>\\$\" hdrs10\n@@ -284,7 +284,7 @@ test_expect_success '--no-to and --to replaces config.to' '\n \tgit config --replace-all format.to \\\n \t\t\"Someone <someone@out.there>\" &&\n \tgit format-patch --no-to --to=\"Someone Else <else@out.there>\" \\\n-\t\t--stdout master..side >patch11 &&\n+\t\t--stdout main..side >patch11 &&\n \tsed -e \"/^\\$/q\" patch11 >hdrs11 &&\n \tcheck_patch hdrs11 &&\n \t! grep \"^To: Someone <someone@out.there>\\$\" hdrs11 &&\n@@ -294,7 +294,7 @@ test_expect_success '--no-to and --to replaces config.to' '\n test_expect_success '--no-cc overrides config.cc' '\n \tgit config --replace-all format.cc \\\n \t\t\"C E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --no-cc --stdout master..side >patch12 &&\n+\tgit format-patch --no-cc --stdout main..side >patch12 &&\n \tsed -e \"/^\\$/q\" patch12 >hdrs12 &&\n \tcheck_patch hdrs12 &&\n \t! grep \"^Cc: C E Cipient <rcipient@example.com>\\$\" hdrs12\n@@ -303,7 +303,7 @@ test_expect_success '--no-cc overrides config.cc' '\n test_expect_success '--no-add-header overrides config.headers' '\n \tgit config --replace-all format.headers \\\n \t\t\"Header1: B E Cipient <rcipient@example.com>\" &&\n-\tgit format-patch --no-add-header --stdout master..side >patch13 &&\n+\tgit format-patch --no-add-header --stdout main..side >patch13 &&\n \tsed -e \"/^\\$/q\" patch13 >hdrs13 &&\n \tcheck_patch hdrs13 &&\n \t! grep \"^Header1: B E Cipient <rcipient@example.com>\\$\" hdrs13\n@@ -312,7 +312,7 @@ test_expect_success '--no-add-header overrides config.headers' '\n test_expect_success 'multiple files' '\n \trm -rf patches/ &&\n \tgit checkout side &&\n-\tgit format-patch -o patches/ master &&\n+\tgit format-patch -o patches/ main &&\n \tls patches/0001-Side-changes-1.patch patches/0002-Side-changes-2.patch patches/0003-Side-changes-3-with-n-backslash-n-in-it.patch\n '\n \n@@ -372,7 +372,7 @@ test_expect_success 'filename limit applies only to basename' '\n \n test_expect_success 'reroll count' '\n \trm -fr patches &&\n-\tgit format-patch -o patches --cover-letter --reroll-count 4 master..side >list &&\n+\tgit format-patch -o patches --cover-letter --reroll-count 4 main..side >list &&\n \t! grep -v \"^patches/v4-000[0-3]-\" list &&\n \tsed -n -e \"/^Subject: /p\" $(cat list) >subjects &&\n \t! grep -v \"^Subject: \\[PATCH v4 [0-3]/3\\] \" subjects\n@@ -380,7 +380,7 @@ test_expect_success 'reroll count' '\n \n test_expect_success 'reroll count (-v)' '\n \trm -fr patches &&\n-\tgit format-patch -o patches --cover-letter -v4 master..side >list &&\n+\tgit format-patch -o patches --cover-letter -v4 main..side >list &&\n \t! grep -v \"^patches/v4-000[0-3]-\" list &&\n \tsed -n -e \"/^Subject: /p\" $(cat list) >subjects &&\n \t! grep -v \"^Subject: \\[PATCH v4 [0-3]/3\\] \" subjects\n@@ -416,7 +416,7 @@ EOF\n \n test_expect_success 'no threading' '\n \tgit checkout side &&\n-\tcheck_threading expect.no-threading master\n+\tcheck_threading expect.no-threading main\n '\n \n cat >expect.thread <<EOF\n@@ -433,7 +433,7 @@ References: <0>\n EOF\n \n test_expect_success 'thread' '\n-\tcheck_threading expect.thread --thread master\n+\tcheck_threading expect.thread --thread main\n '\n \n cat >expect.in-reply-to <<EOF\n@@ -453,7 +453,7 @@ EOF\n \n test_expect_success 'thread in-reply-to' '\n \tcheck_threading expect.in-reply-to --in-reply-to=\"<test.message>\" \\\n-\t\t--thread master\n+\t\t--thread main\n '\n \n cat >expect.cover-letter <<EOF\n@@ -474,7 +474,7 @@ References: <0>\n EOF\n \n test_expect_success 'thread cover-letter' '\n-\tcheck_threading expect.cover-letter --cover-letter --thread master\n+\tcheck_threading expect.cover-letter --cover-letter --thread main\n '\n \n cat >expect.cl-irt <<EOF\n@@ -501,12 +501,12 @@ EOF\n \n test_expect_success 'thread cover-letter in-reply-to' '\n \tcheck_threading expect.cl-irt --cover-letter \\\n-\t\t--in-reply-to=\"<test.message>\" --thread master\n+\t\t--in-reply-to=\"<test.message>\" --thread main\n '\n \n test_expect_success 'thread explicit shallow' '\n \tcheck_threading expect.cl-irt --cover-letter \\\n-\t\t--in-reply-to=\"<test.message>\" --thread=shallow master\n+\t\t--in-reply-to=\"<test.message>\" --thread=shallow main\n '\n \n cat >expect.deep <<EOF\n@@ -524,7 +524,7 @@ References: <0>\n EOF\n \n test_expect_success 'thread deep' '\n-\tcheck_threading expect.deep --thread=deep master\n+\tcheck_threading expect.deep --thread=deep main\n '\n \n cat >expect.deep-irt <<EOF\n@@ -547,7 +547,7 @@ EOF\n \n test_expect_success 'thread deep in-reply-to' '\n \tcheck_threading expect.deep-irt  --thread=deep \\\n-\t\t--in-reply-to=\"<test.message>\" master\n+\t\t--in-reply-to=\"<test.message>\" main\n '\n \n cat >expect.deep-cl <<EOF\n@@ -571,7 +571,7 @@ References: <0>\n EOF\n \n test_expect_success 'thread deep cover-letter' '\n-\tcheck_threading expect.deep-cl --cover-letter --thread=deep master\n+\tcheck_threading expect.deep-cl --cover-letter --thread=deep main\n '\n \n cat >expect.deep-cl-irt <<EOF\n@@ -601,27 +601,27 @@ EOF\n \n test_expect_success 'thread deep cover-letter in-reply-to' '\n \tcheck_threading expect.deep-cl-irt --cover-letter \\\n-\t\t--in-reply-to=\"<test.message>\" --thread=deep master\n+\t\t--in-reply-to=\"<test.message>\" --thread=deep main\n '\n \n test_expect_success 'thread via config' '\n \ttest_config format.thread true &&\n-\tcheck_threading expect.thread master\n+\tcheck_threading expect.thread main\n '\n \n test_expect_success 'thread deep via config' '\n \ttest_config format.thread deep &&\n-\tcheck_threading expect.deep master\n+\tcheck_threading expect.deep main\n '\n \n test_expect_success 'thread config + override' '\n \ttest_config format.thread deep &&\n-\tcheck_threading expect.thread --thread master\n+\tcheck_threading expect.thread --thread main\n '\n \n test_expect_success 'thread config + --no-thread' '\n \ttest_config format.thread deep &&\n-\tcheck_threading expect.no-threading --no-thread master\n+\tcheck_threading expect.no-threading --no-thread main\n '\n \n test_expect_success 'excessive subject' '\n@@ -634,7 +634,7 @@ test_expect_success 'excessive subject' '\n \tafter=$(git rev-parse --short $after) &&\n \tgit update-index file &&\n \tgit commit -m \"This is an excessively long subject line for a message due to the habit some projects have of not having a short, one-line subject at the start of the commit message, but rather sticking a whole paragraph right at the start as the only thing in the commit message. It had better not become the filename for the patch.\" &&\n-\tgit format-patch -o patches/ master..side &&\n+\tgit format-patch -o patches/ main..side &&\n \tls patches/0004-This-is-an-excessively-long-subject-line-for-a-messa.patch\n '\n \n@@ -896,13 +896,13 @@ test_expect_success 'options no longer allowed for format-patch' '\n '\n \n test_expect_success 'format-patch --numstat should produce a patch' '\n-\tgit format-patch --numstat --stdout master..side >output &&\n+\tgit format-patch --numstat --stdout main..side >output &&\n \tgrep \"^diff --git a/\" output >diff &&\n \ttest_line_count = 5 diff\n '\n \n test_expect_success 'format-patch -- <path>' '\n-\tgit format-patch master..side -- file 2>error &&\n+\tgit format-patch main..side -- file 2>error &&\n \t! grep \"Use .--\" error\n '\n \n@@ -1676,9 +1676,9 @@ test_expect_success 'cover letter with invalid --cover-from-description and conf\n \ttest_config branch.rebuild-1.description \"config subject\n \n body\" &&\n-\ttest_must_fail git format-patch --cover-letter --cover-from-description garbage master &&\n+\ttest_must_fail git format-patch --cover-letter --cover-from-description garbage main &&\n \ttest_config format.coverFromDescription garbage &&\n-\ttest_must_fail git format-patch --cover-letter master\n+\ttest_must_fail git format-patch --cover-letter main\n '\n \n test_expect_success 'cover letter with format.coverFromDescription = default' '\n@@ -1687,7 +1687,7 @@ test_expect_success 'cover letter with format.coverFromDescription = default' '\n body\" &&\n \ttest_config format.coverFromDescription default &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^config subject$\" actual &&\n@@ -1699,7 +1699,7 @@ test_expect_success 'cover letter with --cover-from-description default' '\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description default master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description default main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^config subject$\" actual &&\n@@ -1712,7 +1712,7 @@ test_expect_success 'cover letter with format.coverFromDescription = none' '\n body\" &&\n \ttest_config format.coverFromDescription none &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \tgrep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1724,7 +1724,7 @@ test_expect_success 'cover letter with --cover-from-description none' '\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description none master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description none main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \tgrep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1737,7 +1737,7 @@ test_expect_success 'cover letter with format.coverFromDescription = message' '\n body\" &&\n \ttest_config format.coverFromDescription message &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^config subject$\" actual &&\n@@ -1749,7 +1749,7 @@ test_expect_success 'cover letter with --cover-from-description message' '\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description message master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description message main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^config subject$\" actual &&\n@@ -1762,7 +1762,7 @@ test_expect_success 'cover letter with format.coverFromDescription = subject' '\n body\" &&\n \ttest_config format.coverFromDescription subject &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] config subject$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1774,7 +1774,7 @@ test_expect_success 'cover letter with --cover-from-description subject' '\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description subject master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description subject main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] config subject$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1787,7 +1787,7 @@ test_expect_success 'cover letter with format.coverFromDescription = auto (short\n body\" &&\n \ttest_config format.coverFromDescription auto &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] config subject$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1799,7 +1799,7 @@ test_expect_success 'cover letter with --cover-from-description auto (short subj\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description auto master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description auto main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] config subject$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1812,7 +1812,7 @@ test_expect_success 'cover letter with format.coverFromDescription = auto (long\n body\" &&\n \ttest_config format.coverFromDescription auto &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^this is a really long first line and it is over 100 characters long which is the threshold for long subjects$\" actual &&\n@@ -1824,7 +1824,7 @@ test_expect_success 'cover letter with --cover-from-description auto (long subje\n \n body\" &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description auto master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description auto main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] \\*\\*\\* SUBJECT HERE \\*\\*\\*$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \tgrep \"^this is a really long first line and it is over 100 characters long which is the threshold for long subjects$\" actual &&\n@@ -1837,7 +1837,7 @@ test_expect_success 'cover letter with command-line --cover-from-description ove\n body\" &&\n \ttest_config format.coverFromDescription none &&\n \tgit checkout rebuild-1 &&\n-\tgit format-patch --stdout --cover-letter --cover-from-description subject master >actual &&\n+\tgit format-patch --stdout --cover-letter --cover-from-description subject main >actual &&\n \tgrep \"^Subject: \\[PATCH 0/2\\] config subject$\" actual &&\n \t! grep \"^\\*\\*\\* BLURB HERE \\*\\*\\*$\" actual &&\n \t! grep \"^config subject$\" actual &&\n@@ -1847,7 +1847,7 @@ body\" &&\n test_expect_success 'cover letter using branch description (1)' '\n \tgit checkout rebuild-1 &&\n \ttest_config branch.rebuild-1.description hello &&\n-\tgit format-patch --stdout --cover-letter master >actual &&\n+\tgit format-patch --stdout --cover-letter main >actual &&\n \tgrep hello actual\n '\n \n@@ -1861,14 +1861,14 @@ test_expect_success 'cover letter using branch description (2)' '\n test_expect_success 'cover letter using branch description (3)' '\n \tgit checkout rebuild-1 &&\n \ttest_config branch.rebuild-1.description hello &&\n-\tgit format-patch --stdout --cover-letter ^master rebuild-1 >actual &&\n+\tgit format-patch --stdout --cover-letter ^main rebuild-1 >actual &&\n \tgrep hello actual\n '\n \n test_expect_success 'cover letter using branch description (4)' '\n \tgit checkout rebuild-1 &&\n \ttest_config branch.rebuild-1.description hello &&\n-\tgit format-patch --stdout --cover-letter master.. >actual &&\n+\tgit format-patch --stdout --cover-letter main.. >actual &&\n \tgrep hello actual\n '\n \n@@ -1935,8 +1935,8 @@ test_expect_success 'From line has expected format' '\n \n test_expect_success 'format-patch -o with no leading directories' '\n \trm -fr patches &&\n-\tgit format-patch -o patches master..side &&\n-\tcount=$(git rev-list --count master..side) &&\n+\tgit format-patch -o patches main..side &&\n+\tcount=$(git rev-list --count main..side) &&\n \tls patches >list &&\n \ttest_line_count = $count list\n '\n@@ -1944,16 +1944,16 @@ test_expect_success 'format-patch -o with no leading directories' '\n test_expect_success 'format-patch -o with leading existing directories' '\n \trm -rf existing-dir &&\n \tmkdir existing-dir &&\n-\tgit format-patch -o existing-dir/patches master..side &&\n-\tcount=$(git rev-list --count master..side) &&\n+\tgit format-patch -o existing-dir/patches main..side &&\n+\tcount=$(git rev-list --count main..side) &&\n \tls existing-dir/patches >list &&\n \ttest_line_count = $count list\n '\n \n test_expect_success 'format-patch -o with leading non-existing directories' '\n \trm -rf non-existing-dir &&\n-\tgit format-patch -o non-existing-dir/patches master..side &&\n-\tcount=$(git rev-list --count master..side) &&\n+\tgit format-patch -o non-existing-dir/patches main..side &&\n+\tcount=$(git rev-list --count main..side) &&\n \ttest_path_is_dir non-existing-dir &&\n \tls non-existing-dir/patches >list &&\n \ttest_line_count = $count list\n@@ -1962,8 +1962,8 @@ test_expect_success 'format-patch -o with leading non-existing directories' '\n test_expect_success 'format-patch format.outputDirectory option' '\n \ttest_config format.outputDirectory patches &&\n \trm -fr patches &&\n-\tgit format-patch master..side &&\n-\tcount=$(git rev-list --count master..side) &&\n+\tgit format-patch main..side &&\n+\tcount=$(git rev-list --count main..side) &&\n \tls patches >list &&\n \ttest_line_count = $count list\n '\n@@ -1971,7 +1971,7 @@ test_expect_success 'format-patch format.outputDirectory option' '\n test_expect_success 'format-patch -o overrides format.outputDirectory' '\n \ttest_config format.outputDirectory patches &&\n \trm -fr patches patchset &&\n-\tgit format-patch master..side -o patchset &&\n+\tgit format-patch main..side -o patchset &&\n \ttest_path_is_missing patches &&\n \ttest_path_is_dir patchset\n '\n@@ -2068,14 +2068,14 @@ test_expect_success 'format-patch --base errors out when base commit is not ance\n \t#\t  ------------W\n \t#\n \t# If \"format-patch Z..X\" is given, P and Z can not be specified as the base commit\n-\tgit checkout -b topic1 master &&\n+\tgit checkout -b topic1 main &&\n \tgit rev-parse HEAD >commit-id-base &&\n \ttest_commit P &&\n \tgit rev-parse HEAD >commit-id-P &&\n \ttest_commit Z &&\n \tgit rev-parse HEAD >commit-id-Z &&\n \ttest_commit Y &&\n-\tgit checkout -b topic2 master &&\n+\tgit checkout -b topic2 main &&\n \ttest_commit W &&\n \tgit merge topic1 &&\n \ttest_commit X &&\n@@ -2088,7 +2088,7 @@ test_expect_success 'format-patch --base errors out when base commit is not ance\n '\n \n test_expect_success 'format-patch --base=auto' '\n-\tgit checkout -b upstream master &&\n+\tgit checkout -b upstream main &&\n \tgit checkout -b local upstream &&\n \tgit branch --set-upstream-to=upstream &&\n \ttest_commit N1 &&\n@@ -2109,11 +2109,11 @@ test_expect_success 'format-patch errors out when history involves criss-cross'\n \t#  \\ / \\\n \t#   C---M2---E\n \t#\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit A &&\n-\tgit checkout -b xb master &&\n+\tgit checkout -b xb main &&\n \ttest_commit B &&\n-\tgit checkout -b xc master &&\n+\tgit checkout -b xc main &&\n \ttest_commit C &&\n \tgit checkout -b xbc xb -- &&\n \tgit merge xc &&\n@@ -2233,7 +2233,7 @@ test_expect_success 'format-patch --pretty=mboxrd' '\n '\n \n test_expect_success 'interdiff: setup' '\n-\tgit checkout -b boop master &&\n+\tgit checkout -b boop main &&\n \ttest_commit fnorp blorp &&\n \ttest_commit fleep blorp\n '\ndiff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh\nindex 0b379c307b..ed461f481e 100755\n--- a/t/t4017-diff-retval.sh\n+++ b/t/t4017-diff-retval.sh\n@@ -2,7 +2,7 @@\n \n test_description='Return value of diffs'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -114,7 +114,7 @@ test_expect_success 'check detects leftover conflict markers' '\n \tgit checkout HEAD^ &&\n \techo binary >>b &&\n \tgit commit -m \"side\" b &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit add b &&\n \ttest_expect_code 2 git --no-pager diff --cached --check >test.out &&\n \ttest 3 = $(grep \"conflict marker\" test.out | wc -l) &&\ndiff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh\nindex e873abb1da..09ad491a59 100755\n--- a/t/t4038-diff-combined.sh\n+++ b/t/t4038-diff-combined.sh\n@@ -2,7 +2,7 @@\n \n test_description='combined diff'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -118,7 +118,7 @@ test_expect_success 'check --cc --raw with forty trees' '\n '\n \n test_expect_success 'setup combined ignore spaces' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \t>test &&\n \tgit add test &&\n \tgit commit -m initial &&\n@@ -146,7 +146,7 @@ test_expect_success 'setup combined ignore spaces' '\n \tEOF\n \tgit commit -m \"test other space changes\" -a &&\n \n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttr -d Q <<-\\EOF >test &&\n \teol spaces Q\n \tspace  change\n@@ -407,7 +407,7 @@ test_expect_success 'combine diff missing delete bug' '\n test_expect_success 'combine diff gets tree sorting right' '\n \t# create a directory and a file that sort differently in trees\n \t# versus byte-wise (implied \"/\" sorts after \".\")\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tmkdir foo &&\n \techo base >foo/one &&\n \techo base >foo/two &&\n@@ -417,9 +417,9 @@ test_expect_success 'combine diff gets tree sorting right' '\n \n \t# one side modifies a file in the directory, along with the root\n \t# file...\n-\techo master >foo/one &&\n-\techo master >foo.ext &&\n-\tgit commit -a -m master &&\n+\techo main >foo/one &&\n+\techo main >foo.ext &&\n+\tgit commit -a -m main &&\n \n \t# the other side modifies the other file in the directory\n \tgit checkout -b other HEAD^ &&\n@@ -429,7 +429,7 @@ test_expect_success 'combine diff gets tree sorting right' '\n \t# And now we merge. The files in the subdirectory will resolve cleanly,\n \t# meaning that a combined diff will not find them interesting. But it\n \t# will find the tree itself interesting, because it had to be merged.\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge other &&\n \n \tprintf \"MM\\tfoo\\n\" >expect &&\ndiff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh\nindex 8014cd684b..9b326fe935 100755\n--- a/t/t4041-diff-submodule-option.sh\n+++ b/t/t4041-diff-submodule-option.sh\n@@ -9,7 +9,7 @@ test_description='Support for verbose submodule differences in git diff\n This test tries to verify the sanity of the --submodule option of git diff.\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -541,7 +541,7 @@ test_expect_success 'diff --submodule with objects referenced by alternates' '\n \t(cd super &&\n \t\t(cd sub &&\n \t\t\tgit fetch &&\n-\t\t\tgit checkout origin/master\n+\t\t\tgit checkout origin/main\n \t\t) &&\n \t\tgit diff --submodule > ../actual\n \t) &&\ndiff --git a/t/t4048-diff-combined-binary.sh b/t/t4048-diff-combined-binary.sh\nindex e2780e697a..0260cf64f5 100755\n--- a/t/t4048-diff-combined-binary.sh\n+++ b/t/t4048-diff-combined-binary.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='combined and merge diff handle binary files and textconv'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -17,7 +17,7 @@ test_expect_success 'setup binary merge conflict' '\n \techo threeQ3 | q_to_nul >binary &&\n \tgit commit -a -m three &&\n \tthree=$(git rev-parse --short HEAD:binary) &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \techo resolvedQhooray | q_to_nul >binary &&\n \tgit commit -a -m resolved &&\n \tres=$(git rev-parse --short HEAD:binary)\n@@ -65,14 +65,14 @@ test_expect_success 'diff --cc indicates binary-ness' '\n '\n \n test_expect_success 'setup non-binary with binary attribute' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit one text &&\n \ttest_commit two text &&\n \ttwo=$(git rev-parse --short HEAD:text) &&\n \tgit checkout -b branch-text HEAD^ &&\n \ttest_commit three text &&\n \tthree=$(git rev-parse --short HEAD:text) &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest_commit resolved text &&\n \tres=$(git rev-parse --short HEAD:text) &&\n \techo text -diff >.gitattributes\n@@ -209,11 +209,11 @@ index $three,$two..0000000\n  +THREE\n ++=======\n + TWO\n-++>>>>>>> MASTER\n+++>>>>>>> MAIN\n EOF\n test_expect_success 'diff --cc respects textconv on worktree file' '\n \tgit reset --hard HEAD^ &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit diff >actual &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh\nindex a9aef7f986..9eba436211 100755\n--- a/t/t4052-stat-output.sh\n+++ b/t/t4052-stat-output.sh\n@@ -5,7 +5,7 @@\n \n test_description='test --stat output of various commands'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -356,7 +356,7 @@ cat >expect <<'EOF'\n EOF\n test_expect_success 'merge --stat respects COLUMNS (big change)' '\n \tgit checkout -b branch HEAD^^ &&\n-\tCOLUMNS=100 git merge --stat --no-ff master^ >output &&\n+\tCOLUMNS=100 git merge --stat --no-ff main^ >output &&\n \tgrep \" | \" output >actual &&\n \ttest_cmp expect actual\n '\n@@ -365,7 +365,7 @@ cat >expect <<'EOF'\n  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++\n EOF\n test_expect_success 'merge --stat respects COLUMNS (long filename)' '\n-\tCOLUMNS=100 git merge --stat --no-ff master >output &&\n+\tCOLUMNS=100 git merge --stat --no-ff main >output &&\n \tgrep \" | \" output >actual &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t4056-diff-order.sh b/t/t4056-diff-order.sh\nindex 723eee4e8e..63ea7144bb 100755\n--- a/t/t4056-diff-order.sh\n+++ b/t/t4056-diff-order.sh\n@@ -2,7 +2,7 @@\n \n test_description='diff order'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -109,7 +109,7 @@ done\n test_expect_success 'setup for testing combine-diff order' '\n \tgit checkout -b tmp HEAD~ &&\n \tcreate_files 3 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge --no-commit -s ours tmp &&\n \tcreate_files 5\n '\ndiff --git a/t/t4057-diff-combined-paths.sh b/t/t4057-diff-combined-paths.sh\nindex 71af157bf9..7e5b74f72e 100755\n--- a/t/t4057-diff-combined-paths.sh\n+++ b/t/t4057-diff-combined-paths.sh\n@@ -2,7 +2,7 @@\n \n test_description='combined diff show only paths that are different to all parents'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -27,9 +27,9 @@ test_expect_success 'trivial merge - combine-diff empty' '\n \t\techo $i/2 >>$i.txt\n \tdone &&\n \tgit commit -a -m \"side 2-9\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo 1/2 >1.txt &&\n-\tgit commit -a -m \"master 1\" &&\n+\tgit commit -a -m \"main 1\" &&\n \tgit merge side &&\n \t>diffc.expect &&\n \tdiffc_verify\n@@ -44,19 +44,19 @@ test_expect_success 'only one truly conflicting path' '\n \tdone &&\n \techo \"4side\" >>4.txt &&\n \tgit commit -a -m \"side 2-9 +4\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tfor i in $(test_seq 1 9)\n \tdo\n \t\techo $i/3 >>$i.txt\n \tdone &&\n-\techo \"4master\" >>4.txt &&\n-\tgit commit -a -m \"master 1-9 +4\" &&\n+\techo \"4main\" >>4.txt &&\n+\tgit commit -a -m \"main 1-9 +4\" &&\n \ttest_must_fail git merge side &&\n \tcat <<-\\EOF >4.txt &&\n \t4\n \t4/2\n \t4/3\n-\t4master\n+\t4main\n \t4side\n \tEOF\n \tgit add 4.txt &&\n@@ -72,12 +72,12 @@ test_expect_success 'merge introduces new file' '\n \t\techo $i/4 >>$i.txt\n \tdone &&\n \tgit commit -a -m \"side 5-9\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tfor i in $(test_seq 1 3)\n \tdo\n \t\techo $i/4 >>$i.txt\n \tdone &&\n-\tgit commit -a -m \"master 1-3 +4hello\" &&\n+\tgit commit -a -m \"main 1-3 +4hello\" &&\n \tgit merge side &&\n \techo \"Hello World\" >4hello.txt &&\n \tgit add 4hello.txt &&\n@@ -93,12 +93,12 @@ test_expect_success 'merge removed a file' '\n \t\techo $i/5 >>$i.txt\n \tdone &&\n \tgit commit -a -m \"side 5-9\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tfor i in $(test_seq 1 3)\n \tdo\n \t\techo $i/4 >>$i.txt\n \tdone &&\n-\tgit commit -a -m \"master 1-3\" &&\n+\tgit commit -a -m \"main 1-3\" &&\n \tgit merge side &&\n \tgit rm 4.txt &&\n \tgit commit --amend &&\ndiff --git a/t/t4061-diff-indent.sh b/t/t4061-diff-indent.sh\nindex cbe64d5f79..bcf7493740 100755\n--- a/t/t4061-diff-indent.sh\n+++ b/t/t4061-diff-indent.sh\n@@ -3,7 +3,7 @@\n test_description='Test diff indent heuristic.\n \n '\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -269,7 +269,7 @@ test_expect_success 'diff-index: nice spaces with --indent-heuristic' '\n \tgit reset --soft HEAD~ &&\n \tgit diff-index --indent-heuristic -p old -- spaces.txt >out-diff-index-compacted &&\n \tcompare_diff spaces-compacted-expect out-diff-index-compacted &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-index: nice spaces with diff.indentHeuristic=true' '\n@@ -277,7 +277,7 @@ test_expect_success 'diff-index: nice spaces with diff.indentHeuristic=true' '\n \tgit reset --soft HEAD~ &&\n \tgit -c diff.indentHeuristic=true diff-index -p old -- spaces.txt >out-diff-index-compacted2 &&\n \tcompare_diff spaces-compacted-expect out-diff-index-compacted2 &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-index: ugly spaces with --no-indent-heuristic' '\n@@ -285,7 +285,7 @@ test_expect_success 'diff-index: ugly spaces with --no-indent-heuristic' '\n \tgit reset --soft HEAD~ &&\n \tgit diff-index --no-indent-heuristic -p old -- spaces.txt >out-diff-index &&\n \tcompare_diff spaces-expect out-diff-index &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-index: ugly spaces with diff.indentHeuristic=false' '\n@@ -293,7 +293,7 @@ test_expect_success 'diff-index: ugly spaces with diff.indentHeuristic=false' '\n \tgit reset --soft HEAD~ &&\n \tgit -c diff.indentHeuristic=false diff-index -p old -- spaces.txt >out-diff-index2 &&\n \tcompare_diff spaces-expect out-diff-index2 &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-index: --indent-heuristic overrides config' '\n@@ -301,7 +301,7 @@ test_expect_success 'diff-index: --indent-heuristic overrides config' '\n \tgit reset --soft HEAD~ &&\n \tgit -c diff.indentHeuristic=false diff-index --indent-heuristic -p old -- spaces.txt >out-diff-index-compacted3 &&\n \tcompare_diff spaces-compacted-expect out-diff-index-compacted3 &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-index: --no-indent-heuristic overrides config' '\n@@ -309,7 +309,7 @@ test_expect_success 'diff-index: --no-indent-heuristic overrides config' '\n \tgit reset --soft HEAD~ &&\n \tgit -c diff.indentHeuristic=true diff-index --no-indent-heuristic -p old -- spaces.txt >out-diff-index3 &&\n \tcompare_diff spaces-expect out-diff-index3 &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n # --- diff-files tests ----------------------------------------------------\n@@ -320,7 +320,7 @@ test_expect_success 'diff-files: nice spaces with --indent-heuristic' '\n \tgit diff-files --indent-heuristic -p spaces.txt >out-diff-files-raw &&\n \tgrep -v index out-diff-files-raw >out-diff-files-compacted &&\n \tcompare_diff spaces-compacted-expect out-diff-files-compacted &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-files: nice spaces with diff.indentHeuristic=true' '\n@@ -329,7 +329,7 @@ test_expect_success 'diff-files: nice spaces with diff.indentHeuristic=true' '\n \tgit -c diff.indentHeuristic=true diff-files -p spaces.txt >out-diff-files-raw2 &&\n \tgrep -v index out-diff-files-raw2 >out-diff-files-compacted2 &&\n \tcompare_diff spaces-compacted-expect out-diff-files-compacted2 &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-files: ugly spaces with --no-indent-heuristic' '\n@@ -338,7 +338,7 @@ test_expect_success 'diff-files: ugly spaces with --no-indent-heuristic' '\n \tgit diff-files --no-indent-heuristic -p spaces.txt >out-diff-files-raw &&\n \tgrep -v index out-diff-files-raw >out-diff-files &&\n \tcompare_diff spaces-expect out-diff-files &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-files: ugly spaces with diff.indentHeuristic=false' '\n@@ -347,7 +347,7 @@ test_expect_success 'diff-files: ugly spaces with diff.indentHeuristic=false' '\n \tgit -c diff.indentHeuristic=false diff-files -p spaces.txt >out-diff-files-raw2 &&\n \tgrep -v index out-diff-files-raw2 >out-diff-files &&\n \tcompare_diff spaces-expect out-diff-files &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-files: --indent-heuristic overrides config' '\n@@ -356,7 +356,7 @@ test_expect_success 'diff-files: --indent-heuristic overrides config' '\n \tgit -c diff.indentHeuristic=false diff-files --indent-heuristic -p spaces.txt >out-diff-files-raw3 &&\n \tgrep -v index out-diff-files-raw3 >out-diff-files-compacted &&\n \tcompare_diff spaces-compacted-expect out-diff-files-compacted &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_expect_success 'diff-files: --no-indent-heuristic overrides config' '\n@@ -365,7 +365,7 @@ test_expect_success 'diff-files: --no-indent-heuristic overrides config' '\n \tgit -c diff.indentHeuristic=true diff-files --no-indent-heuristic -p spaces.txt >out-diff-files-raw4 &&\n \tgrep -v index out-diff-files-raw4 >out-diff-files &&\n \tcompare_diff spaces-expect out-diff-files &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n '\n \n test_done\ndiff --git a/t/t4066-diff-emit-delay.sh b/t/t4066-diff-emit-delay.sh\nindex 1983f1ebbe..a1de63b77f 100755\n--- a/t/t4066-diff-emit-delay.sh\n+++ b/t/t4066-diff-emit-delay.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='test combined/stat/moved interaction'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -16,7 +16,7 @@ test_expect_success 'set up history with a merge' '\n \ttest_commit B &&\n \tgit checkout -b side HEAD^ &&\n \ttest_commit C &&\n-\tgit merge -m M master &&\n+\tgit merge -m M main &&\n \ttest_commit D\n '\n \ndiff --git a/t/t4068-diff-symmetric-merge-base.sh b/t/t4068-diff-symmetric-merge-base.sh\nindex 55d47352ba..2d650d8f10 100755\n--- a/t/t4068-diff-symmetric-merge-base.sh\n+++ b/t/t4068-diff-symmetric-merge-base.sh\n@@ -2,17 +2,17 @@\n \n test_description='behavior of diff with symmetric-diff setups and --merge-base'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n \n # build these situations:\n #  - normal merge with one merge base (br1...b2r);\n-#  - criss-cross merge ie 2 merge bases (br1...master);\n-#  - disjoint subgraph (orphan branch, br3...master).\n+#  - criss-cross merge ie 2 merge bases (br1...main);\n+#  - disjoint subgraph (orphan branch, br3...main).\n #\n-#     B---E   <-- master\n+#     B---E   <-- main\n #    / \\ /\n #   A   X\n #    \\ / \\\n@@ -35,9 +35,9 @@ test_expect_success setup '\n \tgit add c &&\n \tgit commit -m C &&\n \tgit tag commit-C &&\n-\tgit merge -m D master &&\n+\tgit merge -m D main &&\n \tgit tag commit-D &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge -m E commit-C &&\n \tgit checkout -b br2 commit-C &&\n \techo f >f &&\n@@ -61,7 +61,7 @@ test_expect_success 'diff with one merge base' '\n # It should have one of those two, which comes out\n # to seven lines.\n test_expect_success 'diff with two merge bases' '\n-\tgit diff br1...master >tmp 2>err &&\n+\tgit diff br1...main >tmp 2>err &&\n \ttest_line_count = 7 tmp &&\n \ttest_line_count = 1 err\n '\n@@ -72,22 +72,22 @@ test_expect_success 'diff with no merge bases' '\n '\n \n test_expect_success 'diff with too many symmetric differences' '\n-\ttest_must_fail git diff br1...master br2...br3 2>err &&\n+\ttest_must_fail git diff br1...main br2...br3 2>err &&\n \ttest_i18ngrep \"usage\" err\n '\n \n test_expect_success 'diff with symmetric difference and extraneous arg' '\n-\ttest_must_fail git diff master br1...master 2>err &&\n+\ttest_must_fail git diff main br1...main 2>err &&\n \ttest_i18ngrep \"usage\" err\n '\n \n test_expect_success 'diff with two ranges' '\n-\ttest_must_fail git diff master br1..master br2..br3 2>err &&\n+\ttest_must_fail git diff main br1..main br2..br3 2>err &&\n \ttest_i18ngrep \"usage\" err\n '\n \n test_expect_success 'diff with ranges and extra arg' '\n-\ttest_must_fail git diff master br1..master commit-D 2>err &&\n+\ttest_must_fail git diff main br1..main commit-D 2>err &&\n \ttest_i18ngrep \"usage\" err\n '\n \n@@ -96,21 +96,21 @@ test_expect_success 'diff --merge-base with no commits' '\n '\n \n test_expect_success 'diff --merge-base with three commits' '\n-\ttest_must_fail git diff --merge-base br1 br2 master 2>err &&\n+\ttest_must_fail git diff --merge-base br1 br2 main 2>err &&\n \ttest_i18ngrep \"usage\" err\n '\n \n for cmd in diff-index diff\n do\n \ttest_expect_success \"$cmd --merge-base with one commit\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit $cmd commit-C >expect &&\n \t\tgit $cmd --merge-base br2 >actual &&\n \t\ttest_cmp expect actual\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with one commit and unstaged changes\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_when_finished git reset --hard &&\n \t\techo unstaged >>c &&\n \t\tgit $cmd commit-C >expect &&\n@@ -119,7 +119,7 @@ do\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with one commit and staged and unstaged changes\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_when_finished git reset --hard &&\n \t\techo staged >>c &&\n \t\tgit add c &&\n@@ -130,7 +130,7 @@ do\n \t'\n \n \ttest_expect_success \"$cmd --merge-base --cached with one commit and staged and unstaged changes\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_when_finished git reset --hard &&\n \t\techo staged >>c &&\n \t\tgit add c &&\n@@ -141,19 +141,19 @@ do\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with non-commit\" '\n-\t\tgit checkout master &&\n-\t\ttest_must_fail git $cmd --merge-base master^{tree} 2>err &&\n+\t\tgit checkout main &&\n+\t\ttest_must_fail git $cmd --merge-base main^{tree} 2>err &&\n \t\ttest_i18ngrep \"fatal: --merge-base only works with commits\" err\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with no merge bases and one commit\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_must_fail git $cmd --merge-base br3 2>err &&\n \t\ttest_i18ngrep \"fatal: no merge base found\" err\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with multiple merge bases and one commit\" '\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_must_fail git $cmd --merge-base br1 2>err &&\n \t\ttest_i18ngrep \"fatal: multiple merge bases found\" err\n \t'\n@@ -162,13 +162,13 @@ done\n for cmd in diff-tree diff\n do\n \ttest_expect_success \"$cmd --merge-base with two commits\" '\n-\t\tgit $cmd commit-C master >expect &&\n-\t\tgit $cmd --merge-base br2 master >actual &&\n+\t\tgit $cmd commit-C main >expect &&\n+\t\tgit $cmd --merge-base br2 main >actual &&\n \t\ttest_cmp expect actual\n \t'\n \n \ttest_expect_success \"$cmd --merge-base commit and non-commit\" '\n-\t\ttest_must_fail git $cmd --merge-base br2 master^{tree} 2>err &&\n+\t\ttest_must_fail git $cmd --merge-base br2 main^{tree} 2>err &&\n \t\ttest_i18ngrep \"fatal: --merge-base only works with commits\" err\n \t'\n \n@@ -178,13 +178,13 @@ do\n \t'\n \n \ttest_expect_success \"$cmd --merge-base with multiple merge bases and two commits\" '\n-\t\ttest_must_fail git $cmd --merge-base master br1 2>err &&\n+\t\ttest_must_fail git $cmd --merge-base main br1 2>err &&\n \t\ttest_i18ngrep \"fatal: multiple merge bases found\" err\n \t'\n done\n \n test_expect_success 'diff-tree --merge-base with one commit' '\n-\ttest_must_fail git diff-tree --merge-base master 2>err &&\n+\ttest_must_fail git diff-tree --merge-base main 2>err &&\n \ttest_i18ngrep \"fatal: --merge-base only works with two commits\" err\n '\n \ndiff --git a/t/t4103-apply-binary.sh b/t/t4103-apply-binary.sh\nindex ee4a74b132..fad6d3f542 100755\n--- a/t/t4103-apply-binary.sh\n+++ b/t/t4103-apply-binary.sh\n@@ -6,7 +6,7 @@\n test_description='git apply handling binary patches\n \n '\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -34,64 +34,64 @@ test_expect_success 'setup' '\n \tgit update-index --add --remove file1 file2 file3 file4 &&\n \tgit commit -m \"Second Version\" &&\n \n-\tgit diff-tree -p master binary >B.diff &&\n-\tgit diff-tree -p -C master binary >C.diff &&\n+\tgit diff-tree -p main binary >B.diff &&\n+\tgit diff-tree -p -C main binary >C.diff &&\n \n-\tgit diff-tree -p --binary master binary >BF.diff &&\n-\tgit diff-tree -p --binary -C master binary >CF.diff &&\n+\tgit diff-tree -p --binary main binary >BF.diff &&\n+\tgit diff-tree -p --binary -C main binary >CF.diff &&\n \n-\tgit diff-tree -p --full-index master binary >B-index.diff &&\n-\tgit diff-tree -p -C --full-index master binary >C-index.diff &&\n+\tgit diff-tree -p --full-index main binary >B-index.diff &&\n+\tgit diff-tree -p -C --full-index main binary >C-index.diff &&\n \n-\tgit diff-tree -p --binary --no-prefix master binary -- file3 >B0.diff &&\n+\tgit diff-tree -p --binary --no-prefix main binary -- file3 >B0.diff &&\n \n \tgit init other-repo &&\n \t(\n \t\tcd other-repo &&\n-\t\tgit fetch .. master &&\n+\t\tgit fetch .. main &&\n \t\tgit reset --hard FETCH_HEAD\n \t)\n '\n \n test_expect_success 'stat binary diff -- should not fail.' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t git apply --stat --summary B.diff'\n \n test_expect_success 'stat binary -p0 diff -- should not fail.' '\n-\t git checkout master &&\n+\t git checkout main &&\n \t git apply --stat -p0 B0.diff\n '\n \n test_expect_success 'stat binary diff (copy) -- should not fail.' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t git apply --stat --summary C.diff'\n \n test_expect_success 'check binary diff -- should fail.' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t test_must_fail git apply --check B.diff'\n \n test_expect_success 'check binary diff (copy) -- should fail.' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t test_must_fail git apply --check C.diff'\n \n test_expect_success \\\n \t'check incomplete binary diff with replacement -- should fail.' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git apply --check --allow-binary-replacement B.diff\n '\n \n test_expect_success \\\n     'check incomplete binary diff with replacement (copy) -- should fail.' '\n-\t git checkout master &&\n+\t git checkout main &&\n \t test_must_fail git apply --check --allow-binary-replacement C.diff\n '\n \n test_expect_success 'check binary diff with replacement.' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t git apply --check --allow-binary-replacement BF.diff'\n \n test_expect_success 'check binary diff with replacement (copy).' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t git apply --check --allow-binary-replacement CF.diff'\n \n # Now we start applying them.\n@@ -99,7 +99,7 @@ test_expect_success 'check binary diff with replacement (copy).' \\\n do_reset () {\n \trm -f file? &&\n \tgit reset --hard &&\n-\tgit checkout -f master\n+\tgit checkout -f main\n }\n \n test_expect_success 'apply binary diff -- should fail.' \\\ndiff --git a/t/t4108-apply-threeway.sh b/t/t4108-apply-threeway.sh\nindex 0a091dc5a0..d62db3fbe1 100755\n--- a/t/t4108-apply-threeway.sh\n+++ b/t/t4108-apply-threeway.sh\n@@ -2,7 +2,7 @@\n \n test_description='git apply --3way'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -27,14 +27,14 @@ test_expect_success setup '\n \ttest_tick &&\n \ttest_write_lines 1 two 3 4 5 six 7 >one &&\n \ttest_write_lines 1 two 3 4 5 6 7 >two &&\n-\tgit commit -a -m master &&\n+\tgit commit -a -m main &&\n \n \tgit checkout side &&\n \ttest_write_lines 1 2 3 4 five 6 7 >one &&\n \ttest_write_lines 1 2 3 4 five 6 7 >two &&\n \tgit commit -a -m side &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'apply without --3way' '\n@@ -42,7 +42,7 @@ test_expect_success 'apply without --3way' '\n \n \t# should fail to apply\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git apply --index P.diff &&\n \t# should leave things intact\n \tgit diff-files --exit-code &&\n@@ -55,14 +55,14 @@ test_apply_with_3way () {\n \n \t# The corresponding conflicted merge\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git merge --no-commit side &&\n \tgit ls-files -s >expect.ls &&\n \tprint_sanitized_conflicted_diff >expect.diff &&\n \n \t# should fail to apply\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git apply --index --3way P.diff &&\n \tgit ls-files -s >actual.ls &&\n \tprint_sanitized_conflicted_diff >actual.diff &&\n@@ -89,7 +89,7 @@ test_expect_success 'apply with --3way with rerere enabled' '\n \n \t# The corresponding conflicted merge\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git merge --no-commit side &&\n \n \t# Manually resolve and record the resolution\n@@ -99,7 +99,7 @@ test_expect_success 'apply with --3way with rerere enabled' '\n \n \t# should fail to apply\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git apply --index --3way P.diff &&\n \n \t# but rerere should have replayed the recorded resolution\ndiff --git a/t/t4121-apply-diffs.sh b/t/t4121-apply-diffs.sh\nindex 60deb3bf78..b45454aaf4 100755\n--- a/t/t4121-apply-diffs.sh\n+++ b/t/t4121-apply-diffs.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='git apply for contextually independent diffs'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -26,7 +26,7 @@ test_expect_success 'setup' \\\n \tgit commit -a -q -m 2 &&\n \techo 9 >>file &&\n \tgit commit -a -q -m 3 &&\n-\tgit checkout master'\n+\tgit checkout main'\n \n test_expect_success \\\n \t'check if contextually independent diffs for the same file apply' \\\ndiff --git a/t/t4122-apply-symlink-inside.sh b/t/t4122-apply-symlink-inside.sh\nindex 71deaf779d..aa52de401b 100755\n--- a/t/t4122-apply-symlink-inside.sh\n+++ b/t/t4122-apply-symlink-inside.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='apply to deeper directory without getting fooled with symlink'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -38,11 +38,11 @@ test_expect_success apply '\n \n test_expect_success 'check result' '\n \n-\tgit diff --exit-code master &&\n-\tgit diff --exit-code --cached master &&\n+\tgit diff --exit-code main &&\n+\tgit diff --exit-code --cached main &&\n \ttest_tick &&\n \tgit commit -m replay &&\n-\tT1=$(git rev-parse \"master^{tree}\") &&\n+\tT1=$(git rev-parse \"main^{tree}\") &&\n \tT2=$(git rev-parse \"HEAD^{tree}\") &&\n \ttest \"z$T1\" = \"z$T2\"\n \ndiff --git a/t/t4150-am.sh b/t/t4150-am.sh\nindex e1ffc04852..99987515dc 100755\n--- a/t/t4150-am.sh\n+++ b/t/t4150-am.sh\n@@ -2,7 +2,7 @@\n \n test_description='git am running'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -182,8 +182,8 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m \"added another file\" &&\n \n-\tgit format-patch --stdout master >lorem-move.patch &&\n-\tgit format-patch --no-prefix --stdout master >lorem-zero.patch &&\n+\tgit format-patch --stdout main >lorem-move.patch &&\n+\tgit format-patch --no-prefix --stdout main >lorem-zero.patch &&\n \n \tgit checkout -b rename &&\n \tgit mv file renamed &&\n@@ -456,11 +456,11 @@ test_expect_success 'am changes committer and keeps author' '\n \tgit checkout first &&\n \tgit am patch2 &&\n \ttest_path_is_missing .git/rebase-apply &&\n-\ttest \"$(git rev-parse master^^)\" = \"$(git rev-parse HEAD^^)\" &&\n-\tgit diff --exit-code master..HEAD &&\n-\tgit diff --exit-code master^..HEAD^ &&\n-\tcompare author master HEAD &&\n-\tcompare author master^ HEAD^ &&\n+\ttest \"$(git rev-parse main^^)\" = \"$(git rev-parse HEAD^^)\" &&\n+\tgit diff --exit-code main..HEAD &&\n+\tgit diff --exit-code main^..HEAD^ &&\n+\tcompare author main HEAD &&\n+\tcompare author main^ HEAD^ &&\n \ttest \"$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>\" = \\\n \t     \"$(git log -1 --pretty=format:\"%cn <%ce>\" HEAD)\"\n '\n@@ -762,7 +762,7 @@ test_expect_success 'am takes patches from a Pine mailbox' '\n \tgit checkout first &&\n \tcat pine patch1 | git am &&\n \ttest_path_is_missing .git/rebase-apply &&\n-\tgit diff --exit-code master^..HEAD\n+\tgit diff --exit-code main^..HEAD\n '\n \n test_expect_success 'am fails on mail without patch' '\n@@ -1115,21 +1115,21 @@ test_expect_success 'am and .gitattibutes' '\n \t\ttest_commit sixth &&\n \n \t\tgit checkout test &&\n-\t\tgit format-patch --stdout master..HEAD >patches &&\n-\t\tgit reset --hard master &&\n+\t\tgit format-patch --stdout main..HEAD >patches &&\n+\t\tgit reset --hard main &&\n \t\tgit am patches &&\n \t\tgrep \"smudged\" a.txt &&\n \n \t\tgit checkout removal &&\n \t\tgit reset --hard &&\n-\t\tgit format-patch --stdout master..HEAD >patches &&\n-\t\tgit reset --hard master &&\n+\t\tgit format-patch --stdout main..HEAD >patches &&\n+\t\tgit reset --hard main &&\n \t\tgit am patches &&\n \t\tgrep \"clean\" a.txt &&\n \n \t\tgit checkout conflict &&\n \t\tgit reset --hard &&\n-\t\tgit format-patch --stdout master..HEAD >patches &&\n+\t\tgit format-patch --stdout main..HEAD >patches &&\n \t\tgit reset --hard fourth &&\n \t\ttest_must_fail git am -3 patches &&\n \t\tgrep \"<<<<<<<<<<\" a.txt\ndiff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh\nindex 1f1a809c60..9f8c76dffb 100755\n--- a/t/t4200-rerere.sh\n+++ b/t/t4200-rerere.sh\n@@ -8,7 +8,7 @@ test_description='git rerere\n ! [fifth] version1\n  ! [first] first\n   ! [fourth] version1\n-   ! [master] initial\n+   ! [main] initial\n     ! [second] prefer first over second\n      ! [third] version2\n ------\n@@ -19,10 +19,10 @@ test_description='git rerere\n     -  [second] prefer first over second\n  +  +  [first] first\n     +  [second^] second\n-++++++ [master] initial\n+++++++ [main] initial\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -60,7 +60,7 @@ test_expect_success 'setup' '\n \ttest_tick &&\n \tgit commit -q -a -m first &&\n \n-\tgit checkout -b second master &&\n+\tgit checkout -b second main &&\n \tgit show first:a1 |\n \tsed -e \"s/To die, t/To die! T/\" -e \"s/Some title/Some Title/\" >a1 &&\n \techo \"* END *\" >>a1 &&\n@@ -171,7 +171,7 @@ test_expect_success 'first postimage wins' '\n \n \toldmtimepost=$(test-tool chmtime --get -60 $rr/postimage) &&\n \n-\tgit checkout -b third master &&\n+\tgit checkout -b third main &&\n \tgit show second^:a1 | sed \"s/To die: t/To die! T/\" >a1 &&\n \tgit commit -q -a -m third &&\n \n@@ -583,13 +583,13 @@ test_expect_success 'multiple identical conflicts' '\n test_expect_success 'rerere with unexpected conflict markers does not crash' '\n \tgit reset --hard &&\n \n-\tgit checkout -b branch-1 master &&\n+\tgit checkout -b branch-1 main &&\n \techo \"bar\" >test &&\n \tgit add test &&\n \tgit commit -q -m two &&\n \n \tgit reset --hard &&\n-\tgit checkout -b branch-2 master &&\n+\tgit checkout -b branch-2 main &&\n \techo \"foo\" >test &&\n \tgit add test &&\n \tgit commit -q -a -m one &&\n@@ -604,7 +604,7 @@ test_expect_success 'rerere with unexpected conflict markers does not crash' '\n test_expect_success 'rerere with inner conflict markers' '\n \tgit reset --hard &&\n \n-\tgit checkout -b A master &&\n+\tgit checkout -b A main &&\n \techo \"bar\" >test &&\n \tgit add test &&\n \tgit commit -q -m two &&\n@@ -613,7 +613,7 @@ test_expect_success 'rerere with inner conflict markers' '\n \tgit commit -q -m three &&\n \n \tgit reset --hard &&\n-\tgit checkout -b B master &&\n+\tgit checkout -b B main &&\n \techo \"foo\" >test &&\n \tgit add test &&\n \tgit commit -q -a -m one &&\n@@ -654,11 +654,11 @@ test_expect_success 'setup simple stage 1 handling' '\n \t\tgit add original &&\n \t\tgit commit -m original &&\n \n-\t\tgit checkout -b A master &&\n+\t\tgit checkout -b A main &&\n \t\tgit mv original A &&\n \t\tgit commit -m \"rename to A\" &&\n \n-\t\tgit checkout -b B master &&\n+\t\tgit checkout -b B main &&\n \t\tgit mv original B &&\n \t\tgit commit -m \"rename to B\"\n \t)\ndiff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh\nindex ad6d3eebe5..3095b1b2ff 100755\n--- a/t/t4201-shortlog.sh\n+++ b/t/t4201-shortlog.sh\n@@ -6,7 +6,7 @@\n test_description='git shortlog\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -194,7 +194,7 @@ test_expect_success 'shortlog with revision pseudo options' '\n '\n \n test_expect_success 'shortlog with --output=<file>' '\n-\tgit shortlog --output=shortlog -1 master >output &&\n+\tgit shortlog --output=shortlog -1 main >output &&\n \ttest_must_be_empty output &&\n \ttest_line_count = 3 shortlog\n '\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex 6c7a3cfc2c..350cfa3593 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -2,7 +2,7 @@\n \n test_description='git log'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -481,7 +481,7 @@ test_expect_success 'set up merge history' '\n \tgit checkout -b side HEAD~4 &&\n \ttest_commit side-1 1 1 &&\n \ttest_commit side-2 2 2 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge side\n '\n \n@@ -544,17 +544,17 @@ test_expect_success 'log --graph with merge with log.graphColors' '\n '\n \n test_expect_success 'log --raw --graph -m with merge' '\n-\tgit log --raw --graph --oneline -m master | head -n 500 >actual &&\n+\tgit log --raw --graph --oneline -m main | head -n 500 >actual &&\n \tgrep \"initial\" actual\n '\n \n test_expect_success 'diff-tree --graph' '\n-\tgit diff-tree --graph master^ | head -n 500 >actual &&\n+\tgit diff-tree --graph main^ | head -n 500 >actual &&\n \tgrep \"one\" actual\n '\n \n cat > expect <<\\EOF\n-*   commit master\n+*   commit main\n |\\  Merge: A B\n | | Author: A U Thor <author@example.com>\n | |\n@@ -570,22 +570,22 @@ cat > expect <<\\EOF\n | |\n | |     side-1\n | |\n-* | commit master~1\n+* | commit main~1\n | | Author: A U Thor <author@example.com>\n | |\n | |     Second\n | |\n-* | commit master~2\n+* | commit main~2\n | | Author: A U Thor <author@example.com>\n | |\n | |     sixth\n | |\n-* | commit master~3\n+* | commit main~3\n | | Author: A U Thor <author@example.com>\n | |\n | |     fifth\n | |\n-* | commit master~4\n+* | commit main~4\n |/  Author: A U Thor <author@example.com>\n |\n |       fourth\n@@ -616,19 +616,19 @@ test_expect_success 'log --graph with full output' '\n test_expect_success 'set up more tangled history' '\n \tgit checkout -b tangle HEAD~6 &&\n \ttest_commit tangle-a tangle-a a &&\n-\tgit merge master~3 &&\n+\tgit merge main~3 &&\n \tgit merge side~1 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge tangle &&\n \tgit checkout -b reach &&\n \ttest_commit reach &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -b octopus-a &&\n \ttest_commit octopus-a &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout -b octopus-b &&\n \ttest_commit octopus-b &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit seventh &&\n \tgit merge octopus-a octopus-b &&\n \tgit merge reach\n@@ -653,7 +653,7 @@ cat > expect <<\\EOF\n |\\\n | *   Merge branch 'side' (early part) into tangle\n | |\\\n-| * \\   Merge branch 'master' (early part) into tangle\n+| * \\   Merge branch 'main' (early part) into tangle\n | |\\ \\\n | * | | tangle-a\n * | | |   Merge branch 'side'\n@@ -797,7 +797,7 @@ test_expect_success 'multiple decorate-refs' '\n \n test_expect_success 'decorate-refs-exclude with glob' '\n \tcat >expect.decorate <<-\\EOF &&\n-\tMerge-tag-reach (HEAD -> master)\n+\tMerge-tag-reach (HEAD -> main)\n \tMerge-tags-octopus-a-and-octopus-b\n \tseventh (tag: seventh)\n \toctopus-b (tag: octopus-b)\n@@ -814,7 +814,7 @@ test_expect_success 'decorate-refs-exclude with glob' '\n \n test_expect_success 'decorate-refs-exclude without globs' '\n \tcat >expect.decorate <<-\\EOF &&\n-\tMerge-tag-reach (HEAD -> master)\n+\tMerge-tag-reach (HEAD -> main)\n \tMerge-tags-octopus-a-and-octopus-b\n \tseventh (tag: seventh)\n \toctopus-b (tag: octopus-b, octopus-b)\n@@ -831,7 +831,7 @@ test_expect_success 'decorate-refs-exclude without globs' '\n \n test_expect_success 'multiple decorate-refs-exclude' '\n \tcat >expect.decorate <<-\\EOF &&\n-\tMerge-tag-reach (HEAD -> master)\n+\tMerge-tag-reach (HEAD -> main)\n \tMerge-tags-octopus-a-and-octopus-b\n \tseventh (tag: seventh)\n \toctopus-b (tag: octopus-b)\n@@ -854,7 +854,7 @@ test_expect_success 'multiple decorate-refs-exclude' '\n \n test_expect_success 'decorate-refs and decorate-refs-exclude' '\n \tcat >expect.no-decorate <<-\\EOF &&\n-\tMerge-tag-reach (master)\n+\tMerge-tag-reach (main)\n \tMerge-tags-octopus-a-and-octopus-b\n \tseventh\n \toctopus-b\n@@ -869,7 +869,7 @@ test_expect_success 'decorate-refs and decorate-refs-exclude' '\n \n test_expect_success 'deocrate-refs and log.excludeDecoration' '\n \tcat >expect.decorate <<-\\EOF &&\n-\tMerge-tag-reach (master)\n+\tMerge-tag-reach (main)\n \tMerge-tags-octopus-a-and-octopus-b\n \tseventh\n \toctopus-b (octopus-b)\n@@ -884,7 +884,7 @@ test_expect_success 'deocrate-refs and log.excludeDecoration' '\n \n test_expect_success 'decorate-refs-exclude and simplify-by-decoration' '\n \tcat >expect.decorate <<-\\EOF &&\n-\tMerge-tag-reach (HEAD -> master)\n+\tMerge-tag-reach (HEAD -> main)\n \treach (tag: reach, reach)\n \tseventh (tag: seventh)\n \tMerge-branch-tangle\n@@ -1083,7 +1083,7 @@ cat >expect <<\\EOF\n | |\\ \\  Merge: MERGE_PARENTS\n | | | | Author: A U Thor <author@example.com>\n | | | |\n-| | | |     Merge branch 'master' (early part) into tangle\n+| | | |     Merge branch 'main' (early part) into tangle\n | | | |\n | * | | commit COMMIT_OBJECT_NAME\n | | | | Author: A U Thor <author@example.com>\n@@ -1358,7 +1358,7 @@ cat >expect <<\\EOF\n *** | |\\ \\  Merge: MERGE_PARENTS\n *** | | | | Author: A U Thor <author@example.com>\n *** | | | |\n-*** | | | |     Merge branch 'master' (early part) into tangle\n+*** | | | |     Merge branch 'main' (early part) into tangle\n *** | | | |\n *** | * | | commit COMMIT_OBJECT_NAME\n *** | | | | Author: A U Thor <author@example.com>\n@@ -1591,24 +1591,24 @@ test_expect_success 'dotdot is a parent directory' '\n '\n \n test_expect_success GPG 'setup signed branch' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b signed master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b signed main &&\n \techo foo >foo &&\n \tgit add foo &&\n \tgit commit -S -m signed_commit\n '\n \n test_expect_success GPG 'setup signed branch with subkey' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b signed-subkey master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b signed-subkey main &&\n \techo foo >foo &&\n \tgit add foo &&\n \tgit commit -SB7227189 -m signed_commit\n '\n \n test_expect_success GPGSM 'setup signed branch x509' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b signed-x509 master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b signed-x509 main &&\n \techo foo >foo &&\n \tgit add foo &&\n \ttest_config gpg.format x509 &&\n@@ -1641,12 +1641,12 @@ test_expect_success GPGSM 'log --graph --show-signature x509' '\n '\n \n test_expect_success GPG 'log --graph --show-signature for merged tag' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b plain master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b plain main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged master &&\n+\tgit checkout -b tagged main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1660,12 +1660,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag' '\n '\n \n test_expect_success GPG 'log --graph --show-signature for merged tag in shallow clone' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b plain-shallow master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b plain-shallow main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout --detach master &&\n+\tgit checkout --detach main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1680,12 +1680,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag in shallow\n '\n \n test_expect_success GPG 'log --graph --show-signature for merged tag with missing key' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b plain-nokey master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b plain-nokey main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-nokey master &&\n+\tgit checkout -b tagged-nokey main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1699,12 +1699,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag with missin\n '\n \n test_expect_success GPG 'log --graph --show-signature for merged tag with bad signature' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b plain-bad master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b plain-bad main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-bad master &&\n+\tgit checkout -b tagged-bad main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1721,12 +1721,12 @@ test_expect_success GPG 'log --graph --show-signature for merged tag with bad si\n '\n \n test_expect_success GPG 'log --show-signature for merged tag with GPG failure' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n-\tgit checkout -b plain-fail master &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n+\tgit checkout -b plain-fail main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-fail master &&\n+\tgit checkout -b tagged-fail main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1740,14 +1740,14 @@ test_expect_success GPG 'log --show-signature for merged tag with GPG failure' '\n '\n \n test_expect_success GPGSM 'log --graph --show-signature for merged tag x509' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \ttest_config gpg.format x509 &&\n \ttest_config user.signingkey $GIT_COMMITTER_EMAIL &&\n-\tgit checkout -b plain-x509 master &&\n+\tgit checkout -b plain-x509 main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-x509 master &&\n+\tgit checkout -b tagged-x509 main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1761,14 +1761,14 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509' '\n '\n \n test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 missing key' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \ttest_config gpg.format x509 &&\n \ttest_config user.signingkey $GIT_COMMITTER_EMAIL &&\n-\tgit checkout -b plain-x509-nokey master &&\n+\tgit checkout -b plain-x509-nokey main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-x509-nokey master &&\n+\tgit checkout -b tagged-x509-nokey main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1781,14 +1781,14 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 miss\n '\n \n test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 bad signature' '\n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \ttest_config gpg.format x509 &&\n \ttest_config user.signingkey $GIT_COMMITTER_EMAIL &&\n-\tgit checkout -b plain-x509-bad master &&\n+\tgit checkout -b plain-x509-bad main &&\n \techo aaa >bar &&\n \tgit add bar &&\n \tgit commit -m bar_commit &&\n-\tgit checkout -b tagged-x509-bad master &&\n+\tgit checkout -b tagged-x509-bad main &&\n \techo bbb >baz &&\n \tgit add baz &&\n \tgit commit -m baz_commit &&\n@@ -1838,7 +1838,7 @@ test_expect_success 'log diagnoses bogus HEAD' '\n \tgit init empty &&\n \ttest_must_fail git -C empty log 2>stderr &&\n \ttest_i18ngrep does.not.have.any.commits stderr &&\n-\techo 1234abcd >empty/.git/refs/heads/master &&\n+\techo 1234abcd >empty/.git/refs/heads/main &&\n \ttest_must_fail git -C empty log 2>stderr &&\n \ttest_i18ngrep broken stderr &&\n \techo \"ref: refs/heads/invalid.lock\" >empty/.git/HEAD &&\ndiff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh\nindex 8a2f8984f6..3f82c651b4 100755\n--- a/t/t4203-mailmap.sh\n+++ b/t/t4203-mailmap.sh\n@@ -2,7 +2,7 @@\n \n test_description='.mailmap configurations'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -197,7 +197,7 @@ test_expect_success 'No mailmap files, but configured' '\n \n test_expect_success 'setup mailmap blob tests' '\n \tgit checkout -b map &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tcat >just-bugs <<- EOF &&\n \tBlob Guy <bugs@company.xx>\n \tEOF\ndiff --git a/t/t4204-patch-id.sh b/t/t4204-patch-id.sh\nindex 46ecb777f4..f120857c20 100755\n--- a/t/t4204-patch-id.sh\n+++ b/t/t4204-patch-id.sh\n@@ -2,7 +2,7 @@\n \n test_description='git patch-id'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -16,9 +16,9 @@ test_expect_success 'setup' '\n \ttest_write_lines $as b >foo &&\n \ttest_write_lines $as b >bar &&\n \tgit commit -a -m first &&\n-\tgit checkout -b same master &&\n+\tgit checkout -b same main &&\n \tgit commit --amend -m same-msg &&\n-\tgit checkout -b notsame master &&\n+\tgit checkout -b notsame main &&\n \techo c >foo &&\n \techo c >bar &&\n \tgit commit --amend -a -m notsame-msg &&\n@@ -49,31 +49,31 @@ get_patch_id () {\n }\n \n test_expect_success 'patch-id detects equality' '\n-\tget_patch_id master &&\n+\tget_patch_id main &&\n \tget_patch_id same &&\n-\ttest_cmp patch-id_master patch-id_same\n+\ttest_cmp patch-id_main patch-id_same\n '\n \n test_expect_success 'patch-id detects inequality' '\n-\tget_patch_id master &&\n+\tget_patch_id main &&\n \tget_patch_id notsame &&\n-\t! test_cmp patch-id_master patch-id_notsame\n+\t! test_cmp patch-id_main patch-id_notsame\n '\n \n test_expect_success 'patch-id supports git-format-patch output' '\n-\tget_patch_id master &&\n+\tget_patch_id main &&\n \tgit checkout same &&\n \tgit format-patch -1 --stdout | calc_patch_id same &&\n-\ttest_cmp patch-id_master patch-id_same &&\n+\ttest_cmp patch-id_main patch-id_same &&\n \tset $(git format-patch -1 --stdout | git patch-id) &&\n \ttest \"$2\" = $(git rev-parse HEAD)\n '\n \n test_expect_success 'whitespace is irrelevant in footer' '\n-\tget_patch_id master &&\n+\tget_patch_id main &&\n \tgit checkout same &&\n \tgit format-patch -1 --stdout | sed \"s/ \\$//\" | calc_patch_id same &&\n-\ttest_cmp patch-id_master patch-id_same\n+\ttest_cmp patch-id_main patch-id_same\n '\n \n cmp_patch_id () {\n@@ -91,7 +91,7 @@ test_patch_id_file_order () {\n \tshift\n \tname=\"order-${1}-$relevant\"\n \tshift\n-\tget_top_diff \"master\" | calc_patch_id \"$name\" \"$@\" &&\n+\tget_top_diff \"main\" | calc_patch_id \"$name\" \"$@\" &&\n \tgit checkout same &&\n \tgit format-patch -1 --stdout -O foo-then-bar |\n \t\tcalc_patch_id \"ordered-$name\" \"$@\" &&\n@@ -140,10 +140,10 @@ test_expect_success '--stable overrides patchid.stable = false' '\n '\n \n test_expect_success 'patch-id supports git-format-patch MIME output' '\n-\tget_patch_id master &&\n+\tget_patch_id main &&\n \tgit checkout same &&\n \tgit format-patch -1 --attach --stdout | calc_patch_id same &&\n-\ttest_cmp patch-id_master patch-id_same\n+\ttest_cmp patch-id_main patch-id_same\n '\n \n test_expect_success 'patch-id respects config from subdir' '\ndiff --git a/t/t4207-log-decoration-colors.sh b/t/t4207-log-decoration-colors.sh\nindex 6c868df38d..b870942498 100755\n--- a/t/t4207-log-decoration-colors.sh\n+++ b/t/t4207-log-decoration-colors.sh\n@@ -5,7 +5,7 @@\n \n test_description='Test for \"git log --decorate\" colors'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -43,13 +43,13 @@ test_expect_success setup '\n \n cat >expected <<EOF\n ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD ->\\\n- ${c_reset}${c_branch}master${c_reset}${c_commit},\\\n+ ${c_reset}${c_branch}main${c_reset}${c_commit},\\\n  ${c_reset}${c_tag}tag: v1.0${c_reset}${c_commit},\\\n  ${c_reset}${c_tag}tag: B${c_reset}${c_commit})${c_reset} B\n ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A1${c_reset}${c_commit},\\\n- ${c_reset}${c_remoteBranch}other/master${c_reset}${c_commit})${c_reset} A1\n+ ${c_reset}${c_remoteBranch}other/main${c_reset}${c_commit})${c_reset} A1\n ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_stash}refs/stash${c_reset}${c_commit})${c_reset}\\\n- On master: Changes to A.t\n+ On main: Changes to A.t\n ${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A${c_reset}${c_commit})${c_reset} A\n EOF\n \ndiff --git a/t/t4208-log-magic-pathspec.sh b/t/t4208-log-magic-pathspec.sh\nindex 1938d4a58f..5e10136e9a 100755\n--- a/t/t4208-log-magic-pathspec.sh\n+++ b/t/t4208-log-magic-pathspec.sh\n@@ -2,7 +2,7 @@\n \n test_description='magic pathspec tests using git-log'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -29,7 +29,7 @@ test_expect_success '\"git log :/a -- \" should not be ambiguous' '\n '\n \n test_expect_success '\"git log :/detached -- \" should find a commit only in HEAD' '\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit checkout --detach &&\n \t# Must manually call `test_tick` instead of using `test_commit`,\n \t# because the latter additionally creates a tag, which would make\n@@ -122,7 +122,7 @@ test_expect_success 'command line pathspec parsing for \"git log\"' '\n \tgit checkout HEAD^ &&\n \techo 2 >a &&\n \tgit commit -a -m \"update a to 2\" &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit add a &&\n \tgit log --merge -- a\n '\ndiff --git a/t/t4211-line-log.sh b/t/t4211-line-log.sh\nindex 59c258429d..560127cc07 100755\n--- a/t/t4211-line-log.sh\n+++ b/t/t4211-line-log.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='test log -L'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\ndiff --git a/t/t4211/history.export b/t/t4211/history.export\nindex f9f41e211e..006972a1f2 100644\n--- a/t/t4211/history.export\n+++ b/t/t4211/history.export\n@@ -316,7 +316,7 @@ long f(long x)\n \treturn s;\n }\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :19\n author Thomas Rast <trast@student.ethz.ch> 1362045024 +0100\n committer Thomas Rast <trast@student.ethz.ch> 1362045024 +0100\ndiff --git a/t/t4214-log-graph-octopus.sh b/t/t4214-log-graph-octopus.sh\nindex 981b83513a..f70c46bbbf 100755\n--- a/t/t4214-log-graph-octopus.sh\n+++ b/t/t4214-log-graph-octopus.sh\n@@ -2,7 +2,7 @@\n \n test_description='git log --graph of skewed left octopus merge.'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -20,7 +20,7 @@ test_cmp_colored_graph () {\n test_expect_success 'set up merge history' '\n \ttest_commit initial &&\n \tfor i in 1 2 3 4 ; do\n-\t\tgit checkout master -b $i || return $?\n+\t\tgit checkout main -b $i || return $?\n \t\t# Make tag name different from branch name, to avoid\n \t\t# ambiguity error when calling checkout.\n \t\ttest_commit $i $i $i tag$i || return $?\ndiff --git a/t/t4216-log-bloom.sh b/t/t4216-log-bloom.sh\nindex b3f3820dbb..0f16c4b9d5 100755\n--- a/t/t4216-log-bloom.sh\n+++ b/t/t4216-log-bloom.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='git log for a path with Bloom filters'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -24,7 +24,7 @@ test_expect_success 'setup test - repo, commits, commit graph, log outputs' '\n \ttest_commit c10 file_to_be_deleted &&\n \tgit checkout -b side HEAD~4 &&\n \ttest_commit side-1 file4 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge side &&\n \ttest_commit c11 file5 &&\n \tmv file5 file5_renamed &&\n@@ -97,7 +97,7 @@ do\n \t\t      \"--topo-order\" \\\n \t\t      \"--date-order\" \\\n \t\t      \"--author-date-order\" \\\n-\t\t      \"--ancestry-path side..master\"\n+\t\t      \"--ancestry-path side..main\"\n \tdo\n \t\ttest_expect_success \"git log option: $option for path: $path\" '\n \t\t\ttest_bloom_filters_used \"$option -- $path\" &&\ndiff --git a/t/t4253-am-keep-cr-dos.sh b/t/t4253-am-keep-cr-dos.sh\nindex ec7ba62d67..0ee69d2a0c 100755\n--- a/t/t4253-am-keep-cr-dos.sh\n+++ b/t/t4253-am-keep-cr-dos.sh\n@@ -6,7 +6,7 @@\n test_description='git-am mbox with dos line ending.\n \n '\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -46,7 +46,7 @@ test_expect_success 'setup repository with dos files' '\n \n test_expect_success 'am with dos files without --keep-cr' '\n \tgit checkout -b dosfiles initial &&\n-\tgit format-patch -k initial..master &&\n+\tgit format-patch -k initial..main &&\n \ttest_must_fail git am -k -3 000*.patch &&\n \tgit am --abort &&\n \trm -rf .git/rebase-apply 000*.patch\n@@ -54,23 +54,23 @@ test_expect_success 'am with dos files without --keep-cr' '\n \n test_expect_success 'am with dos files with --keep-cr' '\n \tgit checkout -b dosfiles-keep-cr initial &&\n-\tgit format-patch -k --stdout initial..master >output &&\n+\tgit format-patch -k --stdout initial..main >output &&\n \tgit am --keep-cr -k -3 output &&\n-\tgit diff --exit-code master\n+\tgit diff --exit-code main\n '\n \n test_expect_success 'am with dos files config am.keepcr' '\n \tgit config am.keepcr 1 &&\n \tgit checkout -b dosfiles-conf-keepcr initial &&\n-\tgit format-patch -k --stdout initial..master >output &&\n+\tgit format-patch -k --stdout initial..main >output &&\n \tgit am -k -3 output &&\n-\tgit diff --exit-code master\n+\tgit diff --exit-code main\n '\n \n test_expect_success 'am with dos files config am.keepcr overridden by --no-keep-cr' '\n \tgit config am.keepcr 1 &&\n \tgit checkout -b dosfiles-conf-keepcr-override initial &&\n-\tgit format-patch -k initial..master &&\n+\tgit format-patch -k initial..main &&\n \ttest_must_fail git am -k -3 --no-keep-cr 000*.patch &&\n \tgit am --abort &&\n \trm -rf .git/rebase-apply 000*.patch\n@@ -78,14 +78,14 @@ test_expect_success 'am with dos files config am.keepcr overridden by --no-keep-\n \n test_expect_success 'am with dos files with --keep-cr continue' '\n \tgit checkout -b dosfiles-keep-cr-continue initial &&\n-\tgit format-patch -k initial..master &&\n+\tgit format-patch -k initial..main &&\n \tappend_cr <file1a >file &&\n \tgit commit -m \"different patch\" file &&\n \ttest_must_fail git am --keep-cr -k -3 000*.patch &&\n \tappend_cr <file2 >file &&\n \tgit add file &&\n \tgit am -3 --resolved &&\n-\tgit diff --exit-code master\n+\tgit diff --exit-code main\n '\n \n test_expect_success 'am with unix files config am.keepcr overridden by --no-keep-cr' '\n@@ -93,9 +93,9 @@ test_expect_success 'am with unix files config am.keepcr overridden by --no-keep\n \tgit checkout -b unixfiles-conf-keepcr-override initial &&\n \tcp -f file1 file &&\n \tgit commit -m \"line ending to unix\" file &&\n-\tgit format-patch -k initial..master &&\n+\tgit format-patch -k initial..main &&\n \tgit am -k -3 --no-keep-cr 000*.patch &&\n-\tgit diff --exit-code -w master\n+\tgit diff --exit-code -w main\n '\n \n test_done\ndiff --git a/t/t4257-am-interactive.sh b/t/t4257-am-interactive.sh\nindex 5344bd248a..aed8f4de3d 100755\n--- a/t/t4257-am-interactive.sh\n+++ b/t/t4257-am-interactive.sh\n@@ -10,7 +10,7 @@ test_expect_success 'set up patches to apply' '\n \tgit format-patch --stdout -2 >mbox &&\n \n \tgit reset --hard unrelated &&\n-\ttest_commit conflict-master file master base\n+\ttest_commit conflict-main file main base\n '\n \n # Sanity check our setup.\n-- \ngitgitgadget\n\n"},{"id":"410311","messageId":"fb8584d993fe07b48ab8225b681d15a47872cfc1.1605743088.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 26/28] tests(git-p4): transition to the default branch name `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:44Z","receivedAt":"2020-11-18T23:45:22Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn the previous commits, we adjusted the test suite to use the branch\nname `main` for initial branches.\n\nThe `git p4`-related tests are a bit harder to adjust because `git p4`\nuses the ref `refs/heads/p4/master` to track the remote branches, and\nfor now, we do not want to change that (this might be the subject of a\nfuture patch series). We only need to adjust for the actual initial\nbranch name to be changed to `main`.\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9800-git-p4-basic.sh        |  4 ++--\n t/t9801-git-p4-branch.sh       | 18 +++++++++---------\n t/t9806-git-p4-options.sh      | 20 ++++++++++----------\n t/t9807-git-p4-submit.sh       |  4 ++--\n t/t9811-git-p4-label-import.sh |  4 ++--\n 5 files changed, 25 insertions(+), 25 deletions(-)\n\ndiff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh\nindex c920b84778..81bc8e8da1 100755\n--- a/t/t9800-git-p4-basic.sh\n+++ b/t/t9800-git-p4-basic.sh\n@@ -2,7 +2,7 @@\n \n test_description='git p4 tests'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-git-p4.sh\n@@ -229,7 +229,7 @@ test_expect_success 'clone --bare should make a bare repository' '\n \t\tgit config --get --bool core.bare true &&\n \t\tgit rev-parse --verify refs/remotes/p4/master &&\n \t\tgit rev-parse --verify refs/remotes/p4/HEAD &&\n-\t\tgit rev-parse --verify refs/heads/master &&\n+\t\tgit rev-parse --verify refs/heads/main &&\n \t\tgit rev-parse --verify HEAD\n \t)\n '\ndiff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh\nindex ebfe9d8195..56e64697a8 100755\n--- a/t/t9801-git-p4-branch.sh\n+++ b/t/t9801-git-p4-branch.sh\n@@ -2,7 +2,7 @@\n \n test_description='git p4 tests for p4 branches'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-git-p4.sh\n@@ -70,7 +70,7 @@ test_expect_success 'import main, no branch detection' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 4 wc\n \t)\n '\n@@ -81,7 +81,7 @@ test_expect_success 'import branch1, no branch detection' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 2 wc\n \t)\n '\n@@ -92,7 +92,7 @@ test_expect_success 'import branch2, no branch detection' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 2 wc\n \t)\n '\n@@ -103,7 +103,7 @@ test_expect_success 'import depot, no branch detection' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline --graph --decorate --all &&\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 8 wc\n \t)\n '\n@@ -117,7 +117,7 @@ test_expect_success 'import depot, branch detection' '\n \t\tgit log --oneline --graph --decorate --all &&\n \n \t\t# 4 main commits\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 4 wc &&\n \n \t\t# 3 main, 1 integrate, 1 on branch2\n@@ -140,7 +140,7 @@ test_expect_success 'import depot, branch detection, branchList branch definitio\n \t\tgit log --oneline --graph --decorate --all &&\n \n \t\t# 4 main commits\n-\t\tgit rev-list master -- >wc &&\n+\t\tgit rev-list main -- >wc &&\n \t\ttest_line_count = 4 wc &&\n \n \t\t# 3 main, 1 integrate, 1 on branch2\n@@ -487,7 +487,7 @@ test_expect_success 'use-client-spec detect-branches files in top-level' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit p4 sync --detect-branches --use-client-spec //depot/usecs@all &&\n-\t\tgit checkout -b master p4/usecs/b1 &&\n+\t\tgit checkout -b main p4/usecs/b1 &&\n \t\ttest_path_is_file b1-file1 &&\n \t\ttest_path_is_missing b2-file2 &&\n \t\ttest_path_is_missing b1 &&\n@@ -540,7 +540,7 @@ test_expect_success 'use-client-spec detect-branches skips files in branches' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit p4 sync --detect-branches --use-client-spec //depot/usecs@all &&\n-\t\tgit checkout -b master p4/usecs/b3 &&\n+\t\tgit checkout -b main p4/usecs/b3 &&\n \t\ttest_path_is_file b1-file1 &&\n \t\ttest_path_is_file b3-file3_2 &&\n \t\ttest_path_is_missing b3-file3_1\ndiff --git a/t/t9806-git-p4-options.sh b/t/t9806-git-p4-options.sh\nindex c7629b6c7d..c26d297433 100755\n--- a/t/t9806-git-p4-options.sh\n+++ b/t/t9806-git-p4-options.sh\n@@ -2,7 +2,7 @@\n \n test_description='git p4 options'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-git-p4.sh\n@@ -30,14 +30,14 @@ test_expect_success 'clone no --git-dir' '\n \ttest_must_fail git p4 clone --git-dir=xx //depot\n '\n \n-test_expect_success 'clone --branch should checkout master' '\n+test_expect_success 'clone --branch should checkout main' '\n \tgit p4 clone --branch=refs/remotes/p4/sb --dest=\"$git\" //depot &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n \t\tgit rev-parse refs/remotes/p4/sb >sb &&\n-\t\tgit rev-parse refs/heads/master >master &&\n-\t\ttest_cmp sb master &&\n+\t\tgit rev-parse refs/heads/main >main &&\n+\t\ttest_cmp sb main &&\n \t\tgit rev-parse HEAD >head &&\n \t\ttest_cmp sb head\n \t)\n@@ -150,22 +150,22 @@ test_expect_success 'clone --changesfile, @all' '\n \ttest_must_fail git p4 clone --changesfile=\"$TRASH_DIRECTORY/cf\" --dest=\"$git\" //depot@all\n '\n \n-# imports both master and p4/master in refs/heads\n+# imports both main and p4/master in refs/heads\n # requires --import-local on sync to find p4 refs/heads\n-# does not update master on sync, just p4/master\n+# does not update main on sync, just p4/master\n test_expect_success 'clone/sync --import-local' '\n \tgit p4 clone --import-local --dest=\"$git\" //depot@1,2 &&\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n-\t\tgit log --oneline refs/heads/master >lines &&\n+\t\tgit log --oneline refs/heads/main >lines &&\n \t\ttest_line_count = 2 lines &&\n \t\tgit log --oneline refs/heads/p4/master >lines &&\n \t\ttest_line_count = 2 lines &&\n \t\ttest_must_fail git p4 sync &&\n \n \t\tgit p4 sync --import-local &&\n-\t\tgit log --oneline refs/heads/master >lines &&\n+\t\tgit log --oneline refs/heads/main >lines &&\n \t\ttest_line_count = 2 lines &&\n \t\tgit log --oneline refs/heads/p4/master >lines &&\n \t\ttest_line_count = 3 lines\n@@ -177,7 +177,7 @@ test_expect_success 'clone --max-changes' '\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tcd \"$git\" &&\n-\t\tgit log --oneline refs/heads/master >lines &&\n+\t\tgit log --oneline refs/heads/main >lines &&\n \t\ttest_line_count = 2 lines\n \t)\n '\n@@ -240,7 +240,7 @@ test_expect_success 'clone --use-client-spec' '\n \t\t\tgit init &&\n \t\t\tgit config git-p4.useClientSpec true &&\n \t\t\tgit p4 sync //depot/... &&\n-\t\t\tgit checkout -b master p4/master &&\n+\t\t\tgit checkout -b main p4/master &&\n \t\t\ttest_path_is_file bus/dir/f4 &&\n \t\t\ttest_path_is_missing file1\n \t\t)\ndiff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh\nindex f12e6f7206..7d4109f29d 100755\n--- a/t/t9807-git-p4-submit.sh\n+++ b/t/t9807-git-p4-submit.sh\n@@ -2,7 +2,7 @@\n \n test_description='git p4 submit'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-git-p4.sh\n@@ -117,7 +117,7 @@ test_expect_success 'submit with allowSubmit' '\n \t\tgit config git-p4.skipSubmitEdit true &&\n \t\tgit config git-p4.allowSubmit \"nobranch\" &&\n \t\ttest_must_fail git p4 submit &&\n-\t\tgit config git-p4.allowSubmit \"nobranch,master\" &&\n+\t\tgit config git-p4.allowSubmit \"nobranch,main\" &&\n \t\tgit p4 submit\n \t)\n '\ndiff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh\nindex c53952ac14..5ac5383fb7 100755\n--- a/t/t9811-git-p4-label-import.sh\n+++ b/t/t9811-git-p4-label-import.sh\n@@ -2,7 +2,7 @@\n \n test_description='git p4 label tests'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-git-p4.sh\n@@ -188,7 +188,7 @@ test_expect_success 'tag that cannot be exported' '\n \t\tgit add main/f12 &&\n \t\tgit commit -m \"adding f12\" &&\n \t\tgit tag -m \"tag on a_branch\" GIT_TAG_ON_A_BRANCH &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit p4 submit --export-labels\n \t) &&\n \t(\n-- \ngitgitgadget\n\n"},{"id":"410313","messageId":"88b2c30cc879183e765309f404a795b190fee877.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 14/28] t551*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:32Z","receivedAt":"2020-11-18T23:45:22Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t551*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5510-fetch.sh             | 160 +++++------\n t/t5511-refspec.sh           |  12 +-\n t/t5512-ls-remote.sh         |  28 +-\n t/t5514-fetch-multiple.sh    |  32 +--\n t/t5516-fetch-push.sh        | 502 +++++++++++++++++------------------\n t/t5517-push-mirror.sh       | 126 ++++-----\n t/t5518-fetch-exit-status.sh |   8 +-\n t/t5519-push-alternates.sh   |  14 +-\n 8 files changed, 441 insertions(+), 441 deletions(-)\n\ndiff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh\nindex 4af490b6db..35d9a8c279 100755\n--- a/t/t5510-fetch.sh\n+++ b/t/t5510-fetch.sh\n@@ -5,7 +5,7 @@ test_description='Per branch config variables affects \"git fetch\".\n \n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -40,19 +40,19 @@ test_expect_success \"clone and setup child repos\" '\n \tgit clone . two &&\n \t(\n \t\tcd two &&\n-\t\tgit config branch.master.remote one &&\n+\t\tgit config branch.main.remote one &&\n \t\tgit config remote.one.url ../one/.git/ &&\n-\t\tgit config remote.one.fetch refs/heads/master:refs/heads/one\n+\t\tgit config remote.one.fetch refs/heads/main:refs/heads/one\n \t) &&\n \tgit clone . three &&\n \t(\n \t\tcd three &&\n-\t\tgit config branch.master.remote two &&\n-\t\tgit config branch.master.merge refs/heads/one &&\n+\t\tgit config branch.main.remote two &&\n+\t\tgit config branch.main.merge refs/heads/one &&\n \t\tmkdir -p .git/remotes &&\n \t\t{\n \t\t\techo \"URL: ../two/.git/\"\n-\t\t\techo \"Pull: refs/heads/master:refs/heads/two\"\n+\t\t\techo \"Pull: refs/heads/main:refs/heads/two\"\n \t\t\techo \"Pull: refs/heads/one:refs/heads/one\"\n \t\t} >.git/remotes/two\n \t) &&\n@@ -68,7 +68,7 @@ test_expect_success \"fetch test\" '\n \tgit fetch &&\n \tgit rev-parse --verify refs/heads/one &&\n \tmine=$(git rev-parse refs/heads/one) &&\n-\this=$(cd ../one && git rev-parse refs/heads/master) &&\n+\this=$(cd ../one && git rev-parse refs/heads/main) &&\n \ttest \"z$mine\" = \"z$his\"\n '\n \n@@ -78,11 +78,11 @@ test_expect_success \"fetch test for-merge\" '\n \tgit fetch &&\n \tgit rev-parse --verify refs/heads/two &&\n \tgit rev-parse --verify refs/heads/one &&\n-\tmaster_in_two=$(cd ../two && git rev-parse master) &&\n+\tmain_in_two=$(cd ../two && git rev-parse main) &&\n \tone_in_two=$(cd ../two && git rev-parse one) &&\n \t{\n \t\techo \"$one_in_two\t\"\n-\t\techo \"$master_in_two\tnot-for-merge\"\n+\t\techo \"$main_in_two\tnot-for-merge\"\n \t} >expected &&\n \tcut -f -2 .git/FETCH_HEAD >actual &&\n \ttest_cmp expected actual'\n@@ -91,7 +91,7 @@ test_expect_success 'fetch --prune on its own works as expected' '\n \tcd \"$D\" &&\n \tgit clone . prune &&\n \tcd prune &&\n-\tgit update-ref refs/remotes/origin/extrabranch master &&\n+\tgit update-ref refs/remotes/origin/extrabranch main &&\n \n \tgit fetch --prune origin &&\n \ttest_must_fail git rev-parse origin/extrabranch\n@@ -101,9 +101,9 @@ test_expect_success 'fetch --prune with a branch name keeps branches' '\n \tcd \"$D\" &&\n \tgit clone . prune-branch &&\n \tcd prune-branch &&\n-\tgit update-ref refs/remotes/origin/extrabranch master &&\n+\tgit update-ref refs/remotes/origin/extrabranch main &&\n \n-\tgit fetch --prune origin master &&\n+\tgit fetch --prune origin main &&\n \tgit rev-parse origin/extrabranch\n '\n \n@@ -113,18 +113,18 @@ test_expect_success 'fetch --prune with a namespace keeps other namespaces' '\n \tcd prune-namespace &&\n \n \tgit fetch --prune origin refs/heads/a/*:refs/remotes/origin/a/* &&\n-\tgit rev-parse origin/master\n+\tgit rev-parse origin/main\n '\n \n test_expect_success 'fetch --prune handles overlapping refspecs' '\n \tcd \"$D\" &&\n-\tgit update-ref refs/pull/42/head master &&\n+\tgit update-ref refs/pull/42/head main &&\n \tgit clone . prune-overlapping &&\n \tcd prune-overlapping &&\n \tgit config --add remote.origin.fetch refs/pull/*/head:refs/remotes/origin/pr/* &&\n \n \tgit fetch --prune origin &&\n-\tgit rev-parse origin/master &&\n+\tgit rev-parse origin/main &&\n \tgit rev-parse origin/pr/42 &&\n \n \tgit config --unset-all remote.origin.fetch &&\n@@ -132,7 +132,7 @@ test_expect_success 'fetch --prune handles overlapping refspecs' '\n \tgit config --add remote.origin.fetch refs/heads/*:refs/remotes/origin/* &&\n \n \tgit fetch --prune origin &&\n-\tgit rev-parse origin/master &&\n+\tgit rev-parse origin/main &&\n \tgit rev-parse origin/pr/42\n '\n \n@@ -140,13 +140,13 @@ test_expect_success 'fetch --prune --tags prunes branches but not tags' '\n \tcd \"$D\" &&\n \tgit clone . prune-tags &&\n \tcd prune-tags &&\n-\tgit tag sometag master &&\n+\tgit tag sometag main &&\n \t# Create what looks like a remote-tracking branch from an earlier\n \t# fetch that has since been deleted from the remote:\n-\tgit update-ref refs/remotes/origin/fake-remote master &&\n+\tgit update-ref refs/remotes/origin/fake-remote main &&\n \n \tgit fetch --prune --tags origin &&\n-\tgit rev-parse origin/master &&\n+\tgit rev-parse origin/main &&\n \ttest_must_fail git rev-parse origin/fake-remote &&\n \tgit rev-parse sometag\n '\n@@ -155,10 +155,10 @@ test_expect_success 'fetch --prune --tags with branch does not prune other thing\n \tcd \"$D\" &&\n \tgit clone . prune-tags-branch &&\n \tcd prune-tags-branch &&\n-\tgit tag sometag master &&\n-\tgit update-ref refs/remotes/origin/extrabranch master &&\n+\tgit tag sometag main &&\n+\tgit update-ref refs/remotes/origin/extrabranch main &&\n \n-\tgit fetch --prune --tags origin master &&\n+\tgit fetch --prune --tags origin main &&\n \tgit rev-parse origin/extrabranch &&\n \tgit rev-parse sometag\n '\n@@ -167,9 +167,9 @@ test_expect_success 'fetch --prune --tags with refspec prunes based on refspec'\n \tcd \"$D\" &&\n \tgit clone . prune-tags-refspec &&\n \tcd prune-tags-refspec &&\n-\tgit tag sometag master &&\n-\tgit update-ref refs/remotes/origin/foo/otherbranch master &&\n-\tgit update-ref refs/remotes/origin/extrabranch master &&\n+\tgit tag sometag main &&\n+\tgit update-ref refs/remotes/origin/foo/otherbranch main &&\n+\tgit update-ref refs/remotes/origin/extrabranch main &&\n \n \tgit fetch --prune --tags origin refs/heads/foo/*:refs/remotes/origin/foo/* &&\n \ttest_must_fail git rev-parse refs/remotes/origin/foo/otherbranch &&\n@@ -180,20 +180,20 @@ test_expect_success 'fetch --prune --tags with refspec prunes based on refspec'\n test_expect_success '--refmap=\"\" ignores configured refspec' '\n \tcd \"$TRASH_DIRECTORY\" &&\n \tgit clone \"$D\" remote-refs &&\n-\tgit -C remote-refs rev-parse remotes/origin/master >old &&\n-\tgit -C remote-refs update-ref refs/remotes/origin/master master~1 &&\n-\tgit -C remote-refs rev-parse remotes/origin/master >new &&\n+\tgit -C remote-refs rev-parse remotes/origin/main >old &&\n+\tgit -C remote-refs update-ref refs/remotes/origin/main main~1 &&\n+\tgit -C remote-refs rev-parse remotes/origin/main >new &&\n \tgit -C remote-refs fetch --refmap= origin \"+refs/heads/*:refs/hidden/origin/*\" &&\n-\tgit -C remote-refs rev-parse remotes/origin/master >actual &&\n+\tgit -C remote-refs rev-parse remotes/origin/main >actual &&\n \ttest_cmp new actual &&\n \tgit -C remote-refs fetch origin &&\n-\tgit -C remote-refs rev-parse remotes/origin/master >actual &&\n+\tgit -C remote-refs rev-parse remotes/origin/main >actual &&\n \ttest_cmp old actual\n '\n \n test_expect_success '--refmap=\"\" and --prune' '\n-\tgit -C remote-refs update-ref refs/remotes/origin/foo/otherbranch master &&\n-\tgit -C remote-refs update-ref refs/hidden/foo/otherbranch master &&\n+\tgit -C remote-refs update-ref refs/remotes/origin/foo/otherbranch main &&\n+\tgit -C remote-refs update-ref refs/hidden/foo/otherbranch main &&\n \tgit -C remote-refs fetch --prune --refmap=\"\" origin +refs/heads/*:refs/hidden/* &&\n \tgit -C remote-refs rev-parse remotes/origin/foo/otherbranch &&\n \ttest_must_fail git -C remote-refs rev-parse refs/hidden/foo/otherbranch &&\n@@ -253,7 +253,7 @@ test_expect_success 'fetch uses remote ref names to describe new refs' '\n \t\ttest_i18ngrep \"new tag.* -> descriptive-tag$\" actual &&\n \t\ttest_i18ngrep \"new ref.* -> crazy$\" actual\n \t) &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'fetch must not resolve short tag name' '\n@@ -284,7 +284,7 @@ test_expect_success 'create bundle 1' '\n \tcd \"$D\" &&\n \techo >file updated again by origin &&\n \tgit commit -a -m \"tip\" &&\n-\tgit bundle create --version=3 bundle1 master^..master\n+\tgit bundle create --version=3 bundle1 main^..main\n '\n \n test_expect_success 'header of bundle looks right' '\n@@ -292,7 +292,7 @@ test_expect_success 'header of bundle looks right' '\n \t# v3 git bundle\n \t@object-format=$(test_oid algo)\n \t-OID updated by origin\n-\tOID refs/heads/master\n+\tOID refs/heads/main\n \n \tEOF\n \tsed -e \"s/$OID_REGEX/OID/g\" -e \"5q\" \"$D\"/bundle1 >actual &&\n@@ -301,13 +301,13 @@ test_expect_success 'header of bundle looks right' '\n \n test_expect_success 'create bundle 2' '\n \tcd \"$D\" &&\n-\tgit bundle create bundle2 master~2..master\n+\tgit bundle create bundle2 main~2..main\n '\n \n test_expect_success 'unbundle 1' '\n \tcd \"$D/bundle\" &&\n \tgit checkout -b some-branch &&\n-\ttest_must_fail git fetch \"$D/bundle1\" master:master\n+\ttest_must_fail git fetch \"$D/bundle1\" main:main\n '\n \n \n@@ -320,8 +320,8 @@ test_expect_success 'bundle 1 has only 3 files ' '\n \n test_expect_success 'unbundle 2' '\n \tcd \"$D/bundle\" &&\n-\tgit fetch ../bundle2 master:master &&\n-\ttest \"tip\" = \"$(git log -1 --pretty=oneline master | cut -d\" \" -f2)\"\n+\tgit fetch ../bundle2 main:main &&\n+\ttest \"tip\" = \"$(git log -1 --pretty=oneline main | cut -d\" \" -f2)\"\n '\n \n test_expect_success 'bundle does not prerequisite objects' '\n@@ -338,14 +338,14 @@ test_expect_success 'bundle does not prerequisite objects' '\n test_expect_success 'bundle should be able to create a full history' '\n \n \tcd \"$D\" &&\n-\tgit tag -a -m \"1.0\" v1.0 master &&\n+\tgit tag -a -m \"1.0\" v1.0 main &&\n \tgit bundle create bundle4 v1.0\n \n '\n \n test_expect_success 'fetch with a non-applying branch.<name>.merge' '\n-\tgit config branch.master.remote yeti &&\n-\tgit config branch.master.merge refs/heads/bigfoot &&\n+\tgit config branch.main.remote yeti &&\n+\tgit config branch.main.merge refs/heads/bigfoot &&\n \tgit config remote.blub.url one &&\n \tgit config remote.blub.fetch \"refs/heads/*:refs/remotes/one/*\" &&\n \tgit fetch blub\n@@ -365,8 +365,8 @@ test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge\n # the merge spec matches the branch the remote HEAD points to\n test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge [2]' '\n \tone_ref=$(cd one && git symbolic-ref HEAD) &&\n-\tgit config branch.master.remote blub &&\n-\tgit config branch.master.merge \"$one_ref\" &&\n+\tgit config branch.main.remote blub &&\n+\tgit config branch.main.merge \"$one_ref\" &&\n \tgit update-ref -d FETCH_HEAD &&\n \tgit fetch one &&\n \ttest $one_head = \"$(git rev-parse --verify FETCH_HEAD)\" &&\n@@ -376,7 +376,7 @@ test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge\n # URL supplied to fetch matches the url of the configured branch's remote, but\n # the merge spec does not match the branch the remote HEAD points to\n test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge [3]' '\n-\tgit config branch.master.merge \"${one_ref}_not\" &&\n+\tgit config branch.main.merge \"${one_ref}_not\" &&\n \tgit update-ref -d FETCH_HEAD &&\n \tgit fetch one &&\n \ttest $one_head = \"$(git rev-parse --verify FETCH_HEAD)\" &&\n@@ -392,9 +392,9 @@ test_expect_success 'quoting of a strangely named repo' '\n test_expect_success 'bundle should record HEAD correctly' '\n \n \tcd \"$D\" &&\n-\tgit bundle create bundle5 HEAD master &&\n+\tgit bundle create bundle5 HEAD main &&\n \tgit bundle list-heads bundle5 >actual &&\n-\tfor h in HEAD refs/heads/master\n+\tfor h in HEAD refs/heads/main\n \tdo\n \t\techo \"$(git rev-parse --verify $h) $h\"\n \tdone >expect &&\n@@ -402,10 +402,10 @@ test_expect_success 'bundle should record HEAD correctly' '\n \n '\n \n-test_expect_success 'mark initial state of origin/master' '\n+test_expect_success 'mark initial state of origin/main' '\n \t(\n \t\tcd three &&\n-\t\tgit tag base-origin-master refs/remotes/origin/master\n+\t\tgit tag base-origin-main refs/remotes/origin/main\n \t)\n '\n \n@@ -415,10 +415,10 @@ test_expect_success 'explicit fetch should update tracking' '\n \tgit branch -f side &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n-\t\tgit fetch origin master &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n+\t\tgit fetch origin main &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" != \"$n\" &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/origin/side\n \t)\n@@ -430,10 +430,10 @@ test_expect_success 'explicit pull should update tracking' '\n \tgit branch -f side &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n-\t\tgit pull origin master &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n+\t\tgit pull origin main &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" != \"$n\" &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/origin/side\n \t)\n@@ -452,13 +452,13 @@ test_expect_success 'explicit --refmap option overrides remote.*.fetch' '\n \tgit branch -f side &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n-\t\tgit fetch --refmap=\"refs/heads/*:refs/remotes/other/*\" origin master &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n+\t\tgit fetch --refmap=\"refs/heads/*:refs/remotes/other/*\" origin main &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" = \"$n\" &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/origin/side &&\n-\t\tgit rev-parse --verify refs/remotes/other/master\n+\t\tgit rev-parse --verify refs/remotes/other/main\n \t)\n '\n \n@@ -467,10 +467,10 @@ test_expect_success 'explicitly empty --refmap option disables remote.*.fetch' '\n \tgit branch -f side &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n-\t\tgit fetch --refmap=\"\" origin master &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n+\t\tgit fetch --refmap=\"\" origin main &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" = \"$n\" &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/origin/side\n \t)\n@@ -482,10 +482,10 @@ test_expect_success 'configured fetch updates tracking' '\n \tgit branch -f side &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\tgit fetch origin &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" != \"$n\" &&\n \t\tgit rev-parse --verify refs/remotes/origin/side\n \t)\n@@ -496,12 +496,12 @@ test_expect_success 'non-matching refspecs do not confuse tracking update' '\n \tgit update-ref refs/odd/location HEAD &&\n \t(\n \t\tcd three &&\n-\t\tgit update-ref refs/remotes/origin/master base-origin-master &&\n+\t\tgit update-ref refs/remotes/origin/main base-origin-main &&\n \t\tgit config --add remote.origin.fetch \\\n \t\t\trefs/odd/location:refs/remotes/origin/odd &&\n-\t\to=$(git rev-parse --verify refs/remotes/origin/master) &&\n-\t\tgit fetch origin master &&\n-\t\tn=$(git rev-parse --verify refs/remotes/origin/master) &&\n+\t\to=$(git rev-parse --verify refs/remotes/origin/main) &&\n+\t\tgit fetch origin main &&\n+\t\tn=$(git rev-parse --verify refs/remotes/origin/main) &&\n \t\ttest \"$o\" != \"$n\" &&\n \t\ttest_must_fail git rev-parse --verify refs/remotes/origin/odd\n \t)\n@@ -527,7 +527,7 @@ test_expect_success 'auto tag following fetches minimum' '\n \t\t\tgit tag -a -m $i excess-$i || exit 1\n \t\tdone\n \t) &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \t(\n \t\tcd follow &&\n \t\tgit fetch\n@@ -536,13 +536,13 @@ test_expect_success 'auto tag following fetches minimum' '\n \n test_expect_success 'refuse to fetch into the current branch' '\n \n-\ttest_must_fail git fetch . side:master\n+\ttest_must_fail git fetch . side:main\n \n '\n \n test_expect_success 'fetch into the current branch with --update-head-ok' '\n \n-\tgit fetch --update-head-ok . side:master\n+\tgit fetch --update-head-ok . side:main\n \n '\n \n@@ -571,7 +571,7 @@ test_expect_success \"should be able to fetch with duplicate refspecs\" '\n \t(\n \t\tcd dups &&\n \t\tgit init &&\n-\t\tgit config branch.master.remote three &&\n+\t\tgit config branch.main.remote three &&\n \t\tgit config remote.three.url ../three/.git &&\n \t\tgit config remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&\n \t\tgit config --add remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&\n@@ -880,11 +880,11 @@ test_expect_success 'all boundary commits are excluded' '\n \ttest_commit oneside &&\n \tgit checkout HEAD^ &&\n \ttest_commit otherside &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit merge otherside &&\n \tad=$(git log --no-walk --format=%ad HEAD) &&\n-\tgit bundle create twoside-boundary.bdl master --since=\"$ad\" &&\n+\tgit bundle create twoside-boundary.bdl main --since=\"$ad\" &&\n \tconvert_bundle_to_pack <twoside-boundary.bdl >twoside-boundary.pack &&\n \tpack=$(git index-pack --fix-thin --stdin <twoside-boundary.pack) &&\n \ttest_bundle_object_count .git/objects/pack/pack-${pack##pack\t}.pack 3\n@@ -1020,7 +1020,7 @@ setup_negotiation_tip () {\n \tfi &&\n \n \ttest_commit -C \"$SERVER\" beta_s &&\n-\tgit -C \"$SERVER\" checkout master &&\n+\tgit -C \"$SERVER\" checkout main &&\n \ttest_commit -C \"$SERVER\" alpha_s &&\n \tgit -C \"$SERVER\" tag -d alpha_1 alpha_2 beta_1 beta_2\n }\ndiff --git a/t/t5511-refspec.sh b/t/t5511-refspec.sh\nindex f541f30bc2..847a9d4c27 100755\n--- a/t/t5511-refspec.sh\n+++ b/t/t5511-refspec.sh\n@@ -33,7 +33,7 @@ test_refspec fetch '::'\t\t\t\t\t\tinvalid\n test_refspec push 'refs/heads/*:refs/remotes/frotz/*'\n test_refspec push 'refs/heads/*:refs/remotes/frotz'\t\tinvalid\n test_refspec push 'refs/heads:refs/remotes/frotz/*'\t\tinvalid\n-test_refspec push 'refs/heads/master:refs/remotes/frotz/xyzzy'\n+test_refspec push 'refs/heads/main:refs/remotes/frotz/xyzzy'\n \n \n # These have invalid LHS, but we do not have a formal \"valid sha-1\n@@ -41,18 +41,18 @@ test_refspec push 'refs/heads/master:refs/remotes/frotz/xyzzy'\n # code.  They will be caught downstream anyway, but we may want to\n # have tighter check later...\n \n-: test_refspec push 'refs/heads/master::refs/remotes/frotz/xyzzy'\tinvalid\n+: test_refspec push 'refs/heads/main::refs/remotes/frotz/xyzzy'\tinvalid\n : test_refspec push 'refs/heads/maste :refs/remotes/frotz/xyzzy'\tinvalid\n \n test_refspec fetch 'refs/heads/*:refs/remotes/frotz/*'\n test_refspec fetch 'refs/heads/*:refs/remotes/frotz'\t\tinvalid\n test_refspec fetch 'refs/heads:refs/remotes/frotz/*'\t\tinvalid\n-test_refspec fetch 'refs/heads/master:refs/remotes/frotz/xyzzy'\n-test_refspec fetch 'refs/heads/master::refs/remotes/frotz/xyzzy'\tinvalid\n+test_refspec fetch 'refs/heads/main:refs/remotes/frotz/xyzzy'\n+test_refspec fetch 'refs/heads/main::refs/remotes/frotz/xyzzy'\tinvalid\n test_refspec fetch 'refs/heads/maste :refs/remotes/frotz/xyzzy'\tinvalid\n \n-test_refspec push 'master~1:refs/remotes/frotz/backup'\n-test_refspec fetch 'master~1:refs/remotes/frotz/backup'\t\tinvalid\n+test_refspec push 'main~1:refs/remotes/frotz/backup'\n+test_refspec fetch 'main~1:refs/remotes/frotz/backup'\t\tinvalid\n test_refspec push 'HEAD~4:refs/remotes/frotz/new'\n test_refspec fetch 'HEAD~4:refs/remotes/frotz/new'\t\tinvalid\n \ndiff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh\nindex a892807de2..4a568a2398 100755\n--- a/t/t5512-ls-remote.sh\n+++ b/t/t5512-ls-remote.sh\n@@ -2,7 +2,7 @@\n \n test_description='git ls-remote'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -121,7 +121,7 @@ test_expect_success 'use branch.<name>.remote if possible' '\n \techo \"From $URL\" >exp_err &&\n \n \tgit remote add other $URL &&\n-\tgit config branch.master.remote other &&\n+\tgit config branch.main.remote other &&\n \n \tgit ls-remote 2>actual_err >actual &&\n \ttest_cmp exp_err actual_err &&\n@@ -132,9 +132,9 @@ test_expect_success 'confuses pattern as remote when no remote specified' '\n \tif test_have_prereq MINGW\n \tthen\n \t\t# Windows does not like asterisks in pathname\n-\t\tdoes_not_exist=master\n+\t\tdoes_not_exist=main\n \telse\n-\t\tdoes_not_exist=\"refs*master\"\n+\t\tdoes_not_exist=\"refs*main\"\n \tfi &&\n \tcat >exp <<-EOF &&\n \tfatal: '\\''$does_not_exist'\\'' does not appear to be a git repository\n@@ -147,7 +147,7 @@ test_expect_success 'confuses pattern as remote when no remote specified' '\n \t# Do not expect \"git ls-remote <pattern>\" to work; ls-remote needs\n \t# <remote> if you want to feed <pattern>, just like you cannot say\n \t# fetch <branch>.\n-\t# We could just as easily have used \"master\"; the \"*\" emphasizes its\n+\t# We could just as easily have used \"main\"; the \"*\" emphasizes its\n \t# role as a pattern.\n \ttest_must_fail git ls-remote \"$does_not_exist\" >actual 2>&1 &&\n \ttest_i18ncmp exp actual\n@@ -220,14 +220,14 @@ test_expect_success 'protocol v2 supports hiderefs' '\n \n test_expect_success 'ls-remote --symref' '\n \tgit fetch origin &&\n-\techo \"ref: refs/heads/master\tHEAD\" >expect &&\n+\techo \"ref: refs/heads/main\tHEAD\" >expect &&\n \tgenerate_references \\\n \t\tHEAD \\\n-\t\trefs/heads/master >>expect &&\n+\t\trefs/heads/main >>expect &&\n \toid=$(git rev-parse HEAD) &&\n \techo \"$oid\trefs/remotes/origin/HEAD\" >>expect &&\n \tgenerate_references \\\n-\t\trefs/remotes/origin/master \\\n+\t\trefs/remotes/origin/main \\\n \t\trefs/tags/mark \\\n \t\trefs/tags/mark1.1 \\\n \t\trefs/tags/mark1.10 \\\n@@ -241,7 +241,7 @@ test_expect_success 'ls-remote --symref' '\n test_expect_success 'ls-remote with filtered symref (refname)' '\n \trev=$(git rev-parse HEAD) &&\n \tcat >expect <<-EOF &&\n-\tref: refs/heads/master\tHEAD\n+\tref: refs/heads/main\tHEAD\n \t$rev\tHEAD\n \tEOF\n \t# Protocol v2 supports sending symrefs for refs other than HEAD, so use\n@@ -255,7 +255,7 @@ test_expect_failure 'ls-remote with filtered symref (--heads)' '\n \tcat >expect <<-EOF &&\n \tref: refs/tags/mark\trefs/heads/foo\n \t$rev\trefs/heads/foo\n-\t$rev\trefs/heads/master\n+\t$rev\trefs/heads/main\n \tEOF\n \t# Protocol v2 supports sending symrefs for refs other than HEAD, so use\n \t# protocol v0 here.\n@@ -266,7 +266,7 @@ test_expect_failure 'ls-remote with filtered symref (--heads)' '\n test_expect_success 'ls-remote --symref omits filtered-out matches' '\n \tcat >expect <<-EOF &&\n \t$rev\trefs/heads/foo\n-\t$rev\trefs/heads/master\n+\t$rev\trefs/heads/main\n \tEOF\n \t# Protocol v2 supports sending symrefs for refs other than HEAD, so use\n \t# protocol v0 here.\n@@ -333,10 +333,10 @@ test_expect_success 'ls-remote --sort fails gracefully outside repository' '\n \n test_expect_success 'ls-remote patterns work with all protocol versions' '\n \tgit for-each-ref --format=\"%(objectname)\t%(refname)\" \\\n-\t\trefs/heads/master refs/remotes/origin/master >expect &&\n-\tgit -c protocol.version=1 ls-remote . master >actual.v1 &&\n+\t\trefs/heads/main refs/remotes/origin/main >expect &&\n+\tgit -c protocol.version=1 ls-remote . main >actual.v1 &&\n \ttest_cmp expect actual.v1 &&\n-\tgit -c protocol.version=2 ls-remote . master >actual.v2 &&\n+\tgit -c protocol.version=2 ls-remote . main >actual.v2 &&\n \ttest_cmp expect actual.v2\n '\n \ndiff --git a/t/t5514-fetch-multiple.sh b/t/t5514-fetch-multiple.sh\nindex f12a83f82b..511ba3bd45 100755\n--- a/t/t5514-fetch-multiple.sh\n+++ b/t/t5514-fetch-multiple.sh\n@@ -2,7 +2,7 @@\n \n test_description='fetch --all works correctly'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -20,7 +20,7 @@ setup_repository () {\n \tgit add elif &&\n \ttest_tick &&\n \tgit commit -m \"Second\" &&\n-\tgit checkout master\n+\tgit checkout main\n \t)\n }\n \n@@ -35,16 +35,16 @@ test_expect_success setup '\n '\n \n cat > test/expect << EOF\n-  one/master\n+  one/main\n   one/side\n-  origin/HEAD -> origin/master\n-  origin/master\n+  origin/HEAD -> origin/main\n+  origin/main\n   origin/side\n   three/another\n-  three/master\n+  three/main\n   three/side\n   two/another\n-  two/master\n+  two/main\n   two/side\n EOF\n \n@@ -73,15 +73,15 @@ test_expect_success 'git fetch --all should continue if a remote has errors' '\n test_expect_success 'git fetch --all does not allow non-option arguments' '\n \t(cd test &&\n \t test_must_fail git fetch --all origin &&\n-\t test_must_fail git fetch --all origin master)\n+\t test_must_fail git fetch --all origin main)\n '\n \n cat > expect << EOF\n-  origin/HEAD -> origin/master\n-  origin/master\n+  origin/HEAD -> origin/main\n+  origin/main\n   origin/side\n   three/another\n-  three/master\n+  three/main\n   three/side\n EOF\n \n@@ -95,10 +95,10 @@ test_expect_success 'git fetch --multiple (but only one remote)' '\n '\n \n cat > expect << EOF\n-  one/master\n+  one/main\n   one/side\n   two/another\n-  two/master\n+  two/main\n   two/side\n EOF\n \n@@ -136,13 +136,13 @@ test_expect_success 'git fetch --all (skipFetchAll)' '\n '\n \n cat > expect << EOF\n-  one/master\n+  one/main\n   one/side\n   three/another\n-  three/master\n+  three/main\n   three/side\n   two/another\n-  two/master\n+  two/main\n   two/side\n EOF\n \ndiff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh\nindex 7003467523..b037439c49 100755\n--- a/t/t5516-fetch-push.sh\n+++ b/t/t5516-fetch-push.sh\n@@ -14,7 +14,7 @@ This test checks the following functionality:\n * reflogs\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -123,13 +123,13 @@ test_expect_success setup '\n \tgit add path1 &&\n \ttest_tick &&\n \tgit commit -a -m repo &&\n-\tthe_first_commit=$(git show-ref -s --verify refs/heads/master) &&\n+\tthe_first_commit=$(git show-ref -s --verify refs/heads/main) &&\n \n \t>path2 &&\n \tgit add path2 &&\n \ttest_tick &&\n \tgit commit -a -m second &&\n-\tthe_commit=$(git show-ref -s --verify refs/heads/master)\n+\tthe_commit=$(git show-ref -s --verify refs/heads/main)\n \n '\n \n@@ -137,9 +137,9 @@ test_expect_success 'fetch without wildcard' '\n \tmk_empty testrepo &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit fetch .. refs/heads/master:refs/remotes/origin/master &&\n+\t\tgit fetch .. refs/heads/main:refs/remotes/origin/main &&\n \n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -153,7 +153,7 @@ test_expect_success 'fetch with wildcard' '\n \t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n \t\tgit fetch up &&\n \n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -169,7 +169,7 @@ test_expect_success 'fetch with insteadOf' '\n \t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n \t\tgit fetch up &&\n \n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -185,7 +185,7 @@ test_expect_success 'fetch with pushInsteadOf (should not rewrite)' '\n \t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n \t\tgit fetch up &&\n \n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -194,10 +194,10 @@ test_expect_success 'fetch with pushInsteadOf (should not rewrite)' '\n test_expect_success 'push without wildcard' '\n \tmk_empty testrepo &&\n \n-\tgit push testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -209,7 +209,7 @@ test_expect_success 'push with wildcard' '\n \tgit push testrepo \"refs/heads/*:refs/remotes/origin/*\" &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -219,10 +219,10 @@ test_expect_success 'push with insteadOf' '\n \tmk_empty testrepo &&\n \tTRASH=\"$(pwd)/\" &&\n \ttest_config \"url.$TRASH.insteadOf\" trash/ &&\n-\tgit push trash/testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push trash/testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -232,10 +232,10 @@ test_expect_success 'push with pushInsteadOf' '\n \tmk_empty testrepo &&\n \tTRASH=\"$(pwd)/\" &&\n \ttest_config \"url.$TRASH.pushInsteadOf\" trash/ &&\n-\tgit push trash/testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push trash/testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -247,10 +247,10 @@ test_expect_success 'push with pushInsteadOf and explicit pushurl (pushInsteadOf\n \ttest_config \"url.trash3/.pushInsteadOf\" trash/wrong &&\n \ttest_config remote.r.url trash/wrong &&\n \ttest_config remote.r.pushurl \"testrepo/\" &&\n-\tgit push r refs/heads/master:refs/remotes/origin/master &&\n+\tgit push r refs/heads/main:refs/remotes/origin/main &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -258,101 +258,101 @@ test_expect_success 'push with pushInsteadOf and explicit pushurl (pushInsteadOf\n \n test_expect_success 'push with matching heads' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tgit push testrepo : &&\n-\tcheck_push_result testrepo $the_commit heads/master\n+\tcheck_push_result testrepo $the_commit heads/main\n \n '\n \n test_expect_success 'push with matching heads on the command line' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tgit push testrepo : &&\n-\tcheck_push_result testrepo $the_commit heads/master\n+\tcheck_push_result testrepo $the_commit heads/main\n \n '\n \n test_expect_success 'failed (non-fast-forward) push with matching heads' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tgit push testrepo : &&\n \tgit commit --amend -massaged &&\n \ttest_must_fail git push testrepo &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n \tgit reset --hard $the_commit\n \n '\n \n test_expect_success 'push --force with matching heads' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tgit push testrepo : &&\n \tgit commit --amend -massaged &&\n \tgit push --force testrepo : &&\n-\t! check_push_result testrepo $the_commit heads/master &&\n+\t! check_push_result testrepo $the_commit heads/main &&\n \tgit reset --hard $the_commit\n \n '\n \n test_expect_success 'push with matching heads and forced update' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tgit push testrepo : &&\n \tgit commit --amend -massaged &&\n \tgit push testrepo +: &&\n-\t! check_push_result testrepo $the_commit heads/master &&\n+\t! check_push_result testrepo $the_commit heads/main &&\n \tgit reset --hard $the_commit\n \n '\n \n test_expect_success 'push with no ambiguity (1)' '\n \n-\tmk_test testrepo heads/master &&\n-\tgit push testrepo master:master &&\n-\tcheck_push_result testrepo $the_commit heads/master\n+\tmk_test testrepo heads/main &&\n+\tgit push testrepo main:main &&\n+\tcheck_push_result testrepo $the_commit heads/main\n \n '\n \n test_expect_success 'push with no ambiguity (2)' '\n \n-\tmk_test testrepo remotes/origin/master &&\n-\tgit push testrepo master:origin/master &&\n-\tcheck_push_result testrepo $the_commit remotes/origin/master\n+\tmk_test testrepo remotes/origin/main &&\n+\tgit push testrepo main:origin/main &&\n+\tcheck_push_result testrepo $the_commit remotes/origin/main\n \n '\n \n test_expect_success 'push with colon-less refspec, no ambiguity' '\n \n-\tmk_test testrepo heads/master heads/t/master &&\n-\tgit branch -f t/master master &&\n-\tgit push testrepo master &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n-\tcheck_push_result testrepo $the_first_commit heads/t/master\n+\tmk_test testrepo heads/main heads/t/main &&\n+\tgit branch -f t/main main &&\n+\tgit push testrepo main &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n+\tcheck_push_result testrepo $the_first_commit heads/t/main\n \n '\n \n test_expect_success 'push with weak ambiguity (1)' '\n \n-\tmk_test testrepo heads/master remotes/origin/master &&\n-\tgit push testrepo master:master &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n-\tcheck_push_result testrepo $the_first_commit remotes/origin/master\n+\tmk_test testrepo heads/main remotes/origin/main &&\n+\tgit push testrepo main:main &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n+\tcheck_push_result testrepo $the_first_commit remotes/origin/main\n \n '\n \n test_expect_success 'push with weak ambiguity (2)' '\n \n-\tmk_test testrepo heads/master remotes/origin/master remotes/another/master &&\n-\tgit push testrepo master:master &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n-\tcheck_push_result testrepo $the_first_commit remotes/origin/master remotes/another/master\n+\tmk_test testrepo heads/main remotes/origin/main remotes/another/main &&\n+\tgit push testrepo main:main &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n+\tcheck_push_result testrepo $the_first_commit remotes/origin/main remotes/another/main\n \n '\n \n test_expect_success 'push with ambiguity' '\n \n \tmk_test testrepo heads/frotz tags/frotz &&\n-\ttest_must_fail git push testrepo master:frotz &&\n+\ttest_must_fail git push testrepo main:frotz &&\n \tcheck_push_result testrepo $the_first_commit heads/frotz tags/frotz\n \n '\n@@ -360,7 +360,7 @@ test_expect_success 'push with ambiguity' '\n test_expect_success 'push with colon-less refspec (1)' '\n \n \tmk_test testrepo heads/frotz tags/frotz &&\n-\tgit branch -f frotz master &&\n+\tgit branch -f frotz main &&\n \tgit push testrepo frotz &&\n \tcheck_push_result testrepo $the_commit heads/frotz &&\n \tcheck_push_result testrepo $the_first_commit tags/frotz\n@@ -388,7 +388,7 @@ test_expect_success 'push with colon-less refspec (3)' '\n \tthen\n \t\tgit tag -d frotz\n \tfi &&\n-\tgit branch -f frotz master &&\n+\tgit branch -f frotz main &&\n \tgit push testrepo frotz &&\n \tcheck_push_result testrepo $the_commit heads/frotz &&\n \ttest 1 = $( cd testrepo && git show-ref | wc -l )\n@@ -411,7 +411,7 @@ test_expect_success 'push with colon-less refspec (4)' '\n test_expect_success 'push head with non-existent, incomplete dest' '\n \n \tmk_test testrepo &&\n-\tgit push testrepo master:branch &&\n+\tgit push testrepo main:branch &&\n \tcheck_push_result testrepo $the_commit heads/branch\n \n '\n@@ -428,42 +428,42 @@ test_expect_success 'push tag with non-existent, incomplete dest' '\n test_expect_success 'push sha1 with non-existent, incomplete dest' '\n \n \tmk_test testrepo &&\n-\ttest_must_fail git push testrepo $(git rev-parse master):foo\n+\ttest_must_fail git push testrepo $(git rev-parse main):foo\n \n '\n \n test_expect_success 'push ref expression with non-existent, incomplete dest' '\n \n \tmk_test testrepo &&\n-\ttest_must_fail git push testrepo master^:branch\n+\ttest_must_fail git push testrepo main^:branch\n \n '\n \n test_expect_success 'push with HEAD' '\n \n-\tmk_test testrepo heads/master &&\n-\tgit checkout master &&\n+\tmk_test testrepo heads/main &&\n+\tgit checkout main &&\n \tgit push testrepo HEAD &&\n-\tcheck_push_result testrepo $the_commit heads/master\n+\tcheck_push_result testrepo $the_commit heads/main\n \n '\n \n test_expect_success 'push with HEAD nonexisting at remote' '\n \n-\tmk_test testrepo heads/master &&\n-\tgit checkout -b local master &&\n+\tmk_test testrepo heads/main &&\n+\tgit checkout -b local main &&\n \tgit push testrepo HEAD &&\n \tcheck_push_result testrepo $the_commit heads/local\n '\n \n test_expect_success 'push with +HEAD' '\n \n-\tmk_test testrepo heads/master &&\n-\tgit checkout master &&\n+\tmk_test testrepo heads/main &&\n+\tgit checkout main &&\n \tgit branch -D local &&\n \tgit checkout -b local &&\n-\tgit push testrepo master local &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n+\tgit push testrepo main local &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n \tcheck_push_result testrepo $the_commit heads/local &&\n \n \t# Without force rewinding should fail\n@@ -480,7 +480,7 @@ test_expect_success 'push with +HEAD' '\n test_expect_success 'push HEAD with non-existent, incomplete dest' '\n \n \tmk_test testrepo &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit push testrepo HEAD:branch &&\n \tcheck_push_result testrepo $the_commit heads/branch\n \n@@ -489,7 +489,7 @@ test_expect_success 'push HEAD with non-existent, incomplete dest' '\n test_expect_success 'push with config remote.*.push = HEAD' '\n \n \tmk_test testrepo heads/local &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -f local $the_commit &&\n \t(\n \t\tcd testrepo &&\n@@ -498,166 +498,166 @@ test_expect_success 'push with config remote.*.push = HEAD' '\n \t) &&\n \ttest_config remote.there.url testrepo &&\n \ttest_config remote.there.push HEAD &&\n-\ttest_config branch.master.remote there &&\n+\ttest_config branch.main.remote there &&\n \tgit push &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n \tcheck_push_result testrepo $the_first_commit heads/local\n '\n \n test_expect_success 'push with remote.pushdefault' '\n-\tmk_test up_repo heads/master &&\n-\tmk_test down_repo heads/master &&\n+\tmk_test up_repo heads/main &&\n+\tmk_test down_repo heads/main &&\n \ttest_config remote.up.url up_repo &&\n \ttest_config remote.down.url down_repo &&\n-\ttest_config branch.master.remote up &&\n+\ttest_config branch.main.remote up &&\n \ttest_config remote.pushdefault down &&\n \ttest_config push.default matching &&\n \tgit push &&\n-\tcheck_push_result up_repo $the_first_commit heads/master &&\n-\tcheck_push_result down_repo $the_commit heads/master\n+\tcheck_push_result up_repo $the_first_commit heads/main &&\n+\tcheck_push_result down_repo $the_commit heads/main\n '\n \n test_expect_success 'push with config remote.*.pushurl' '\n \n-\tmk_test testrepo heads/master &&\n-\tgit checkout master &&\n+\tmk_test testrepo heads/main &&\n+\tgit checkout main &&\n \ttest_config remote.there.url test2repo &&\n \ttest_config remote.there.pushurl testrepo &&\n \tgit push there : &&\n-\tcheck_push_result testrepo $the_commit heads/master\n+\tcheck_push_result testrepo $the_commit heads/main\n '\n \n test_expect_success 'push with config branch.*.pushremote' '\n-\tmk_test up_repo heads/master &&\n-\tmk_test side_repo heads/master &&\n-\tmk_test down_repo heads/master &&\n+\tmk_test up_repo heads/main &&\n+\tmk_test side_repo heads/main &&\n+\tmk_test down_repo heads/main &&\n \ttest_config remote.up.url up_repo &&\n \ttest_config remote.pushdefault side_repo &&\n \ttest_config remote.down.url down_repo &&\n-\ttest_config branch.master.remote up &&\n-\ttest_config branch.master.pushremote down &&\n+\ttest_config branch.main.remote up &&\n+\ttest_config branch.main.pushremote down &&\n \ttest_config push.default matching &&\n \tgit push &&\n-\tcheck_push_result up_repo $the_first_commit heads/master &&\n-\tcheck_push_result side_repo $the_first_commit heads/master &&\n-\tcheck_push_result down_repo $the_commit heads/master\n+\tcheck_push_result up_repo $the_first_commit heads/main &&\n+\tcheck_push_result side_repo $the_first_commit heads/main &&\n+\tcheck_push_result down_repo $the_commit heads/main\n '\n \n test_expect_success 'branch.*.pushremote config order is irrelevant' '\n-\tmk_test one_repo heads/master &&\n-\tmk_test two_repo heads/master &&\n+\tmk_test one_repo heads/main &&\n+\tmk_test two_repo heads/main &&\n \ttest_config remote.one.url one_repo &&\n \ttest_config remote.two.url two_repo &&\n-\ttest_config branch.master.pushremote two_repo &&\n+\ttest_config branch.main.pushremote two_repo &&\n \ttest_config remote.pushdefault one_repo &&\n \ttest_config push.default matching &&\n \tgit push &&\n-\tcheck_push_result one_repo $the_first_commit heads/master &&\n-\tcheck_push_result two_repo $the_commit heads/master\n+\tcheck_push_result one_repo $the_first_commit heads/main &&\n+\tcheck_push_result two_repo $the_commit heads/main\n '\n \n test_expect_success 'push with dry-run' '\n \n-\tmk_test testrepo heads/master &&\n-\told_commit=$(git -C testrepo show-ref -s --verify refs/heads/master) &&\n+\tmk_test testrepo heads/main &&\n+\told_commit=$(git -C testrepo show-ref -s --verify refs/heads/main) &&\n \tgit push --dry-run testrepo : &&\n-\tcheck_push_result testrepo $old_commit heads/master\n+\tcheck_push_result testrepo $old_commit heads/main\n '\n \n test_expect_success 'push updates local refs' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child &&\n \t(\n \t\tcd child &&\n-\t\tgit pull .. master &&\n+\t\tgit pull .. main &&\n \t\tgit push &&\n-\t\ttest $(git rev-parse master) = \\\n-\t\t\t$(git rev-parse remotes/origin/master)\n+\t\ttest $(git rev-parse main) = \\\n+\t\t\t$(git rev-parse remotes/origin/main)\n \t)\n \n '\n \n test_expect_success 'push updates up-to-date local refs' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child1 &&\n \tmk_child testrepo child2 &&\n-\t(cd child1 && git pull .. master && git push) &&\n+\t(cd child1 && git pull .. main && git push) &&\n \t(\n \t\tcd child2 &&\n-\t\tgit pull ../child1 master &&\n+\t\tgit pull ../child1 main &&\n \t\tgit push &&\n-\t\ttest $(git rev-parse master) = \\\n-\t\t\t$(git rev-parse remotes/origin/master)\n+\t\ttest $(git rev-parse main) = \\\n+\t\t\t$(git rev-parse remotes/origin/main)\n \t)\n \n '\n \n test_expect_success 'push preserves up-to-date packed refs' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child &&\n \t(\n \t\tcd child &&\n \t\tgit push &&\n-\t\t! test -f .git/refs/remotes/origin/master\n+\t\t! test -f .git/refs/remotes/origin/main\n \t)\n \n '\n \n test_expect_success 'push does not update local refs on failure' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child &&\n \tmkdir testrepo/.git/hooks &&\n \techo \"#!/no/frobnication/today\" >testrepo/.git/hooks/pre-receive &&\n \tchmod +x testrepo/.git/hooks/pre-receive &&\n \t(\n \t\tcd child &&\n-\t\tgit pull .. master &&\n+\t\tgit pull .. main &&\n \t\ttest_must_fail git push &&\n-\t\ttest $(git rev-parse master) != \\\n-\t\t\t$(git rev-parse remotes/origin/master)\n+\t\ttest $(git rev-parse main) != \\\n+\t\t\t$(git rev-parse remotes/origin/main)\n \t)\n \n '\n \n test_expect_success 'allow deleting an invalid remote ref' '\n \n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -f testrepo/.git/objects/??/* &&\n-\tgit push testrepo :refs/heads/master &&\n-\t(cd testrepo && test_must_fail git rev-parse --verify refs/heads/master)\n+\tgit push testrepo :refs/heads/main &&\n+\t(cd testrepo && test_must_fail git rev-parse --verify refs/heads/main)\n \n '\n \n test_expect_success 'pushing valid refs triggers post-receive and post-update hooks' '\n-\tmk_test_with_hooks testrepo heads/master heads/next &&\n-\torgmaster=$(cd testrepo && git show-ref -s --verify refs/heads/master) &&\n-\tnewmaster=$(git show-ref -s --verify refs/heads/master) &&\n+\tmk_test_with_hooks testrepo heads/main heads/next &&\n+\torgmain=$(cd testrepo && git show-ref -s --verify refs/heads/main) &&\n+\tnewmain=$(git show-ref -s --verify refs/heads/main) &&\n \torgnext=$(cd testrepo && git show-ref -s --verify refs/heads/next) &&\n \tnewnext=$ZERO_OID &&\n-\tgit push testrepo refs/heads/master:refs/heads/master :refs/heads/next &&\n+\tgit push testrepo refs/heads/main:refs/heads/main :refs/heads/next &&\n \t(\n \t\tcd testrepo/.git &&\n \t\tcat >pre-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\t$orgnext $newnext refs/heads/next\n \t\tEOF\n \n \t\tcat >update.expect <<-EOF &&\n-\t\trefs/heads/master $orgmaster $newmaster\n+\t\trefs/heads/main $orgmain $newmain\n \t\trefs/heads/next $orgnext $newnext\n \t\tEOF\n \n \t\tcat >post-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\t$orgnext $newnext refs/heads/next\n \t\tEOF\n \n \t\tcat >post-update.expect <<-EOF &&\n-\t\trefs/heads/master\n+\t\trefs/heads/main\n \t\trefs/heads/next\n \t\tEOF\n \n@@ -669,25 +669,25 @@ test_expect_success 'pushing valid refs triggers post-receive and post-update ho\n '\n \n test_expect_success 'deleting dangling ref triggers hooks with correct args' '\n-\tmk_test_with_hooks testrepo heads/master &&\n+\tmk_test_with_hooks testrepo heads/main &&\n \trm -f testrepo/.git/objects/??/* &&\n-\tgit push testrepo :refs/heads/master &&\n+\tgit push testrepo :refs/heads/main &&\n \t(\n \t\tcd testrepo/.git &&\n \t\tcat >pre-receive.expect <<-EOF &&\n-\t\t$ZERO_OID $ZERO_OID refs/heads/master\n+\t\t$ZERO_OID $ZERO_OID refs/heads/main\n \t\tEOF\n \n \t\tcat >update.expect <<-EOF &&\n-\t\trefs/heads/master $ZERO_OID $ZERO_OID\n+\t\trefs/heads/main $ZERO_OID $ZERO_OID\n \t\tEOF\n \n \t\tcat >post-receive.expect <<-EOF &&\n-\t\t$ZERO_OID $ZERO_OID refs/heads/master\n+\t\t$ZERO_OID $ZERO_OID refs/heads/main\n \t\tEOF\n \n \t\tcat >post-update.expect <<-EOF &&\n-\t\trefs/heads/master\n+\t\trefs/heads/main\n \t\tEOF\n \n \t\ttest_cmp pre-receive.expect pre-receive.actual &&\n@@ -698,28 +698,28 @@ test_expect_success 'deleting dangling ref triggers hooks with correct args' '\n '\n \n test_expect_success 'deletion of a non-existent ref is not fed to post-receive and post-update hooks' '\n-\tmk_test_with_hooks testrepo heads/master &&\n-\torgmaster=$(cd testrepo && git show-ref -s --verify refs/heads/master) &&\n-\tnewmaster=$(git show-ref -s --verify refs/heads/master) &&\n-\tgit push testrepo master :refs/heads/nonexistent &&\n+\tmk_test_with_hooks testrepo heads/main &&\n+\torgmain=$(cd testrepo && git show-ref -s --verify refs/heads/main) &&\n+\tnewmain=$(git show-ref -s --verify refs/heads/main) &&\n+\tgit push testrepo main :refs/heads/nonexistent &&\n \t(\n \t\tcd testrepo/.git &&\n \t\tcat >pre-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\t$ZERO_OID $ZERO_OID refs/heads/nonexistent\n \t\tEOF\n \n \t\tcat >update.expect <<-EOF &&\n-\t\trefs/heads/master $orgmaster $newmaster\n+\t\trefs/heads/main $orgmain $newmain\n \t\trefs/heads/nonexistent $ZERO_OID $ZERO_OID\n \t\tEOF\n \n \t\tcat >post-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\tEOF\n \n \t\tcat >post-update.expect <<-EOF &&\n-\t\trefs/heads/master\n+\t\trefs/heads/main\n \t\tEOF\n \n \t\ttest_cmp pre-receive.expect pre-receive.actual &&\n@@ -730,7 +730,7 @@ test_expect_success 'deletion of a non-existent ref is not fed to post-receive a\n '\n \n test_expect_success 'deletion of a non-existent ref alone does trigger post-receive and post-update hooks' '\n-\tmk_test_with_hooks testrepo heads/master &&\n+\tmk_test_with_hooks testrepo heads/main &&\n \tgit push testrepo :refs/heads/nonexistent &&\n \t(\n \t\tcd testrepo/.git &&\n@@ -750,40 +750,40 @@ test_expect_success 'deletion of a non-existent ref alone does trigger post-rece\n '\n \n test_expect_success 'mixed ref updates, deletes, invalid deletes trigger hooks with correct input' '\n-\tmk_test_with_hooks testrepo heads/master heads/next heads/seen &&\n-\torgmaster=$(cd testrepo && git show-ref -s --verify refs/heads/master) &&\n-\tnewmaster=$(git show-ref -s --verify refs/heads/master) &&\n+\tmk_test_with_hooks testrepo heads/main heads/next heads/seen &&\n+\torgmain=$(cd testrepo && git show-ref -s --verify refs/heads/main) &&\n+\tnewmain=$(git show-ref -s --verify refs/heads/main) &&\n \torgnext=$(cd testrepo && git show-ref -s --verify refs/heads/next) &&\n \tnewnext=$ZERO_OID &&\n \torgseen=$(cd testrepo && git show-ref -s --verify refs/heads/seen) &&\n-\tnewseen=$(git show-ref -s --verify refs/heads/master) &&\n-\tgit push testrepo refs/heads/master:refs/heads/master \\\n-\t    refs/heads/master:refs/heads/seen :refs/heads/next \\\n+\tnewseen=$(git show-ref -s --verify refs/heads/main) &&\n+\tgit push testrepo refs/heads/main:refs/heads/main \\\n+\t    refs/heads/main:refs/heads/seen :refs/heads/next \\\n \t    :refs/heads/nonexistent &&\n \t(\n \t\tcd testrepo/.git &&\n \t\tcat >pre-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\t$orgnext $newnext refs/heads/next\n \t\t$orgseen $newseen refs/heads/seen\n \t\t$ZERO_OID $ZERO_OID refs/heads/nonexistent\n \t\tEOF\n \n \t\tcat >update.expect <<-EOF &&\n-\t\trefs/heads/master $orgmaster $newmaster\n+\t\trefs/heads/main $orgmain $newmain\n \t\trefs/heads/next $orgnext $newnext\n \t\trefs/heads/seen $orgseen $newseen\n \t\trefs/heads/nonexistent $ZERO_OID $ZERO_OID\n \t\tEOF\n \n \t\tcat >post-receive.expect <<-EOF &&\n-\t\t$orgmaster $newmaster refs/heads/master\n+\t\t$orgmain $newmain refs/heads/main\n \t\t$orgnext $newnext refs/heads/next\n \t\t$orgseen $newseen refs/heads/seen\n \t\tEOF\n \n \t\tcat >post-update.expect <<-EOF &&\n-\t\trefs/heads/master\n+\t\trefs/heads/main\n \t\trefs/heads/next\n \t\trefs/heads/seen\n \t\tEOF\n@@ -796,15 +796,15 @@ test_expect_success 'mixed ref updates, deletes, invalid deletes trigger hooks w\n '\n \n test_expect_success 'allow deleting a ref using --delete' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \t(cd testrepo && git config receive.denyDeleteCurrent warn) &&\n-\tgit push testrepo --delete master &&\n-\t(cd testrepo && test_must_fail git rev-parse --verify refs/heads/master)\n+\tgit push testrepo --delete main &&\n+\t(cd testrepo && test_must_fail git rev-parse --verify refs/heads/main)\n '\n \n test_expect_success 'allow deleting a tag using --delete' '\n-\tmk_test testrepo heads/master &&\n-\tgit tag -a -m dummy_message deltag heads/master &&\n+\tmk_test testrepo heads/main &&\n+\tgit tag -a -m dummy_message deltag heads/main &&\n \tgit push testrepo --tags &&\n \t(cd testrepo && git rev-parse --verify -q refs/tags/deltag) &&\n \tgit push testrepo --delete tag deltag &&\n@@ -812,56 +812,56 @@ test_expect_success 'allow deleting a tag using --delete' '\n '\n \n test_expect_success 'push --delete without args aborts' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \ttest_must_fail git push testrepo --delete\n '\n \n test_expect_success 'push --delete refuses src:dest refspecs' '\n-\tmk_test testrepo heads/master &&\n-\ttest_must_fail git push testrepo --delete master:foo\n+\tmk_test testrepo heads/main &&\n+\ttest_must_fail git push testrepo --delete main:foo\n '\n \n test_expect_success 'warn on push to HEAD of non-bare repository' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit config receive.denyCurrentBranch warn\n \t) &&\n-\tgit push testrepo master 2>stderr &&\n+\tgit push testrepo main 2>stderr &&\n \tgrep \"warning: updating the current branch\" stderr\n '\n \n test_expect_success 'deny push to HEAD of non-bare repository' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit config receive.denyCurrentBranch true\n \t) &&\n-\ttest_must_fail git push testrepo master\n+\ttest_must_fail git push testrepo main\n '\n \n test_expect_success 'allow push to HEAD of bare repository (bare)' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit config receive.denyCurrentBranch true &&\n \t\tgit config core.bare true\n \t) &&\n-\tgit push testrepo master 2>stderr &&\n+\tgit push testrepo main 2>stderr &&\n \t! grep \"warning: updating the current branch\" stderr\n '\n \n test_expect_success 'allow push to HEAD of non-bare repository (config)' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit config receive.denyCurrentBranch false\n \t) &&\n-\tgit push testrepo master 2>stderr &&\n+\tgit push testrepo main 2>stderr &&\n \t! grep \"warning: updating the current branch\" stderr\n '\n \n@@ -877,7 +877,7 @@ test_expect_success 'fetch with branches' '\n \t\tgit for-each-ref refs/heads >actual &&\n \t\ttest_cmp expect actual\n \t) &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'fetch with branches containing #' '\n@@ -890,7 +890,7 @@ test_expect_success 'fetch with branches containing #' '\n \t\tgit for-each-ref refs/heads >actual &&\n \t\ttest_cmp expect actual\n \t) &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'push with branches' '\n@@ -900,7 +900,7 @@ test_expect_success 'push with branches' '\n \tgit push branch1 &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_first_commit commit\trefs/heads/master\" >expect &&\n+\t\techo \"$the_first_commit commit\trefs/heads/main\" >expect &&\n \t\tgit for-each-ref refs/heads >actual &&\n \t\ttest_cmp expect actual\n \t)\n@@ -916,11 +916,11 @@ test_expect_success 'push with branches containing #' '\n \t\tgit for-each-ref refs/heads >actual &&\n \t\ttest_cmp expect actual\n \t) &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'push into aliased refs (consistent)' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child1 &&\n \tmk_child testrepo child2 &&\n \t(\n@@ -942,7 +942,7 @@ test_expect_success 'push into aliased refs (consistent)' '\n '\n \n test_expect_success 'push into aliased refs (inconsistent)' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \tmk_child testrepo child1 &&\n \tmk_child testrepo child2 &&\n \t(\n@@ -973,7 +973,7 @@ test_force_push_tag () {\n \ttag_args=$2\n \n \ttest_expect_success \"force pushing required to update $tag_type_description\" \"\n-\t\tmk_test testrepo heads/master &&\n+\t\tmk_test testrepo heads/main &&\n \t\tmk_child testrepo child1 &&\n \t\tmk_child testrepo child2 &&\n \t\t(\n@@ -1019,7 +1019,7 @@ test_force_fetch_tag () {\n \ttag_args=$2\n \n \ttest_expect_success \"fetch will not clobber an existing $tag_type_description without --force\" \"\n-\t\tmk_test testrepo heads/master &&\n+\t\tmk_test testrepo heads/main &&\n \t\tmk_child testrepo child1 &&\n \t\tmk_child testrepo child2 &&\n \t\t(\n@@ -1042,12 +1042,12 @@ test_force_fetch_tag \"annotated tag\" \"-f -a -m'tag message'\"\n test_expect_success 'push --porcelain' '\n \tmk_empty testrepo &&\n \techo >.git/foo  \"To testrepo\" &&\n-\techo >>.git/foo \"*\trefs/heads/master:refs/remotes/origin/master\t[new reference]\"  &&\n+\techo >>.git/foo \"*\trefs/heads/main:refs/remotes/origin/main\t[new reference]\"  &&\n \techo >>.git/foo \"Done\" &&\n-\tgit push >.git/bar --porcelain  testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push >.git/bar --porcelain  testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(\n \t\tcd testrepo &&\n-\t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n+\t\techo \"$the_commit commit\trefs/remotes/origin/main\" >expect &&\n \t\tgit for-each-ref refs/remotes/origin >actual &&\n \t\ttest_cmp expect actual\n \t) &&\n@@ -1056,52 +1056,52 @@ test_expect_success 'push --porcelain' '\n \n test_expect_success 'push --porcelain bad url' '\n \tmk_empty testrepo &&\n-\ttest_must_fail git push >.git/bar --porcelain asdfasdfasd refs/heads/master:refs/remotes/origin/master &&\n+\ttest_must_fail git push >.git/bar --porcelain asdfasdfasd refs/heads/main:refs/remotes/origin/main &&\n \t! grep -q Done .git/bar\n '\n \n test_expect_success 'push --porcelain rejected' '\n \tmk_empty testrepo &&\n-\tgit push testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(cd testrepo &&\n-\t\tgit reset --hard origin/master^ &&\n+\t\tgit reset --hard origin/main^ &&\n \t\tgit config receive.denyCurrentBranch true) &&\n \n \techo >.git/foo  \"To testrepo\"  &&\n-\techo >>.git/foo \"!\trefs/heads/master:refs/heads/master\t[remote rejected] (branch is currently checked out)\" &&\n+\techo >>.git/foo \"!\trefs/heads/main:refs/heads/main\t[remote rejected] (branch is currently checked out)\" &&\n \techo >>.git/foo \"Done\" &&\n \n-\ttest_must_fail git push >.git/bar --porcelain  testrepo refs/heads/master:refs/heads/master &&\n+\ttest_must_fail git push >.git/bar --porcelain  testrepo refs/heads/main:refs/heads/main &&\n \ttest_cmp .git/foo .git/bar\n '\n \n test_expect_success 'push --porcelain --dry-run rejected' '\n \tmk_empty testrepo &&\n-\tgit push testrepo refs/heads/master:refs/remotes/origin/master &&\n+\tgit push testrepo refs/heads/main:refs/remotes/origin/main &&\n \t(cd testrepo &&\n-\t\tgit reset --hard origin/master &&\n+\t\tgit reset --hard origin/main &&\n \t\tgit config receive.denyCurrentBranch true) &&\n \n \techo >.git/foo  \"To testrepo\"  &&\n-\techo >>.git/foo \"!\trefs/heads/master^:refs/heads/master\t[rejected] (non-fast-forward)\" &&\n+\techo >>.git/foo \"!\trefs/heads/main^:refs/heads/main\t[rejected] (non-fast-forward)\" &&\n \techo >>.git/foo \"Done\" &&\n \n-\ttest_must_fail git push >.git/bar --porcelain  --dry-run testrepo refs/heads/master^:refs/heads/master &&\n+\ttest_must_fail git push >.git/bar --porcelain  --dry-run testrepo refs/heads/main^:refs/heads/main &&\n \ttest_cmp .git/foo .git/bar\n '\n \n test_expect_success 'push --prune' '\n-\tmk_test testrepo heads/master heads/second heads/foo heads/bar &&\n+\tmk_test testrepo heads/main heads/second heads/foo heads/bar &&\n \tgit push --prune testrepo : &&\n-\tcheck_push_result testrepo $the_commit heads/master &&\n+\tcheck_push_result testrepo $the_commit heads/main &&\n \tcheck_push_result testrepo $the_first_commit heads/second &&\n \t! check_push_result testrepo $the_first_commit heads/foo heads/bar\n '\n \n test_expect_success 'push --prune refspec' '\n-\tmk_test testrepo tmp/master tmp/second tmp/foo tmp/bar &&\n+\tmk_test testrepo tmp/main tmp/second tmp/foo tmp/bar &&\n \tgit push --prune testrepo \"refs/heads/*:refs/tmp/*\" &&\n-\tcheck_push_result testrepo $the_commit tmp/master &&\n+\tcheck_push_result testrepo $the_commit tmp/main &&\n \tcheck_push_result testrepo $the_first_commit tmp/second &&\n \t! check_push_result testrepo $the_first_commit tmp/foo tmp/bar\n '\n@@ -1109,18 +1109,18 @@ test_expect_success 'push --prune refspec' '\n for configsection in transfer receive\n do\n \ttest_expect_success \"push to update a ref hidden by $configsection.hiderefs\" '\n-\t\tmk_test testrepo heads/master hidden/one hidden/two hidden/three &&\n+\t\tmk_test testrepo heads/main hidden/one hidden/two hidden/three &&\n \t\t(\n \t\t\tcd testrepo &&\n \t\t\tgit config $configsection.hiderefs refs/hidden\n \t\t) &&\n \n \t\t# push to unhidden ref succeeds normally\n-\t\tgit push testrepo master:refs/heads/master &&\n-\t\tcheck_push_result testrepo $the_commit heads/master &&\n+\t\tgit push testrepo main:refs/heads/main &&\n+\t\tcheck_push_result testrepo $the_commit heads/main &&\n \n \t\t# push to update a hidden ref should fail\n-\t\ttest_must_fail git push testrepo master:refs/hidden/one &&\n+\t\ttest_must_fail git push testrepo main:refs/hidden/one &&\n \t\tcheck_push_result testrepo $the_first_commit hidden/one &&\n \n \t\t# push to delete a hidden ref should fail\n@@ -1134,8 +1134,8 @@ do\n done\n \n test_expect_success 'fetch exact SHA1' '\n-\tmk_test testrepo heads/master hidden/one &&\n-\tgit push testrepo master:refs/hidden/one &&\n+\tmk_test testrepo heads/main hidden/one &&\n+\tgit push testrepo main:refs/hidden/one &&\n \t(\n \t\tcd testrepo &&\n \t\tgit config transfer.hiderefs refs/hidden\n@@ -1166,7 +1166,7 @@ test_expect_success 'fetch exact SHA1' '\n \t\t\tgit config uploadpack.allowtipsha1inwant true\n \t\t) &&\n \n-\t\tgit fetch -v ../testrepo $the_commit:refs/heads/copy master:refs/heads/extra &&\n+\t\tgit fetch -v ../testrepo $the_commit:refs/heads/copy main:refs/heads/extra &&\n \t\tcat >expect <<-EOF &&\n \t\t$the_commit\n \t\t$the_first_commit\n@@ -1180,8 +1180,8 @@ test_expect_success 'fetch exact SHA1' '\n '\n \n test_expect_success 'fetch exact SHA1 in protocol v2' '\n-\tmk_test testrepo heads/master hidden/one &&\n-\tgit push testrepo master:refs/hidden/one &&\n+\tmk_test testrepo heads/main hidden/one &&\n+\tgit push testrepo main:refs/hidden/one &&\n \tgit -C testrepo config transfer.hiderefs refs/hidden &&\n \tcheck_push_result testrepo $the_commit hidden/one &&\n \n@@ -1263,17 +1263,17 @@ do\n done\n \n test_expect_success 'fetch follows tags by default' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit tag -m \"annotated\" tag &&\n \t\tgit for-each-ref >tmp1 &&\n \t\t(\n \t\t\tcat tmp1\n-\t\t\tsed -n \"s|refs/heads/master$|refs/remotes/origin/master|p\" tmp1\n+\t\t\tsed -n \"s|refs/heads/main$|refs/remotes/origin/main|p\" tmp1\n \t\t) |\n \t\tsort -k 3 >../expect\n \t) &&\n@@ -1281,8 +1281,8 @@ test_expect_success 'fetch follows tags by default' '\n \t(\n \t\tcd dst &&\n \t\tgit remote add origin ../src &&\n-\t\tgit config branch.master.remote origin &&\n-\t\tgit config branch.master.merge refs/heads/master &&\n+\t\tgit config branch.main.remote origin &&\n+\t\tgit config branch.main.merge refs/heads/main &&\n \t\tgit pull &&\n \t\tgit for-each-ref >../actual\n \t) &&\n@@ -1301,74 +1301,74 @@ test_expect_success 'peeled advertisements are not considered ref tips' '\n '\n \n test_expect_success 'pushing a specific ref applies remote.$name.push as refmap' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \tgit init --bare dst &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit branch next &&\n \t\tgit config remote.dst.url ../dst &&\n \t\tgit config remote.dst.push \"+refs/heads/*:refs/remotes/src/*\" &&\n-\t\tgit push dst master &&\n-\t\tgit show-ref refs/heads/master |\n+\t\tgit push dst main &&\n+\t\tgit show-ref refs/heads/main |\n \t\tsed -e \"s|refs/heads/|refs/remotes/src/|\" >../dst/expect\n \t) &&\n \t(\n \t\tcd dst &&\n \t\ttest_must_fail git show-ref refs/heads/next &&\n-\t\ttest_must_fail git show-ref refs/heads/master &&\n-\t\tgit show-ref refs/remotes/src/master >actual\n+\t\ttest_must_fail git show-ref refs/heads/main &&\n+\t\tgit show-ref refs/remotes/src/main >actual\n \t) &&\n \ttest_cmp dst/expect dst/actual\n '\n \n test_expect_success 'with no remote.$name.push, it is not used as refmap' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \tgit init --bare dst &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit branch next &&\n \t\tgit config remote.dst.url ../dst &&\n \t\tgit config push.default matching &&\n-\t\tgit push dst master &&\n-\t\tgit show-ref refs/heads/master >../dst/expect\n+\t\tgit push dst main &&\n+\t\tgit show-ref refs/heads/main >../dst/expect\n \t) &&\n \t(\n \t\tcd dst &&\n \t\ttest_must_fail git show-ref refs/heads/next &&\n-\t\tgit show-ref refs/heads/master >actual\n+\t\tgit show-ref refs/heads/main >actual\n \t) &&\n \ttest_cmp dst/expect dst/actual\n '\n \n test_expect_success 'with no remote.$name.push, upstream mapping is used' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \tgit init --bare dst &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit branch next &&\n \t\tgit config remote.dst.url ../dst &&\n \t\tgit config remote.dst.fetch \"+refs/heads/*:refs/remotes/dst/*\" &&\n \t\tgit config push.default upstream &&\n \n-\t\tgit config branch.master.merge refs/heads/trunk &&\n-\t\tgit config branch.master.remote dst &&\n+\t\tgit config branch.main.merge refs/heads/trunk &&\n+\t\tgit config branch.main.remote dst &&\n \n-\t\tgit push dst master &&\n-\t\tgit show-ref refs/heads/master |\n-\t\tsed -e \"s|refs/heads/master|refs/heads/trunk|\" >../dst/expect\n+\t\tgit push dst main &&\n+\t\tgit show-ref refs/heads/main |\n+\t\tsed -e \"s|refs/heads/main|refs/heads/trunk|\" >../dst/expect\n \t) &&\n \t(\n \t\tcd dst &&\n-\t\ttest_must_fail git show-ref refs/heads/master &&\n+\t\ttest_must_fail git show-ref refs/heads/main &&\n \t\ttest_must_fail git show-ref refs/heads/next &&\n \t\tgit show-ref refs/heads/trunk >actual\n \t) &&\n@@ -1376,20 +1376,20 @@ test_expect_success 'with no remote.$name.push, upstream mapping is used' '\n '\n \n test_expect_success 'push does not follow tags by default' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \tgit init --bare dst &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit tag -m \"annotated\" tag &&\n \t\tgit checkout -b another &&\n \t\tgit commit --allow-empty -m \"future commit\" &&\n \t\tgit tag -m \"future\" future &&\n-\t\tgit checkout master &&\n-\t\tgit for-each-ref refs/heads/master >../expect &&\n-\t\tgit push ../dst master\n+\t\tgit checkout main &&\n+\t\tgit for-each-ref refs/heads/main >../expect &&\n+\t\tgit push ../dst main\n \t) &&\n \t(\n \t\tcd dst &&\n@@ -1399,20 +1399,20 @@ test_expect_success 'push does not follow tags by default' '\n '\n \n test_expect_success 'push --follow-tags only pushes relevant tags' '\n-\tmk_test testrepo heads/master &&\n+\tmk_test testrepo heads/main &&\n \trm -fr src dst &&\n \tgit init src &&\n \tgit init --bare dst &&\n \t(\n \t\tcd src &&\n-\t\tgit pull ../testrepo master &&\n+\t\tgit pull ../testrepo main &&\n \t\tgit tag -m \"annotated\" tag &&\n \t\tgit checkout -b another &&\n \t\tgit commit --allow-empty -m \"future commit\" &&\n \t\tgit tag -m \"future\" future &&\n-\t\tgit checkout master &&\n-\t\tgit for-each-ref refs/heads/master refs/tags/tag >../expect &&\n-\t\tgit push --follow-tags ../dst master\n+\t\tgit checkout main &&\n+\t\tgit for-each-ref refs/heads/main refs/tags/tag >../expect &&\n+\t\tgit push --follow-tags ../dst main\n \t) &&\n \t(\n \t\tcd dst &&\n@@ -1430,12 +1430,12 @@ EOF\n \tgit commit -am initial &&\n \tgit init no-thin &&\n \tgit --git-dir=no-thin/.git config receive.unpacklimit 0 &&\n-\tgit push no-thin/.git refs/heads/master:refs/heads/foo &&\n+\tgit push no-thin/.git refs/heads/main:refs/heads/foo &&\n \techo modified >> path1 &&\n \tgit commit -am modified &&\n \tgit repack -adf &&\n \trcvpck=\"git receive-pack --reject-thin-pack-for-testing\" &&\n-\tgit push --no-thin --receive-pack=\"$rcvpck\" no-thin/.git refs/heads/master:refs/heads/foo\n+\tgit push --no-thin --receive-pack=\"$rcvpck\" no-thin/.git refs/heads/main:refs/heads/foo\n '\n \n test_expect_success 'pushing a tag pushes the tagged object' '\n@@ -1458,12 +1458,12 @@ test_expect_success 'push into bare respects core.logallrefupdates' '\n \n \t# double push to test both with and without\n \t# the actual pack transfer\n-\tgit push dst.git master:one &&\n+\tgit push dst.git main:one &&\n \techo \"one@{0} push\" >expect &&\n \tgit -C dst.git log -g --format=\"%gd %gs\" one >actual &&\n \ttest_cmp expect actual &&\n \n-\tgit push dst.git master:two &&\n+\tgit push dst.git main:two &&\n \techo \"two@{0} push\" >expect &&\n \tgit -C dst.git log -g --format=\"%gd %gs\" two >actual &&\n \ttest_cmp expect actual\n@@ -1478,20 +1478,20 @@ test_expect_success 'fetch into bare respects core.logallrefupdates' '\n \n \t\t# as above, we double-fetch to test both\n \t\t# with and without pack transfer\n-\t\tgit fetch .. master:one &&\n-\t\techo \"one@{0} fetch .. master:one: storing head\" >expect &&\n+\t\tgit fetch .. main:one &&\n+\t\techo \"one@{0} fetch .. main:one: storing head\" >expect &&\n \t\tgit log -g --format=\"%gd %gs\" one >actual &&\n \t\ttest_cmp expect actual &&\n \n-\t\tgit fetch .. master:two &&\n-\t\techo \"two@{0} fetch .. master:two: storing head\" >expect &&\n+\t\tgit fetch .. main:two &&\n+\t\techo \"two@{0} fetch .. main:two: storing head\" >expect &&\n \t\tgit log -g --format=\"%gd %gs\" two >actual &&\n \t\ttest_cmp expect actual\n \t)\n '\n \n test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n-\tgit push testrepo master &&\n+\tgit push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\tgit reset --hard &&\n@@ -1500,7 +1500,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \ttest_commit third path2 &&\n \n \t# Try pushing into a repository with pristine working tree\n-\tgit push testrepo master &&\n+\tgit push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\tgit update-index -q --refresh &&\n@@ -1517,7 +1517,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\ttest $(git -C .. rev-parse HEAD^) = $(git rev-parse HEAD) &&\n \t\ttest-tool chmtime +100 path1\n \t) &&\n-\tgit push testrepo master &&\n+\tgit push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\tgit update-index -q --refresh &&\n@@ -1537,7 +1537,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\tcd testrepo &&\n \t\techo changed >path1\n \t) &&\n-\ttest_must_fail git push testrepo master &&\n+\ttest_must_fail git push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest $(git -C .. rev-parse HEAD^) = $(git rev-parse HEAD) &&\n@@ -1551,7 +1551,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\techo changed >path1 &&\n \t\tgit add path1\n \t) &&\n-\ttest_must_fail git push testrepo master &&\n+\ttest_must_fail git push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest $(git -C .. rev-parse HEAD^) = $(git rev-parse HEAD) &&\n@@ -1568,7 +1568,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\tgit reset --hard &&\n \t\techo changed >path3\n \t) &&\n-\ttest_must_fail git push testrepo master &&\n+\ttest_must_fail git push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest $(git -C .. rev-parse HEAD^^) = $(git rev-parse HEAD) &&\n@@ -1584,7 +1584,7 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\techo fifth >path3 &&\n \t\tgit add path3\n \t) &&\n-\ttest_must_fail git push testrepo master &&\n+\ttest_must_fail git push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest $(git -C .. rev-parse HEAD^^) = $(git rev-parse HEAD) &&\n@@ -1599,17 +1599,17 @@ test_expect_success 'receive.denyCurrentBranch = updateInstead' '\n \t\tcd void &&\n \t\tgit config receive.denyCurrentBranch updateInstead\n \t) &&\n-\tgit push void master &&\n+\tgit push void main &&\n \t(\n \t\tcd void &&\n-\t\ttest $(git -C .. rev-parse master) = $(git rev-parse HEAD) &&\n+\t\ttest $(git -C .. rev-parse main) = $(git rev-parse HEAD) &&\n \t\tgit diff --quiet &&\n \t\tgit diff --cached --quiet\n \t) &&\n \n \t# (6) updateInstead intervened by fast-forward check\n-\ttest_must_fail git push void master^:master &&\n-\ttest $(git -C void rev-parse HEAD) = $(git rev-parse master) &&\n+\ttest_must_fail git push void main^:main &&\n+\ttest $(git -C void rev-parse HEAD) = $(git rev-parse main) &&\n \tgit -C void diff --quiet &&\n \tgit -C void diff --cached --quiet\n '\n@@ -1619,7 +1619,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '\n \tgit init testrepo &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit pull .. master &&\n+\t\tgit pull .. main &&\n \t\tgit reset --hard HEAD^^ &&\n \t\tgit tag initial &&\n \t\tgit config receive.denyCurrentBranch updateInstead &&\n@@ -1637,7 +1637,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '\n \t) &&\n \n \t# Try pushing into a pristine\n-\tgit push testrepo master &&\n+\tgit push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\tgit diff --quiet &&\n@@ -1651,7 +1651,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '\n \t\tgit reset --hard initial &&\n \t\techo conflicting >path2\n \t) &&\n-\ttest_must_fail git push testrepo master &&\n+\ttest_must_fail git push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest $(git rev-parse initial) = $(git rev-parse HEAD) &&\n@@ -1667,7 +1667,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '\n \t\techo irrelevant >path5 &&\n \t\tgit add path5\n \t) &&\n-\tgit push testrepo master &&\n+\tgit push testrepo main &&\n \t(\n \t\tcd testrepo &&\n \t\ttest \"$(cat path1)\" = unrelated &&\n@@ -1707,7 +1707,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '\n \t\tEOF\n \t) &&\n \n-\tgit push void master &&\n+\tgit push void main &&\n \t(\n \t\tcd void &&\n \t\tgit diff --quiet &&\ndiff --git a/t/t5517-push-mirror.sh b/t/t5517-push-mirror.sh\nindex aa6405b452..a448e169bd 100755\n--- a/t/t5517-push-mirror.sh\n+++ b/t/t5517-push-mirror.sh\n@@ -2,7 +2,7 @@\n \n test_description='pushing to a mirror repository'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -18,16 +18,16 @@ invert () {\n }\n \n mk_repo_pair () {\n-\trm -rf master mirror &&\n+\trm -rf main mirror &&\n \tmkdir mirror &&\n \t(\n \t\tcd mirror &&\n \t\tgit init &&\n \t\tgit config receive.denyCurrentBranch warn\n \t) &&\n-\tmkdir master &&\n+\tmkdir main &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\tgit init &&\n \t\tgit remote add $1 up ../mirror\n \t)\n@@ -39,13 +39,13 @@ test_expect_success 'push mirror creates new branches' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/heads/master) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/heads/main) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/heads/main) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -53,15 +53,15 @@ test_expect_success 'push mirror updates existing branches' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit push --mirror up &&\n \t\techo two >foo && git add foo && git commit -m two &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/heads/master) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/heads/main) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/heads/main) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -69,7 +69,7 @@ test_expect_success 'push mirror force updates existing branches' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit push --mirror up &&\n \t\techo two >foo && git add foo && git commit -m two &&\n@@ -77,9 +77,9 @@ test_expect_success 'push mirror force updates existing branches' '\n \t\tgit reset --hard HEAD^ &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/heads/master) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/heads/main) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/heads/main) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -87,9 +87,9 @@ test_expect_success 'push mirror removes branches' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit branch remove master &&\n+\t\tgit branch remove main &&\n \t\tgit push --mirror up &&\n \t\tgit branch -D remove &&\n \t\tgit push --mirror up\n@@ -105,21 +105,21 @@ test_expect_success 'push mirror adds, updates and removes branches together' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit branch remove master &&\n+\t\tgit branch remove main &&\n \t\tgit push --mirror up &&\n \t\tgit branch -D remove &&\n-\t\tgit branch add master &&\n+\t\tgit branch add main &&\n \t\techo two >foo && git add foo && git commit -m two &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/heads/master) &&\n-\tmaster_add=$(cd master && git show-ref -s --verify refs/heads/add) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&\n+\tmain_main=$(cd main && git show-ref -s --verify refs/heads/main) &&\n+\tmain_add=$(cd main && git show-ref -s --verify refs/heads/add) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/heads/main) &&\n \tmirror_add=$(cd mirror && git show-ref -s --verify refs/heads/add) &&\n-\ttest \"$master_master\" = \"$mirror_master\" &&\n-\ttest \"$master_add\" = \"$mirror_add\" &&\n+\ttest \"$main_main\" = \"$mirror_main\" &&\n+\ttest \"$main_add\" = \"$mirror_add\" &&\n \t(\n \t\tcd mirror &&\n \t\tinvert git show-ref -s --verify refs/heads/remove\n@@ -133,14 +133,14 @@ test_expect_success 'push mirror creates new tags' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/tags/tmain) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/tags/tmain) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -148,17 +148,17 @@ test_expect_success 'push mirror updates existing tags' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up &&\n \t\techo two >foo && git add foo && git commit -m two &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/tags/tmain) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/tags/tmain) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -166,20 +166,20 @@ test_expect_success 'push mirror force updates existing tags' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up &&\n \t\techo two >foo && git add foo && git commit -m two &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up &&\n \t\tgit reset --hard HEAD^ &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&\n-\ttest \"$master_master\" = \"$mirror_master\"\n+\tmain_main=$(cd main && git show-ref -s --verify refs/tags/tmain) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/tags/tmain) &&\n+\ttest \"$main_main\" = \"$mirror_main\"\n \n '\n \n@@ -187,9 +187,9 @@ test_expect_success 'push mirror removes tags' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit tag -f tremove master &&\n+\t\tgit tag -f tremove main &&\n \t\tgit push --mirror up &&\n \t\tgit tag -d tremove &&\n \t\tgit push --mirror up\n@@ -205,23 +205,23 @@ test_expect_success 'push mirror adds, updates and removes tags together' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit tag -f tmaster master &&\n-\t\tgit tag -f tremove master &&\n+\t\tgit tag -f tmain main &&\n+\t\tgit tag -f tremove main &&\n \t\tgit push --mirror up &&\n \t\tgit tag -d tremove &&\n-\t\tgit tag tadd master &&\n+\t\tgit tag tadd main &&\n \t\techo two >foo && git add foo && git commit -m two &&\n-\t\tgit tag -f tmaster master &&\n+\t\tgit tag -f tmain main &&\n \t\tgit push --mirror up\n \t) &&\n-\tmaster_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&\n-\tmaster_add=$(cd master && git show-ref -s --verify refs/tags/tadd) &&\n-\tmirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&\n+\tmain_main=$(cd main && git show-ref -s --verify refs/tags/tmain) &&\n+\tmain_add=$(cd main && git show-ref -s --verify refs/tags/tadd) &&\n+\tmirror_main=$(cd mirror && git show-ref -s --verify refs/tags/tmain) &&\n \tmirror_add=$(cd mirror && git show-ref -s --verify refs/tags/tadd) &&\n-\ttest \"$master_master\" = \"$mirror_master\" &&\n-\ttest \"$master_add\" = \"$mirror_add\" &&\n+\ttest \"$main_main\" = \"$mirror_main\" &&\n+\ttest \"$main_add\" = \"$mirror_add\" &&\n \t(\n \t\tcd mirror &&\n \t\tinvert git show-ref -s --verify refs/tags/tremove\n@@ -233,10 +233,10 @@ test_expect_success 'remote.foo.mirror adds and removes branches' '\n \n \tmk_repo_pair --mirror &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n-\t\tgit branch keep master &&\n-\t\tgit branch remove master &&\n+\t\tgit branch keep main &&\n+\t\tgit branch remove main &&\n \t\tgit push up &&\n \t\tgit branch -D remove &&\n \t\tgit push up\n@@ -253,10 +253,10 @@ test_expect_success 'remote.foo.mirror=no has no effect' '\n \n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit config --add remote.up.mirror no &&\n-\t\tgit branch keep master &&\n+\t\tgit branch keep main &&\n \t\tgit push --mirror up &&\n \t\tgit branch -D keep &&\n \t\tgit push up :\n@@ -271,10 +271,10 @@ test_expect_success 'remote.foo.mirror=no has no effect' '\n test_expect_success 'push to mirrored repository with refspec fails' '\n \tmk_repo_pair &&\n \t(\n-\t\tcd master &&\n+\t\tcd main &&\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit config --add remote.up.mirror true &&\n-\t\ttest_must_fail git push up master\n+\t\ttest_must_fail git push up main\n \t)\n '\n \ndiff --git a/t/t5518-fetch-exit-status.sh b/t/t5518-fetch-exit-status.sh\nindex a94d0744d0..5c4ac2556e 100755\n--- a/t/t5518-fetch-exit-status.sh\n+++ b/t/t5518-fetch-exit-status.sh\n@@ -5,7 +5,7 @@\n \n test_description='fetch exit status test'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -20,20 +20,20 @@ test_expect_success setup '\n \techo side >file &&\n \tgit commit -a -m side &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo next >file &&\n \tgit commit -a -m next\n '\n \n test_expect_success 'non-fast-forward fetch' '\n \n-\ttest_must_fail git fetch . master:side\n+\ttest_must_fail git fetch . main:side\n \n '\n \n test_expect_success 'forced update' '\n \n-\tgit fetch . +master:side\n+\tgit fetch . +main:side\n \n '\n \ndiff --git a/t/t5519-push-alternates.sh b/t/t5519-push-alternates.sh\nindex 0f199d0ccb..20ba604dfd 100755\n--- a/t/t5519-push-alternates.sh\n+++ b/t/t5519-push-alternates.sh\n@@ -2,7 +2,7 @@\n \n test_description='push to a repository that borrows from elsewhere'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -20,7 +20,7 @@ test_expect_success setup '\n \t\t>file &&\n \t\tgit add . &&\n \t\tgit commit -m initial &&\n-\t\tgit push ../alice-pub master\n+\t\tgit push ../alice-pub main\n \t) &&\n \n \t# Project Bob is a fork of project Alice\n@@ -34,7 +34,7 @@ test_expect_success setup '\n \tgit clone alice-pub bob-work &&\n \t(\n \t\tcd bob-work &&\n-\t\tgit push ../bob-pub master\n+\t\tgit push ../bob-pub main\n \t)\n '\n \n@@ -57,7 +57,7 @@ test_expect_success 'bob fetches from alice, works and pushes' '\n \t\t# has at her public repository are available to it\n \t\t# via its alternates.\n \t\tcd bob-work &&\n-\t\tgit pull ../alice-pub master &&\n+\t\tgit pull ../alice-pub main &&\n \t\techo more bob >file &&\n \t\tgit commit -a -m third &&\n \t\tgit push ../bob-pub :\n@@ -96,7 +96,7 @@ test_expect_success 'alice works and pushes again' '\n test_expect_success 'bob works and pushes' '\n \t(\n \t\t# This time Bob does not pull from Alice, and\n-\t\t# the master branch at her public repository points\n+\t\t# the main branch at her public repository points\n \t\t# at a commit Bob does not know about.  This should\n \t\t# not prevent the push by Bob from succeeding.\n \t\tcd bob-work &&\n@@ -125,11 +125,11 @@ test_expect_success 'alice works and pushes yet again' '\n test_expect_success 'bob works and pushes again' '\n \t(\n \t\tcd alice-pub &&\n-\t\tgit cat-file commit master >../bob-work/commit\n+\t\tgit cat-file commit main >../bob-work/commit\n \t) &&\n \t(\n \t\t# This time Bob does not pull from Alice, and\n-\t\t# the master branch at her public repository points\n+\t\t# the main branch at her public repository points\n \t\t# at a commit Bob does not fully know about, but\n \t\t# he happens to have the commit object (but not the\n \t\t# necessary tree) in his repository from Alice.\n-- \ngitgitgadget\n\n"},{"id":"410296","messageId":"cda06e253d1c26e25d600b0eb2837e0840b32928.1605743088.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 25/28] t9[5-7]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:43Z","receivedAt":"2020-11-18T23:45:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t9[5-7]*.sh lib-cvs.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/lib-cvs.sh                              |  2 +-\n t/t9500-gitweb-standalone-no-errors.sh    | 22 +++++++++++-----------\n t/t9501-gitweb-standalone-http-status.sh  | 16 ++++++++--------\n t/t9502-gitweb-standalone-parse-output.sh | 18 +++++++++---------\n t/t9600-cvsimport.sh                      |  4 ++--\n t/t9601-cvsimport-vendor-branch.sh        | 18 +++++++++---------\n t/t9602-cvsimport-branches-tags.sh        |  6 +++---\n t/t9603-cvsimport-patchsets.sh            | 10 +++++-----\n 8 files changed, 48 insertions(+), 48 deletions(-)\n\ndiff --git a/t/lib-cvs.sh b/t/lib-cvs.sh\nindex 9b2bcfb1b0..32b3473379 100644\n--- a/t/lib-cvs.sh\n+++ b/t/lib-cvs.sh\n@@ -36,7 +36,7 @@ setup_cvs_test_repository () {\n test_cvs_co () {\n \t# Usage: test_cvs_co BRANCH_NAME\n \trm -rf module-cvs-\"$1\"\n-\tif [ \"$1\" = \"master\" ]\n+\tif [ \"$1\" = \"main\" ]\n \tthen\n \t\t$CVS co -P -d module-cvs-\"$1\" -A module\n \telse\ndiff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\nindex fa36bf5e83..ee8c6e30e6 100755\n--- a/t/t9500-gitweb-standalone-no-errors.sh\n+++ b/t/t9500-gitweb-standalone-no-errors.sh\n@@ -10,7 +10,7 @@ commandline, and checks that it would not write any errors\n or warnings to log.'\n \n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./gitweb-lib.sh\n@@ -330,7 +330,7 @@ test_expect_success \\\n \t echo \"Branch\" >>b &&\n \t git add b &&\n \t git commit -a -m \"On branch\" &&\n-\t git checkout master &&\n+\t git checkout main &&\n \t git merge b &&\n \t git tag merge_commit'\n \n@@ -367,7 +367,7 @@ test_expect_success \\\n \t echo \"Changed and have mode changed\" >07-change-mode-change &&\n \t test_chmod +x 07-change-mode-change &&\n \t git commit -a -m \"Large commit\" &&\n-\t git checkout master'\n+\t git checkout main'\n \n test_expect_success \\\n \t'commit(1): large commit' \\\n@@ -405,7 +405,7 @@ test_expect_success 'side-by-side: merge commit' '\n \n test_expect_success \\\n \t'tags: list of different types of tags' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t git tag -a -m \"Tag commit object\" tag-commit HEAD &&\n \t git tag -a -m \"\" tag-commit-nomessage HEAD &&\n \t git tag -a -m \"Tag tag object\" tag-tag tag-commit &&\n@@ -446,7 +446,7 @@ test_expect_success \\\n \n test_expect_success \\\n \t'logs: history (implicit HEAD, deleted file)' \\\n-\t'git checkout master &&\n+\t'git checkout main &&\n \t echo \"to be deleted\" >deleted_file &&\n \t git add deleted_file &&\n \t git commit -m \"Add file to be deleted\" &&\n@@ -466,11 +466,11 @@ test_expect_success \\\n \n test_expect_success \\\n \t'path_info: project/branch:file' \\\n-\t'gitweb_run \"\" \"/.git/master:file\"'\n+\t'gitweb_run \"\" \"/.git/main:file\"'\n \n test_expect_success \\\n \t'path_info: project/branch:dir/' \\\n-\t'gitweb_run \"\" \"/.git/master:foo/\"'\n+\t'gitweb_run \"\" \"/.git/main:foo/\"'\n \n test_expect_success \\\n \t'path_info: project/branch (non-existent)' \\\n@@ -482,16 +482,16 @@ test_expect_success \\\n \n test_expect_success \\\n \t'path_info: project/branch:file (non-existent)' \\\n-\t'gitweb_run \"\" \"/.git/master:non-existent\"'\n+\t'gitweb_run \"\" \"/.git/main:non-existent\"'\n \n test_expect_success \\\n \t'path_info: project/branch:dir/ (non-existent)' \\\n-\t'gitweb_run \"\" \"/.git/master:non-existent/\"'\n+\t'gitweb_run \"\" \"/.git/main:non-existent/\"'\n \n \n test_expect_success \\\n \t'path_info: project/branch:/file' \\\n-\t'gitweb_run \"\" \"/.git/master:/file\"'\n+\t'gitweb_run \"\" \"/.git/main:/file\"'\n \n test_expect_success \\\n \t'path_info: project/:/file (implicit HEAD)' \\\n@@ -804,7 +804,7 @@ test_expect_success \\\n \t\tgit checkout orphan_branch ||\n \t\tgit checkout --orphan orphan_branch\n \t } &&\n-\t test_when_finished \"git checkout master\" &&\n+\t test_when_finished \"git checkout main\" &&\n \t gitweb_run \"p=.git;a=summary\"'\n \n test_done\ndiff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-status.sh\nindex 6b0adf28d2..141610de54 100755\n--- a/t/t9501-gitweb-standalone-http-status.sh\n+++ b/t/t9501-gitweb-standalone-http-status.sh\n@@ -10,7 +10,7 @@ commandline, and checks that it returns the expected HTTP status\n code and message.'\n \n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./gitweb-lib.sh\n@@ -88,7 +88,7 @@ test_debug 'cat gitweb.headers'\n # snapshot hash ids\n \n test_expect_success 'snapshots: good tree-ish id' '\n-\tgitweb_run \"p=.git;a=snapshot;h=master;sf=tgz\" &&\n+\tgitweb_run \"p=.git;a=snapshot;h=main;sf=tgz\" &&\n \tgrep \"Status: 200 OK\" gitweb.output\n '\n test_debug 'cat gitweb.headers'\n@@ -126,7 +126,7 @@ test_debug 'cat gitweb.output'\n # modification times (Last-Modified and If-Modified-Since)\n \n test_expect_success DATE_PARSER 'modification: feed last-modified' '\n-\tgitweb_run \"p=.git;a=atom;h=master\" &&\n+\tgitweb_run \"p=.git;a=atom;h=main\" &&\n \tgrep \"Status: 200 OK\" gitweb.headers &&\n \tgrep \"Last-modified: Thu, 7 Apr 2005 22:14:13 +0000\" gitweb.headers\n '\n@@ -136,7 +136,7 @@ test_expect_success DATE_PARSER 'modification: feed if-modified-since (modified)\n \tHTTP_IF_MODIFIED_SINCE=\"Wed, 6 Apr 2005 22:14:13 +0000\" &&\n \texport HTTP_IF_MODIFIED_SINCE &&\n \ttest_when_finished \"unset HTTP_IF_MODIFIED_SINCE\" &&\n-\tgitweb_run \"p=.git;a=atom;h=master\" &&\n+\tgitweb_run \"p=.git;a=atom;h=main\" &&\n \tgrep \"Status: 200 OK\" gitweb.headers\n '\n test_debug 'cat gitweb.headers'\n@@ -145,13 +145,13 @@ test_expect_success DATE_PARSER 'modification: feed if-modified-since (unmodifie\n \tHTTP_IF_MODIFIED_SINCE=\"Thu, 7 Apr 2005 22:14:13 +0000\" &&\n \texport HTTP_IF_MODIFIED_SINCE &&\n \ttest_when_finished \"unset HTTP_IF_MODIFIED_SINCE\" &&\n-\tgitweb_run \"p=.git;a=atom;h=master\" &&\n+\tgitweb_run \"p=.git;a=atom;h=main\" &&\n \tgrep \"Status: 304 Not Modified\" gitweb.headers\n '\n test_debug 'cat gitweb.headers'\n \n test_expect_success DATE_PARSER 'modification: snapshot last-modified' '\n-\tgitweb_run \"p=.git;a=snapshot;h=master;sf=tgz\" &&\n+\tgitweb_run \"p=.git;a=snapshot;h=main;sf=tgz\" &&\n \tgrep \"Status: 200 OK\" gitweb.headers &&\n \tgrep \"Last-modified: Thu, 7 Apr 2005 22:14:13 +0000\" gitweb.headers\n '\n@@ -161,7 +161,7 @@ test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (modif\n \tHTTP_IF_MODIFIED_SINCE=\"Wed, 6 Apr 2005 22:14:13 +0000\" &&\n \texport HTTP_IF_MODIFIED_SINCE &&\n \ttest_when_finished \"unset HTTP_IF_MODIFIED_SINCE\" &&\n-\tgitweb_run \"p=.git;a=snapshot;h=master;sf=tgz\" &&\n+\tgitweb_run \"p=.git;a=snapshot;h=main;sf=tgz\" &&\n \tgrep \"Status: 200 OK\" gitweb.headers\n '\n test_debug 'cat gitweb.headers'\n@@ -170,7 +170,7 @@ test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (unmod\n \tHTTP_IF_MODIFIED_SINCE=\"Thu, 7 Apr 2005 22:14:13 +0000\" &&\n \texport HTTP_IF_MODIFIED_SINCE &&\n \ttest_when_finished \"unset HTTP_IF_MODIFIED_SINCE\" &&\n-\tgitweb_run \"p=.git;a=snapshot;h=master;sf=tgz\" &&\n+\tgitweb_run \"p=.git;a=snapshot;h=main;sf=tgz\" &&\n \tgrep \"Status: 304 Not Modified\" gitweb.headers\n '\n test_debug 'cat gitweb.headers'\ndiff --git a/t/t9502-gitweb-standalone-parse-output.sh b/t/t9502-gitweb-standalone-parse-output.sh\nindex 76d90eccd8..9cf7ab30a8 100755\n--- a/t/t9502-gitweb-standalone-parse-output.sh\n+++ b/t/t9502-gitweb-standalone-parse-output.sh\n@@ -10,7 +10,7 @@ commandline, and checks that it produces the correct output, either\n in the HTTP header or the actual script output.'\n \n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./gitweb-lib.sh\n@@ -82,10 +82,10 @@ test_expect_success 'snapshot: HEAD' '\n '\n test_debug 'cat gitweb.headers && cat file_list'\n \n-test_expect_success 'snapshot: short branch name (master)' '\n-\tgitweb_run \"p=.git;a=snapshot;h=master;sf=tar\" &&\n-\tID=$(git rev-parse --verify --short=7 master) &&\n-\tcheck_snapshot \".git-master-$ID\"\n+test_expect_success 'snapshot: short branch name (main)' '\n+\tgitweb_run \"p=.git;a=snapshot;h=main;sf=tar\" &&\n+\tID=$(git rev-parse --verify --short=7 main) &&\n+\tcheck_snapshot \".git-main-$ID\"\n '\n test_debug 'cat gitweb.headers && cat file_list'\n \n@@ -96,10 +96,10 @@ test_expect_success 'snapshot: short tag name (first)' '\n '\n test_debug 'cat gitweb.headers && cat file_list'\n \n-test_expect_success 'snapshot: full branch name (refs/heads/master)' '\n-\tgitweb_run \"p=.git;a=snapshot;h=refs/heads/master;sf=tar\" &&\n-\tID=$(git rev-parse --verify --short=7 master) &&\n-\tcheck_snapshot \".git-master-$ID\"\n+test_expect_success 'snapshot: full branch name (refs/heads/main)' '\n+\tgitweb_run \"p=.git;a=snapshot;h=refs/heads/main;sf=tar\" &&\n+\tID=$(git rev-parse --verify --short=7 main) &&\n+\tcheck_snapshot \".git-main-$ID\"\n '\n test_debug 'cat gitweb.headers && cat file_list'\n \ndiff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh\nindex 9257d664f2..5680849218 100755\n--- a/t/t9600-cvsimport.sh\n+++ b/t/t9600-cvsimport.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='git cvsimport basic tests'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-cvs.sh\n@@ -162,6 +162,6 @@ test_expect_success PERL 'no .git/cvs-revisions created by default' '\n \n '\n \n-test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree master'\n+test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree main'\n \n test_done\ndiff --git a/t/t9601-cvsimport-vendor-branch.sh b/t/t9601-cvsimport-vendor-branch.sh\nindex 700c2688d2..116cddba3a 100755\n--- a/t/t9601-cvsimport-vendor-branch.sh\n+++ b/t/t9601-cvsimport-vendor-branch.sh\n@@ -32,7 +32,7 @@\n #       tag has been removed.\n \n test_description='git cvsimport handling of vendor branches'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-cvs.sh\n@@ -45,43 +45,43 @@ test_expect_success PERL 'import a module with a vendor branch' '\n \n '\n \n-test_expect_success PERL 'check HEAD out of cvs repository' 'test_cvs_co master'\n+test_expect_success PERL 'check HEAD out of cvs repository' 'test_cvs_co main'\n \n-test_expect_success PERL 'check master out of git repository' 'test_git_co master'\n+test_expect_success PERL 'check main out of git repository' 'test_git_co main'\n \n test_expect_success PERL 'check a file that was imported once' '\n \n-\ttest_cmp_branch_file master imported-once.txt\n+\ttest_cmp_branch_file main imported-once.txt\n \n '\n \n test_expect_failure PERL 'check a file that was imported twice' '\n \n-\ttest_cmp_branch_file master imported-twice.txt\n+\ttest_cmp_branch_file main imported-twice.txt\n \n '\n \n test_expect_success PERL 'check a file that was imported then modified on HEAD' '\n \n-\ttest_cmp_branch_file master imported-modified.txt\n+\ttest_cmp_branch_file main imported-modified.txt\n \n '\n \n test_expect_success PERL 'check a file that was imported, modified, then imported again' '\n \n-\ttest_cmp_branch_file master imported-modified-imported.txt\n+\ttest_cmp_branch_file main imported-modified-imported.txt\n \n '\n \n test_expect_success PERL 'check a file that was added to HEAD then imported' '\n \n-\ttest_cmp_branch_file master added-imported.txt\n+\ttest_cmp_branch_file main added-imported.txt\n \n '\n \n test_expect_success PERL 'a vendor branch whose tag has been removed' '\n \n-\ttest_cmp_branch_file master imported-anonymously.txt\n+\ttest_cmp_branch_file main imported-anonymously.txt\n \n '\n \ndiff --git a/t/t9602-cvsimport-branches-tags.sh b/t/t9602-cvsimport-branches-tags.sh\nindex 7b1fb36e67..e5266c9a87 100755\n--- a/t/t9602-cvsimport-branches-tags.sh\n+++ b/t/t9602-cvsimport-branches-tags.sh\n@@ -4,7 +4,7 @@\n # t9602/README.\n \n test_description='git cvsimport handling of branches and tags'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-cvs.sh\n@@ -17,9 +17,9 @@ test_expect_success PERL 'import module' '\n \n '\n \n-test_expect_success PERL 'test branch master' '\n+test_expect_success PERL 'test branch main' '\n \n-\ttest_cmp_branch_tree master\n+\ttest_cmp_branch_tree main\n \n '\n \ndiff --git a/t/t9603-cvsimport-patchsets.sh b/t/t9603-cvsimport-patchsets.sh\nindex 87cd8c0c6b..0e9daa5768 100755\n--- a/t/t9603-cvsimport-patchsets.sh\n+++ b/t/t9603-cvsimport-patchsets.sh\n@@ -12,7 +12,7 @@\n # bug.\n \n test_description='git cvsimport testing for correct patchset estimation'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-cvs.sh\n@@ -23,16 +23,16 @@ test_expect_failure PERL 'import with criss cross times on revisions' '\n \tgit cvsimport -p\"-x\" -C module-git module &&\n \t(\n \t\tcd module-git &&\n-\t\tgit log --pretty=format:%s > ../actual-master &&\n+\t\tgit log --pretty=format:%s > ../actual-main &&\n \t\tgit log A~2..A --pretty=\"format:%s %ad\" -- > ../actual-A &&\n-\t\techo \"\" >> ../actual-master &&\n+\t\techo \"\" >> ../actual-main &&\n \t\techo \"\" >> ../actual-A\n \t) &&\n \techo \"Rev 4\n Rev 3\n Rev 2\n-Rev 1\" > expect-master &&\n-\ttest_cmp expect-master actual-master &&\n+Rev 1\" > expect-main &&\n+\ttest_cmp expect-main actual-main &&\n \n \techo \"Rev 5 Branch A Wed Mar 11 19:09:10 2009 +0000\n Rev 4 Branch A Wed Mar 11 19:03:52 2009 +0000\" > expect-A &&\n-- \ngitgitgadget\n\n"},{"id":"410297","messageId":"e37bc3c792748968f884e93e3e77c27c8f71c95b.1605743088.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 23/28] t8*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:41Z","receivedAt":"2020-11-18T23:45:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t8*.sh annotate*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/annotate-tests.sh             |  8 ++++----\n t/t8001-annotate.sh             |  4 ++--\n t/t8002-blame.sh                |  2 +-\n t/t8003-blame-corner-cases.sh   |  6 +++---\n t/t8004-blame-with-conflicts.sh | 16 ++++++++--------\n t/t8012-blame-colors.sh         |  2 +-\n 6 files changed, 19 insertions(+), 19 deletions(-)\n\ndiff --git a/t/annotate-tests.sh b/t/annotate-tests.sh\nindex 3aee61d2cc..ee5d2d4cf8 100644\n--- a/t/annotate-tests.sh\n+++ b/t/annotate-tests.sh\n@@ -95,7 +95,7 @@ test_expect_success 'blame 2 authors' '\n '\n \n test_expect_success 'setup B1 lines (branch1)' '\n-\tgit checkout -b branch1 master &&\n+\tgit checkout -b branch1 main &&\n \techo \"3A slow green fox jumps into the\" >>file &&\n \techo \"well.\" >>file &&\n \tGIT_AUTHOR_NAME=\"B1\" GIT_AUTHOR_EMAIL=\"B1@test.git\" \\\n@@ -107,7 +107,7 @@ test_expect_success 'blame 2 authors + 1 branch1 author' '\n '\n \n test_expect_success 'setup B2 lines (branch2)' '\n-\tgit checkout -b branch2 master &&\n+\tgit checkout -b branch2 main &&\n \tsed -e \"s/2A quick brown/4A quick brown lazy dog/\" <file >file.new &&\n \tmv file.new file &&\n \tGIT_AUTHOR_NAME=\"B2\" GIT_AUTHOR_EMAIL=\"B2@test.git\" \\\n@@ -131,11 +131,11 @@ test_expect_success 'blame --first-parent blames merge for branch1' '\n '\n \n test_expect_success 'blame ancestor' '\n-\tcheck_count -h master A 2 B 2\n+\tcheck_count -h main A 2 B 2\n '\n \n test_expect_success 'blame great-ancestor' '\n-\tcheck_count -h master^ A 2\n+\tcheck_count -h main^ A 2\n '\n \n test_expect_success 'setup evil merge' '\ndiff --git a/t/t8001-annotate.sh b/t/t8001-annotate.sh\nindex f661007c85..a536a621b2 100755\n--- a/t/t8001-annotate.sh\n+++ b/t/t8001-annotate.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='git annotate'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -10,7 +10,7 @@ PROG='git annotate'\n . \"$TEST_DIRECTORY\"/annotate-tests.sh\n \n test_expect_success 'annotate old revision' '\n-\tgit annotate file master >actual &&\n+\tgit annotate file main >actual &&\n \tawk \"{ print \\$3; }\" <actual >authors &&\n \ttest 2 = $(grep A <authors | wc -l) &&\n \ttest 2 = $(grep B <authors | wc -l)\ndiff --git a/t/t8002-blame.sh b/t/t8002-blame.sh\nindex 89a319d2c7..5bb302b1ba 100755\n--- a/t/t8002-blame.sh\n+++ b/t/t8002-blame.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='git blame'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\ndiff --git a/t/t8003-blame-corner-cases.sh b/t/t8003-blame-corner-cases.sh\nindex 0613d889db..da80f815ce 100755\n--- a/t/t8003-blame-corner-cases.sh\n+++ b/t/t8003-blame-corner-cases.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='git blame corner cases'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -164,13 +164,13 @@ test_expect_success 'blame wholesale copy and more in the index' '\n \n test_expect_success 'blame during cherry-pick with file rename conflict' '\n \n-\ttest_when_finished \"git reset --hard && git checkout master\" &&\n+\ttest_when_finished \"git reset --hard && git checkout main\" &&\n \tgit checkout HEAD~3 &&\n \techo MOUSE >> mouse &&\n \tgit mv mouse rodent &&\n \tgit add rodent &&\n \tGIT_AUTHOR_NAME=Rodent git commit -m \"rodent\" &&\n-\tgit checkout --detach master &&\n+\tgit checkout --detach main &&\n \t(git cherry-pick HEAD@{1} || test $? -eq 1) &&\n \tgit show HEAD@{1}:rodent > rodent &&\n \tgit add rodent &&\ndiff --git a/t/t8004-blame-with-conflicts.sh b/t/t8004-blame-with-conflicts.sh\nindex ffce1d1195..35414a5336 100755\n--- a/t/t8004-blame-with-conflicts.sh\n+++ b/t/t8004-blame-with-conflicts.sh\n@@ -3,7 +3,7 @@\n # Based on a test case submitted by Björn Steinbrink.\n \n test_description='git blame on conflicted files'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -24,16 +24,16 @@ test_expect_success 'setup first case' '\n \tgit add file2 &&\n \tgit commit --author \"U Gly <ug@localhost>\" -m ugly &&\n \n-\t# Back to master and change something\n-\tgit checkout master &&\n+\t# Back to main and change something\n+\tgit checkout main &&\n \techo \"\n \n bla\" >> file1 &&\n \tgit commit --author \"Old Line <ol@localhost>\" -a -m file1.b &&\n \n-\t# Back to foo and merge master\n+\t# Back to foo and merge main\n \tgit checkout foo &&\n-\tif git merge master; then\n+\tif git merge main; then\n \t\techo needed conflict here\n \t\texit 1\n \telse\n@@ -47,8 +47,8 @@ Even more\" > file2 &&\n \tgit rm file1 &&\n \tgit commit --author \"M Result <mr@localhost>\" -a -m merged &&\n \n-\t# Back to master and change file1 again\n-\tgit checkout master &&\n+\t# Back to main and change file1 again\n+\tgit checkout main &&\n \tsed s/bla/foo/ <file1 >X &&\n \trm file1 &&\n \tmv X file1 &&\n@@ -56,7 +56,7 @@ Even more\" > file2 &&\n \n \t# Try to merge into foo again\n \tgit checkout foo &&\n-\tif git merge master; then\n+\tif git merge main; then\n \t\techo needed conflict here\n \t\texit 1\n \telse\ndiff --git a/t/t8012-blame-colors.sh b/t/t8012-blame-colors.sh\nindex d55b3e22c9..90c75dbb28 100755\n--- a/t/t8012-blame-colors.sh\n+++ b/t/t8012-blame-colors.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='colored git blame'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n-- \ngitgitgadget\n\n"},{"id":"410298","messageId":"3e81bc89a2301998375294077b5b581659e17ba0.1605743088.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 24/28] t9[0-4]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:42Z","receivedAt":"2020-11-18T23:45:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t9[0-4]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9001-send-email.sh                  | 30 ++++-----\n t/t9100-git-svn-basic.sh               |  4 +-\n t/t9145-git-svn-master-branch.sh       |  8 +--\n t/t9151-svn-mergeinfo.sh               |  4 +-\n t/t9155-git-svn-fetch-deleted-tag.sh   |  4 +-\n t/t9156-git-svn-fetch-deleted-tag-2.sh |  8 +--\n t/t9163-git-svn-reset-clears-caches.sh |  4 +-\n t/t9169-git-svn-dcommit-crlf.sh        |  4 +-\n t/t9300-fast-import.sh                 | 84 ++++++++++++------------\n t/t9301-fast-import-notes.sh           | 16 ++---\n t/t9302-fast-import-unpack-limit.sh    | 16 ++---\n t/t9350-fast-export.sh                 | 88 +++++++++++++-------------\n t/t9351-fast-export-anonymize.sh       |  6 +-\n t/t9400-git-cvsserver-server.sh        | 34 +++++-----\n t/t9401-git-cvsserver-crlf.sh          | 18 +++---\n t/t9402-git-cvsserver-refs.sh          | 10 +--\n 16 files changed, 169 insertions(+), 169 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 3d160d939e..4eee9c3dcb 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='git send-email'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -1171,10 +1171,10 @@ test_expect_success $PREREQ '--compose-encoding adds correct MIME for subject' '\n '\n \n test_expect_success $PREREQ 'detects ambiguous reference/file conflict' '\n-\techo master >master &&\n-\tgit add master &&\n-\tgit commit -m\"add master\" &&\n-\ttest_must_fail git send-email --dry-run master 2>errors &&\n+\techo main >main &&\n+\tgit add main &&\n+\tgit commit -m\"add main\" &&\n+\ttest_must_fail git send-email --dry-run main 2>errors &&\n \tgrep disambiguate errors\n '\n \n@@ -1188,7 +1188,7 @@ test_expect_success $PREREQ 'feed two files' '\n \t\toutdir/000?-*.patch 2>errors >out &&\n \tgrep \"^Subject: \" out >subjects &&\n \ttest \"z$(sed -n -e 1p subjects)\" = \"zSubject: [PATCH 1/2] Second.\" &&\n-\ttest \"z$(sed -n -e 2p subjects)\" = \"zSubject: [PATCH 2/2] add master\"\n+\ttest \"z$(sed -n -e 2p subjects)\" = \"zSubject: [PATCH 2/2] add main\"\n '\n \n test_expect_success $PREREQ 'in-reply-to but no threading' '\n@@ -2040,7 +2040,7 @@ test_expect_success $PREREQ 'setup expected-list' '\n \t--cc=\"Cc2 <cc2@example.com>\" \\\n \t--bcc=\"bcc1@example.com\" \\\n \t--bcc=\"bcc2@example.com\" \\\n-\t0001-add-master.patch | replace_variable_fields \\\n+\t0001-add-main.patch | replace_variable_fields \\\n \t>expected-list\n '\n \n@@ -2052,7 +2052,7 @@ test_expect_success $PREREQ 'use email list in --cc --to and --bcc' '\n \t--to=\"to3@example.com\" \\\n \t--cc=\"Cc 1 <cc1@example.com>, Cc2 <cc2@example.com>\" \\\n \t--bcc=\"bcc1@example.com, bcc2@example.com\" \\\n-\t0001-add-master.patch | replace_variable_fields \\\n+\t0001-add-main.patch | replace_variable_fields \\\n \t>actual-list &&\n \ttest_cmp expected-list actual-list\n '\n@@ -2068,7 +2068,7 @@ test_expect_success $PREREQ 'aliases work with email list' '\n \t--to=\"To 1 <to1@example.com>, to2, to3@example.com\" \\\n \t--cc=\"cc1, Cc2 <cc2@example.com>\" \\\n \t--bcc=\"bcc1@example.com, bcc2@example.com\" \\\n-\t0001-add-master.patch | replace_variable_fields \\\n+\t0001-add-main.patch | replace_variable_fields \\\n \t>actual-list &&\n \ttest_cmp expected-list actual-list\n '\n@@ -2092,7 +2092,7 @@ test_expect_success $PREREQ 'leading and trailing whitespaces are removed' '\n \t--cc=\"Cc2 <cc2@example.com>\" \\\n \t--bcc=\"$BCC1\" \\\n \t--bcc=\"bcc2@example.com\" \\\n-\t0001-add-master.patch | replace_variable_fields \\\n+\t0001-add-main.patch | replace_variable_fields \\\n \t>actual-list &&\n \ttest_cmp expected-list actual-list\n '\n@@ -2111,8 +2111,8 @@ test_expect_success $PREREQ 'invoke hook' '\n \t\tfalse\n \t\t;;\n \tesac &&\n-\ttest -f 0001-add-master.patch &&\n-\tgrep \"add master\" \"$1\"\n+\ttest -f 0001-add-main.patch &&\n+\tgrep \"add main\" \"$1\"\n \tEOF\n \n \tmkdir subdir &&\n@@ -2124,10 +2124,10 @@ test_expect_success $PREREQ 'invoke hook' '\n \t\t\t--from=\"Example <nobody@example.com>\" \\\n \t\t\t--to=nobody@example.com \\\n \t\t\t--smtp-server=\"$(pwd)/../fake.sendmail\" \\\n-\t\t\t../0001-add-master.patch &&\n+\t\t\t../0001-add-main.patch &&\n \n \t\t# Verify error message when a patch is rejected by the hook\n-\t\tsed -e \"s/add master/x/\" ../0001-add-master.patch >../another.patch &&\n+\t\tsed -e \"s/add main/x/\" ../0001-add-main.patch >../another.patch &&\n \t\ttest_must_fail git send-email \\\n \t\t\t--from=\"Example <nobody@example.com>\" \\\n \t\t\t--to=nobody@example.com \\\n@@ -2142,7 +2142,7 @@ test_expect_success $PREREQ 'test that send-email works outside a repo' '\n \t\t--from=\"Example <nobody@example.com>\" \\\n \t\t--to=nobody@example.com \\\n \t\t--smtp-server=\"$(pwd)/fake.sendmail\" \\\n-\t\t\"$(pwd)/0001-add-master.patch\"\n+\t\t\"$(pwd)/0001-add-main.patch\"\n '\n \n test_expect_success $PREREQ 'test that sendmail config is rejected' '\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex 9a6f2c38f1..1d3fdcc997 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -6,7 +6,7 @@\n test_description='git svn basic tests'\n GIT_SVN_LC_ALL=${LC_ALL:-$LANG}\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-git-svn.sh\n@@ -278,7 +278,7 @@ test_expect_success 'dcommit $rev does not clobber current branch' '\n \ttest refs/heads/my-bar = $(git symbolic-ref HEAD) &&\n \tgit log refs/remotes/bar | grep \"change 1\" &&\n \t! git log refs/remotes/bar | grep \"change 2\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -D my-bar\n \t'\n \ndiff --git a/t/t9145-git-svn-master-branch.sh b/t/t9145-git-svn-master-branch.sh\nindex 053571ca5c..f863e437f7 100755\n--- a/t/t9145-git-svn-master-branch.sh\n+++ b/t/t9145-git-svn-master-branch.sh\n@@ -2,8 +2,8 @@\n #\n # Copyright (c) 2009 Eric Wong\n #\n-test_description='git svn initial master branch is \"trunk\" if possible'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+test_description='git svn initial main branch is \"trunk\" if possible'\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-git-svn.sh\n@@ -16,12 +16,12 @@ test_expect_success 'setup test repository' '\n \tsvn_cmd import -m b/b i \"$svnrepo/branches/b\"\n '\n \n-test_expect_success 'git svn clone --stdlayout sets up trunk as master' '\n+test_expect_success 'git svn clone --stdlayout sets up trunk as main' '\n \tgit svn clone -s \"$svnrepo\" g &&\n \t(\n \t\tcd g &&\n \t\ttest x$(git rev-parse --verify refs/remotes/origin/trunk^0) = \\\n-\t\t     x$(git rev-parse --verify refs/heads/master^0)\n+\t\t     x$(git rev-parse --verify refs/heads/main^0)\n \t)\n '\n \ndiff --git a/t/t9151-svn-mergeinfo.sh b/t/t9151-svn-mergeinfo.sh\nindex 9188c761de..696ace2462 100755\n--- a/t/t9151-svn-mergeinfo.sh\n+++ b/t/t9151-svn-mergeinfo.sh\n@@ -5,7 +5,7 @@\n \n test_description='git-svn svn mergeinfo properties'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-git-svn.sh\n@@ -53,7 +53,7 @@ test_expect_success 'merging two branches in one commit is detected correctly' '\n \t'\n \n test_expect_failure 'everything got merged in the end' '\n-\tunmerged=$(git rev-list --all --not master) &&\n+\tunmerged=$(git rev-list --all --not main) &&\n \t[ -z \"$unmerged\" ]\n \t'\n \ndiff --git a/t/t9155-git-svn-fetch-deleted-tag.sh b/t/t9155-git-svn-fetch-deleted-tag.sh\nindex 9d6cc40add..3258374c13 100755\n--- a/t/t9155-git-svn-fetch-deleted-tag.sh\n+++ b/t/t9155-git-svn-fetch-deleted-tag.sh\n@@ -2,7 +2,7 @@\n \n test_description='git svn fetch deleted tag'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-git-svn.sh\n@@ -39,7 +39,7 @@ test_expect_success 'fetch deleted tags from same revision with checksum error'\n \tgit svn fetch &&\n \n \tgit diff --exit-code origin/mybranch:trunk/subdir/file origin/tags/mytag:file &&\n-\tgit diff --exit-code master:subdir/file origin/tags/mytag^:file\n+\tgit diff --exit-code main:subdir/file origin/tags/mytag^:file\n '\n \n test_done\ndiff --git a/t/t9156-git-svn-fetch-deleted-tag-2.sh b/t/t9156-git-svn-fetch-deleted-tag-2.sh\nindex ba78bfb676..2b75c403e3 100755\n--- a/t/t9156-git-svn-fetch-deleted-tag-2.sh\n+++ b/t/t9156-git-svn-fetch-deleted-tag-2.sh\n@@ -2,7 +2,7 @@\n \n test_description='git svn fetch deleted tag 2'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-git-svn.sh\n@@ -39,9 +39,9 @@ test_expect_success 'fetch deleted tags from same revision with no checksum erro\n \tcd git_project &&\n \tgit svn fetch &&\n \n-\tgit diff --exit-code master:subdir3/file origin/tags/mytag:file &&\n-\tgit diff --exit-code master:subdir2/file origin/tags/mytag^:file &&\n-\tgit diff --exit-code master:subdir1/file origin/tags/mytag^^:file\n+\tgit diff --exit-code main:subdir3/file origin/tags/mytag:file &&\n+\tgit diff --exit-code main:subdir2/file origin/tags/mytag^:file &&\n+\tgit diff --exit-code main:subdir1/file origin/tags/mytag^^:file\n '\n \n test_done\ndiff --git a/t/t9163-git-svn-reset-clears-caches.sh b/t/t9163-git-svn-reset-clears-caches.sh\nindex e48faf92af..978eb62ff4 100755\n--- a/t/t9163-git-svn-reset-clears-caches.sh\n+++ b/t/t9163-git-svn-reset-clears-caches.sh\n@@ -4,7 +4,7 @@\n #\n \n test_description='git svn reset clears memoized caches'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-git-svn.sh\n@@ -62,7 +62,7 @@ test_expect_success 'fetch to merge-base (a)' '\n test_expect_success 'rebase looses SVN merge (m)' '\n \tgit svn rebase &&\n \tgit svn fetch &&\n-\ttest 1 = $(git cat-file -p master|grep parent|wc -l)\n+\ttest 1 = $(git cat-file -p main|grep parent|wc -l)\n '\n \n # git svn fetch creates correct history with merge commit\ndiff --git a/t/t9169-git-svn-dcommit-crlf.sh b/t/t9169-git-svn-dcommit-crlf.sh\nindex 47ae51c54f..7080b5d24f 100755\n--- a/t/t9169-git-svn-dcommit-crlf.sh\n+++ b/t/t9169-git-svn-dcommit-crlf.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='git svn dcommit CRLF'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-git-svn.sh\n@@ -17,7 +17,7 @@ test_expect_success 'setup commit repository' '\n \t\tp=$(git rev-parse HEAD) &&\n \t\tt=$(git write-tree) &&\n \t\tcmt=$(git commit-tree -p $p $t <cmt) &&\n-\t\tgit update-ref refs/heads/master $cmt &&\n+\t\tgit update-ref refs/heads/main $cmt &&\n \t\tgit cat-file commit HEAD | tail -n4 >out &&\n \t\ttest_cmp cmt out &&\n \t\tgit svn dcommit &&\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex 404a42999e..3d17e932a0 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -4,7 +4,7 @@\n #\n \n test_description='test git fast-import utility'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -65,7 +65,7 @@ test_expect_success 'A: create pack from stdin' '\n \tmark :4\n \tdata $file4_len\n \t$file4_data\n-\tcommit refs/heads/master\n+\tcommit refs/heads/main\n \tmark :5\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -120,7 +120,7 @@ test_expect_success 'A: create pack from stdin' '\n \n \tINPUT_END\n \tgit fast-import --export-marks=marks.out <input &&\n-\tgit whatchanged master\n+\tgit whatchanged main\n '\n \n test_expect_success 'A: verify pack' '\n@@ -134,7 +134,7 @@ test_expect_success 'A: verify commit' '\n \n \tinitial\n \tEOF\n-\tgit cat-file commit master | sed 1d >actual &&\n+\tgit cat-file commit main | sed 1d >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -144,31 +144,31 @@ test_expect_success 'A: verify tree' '\n \t100644 blob file3\n \t100755 blob file4\n \tEOF\n-\tgit cat-file -p master^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n+\tgit cat-file -p main^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'A: verify file2' '\n \techo \"$file2_data\" >expect &&\n-\tgit cat-file blob master:file2 >actual &&\n+\tgit cat-file blob main:file2 >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'A: verify file3' '\n \techo \"$file3_data\" >expect &&\n-\tgit cat-file blob master:file3 >actual &&\n+\tgit cat-file blob main:file3 >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'A: verify file4' '\n \tprintf \"$file4_data\" >expect &&\n-\tgit cat-file blob master:file4 >actual &&\n+\tgit cat-file blob main:file4 >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'A: verify tag/series-A' '\n \tcat >expect <<-EOF &&\n-\tobject $(git rev-parse refs/heads/master)\n+\tobject $(git rev-parse refs/heads/main)\n \ttype commit\n \ttag series-A\n \n@@ -180,7 +180,7 @@ test_expect_success 'A: verify tag/series-A' '\n \n test_expect_success 'A: verify tag/series-A-blob' '\n \tcat >expect <<-EOF &&\n-\tobject $(git rev-parse refs/heads/master:file3)\n+\tobject $(git rev-parse refs/heads/main:file3)\n \ttype blob\n \ttag series-A-blob\n \n@@ -196,13 +196,13 @@ test_expect_success 'A: verify tag deletion is successful' '\n \n test_expect_success 'A: verify marks output' '\n \tcat >expect <<-EOF &&\n-\t:2 $(git rev-parse --verify master:file2)\n-\t:3 $(git rev-parse --verify master:file3)\n-\t:4 $(git rev-parse --verify master:file4)\n-\t:5 $(git rev-parse --verify master^0)\n+\t:2 $(git rev-parse --verify main:file2)\n+\t:3 $(git rev-parse --verify main:file3)\n+\t:4 $(git rev-parse --verify main:file4)\n+\t:5 $(git rev-parse --verify main^0)\n \t:6 $(git cat-file tag nested | grep object | cut -d\" \" -f 2)\n \t:7 $(git rev-parse --verify nested)\n-\t:8 $(git rev-parse --verify master^0)\n+\t:8 $(git rev-parse --verify main^0)\n \tEOF\n \ttest_cmp expect marks.out\n '\n@@ -220,7 +220,7 @@ test_expect_success 'A: tag blob by sha1' '\n \tnew_blob=$(echo testing | git hash-object --stdin) &&\n \tcat >input <<-INPUT_END &&\n \ttag series-A-blob-2\n-\tfrom $(git rev-parse refs/heads/master:file3)\n+\tfrom $(git rev-parse refs/heads/main:file3)\n \tdata <<EOF\n \tTag blob by sha1.\n \tEOF\n@@ -246,7 +246,7 @@ test_expect_success 'A: tag blob by sha1' '\n \tINPUT_END\n \n \tcat >expect <<-EOF &&\n-\tobject $(git rev-parse refs/heads/master:file3)\n+\tobject $(git rev-parse refs/heads/main:file3)\n \ttype blob\n \ttag series-A-blob-2\n \n@@ -287,13 +287,13 @@ test_expect_success 'A: verify pack' '\n '\n \n test_expect_success 'A: verify diff' '\n-\tcopy=$(git rev-parse --verify master:file2) &&\n+\tcopy=$(git rev-parse --verify main:file2) &&\n \tcat >expect <<-EOF &&\n \t:000000 100755 $ZERO_OID $copy A\tcopy-of-file2\n \tEOF\n-\tgit diff-tree -M -r master verify--import-marks >actual &&\n+\tgit diff-tree -M -r main verify--import-marks >actual &&\n \tcompare_diff_raw expect actual &&\n-\ttest $(git rev-parse --verify master:file2) \\\n+\ttest $(git rev-parse --verify main:file2) \\\n \t    = $(git rev-parse --verify verify--import-marks:copy-of-file2)\n '\n \n@@ -367,7 +367,7 @@ test_expect_success 'B: fail on invalid blob sha1' '\n \tcorrupt\n \tCOMMIT\n \n-\tfrom refs/heads/master\n+\tfrom refs/heads/main\n \tM 755 $(echo $ZERO_OID | sed -e \"s/0$/1/\") zero1\n \n \tINPUT_END\n@@ -384,7 +384,7 @@ test_expect_success 'B: accept branch name \"TEMP_TAG\"' '\n \ttag base\n \tCOMMIT\n \n-\tfrom refs/heads/master\n+\tfrom refs/heads/main\n \n \tINPUT_END\n \n@@ -393,7 +393,7 @@ test_expect_success 'B: accept branch name \"TEMP_TAG\"' '\n \t\tgit prune\" &&\n \tgit fast-import <input &&\n \ttest -f .git/TEMP_TAG &&\n-\ttest $(git rev-parse master) = $(git rev-parse TEMP_TAG^)\n+\ttest $(git rev-parse main) = $(git rev-parse TEMP_TAG^)\n '\n \n test_expect_success 'B: accept empty committer' '\n@@ -531,8 +531,8 @@ test_expect_success 'B: fail on invalid committer (5)' '\n \n test_expect_success 'C: incremental import create pack from stdin' '\n \tnewf=$(echo hi newf | git hash-object -w --stdin) &&\n-\toldf=$(git rev-parse --verify master:file2) &&\n-\tthrf=$(git rev-parse --verify master:file3) &&\n+\toldf=$(git rev-parse --verify main:file2) &&\n+\tthrf=$(git rev-parse --verify main:file3) &&\n \ttest_tick &&\n \tcat >input <<-INPUT_END &&\n \tcommit refs/heads/branch\n@@ -541,7 +541,7 @@ test_expect_success 'C: incremental import create pack from stdin' '\n \tsecond\n \tCOMMIT\n \n-\tfrom refs/heads/master\n+\tfrom refs/heads/main\n \tM 644 $oldf file2/oldf\n \tM 755 $newf file2/newf\n \tD file3\n@@ -563,7 +563,7 @@ test_expect_success 'C: validate reuse existing blob' '\n \n test_expect_success 'C: verify commit' '\n \tcat >expect <<-EOF &&\n-\tparent $(git rev-parse --verify master^0)\n+\tparent $(git rev-parse --verify main^0)\n \tauthor $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n@@ -581,7 +581,7 @@ test_expect_success 'C: validate rename result' '\n \t:100644 100644 $oldf $oldf R100\tfile2\tfile2/oldf\n \t:100644 000000 $thrf $zero D\tfile3\n \tEOF\n-\tgit diff-tree -M -r master branch >actual &&\n+\tgit diff-tree -M -r main branch >actual &&\n \tcompare_diff_raw expect actual\n '\n \n@@ -1701,7 +1701,7 @@ test_expect_success 'P: superproject & submodule mix' '\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata 8\n \tinitial\n-\tfrom refs/heads/master\n+\tfrom refs/heads/main\n \tM 100644 :3 .gitmodules\n \tM 160000 :2 sub\n \n@@ -1736,8 +1736,8 @@ test_expect_success 'P: superproject & submodule mix' '\n \t(\n \t\tcd sub &&\n \t\tgit init &&\n-\t\tgit fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&\n-\t\tgit checkout master\n+\t\tgit fetch --update-head-ok .. refs/heads/sub:refs/heads/main &&\n+\t\tgit checkout main\n \t) &&\n \tgit submodule init &&\n \tgit submodule update\n@@ -1761,7 +1761,7 @@ test_expect_success 'P: verbatim SHA gitlinks' '\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata 8\n \tinitial\n-\tfrom refs/heads/master\n+\tfrom refs/heads/main\n \tM 100644 :1 .gitmodules\n \tM 160000 $SUBPREV sub\n \n@@ -3432,8 +3432,8 @@ mark :1\n data 4\n foo\n \n-reset refs/heads/master\n-commit refs/heads/master\n+reset refs/heads/main\n+commit refs/heads/main\n mark :2\n author Full Name <user@company.tld> 1000000000 +0100\n committer Full Name <user@company.tld> 1000000000 +0100\n@@ -3447,7 +3447,7 @@ data 8\n foo\n bar\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :4\n author Full Name <user@company.tld> 1000000001 +0100\n committer Full Name <user@company.tld> 1000000001 +0100\n@@ -3464,8 +3464,8 @@ mark :1\n data 4\n foo\n \n-reset refs/heads/master\n-commit refs/heads/master\n+reset refs/heads/main\n+commit refs/heads/main\n mark :2\n author Full Name <user@company.tld> 2000000000 +0100\n committer Full Name <user@company.tld> 2000000000 +0100\n@@ -3480,7 +3480,7 @@ data 73\n \tpath = sub1\n \turl = https://void.example.com/main.git\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :4\n author Full Name <user@company.tld> 2000000001 +0100\n committer Full Name <user@company.tld> 2000000001 +0100\n@@ -3496,7 +3496,7 @@ data 8\n foo\n bar\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :6\n author Full Name <user@company.tld> 2000000002 +0100\n committer Full Name <user@company.tld> 2000000002 +0100\n@@ -3514,8 +3514,8 @@ Y_INPUT_END\n \n test_expect_success 'Y: setup' '\n \ttest_oid_cache <<-EOF\n-\tYmaster sha1:9afed2f9161ddf416c0a1863b8b0725b00070504\n-\tYmaster sha256:c0a1010da1df187b2e287654793df01b464bd6f8e3f17fc1481a7dadf84caee3\n+\tYmain sha1:9afed2f9161ddf416c0a1863b8b0725b00070504\n+\tYmain sha256:c0a1010da1df187b2e287654793df01b464bd6f8e3f17fc1481a7dadf84caee3\n \tEOF\n '\n \n@@ -3527,7 +3527,7 @@ test_expect_success 'Y: rewrite submodules' '\n \t\tgit -C sub2 fast-import --export-marks=../sub2-marks <../Y-sub-input &&\n \t\tgit fast-import --rewrite-submodules-from=sub:../Y-marks \\\n \t\t\t--rewrite-submodules-to=sub:sub2-marks <../Y-main-input &&\n-\t\ttest \"$(git rev-parse master)\" = \"$(test_oid Ymaster)\"\n+\t\ttest \"$(git rev-parse main)\" = \"$(test_oid Ymain)\"\n \t)\n '\n \ndiff --git a/t/t9301-fast-import-notes.sh b/t/t9301-fast-import-notes.sh\nindex 0c5bfbde0e..1ae4d7c0d3 100755\n--- a/t/t9301-fast-import-notes.sh\n+++ b/t/t9301-fast-import-notes.sh\n@@ -4,7 +4,7 @@\n #\n \n test_description='test git fast-import of notes objects'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -12,7 +12,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n test_tick\n cat >input <<INPUT_END\n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n first commit\n@@ -33,7 +33,7 @@ data <<EOF\n file baz/xyzzy in first commit\n EOF\n \n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n second commit\n@@ -49,7 +49,7 @@ data <<EOF\n file baz/xyzzy in second commit\n EOF\n \n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n third commit\n@@ -60,7 +60,7 @@ data <<EOF\n file foo in third commit\n EOF\n \n-commit refs/heads/master\n+commit refs/heads/main\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n fourth commit\n@@ -73,13 +73,13 @@ EOF\n \n INPUT_END\n \n-test_expect_success 'set up master branch' '\n+test_expect_success 'set up main branch' '\n \n \tgit fast-import <input &&\n-\tgit whatchanged master\n+\tgit whatchanged main\n '\n \n-commit4=$(git rev-parse refs/heads/master)\n+commit4=$(git rev-parse refs/heads/main)\n commit3=$(git rev-parse \"$commit4^\")\n commit2=$(git rev-parse \"$commit4~2\")\n commit1=$(git rev-parse \"$commit4~3\")\ndiff --git a/t/t9302-fast-import-unpack-limit.sh b/t/t9302-fast-import-unpack-limit.sh\nindex bb1c39cfcc..f519e4f1bf 100755\n--- a/t/t9302-fast-import-unpack-limit.sh\n+++ b/t/t9302-fast-import-unpack-limit.sh\n@@ -5,7 +5,7 @@ test_description='test git fast-import unpack limit'\n test_expect_success 'create loose objects on import' '\n \ttest_tick &&\n \tcat >input <<-INPUT_END &&\n-\tcommit refs/heads/master\n+\tcommit refs/heads/main\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n \tinitial\n@@ -23,12 +23,12 @@ test_expect_success 'create loose objects on import' '\n test_expect_success 'bigger packs are preserved' '\n \ttest_tick &&\n \tcat >input <<-INPUT_END &&\n-\tcommit refs/heads/master\n+\tcommit refs/heads/main\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n \tincremental should create a pack\n \tCOMMIT\n-\tfrom refs/heads/master^0\n+\tfrom refs/heads/main^0\n \n \tcommit refs/heads/branch\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n@@ -48,7 +48,7 @@ test_expect_success 'bigger packs are preserved' '\n test_expect_success 'lookups after checkpoint works' '\n \thello_id=$(echo hello | git hash-object --stdin -t blob) &&\n \tid=\"$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\" &&\n-\tbefore=$(git rev-parse refs/heads/master^0) &&\n+\tbefore=$(git rev-parse refs/heads/main^0) &&\n \t(\n \t\tcat <<-INPUT_END &&\n \t\tblob\n@@ -56,13 +56,13 @@ test_expect_success 'lookups after checkpoint works' '\n \t\tdata 6\n \t\thello\n \n-\t\tcommit refs/heads/master\n+\t\tcommit refs/heads/main\n \t\tmark :2\n \t\tcommitter $id\n \t\tdata <<COMMIT\n \t\tcheckpoint after this\n \t\tCOMMIT\n-\t\tfrom refs/heads/master^0\n+\t\tfrom refs/heads/main^0\n \t\tM 100644 :1 hello\n \n \t\t# pre-checkpoint\n@@ -86,10 +86,10 @@ test_expect_success 'lookups after checkpoint works' '\n \t\t\t\tn=$(($n + 1))\n \t\t\tfi &&\n \t\t\tsleep 1 &&\n-\t\t\tfrom=$(git rev-parse refs/heads/master^0)\n+\t\t\tfrom=$(git rev-parse refs/heads/main^0)\n \t\tdone &&\n \t\tcat <<-INPUT_END &&\n-\t\tcommit refs/heads/master\n+\t\tcommit refs/heads/main\n \t\tcommitter $id\n \t\tdata <<COMMIT\n \t\tmake sure from \"unpacked sha1 reference\" works, too\ndiff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh\nindex 6c8830ece5..409b48e244 100755\n--- a/t/t9350-fast-export.sh\n+++ b/t/t9350-fast-export.sh\n@@ -4,7 +4,7 @@\n #\n \n test_description='git fast-export'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -34,13 +34,13 @@ test_expect_success 'setup' '\n \tgit commit -m sitzt file2 &&\n \ttest_tick &&\n \tgit tag -a -m valentin muss &&\n-\tgit merge -s ours master\n+\tgit merge -s ours main\n \n '\n \n test_expect_success 'fast-export | fast-import' '\n \n-\tMASTER=$(git rev-parse --verify master) &&\n+\tMAIN=$(git rev-parse --verify main) &&\n \tREIN=$(git rev-parse --verify rein) &&\n \tWER=$(git rev-parse --verify wer) &&\n \tMUSS=$(git rev-parse --verify muss) &&\n@@ -49,7 +49,7 @@ test_expect_success 'fast-export | fast-import' '\n \tgit fast-export --all >actual &&\n \t(cd new &&\n \t git fast-import &&\n-\t test $MASTER = $(git rev-parse --verify refs/heads/master) &&\n+\t test $MAIN = $(git rev-parse --verify refs/heads/main) &&\n \t test $REIN = $(git rev-parse --verify refs/tags/rein) &&\n \t test $WER = $(git rev-parse --verify refs/heads/wer) &&\n \t test $MUSS = $(git rev-parse --verify refs/tags/muss)) <actual\n@@ -83,35 +83,35 @@ test_expect_success 'fast-export --mark-tags ^muss^{commit} muss' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success 'fast-export master~2..master' '\n+test_expect_success 'fast-export main~2..main' '\n \n-\tgit fast-export master~2..master >actual &&\n-\tsed \"s/master/partial/\" actual |\n+\tgit fast-export main~2..main >actual &&\n+\tsed \"s/main/partial/\" actual |\n \t\t(cd new &&\n \t\t git fast-import &&\n-\t\t test $MASTER != $(git rev-parse --verify refs/heads/partial) &&\n-\t\t git diff --exit-code master partial &&\n-\t\t git diff --exit-code master^ partial^ &&\n+\t\t test $MAIN != $(git rev-parse --verify refs/heads/partial) &&\n+\t\t git diff --exit-code main partial &&\n+\t\t git diff --exit-code main^ partial^ &&\n \t\t test_must_fail git rev-parse partial~2)\n \n '\n \n-test_expect_success 'fast-export --reference-excluded-parents master~2..master' '\n+test_expect_success 'fast-export --reference-excluded-parents main~2..main' '\n \n-\tgit fast-export --reference-excluded-parents master~2..master >actual &&\n-\tgrep commit.refs/heads/master actual >commit-count &&\n+\tgit fast-export --reference-excluded-parents main~2..main >actual &&\n+\tgrep commit.refs/heads/main actual >commit-count &&\n \ttest_line_count = 2 commit-count &&\n-\tsed \"s/master/rewrite/\" actual |\n+\tsed \"s/main/rewrite/\" actual |\n \t\t(cd new &&\n \t\t git fast-import &&\n-\t\t test $MASTER = $(git rev-parse --verify refs/heads/rewrite))\n+\t\t test $MAIN = $(git rev-parse --verify refs/heads/rewrite))\n '\n \n test_expect_success 'fast-export --show-original-ids' '\n \n-\tgit fast-export --show-original-ids master >output &&\n+\tgit fast-export --show-original-ids main >output &&\n \tgrep ^original-oid output| sed -e s/^original-oid.// | sort >actual &&\n-\tgit rev-list --objects master muss >objects-and-names &&\n+\tgit rev-list --objects main muss >objects-and-names &&\n \tawk \"{print \\$1}\" objects-and-names | sort >commits-trees-blobs &&\n \tcomm -23 actual commits-trees-blobs >unfound &&\n \ttest_must_be_empty unfound\n@@ -119,8 +119,8 @@ test_expect_success 'fast-export --show-original-ids' '\n \n test_expect_success 'fast-export --show-original-ids | git fast-import' '\n \n-\tgit fast-export --show-original-ids master muss | git fast-import --quiet &&\n-\ttest $MASTER = $(git rev-parse --verify refs/heads/master) &&\n+\tgit fast-export --show-original-ids main muss | git fast-import --quiet &&\n+\ttest $MAIN = $(git rev-parse --verify refs/heads/main) &&\n \ttest $MUSS = $(git rev-parse --verify refs/tags/muss)\n '\n \n@@ -203,7 +203,7 @@ test_expect_success 'encoding preserved if reencoding fails' '\n \n test_expect_success 'import/export-marks' '\n \n-\tgit checkout -b marks master &&\n+\tgit checkout -b marks main &&\n \tgit fast-export --export-marks=tmp-marks HEAD &&\n \ttest -s tmp-marks &&\n \ttest_line_count = 3 tmp-marks &&\n@@ -268,7 +268,7 @@ test_expect_success 'signed-tags=warn-strip' '\n \n test_expect_success 'setup submodule' '\n \n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tmkdir sub &&\n \t(\n \t\tcd sub &&\n@@ -293,17 +293,17 @@ test_expect_success 'setup submodule' '\n \n test_expect_success 'submodule fast-export | fast-import' '\n \n-\tSUBENT1=$(git ls-tree master^ sub) &&\n-\tSUBENT2=$(git ls-tree master sub) &&\n+\tSUBENT1=$(git ls-tree main^ sub) &&\n+\tSUBENT2=$(git ls-tree main sub) &&\n \trm -rf new &&\n \tmkdir new &&\n \tgit --git-dir=new/.git init &&\n \tgit fast-export --signed-tags=strip --all >actual &&\n \t(cd new &&\n \t git fast-import &&\n-\t test \"$SUBENT1\" = \"$(git ls-tree refs/heads/master^ sub)\" &&\n-\t test \"$SUBENT2\" = \"$(git ls-tree refs/heads/master sub)\" &&\n-\t git checkout master &&\n+\t test \"$SUBENT1\" = \"$(git ls-tree refs/heads/main^ sub)\" &&\n+\t test \"$SUBENT2\" = \"$(git ls-tree refs/heads/main sub)\" &&\n+\t git checkout main &&\n \t git submodule init &&\n \t git submodule update &&\n \t cmp sub/file ../sub/file) <actual\n@@ -355,7 +355,7 @@ test_expect_success 'fast-export -C -C | fast-import' '\n \n '\n \n-test_expect_success 'fast-export | fast-import when master is tagged' '\n+test_expect_success 'fast-export | fast-import when main is tagged' '\n \n \tgit tag -m msg last &&\n \tgit fast-export -C -C --signed-tags=strip --all > output &&\n@@ -470,8 +470,8 @@ mark :2\n data 3\n hi\n \n-reset refs/heads/master\n-commit refs/heads/master\n+reset refs/heads/main\n+commit refs/heads/main\n mark :3\n author A U Thor <author@example.com> 1112912713 -0700\n committer C O Mitter <committer@example.com> 1112912713 -0700\n@@ -485,7 +485,7 @@ EOF\n test_expect_failure 'no exact-ref revisions included' '\n \t(\n \t\tcd limit-by-paths &&\n-\t\tgit fast-export master~2..master~1 > output &&\n+\t\tgit fast-export main~2..main~1 > output &&\n \t\ttest_cmp expected output\n \t)\n '\n@@ -527,7 +527,7 @@ test_expect_success 'full-tree re-shows unmodified files'        '\n '\n \n test_expect_success 'set-up a few more tags for tag export tests' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tHEAD_TREE=$(git show -s --pretty=raw HEAD | grep tree | sed \"s/tree //\") &&\n \tgit tag    tree_tag        -m \"tagging a tree\" $HEAD_TREE &&\n \tgit tag -a tree_tag-obj    -m \"tagging a tree\" $HEAD_TREE &&\n@@ -552,7 +552,7 @@ test_expect_success 'tag-obj_tag'     'git fast-export tag-obj_tag'\n test_expect_success 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'\n \n test_expect_success 'handling tags of blobs' '\n-\tgit tag -a -m \"Tag of a blob\" blobtag $(git rev-parse master:file) &&\n+\tgit tag -a -m \"Tag of a blob\" blobtag $(git rev-parse main:file) &&\n \tgit fast-export blobtag >actual &&\n \tcat >expect <<-EOF &&\n \tblob\n@@ -595,10 +595,10 @@ test_expect_success 'directory becomes symlink'        '\n \t) &&\n \t(\n \t\tcd dirtosymlink &&\n-\t\tgit fast-export master -- foo |\n+\t\tgit fast-export main -- foo |\n \t\t(cd ../result && git fast-import --quiet)\n \t) &&\n-\t(cd result && git show master:foo)\n+\t(cd result && git show main:foo)\n '\n \n test_expect_success 'fast-export quotes pathnames' '\n@@ -646,7 +646,7 @@ mark :13\n data 5\n bump\n \n-commit refs/heads/master\n+commit refs/heads/main\n mark :14\n author A U Thor <author@example.com> 1112912773 -0700\n committer C O Mitter <committer@example.com> 1112912773 -0700\n@@ -660,18 +660,18 @@ EOF\n test_expect_success 'avoid uninteresting refs' '\n \t> tmp-marks &&\n \tgit fast-export --import-marks=tmp-marks \\\n-\t\t--export-marks=tmp-marks master > /dev/null &&\n+\t\t--export-marks=tmp-marks main > /dev/null &&\n \tgit tag v1.0 &&\n \tgit branch uninteresting &&\n \techo bump > file &&\n \tgit commit -a -m bump &&\n \tgit fast-export --import-marks=tmp-marks \\\n-\t\t--export-marks=tmp-marks ^uninteresting ^v1.0 master > actual &&\n+\t\t--export-marks=tmp-marks ^uninteresting ^v1.0 main > actual &&\n \ttest_cmp expected actual\n '\n \n cat > expected << EOF\n-reset refs/heads/master\n+reset refs/heads/main\n from :14\n \n EOF\n@@ -679,14 +679,14 @@ EOF\n test_expect_success 'refs are updated even if no commits need to be exported' '\n \t> tmp-marks &&\n \tgit fast-export --import-marks=tmp-marks \\\n-\t\t--export-marks=tmp-marks master > /dev/null &&\n+\t\t--export-marks=tmp-marks main > /dev/null &&\n \tgit fast-export --import-marks=tmp-marks \\\n-\t\t--export-marks=tmp-marks master > actual &&\n+\t\t--export-marks=tmp-marks main > actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'use refspec' '\n-\tgit fast-export --refspec refs/heads/master:refs/heads/foobar master >actual2 &&\n+\tgit fast-export --refspec refs/heads/main:refs/heads/foobar main >actual2 &&\n \tgrep \"^commit \" actual2 | sort | uniq >actual &&\n \techo \"commit refs/heads/foobar\" > expected &&\n \ttest_cmp expected actual\n@@ -739,13 +739,13 @@ test_expect_success 'merge commit gets exported with --import-marks' '\n \t\ttest_commit initial &&\n \t\tgit checkout -b topic &&\n \t\ttest_commit on-topic &&\n-\t\tgit checkout master &&\n-\t\ttest_commit on-master &&\n+\t\tgit checkout main &&\n+\t\ttest_commit on-main &&\n \t\ttest_tick &&\n \t\tgit merge --no-ff -m Yeah topic &&\n \n \t\techo \":1 $(git rev-parse HEAD^^)\" >marks &&\n-\t\tgit fast-export --import-marks=marks master >out &&\n+\t\tgit fast-export --import-marks=marks main >out &&\n \t\tgrep Yeah out\n \t)\n '\ndiff --git a/t/t9351-fast-export-anonymize.sh b/t/t9351-fast-export-anonymize.sh\nindex 4130c8a837..1c6e6fcdaf 100755\n--- a/t/t9351-fast-export-anonymize.sh\n+++ b/t/t9351-fast-export-anonymize.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='basic tests for fast-export --anonymize'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -54,7 +54,7 @@ test_expect_success 'stream retains other as refname' '\n '\n \n test_expect_success 'stream omits other refnames' '\n-\t! grep master stream &&\n+\t! grep main stream &&\n \t! grep mytag stream\n '\n \n@@ -88,7 +88,7 @@ test_expect_success 'repo has original shape and timestamps' '\n \tshape () {\n \t\tgit log --format=\"%m %ct\" --left-right --boundary \"$@\"\n \t} &&\n-\t(cd .. && shape master...other) >expect &&\n+\t(cd .. && shape main...other) >expect &&\n \tshape $main_branch...$other_branch >actual &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh\nindex 7d23e6ba94..2d29d486ee 100755\n--- a/t/t9400-git-cvsserver-server.sh\n+++ b/t/t9400-git-cvsserver-server.sh\n@@ -8,7 +8,7 @@ test_description='git-cvsserver access\n tests read access to a git repository with the\n cvs CLI client via git-cvsserver server'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -48,7 +48,7 @@ test_expect_success 'setup' '\n   touch secondrootfile &&\n   git add secondrootfile &&\n   git commit -m \"second root\") &&\n-  git fetch secondroot master &&\n+  git fetch secondroot main &&\n   git merge --allow-unrelated-histories FETCH_HEAD &&\n   git clone -q --bare \"$WORKDIR/.git\" \"$SERVERDIR\" >/dev/null 2>&1 &&\n   GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled true &&\n@@ -60,7 +60,7 @@ test_expect_success 'setup' '\n # note that cvs doesn't accept absolute pathnames\n # as argument to co -d\n test_expect_success 'basic checkout' \\\n-  'GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master &&\n+  'GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main &&\n    test \"$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | head -n 1))\" = \"empty/1.1/\" &&\n    test \"$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | sed -ne \\$p))\" = \"secondrootfile/1.1/\"'\n \n@@ -229,7 +229,7 @@ GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled true || exit 1\n \n test_expect_success 'gitcvs.enabled = false' \\\n   'GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled false &&\n-   if GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1\n+   if GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1\n    then\n      echo unexpected cvs success\n      false\n@@ -243,14 +243,14 @@ rm -fr cvswork2\n test_expect_success 'gitcvs.ext.enabled = true' \\\n   'GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.ext.enabled true &&\n    GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled false &&\n-   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&\n+   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1 &&\n    test_cmp cvswork cvswork2'\n \n rm -fr cvswork2\n test_expect_success 'gitcvs.ext.enabled = false' \\\n   'GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.ext.enabled false &&\n    GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled true &&\n-   if GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1\n+   if GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1\n    then\n      echo unexpected cvs success\n      false\n@@ -264,21 +264,21 @@ rm -fr cvswork2\n test_expect_success 'gitcvs.dbname' \\\n   'GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.ext.enabled true &&\n    GIT_DIR=\"$SERVERDIR\" git config gitcvs.dbname %Ggitcvs.%a.%m.sqlite &&\n-   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&\n+   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1 &&\n    test_cmp cvswork cvswork2 &&\n-   test -f \"$SERVERDIR/gitcvs.ext.master.sqlite\" &&\n-   cmp \"$SERVERDIR/gitcvs.master.sqlite\" \"$SERVERDIR/gitcvs.ext.master.sqlite\"'\n+   test -f \"$SERVERDIR/gitcvs.ext.main.sqlite\" &&\n+   cmp \"$SERVERDIR/gitcvs.main.sqlite\" \"$SERVERDIR/gitcvs.ext.main.sqlite\"'\n \n rm -fr cvswork2\n test_expect_success 'gitcvs.ext.dbname' \\\n   'GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.ext.enabled true &&\n    GIT_DIR=\"$SERVERDIR\" git config gitcvs.ext.dbname %Ggitcvs1.%a.%m.sqlite &&\n    GIT_DIR=\"$SERVERDIR\" git config gitcvs.dbname %Ggitcvs2.%a.%m.sqlite &&\n-   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&\n+   GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1 &&\n    test_cmp cvswork cvswork2 &&\n-   test -f \"$SERVERDIR/gitcvs1.ext.master.sqlite\" &&\n-   test ! -f \"$SERVERDIR/gitcvs2.ext.master.sqlite\" &&\n-   cmp \"$SERVERDIR/gitcvs.master.sqlite\" \"$SERVERDIR/gitcvs1.ext.master.sqlite\"'\n+   test -f \"$SERVERDIR/gitcvs1.ext.main.sqlite\" &&\n+   test ! -f \"$SERVERDIR/gitcvs2.ext.main.sqlite\" &&\n+   cmp \"$SERVERDIR/gitcvs.main.sqlite\" \"$SERVERDIR/gitcvs1.ext.main.sqlite\"'\n \n \n #------------\n@@ -460,7 +460,7 @@ cd \"$WORKDIR\"\n test_expect_success 'cvs update (module list supports packed refs)' '\n     GIT_DIR=\"$SERVERDIR\" git pack-refs --all &&\n     GIT_CONFIG=\"$git_config\" cvs -n up -d 2> out &&\n-    grep \"cvs update: New directory \\`master'\\''\" < out\n+    grep \"cvs update: New directory \\`main'\\''\" < out\n '\n \n #------------\n@@ -502,8 +502,8 @@ test_expect_success 'cvs status (no subdirs in header)' '\n cd \"$WORKDIR\"\n test_expect_success 'cvs co -c (shows module database)' '\n     GIT_CONFIG=\"$git_config\" cvs co -c > out &&\n-    grep \"^master[\t ][ \t]*master$\" <out &&\n-    ! grep -v \"^master[\t ][ \t]*master$\" <out\n+    grep \"^main[\t ][ \t]*main$\" <out &&\n+    ! grep -v \"^main[\t ][ \t]*main$\" <out\n '\n \n #------------\n@@ -529,7 +529,7 @@ test_expect_success 'cvs co -c (shows module database)' '\n \n sed -e 's/^x//' -e 's/SP$/ /' > \"$WORKDIR/expect\" <<EOF\n x\n-xRCS file: $WORKDIR/gitcvs.git/master/merge,v\n+xRCS file: $WORKDIR/gitcvs.git/main/merge,v\n xWorking file: merge\n xhead: 1.4\n xbranch:\ndiff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh\nindex 0062341dbf..a34805acdc 100755\n--- a/t/t9401-git-cvsserver-crlf.sh\n+++ b/t/t9401-git-cvsserver-crlf.sh\n@@ -9,7 +9,7 @@ test_description='git-cvsserver -kb modes\n tests -kb mode for binary files when accessing a git\n repository using cvs CLI client via git-cvsserver server'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -108,14 +108,14 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'cvs co (default crlf)' '\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     test x\"$(grep '/-k' cvswork/CVS/Entries cvswork/subdir/CVS/Entries)\" = x\"\"\n '\n \n rm -rf cvswork\n test_expect_success 'cvs co (allbinary)' '\n     GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.allbinary true &&\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     marked_as cvswork textfile.c -kb &&\n     marked_as cvswork binfile.bin -kb &&\n     marked_as cvswork .gitattributes -kb &&\n@@ -128,7 +128,7 @@ test_expect_success 'cvs co (allbinary)' '\n rm -rf cvswork cvs.log\n test_expect_success 'cvs co (use attributes/allbinary)' '\n     GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.usecrlfattr true &&\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     marked_as cvswork textfile.c \"\" &&\n     marked_as cvswork binfile.bin -kb &&\n     marked_as cvswork .gitattributes -kb &&\n@@ -141,7 +141,7 @@ test_expect_success 'cvs co (use attributes/allbinary)' '\n rm -rf cvswork\n test_expect_success 'cvs co (use attributes)' '\n     GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.allbinary false &&\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     marked_as cvswork textfile.c \"\" &&\n     marked_as cvswork binfile.bin -kb &&\n     marked_as cvswork .gitattributes \"\" &&\n@@ -197,7 +197,7 @@ test_expect_success 'updating' '\n rm -rf cvswork\n test_expect_success 'cvs co (use attributes/guess)' '\n     GIT_DIR=\"$SERVERDIR\" git config gitcvs.allbinary guess &&\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     marked_as cvswork textfile.c \"\" &&\n     marked_as cvswork binfile.bin -kb &&\n     marked_as cvswork .gitattributes \"\" &&\n@@ -227,7 +227,7 @@ test_expect_success 'setup multi-line files' '\n rm -rf cvswork\n test_expect_success 'cvs co (guess)' '\n     GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.usecrlfattr false &&\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork main >cvs.log 2>&1 &&\n     marked_as cvswork textfile.c \"\" &&\n     marked_as cvswork binfile.bin -kb &&\n     marked_as cvswork .gitattributes \"\" &&\n@@ -242,7 +242,7 @@ test_expect_success 'cvs co (guess)' '\n '\n \n test_expect_success 'cvs co another copy (guess)' '\n-    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&\n+    GIT_CONFIG=\"$git_config\" cvs -Q co -d cvswork2 main >cvs.log 2>&1 &&\n     marked_as cvswork2 textfile.c \"\" &&\n     marked_as cvswork2 binfile.bin -kb &&\n     marked_as cvswork2 .gitattributes \"\" &&\n@@ -338,7 +338,7 @@ test_expect_success 'update subdir of other copy (guess)' '\n \n echo \"starting update/merge\" >> \"${WORKDIR}/marked.log\"\n test_expect_success 'update/merge full other copy (guess)' '\n-    git pull gitcvs.git master &&\n+    git pull gitcvs.git main &&\n     sed \"s/3/replaced_3/\" < multilineTxt.c > ml.temp &&\n     mv ml.temp multilineTxt.c &&\n     git add multilineTxt.c &&\ndiff --git a/t/t9402-git-cvsserver-refs.sh b/t/t9402-git-cvsserver-refs.sh\nindex 33b6db1648..2ee41f9443 100755\n--- a/t/t9402-git-cvsserver-refs.sh\n+++ b/t/t9402-git-cvsserver-refs.sh\n@@ -5,7 +5,7 @@ test_description='git-cvsserver and git refspecs\n tests ability for git-cvsserver to switch between and compare\n tags, branches and other git refspecs'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -118,7 +118,7 @@ test_expect_success 'setup v1, b1' '\n \n rm -rf cvswork\n test_expect_success 'cvs co v1' '\n-\tcvs -f -Q co -r v1 -d cvswork master >cvs.log 2>&1 &&\n+\tcvs -f -Q co -r v1 -d cvswork main >cvs.log 2>&1 &&\n \tcheck_start_tree cvswork &&\n \tcheck_file cvswork textfile.c v1 &&\n \tcheck_file cvswork t2 v1 &&\n@@ -131,7 +131,7 @@ test_expect_success 'cvs co v1' '\n \n rm -rf cvswork\n test_expect_success 'cvs co b1' '\n-\tcvs -f co -r b1 -d cvswork master >cvs.log 2>&1 &&\n+\tcvs -f co -r b1 -d cvswork main >cvs.log 2>&1 &&\n \tcheck_start_tree cvswork &&\n \tcheck_file cvswork textfile.c v1 &&\n \tcheck_file cvswork t2 v1 &&\n@@ -143,7 +143,7 @@ test_expect_success 'cvs co b1' '\n '\n \n test_expect_success 'cvs co b1 [cvswork3]' '\n-\tcvs -f co -r b1 -d cvswork3 master >cvs.log 2>&1 &&\n+\tcvs -f co -r b1 -d cvswork3 main >cvs.log 2>&1 &&\n \tcheck_start_tree cvswork3 &&\n \tcheck_file cvswork3 textfile.c v1 &&\n \tcheck_file cvswork3 t2 v1 &&\n@@ -268,7 +268,7 @@ test_expect_success 'setup simple b2' '\n '\n \n test_expect_success 'cvs co b2 [into cvswork2]' '\n-\tcvs -f co -r b2 -d cvswork2 master >cvs.log 2>&1 &&\n+\tcvs -f co -r b2 -d cvswork2 main >cvs.log 2>&1 &&\n \tcheck_start_tree cvswork &&\n \tcheck_file cvswork textfile.c v1 &&\n \tcheck_file cvswork t2 v1 &&\n-- \ngitgitgadget\n\n"},{"id":"410310","messageId":"bbc17c8ee58b5a772f4a46fbaab21f107ede587e.1605743088.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 27/28] t99*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:45Z","receivedAt":"2020-11-18T23:45:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t9902, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in\nt9903. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t99*.sh lib-cvs.sh &&\n\t   git checkout HEAD -- t9902\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor all tests (except the ones we specifically excluded for now).\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9903-bash-prompt.sh | 116 ++++++++++++++++++++---------------------\n 1 file changed, 58 insertions(+), 58 deletions(-)\n\ndiff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh\nindex f5b5935c2c..bbd513bab0 100755\n--- a/t/t9903-bash-prompt.sh\n+++ b/t/t9903-bash-prompt.sh\n@@ -5,7 +5,7 @@\n \n test_description='test git-specific bash prompt functions'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-bash.sh\n@@ -31,7 +31,7 @@ test_expect_success 'setup for prompt tests' '\n \techo 3 >file &&\n \tgit commit -m \"third b1\" file &&\n \tgit tag -a -m msg2 t2 &&\n-\tgit checkout -b b2 master &&\n+\tgit checkout -b b2 main &&\n \techo 0 >file &&\n \tgit commit -m \"second b2\" file &&\n \techo 00 >file &&\n@@ -40,20 +40,20 @@ test_expect_success 'setup for prompt tests' '\n \tgit commit -m \"yet another b2\" file &&\n \tmkdir ignored_dir &&\n \techo \"ignored_dir/\" >>.gitignore &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'prompt - branch name' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \t__git_ps1 >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n \n test_expect_success SYMLINKS 'prompt - branch name - symlink symref' '\n-\tprintf \" (master)\" >expected &&\n-\ttest_when_finished \"git checkout master\" &&\n+\tprintf \" (main)\" >expected &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_config core.preferSymlinkRefs true &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \t__git_ps1 >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n@@ -61,7 +61,7 @@ test_expect_success SYMLINKS 'prompt - branch name - symlink symref' '\n test_expect_success 'prompt - unborn branch' '\n \tprintf \" (unborn)\" >expected &&\n \tgit checkout --orphan unborn &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t__git_ps1 >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n@@ -75,7 +75,7 @@ test_expect_success FUNNYNAMES 'prompt - with newline in path' '\n with\n newline\" &&\n \tmkdir \"$repo_with_newline\" &&\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \tgit init \"$repo_with_newline\" &&\n \ttest_when_finished \"rm -rf \\\"$repo_with_newline\\\"\" &&\n \tmkdir \"$repo_with_newline\"/subdir &&\n@@ -90,7 +90,7 @@ test_expect_success 'prompt - detached head' '\n \tprintf \" ((%s...))\" $(git log -1 --format=\"%h\" --abbrev=13 b1^) >expected &&\n \ttest_config core.abbrev 13 &&\n \tgit checkout b1^ &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t__git_ps1 >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n@@ -98,7 +98,7 @@ test_expect_success 'prompt - detached head' '\n test_expect_success 'prompt - describe detached head - contains' '\n \tprintf \" ((t2~1))\" >expected &&\n \tgit checkout b1^ &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t(\n \t\tGIT_PS1_DESCRIBE_STYLE=contains &&\n \t\t__git_ps1 >\"$actual\"\n@@ -109,7 +109,7 @@ test_expect_success 'prompt - describe detached head - contains' '\n test_expect_success 'prompt - describe detached head - branch' '\n \tprintf \" ((tags/t2~1))\" >expected &&\n \tgit checkout b1^ &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t(\n \t\tGIT_PS1_DESCRIBE_STYLE=branch &&\n \t\t__git_ps1 >\"$actual\"\n@@ -120,7 +120,7 @@ test_expect_success 'prompt - describe detached head - branch' '\n test_expect_success 'prompt - describe detached head - describe' '\n \tprintf \" ((t1-1-g%s))\" $(git log -1 --format=\"%h\" b1^) >expected &&\n \tgit checkout b1^ &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t(\n \t\tGIT_PS1_DESCRIBE_STYLE=describe &&\n \t\t__git_ps1 >\"$actual\"\n@@ -131,7 +131,7 @@ test_expect_success 'prompt - describe detached head - describe' '\n test_expect_success 'prompt - describe detached head - default' '\n \tprintf \" ((t2))\" >expected &&\n \tgit checkout --detach b1 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t__git_ps1 >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n@@ -155,7 +155,7 @@ test_expect_success 'prompt - deep inside .git directory' '\n '\n \n test_expect_success 'prompt - inside bare repository' '\n-\tprintf \" (BARE:master)\" >expected &&\n+\tprintf \" (BARE:main)\" >expected &&\n \tgit init --bare bare.git &&\n \ttest_when_finished \"rm -rf bare.git\" &&\n \t(\n@@ -175,7 +175,7 @@ test_expect_success 'prompt - interactive rebase' '\n \ttest_when_finished \"rm -f fake_editor.sh\" &&\n \ttest_set_editor \"$TRASH_DIRECTORY/fake_editor.sh\" &&\n \tgit checkout b1 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit rebase -i HEAD^ &&\n \ttest_when_finished \"git rebase --abort\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -185,7 +185,7 @@ test_expect_success 'prompt - interactive rebase' '\n test_expect_success 'prompt - rebase merge' '\n \tprintf \" (b2|REBASE 1/3)\" >expected &&\n \tgit checkout b2 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_must_fail git rebase --merge b1 b2 &&\n \ttest_when_finished \"git rebase --abort\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -195,7 +195,7 @@ test_expect_success 'prompt - rebase merge' '\n test_expect_success 'prompt - rebase am' '\n \tprintf \" (b2|REBASE 1/3)\" >expected &&\n \tgit checkout b2 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_must_fail git rebase --apply b1 b2 &&\n \ttest_when_finished \"git rebase --abort\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -205,7 +205,7 @@ test_expect_success 'prompt - rebase am' '\n test_expect_success 'prompt - merge' '\n \tprintf \" (b1|MERGING)\" >expected &&\n \tgit checkout b1 &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \ttest_must_fail git merge b2 &&\n \ttest_when_finished \"git reset --hard\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -213,7 +213,7 @@ test_expect_success 'prompt - merge' '\n '\n \n test_expect_success 'prompt - cherry-pick' '\n-\tprintf \" (master|CHERRY-PICKING)\" >expected &&\n+\tprintf \" (main|CHERRY-PICKING)\" >expected &&\n \ttest_must_fail git cherry-pick b1 b1^ &&\n \ttest_when_finished \"git cherry-pick --abort\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -225,7 +225,7 @@ test_expect_success 'prompt - cherry-pick' '\n '\n \n test_expect_success 'prompt - revert' '\n-\tprintf \" (master|REVERTING)\" >expected &&\n+\tprintf \" (main|REVERTING)\" >expected &&\n \ttest_must_fail git revert b1^ b1 &&\n \ttest_when_finished \"git revert --abort\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -237,7 +237,7 @@ test_expect_success 'prompt - revert' '\n '\n \n test_expect_success 'prompt - bisect' '\n-\tprintf \" (master|BISECTING)\" >expected &&\n+\tprintf \" (main|BISECTING)\" >expected &&\n \tgit bisect start &&\n \ttest_when_finished \"git bisect reset\" &&\n \t__git_ps1 >\"$actual\" &&\n@@ -245,7 +245,7 @@ test_expect_success 'prompt - bisect' '\n '\n \n test_expect_success 'prompt - dirty status indicator - clean' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWDIRTYSTATE=y &&\n \t\t__git_ps1 >\"$actual\"\n@@ -254,7 +254,7 @@ test_expect_success 'prompt - dirty status indicator - clean' '\n '\n \n test_expect_success 'prompt - dirty status indicator - dirty worktree' '\n-\tprintf \" (master *)\" >expected &&\n+\tprintf \" (main *)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \t(\n@@ -265,7 +265,7 @@ test_expect_success 'prompt - dirty status indicator - dirty worktree' '\n '\n \n test_expect_success 'prompt - dirty status indicator - dirty index' '\n-\tprintf \" (master +)\" >expected &&\n+\tprintf \" (main +)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \tgit add -u &&\n@@ -277,7 +277,7 @@ test_expect_success 'prompt - dirty status indicator - dirty index' '\n '\n \n test_expect_success 'prompt - dirty status indicator - dirty index and worktree' '\n-\tprintf \" (master *+)\" >expected &&\n+\tprintf \" (main *+)\" >expected &&\n \techo \"dirty index\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \tgit add -u &&\n@@ -291,7 +291,7 @@ test_expect_success 'prompt - dirty status indicator - dirty index and worktree'\n \n test_expect_success 'prompt - dirty status indicator - orphan branch - clean' '\n \tprintf \" (orphan #)\" >expected &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit checkout --orphan orphan &&\n \tgit reset --hard &&\n \t(\n@@ -303,7 +303,7 @@ test_expect_success 'prompt - dirty status indicator - orphan branch - clean' '\n \n test_expect_success 'prompt - dirty status indicator - orphan branch - dirty index' '\n \tprintf \" (orphan +)\" >expected &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit checkout --orphan orphan &&\n \t(\n \t\tGIT_PS1_SHOWDIRTYSTATE=y &&\n@@ -314,7 +314,7 @@ test_expect_success 'prompt - dirty status indicator - orphan branch - dirty ind\n \n test_expect_success 'prompt - dirty status indicator - orphan branch - dirty index and worktree' '\n \tprintf \" (orphan *+)\" >expected &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tgit checkout --orphan orphan &&\n \t>file &&\n \t(\n@@ -325,7 +325,7 @@ test_expect_success 'prompt - dirty status indicator - orphan branch - dirty ind\n '\n \n test_expect_success 'prompt - dirty status indicator - shell variable unset with config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \ttest_config bash.showDirtyState false &&\n@@ -337,7 +337,7 @@ test_expect_success 'prompt - dirty status indicator - shell variable unset with\n '\n \n test_expect_success 'prompt - dirty status indicator - shell variable unset with config enabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \ttest_config bash.showDirtyState true &&\n@@ -349,7 +349,7 @@ test_expect_success 'prompt - dirty status indicator - shell variable unset with\n '\n \n test_expect_success 'prompt - dirty status indicator - shell variable set with config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \ttest_config bash.showDirtyState false &&\n@@ -361,7 +361,7 @@ test_expect_success 'prompt - dirty status indicator - shell variable set with c\n '\n \n test_expect_success 'prompt - dirty status indicator - shell variable set with config enabled' '\n-\tprintf \" (master *)\" >expected &&\n+\tprintf \" (main *)\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \ttest_config bash.showDirtyState true &&\n@@ -385,7 +385,7 @@ test_expect_success 'prompt - dirty status indicator - not shown inside .git dir\n '\n \n test_expect_success 'prompt - stash status indicator - no stash' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWSTASHSTATE=y &&\n \t\t__git_ps1 >\"$actual\"\n@@ -394,7 +394,7 @@ test_expect_success 'prompt - stash status indicator - no stash' '\n '\n \n test_expect_success 'prompt - stash status indicator - stash' '\n-\tprintf \" (master $)\" >expected &&\n+\tprintf \" (main $)\" >expected &&\n \techo 2 >file &&\n \tgit stash &&\n \ttest_when_finished \"git stash drop\" &&\n@@ -420,7 +420,7 @@ test_expect_success 'prompt - stash status indicator - not shown inside .git dir\n '\n \n test_expect_success 'prompt - untracked files status indicator - no untracked files' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWUNTRACKEDFILES=y &&\n \t\tcd otherrepo &&\n@@ -430,7 +430,7 @@ test_expect_success 'prompt - untracked files status indicator - no untracked fi\n '\n \n test_expect_success 'prompt - untracked files status indicator - untracked files' '\n-\tprintf \" (master %%)\" >expected &&\n+\tprintf \" (main %%)\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWUNTRACKEDFILES=y &&\n \t\t__git_ps1 >\"$actual\"\n@@ -439,7 +439,7 @@ test_expect_success 'prompt - untracked files status indicator - untracked files\n '\n \n test_expect_success 'prompt - untracked files status indicator - empty untracked dir' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \tmkdir otherrepo/untracked-dir &&\n \ttest_when_finished \"rm -rf otherrepo/untracked-dir\" &&\n \t(\n@@ -451,7 +451,7 @@ test_expect_success 'prompt - untracked files status indicator - empty untracked\n '\n \n test_expect_success 'prompt - untracked files status indicator - non-empty untracked dir' '\n-\tprintf \" (master %%)\" >expected &&\n+\tprintf \" (main %%)\" >expected &&\n \tmkdir otherrepo/untracked-dir &&\n \ttest_when_finished \"rm -rf otherrepo/untracked-dir\" &&\n \t>otherrepo/untracked-dir/untracked-file &&\n@@ -464,7 +464,7 @@ test_expect_success 'prompt - untracked files status indicator - non-empty untra\n '\n \n test_expect_success 'prompt - untracked files status indicator - untracked files outside cwd' '\n-\tprintf \" (master %%)\" >expected &&\n+\tprintf \" (main %%)\" >expected &&\n \t(\n \t\tmkdir -p ignored_dir &&\n \t\tcd ignored_dir &&\n@@ -475,7 +475,7 @@ test_expect_success 'prompt - untracked files status indicator - untracked files\n '\n \n test_expect_success 'prompt - untracked files status indicator - shell variable unset with config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \ttest_config bash.showUntrackedFiles false &&\n \t(\n \t\tsane_unset GIT_PS1_SHOWUNTRACKEDFILES &&\n@@ -485,7 +485,7 @@ test_expect_success 'prompt - untracked files status indicator - shell variable\n '\n \n test_expect_success 'prompt - untracked files status indicator - shell variable unset with config enabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \ttest_config bash.showUntrackedFiles true &&\n \t(\n \t\tsane_unset GIT_PS1_SHOWUNTRACKEDFILES &&\n@@ -495,7 +495,7 @@ test_expect_success 'prompt - untracked files status indicator - shell variable\n '\n \n test_expect_success 'prompt - untracked files status indicator - shell variable set with config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \ttest_config bash.showUntrackedFiles false &&\n \t(\n \t\tGIT_PS1_SHOWUNTRACKEDFILES=y &&\n@@ -505,7 +505,7 @@ test_expect_success 'prompt - untracked files status indicator - shell variable\n '\n \n test_expect_success 'prompt - untracked files status indicator - shell variable set with config enabled' '\n-\tprintf \" (master %%)\" >expected &&\n+\tprintf \" (main %%)\" >expected &&\n \ttest_config bash.showUntrackedFiles true &&\n \t(\n \t\tGIT_PS1_SHOWUNTRACKEDFILES=y &&\n@@ -525,13 +525,13 @@ test_expect_success 'prompt - untracked files status indicator - not shown insid\n '\n \n test_expect_success 'prompt - format string starting with dash' '\n-\tprintf -- \"-master\" >expected &&\n+\tprintf -- \"-main\" >expected &&\n \t__git_ps1 \"-%s\" >\"$actual\" &&\n \ttest_cmp expected \"$actual\"\n '\n \n test_expect_success 'prompt - pc mode' '\n-\tprintf \"BEFORE: (\\${__git_ps1_branch_name}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (\\${__git_ps1_branch_name}):AFTER\\\\nmain\" >expected &&\n \t(\n \t\t__git_ps1 \"BEFORE:\" \":AFTER\" >\"$actual\" &&\n \t\ttest_must_be_empty \"$actual\" &&\n@@ -541,7 +541,7 @@ test_expect_success 'prompt - pc mode' '\n '\n \n test_expect_success 'prompt - bash color pc mode - branch name' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear}):AFTER\\\\nmain\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n \t\t__git_ps1 \"BEFORE:\" \":AFTER\" >\"$actual\" &&\n@@ -553,7 +553,7 @@ test_expect_success 'prompt - bash color pc mode - branch name' '\n test_expect_success 'prompt - bash color pc mode - detached head' '\n \tprintf \"BEFORE: (${c_red}\\${__git_ps1_branch_name}${c_clear}):AFTER\\\\n(%s...)\" $(git log -1 --format=\"%h\" b1^) >expected &&\n \tgit checkout b1^ &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \t(\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n \t\t__git_ps1 \"BEFORE:\" \":AFTER\" &&\n@@ -563,7 +563,7 @@ test_expect_success 'prompt - bash color pc mode - detached head' '\n '\n \n test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirty worktree' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}*${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}*${c_clear}):AFTER\\\\nmain\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \t(\n@@ -576,7 +576,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirt\n '\n \n test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirty index' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_green}+${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_green}+${c_clear}):AFTER\\\\nmain\" >expected &&\n \techo \"dirty\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \tgit add -u &&\n@@ -590,7 +590,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirt\n '\n \n test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirty index and worktree' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}*${c_green}+${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}*${c_green}+${c_clear}):AFTER\\\\nmain\" >expected &&\n \techo \"dirty index\" >file &&\n \ttest_when_finished \"git reset --hard\" &&\n \tgit add -u &&\n@@ -605,7 +605,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirt\n '\n \n test_expect_success 'prompt - bash color pc mode - dirty status indicator - before root commit' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_green}#${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_green}#${c_clear}):AFTER\\\\nmain\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWDIRTYSTATE=y &&\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n@@ -631,7 +631,7 @@ test_expect_success 'prompt - bash color pc mode - inside .git directory' '\n '\n \n test_expect_success 'prompt - bash color pc mode - stash status indicator' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_lblue}\\$${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_lblue}\\$${c_clear}):AFTER\\\\nmain\" >expected &&\n \techo 2 >file &&\n \tgit stash &&\n \ttest_when_finished \"git stash drop\" &&\n@@ -645,7 +645,7 @@ test_expect_success 'prompt - bash color pc mode - stash status indicator' '\n '\n \n test_expect_success 'prompt - bash color pc mode - untracked files status indicator' '\n-\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}%%${c_clear}):AFTER\\\\nmaster\" >expected &&\n+\tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear} ${c_red}%%${c_clear}):AFTER\\\\nmain\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWUNTRACKEDFILES=y &&\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n@@ -656,7 +656,7 @@ test_expect_success 'prompt - bash color pc mode - untracked files status indica\n '\n \n test_expect_success 'prompt - zsh color pc mode' '\n-\tprintf \"BEFORE: (%%F{green}master%%f):AFTER\" >expected &&\n+\tprintf \"BEFORE: (%%F{green}main%%f):AFTER\" >expected &&\n \t(\n \t\tZSH_VERSION=5.0.0 &&\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n@@ -667,7 +667,7 @@ test_expect_success 'prompt - zsh color pc mode' '\n '\n \n test_expect_success 'prompt - hide if pwd ignored - env var unset, config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \ttest_config bash.hideIfPwdIgnored false &&\n \t(\n \t\tcd ignored_dir &&\n@@ -688,7 +688,7 @@ test_expect_success 'prompt - hide if pwd ignored - env var unset, config disabl\n '\n \n test_expect_success 'prompt - hide if pwd ignored - env var unset, config unset' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \t(\n \t\tcd ignored_dir &&\n \t\t__git_ps1 >\"$actual\"\n@@ -707,7 +707,7 @@ test_expect_success 'prompt - hide if pwd ignored - env var unset, config unset,\n '\n \n test_expect_success 'prompt - hide if pwd ignored - env var set, config disabled' '\n-\tprintf \" (master)\" >expected &&\n+\tprintf \" (main)\" >expected &&\n \ttest_config bash.hideIfPwdIgnored false &&\n \t(\n \t\tcd ignored_dir &&\n-- \ngitgitgadget\n\n"},{"id":"410299","messageId":"3dbc83c6a16e9d579c540852a486d94fbb70cfb2.1605743088.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 20/28] t6[4-9]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:38Z","receivedAt":"2020-11-18T23:45:24Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t6[4-9]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t6400-merge-df.sh                       |  8 ++--\n t/t6402-merge-rename.sh                   | 48 +++++++++++------------\n t/t6404-recursive-merge.sh                |  6 +--\n t/t6405-merge-symlinks.sh                 | 16 ++++----\n t/t6406-merge-attr.sh                     | 26 ++++++------\n t/t6407-merge-binary.sh                   |  8 ++--\n t/t6409-merge-subtree.sh                  | 18 ++++-----\n t/t6411-merge-filemode.sh                 | 12 +++---\n t/t6412-merge-large-rename.sh             |  8 ++--\n t/t6413-merge-crlf.sh                     |  4 +-\n t/t6414-merge-rename-nocruft.sh           |  4 +-\n t/t6415-merge-dir-to-symlink.sh           | 24 ++++++------\n t/t6416-recursive-corner-cases.sh         | 30 +++++++-------\n t/t6417-merge-ours-theirs.sh              | 30 +++++++-------\n t/t6418-merge-text-auto.sh                | 14 +++----\n t/t6419-merge-ignorecase.sh               | 12 +++---\n t/t6422-merge-rename-corner-cases.sh      | 14 +++----\n t/t6425-merge-rename-delete.sh            |  4 +-\n t/t6427-diff3-conflict-markers.sh         | 16 ++++----\n t/t6430-merge-recursive.sh                | 20 +++++-----\n t/t6432-merge-recursive-space-options.sh  |  8 ++--\n t/t6433-merge-toplevel.sh                 | 10 ++---\n t/t6434-merge-recursive-rename-options.sh |  8 ++--\n t/t6436-merge-overwrite.sh                |  4 +-\n t/t6437-submodule-merge.sh                | 16 ++++----\n t/t6439-merge-co-error-msgs.sh            |  8 ++--\n t/t6501-freshen-objects.sh                |  4 +-\n 27 files changed, 190 insertions(+), 190 deletions(-)\n\ndiff --git a/t/t6400-merge-df.sh b/t/t6400-merge-df.sh\nindex 5fab2d2dd7..38700d29b5 100755\n--- a/t/t6400-merge-df.sh\n+++ b/t/t6400-merge-df.sh\n@@ -4,7 +4,7 @@\n #\n \n test_description='Test merge with directory/file conflicts'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -27,12 +27,12 @@ test_expect_success 'prepare repository' '\n '\n \n test_expect_success 'Merge with d/f conflicts' '\n-\ttest_expect_code 1 git merge -m \"merge msg\" master\n+\ttest_expect_code 1 git merge -m \"merge msg\" main\n '\n \n test_expect_success 'F/D conflict' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \trm .git/index &&\n \n \tmkdir before &&\n@@ -50,7 +50,7 @@ test_expect_success 'F/D conflict' '\n \tgit add . &&\n \tgit commit -m para &&\n \n-\tgit merge master\n+\tgit merge main\n '\n \n test_expect_success 'setup modify/delete + directory/file conflict' '\ndiff --git a/t/t6402-merge-rename.sh b/t/t6402-merge-rename.sh\nindex 227c2feb08..425dad97d5 100755\n--- a/t/t6402-merge-rename.sh\n+++ b/t/t6402-merge-rename.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='Merge-recursive merging renames'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -57,9 +57,9 @@ test_expect_success 'setup' '\n \tgit branch change &&\n \tgit branch change+rename &&\n \n-\tsed -e \"/^g /s/.*/g : master changes a line/\" <A >A+ &&\n+\tsed -e \"/^g /s/.*/g : main changes a line/\" <A >A+ &&\n \tmv A+ A &&\n-\tgit commit -a -m \"master updates A\" &&\n+\tgit commit -a -m \"main updates A\" &&\n \n \tgit checkout yellow &&\n \trm -f M &&\n@@ -97,7 +97,7 @@ test_expect_success 'setup' '\n \tgit update-index --add B &&\n \tgit commit -q -a -m \"changed and renamed\" &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'pull renaming branch into unrenaming one' \\\n@@ -112,7 +112,7 @@ test_expect_success 'pull renaming branch into unrenaming one' \\\n \tsed -ne \"/^g/{\n \tp\n \tq\n-\t}\" B | grep master &&\n+\t}\" B | grep main &&\n \tgit diff --exit-code white N\n '\n \n@@ -137,7 +137,7 @@ test_expect_success 'pull unrenaming branch into renaming one' \\\n '\n \tgit reset --hard &&\n \tgit show-branch &&\n-\ttest_expect_code 1 git pull . master &&\n+\ttest_expect_code 1 git pull . main &&\n \tgit ls-files -u B >b.stages &&\n \ttest_line_count = 3 b.stages &&\n \tgit ls-files -s N >n.stages &&\n@@ -190,7 +190,7 @@ test_expect_success 'interference with untracked working tree file' '\n test_expect_success 'interference with untracked working tree file' '\n \tgit reset --hard &&\n \trm -f A M &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit tag -f anchor &&\n \tgit show-branch &&\n \tgit pull . yellow &&\n@@ -201,7 +201,7 @@ test_expect_success 'interference with untracked working tree file' '\n test_expect_success 'updated working tree file should prevent the merge' '\n \tgit reset --hard &&\n \trm -f A M &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit tag -f anchor &&\n \tgit show-branch &&\n \techo >>M one line addition &&\n@@ -214,7 +214,7 @@ test_expect_success 'updated working tree file should prevent the merge' '\n test_expect_success 'updated working tree file should prevent the merge' '\n \tgit reset --hard &&\n \trm -f A M &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit tag -f anchor &&\n \tgit show-branch &&\n \techo >>M one line addition &&\n@@ -232,7 +232,7 @@ test_expect_success 'interference with untracked working tree file' '\n \tgit tag -f anchor &&\n \tgit show-branch &&\n \techo >M this file should not matter &&\n-\tgit pull . master &&\n+\tgit pull . main &&\n \ttest_path_is_file M &&\n \t! {\n \t\tgit ls-files -s |\n@@ -767,7 +767,7 @@ test_expect_success 'setup avoid unnecessary update, dir->(file,nothing)' '\n \tgit rm -rf df &&\n \tgit commit -mB &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit rm -rf df &&\n \techo bla >df &&\n \tgit add -A &&\n@@ -775,7 +775,7 @@ test_expect_success 'setup avoid unnecessary update, dir->(file,nothing)' '\n '\n \n test_expect_success 'avoid unnecessary update, dir->(file,nothing)' '\n-\tgit checkout -q master^0 &&\n+\tgit checkout -q main^0 &&\n \ttest-tool chmtime --get -3600 df >expect &&\n \tgit merge side &&\n \ttest-tool chmtime --get df >actual &&\n@@ -797,14 +797,14 @@ test_expect_success 'setup avoid unnecessary update, modify/delete' '\n \tgit rm -f file &&\n \tgit commit -m \"Delete file\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo bla >file &&\n \tgit add -A &&\n \tgit commit -m \"Modify file\"\n '\n \n test_expect_success 'avoid unnecessary update, modify/delete' '\n-\tgit checkout -q master^0 &&\n+\tgit checkout -q main^0 &&\n \ttest-tool chmtime --get -3600 file >expect &&\n \ttest_must_fail git merge side &&\n \ttest-tool chmtime --get file >actual &&\n@@ -826,13 +826,13 @@ test_expect_success 'setup avoid unnecessary update, rename/add-dest' '\n \tgit add -A &&\n \tgit commit -m \"Add file copy\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit mv file newfile &&\n \tgit commit -m \"Rename file\"\n '\n \n test_expect_success 'avoid unnecessary update, rename/add-dest' '\n-\tgit checkout -q master^0 &&\n+\tgit checkout -q main^0 &&\n \ttest-tool chmtime --get -3600 newfile >expect &&\n \tgit merge side &&\n \ttest-tool chmtime --get newfile >actual &&\n@@ -882,15 +882,15 @@ test_expect_success 'setup for use of extended merge markers' '\n \tgit mv original_file renamed_file &&\n \tgit commit -mB &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo 8.5 >>original_file &&\n \tgit add original_file &&\n \tgit commit -mC\n '\n \n-test_expect_success 'merge master into rename has correct extended markers' '\n+test_expect_success 'merge main into rename has correct extended markers' '\n \tgit checkout rename^0 &&\n-\ttest_must_fail git merge -s recursive master^0 &&\n+\ttest_must_fail git merge -s recursive main^0 &&\n \n \tcat >expected <<-\\EOF &&\n \t1\n@@ -905,14 +905,14 @@ test_expect_success 'merge master into rename has correct extended markers' '\n \t9\n \t=======\n \t8.5\n-\t>>>>>>> master^0:original_file\n+\t>>>>>>> main^0:original_file\n \tEOF\n \ttest_cmp expected renamed_file\n '\n \n-test_expect_success 'merge rename into master has correct extended markers' '\n+test_expect_success 'merge rename into main has correct extended markers' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git merge -s recursive rename^0 &&\n \n \tcat >expected <<-\\EOF &&\n@@ -948,13 +948,13 @@ test_expect_success 'setup spurious \"refusing to lose untracked\" message' '\n \tgit mv original_file renamed_file &&\n \tgit commit -mB &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit rm original_file &&\n \tgit commit -mC\n '\n \n test_expect_success 'no spurious \"refusing to lose untracked\" message' '\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \ttest_must_fail git merge rename^0 2>errors.txt &&\n \t! grep \"refusing to lose untracked file\" errors.txt\n '\ndiff --git a/t/t6404-recursive-merge.sh b/t/t6404-recursive-merge.sh\nindex bdf8169456..c7ab7048f5 100755\n--- a/t/t6404-recursive-merge.sh\n+++ b/t/t6404-recursive-merge.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='Test merge without common ancestors'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -22,11 +22,11 @@ test_expect_success 'setup tests' '\n \tgit add a1 &&\n \tGIT_AUTHOR_DATE=\"2006-12-12 23:00:00\" git commit -m 1 a1 &&\n \n-\tgit checkout -b A master &&\n+\tgit checkout -b A main &&\n \techo A >a1 &&\n \tGIT_AUTHOR_DATE=\"2006-12-12 23:00:01\" git commit -m A a1 &&\n \n-\tgit checkout -b B master &&\n+\tgit checkout -b B main &&\n \techo B >a1 &&\n \tGIT_AUTHOR_DATE=\"2006-12-12 23:00:02\" git commit -m B a1 &&\n \ndiff --git a/t/t6405-merge-symlinks.sh b/t/t6405-merge-symlinks.sh\nindex 140e9e6ce6..7435fce71e 100755\n--- a/t/t6405-merge-symlinks.sh\n+++ b/t/t6405-merge-symlinks.sh\n@@ -8,7 +8,7 @@ test_description='merging symlinks on filesystem w/o symlink support.\n This tests that git merge-recursive writes merge results as plain files\n if core.symlinks is false.'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -22,7 +22,7 @@ test_expect_success 'setup' '\n \tgit branch b-file &&\n \tl=$(printf file | git hash-object -t blob -w --stdin) &&\n \techo \"120000 $l\tsymlink\" | git update-index --index-info &&\n-\tgit commit -m master &&\n+\tgit commit -m main &&\n \tgit checkout b-symlink &&\n \tl=$(printf file-different | git hash-object -t blob -w --stdin) &&\n \techo \"120000 $l\tsymlink\" | git update-index --index-info &&\n@@ -33,28 +33,28 @@ test_expect_success 'setup' '\n \tgit commit -m b-file\n '\n \n-test_expect_success 'merge master into b-symlink, which has a different symbolic link' '\n+test_expect_success 'merge main into b-symlink, which has a different symbolic link' '\n \tgit checkout b-symlink &&\n-\ttest_must_fail git merge master\n+\ttest_must_fail git merge main\n '\n \n test_expect_success 'the merge result must be a file' '\n \ttest_path_is_file symlink\n '\n \n-test_expect_success 'merge master into b-file, which has a file instead of a symbolic link' '\n+test_expect_success 'merge main into b-file, which has a file instead of a symbolic link' '\n \tgit reset --hard &&\n \tgit checkout b-file &&\n-\ttest_must_fail git merge master\n+\ttest_must_fail git merge main\n '\n \n test_expect_success 'the merge result must be a file' '\n \ttest_path_is_file symlink\n '\n \n-test_expect_success 'merge b-file, which has a file instead of a symbolic link, into master' '\n+test_expect_success 'merge b-file, which has a file instead of a symbolic link, into main' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_must_fail git merge b-file\n '\n \ndiff --git a/t/t6406-merge-attr.sh b/t/t6406-merge-attr.sh\nindex 7fe4034d58..d5a4ac2d81 100755\n--- a/t/t6406-merge-attr.sh\n+++ b/t/t6406-merge-attr.sh\n@@ -5,7 +5,7 @@\n \n test_description='per path merge controlled by merge attribute'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -22,10 +22,10 @@ test_expect_success setup '\n \tgit branch side &&\n \tfor f in text binary union\n \tdo\n-\t\techo Master >>$f && git add $f || return 1\n+\t\techo Main >>$f && git add $f || return 1\n \tdone &&\n \ttest_tick &&\n-\tgit commit -m Master &&\n+\tgit commit -m Main &&\n \n \tgit checkout side &&\n \tfor f in text binary union\n@@ -67,7 +67,7 @@ test_expect_success merge '\n \t\techo \"union merge=union\"\n \t} >.gitattributes &&\n \n-\tif git merge master\n+\tif git merge main\n \tthen\n \t\techo Gaah, should have conflicted\n \t\tfalse\n@@ -90,7 +90,7 @@ test_expect_success 'check merge result in working tree' '\n \tgrep \"<<<<<<<\" text &&\n \tcmp binary-orig binary &&\n \t! grep \"<<<<<<<\" union &&\n-\tgrep Master union &&\n+\tgrep Main union &&\n \tgrep Side union\n \n '\n@@ -118,13 +118,13 @@ test_expect_success 'custom merge backend' '\n \tgit config --replace-all \\\n \tmerge.custom.name \"custom merge driver for testing\" &&\n \n-\tgit merge master &&\n+\tgit merge main &&\n \n \tcmp binary union &&\n \tsed -e 1,3d text >check-1 &&\n-\to=$(git unpack-file master^:text) &&\n+\to=$(git unpack-file main^:text) &&\n \ta=$(git unpack-file side^:text) &&\n-\tb=$(git unpack-file master:text) &&\n+\tb=$(git unpack-file main:text) &&\n \tsh -c \"./custom-merge $o $a $b 0 text\" &&\n \tsed -e 1,3d $a >check-2 &&\n \tcmp check-1 check-2 &&\n@@ -139,7 +139,7 @@ test_expect_success 'custom merge backend' '\n \tgit config --replace-all \\\n \tmerge.custom.name \"custom merge driver for testing\" &&\n \n-\tif git merge master\n+\tif git merge main\n \tthen\n \t\techo \"Eh? should have conflicted\"\n \t\tfalse\n@@ -149,9 +149,9 @@ test_expect_success 'custom merge backend' '\n \n \tcmp binary union &&\n \tsed -e 1,3d text >check-1 &&\n-\to=$(git unpack-file master^:text) &&\n+\to=$(git unpack-file main^:text) &&\n \ta=$(git unpack-file anchor:text) &&\n-\tb=$(git unpack-file master:text) &&\n+\tb=$(git unpack-file main:text) &&\n \tsh -c \"./custom-merge $o $a $b 0 text\" &&\n \tsed -e 1,3d $a >check-2 &&\n \tcmp check-1 check-2 &&\n@@ -179,7 +179,7 @@ test_expect_success 'up-to-date merge without common ancestor' '\n \ttest_tick &&\n \t(\n \t\tcd repo1 &&\n-\t\tgit fetch ../repo2 master &&\n+\t\tgit fetch ../repo2 main &&\n \t\tgit merge --allow-unrelated-histories FETCH_HEAD\n \t)\n '\n@@ -204,7 +204,7 @@ test_expect_success 'custom merge does not lock index' '\n \t# By packaging the command in test_when_finished, we get both\n \t# the correctness check and the clean-up.\n \ttest_when_finished \"kill \\$(cat sleep.pid)\" &&\n-\tgit merge master\n+\tgit merge main\n '\n \n test_done\ndiff --git a/t/t6407-merge-binary.sh b/t/t6407-merge-binary.sh\nindex 826deacfd7..d4273f2575 100755\n--- a/t/t6407-merge-binary.sh\n+++ b/t/t6407-merge-binary.sh\n@@ -2,7 +2,7 @@\n \n test_description='ask merge-recursive to merge binary files'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -23,7 +23,7 @@ test_expect_success setup '\n \tgit ls-files -s a >E0 &&\n \tgit ls-files -s m | sed -e \"s/ 0\t/ 3\t/\" >E3 &&\n \ttest_tick &&\n-\tgit commit -m \"master adds some\" &&\n+\tgit commit -m \"main adds some\" &&\n \n \tgit checkout side &&\n \techo rezrov >>m &&\n@@ -42,7 +42,7 @@ test_expect_success resolve '\n \trm -f a* m* &&\n \tgit reset --hard anchor &&\n \n-\tif git merge -s resolve master\n+\tif git merge -s resolve main\n \tthen\n \t\techo Oops, should not have succeeded\n \t\tfalse\n@@ -57,7 +57,7 @@ test_expect_success recursive '\n \trm -f a* m* &&\n \tgit reset --hard anchor &&\n \n-\tif git merge -s recursive master\n+\tif git merge -s recursive main\n \tthen\n \t\techo Oops, should not have succeeded\n \t\tfalse\ndiff --git a/t/t6409-merge-subtree.sh b/t/t6409-merge-subtree.sh\nindex e2c1cfc9fe..d406b2343c 100755\n--- a/t/t6409-merge-subtree.sh\n+++ b/t/t6409-merge-subtree.sh\n@@ -2,7 +2,7 @@\n \n test_description='subtree merge strategy'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -17,10 +17,10 @@ test_expect_success setup '\n \techo >>hello world &&\n \tgit add hello &&\n \tgit commit -m second &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tfor i in mundo $s; do echo $i; done >hello &&\n \tgit add hello &&\n-\tgit commit -m master\n+\tgit commit -m main\n \n '\n \n@@ -39,7 +39,7 @@ test_expect_success 'setup branch sub' '\n '\n \n test_expect_success 'setup topic branch' '\n-\tgit checkout -b topic master &&\n+\tgit checkout -b topic main &&\n \tgit merge -s ours --no-commit --allow-unrelated-histories sub &&\n \tgit read-tree --prefix=dir/ -u sub &&\n \tgit commit -m \"initial merge of sub into topic\" &&\n@@ -80,8 +80,8 @@ test_expect_success 'setup' '\n \n test_expect_success 'initial merge' '\n \tgit remote add -f gui ../git-gui &&\n-\tgit merge -s ours --no-commit --allow-unrelated-histories gui/master &&\n-\tgit read-tree --prefix=git-gui/ -u gui/master &&\n+\tgit merge -s ours --no-commit --allow-unrelated-histories gui/main &&\n+\tgit read-tree --prefix=git-gui/ -u gui/main &&\n \tgit commit -m \"Merge git-gui as our subdirectory\" &&\n \tgit checkout -b work &&\n \tgit ls-files -s >actual &&\n@@ -111,10 +111,10 @@ test_expect_success 'merge update' '\n \n test_expect_success 'initial ambiguous subtree' '\n \tcd ../git &&\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b topic_2 &&\n-\tgit merge -s ours --no-commit gui/master &&\n-\tgit read-tree --prefix=git-gui2/ -u gui/master &&\n+\tgit merge -s ours --no-commit gui/main &&\n+\tgit read-tree --prefix=git-gui2/ -u gui/main &&\n \tgit commit -m \"Merge git-gui2 as our subdirectory\" &&\n \tgit checkout -b work2 &&\n \tgit ls-files -s >actual &&\ndiff --git a/t/t6411-merge-filemode.sh b/t/t6411-merge-filemode.sh\nindex 7b66abfdbb..f54c915d6a 100755\n--- a/t/t6411-merge-filemode.sh\n+++ b/t/t6411-merge-filemode.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='merge: handle file mode'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -10,11 +10,11 @@ test_expect_success 'set up mode change in one branch' '\n \t: >file1 &&\n \tgit add file1 &&\n \tgit commit -m initial &&\n-\tgit checkout -b a1 master &&\n+\tgit checkout -b a1 main &&\n \t: >dummy &&\n \tgit add dummy &&\n \tgit commit -m a &&\n-\tgit checkout -b b1 master &&\n+\tgit checkout -b b1 main &&\n \ttest_chmod +x file1 &&\n \tgit add file1 &&\n \tgit commit -m b1\n@@ -42,12 +42,12 @@ do_one_mode resolve b1 a1\n \n test_expect_success 'set up mode change in both branches' '\n \tgit reset --hard HEAD &&\n-\tgit checkout -b a2 master &&\n+\tgit checkout -b a2 main &&\n \t: >file2 &&\n \tH=$(git hash-object file2) &&\n \ttest_chmod +x file2 &&\n \tgit commit -m a2 &&\n-\tgit checkout -b b2 master &&\n+\tgit checkout -b b2 main &&\n \t: >file2 &&\n \tgit add file2 &&\n \tgit commit -m b2 &&\n@@ -79,7 +79,7 @@ do_both_modes resolve\n \n test_expect_success 'set up delete/modechange scenario' '\n \tgit reset --hard &&\n-\tgit checkout -b deletion master &&\n+\tgit checkout -b deletion main &&\n \tgit rm file1 &&\n \tgit commit -m deletion\n '\ndiff --git a/t/t6412-merge-large-rename.sh b/t/t6412-merge-large-rename.sh\nindex d6840078c4..c50d315722 100755\n--- a/t/t6412-merge-large-rename.sh\n+++ b/t/t6412-merge-large-rename.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='merging with large rename matrix'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -33,7 +33,7 @@ test_rename() {\n \ttest_expect_success \"rename ($1, $2)\" '\n \tn='$1' &&\n \texpect='$2' &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \ttest_might_fail git branch -D test$n &&\n \tgit reset --hard initial &&\n \tfor i in $(count $n); do\n@@ -53,8 +53,8 @@ test_rename() {\n \tgit add . &&\n \tgit commit -m change+rename=$n &&\n \tcase \"$expect\" in\n-\t\tok) git merge master ;;\n-\t\t *) test_must_fail git merge master ;;\n+\t\tok) git merge main ;;\n+\t\t *) test_must_fail git merge main ;;\n \tesac\n \t'\n }\ndiff --git a/t/t6413-merge-crlf.sh b/t/t6413-merge-crlf.sh\nindex 3bd8e3e899..affea255fe 100755\n--- a/t/t6413-merge-crlf.sh\n+++ b/t/t6413-merge-crlf.sh\n@@ -8,7 +8,7 @@ test_description='merge conflict in crlf repo\n \n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -27,7 +27,7 @@ test_expect_success setup '\n \techo line from b | append_cr >file &&\n \tgit commit -m \"add line from b\" file &&\n \tgit tag b &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'Check \"ours\" is CRLF' '\ndiff --git a/t/t6414-merge-rename-nocruft.sh b/t/t6414-merge-rename-nocruft.sh\nindex 42824dcf49..d7e3c1fa6e 100755\n--- a/t/t6414-merge-rename-nocruft.sh\n+++ b/t/t6414-merge-rename-nocruft.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='Merge-recursive merging renames'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -68,7 +68,7 @@ test_expect_success 'setup' '\n \tgit update-index A &&\n \tgit commit -m \"blue modify A\" &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n # This test broke in 65ac6e9c3f47807cb603af07a6a9e1a43bc119ae\ndiff --git a/t/t6415-merge-dir-to-symlink.sh b/t/t6415-merge-dir-to-symlink.sh\nindex 32c0b62496..2ce104aca7 100755\n--- a/t/t6415-merge-dir-to-symlink.sh\n+++ b/t/t6415-merge-dir-to-symlink.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='merging when a directory was replaced with a symlink'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -22,7 +22,7 @@ test_expect_success 'create a commit where dir a/b changed to symlink' '\n \n test_expect_success 'checkout does not clobber untracked symlink' '\n \tgit checkout HEAD^0 &&\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit rm --cached a/b &&\n \tgit commit -m \"untracked symlink remains\" &&\n \ttest_must_fail git checkout start^0\n@@ -30,7 +30,7 @@ test_expect_success 'checkout does not clobber untracked symlink' '\n \n test_expect_success 'a/b-2/c/d is kept when clobbering symlink b' '\n \tgit checkout HEAD^0 &&\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit rm --cached a/b &&\n \tgit commit -m \"untracked symlink remains\" &&\n \tgit checkout -f start^0 &&\n@@ -39,7 +39,7 @@ test_expect_success 'a/b-2/c/d is kept when clobbering symlink b' '\n \n test_expect_success 'checkout should not have deleted a/b-2/c/d' '\n \tgit checkout HEAD^0 &&\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \t git checkout start^0 &&\n \t test_path_is_file a/b-2/c/d\n '\n@@ -56,7 +56,7 @@ test_expect_success 'setup for merge test' '\n test_expect_success 'Handle D/F conflict, do not lose a/b-2/c/d in merge (resolve)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n-\tgit merge -s resolve master &&\n+\tgit merge -s resolve main &&\n \ttest_path_is_file a/b-2/c/d\n '\n \n@@ -67,7 +67,7 @@ test_expect_success SYMLINKS 'a/b was resolved as symlink' '\n test_expect_success 'Handle D/F conflict, do not lose a/b-2/c/d in merge (recursive)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n-\tgit merge -s recursive master &&\n+\tgit merge -s recursive main &&\n \ttest_path_is_file a/b-2/c/d\n '\n \n@@ -77,7 +77,7 @@ test_expect_success SYMLINKS 'a/b was resolved as symlink' '\n \n test_expect_success 'Handle F/D conflict, do not lose a/b-2/c/d in merge (resolve)' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit merge -s resolve baseline^0 &&\n \ttest_path_is_file a/b-2/c/d\n '\n@@ -88,7 +88,7 @@ test_expect_success SYMLINKS 'a/b was resolved as symlink' '\n \n test_expect_success 'Handle F/D conflict, do not lose a/b-2/c/d in merge (recursive)' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit merge -s recursive baseline^0 &&\n \ttest_path_is_file a/b-2/c/d\n '\n@@ -101,7 +101,7 @@ test_expect_failure 'do not lose untracked in merge (resolve)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n \t>a/b/c/e &&\n-\ttest_must_fail git merge -s resolve master &&\n+\ttest_must_fail git merge -s resolve main &&\n \ttest_path_is_file a/b/c/e &&\n \ttest_path_is_file a/b-2/c/d\n '\n@@ -110,7 +110,7 @@ test_expect_success 'do not lose untracked in merge (recursive)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n \t>a/b/c/e &&\n-\ttest_must_fail git merge -s recursive master &&\n+\ttest_must_fail git merge -s recursive main &&\n \ttest_path_is_file a/b/c/e &&\n \ttest_path_is_file a/b-2/c/d\n '\n@@ -119,14 +119,14 @@ test_expect_success 'do not lose modifications in merge (resolve)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n \techo more content >>a/b/c/d &&\n-\ttest_must_fail git merge -s resolve master\n+\ttest_must_fail git merge -s resolve main\n '\n \n test_expect_success 'do not lose modifications in merge (recursive)' '\n \tgit reset --hard &&\n \tgit checkout baseline^0 &&\n \techo more content >>a/b/c/d &&\n-\ttest_must_fail git merge -s recursive master\n+\ttest_must_fail git merge -s recursive main\n '\n \n test_expect_success 'setup a merge where dir a/b-2 changed to symlink' '\ndiff --git a/t/t6416-recursive-corner-cases.sh b/t/t6416-recursive-corner-cases.sh\nindex 3d515a8e31..84f5082366 100755\n--- a/t/t6416-recursive-corner-cases.sh\n+++ b/t/t6416-recursive-corner-cases.sh\n@@ -2,7 +2,7 @@\n \n test_description='recursive merge corner cases involving criss-cross merges'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -388,7 +388,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete' '\n \t\ttest_line_count = 2 out &&\n \n \t\tgit rev-parse >expect       \\\n-\t\t\tmaster:file    B:file &&\n+\t\t\tmain:file    B:file &&\n \t\tgit rev-parse   >actual      \\\n \t\t\t:1:file      :2:file &&\n \t\ttest_cmp expect actual\n@@ -410,7 +410,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete, rev\n \t\ttest_line_count = 2 out &&\n \n \t\tgit rev-parse >expect       \\\n-\t\t\tmaster:file    B:file &&\n+\t\t\tmain:file    B:file &&\n \t\tgit rev-parse   >actual      \\\n \t\t\t:1:file      :3:file &&\n \t\ttest_cmp expect actual\n@@ -1556,12 +1556,12 @@ test_expect_failure 'check conflicting modes for regular file' '\n # Setup:\n #          L1---L2\n #         /  \\ /  \\\n-#     master    X    ?\n+#     main    X    ?\n #         \\  / \\  /\n #          R1---R2\n #\n # Where:\n-#   master has two files, named 'b' and 'a'\n+#   main has two files, named 'b' and 'a'\n #   branches L1 and R1 both modify each of the two files in conflicting ways\n #\n #   L2 is a merge of R1 into L1; more on it later.\n@@ -1666,7 +1666,7 @@ test_expect_success 'check nested conflicts' '\n \t\tcd nested_conflicts &&\n \n \t\tgit clean -f &&\n-\t\tMASTER=$(git rev-parse --short master) &&\n+\t\tMAIN=$(git rev-parse --short main) &&\n \t\tgit checkout L2^0 &&\n \n \t\t# Merge must fail; there is a conflict\n@@ -1682,24 +1682,24 @@ test_expect_success 'check nested conflicts' '\n \t\ttest_line_count = 1 out &&\n \n \t\t# Create a and b from virtual merge base X\n-\t\tgit cat-file -p master:a >base &&\n+\t\tgit cat-file -p main:a >base &&\n \t\tgit cat-file -p L1:a >ours &&\n \t\tgit cat-file -p R1:a >theirs &&\n \t\ttest_must_fail git merge-file --diff3 \\\n \t\t\t-L \"Temporary merge branch 1\" \\\n-\t\t\t-L \"$MASTER\"  \\\n+\t\t\t-L \"$MAIN\"  \\\n \t\t\t-L \"Temporary merge branch 2\" \\\n \t\t\tours  \\\n \t\t\tbase  \\\n \t\t\ttheirs &&\n \t\tsed -e \"s/^\\([<|=>]\\)/\\1\\1/\" ours >vmb_a &&\n \n-\t\tgit cat-file -p master:b >base &&\n+\t\tgit cat-file -p main:b >base &&\n \t\tgit cat-file -p L1:b >ours &&\n \t\tgit cat-file -p R1:b >theirs &&\n \t\ttest_must_fail git merge-file --diff3 \\\n \t\t\t-L \"Temporary merge branch 1\" \\\n-\t\t\t-L \"$MASTER\"  \\\n+\t\t\t-L \"$MAIN\"  \\\n \t\t\t-L \"Temporary merge branch 2\" \\\n \t\t\tours  \\\n \t\t\tbase  \\\n@@ -1751,12 +1751,12 @@ test_expect_success 'check nested conflicts' '\n # Setup:\n #          L1---L2---L3\n #         /  \\ /  \\ /  \\\n-#     master    X1   X2   ?\n+#     main    X1   X2   ?\n #         \\  / \\  / \\  /\n #          R1---R2---R3\n #\n # Where:\n-#   master has one file named 'content'\n+#   main has one file named 'content'\n #   branches L1 and R1 both modify each of the two files in conflicting ways\n #\n #   L<n> (n>1) is a merge of R<n-1> into L<n-1>\n@@ -1837,7 +1837,7 @@ test_expect_success 'check virtual merge base with nested conflicts' '\n \t(\n \t\tcd virtual_merge_base_has_nested_conflicts &&\n \n-\t\tMASTER=$(git rev-parse --short master) &&\n+\t\tMAIN=$(git rev-parse --short main) &&\n \t\tgit checkout L3^0 &&\n \n \t\t# Merge must fail; there is a conflict\n@@ -1860,13 +1860,13 @@ test_expect_success 'check virtual merge base with nested conflicts' '\n \t\t# Imitate X1 merge base, except without long enough conflict\n \t\t# markers because a subsequent sed will modify them.  Put\n \t\t# result into vmb.\n-\t\tgit cat-file -p master:content >base &&\n+\t\tgit cat-file -p main:content >base &&\n \t\tgit cat-file -p L:content >left &&\n \t\tgit cat-file -p R:content >right &&\n \t\tcp left merged-once &&\n \t\ttest_must_fail git merge-file --diff3 \\\n \t\t\t-L \"Temporary merge branch 1\" \\\n-\t\t\t-L \"$MASTER\"  \\\n+\t\t\t-L \"$MAIN\"  \\\n \t\t\t-L \"Temporary merge branch 2\" \\\n \t\t\tmerged-once \\\n \t\t\tbase        \\\ndiff --git a/t/t6417-merge-ours-theirs.sh b/t/t6417-merge-ours-theirs.sh\nindex e7883f890a..ac9aee9a66 100755\n--- a/t/t6417-merge-ours-theirs.sh\n+++ b/t/t6417-merge-ours-theirs.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='Merge-recursive ours and theirs variants'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -23,11 +23,11 @@ test_expect_success setup '\n \tsed -e \"s/9/nueve/\" >file <elif &&\n \tgit commit -a -m theirs &&\n \n-\tgit checkout master^0\n+\tgit checkout main^0\n '\n \n test_expect_success 'plain recursive - should conflict' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \ttest_must_fail git merge -s recursive side &&\n \tgrep nine file &&\n \tgrep nueve file &&\n@@ -37,7 +37,7 @@ test_expect_success 'plain recursive - should conflict' '\n '\n \n test_expect_success 'recursive favouring theirs' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit merge -s recursive -Xtheirs side &&\n \t! grep nine file &&\n \tgrep nueve file &&\n@@ -47,7 +47,7 @@ test_expect_success 'recursive favouring theirs' '\n '\n \n test_expect_success 'recursive favouring ours' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit merge -s recursive -X ours side &&\n \tgrep nine file &&\n \t! grep nueve file &&\n@@ -59,26 +59,26 @@ test_expect_success 'recursive favouring ours' '\n test_expect_success 'binary file with -Xours/-Xtheirs' '\n \techo file binary >.gitattributes &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit merge -s recursive -X theirs side &&\n \tgit diff --exit-code side HEAD -- file &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit merge -s recursive -X ours side &&\n-\tgit diff --exit-code master HEAD -- file\n+\tgit diff --exit-code main HEAD -- file\n '\n \n test_expect_success 'pull passes -X to underlying merge' '\n-\tgit reset --hard master && git pull -s recursive -Xours . side &&\n-\tgit reset --hard master && git pull -s recursive -X ours . side &&\n-\tgit reset --hard master && git pull -s recursive -Xtheirs . side &&\n-\tgit reset --hard master && git pull -s recursive -X theirs . side &&\n-\tgit reset --hard master && test_must_fail git pull -s recursive -X bork . side\n+\tgit reset --hard main && git pull -s recursive -Xours . side &&\n+\tgit reset --hard main && git pull -s recursive -X ours . side &&\n+\tgit reset --hard main && git pull -s recursive -Xtheirs . side &&\n+\tgit reset --hard main && git pull -s recursive -X theirs . side &&\n+\tgit reset --hard main && test_must_fail git pull -s recursive -X bork . side\n '\n \n test_expect_success SYMLINKS 'symlink with -Xours/-Xtheirs' '\n-\tgit reset --hard master &&\n-\tgit checkout -b two master &&\n+\tgit reset --hard main &&\n+\tgit checkout -b two main &&\n \tln -s target-zero link &&\n \tgit add link &&\n \tgit commit -m \"add link pointing to zero\" &&\ndiff --git a/t/t6418-merge-text-auto.sh b/t/t6418-merge-text-auto.sh\nindex 91b43de00d..1e0296dd17 100755\n--- a/t/t6418-merge-text-auto.sh\n+++ b/t/t6418-merge-text-auto.sh\n@@ -2,17 +2,17 @@\n \n test_description='CRLF merge conflict across text=auto change\n \n-* [master] remove .gitattributes\n+* [main] remove .gitattributes\n  ! [side] add line from b\n --\n  + [side] add line from b\n-*  [master] remove .gitattributes\n-*  [master^] add line from a\n-*  [master~2] normalize file\n+*  [main] remove .gitattributes\n+*  [main^] add line from a\n+*  [main~2] normalize file\n *+ [side^] Initial\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -67,7 +67,7 @@ test_expect_success setup '\n \tgit commit -m \"add line from b\" &&\n \tgit tag b &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'set up fuzz_conflict() helper' '\n@@ -198,7 +198,7 @@ test_expect_success 'Test delete/normalize conflict' '\n \tgit reset --hard initial &&\n \tgit rm file &&\n \tgit commit -m \"remove file\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard a^ &&\n \tgit merge side &&\n \ttest_path_is_missing file\ndiff --git a/t/t6419-merge-ignorecase.sh b/t/t6419-merge-ignorecase.sh\nindex 9996a94431..b64b75acf5 100755\n--- a/t/t6419-merge-ignorecase.sh\n+++ b/t/t6419-merge-ignorecase.sh\n@@ -2,7 +2,7 @@\n \n test_description='git-merge with case-changing rename on case-insensitive file system'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -23,18 +23,18 @@ test_expect_success 'merge with case-changing rename' '\n \t>foo &&\n \tgit add foo &&\n \tgit commit -m \"intervening commit\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit rm TestCase &&\n \t>testcase &&\n \tgit add testcase &&\n \tgit commit -m \"rename to testcase\" &&\n \tgit checkout with-camel &&\n-\tgit merge master -m \"merge\" &&\n+\tgit merge main -m \"merge\" &&\n \ttest_path_is_file testcase\n '\n \n test_expect_success 'merge with case-changing rename on both sides' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard baseline &&\n \tgit branch -D with-camel &&\n \tgit checkout -b with-camel &&\n@@ -43,13 +43,13 @@ test_expect_success 'merge with case-changing rename on both sides' '\n \t>foo &&\n \tgit add foo &&\n \tgit commit -m \"intervening commit\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit rm TestCase &&\n \t>testcase &&\n \tgit add testcase &&\n \tgit commit -m \"rename to testcase\" &&\n \tgit checkout with-camel &&\n-\tgit merge master -m \"merge\" &&\n+\tgit merge main -m \"merge\" &&\n \ttest_path_is_file testcase\n '\n \ndiff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh\nindex 9fb4e72ca3..bf4ce3c63d 100755\n--- a/t/t6422-merge-rename-corner-cases.sh\n+++ b/t/t6422-merge-rename-corner-cases.sh\n@@ -3,7 +3,7 @@\n test_description=\"recursive merge corner cases w/ renames but not criss-crosses\"\n # t6036 has corner cases that involve both criss-cross merges and renames\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -1133,7 +1133,7 @@ test_conflicts_with_adds_and_renames() {\n \t# Setup:\n \t#          L\n \t#         / \\\n-\t#     master   ?\n+\t#     main   ?\n \t#         \\ /\n \t#          R\n \t#\n@@ -1263,7 +1263,7 @@ test_conflicts_with_adds_and_renames() {\n \t\t\t\t:2:three           \\\n \t\t\t\t:3:three           &&\n \t\t\tgit rev-parse >expected        \\\n-\t\t\t\tmaster:irrelevant_file \\\n+\t\t\t\tmain:irrelevant_file \\\n \t\t\t\tfile_v2                \\\n \t\t\t\tfile_v4                &&\n \t\t\ttest_cmp expected actual &&\n@@ -1293,12 +1293,12 @@ test_conflicts_with_adds_and_renames add    add\n # Setup:\n #          L\n #         / \\\n-#     master   ?\n+#     main   ?\n #         \\ /\n #          R\n #\n # Where:\n-#   master has two files, named 'one' and 'two'.\n+#   main has two files, named 'one' and 'two'.\n #   branches L and R both modify 'one', in conflicting ways.\n #   branches L and R both modify 'two', in conflicting ways.\n #   branch L also renames 'one' to 'three'.\n@@ -1379,7 +1379,7 @@ test_expect_success 'check nested conflicts from rename/rename(2to1)' '\n \t\ttest_line_count = 1 out &&\n \n \t\t# Compare :2:three to expected values\n-\t\tgit cat-file -p master:one >base &&\n+\t\tgit cat-file -p main:one >base &&\n \t\tgit cat-file -p L:three >ours &&\n \t\tgit cat-file -p R:one >theirs &&\n \t\ttest_must_fail git merge-file    \\\n@@ -1390,7 +1390,7 @@ test_expect_success 'check nested conflicts from rename/rename(2to1)' '\n \t\ttest_cmp expect L-three &&\n \n \t\t# Compare :2:three to expected values\n-\t\tgit cat-file -p master:two >base &&\n+\t\tgit cat-file -p main:two >base &&\n \t\tgit cat-file -p L:two >ours &&\n \t\tgit cat-file -p R:three >theirs &&\n \t\ttest_must_fail git merge-file    \\\ndiff --git a/t/t6425-merge-rename-delete.sh b/t/t6425-merge-rename-delete.sh\nindex e58e3dfba1..459b431a60 100755\n--- a/t/t6425-merge-rename-delete.sh\n+++ b/t/t6425-merge-rename-delete.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='Merge-recursive rename/delete conflict message'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -15,7 +15,7 @@ test_expect_success 'rename/delete' '\n \tgit mv A B &&\n \tgit commit -m \"rename\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit rm A &&\n \tgit commit -m \"delete\" &&\n \ndiff --git a/t/t6427-diff3-conflict-markers.sh b/t/t6427-diff3-conflict-markers.sh\nindex 3ae2d07ae1..25c4b720e7 100755\n--- a/t/t6427-diff3-conflict-markers.sh\n+++ b/t/t6427-diff3-conflict-markers.sh\n@@ -2,7 +2,7 @@\n \n test_description='recursive merge diff3 style conflict markers'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -46,7 +46,7 @@ test_expect_success 'check no merge base' '\n # Setup:\n #          L1\n #         /  \\\n-#     master    ?\n+#     main    ?\n #         \\  /\n #          R1\n #\n@@ -93,18 +93,18 @@ test_expect_success 'check unique merge base' '\n \t\tcd unique_merge_base &&\n \n \t\tgit checkout L^0 &&\n-\t\tMASTER=$(git rev-parse --short master) &&\n+\t\tMAIN=$(git rev-parse --short main) &&\n \n \t\ttest_must_fail git -c merge.conflictstyle=diff3 merge -s recursive R^0 &&\n \n-\t\tgrep \"|||||| $MASTER:content\" renamed\n+\t\tgrep \"|||||| $MAIN:content\" renamed\n \t)\n '\n \n # Setup:\n #          L1---L2--L3\n #         /  \\ /      \\\n-#     master    X1       ?\n+#     main    X1       ?\n #         \\  / \\      /\n #          R1---R2--R3\n #\n@@ -194,10 +194,10 @@ test_expect_success 'rebase --merge describes parent of commit being picked' '\n \t(\n \t\tcd rebase &&\n \t\ttest_commit base file &&\n-\t\ttest_commit master file &&\n+\t\ttest_commit main file &&\n \t\tgit checkout -b side HEAD^ &&\n \t\ttest_commit side file &&\n-\t\ttest_must_fail git -c merge.conflictstyle=diff3 rebase --merge master &&\n+\t\ttest_must_fail git -c merge.conflictstyle=diff3 rebase --merge main &&\n \t\tgrep \"||||||| parent of\" file\n \t)\n '\n@@ -206,7 +206,7 @@ test_expect_success 'rebase --apply describes fake ancestor base' '\n \t(\n \t\tcd rebase &&\n \t\tgit rebase --abort &&\n-\t\ttest_must_fail git -c merge.conflictstyle=diff3 rebase --apply master &&\n+\t\ttest_must_fail git -c merge.conflictstyle=diff3 rebase --apply main &&\n \t\tgrep \"||||||| constructed merge base\" file\n \t)\n '\ndiff --git a/t/t6430-merge-recursive.sh b/t/t6430-merge-recursive.sh\nindex acb2868260..ffcc01fe65 100755\n--- a/t/t6430-merge-recursive.sh\n+++ b/t/t6430-merge-recursive.sh\n@@ -2,7 +2,7 @@\n \n test_description='merge-recursive backend test'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -38,7 +38,7 @@ test_expect_success 'setup 1' '\n \tgit add a d/e &&\n \n \ttest_tick &&\n-\tgit commit -m \"master modifies a and d/e\" &&\n+\tgit commit -m \"main modifies a and d/e\" &&\n \tc1=$(git rev-parse --verify HEAD) &&\n \t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n@@ -469,7 +469,7 @@ test_expect_success SYMLINKS 'dir in working tree with symlink ancestor does not\n \t\tgit checkout -b branch1 &&\n \t\tgit commit --allow-empty -m \"empty commit\" &&\n \n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit rm foo &&\n \t\tmkdir foo &&\n \t\t>foo/bar &&\n@@ -478,7 +478,7 @@ test_expect_success SYMLINKS 'dir in working tree with symlink ancestor does not\n \n \t\tgit checkout branch1 &&\n \n-\t\tgit cherry-pick master &&\n+\t\tgit cherry-pick main &&\n \t\ttest_path_is_dir foo &&\n \t\ttest_path_is_file foo/bar\n \t)\n@@ -493,8 +493,8 @@ test_expect_success 'reset and 3-way merge' '\n \n test_expect_success 'reset and bind merge' '\n \n-\tgit reset --hard master &&\n-\tgit read-tree --prefix=M/ master &&\n+\tgit reset --hard main &&\n+\tgit read-tree --prefix=M/ main &&\n \tgit ls-files -s >actual &&\n \t(\n \t\techo \"100644 $o1 0\tM/a\" &&\n@@ -508,7 +508,7 @@ test_expect_success 'reset and bind merge' '\n \t) >expected &&\n \ttest_cmp expected actual &&\n \n-\tgit read-tree --prefix=a1/ master &&\n+\tgit read-tree --prefix=a1/ main &&\n \tgit ls-files -s >actual &&\n \t(\n \t\techo \"100644 $o1 0\tM/a\" &&\n@@ -526,7 +526,7 @@ test_expect_success 'reset and bind merge' '\n \t) >expected &&\n \ttest_cmp expected actual &&\n \n-\tgit read-tree --prefix=z/ master &&\n+\tgit read-tree --prefix=z/ main &&\n \tgit ls-files -s >actual &&\n \t(\n \t\techo \"100644 $o1 0\tM/a\" &&\n@@ -602,11 +602,11 @@ test_expect_success 'merge-recursive w/ empty work tree - theirs has rename' '\n \n test_expect_success 'merge removes empty directories' '\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b rm &&\n \tgit rm d/e &&\n \tgit commit -mremoved-d/e &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge -s recursive rm &&\n \ttest_path_is_missing d\n '\ndiff --git a/t/t6432-merge-recursive-space-options.sh b/t/t6432-merge-recursive-space-options.sh\nindex 1333cbb148..db4b77e63d 100755\n--- a/t/t6432-merge-recursive-space-options.sh\n+++ b/t/t6432-merge-recursive-space-options.sh\n@@ -2,16 +2,16 @@\n \n test_description='merge-recursive space options\n \n-* [master] Clarify\n+* [main] Clarify\n  ! [remote] Remove cruft\n --\n  + [remote] Remove cruft\n-*  [master] Clarify\n+*  [main] Clarify\n *+ [remote^] Initial revision\n *   ok 1: setup\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -90,7 +90,7 @@ test_expect_success 'setup' '\n \tmv text.txt+ text.txt &&\n \tgit commit -a -m \"Remove cruft\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tsed -e \"\n \t\t\ts/\\(not in his right mind\\),\\(.*\\)/\\1;\\2Q/\n \t\t\ts/Quite correct\\(.*\\)/It is too correct\\1Q/\ndiff --git a/t/t6433-merge-toplevel.sh b/t/t6433-merge-toplevel.sh\nindex 2d51b2d08c..b16031465f 100755\n--- a/t/t6433-merge-toplevel.sh\n+++ b/t/t6433-merge-toplevel.sh\n@@ -2,13 +2,13 @@\n \n test_description='\"git merge\" top-level frontend'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n \n t3033_reset () {\n-\tgit checkout -B master two &&\n+\tgit checkout -B main two &&\n \tgit branch -f left three &&\n \tgit branch -f right four\n }\n@@ -24,7 +24,7 @@ test_expect_success setup '\n \ttest_commit four &&\n \tgit checkout --orphan newroot &&\n \ttest_commit five &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n # Local branches\n@@ -64,7 +64,7 @@ test_expect_success 'merge octopus, non-fast-forward (ff)' '\n test_expect_success 'merge octopus, fast-forward (does not ff)' '\n \tt3033_reset &&\n \tgit merge left right &&\n-\t# two (master) is not an ancestor of three (left) and four (right)\n+\t# two (main) is not an ancestor of three (left) and four (right)\n \ttest_must_fail git rev-parse --verify HEAD^4 &&\n \tgit rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&\n \tgit rev-parse two three four | sort >expect &&\n@@ -121,7 +121,7 @@ test_expect_success 'merge FETCH_HEAD octopus fast-forward (does not ff)' '\n \tt3033_reset &&\n \tgit fetch . left right &&\n \tgit merge FETCH_HEAD &&\n-\t# two (master) is not an ancestor of three (left) and four (right)\n+\t# two (main) is not an ancestor of three (left) and four (right)\n \ttest_must_fail git rev-parse --verify HEAD^4 &&\n \tgit rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&\n \tgit rev-parse two three four | sort >expect &&\ndiff --git a/t/t6434-merge-recursive-rename-options.sh b/t/t6434-merge-recursive-rename-options.sh\nindex 7e877e96e2..a11707835b 100755\n--- a/t/t6434-merge-recursive-rename-options.sh\n+++ b/t/t6434-merge-recursive-rename-options.sh\n@@ -5,11 +5,11 @@ test_description='merge-recursive rename options\n Test rename detection by examining rename/delete conflicts.\n \n * (HEAD -> rename) rename\n-| * (master) delete\n+| * (main) delete\n |/\n * base\n \n-git diff --name-status base master\n+git diff --name-status base main\n D\t0-old\n D\t1-old\n D\t2-old\n@@ -26,7 +26,7 @@ they are rounded down (see, e.g., Documentation/diff-generate-patch.txt, which\n mentions this in a different context).\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -121,7 +121,7 @@ test_expect_success 'setup repo' '\n \tget_expected_stages 2 &&\n \tget_expected_stages 3 &&\n \tcheck_50=\"false\" &&\n-\ttail=\"HEAD^ -- HEAD master\"\n+\ttail=\"HEAD^ -- HEAD main\"\n '\n \n test_expect_success 'setup thresholds' '\ndiff --git a/t/t6436-merge-overwrite.sh b/t/t6436-merge-overwrite.sh\nindex 7d5691c1b4..362ae37a12 100755\n--- a/t/t6436-merge-overwrite.sh\n+++ b/t/t6436-merge-overwrite.sh\n@@ -4,7 +4,7 @@ test_description='git-merge\n \n Do not overwrite changes.'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -196,7 +196,7 @@ test_expect_success 'set up unborn branch and content' '\n '\n \n test_expect_success 'will not clobber WT/index when merging into unborn' '\n-\tgit merge master &&\n+\tgit merge main &&\n \tgrep foo tracked-file &&\n \tgit show :tracked-file >expect &&\n \tgrep foo expect &&\ndiff --git a/t/t6437-submodule-merge.sh b/t/t6437-submodule-merge.sh\nindex 14fa46edf3..0f92bcf326 100755\n--- a/t/t6437-submodule-merge.sh\n+++ b/t/t6437-submodule-merge.sh\n@@ -2,7 +2,7 @@\n \n test_description='merging with submodules'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -30,7 +30,7 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m root &&\n \n-\tgit checkout -b a master &&\n+\tgit checkout -b a main &&\n \t(cd sub &&\n \t echo A > file &&\n \t git add file &&\n@@ -40,7 +40,7 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m a &&\n \n-\tgit checkout -b b master &&\n+\tgit checkout -b b main &&\n \t(cd sub &&\n \t echo B > file &&\n \t git add file &&\n@@ -257,22 +257,22 @@ test_expect_success 'setup for recursive merge with submodule' '\n \t (cd sub &&\n \t  git init &&\n \t  test_commit a &&\n-\t  git checkout -b sub-b master &&\n+\t  git checkout -b sub-b main &&\n \t  test_commit b &&\n-\t  git checkout -b sub-c master &&\n+\t  git checkout -b sub-c main &&\n \t  test_commit c &&\n \t  git checkout -b sub-bc sub-b &&\n \t  git merge sub-c &&\n \t  git checkout -b sub-cb sub-c &&\n \t  git merge sub-b &&\n-\t  git checkout master) &&\n+\t  git checkout main) &&\n \t git add sub &&\n \t git commit -m a &&\n-\t git checkout -b top-b master &&\n+\t git checkout -b top-b main &&\n \t (cd sub && git checkout sub-b) &&\n \t git add sub &&\n \t git commit -m b &&\n-\t git checkout -b top-c master &&\n+\t git checkout -b top-c main &&\n \t (cd sub && git checkout sub-c) &&\n \t git add sub &&\n \t git commit -m c &&\ndiff --git a/t/t6439-merge-co-error-msgs.sh b/t/t6439-merge-co-error-msgs.sh\nindex e5542ceb24..e176475ed5 100755\n--- a/t/t6439-merge-co-error-msgs.sh\n+++ b/t/t6439-merge-co-error-msgs.sh\n@@ -2,7 +2,7 @@\n \n test_description='unpack-trees error messages'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -21,7 +21,7 @@ test_expect_success 'setup' '\n \tgit add two three four five &&\n \tgit commit -m Second &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo other >two &&\n \techo other >three &&\n \techo other >four &&\n@@ -86,7 +86,7 @@ test_expect_success 'cannot switch branches because of local changes' '\n \techo two >rep/two &&\n \tgit add rep/one rep/two &&\n \tgit commit -m Fourth &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo uno >rep/one &&\n \techo dos >rep/two &&\n \ttest_must_fail git checkout branch 2>out &&\n@@ -131,7 +131,7 @@ test_expect_success 'not_uptodate_dir porcelain checkout error' '\n \t>rep2 &&\n \tgit add rep rep2 &&\n \tgit commit -m \"added test as a file\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \t>rep/untracked-file &&\n \t>rep2/untracked-file &&\n \ttest_must_fail git checkout branch 2>out &&\ndiff --git a/t/t6501-freshen-objects.sh b/t/t6501-freshen-objects.sh\nindex bda5069044..75210f012b 100755\n--- a/t/t6501-freshen-objects.sh\n+++ b/t/t6501-freshen-objects.sh\n@@ -25,7 +25,7 @@\n #      to refer to an existing tree).\n \n test_description='check pruning of dependent objects'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -70,7 +70,7 @@ for repack in '' true; do\n \t\tgit checkout -b experiment &&\n \t\tcommit abandon &&\n \t\tmaybe_repack &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit branch -D experiment\n \t'\n \n-- \ngitgitgadget\n\n"},{"id":"410306","messageId":"20eef6cc9798c0fd9f99bf1a71b5071a1241c61e.1605743088.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 22/28] t7[5-9]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:40Z","receivedAt":"2020-11-18T23:45:24Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nExcluding t7817, which is added in an unrelated patch series at the time\nof writing, this adjusts t7[5-9]*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t7[5-9]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t7501-commit-basic-functionality.sh         |   4 +-\n t/t7502-commit-porcelain.sh                   |  14 +-\n ...3-pre-commit-and-pre-merge-commit-hooks.sh |  44 ++---\n t/t7504-commit-msg-hook.sh                    |  26 +--\n t/t7505-prepare-commit-msg-hook.sh            |  22 +--\n t/t7508-status.sh                             |  58 +++---\n t/t7510-signed-commit.sh                      |   4 +-\n t/t7512-status-help.sh                        |  42 ++---\n t/t7517-per-repo-email.sh                     |  14 +-\n t/t7600-merge.sh                              |  46 ++---\n t/t7606-merge-custom.sh                       |   2 +-\n t/t7608-merge-messages.sh                     |  38 ++--\n t/t7610-mergetool.sh                          | 176 +++++++++---------\n t/t7611-merge-abort.sh                        |   6 +-\n t/t7612-merge-verify-signatures.sh            |   4 +-\n t/t7614-merge-signoff.sh                      |  26 +--\n t/t7701-repack-unpack-unreachable.sh          |   4 +-\n t/t7800-difftool.sh                           |  40 ++--\n t/t7810-grep.sh                               |  30 +--\n 19 files changed, 300 insertions(+), 300 deletions(-)\n\ndiff --git a/t/t7501-commit-basic-functionality.sh b/t/t7501-commit-basic-functionality.sh\nindex 9a1414f31d..0f936182e4 100755\n--- a/t/t7501-commit-basic-functionality.sh\n+++ b/t/t7501-commit-basic-functionality.sh\n@@ -7,7 +7,7 @@\n # signoff\n \n test_description='git commit'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -606,7 +606,7 @@ test_expect_success 'same tree (merge and amend merge)' '\n \techo zero >zero &&\n \tgit add zero &&\n \tgit commit -m \"add zero\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit merge -s ours side -m \"empty ok\" &&\n \tgit diff HEAD^ HEAD >actual &&\ndiff --git a/t/t7502-commit-porcelain.sh b/t/t7502-commit-porcelain.sh\nindex c8c16bf1c9..e5332adc9a 100755\n--- a/t/t7502-commit-porcelain.sh\n+++ b/t/t7502-commit-porcelain.sh\n@@ -2,7 +2,7 @@\n \n test_description='git commit porcelain-ish'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -79,7 +79,7 @@ test_expect_success 'output summary format for merges' '\n \n output_tests_cleanup() {\n \t# this is needed for \"do not fire editor in the presence of conflicts\"\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \t# this is needed for the \"partial removal\" test to pass\n \tgit rm file1 &&\n@@ -443,7 +443,7 @@ test_expect_success 'do not fire editor in the presence of conflicts' '\n \tgit add g &&\n \tgit commit -m \"add g\" &&\n \tgit branch second &&\n-\techo master >g &&\n+\techo main >g &&\n \techo g >h &&\n \tgit add g h &&\n \tgit commit -m \"modify g and add h\" &&\n@@ -452,7 +452,7 @@ test_expect_success 'do not fire editor in the presence of conflicts' '\n \tgit add g &&\n \tgit commit -m second &&\n \t# Must fail due to conflict\n-\ttest_must_fail git cherry-pick -n master &&\n+\ttest_must_fail git cherry-pick -n main &&\n \techo \"editor not started\" >.git/result &&\n \t(\n \t\tGIT_EDITOR=\"\\\"$(pwd)/.git/FAKE_EDITOR\\\"\" &&\n@@ -481,9 +481,9 @@ git reset -q --hard\n \n test_expect_success 'Hand committing of a redundant merge removes dups' '\n \n-\tgit rev-parse second master >expect &&\n-\ttest_must_fail git merge second master &&\n-\tgit checkout master g &&\n+\tgit rev-parse second main >expect &&\n+\ttest_must_fail git merge second main &&\n+\tgit checkout main g &&\n \tEDITOR=: git commit -a &&\n \tgit cat-file commit HEAD >raw &&\n \tsed -n -e \"s/^parent //p\" -e \"/^$/q\" raw >actual &&\ndiff --git a/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh b/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh\nindex 8d3f4ab0d7..606d8d0f08 100755\n--- a/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh\n+++ b/t/t7503-pre-commit-and-pre-merge-commit-hooks.sh\n@@ -2,7 +2,7 @@\n \n test_description='pre-commit and pre-merge-commit hooks'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -47,16 +47,16 @@ test_expect_success 'root commit' '\n \tgit add foo &&\n \tgit commit -m \"make it non-ff\" &&\n \tgit branch side-orig side &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'setup conflicting branches' '\n-\ttest_when_finished \"git checkout master\" &&\n-\tgit checkout -b conflicting-a master &&\n+\ttest_when_finished \"git checkout main\" &&\n+\tgit checkout -b conflicting-a main &&\n \techo a >conflicting &&\n \tgit add conflicting &&\n \tgit commit -m conflicting-a &&\n-\tgit checkout -b conflicting-b master &&\n+\tgit checkout -b conflicting-b main &&\n \techo b >conflicting &&\n \tgit add conflicting &&\n \tgit commit -m conflicting-b\n@@ -74,8 +74,8 @@ test_expect_success 'with no hook (merge)' '\n \ttest_when_finished \"rm -f actual_hooks\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \n@@ -91,8 +91,8 @@ test_expect_success '--no-verify with no hook (merge)' '\n \ttest_when_finished \"rm -f actual_hooks\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge --no-verify -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge --no-verify -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \n@@ -111,15 +111,15 @@ test_expect_success 'with succeeding hook (merge)' '\n \tcp \"$HOOKDIR/success.sample\" \"$PREMERGE\" &&\n \techo \"$PREMERGE\" >expected_hooks &&\n \tgit checkout side &&\n-\tgit merge -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_cmp expected_hooks actual_hooks\n '\n \n test_expect_success 'automatic merge fails; both hooks are available' '\n \ttest_when_finished \"rm -f \\\"$PREMERGE\\\" \\\"$PRECOMMIT\\\"\" &&\n \ttest_when_finished \"rm -f expected_hooks actual_hooks\" &&\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \tcp \"$HOOKDIR/success.sample\" \"$PREMERGE\" &&\n \tcp \"$HOOKDIR/success.sample\" \"$PRECOMMIT\" &&\n \n@@ -148,8 +148,8 @@ test_expect_success '--no-verify with succeeding hook (merge)' '\n \tcp \"$HOOKDIR/success.sample\" \"$PREMERGE\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge --no-verify -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge --no-verify -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \n@@ -177,8 +177,8 @@ test_expect_success 'with failing hook (merge)' '\n \tcp \"$HOOKDIR/fail.sample\" \"$PREMERGE\" &&\n \techo \"$PREMERGE\" >expected_hooks &&\n \tgit checkout side &&\n-\ttest_must_fail git merge -m \"merge master\" master &&\n-\tgit checkout master &&\n+\ttest_must_fail git merge -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_cmp expected_hooks actual_hooks\n '\n \n@@ -187,8 +187,8 @@ test_expect_success '--no-verify with failing hook (merge)' '\n \tcp \"$HOOKDIR/fail.sample\" \"$PREMERGE\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge --no-verify -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge --no-verify -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \n@@ -215,8 +215,8 @@ test_expect_success POSIXPERM 'with non-executable hook (merge)' '\n \tcp \"$HOOKDIR/non-exec.sample\" \"$PREMERGE\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \n@@ -225,8 +225,8 @@ test_expect_success POSIXPERM '--no-verify with non-executable hook (merge)' '\n \tcp \"$HOOKDIR/non-exec.sample\" \"$PREMERGE\" &&\n \tgit branch -f side side-orig &&\n \tgit checkout side &&\n-\tgit merge --no-verify -m \"merge master\" master &&\n-\tgit checkout master &&\n+\tgit merge --no-verify -m \"merge main\" main &&\n+\tgit checkout main &&\n \ttest_path_is_missing actual_hooks\n '\n \ndiff --git a/t/t7504-commit-msg-hook.sh b/t/t7504-commit-msg-hook.sh\nindex 17fb1d8499..4e7592522a 100755\n--- a/t/t7504-commit-msg-hook.sh\n+++ b/t/t7504-commit-msg-hook.sh\n@@ -2,7 +2,7 @@\n \n test_description='commit-msg hook'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -145,12 +145,12 @@ test_expect_success '--no-verify with failing hook (editor)' '\n test_expect_success 'merge fails with failing hook' '\n \n \ttest_when_finished \"git branch -D newbranch\" &&\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout --orphan newbranch &&\n \t: >file2 &&\n \tgit add file2 &&\n \tgit commit --no-verify file2 -m in-side-branch &&\n-\ttest_must_fail git merge --allow-unrelated-histories master &&\n+\ttest_must_fail git merge --allow-unrelated-histories main &&\n \tcommit_msg_is \"in-side-branch\" # HEAD before merge\n \n '\n@@ -158,14 +158,14 @@ test_expect_success 'merge fails with failing hook' '\n test_expect_success 'merge bypasses failing hook with --no-verify' '\n \n \ttest_when_finished \"git branch -D newbranch\" &&\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout --orphan newbranch &&\n \tgit rm -f file &&\n \t: >file2 &&\n \tgit add file2 &&\n \tgit commit --no-verify file2 -m in-side-branch &&\n-\tgit merge --no-verify --allow-unrelated-histories master &&\n-\tcommit_msg_is \"Merge branch '\\''master'\\'' into newbranch\"\n+\tgit merge --no-verify --allow-unrelated-histories main &&\n+\tcommit_msg_is \"Merge branch '\\''main'\\'' into newbranch\"\n '\n \n \n@@ -251,28 +251,28 @@ test_expect_success \"hook doesn't edit commit message (editor)\" '\n \n test_expect_success 'hook called in git-merge picks up commit message' '\n \ttest_when_finished \"git branch -D newbranch\" &&\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout --orphan newbranch &&\n \tgit rm -f file &&\n \t: >file2 &&\n \tgit add file2 &&\n \tgit commit --no-verify file2 -m in-side-branch &&\n-\tgit merge --allow-unrelated-histories master &&\n+\tgit merge --allow-unrelated-histories main &&\n \tcommit_msg_is \"new message\"\n '\n \n test_expect_failure 'merge --continue remembers --no-verify' '\n \ttest_when_finished \"git branch -D newbranch\" &&\n-\ttest_when_finished \"git checkout -f master\" &&\n-\tgit checkout master &&\n+\ttest_when_finished \"git checkout -f main\" &&\n+\tgit checkout main &&\n \techo a >file2 &&\n \tgit add file2 &&\n-\tgit commit --no-verify -m \"add file2 to master\" &&\n-\tgit checkout -b newbranch master^ &&\n+\tgit commit --no-verify -m \"add file2 to main\" &&\n+\tgit checkout -b newbranch main^ &&\n \techo b >file2 &&\n \tgit add file2 &&\n \tgit commit --no-verify file2 -m in-side-branch &&\n-\tgit merge --no-verify -m not-rewritten-by-hook master &&\n+\tgit merge --no-verify -m not-rewritten-by-hook main &&\n \t# resolve conflict:\n \techo c >file2 &&\n \tgit add file2 &&\ndiff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh\nindex 978c90abbb..321b4bc0fc 100755\n--- a/t/t7505-prepare-commit-msg-hook.sh\n+++ b/t/t7505-prepare-commit-msg-hook.sh\n@@ -2,7 +2,7 @@\n \n test_description='prepare-commit-msg hook'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -18,7 +18,7 @@ test_expect_success 'set up commits for rebasing' '\n \tdo\n \t\ttest_commit rebase-$i c $i\n \tdone &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tcat >rebase-todo <<-EOF\n \tpick $(git rev-parse rebase-a)\n@@ -193,7 +193,7 @@ test_expect_success 'with hook (-c)' '\n \n test_expect_success 'with hook (merge)' '\n \n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other HEAD@{1} &&\n \techo \"more\" >>file &&\n \tgit add file &&\n@@ -205,7 +205,7 @@ test_expect_success 'with hook (merge)' '\n \n test_expect_success 'with hook and editor (merge)' '\n \n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other HEAD@{1} &&\n \techo \"more\" >>file &&\n \tgit add file &&\n@@ -221,7 +221,7 @@ test_rebase () {\n \ttest_expect_$expect C_LOCALE_OUTPUT \"with hook (rebase ${mode:--i})\" '\n \t\ttest_when_finished \"\\\n \t\t\tgit rebase --abort\n-\t\t\tgit checkout -f master\n+\t\t\tgit checkout -f main\n \t\t\tgit branch -D tmp\" &&\n \t\tgit checkout -b tmp rebase-me &&\n \t\tGIT_SEQUENCE_EDITOR=\"cp rebase-todo\" &&\n@@ -253,14 +253,14 @@ test_rebase success\n test_have_prereq !REBASE_P || test_rebase success -p\n \n test_expect_success 'with hook (cherry-pick)' '\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other b &&\n \tgit cherry-pick rebase-1 &&\n \ttest \"$(git log -1 --pretty=format:%s)\" = \"message (no editor)\"\n '\n \n test_expect_success 'with hook and editor (cherry-pick)' '\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other b &&\n \tgit cherry-pick -e rebase-1 &&\n \ttest \"$(git log -1 --pretty=format:%s)\" = merge\n@@ -273,7 +273,7 @@ EOF\n \n test_expect_success 'with failing hook' '\n \n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \thead=$(git rev-parse HEAD) &&\n \techo \"more\" >> file &&\n \tgit add file &&\n@@ -283,7 +283,7 @@ test_expect_success 'with failing hook' '\n \n test_expect_success 'with failing hook (--no-verify)' '\n \n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \thead=$(git rev-parse HEAD) &&\n \techo \"more\" >> file &&\n \tgit add file &&\n@@ -293,7 +293,7 @@ test_expect_success 'with failing hook (--no-verify)' '\n \n test_expect_success 'with failing hook (merge)' '\n \n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other HEAD@{1} &&\n \techo \"more\" >> file &&\n \tgit add file &&\n@@ -308,7 +308,7 @@ test_expect_success 'with failing hook (merge)' '\n '\n \n test_expect_success C_LOCALE_OUTPUT 'with failing hook (cherry-pick)' '\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit checkout -B other b &&\n \ttest_must_fail git cherry-pick rebase-1 2>actual &&\n \ttest $(grep -c prepare-commit-msg actual) = 1\ndiff --git a/t/t7508-status.sh b/t/t7508-status.sh\nindex 963fed6821..d01aacb66b 100755\n--- a/t/t7508-status.sh\n+++ b/t/t7508-status.sh\n@@ -37,11 +37,11 @@ test_expect_success 'create upstream branch' '\n \tgit checkout -b upstream &&\n \ttest_commit upstream1 &&\n \ttest_commit upstream2 &&\n-\t# leave the first commit on master as root because several\n+\t# leave the first commit on main as root because several\n \t# tests depend on this case; for our upstream we only\n \t# care about commit counts anyway, so a totally divergent\n \t# history is OK\n-\tgit checkout --orphan master\n+\tgit checkout --orphan main\n '\n \n test_expect_success 'setup' '\n@@ -88,7 +88,7 @@ EOF\n \n test_expect_success 'status --column' '\n \tcat >expect <<\\EOF &&\n-# On branch master\n+# On branch main\n # Your branch and '\\''upstream'\\'' have diverged,\n # and have 1 and 2 different commits each, respectively.\n #   (use \"git pull\" to merge the remote branch into yours)\n@@ -119,7 +119,7 @@ test_expect_success 'status --column status.displayCommentPrefix=false' '\n '\n \n cat >expect <<\\EOF\n-# On branch master\n+# On branch main\n # Your branch and 'upstream' have diverged,\n # and have 1 and 2 different commits each, respectively.\n #   (use \"git pull\" to merge the remote branch into yours)\n@@ -193,7 +193,7 @@ test_expect_success 'commit ignores status.displayCommentPrefix=false in COMMIT_\n '\n \n cat >expect <<\\EOF\n-On branch master\n+On branch main\n Your branch and 'upstream' have diverged,\n and have 1 and 2 different commits each, respectively.\n \n@@ -266,7 +266,7 @@ test_expect_success 'status with gitignore' '\n \ttest_cmp expect output &&\n \n \tcat >expect <<\\EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -331,7 +331,7 @@ test_expect_success 'status with gitignore (nothing untracked)' '\n \ttest_cmp expect output &&\n \n \tcat >expect <<\\EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -368,7 +368,7 @@ output*\n EOF\n \n cat >expect <<\\EOF\n-## master...upstream [ahead 1, behind 2]\n+## main...upstream [ahead 1, behind 2]\n  M dir1/modified\n A  dir2/added\n ?? dir1/untracked\n@@ -401,7 +401,7 @@ test_expect_success 'setup dir3' '\n \n test_expect_success 'status -uno' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -429,7 +429,7 @@ test_expect_success 'status (status.showUntrackedFiles no)' '\n \n test_expect_success 'status -uno (advice.statusHints false)' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n \n@@ -463,7 +463,7 @@ test_expect_success 'status -s (status.showUntrackedFiles no)' '\n \n test_expect_success 'status -unormal' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -518,7 +518,7 @@ test_expect_success 'status -s (status.showUntrackedFiles normal)' '\n \n test_expect_success 'status -uall' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -578,7 +578,7 @@ test_expect_success 'status -s (status.showUntrackedFiles all)' '\n \n test_expect_success 'status with relative paths' '\n \tcat >expect <<\\EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -646,7 +646,7 @@ test_expect_success 'setup unique colors' '\n \n test_expect_success TTY 'status with color.ui' '\n \tcat >expect <<\\EOF &&\n-On branch <GREEN>master<RESET>\n+On branch <GREEN>main<RESET>\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -706,7 +706,7 @@ test_expect_success TTY 'status -s with color.status' '\n '\n \n cat >expect <<\\EOF\n-## <YELLOW>master<RESET>...<CYAN>upstream<RESET> [ahead <YELLOW>1<RESET>, behind <CYAN>2<RESET>]\n+## <YELLOW>main<RESET>...<CYAN>upstream<RESET> [ahead <YELLOW>1<RESET>, behind <CYAN>2<RESET>]\n  <RED>M<RESET> dir1/modified\n <GREEN>A<RESET>  dir2/added\n <BLUE>??<RESET> dir1/untracked\n@@ -757,7 +757,7 @@ test_expect_success 'status --porcelain respects -b' '\n \n \tgit status --porcelain -b >output &&\n \t{\n-\t\techo \"## master...upstream [ahead 1, behind 2]\" &&\n+\t\techo \"## main...upstream [ahead 1, behind 2]\" &&\n \t\tcat expect\n \t} >tmp &&\n \tmv tmp expect &&\n@@ -769,7 +769,7 @@ test_expect_success 'status --porcelain respects -b' '\n \n test_expect_success 'status without relative paths' '\n \tcat >expect <<\\EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -843,7 +843,7 @@ test_expect_success 'status -s without relative paths' '\n \n test_expect_success 'dry-run of partial commit excluding new file in index' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -897,7 +897,7 @@ test_expect_success 'setup status submodule summary' '\n \n test_expect_success 'status submodule summary is disabled by default' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -954,7 +954,7 @@ head=$(cd sm && git rev-parse --short=7 --verify HEAD)\n \n test_expect_success 'status submodule summary' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 1 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1013,7 +1013,7 @@ test_expect_success 'status -s submodule summary' '\n \n test_expect_success 'status submodule summary (clean submodule): commit' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1061,7 +1061,7 @@ test_expect_success 'status -z implies porcelain' '\n \n test_expect_success 'commit --dry-run submodule summary (--amend)' '\n \tcat >expect <<EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1113,7 +1113,7 @@ touch .gitmodules\n \n test_expect_success '--ignore-submodules=untracked suppresses submodules with untracked content' '\n \tcat > expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1222,7 +1222,7 @@ test_expect_success '.git/config ignore=dirty suppresses submodules with modifie\n \n test_expect_success \"--ignore-submodules=untracked doesn't suppress submodules with modified content\" '\n \tcat > expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1279,7 +1279,7 @@ head2=$(cd sm && git commit -q -m \"2nd commit\" foo && git rev-parse --short=7 --\n \n test_expect_success \"--ignore-submodules=untracked doesn't suppress submodule summary\" '\n \tcat > expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1360,7 +1360,7 @@ test_expect_success \".git/config ignore=dirty doesn't suppress submodule summary\n '\n \n cat > expect << EOF\n-; On branch master\n+; On branch main\n ; Your branch and 'upstream' have diverged,\n ; and have 2 and 2 different commits each, respectively.\n ;   (use \"git pull\" to merge the remote branch into yours)\n@@ -1408,7 +1408,7 @@ test_expect_success \"status (core.commentchar with two chars with submodule summ\n \n test_expect_success \"--ignore-submodules=all suppresses submodule summary\" '\n \tcat > expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1434,7 +1434,7 @@ EOF\n \n test_expect_success '.gitmodules ignore=all suppresses unstaged submodule summary' '\n \tcat > expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\n@@ -1554,7 +1554,7 @@ test_expect_success 'git commit --dry-run will show a staged but ignored submodu\n \tgit reset HEAD^ &&\n \tgit add sm &&\n \tcat >expect << EOF &&\n-On branch master\n+On branch main\n Your branch and '\\''upstream'\\'' have diverged,\n and have 2 and 2 different commits each, respectively.\n   (use \"git pull\" to merge the remote branch into yours)\ndiff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh\nindex a5a36cab85..f4bf925bdd 100755\n--- a/t/t7510-signed-commit.sh\n+++ b/t/t7510-signed-commit.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='signed commit tests'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -28,7 +28,7 @@ test_expect_success GPG 'create signed commits' '\n \techo 3 >elif && git add elif &&\n \ttest_tick && git commit -m \"third on side\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick && git merge -S side &&\n \tgit tag merge &&\n \ndiff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh\nindex fbd760f7e6..9f5e3ce793 100755\n--- a/t/t7512-status-help.sh\n+++ b/t/t7512-status-help.sh\n@@ -7,7 +7,7 @@\n \n test_description='git status advice'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -20,14 +20,14 @@ test_expect_success 'prepare for conflicts' '\n \tgit config --global advice.statusuoption false &&\n \ttest_commit init main.txt init &&\n \tgit branch conflicts &&\n-\ttest_commit on_master main.txt on_master &&\n+\ttest_commit on_main main.txt on_main &&\n \tgit checkout conflicts &&\n \ttest_commit on_conflicts main.txt on_conflicts\n '\n \n \n test_expect_success 'status when conflicts unresolved' '\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tcat >expected <<\\EOF &&\n On branch conflicts\n You have unmerged paths.\n@@ -47,7 +47,7 @@ EOF\n \n test_expect_success 'status when conflicts resolved before commit' '\n \tgit reset --hard conflicts &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \techo one >main.txt &&\n \tgit add main.txt &&\n \tcat >expected <<\\EOF &&\n@@ -66,7 +66,7 @@ EOF\n \n \n test_expect_success 'prepare for rebase conflicts' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b rebase_conflicts &&\n \ttest_commit one_rebase main.txt one &&\n \ttest_commit two_rebase main.txt two &&\n@@ -121,11 +121,11 @@ EOF\n \n \n test_expect_success 'prepare for rebase_i_conflicts' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b rebase_i_conflicts &&\n \ttest_commit one_unmerge main.txt one_unmerge &&\n \tgit branch rebase_i_conflicts_second &&\n-\ttest_commit one_master main.txt one_master &&\n+\ttest_commit one_main main.txt one_main &&\n \tgit checkout rebase_i_conflicts_second &&\n \ttest_commit one_second main.txt one_second\n '\n@@ -185,7 +185,7 @@ EOF\n \n \n test_expect_success 'status when rebasing -i in edit mode' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b rebase_i_edit &&\n \ttest_commit one_rebase_i main.txt one &&\n \ttest_commit two_rebase_i main.txt two &&\n@@ -215,7 +215,7 @@ EOF\n \n \n test_expect_success 'status when splitting a commit' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b split_commit &&\n \ttest_commit one_split main.txt one &&\n \ttest_commit two_split main.txt two &&\n@@ -254,7 +254,7 @@ EOF\n \n \n test_expect_success 'status after editing the last commit with --amend during a rebase -i' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b amend_last &&\n \ttest_commit one_amend main.txt one &&\n \ttest_commit two_amend main.txt two &&\n@@ -287,7 +287,7 @@ EOF\n \n \n test_expect_success 'prepare for several edits' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b several_edits &&\n \ttest_commit one_edits main.txt one &&\n \ttest_commit two_edits main.txt two &&\n@@ -596,7 +596,7 @@ EOF\n \n \n test_expect_success 'prepare am_session' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b am_session &&\n \ttest_commit one_am one.txt \"one\" &&\n \ttest_commit two_am two.txt \"two\" &&\n@@ -669,7 +669,7 @@ EOF\n \n \n test_expect_success 'status when bisecting' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b bisect &&\n \ttest_commit one_bisect main.txt one &&\n \ttest_commit two_bisect main.txt two &&\n@@ -692,7 +692,7 @@ EOF\n \n \n test_expect_success 'status when rebase --apply conflicts with statushints disabled' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b statushints_disabled &&\n \ttest_when_finished \"git config --local advice.statushints true\" &&\n \tgit config --local advice.statushints false &&\n@@ -717,7 +717,7 @@ EOF\n \n \n test_expect_success 'prepare for cherry-pick conflicts' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b cherry_branch &&\n \ttest_commit one_cherry main.txt one &&\n \ttest_commit two_cherries main.txt two &&\n@@ -828,7 +828,7 @@ EOF\n '\n \n test_expect_success 'status while reverting commit (conflicts)' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo before >to-revert.txt &&\n \ttest_commit before to-revert.txt &&\n \techo old >to-revert.txt &&\n@@ -838,7 +838,7 @@ test_expect_success 'status while reverting commit (conflicts)' '\n \tTO_REVERT=$(git rev-parse --short HEAD^) &&\n \ttest_must_fail git revert $TO_REVERT &&\n \tcat >expected <<EOF &&\n-On branch master\n+On branch main\n You are currently reverting commit $TO_REVERT.\n   (fix conflicts and run \"git revert --continue\")\n   (use \"git revert --skip\" to skip this patch)\n@@ -859,7 +859,7 @@ test_expect_success 'status while reverting commit (conflicts resolved)' '\n \techo reverted >to-revert.txt &&\n \tgit add to-revert.txt &&\n \tcat >expected <<EOF &&\n-On branch master\n+On branch main\n You are currently reverting commit $TO_REVERT.\n   (all conflicts fixed: run \"git revert --continue\")\n   (use \"git revert --skip\" to skip this patch)\n@@ -878,7 +878,7 @@ EOF\n test_expect_success 'status after reverting commit' '\n \tgit revert --continue &&\n \tcat >expected <<\\EOF &&\n-On branch master\n+On branch main\n nothing to commit (use -u to show untracked files)\n EOF\n \tgit status --untracked-files=no >actual &&\n@@ -892,7 +892,7 @@ test_expect_success 'status while reverting after committing conflict resolution\n \techo reverted >to-revert.txt &&\n \tgit commit -a &&\n \tcat >expected <<EOF &&\n-On branch master\n+On branch main\n Revert currently in progress.\n   (run \"git revert --continue\" to continue)\n   (use \"git revert --skip\" to skip this patch)\n@@ -905,7 +905,7 @@ EOF\n '\n \n test_expect_success 'prepare for different number of commits rebased' '\n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \tgit checkout -b several_commits &&\n \ttest_commit one_commit main.txt one &&\n \ttest_commit two_commit main.txt two &&\ndiff --git a/t/t7517-per-repo-email.sh b/t/t7517-per-repo-email.sh\nindex 344d72a5c0..405420ae4d 100755\n--- a/t/t7517-per-repo-email.sh\n+++ b/t/t7517-per-repo-email.sh\n@@ -6,7 +6,7 @@\n \n test_description='per-repo forced setting of email address'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -50,24 +50,24 @@ test_expect_success 'set up rebase scenarios' '\n \n test_expect_success 'fast-forward rebase does not care about ident' '\n \tgit checkout -B tmp side-without-commit &&\n-\tgit rebase master\n+\tgit rebase main\n '\n \n test_expect_success 'non-fast-forward rebase refuses to write commits' '\n \ttest_when_finished \"git rebase --abort || true\" &&\n \tgit checkout -B tmp side-with-commit &&\n-\ttest_must_fail git rebase master\n+\ttest_must_fail git rebase main\n '\n \n test_expect_success 'fast-forward rebase does not care about ident (interactive)' '\n \tgit checkout -B tmp side-without-commit &&\n-\tgit rebase -i master\n+\tgit rebase -i main\n '\n \n test_expect_success 'non-fast-forward rebase refuses to write commits (interactive)' '\n \ttest_when_finished \"git rebase --abort || true\" &&\n \tgit checkout -B tmp side-with-commit &&\n-\ttest_must_fail git rebase -i master\n+\ttest_must_fail git rebase -i main\n '\n \n test_expect_success 'noop interactive rebase does not care about ident' '\n@@ -78,14 +78,14 @@ test_expect_success 'noop interactive rebase does not care about ident' '\n test_expect_success REBASE_P \\\n \t'fast-forward rebase does not care about ident (preserve)' '\n \tgit checkout -B tmp side-without-commit &&\n-\tgit rebase -p master\n+\tgit rebase -p main\n '\n \n test_expect_success REBASE_P \\\n \t'non-fast-forward rebase refuses to write commits (preserve)' '\n \ttest_when_finished \"git rebase --abort || true\" &&\n \tgit checkout -B tmp side-with-commit &&\n-\ttest_must_fail git rebase -p master\n+\ttest_must_fail git rebase -p main\n '\n \n test_expect_success 'author.name overrides user.name' '\ndiff --git a/t/t7600-merge.sh b/t/t7600-merge.sh\nindex 0ad866c08c..b2c1d861dc 100755\n--- a/t/t7600-merge.sh\n+++ b/t/t7600-merge.sh\n@@ -14,9 +14,9 @@ Testing basic merge operations/option parsing.\n     ! [c4] c4\n      ! [c5] c5\n       ! [c6] c6\n-       * [master] Merge commit 'c1'\n+       * [main] Merge commit 'c1'\n --------\n-       - [master] Merge commit 'c1'\n+       - [main] Merge commit 'c1'\n  +     * [c1] commit 1\n       +  [c6] c6\n      +   [c5] c5\n@@ -26,7 +26,7 @@ Testing basic merge operations/option parsing.\n +++++++* [c0] commit 0\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -206,13 +206,13 @@ test_expect_success 'merge c0 with c1 with --ff-only' '\n test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'merge from unborn branch' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \ttest_might_fail git branch -D kid &&\n \n \techo \"OBJID HEAD@{0}: initial pull\" >reflog.expected &&\n \n \tgit checkout --orphan kid &&\n-\ttest_when_finished \"git checkout -f master\" &&\n+\ttest_when_finished \"git checkout -f main\" &&\n \tgit rm -fr . &&\n \ttest_tick &&\n \tgit merge --ff-only c1 &&\n@@ -416,7 +416,7 @@ test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'merge c1 with c2 (no-commit in config)' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"--no-commit\" &&\n+\ttest_config branch.main.mergeoptions \"--no-commit\" &&\n \tgit merge c2 &&\n \tverify_merge file result.1-5 &&\n \tverify_head $c1 &&\n@@ -430,7 +430,7 @@ test_expect_success 'merge c1 with c2 (log in config)' '\n \tgit merge --log c2 &&\n \tgit show -s --pretty=tformat:%s%n%b >expect &&\n \n-\ttest_config branch.master.mergeoptions \"--log\" &&\n+\ttest_config branch.main.mergeoptions \"--log\" &&\n \tgit reset --hard c1 &&\n \tgit merge c2 &&\n \tgit show -s --pretty=tformat:%s%n%b >actual &&\n@@ -443,7 +443,7 @@ test_expect_success 'merge c1 with c2 (log in config gets overridden)' '\n \tgit merge c2 &&\n \tgit show -s --pretty=tformat:%s%n%b >expect &&\n \n-\ttest_config branch.master.mergeoptions \"--no-log\" &&\n+\ttest_config branch.main.mergeoptions \"--no-log\" &&\n \ttest_config merge.log \"true\" &&\n \tgit reset --hard c1 &&\n \tgit merge c2 &&\n@@ -454,7 +454,7 @@ test_expect_success 'merge c1 with c2 (log in config gets overridden)' '\n \n test_expect_success 'merge c1 with c2 (squash in config)' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"--squash\" &&\n+\ttest_config branch.main.mergeoptions \"--squash\" &&\n \tgit merge c2 &&\n \tverify_merge file result.1-5 &&\n \tverify_head $c1 &&\n@@ -466,7 +466,7 @@ test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'override config option -n with --summary' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"-n\" &&\n+\ttest_config branch.main.mergeoptions \"-n\" &&\n \ttest_tick &&\n \tgit merge --summary c2 >diffstat.txt &&\n \tverify_merge file result.1-5 msg.1-5 &&\n@@ -480,7 +480,7 @@ test_expect_success 'override config option -n with --summary' '\n \n test_expect_success 'override config option -n with --stat' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"-n\" &&\n+\ttest_config branch.main.mergeoptions \"-n\" &&\n \ttest_tick &&\n \tgit merge --stat c2 >diffstat.txt &&\n \tverify_merge file result.1-5 msg.1-5 &&\n@@ -496,7 +496,7 @@ test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'override config option --stat' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"--stat\" &&\n+\ttest_config branch.main.mergeoptions \"--stat\" &&\n \ttest_tick &&\n \tgit merge -n c2 >diffstat.txt &&\n \tverify_merge file result.1-5 msg.1-5 &&\n@@ -512,7 +512,7 @@ test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'merge c1 with c2 (override --no-commit)' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"--no-commit\" &&\n+\ttest_config branch.main.mergeoptions \"--no-commit\" &&\n \ttest_tick &&\n \tgit merge --commit c2 &&\n \tverify_merge file result.1-5 msg.1-5 &&\n@@ -523,7 +523,7 @@ test_debug 'git log --graph --decorate --oneline --all'\n \n test_expect_success 'merge c1 with c2 (override --squash)' '\n \tgit reset --hard c1 &&\n-\ttest_config branch.master.mergeoptions \"--squash\" &&\n+\ttest_config branch.main.mergeoptions \"--squash\" &&\n \ttest_tick &&\n \tgit merge --no-squash c2 &&\n \tverify_merge file result.1-5 msg.1-5 &&\n@@ -552,9 +552,9 @@ test_expect_success 'merge c0 with c1 (merge.ff=false)' '\n '\n test_debug 'git log --graph --decorate --oneline --all'\n \n-test_expect_success 'combine branch.master.mergeoptions with merge.ff' '\n+test_expect_success 'combine branch.main.mergeoptions with merge.ff' '\n \tgit reset --hard c0 &&\n-\ttest_config branch.master.mergeoptions \"--ff\" &&\n+\ttest_config branch.main.mergeoptions \"--ff\" &&\n \ttest_config merge.ff \"false\" &&\n \ttest_tick &&\n \tgit merge c1 &&\n@@ -596,7 +596,7 @@ test_expect_success 'option --no-ff overrides merge.ff=only config' '\n \n test_expect_success 'merge c0 with c1 (ff overrides no-ff)' '\n \tgit reset --hard c0 &&\n-\ttest_config branch.master.mergeoptions \"--no-ff\" &&\n+\ttest_config branch.main.mergeoptions \"--no-ff\" &&\n \tgit merge --ff c1 &&\n \tverify_merge file result.1 &&\n \tverify_head $c1\n@@ -609,7 +609,7 @@ test_expect_success 'merge log message' '\n \ttest_must_be_empty msg.act &&\n \n \tgit reset --hard c0 &&\n-\ttest_config branch.master.mergeoptions \"--no-ff\" &&\n+\ttest_config branch.main.mergeoptions \"--no-ff\" &&\n \tgit merge --no-log c2 &&\n \tgit show -s --pretty=format:%b HEAD >msg.act &&\n \ttest_must_be_empty msg.act &&\n@@ -953,10 +953,10 @@ test_expect_success 'set up mod-256 conflict scenario' '\n \tgit add file &&\n \tgit commit -m base &&\n \n-\t# one side changes the first line of each to \"master\"\n-\tsed s/-1/-master/ file >tmp &&\n+\t# one side changes the first line of each to \"main\"\n+\tsed s/-1/-main/ file >tmp &&\n \tmv tmp file &&\n-\tgit commit -am master &&\n+\tgit commit -am main &&\n \n \t# and the other to \"side\"; merging the two will\n \t# yield 256 separate conflicts\n@@ -968,12 +968,12 @@ test_expect_success 'set up mod-256 conflict scenario' '\n \n test_expect_success 'merge detects mod-256 conflicts (recursive)' '\n \tgit reset --hard &&\n-\ttest_must_fail git merge -s recursive master\n+\ttest_must_fail git merge -s recursive main\n '\n \n test_expect_success 'merge detects mod-256 conflicts (resolve)' '\n \tgit reset --hard &&\n-\ttest_must_fail git merge -s resolve master\n+\ttest_must_fail git merge -s resolve main\n '\n \n test_expect_success 'merge nothing into void' '\ndiff --git a/t/t7606-merge-custom.sh b/t/t7606-merge-custom.sh\nindex 8e8c4d7246..81fb7c474c 100755\n--- a/t/t7606-merge-custom.sh\n+++ b/t/t7606-merge-custom.sh\n@@ -4,7 +4,7 @@ test_description=\"git merge\n \n Testing a custom strategy.\n \n-*   (HEAD, master) Merge commit 'c3'\n+*   (HEAD, main) Merge commit 'c3'\n |\\\n | * (tag: c3) c3\n * | (tag: c1) c1\ndiff --git a/t/t7608-merge-messages.sh b/t/t7608-merge-messages.sh\nindex 7059c2a54b..0b908ab2e7 100755\n--- a/t/t7608-merge-messages.sh\n+++ b/t/t7608-merge-messages.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='test auto-generated merge messages'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -13,51 +13,51 @@ check_oneline() {\n }\n \n test_expect_success 'merge local branch' '\n-\ttest_commit master-1 &&\n+\ttest_commit main-1 &&\n \tgit checkout -b local-branch &&\n \ttest_commit branch-1 &&\n-\tgit checkout master &&\n-\ttest_commit master-2 &&\n+\tgit checkout main &&\n+\ttest_commit main-2 &&\n \tgit merge local-branch &&\n \tcheck_oneline \"Merge branch Qlocal-branchQ\"\n '\n \n test_expect_success 'merge octopus branches' '\n-\tgit checkout -b octopus-a master &&\n+\tgit checkout -b octopus-a main &&\n \ttest_commit octopus-1 &&\n-\tgit checkout -b octopus-b master &&\n+\tgit checkout -b octopus-b main &&\n \ttest_commit octopus-2 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge octopus-a octopus-b &&\n \tcheck_oneline \"Merge branches Qoctopus-aQ and Qoctopus-bQ\"\n '\n \n test_expect_success 'merge tag' '\n-\tgit checkout -b tag-branch master &&\n+\tgit checkout -b tag-branch main &&\n \ttest_commit tag-1 &&\n-\tgit checkout master &&\n-\ttest_commit master-3 &&\n+\tgit checkout main &&\n+\ttest_commit main-3 &&\n \tgit merge tag-1 &&\n \tcheck_oneline \"Merge tag Qtag-1Q\"\n '\n \n test_expect_success 'ambiguous tag' '\n-\tgit checkout -b ambiguous master &&\n+\tgit checkout -b ambiguous main &&\n \ttest_commit ambiguous &&\n-\tgit checkout master &&\n-\ttest_commit master-4 &&\n+\tgit checkout main &&\n+\ttest_commit main-4 &&\n \tgit merge ambiguous &&\n \tcheck_oneline \"Merge tag QambiguousQ\"\n '\n \n test_expect_success 'remote-tracking branch' '\n-\tgit checkout -b remote master &&\n+\tgit checkout -b remote main &&\n \ttest_commit remote-1 &&\n-\tgit update-ref refs/remotes/origin/master remote &&\n-\tgit checkout master &&\n-\ttest_commit master-5 &&\n-\tgit merge origin/master &&\n-\tcheck_oneline \"Merge remote-tracking branch Qorigin/masterQ\"\n+\tgit update-ref refs/remotes/origin/main remote &&\n+\tgit checkout main &&\n+\ttest_commit main-5 &&\n+\tgit merge origin/main &&\n+\tcheck_oneline \"Merge remote-tracking branch Qorigin/mainQ\"\n '\n \n test_done\ndiff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh\nindex e65645d5e9..a1c9552f17 100755\n--- a/t/t7610-mergetool.sh\n+++ b/t/t7610-mergetool.sh\n@@ -7,25 +7,25 @@ test_description='git mergetool\n \n Testing basic merge tool invocation'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n \n # All the mergetool test work by checking out a temporary branch based\n-# off 'branch1' and then merging in master and checking the results of\n+# off 'branch1' and then merging in main and checking the results of\n # running mergetool\n \n test_expect_success 'setup' '\n \ttest_config rerere.enabled true &&\n-\techo master >file1 &&\n-\techo master spaced >\"spaced name\" &&\n-\techo master file11 >file11 &&\n-\techo master file12 >file12 &&\n-\techo master file13 >file13 &&\n-\techo master file14 >file14 &&\n+\techo main >file1 &&\n+\techo main spaced >\"spaced name\" &&\n+\techo main file11 >file11 &&\n+\techo main file12 >file12 &&\n+\techo main file13 >file13 &&\n+\techo main file14 >file14 &&\n \tmkdir subdir &&\n-\techo master sub >subdir/file3 &&\n+\techo main sub >subdir/file3 &&\n \ttest_create_repo submod &&\n \t(\n \t\tcd submod &&\n@@ -37,7 +37,7 @@ test_expect_success 'setup' '\n \tgit add file1 \"spaced name\" file1[1-4] subdir/file3 .gitmodules submod &&\n \tgit commit -m \"add initial versions\" &&\n \n-\tgit checkout -b branch1 master &&\n+\tgit checkout -b branch1 main &&\n \tgit submodule update -N &&\n \techo branch1 change >file1 &&\n \techo branch1 newfile >file2 &&\n@@ -74,39 +74,39 @@ test_expect_success 'setup' '\n \ttest_write_lines one two 3 >c/c/file.txt &&\n \tgit commit -a -m\"move to c\" &&\n \n-\tgit checkout -b stash1 master &&\n+\tgit checkout -b stash1 main &&\n \techo stash1 change file11 >file11 &&\n \tgit add file11 &&\n \tgit commit -m \"stash1 changes\" &&\n \n-\tgit checkout -b stash2 master &&\n+\tgit checkout -b stash2 main &&\n \techo stash2 change file11 >file11 &&\n \tgit add file11 &&\n \tgit commit -m \"stash2 changes\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit submodule update -N &&\n-\techo master updated >file1 &&\n-\techo master new >file2 &&\n-\techo master updated spaced >\"spaced name\" &&\n-\techo master both added >both &&\n-\techo master updated file12 >file12 &&\n-\techo master updated file14 >file14 &&\n-\techo master new sub >subdir/file3 &&\n+\techo main updated >file1 &&\n+\techo main new >file2 &&\n+\techo main updated spaced >\"spaced name\" &&\n+\techo main both added >both &&\n+\techo main updated file12 >file12 &&\n+\techo main updated file14 >file14 &&\n+\techo main new sub >subdir/file3 &&\n \t(\n \t\tcd submod &&\n-\t\techo master submodule >bar &&\n+\t\techo main submodule >bar &&\n \t\tgit add bar &&\n-\t\tgit commit -m \"Add bar on master\" &&\n-\t\tgit checkout -b submod-master\n+\t\tgit commit -m \"Add bar on main\" &&\n+\t\tgit checkout -b submod-main\n \t) &&\n \tgit add file1 \"spaced name\" file12 file14 file2 subdir/file3 submod &&\n \tgit add both &&\n \tgit rm file11 &&\n-\tgit commit -m \"master updates\" &&\n+\tgit commit -m \"main updates\" &&\n \n \tgit clean -fdx &&\n-\tgit checkout -b order-file-start master &&\n+\tgit checkout -b order-file-start main &&\n \techo start >a &&\n \techo start >b &&\n \tgit add a b &&\n@@ -133,7 +133,7 @@ test_expect_success 'custom mergetool' '\n \ttest_when_finished \"git reset --hard\" &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tyes \"\" | git mergetool both &&\n \tyes \"\" | git mergetool file1 file1 &&\n \tyes \"\" | git mergetool file2 \"spaced name\" &&\n@@ -141,11 +141,11 @@ test_expect_success 'custom mergetool' '\n \tyes \"d\" | git mergetool file11 &&\n \tyes \"d\" | git mergetool file12 &&\n \tyes \"l\" | git mergetool submod &&\n-\techo \"master updated\" >expect &&\n+\techo \"main updated\" >expect &&\n \ttest_cmp expect file1 &&\n-\techo \"master new\" >expect &&\n+\techo \"main new\" >expect &&\n \ttest_cmp expect file2 &&\n-\techo \"master new sub\" >expect &&\n+\techo \"main new sub\" >expect &&\n \ttest_cmp expect subdir/file3 &&\n \techo \"branch1 submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n@@ -159,7 +159,7 @@ test_expect_success 'gui mergetool' '\n \ttest_when_finished \"git reset --hard\" &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tyes \"\" | git mergetool --gui both &&\n \tyes \"\" | git mergetool -g file1 file1 &&\n \tyes \"\" | git mergetool --gui file2 \"spaced name\" &&\n@@ -167,11 +167,11 @@ test_expect_success 'gui mergetool' '\n \tyes \"d\" | git mergetool --gui file11 &&\n \tyes \"d\" | git mergetool --gui file12 &&\n \tyes \"l\" | git mergetool --gui submod &&\n-\techo \"gui master updated\" >expect &&\n+\techo \"gui main updated\" >expect &&\n \ttest_cmp expect file1 &&\n-\techo \"gui master new\" >expect &&\n+\techo \"gui main new\" >expect &&\n \ttest_cmp expect file2 &&\n-\techo \"gui master new sub\" >expect &&\n+\techo \"gui main new sub\" >expect &&\n \ttest_cmp expect subdir/file3 &&\n \techo \"branch1 submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n@@ -182,7 +182,7 @@ test_expect_success 'gui mergetool without merge.guitool set falls back to merge\n \ttest_when_finished \"git reset --hard\" &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tyes \"\" | git mergetool --gui both &&\n \tyes \"\" | git mergetool -g file1 file1 &&\n \tyes \"\" | git mergetool --gui file2 \"spaced name\" &&\n@@ -190,11 +190,11 @@ test_expect_success 'gui mergetool without merge.guitool set falls back to merge\n \tyes \"d\" | git mergetool --gui file11 &&\n \tyes \"d\" | git mergetool --gui file12 &&\n \tyes \"l\" | git mergetool --gui submod &&\n-\techo \"master updated\" >expect &&\n+\techo \"main updated\" >expect &&\n \ttest_cmp expect file1 &&\n-\techo \"master new\" >expect &&\n+\techo \"main new\" >expect &&\n \ttest_cmp expect file2 &&\n-\techo \"master new sub\" >expect &&\n+\techo \"main new sub\" >expect &&\n \ttest_cmp expect subdir/file3 &&\n \techo \"branch1 submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n@@ -209,7 +209,7 @@ test_expect_success 'mergetool crlf' '\n \t# test_when_finished is LIFO.)\n \ttest_config core.autocrlf true &&\n \tgit checkout -b test$test_count branch1 &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tyes \"\" | git mergetool file1 &&\n \tyes \"\" | git mergetool file2 &&\n \tyes \"\" | git mergetool \"spaced name\" &&\n@@ -218,11 +218,11 @@ test_expect_success 'mergetool crlf' '\n \tyes \"d\" | git mergetool file11 &&\n \tyes \"d\" | git mergetool file12 &&\n \tyes \"r\" | git mergetool submod &&\n-\ttest \"$(printf x | cat file1 -)\" = \"$(printf \"master updated\\r\\nx\")\" &&\n-\ttest \"$(printf x | cat file2 -)\" = \"$(printf \"master new\\r\\nx\")\" &&\n-\ttest \"$(printf x | cat subdir/file3 -)\" = \"$(printf \"master new sub\\r\\nx\")\" &&\n+\ttest \"$(printf x | cat file1 -)\" = \"$(printf \"main updated\\r\\nx\")\" &&\n+\ttest \"$(printf x | cat file2 -)\" = \"$(printf \"main new\\r\\nx\")\" &&\n+\ttest \"$(printf x | cat subdir/file3 -)\" = \"$(printf \"main new sub\\r\\nx\")\" &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit commit -m \"branch1 resolved with mergetool - autocrlf\"\n '\n@@ -233,9 +233,9 @@ test_expect_success 'mergetool in subdir' '\n \tgit submodule update -N &&\n \t(\n \t\tcd subdir &&\n-\t\ttest_must_fail git merge master &&\n+\t\ttest_must_fail git merge main &&\n \t\tyes \"\" | git mergetool file3 &&\n-\t\techo \"master new sub\" >expect &&\n+\t\techo \"main new sub\" >expect &&\n \t\ttest_cmp expect file3\n \t)\n '\n@@ -246,7 +246,7 @@ test_expect_success 'mergetool on file in parent dir' '\n \tgit submodule update -N &&\n \t(\n \t\tcd subdir &&\n-\t\ttest_must_fail git merge master &&\n+\t\ttest_must_fail git merge main &&\n \t\tyes \"\" | git mergetool file3 &&\n \t\tyes \"\" | git mergetool ../file1 &&\n \t\tyes \"\" | git mergetool ../file2 ../spaced\\ name &&\n@@ -254,9 +254,9 @@ test_expect_success 'mergetool on file in parent dir' '\n \t\tyes \"d\" | git mergetool ../file11 &&\n \t\tyes \"d\" | git mergetool ../file12 &&\n \t\tyes \"l\" | git mergetool ../submod &&\n-\t\techo \"master updated\" >expect &&\n+\t\techo \"main updated\" >expect &&\n \t\ttest_cmp expect ../file1 &&\n-\t\techo \"master new\" >expect &&\n+\t\techo \"main new\" >expect &&\n \t\ttest_cmp expect ../file2 &&\n \t\techo \"branch1 submodule\" >expect &&\n \t\ttest_cmp expect ../submod/bar &&\n@@ -268,7 +268,7 @@ test_expect_success 'mergetool skips autoresolved' '\n \ttest_when_finished \"git reset --hard\" &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"d\" | git mergetool file11 &&\n \tyes \"d\" | git mergetool file12 &&\n@@ -283,17 +283,17 @@ test_expect_success 'mergetool merges all from subdir (rerere disabled)' '\n \ttest_config rerere.enabled false &&\n \t(\n \t\tcd subdir &&\n-\t\ttest_must_fail git merge master &&\n+\t\ttest_must_fail git merge main &&\n \t\tyes \"r\" | git mergetool ../submod &&\n \t\tyes \"d\" \"d\" | git mergetool --no-prompt &&\n-\t\techo \"master updated\" >expect &&\n+\t\techo \"main updated\" >expect &&\n \t\ttest_cmp expect ../file1 &&\n-\t\techo \"master new\" >expect &&\n+\t\techo \"main new\" >expect &&\n \t\ttest_cmp expect ../file2 &&\n-\t\techo \"master new sub\" >expect &&\n+\t\techo \"main new sub\" >expect &&\n \t\ttest_cmp expect file3 &&\n \t\t( cd .. && git submodule update -N ) &&\n-\t\techo \"master submodule\" >expect &&\n+\t\techo \"main submodule\" >expect &&\n \t\ttest_cmp expect ../submod/bar &&\n \t\tgit commit -m \"branch2 resolved by mergetool from subdir\"\n \t)\n@@ -306,17 +306,17 @@ test_expect_success 'mergetool merges all from subdir (rerere enabled)' '\n \trm -rf .git/rr-cache &&\n \t(\n \t\tcd subdir &&\n-\t\ttest_must_fail git merge master &&\n+\t\ttest_must_fail git merge main &&\n \t\tyes \"r\" | git mergetool ../submod &&\n \t\tyes \"d\" \"d\" | git mergetool --no-prompt &&\n-\t\techo \"master updated\" >expect &&\n+\t\techo \"main updated\" >expect &&\n \t\ttest_cmp expect ../file1 &&\n-\t\techo \"master new\" >expect &&\n+\t\techo \"main new\" >expect &&\n \t\ttest_cmp expect ../file2 &&\n-\t\techo \"master new sub\" >expect &&\n+\t\techo \"main new sub\" >expect &&\n \t\ttest_cmp expect file3 &&\n \t\t( cd .. && git submodule update -N ) &&\n-\t\techo \"master submodule\" >expect &&\n+\t\techo \"main submodule\" >expect &&\n \t\ttest_cmp expect ../submod/bar &&\n \t\tgit commit -m \"branch2 resolved by mergetool from subdir\"\n \t)\n@@ -328,7 +328,7 @@ test_expect_success 'mergetool skips resolved paths when rerere is active' '\n \trm -rf .git/rr-cache &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tyes \"l\" | git mergetool --no-prompt submod &&\n \tyes \"d\" \"d\" | git mergetool --no-prompt &&\n \tgit submodule update -N &&\n@@ -369,11 +369,11 @@ test_expect_success 'mergetool takes partial path' '\n \ttest_config rerere.enabled false &&\n \tgit checkout -b test$test_count branch1 &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \n \tyes \"\" | git mergetool subdir &&\n \n-\techo \"master new sub\" >expect &&\n+\techo \"main new sub\" >expect &&\n \ttest_cmp expect subdir/file3\n '\n \n@@ -437,7 +437,7 @@ test_expect_success 'deleted vs modified submodule' '\n \tgit rm --cached submod &&\n \tgit commit -m \"Submodule deleted from branch\" &&\n \tgit checkout -b test$test_count.a test$test_count &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 &&\n \tyes \"\" | git mergetool both &&\n@@ -447,7 +447,7 @@ test_expect_success 'deleted vs modified submodule' '\n \techo \"branch1 submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \toutput=\"$(git mergetool --no-prompt)\" &&\n \ttest \"$output\" = \"No files need merging\" &&\n@@ -456,7 +456,7 @@ test_expect_success 'deleted vs modified submodule' '\n \tmv submod submod-movedaside &&\n \tgit checkout -b test$test_count.b test$test_count &&\n \tgit submodule update -N &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 &&\n \tyes \"\" | git mergetool both &&\n@@ -468,7 +468,7 @@ test_expect_success 'deleted vs modified submodule' '\n \tgit commit -m \"Merge resolved by deleting module\" &&\n \n \tmv submod-movedaside submod &&\n-\tgit checkout -b test$test_count.c master &&\n+\tgit checkout -b test$test_count.c main &&\n \tgit submodule update -N &&\n \ttest_must_fail git merge test$test_count &&\n \ttest -n \"$(git ls-files -u)\" &&\n@@ -484,7 +484,7 @@ test_expect_success 'deleted vs modified submodule' '\n \tgit commit -m \"Merge resolved by deleting module\" &&\n \tmv submod.orig submod &&\n \n-\tgit checkout -b test$test_count.d master &&\n+\tgit checkout -b test$test_count.d main &&\n \tgit submodule update -N &&\n \ttest_must_fail git merge test$test_count &&\n \ttest -n \"$(git ls-files -u)\" &&\n@@ -492,10 +492,10 @@ test_expect_success 'deleted vs modified submodule' '\n \tyes \"\" | git mergetool both &&\n \tyes \"d\" | git mergetool file11 file12 &&\n \tyes \"l\" | git mergetool submod &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \toutput=\"$(git mergetool --no-prompt)\" &&\n \ttest \"$output\" = \"No files need merging\" &&\n@@ -512,7 +512,7 @@ test_expect_success 'file vs modified submodule' '\n \tgit add submod &&\n \tgit commit -m \"Submodule path becomes file\" &&\n \tgit checkout -b test$test_count.a branch1 &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 &&\n \tyes \"\" | git mergetool both &&\n@@ -522,7 +522,7 @@ test_expect_success 'file vs modified submodule' '\n \techo \"branch1 submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \toutput=\"$(git mergetool --no-prompt)\" &&\n \ttest \"$output\" = \"No files need merging\" &&\n@@ -530,7 +530,7 @@ test_expect_success 'file vs modified submodule' '\n \n \tmv submod submod-movedaside &&\n \tgit checkout -b test$test_count.b test$test_count &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"\" | git mergetool file1 file2 spaced\\ name subdir/file3 &&\n \tyes \"\" | git mergetool both &&\n@@ -550,7 +550,7 @@ test_expect_success 'file vs modified submodule' '\n \ttest \"$output\" = \"No files need merging\" &&\n \tgit commit -m \"Merge resolved by keeping file\" &&\n \n-\tgit checkout -b test$test_count.c master &&\n+\tgit checkout -b test$test_count.c main &&\n \trmdir submod && mv submod-movedaside submod &&\n \ttest ! -e submod.orig &&\n \tgit submodule update -N &&\n@@ -576,7 +576,7 @@ test_expect_success 'file vs modified submodule' '\n \ttest \"$output\" = \"No files need merging\" &&\n \tgit commit -m \"Merge resolved by keeping file\" &&\n \n-\tgit checkout -b test$test_count.d master &&\n+\tgit checkout -b test$test_count.d main &&\n \trmdir submod && mv submod.orig submod &&\n \tgit submodule update -N &&\n \ttest_must_fail git merge test$test_count &&\n@@ -589,10 +589,10 @@ test_expect_success 'file vs modified submodule' '\n \tthen\n \t\tyes \"d\" | git mergetool submod~test19\n \tfi &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \toutput=\"$(git mergetool --no-prompt)\" &&\n \ttest \"$output\" = \"No files need merging\" &&\n@@ -675,7 +675,7 @@ test_expect_success 'directory vs modified submodule' '\n \tgit add submod/file16 &&\n \tgit commit -m \"Submodule path becomes directory\" &&\n \n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"l\" | git mergetool submod &&\n \techo \"not a submodule\" >expect &&\n@@ -683,14 +683,14 @@ test_expect_success 'directory vs modified submodule' '\n \trm -rf submod.orig &&\n \n \tgit reset --hard &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \ttest -n \"$(git ls-files -u)\" &&\n \ttest ! -e submod.orig &&\n \tif test \"$GIT_TEST_MERGE_ALGORITHM\" = ort\n \tthen\n-\t\tyes \"r\" | git mergetool submod~master &&\n+\t\tyes \"r\" | git mergetool submod~main &&\n \t\tgit mv submod submod.orig &&\n-\t\tgit mv submod~master submod\n+\t\tgit mv submod~main submod\n \telse\n \t\tyes \"r\" | git mergetool submod\n \tfi &&\n@@ -701,18 +701,18 @@ test_expect_success 'directory vs modified submodule' '\n \tmv submod-movedaside/.git submod &&\n \t( cd submod && git clean -f && git reset --hard ) &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \tgit reset --hard &&\n \trm -rf submod-movedaside &&\n \n-\tgit checkout -b test$test_count.c master &&\n+\tgit checkout -b test$test_count.c main &&\n \tgit submodule update -N &&\n \ttest_must_fail git merge test$test_count &&\n \ttest -n \"$(git ls-files -u)\" &&\n \tyes \"l\" | git mergetool submod &&\n \tgit submodule update -N &&\n-\techo \"master submodule\" >expect &&\n+\techo \"main submodule\" >expect &&\n \ttest_cmp expect submod/bar &&\n \n \tgit reset --hard &&\n@@ -724,7 +724,7 @@ test_expect_success 'directory vs modified submodule' '\n \techo \"not a submodule\" >expect &&\n \ttest_cmp expect submod/file16 &&\n \n-\tgit reset --hard master &&\n+\tgit reset --hard main &&\n \t( cd submod && git clean -f && git reset --hard ) &&\n \tgit submodule update -N\n '\n@@ -732,7 +732,7 @@ test_expect_success 'directory vs modified submodule' '\n test_expect_success 'file with no base' '\n \ttest_when_finished \"git reset --hard\" &&\n \tgit checkout -b test$test_count branch1 &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit mergetool --no-prompt --tool mybase -- both &&\n \ttest_must_be_empty both\n '\n@@ -742,9 +742,9 @@ test_expect_success 'custom commands override built-ins' '\n \tgit checkout -b test$test_count branch1 &&\n \ttest_config mergetool.defaults.cmd \"cat \\\"\\$REMOTE\\\" >\\\"\\$MERGED\\\"\" &&\n \ttest_config mergetool.defaults.trustExitCode true &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit mergetool --no-prompt --tool defaults -- both &&\n-\techo master both added >expected &&\n+\techo main both added >expected &&\n \ttest_cmp expected both\n '\n \n@@ -754,7 +754,7 @@ test_expect_success 'filenames seen by tools start with ./' '\n \ttest_config mergetool.writeToTemp false &&\n \ttest_config mergetool.myecho.cmd \"echo \\\"\\$LOCAL\\\"\" &&\n \ttest_config mergetool.myecho.trustExitCode true &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit mergetool --no-prompt --tool myecho -- both >actual &&\n \tgrep ^\\./both_LOCAL_ actual\n '\n@@ -771,7 +771,7 @@ test_expect_success MKTEMP 'temporary filenames are used with mergetool.writeToT\n \ttest_config mergetool.writeToTemp true &&\n \ttest_config mergetool.myecho.cmd \"echo \\\"\\$LOCAL\\\"\" &&\n \ttest_config mergetool.myecho.trustExitCode true &&\n-\ttest_must_fail git merge master &&\n+\ttest_must_fail git merge main &&\n \tgit mergetool --no-prompt --tool myecho -- both >actual &&\n \t! grep ^\\./both_LOCAL_ actual &&\n \tgrep /both_LOCAL_ actual\ndiff --git a/t/t7611-merge-abort.sh b/t/t7611-merge-abort.sh\nindex ed072bfb19..c0e9425115 100755\n--- a/t/t7611-merge-abort.sh\n+++ b/t/t7611-merge-abort.sh\n@@ -7,7 +7,7 @@ Set up repo with conflicting and non-conflicting branches:\n There are three files foo/bar/baz, and the following graph illustrates the\n content of these files in each commit:\n \n-# foo/bar/baz --- foo/bar/bazz     <-- master\n+# foo/bar/baz --- foo/bar/bazz     <-- main\n #             \\\n #              --- foo/barf/bazf   <-- conflict_branch\n #               \\\n@@ -22,7 +22,7 @@ Next, test git merge --abort with the following variables:\n - changed/unchanged worktree after merge\n - changed/unchanged index after merge\n '\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -43,7 +43,7 @@ test_expect_success 'setup' '\n \tgit checkout -b clean_branch HEAD^ &&\n \techo bart > bar &&\n \tgit commit -a -m \"clean\" &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n pre_merge_head=\"$(git rev-parse HEAD)\"\ndiff --git a/t/t7612-merge-verify-signatures.sh b/t/t7612-merge-verify-signatures.sh\nindex b4ec88f996..61330f71b1 100755\n--- a/t/t7612-merge-verify-signatures.sh\n+++ b/t/t7612-merge-verify-signatures.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='merge signature verification tests'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -34,7 +34,7 @@ test_expect_success GPG 'create signed commits' '\n \techo 3 >baz && git add baz &&\n \ttest_tick && git commit -SB7227189 -m \"untrusted on side\" &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success GPG 'merge unsigned commit with verification' '\ndiff --git a/t/t7614-merge-signoff.sh b/t/t7614-merge-signoff.sh\nindex ea4eeee35f..fee258d4f0 100755\n--- a/t/t7614-merge-signoff.sh\n+++ b/t/t7614-merge-signoff.sh\n@@ -5,7 +5,7 @@ test_description='git merge --signoff\n This test runs git merge --signoff and makes sure that it works.\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -14,17 +14,17 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n test_setup() {\n \t# Expected commit message after merge --signoff\n \tcat >expected-signed <<EOF &&\n-Merge branch 'master' into other-branch\n+Merge branch 'main' into other-branch\n \n Signed-off-by: $(git var GIT_COMMITTER_IDENT | sed -e \"s/>.*/>/\")\n EOF\n \n \t# Expected commit message after merge without --signoff (or with --no-signoff)\n \tcat >expected-unsigned <<EOF &&\n-Merge branch 'master' into other-branch\n+Merge branch 'main' into other-branch\n EOF\n \n-\t# Initial commit and feature branch to merge master into it.\n+\t# Initial commit and feature branch to merge main into it.\n \tgit commit --allow-empty -m \"Initial empty commit\" &&\n \tgit checkout -b other-branch &&\n \ttest_commit other-branch file1 1\n@@ -41,30 +41,30 @@ test_expect_success 'setup' '\n \n # Test with --signoff flag\n test_expect_success 'git merge --signoff adds a sign-off line' '\n-\tgit checkout master &&\n-\ttest_commit master-branch-2 file2 2 &&\n+\tgit checkout main &&\n+\ttest_commit main-branch-2 file2 2 &&\n \tgit checkout other-branch &&\n-\tgit merge master --signoff --no-edit &&\n+\tgit merge main --signoff --no-edit &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n \ttest_cmp expected-signed actual\n '\n \n # Test without --signoff flag\n test_expect_success 'git merge does not add a sign-off line' '\n-\tgit checkout master &&\n-\ttest_commit master-branch-3 file3 3 &&\n+\tgit checkout main &&\n+\ttest_commit main-branch-3 file3 3 &&\n \tgit checkout other-branch &&\n-\tgit merge master --no-edit &&\n+\tgit merge main --no-edit &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n \ttest_cmp expected-unsigned actual\n '\n \n # Test for --no-signoff flag\n test_expect_success 'git merge --no-signoff flag cancels --signoff flag' '\n-\tgit checkout master &&\n-\ttest_commit master-branch-4 file4 4 &&\n+\tgit checkout main &&\n+\ttest_commit main-branch-4 file4 4 &&\n \tgit checkout other-branch &&\n-\tgit merge master --no-edit --signoff --no-signoff &&\n+\tgit merge main --no-edit --signoff --no-signoff &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n \ttest_cmp expected-unsigned actual\n '\ndiff --git a/t/t7701-repack-unpack-unreachable.sh b/t/t7701-repack-unpack-unreachable.sh\nindex 375f43a721..937f89ee8c 100755\n--- a/t/t7701-repack-unpack-unreachable.sh\n+++ b/t/t7701-repack-unpack-unreachable.sh\n@@ -2,7 +2,7 @@\n \n test_description='git repack works correctly'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -25,7 +25,7 @@ test_expect_success '-A with -d option leaves unreachable objects unpacked' '\n \tgit commit -a -m more_content &&\n \tcsha1=$(git rev-parse HEAD^{commit}) &&\n \ttsha1=$(git rev-parse HEAD^{tree}) &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo even more content >> file1 &&\n \ttest_tick &&\n \tgit commit -a -m even_more_content &&\ndiff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh\nindex f938efa296..9662abc1e7 100755\n--- a/t/t7800-difftool.sh\n+++ b/t/t7800-difftool.sh\n@@ -8,7 +8,7 @@ test_description='git-difftool\n Testing basic diff tool invocation\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -38,23 +38,23 @@ test_expect_success 'basic usage requires no repo' '\n \ttest_i18ngrep ^usage: output\n '\n \n-# Create a file on master and change it on branch\n+# Create a file on main and change it on branch\n test_expect_success 'setup' '\n-\techo master >file &&\n+\techo main >file &&\n \tgit add file &&\n \tgit commit -m \"added file\" &&\n \n-\tgit checkout -b branch master &&\n+\tgit checkout -b branch main &&\n \techo branch >file &&\n \tgit commit -a -m \"branch changed file\" &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n # Configure a custom difftool.<tool>.cmd and use it\n test_expect_success 'custom commands' '\n \tdifftool_test_setup &&\n \ttest_config difftool.test-tool.cmd \"cat \\\"\\$REMOTE\\\"\" &&\n-\techo master >expect &&\n+\techo main >expect &&\n \tgit difftool --no-prompt branch >actual &&\n \ttest_cmp expect actual &&\n \n@@ -66,7 +66,7 @@ test_expect_success 'custom commands' '\n \n test_expect_success 'custom tool commands override built-ins' '\n \ttest_config difftool.vimdiff.cmd \"cat \\\"\\$REMOTE\\\"\" &&\n-\techo master >expect &&\n+\techo main >expect &&\n \tgit difftool --tool vimdiff --no-prompt branch >actual &&\n \ttest_cmp expect actual\n '\n@@ -314,21 +314,21 @@ test_expect_success 'difftool.<tool>.path' '\n \n test_expect_success 'difftool --extcmd=cat' '\n \techo branch >expect &&\n-\techo master >>expect &&\n+\techo main >>expect &&\n \tgit difftool --no-prompt --extcmd=cat branch >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'difftool --extcmd cat' '\n \techo branch >expect &&\n-\techo master >>expect &&\n+\techo main >>expect &&\n \tgit difftool --no-prompt --extcmd=cat branch >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'difftool -x cat' '\n \techo branch >expect &&\n-\techo master >>expect &&\n+\techo main >>expect &&\n \tgit difftool --no-prompt -x cat branch >actual &&\n \ttest_cmp expect actual\n '\n@@ -341,7 +341,7 @@ test_expect_success 'difftool --extcmd echo arg1' '\n '\n \n test_expect_success 'difftool --extcmd cat arg1' '\n-\techo master >expect &&\n+\techo main >expect &&\n \tgit difftool --no-prompt \\\n \t\t--extcmd sh\\ -c\\ \\\"cat\\ \\$1\\\" branch >actual &&\n \ttest_cmp expect actual\n@@ -354,7 +354,7 @@ test_expect_success 'difftool --extcmd cat arg2' '\n \ttest_cmp expect actual\n '\n \n-# Create a second file on master and a different version on branch\n+# Create a second file on main and a different version on branch\n test_expect_success 'setup with 2 files different' '\n \techo m2 >file2 &&\n \tgit add file2 &&\n@@ -364,7 +364,7 @@ test_expect_success 'setup with 2 files different' '\n \techo br2 >file2 &&\n \tgit add file2 &&\n \tgit commit -a -m \"branch changed file2\" &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'say no to the first file' '\n@@ -372,14 +372,14 @@ test_expect_success 'say no to the first file' '\n \tgit difftool -x cat branch <input >output &&\n \tgrep m2 output &&\n \tgrep br2 output &&\n-\t! grep master output &&\n+\t! grep main output &&\n \t! grep branch output\n '\n \n test_expect_success 'say no to the second file' '\n \t(echo && echo n) >input &&\n \tgit difftool -x cat branch <input >output &&\n-\tgrep master output &&\n+\tgrep main output &&\n \tgrep branch output &&\n \t! grep m2 output &&\n \t! grep br2 output\n@@ -387,7 +387,7 @@ test_expect_success 'say no to the second file' '\n \n test_expect_success 'ending prompt input with EOF' '\n \tgit difftool -x cat branch </dev/null >output &&\n-\t! grep master output &&\n+\t! grep main output &&\n \t! grep branch output &&\n \t! grep m2 output &&\n \t! grep br2 output\n@@ -399,9 +399,9 @@ test_expect_success 'difftool --tool-help' '\n '\n \n test_expect_success 'setup change in subdirectory' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tmkdir sub &&\n-\techo master >sub/sub &&\n+\techo main >sub/sub &&\n \tgit add sub/sub &&\n \tgit commit -m \"added sub/sub\" &&\n \tgit tag v1 &&\n@@ -529,7 +529,7 @@ run_dir_diff_test 'difftool --dir-diff from subdirectory with GIT_DIR set' '\n run_dir_diff_test 'difftool --dir-diff when worktree file is missing' '\n \ttest_when_finished git reset --hard &&\n \trm file2 &&\n-\tgit difftool --dir-diff $symlinks --extcmd ls branch master >output &&\n+\tgit difftool --dir-diff $symlinks --extcmd ls branch main >output &&\n \tgrep file2 output\n '\n \n@@ -546,7 +546,7 @@ run_dir_diff_test 'difftool --dir-diff with unmerged files' '\n \techo b >>file &&\n \tgit add file &&\n \tgit commit -m conflict-b &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge conflict-a &&\n \ttest_must_fail git merge conflict-b &&\n \tcat >expect <<-EOF &&\ndiff --git a/t/t7810-grep.sh b/t/t7810-grep.sh\nindex 47ec993962..9f1aa9ef25 100755\n--- a/t/t7810-grep.sh\n+++ b/t/t7810-grep.sh\n@@ -6,7 +6,7 @@\n test_description='git grep various.\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -1209,19 +1209,19 @@ test_expect_success 'grep -e -- -- path' '\n '\n \n test_expect_success 'dashdash disambiguates rev as rev' '\n-\ttest_when_finished \"rm -f master\" &&\n-\techo content >master &&\n-\techo master:hello.c >expect &&\n-\tgit grep -l o master -- hello.c >actual &&\n+\ttest_when_finished \"rm -f main\" &&\n+\techo content >main &&\n+\techo main:hello.c >expect &&\n+\tgit grep -l o main -- hello.c >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'dashdash disambiguates pathspec as pathspec' '\n-\ttest_when_finished \"git rm -f master\" &&\n-\techo content >master &&\n-\tgit add master &&\n-\techo master:content >expect &&\n-\tgit grep o -- master >actual &&\n+\ttest_when_finished \"git rm -f main\" &&\n+\techo content >main &&\n+\tgit add main &&\n+\techo main:content >expect &&\n+\tgit grep o -- main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -1257,15 +1257,15 @@ test_expect_success 'grep --no-index pattern -- path' '\n '\n \n test_expect_success 'grep --no-index complains of revs' '\n-\ttest_must_fail git grep --no-index o master -- 2>err &&\n+\ttest_must_fail git grep --no-index o main -- 2>err &&\n \ttest_i18ngrep \"cannot be used with revs\" err\n '\n \n test_expect_success 'grep --no-index prefers paths to revs' '\n-\ttest_when_finished \"rm -f master\" &&\n-\techo content >master &&\n-\techo master:content >expect &&\n-\tgit grep --no-index o master >actual &&\n+\ttest_when_finished \"rm -f main\" &&\n+\techo content >main &&\n+\techo main:content >expect &&\n+\tgit grep --no-index o main >actual &&\n \ttest_cmp expect actual\n '\n \n-- \ngitgitgadget\n\n"},{"id":"410301","messageId":"ec9b9cab889e51f367a33edf1870c3a92ff4eba4.1605743088.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 28/28] tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:46Z","receivedAt":"2020-11-18T23:45:27Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe introduced the `PREPARE_FOR_MAIN_BRANCH` prereq for the sole purpose\nof allowing us to perform the non-trivial adjustments regarding the\n`master` -> `main` rename before the automatable ones.\n\nNow that the transition is almost complete, we can stop using it in most\ninstances. The only two exceptions are t5526 and t9902: at the time of\nwriting, there are other patches in flight that touch these test\nscripts, therefore their transition to `main` is postponed to a later\ndate.\n\nThis patch is the result of this command:\n\n\tsed -i 's/PREPARE_FOR_MAIN_BRANCH[ ,]//' t/t[0-9]*.sh &&\n\tgit checkout HEAD -- t/t5526\\* t/t9902\\*\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t1400-update-ref.sh              |  4 ++--\n t/t3200-branch.sh                  |  6 +++---\n t/t3201-branch-contains.sh         |  2 +-\n t/t3203-branch-output.sh           |  2 +-\n t/t3205-branch-color.sh            |  2 +-\n t/t5505-remote.sh                  |  8 ++++----\n t/t5510-fetch.sh                   |  4 ++--\n t/t5703-upload-pack-ref-in-want.sh |  2 +-\n t/t6302-for-each-ref-filter.sh     | 12 ++++++------\n 9 files changed, 21 insertions(+), 21 deletions(-)\n\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex 1ad0bbbc53..e7cd4917d1 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -588,7 +588,7 @@ test_expect_success 'stdin fails on unbalanced quotes' '\n \tgrep \"fatal: badly quoted argument: \\\\\\\"main\" err\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin fails on invalid escape' '\n+test_expect_success 'stdin fails on invalid escape' '\n \techo \"create $a \\\"ma\\zn\\\"\" >stdin &&\n \ttest_must_fail git update-ref --stdin <stdin 2>err &&\n \tgrep \"fatal: badly quoted argument: \\\\\\\"ma\\\\\\\\zn\\\\\\\"\" err\n@@ -707,7 +707,7 @@ test_expect_success 'stdin succeeds with quoted argument' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin succeeds with escaped character' '\n+test_expect_success 'stdin succeeds with escaped character' '\n \tgit update-ref -d $a &&\n \techo \"create $a \\\"ma\\\\151n\\\"\" >stdin &&\n \tgit update-ref --stdin <stdin &&\ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex 56517dd9c3..66eed73f83 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -324,7 +324,7 @@ test_expect_success 'git branch --list -v with --abbrev' '\n \n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch --column' '\n+test_expect_success 'git branch --column' '\n \tCOLUMNS=81 git branch --column=column >actual &&\n \tcat >expect <<\\EOF &&\n   a/b/c   bam     foo     l     * main    n       o/p     r\n@@ -361,7 +361,7 @@ EOF\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch with column.*' '\n+test_expect_success 'git branch with column.*' '\n \tgit config column.ui column &&\n \tgit config column.branch \"dense\" &&\n \tCOLUMNS=80 git branch >actual &&\n@@ -378,7 +378,7 @@ test_expect_success 'git branch --column -v should fail' '\n \ttest_must_fail git branch --column -v\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch -v with column.ui ignored' '\n+test_expect_success 'git branch -v with column.ui ignored' '\n \tgit config column.ui column &&\n \tCOLUMNS=80 git branch -v | cut -c -8 | sed \"s/ *$//\" >actual &&\n \tgit config --unset column.ui &&\ndiff --git a/t/t3201-branch-contains.sh b/t/t3201-branch-contains.sh\nindex 8e626afbb9..f9f4d20e93 100755\n--- a/t/t3201-branch-contains.sh\n+++ b/t/t3201-branch-contains.sh\n@@ -245,7 +245,7 @@ test_expect_success 'branch --merged combined with --no-merged' '\n # Here \"topic\" tracks \"main\" with one extra commit, and \"zzz\" points to the\n # same tip as main The name \"zzz\" must come alphabetically after \"topic\"\n # as we process them in that order.\n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'branch --merged with --verbose' '\n+test_expect_success 'branch --merged with --verbose' '\n \tgit branch --track topic main &&\n \tgit branch zzz topic &&\n \tgit checkout topic &&\ndiff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh\nindex a7d2edd988..eaa37534aa 100755\n--- a/t/t3203-branch-output.sh\n+++ b/t/t3203-branch-output.sh\n@@ -332,7 +332,7 @@ test_expect_success '--color overrides auto-color' '\n \ttest_cmp expect.color actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output lists worktree path' '\n+test_expect_success 'verbose output lists worktree path' '\n \tone=$(git rev-parse --short HEAD) &&\n \ttwo=$(git rev-parse --short main) &&\n \tcat >expect <<-EOF &&\ndiff --git a/t/t3205-branch-color.sh b/t/t3205-branch-color.sh\nindex b905dc4867..2a09442c2b 100755\n--- a/t/t3205-branch-color.sh\n+++ b/t/t3205-branch-color.sh\n@@ -31,7 +31,7 @@ test_expect_success 'regular output shows colors' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output shows colors' '\n+test_expect_success 'verbose output shows colors' '\n \toid=$(git rev-parse --short HEAD) &&\n \tcat >expect <<-EOF &&\n \t* <CYAN>main               <RESET> $oid foo\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex f7e3c9b1e7..59fbb1fa7f 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -237,7 +237,7 @@ cat >test/expect <<EOF\n     main  pushes to another (up to date)\n EOF\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'show' '\n+test_expect_success 'show' '\n \t(\n \t\tcd test &&\n \t\tgit config --add remote.origin.fetch refs/heads/main:refs/heads/upstream &&\n@@ -288,7 +288,7 @@ cat >test/expect <<EOF\n     refs/tags/lastbackup forces to refs/tags/lastbackup\n EOF\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'show -n' '\n+test_expect_success 'show -n' '\n \tmv one one.unreachable &&\n \t(\n \t\tcd test &&\n@@ -331,7 +331,7 @@ test_expect_success 'set-head --auto' '\n \t)\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'set-head --auto has no problem w/multiple HEADs' '\n+test_expect_success 'set-head --auto has no problem w/multiple HEADs' '\n \t(\n \t\tcd test &&\n \t\tgit fetch two \"refs/heads/*:refs/remotes/two/*\" &&\n@@ -1351,7 +1351,7 @@ test_expect_success 'unqualified <dst> refspec DWIM and advice' '\n \t)\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '\n+test_expect_success 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '\n \t(\n \t\tcd two &&\n \t\tgit tag -a -m \"Some tag\" my-tag main &&\ndiff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh\nindex 35d9a8c279..d9ae7c20ce 100755\n--- a/t/t5510-fetch.sh\n+++ b/t/t5510-fetch.sh\n@@ -945,7 +945,7 @@ test_expect_success 'fetching with auto-gc does not lock up' '\n \t)\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch aligned output' '\n+test_expect_success C_LOCALE_OUTPUT 'fetch aligned output' '\n \tgit clone . full-output &&\n \ttest_commit looooooooooooong-tag &&\n \t(\n@@ -960,7 +960,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch aligned outpu\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch compact output' '\n+test_expect_success C_LOCALE_OUTPUT 'fetch compact output' '\n \tgit clone . compact &&\n \ttest_commit extraaa &&\n \t(\ndiff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\nindex 0f3e0bf15c..2f4ce6b0fa 100755\n--- a/t/t5703-upload-pack-ref-in-want.sh\n+++ b/t/t5703-upload-pack-ref-in-want.sh\n@@ -386,7 +386,7 @@ test_expect_success 'server is initially behind - ref in want' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'server loses a ref - ref in want' '\n+test_expect_success 'server loses a ref - ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant true &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\ndiff --git a/t/t6302-for-each-ref-filter.sh b/t/t6302-for-each-ref-filter.sh\nindex e5833af528..5d682cb31f 100755\n--- a/t/t6302-for-each-ref-filter.sh\n+++ b/t/t6302-for-each-ref-filter.sh\n@@ -116,7 +116,7 @@ test_expect_success '%(color) must fail' '\n \ttest_must_fail git for-each-ref --format=\"%(color)%(refname)\"\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'left alignment is default' '\n+test_expect_success 'left alignment is default' '\n \tcat >expect <<-\\EOF &&\n \trefname is refs/heads/main    |refs/heads/main\n \trefname is refs/heads/side    |refs/heads/side\n@@ -134,7 +134,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'left alignment is default' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'middle alignment' '\n+test_expect_success 'middle alignment' '\n \tcat >expect <<-\\EOF &&\n \t|  refname is refs/heads/main  |refs/heads/main\n \t|  refname is refs/heads/side  |refs/heads/side\n@@ -152,7 +152,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'middle alignment' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'right alignment' '\n+test_expect_success 'right alignment' '\n \tcat >expect <<-\\EOF &&\n \t|    refname is refs/heads/main|refs/heads/main\n \t|    refname is refs/heads/side|refs/heads/side\n@@ -187,7 +187,7 @@ EOF\n test_align_permutations() {\n \twhile read -r option\n \tdo\n-\t\ttest_expect_success PREPARE_FOR_MAIN_BRANCH \"align:$option\" '\n+\t\ttest_expect_success \"align:$option\" '\n \t\t\tgit for-each-ref --format=\"|%(align:$option)refname is %(refname)%(end)|%(refname)\" >actual &&\n \t\t\ttest_cmp expect actual\n \t\t'\n@@ -216,7 +216,7 @@ EOF\n \n # Individual atoms inside %(align:...) and %(end) must not be quoted.\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'alignment with format quote' \"\n+test_expect_success 'alignment with format quote' \"\n \tcat >expect <<-\\EOF &&\n \t|'       '\\''main| A U Thor'\\''       '|\n \t|'       '\\''side| A U Thor'\\''       '|\n@@ -234,7 +234,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'alignment with format quote' \"\n \ttest_cmp expect actual\n \"\n \n-test_expect_success PREPARE_FOR_MAIN_BRANCH 'nested alignment with quote formatting' \"\n+test_expect_success 'nested alignment with quote formatting' \"\n \tcat >expect <<-\\EOF &&\n \t|'           main               '|\n \t|'           side               '|\n-- \ngitgitgadget\n"},{"id":"410304","messageId":"2315a253f6627ff0cb7d06e8198845c9ccdcfd86.1605743088.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 21/28] t7[0-4]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:39Z","receivedAt":"2020-11-18T23:45:30Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t7064, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in\nt7[0-4]*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t7[0-4]*.sh &&\n\t   git checkout HEAD -- t7064\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t7003-filter-branch.sh                |  42 ++++-----\n t/t7004-tag.sh                          |  10 +--\n t/t7030-verify-tag.sh                   |   4 +-\n t/t7060-wtstatus.sh                     |  28 +++---\n t/t7063-status-untracked-cache.sh       |  16 ++--\n t/t7102-reset.sh                        |   8 +-\n t/t7113-post-index-change-hook.sh       |   4 +-\n t/t7201-co.sh                           | 112 ++++++++++++------------\n t/t7400-submodule-basic.sh              |  22 ++---\n t/t7403-submodule-sync.sh               |  12 +--\n t/t7406-submodule-update.sh             |  40 ++++-----\n t/t7407-submodule-foreach.sh            |  26 +++---\n t/t7409-submodule-detached-work-tree.sh |  10 +--\n t/t7417-submodule-path-url.sh           |   4 +-\n 14 files changed, 169 insertions(+), 169 deletions(-)\n\ndiff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh\nindex db496fa039..1c55695034 100755\n--- a/t/t7003-filter-branch.sh\n+++ b/t/t7003-filter-branch.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='git filter-branch'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -16,7 +16,7 @@ test_expect_success 'setup' '\n \tmkdir dir &&\n \ttest_commit dir/D &&\n \ttest_commit E &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit C &&\n \tgit checkout branch &&\n \tgit merge C &&\n@@ -28,7 +28,7 @@ test_expect_success 'setup' '\n # * G\n # *   Merge commit 'C' into branch\n # |\\\n-# | * (master) C\n+# | * (main) C\n # * | E\n # * | dir/D\n # * | D\n@@ -165,15 +165,15 @@ test_expect_success 'subdirectory filter result looks okay' '\n '\n \n test_expect_success 'more setup' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tmkdir subdir &&\n \techo A > subdir/new &&\n \tgit add subdir/new &&\n \ttest_tick &&\n-\tgit commit -m \"subdir on master\" subdir/new &&\n+\tgit commit -m \"subdir on main\" subdir/new &&\n \tgit rm A.t &&\n \ttest_tick &&\n-\tgit commit -m \"again subdir on master\" &&\n+\tgit commit -m \"again subdir on main\" &&\n \tgit merge branch\n '\n \n@@ -202,7 +202,7 @@ test_expect_success 'author information is preserved' '\n \tgit branch preserved-author &&\n \t(sane_unset GIT_AUTHOR_NAME &&\n \t git filter-branch -f --msg-filter \"cat; \\\n-\t\t\ttest \\$GIT_COMMIT != $(git rev-parse master) || \\\n+\t\t\ttest \\$GIT_COMMIT != $(git rev-parse main) || \\\n \t\t\techo Hallo\" \\\n \t\tpreserved-author) &&\n \tgit rev-list --author=\"B V Uips\" preserved-author >actual &&\n@@ -221,7 +221,7 @@ test_expect_success \"remove a certain author's commits\" '\n \t\telse\\\n \t\t\tgit commit-tree \\\"\\$@\\\";\\\n \t\tfi\" removed-author &&\n-\tcnt1=$(git rev-list master | wc -l) &&\n+\tcnt1=$(git rev-list main | wc -l) &&\n \tcnt2=$(git rev-list removed-author | wc -l) &&\n \ttest $cnt1 -eq $(($cnt2 + 1)) &&\n \tgit rev-list --author=\"B V Uips\" removed-author >actual &&\n@@ -229,7 +229,7 @@ test_expect_success \"remove a certain author's commits\" '\n '\n \n test_expect_success 'barf on invalid name' '\n-\ttest_must_fail git filter-branch -f master xy-problem &&\n+\ttest_must_fail git filter-branch -f main xy-problem &&\n \ttest_must_fail git filter-branch -f HEAD^\n '\n \n@@ -239,8 +239,8 @@ test_expect_success '\"map\" works in commit filter' '\n \t\tmapped=\\$(map \\$parent) &&\n \t\tactual=\\$(echo \\\"\\$@\\\" | sed \\\"s/^.*-p //\\\") &&\n \t\ttest \\$mapped = \\$actual &&\n-\t\tgit commit-tree \\\"\\$@\\\";\" master~2..master &&\n-\tgit rev-parse --verify master\n+\t\tgit commit-tree \\\"\\$@\\\";\" main~2..main &&\n+\tgit rev-parse --verify main\n '\n \n test_expect_success 'Name needing quotes' '\n@@ -259,7 +259,7 @@ test_expect_success 'Name needing quotes' '\n \n test_expect_success 'Subdirectory filter with disappearing trees' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tmkdir foo &&\n \ttouch foo/bar &&\n@@ -278,7 +278,7 @@ test_expect_success 'Subdirectory filter with disappearing trees' '\n \tgit commit -m \"Re-adding foo\" &&\n \n \tgit filter-branch -f --subdirectory-filter foo &&\n-\tgit rev-list master >actual &&\n+\tgit rev-list main >actual &&\n \ttest_line_count = 3 actual\n '\n \n@@ -335,7 +335,7 @@ test_expect_success 'Tag name filtering allows slashes in tag names' '\n \ttest_cmp expect actual\n '\n test_expect_success 'setup --prune-empty comparisons' '\n-\tgit checkout --orphan master-no-a &&\n+\tgit checkout --orphan main-no-a &&\n \tgit rm -rf . &&\n \tunset test_tick &&\n \ttest_tick &&\n@@ -346,7 +346,7 @@ test_expect_success 'setup --prune-empty comparisons' '\n \tmkdir dir &&\n \ttest_commit dir/D dir/D.t dir/D dir/Dx &&\n \ttest_commit E E.t E Ex &&\n-\tgit checkout master-no-a &&\n+\tgit checkout main-no-a &&\n \ttest_commit C C.t C Cx &&\n \tgit checkout branch-no-a &&\n \tgit merge Cx -m \"Merge tag '\\''C'\\'' into branch\" &&\n@@ -400,7 +400,7 @@ test_expect_success '--prune-empty is able to prune entire branch' '\n '\n \n test_expect_success '--remap-to-ancestor with filename filters' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard A &&\n \ttest_commit add-foo foo 1 &&\n \tgit branch moved-foo &&\n@@ -410,15 +410,15 @@ test_expect_success '--remap-to-ancestor with filename filters' '\n \tgit branch moved-bar &&\n \ttest_commit change-foo foo 2 &&\n \tgit filter-branch -f --remap-to-ancestor \\\n-\t\tmoved-foo moved-bar A..master \\\n+\t\tmoved-foo moved-bar A..main \\\n \t\t-- -- foo &&\n \ttest $(git rev-parse moved-foo) = $(git rev-parse moved-bar) &&\n-\ttest $(git rev-parse moved-foo) = $(git rev-parse master^) &&\n+\ttest $(git rev-parse moved-foo) = $(git rev-parse main^) &&\n \ttest $orig_invariant = $(git rev-parse invariant)\n '\n \n test_expect_success 'automatic remapping to ancestor with filename filters' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit reset --hard A &&\n \ttest_commit add-foo2 foo 1 &&\n \tgit branch moved-foo2 &&\n@@ -428,10 +428,10 @@ test_expect_success 'automatic remapping to ancestor with filename filters' '\n \tgit branch moved-bar2 &&\n \ttest_commit change-foo2 foo 2 &&\n \tgit filter-branch -f \\\n-\t\tmoved-foo2 moved-bar2 A..master \\\n+\t\tmoved-foo2 moved-bar2 A..main \\\n \t\t-- -- foo &&\n \ttest $(git rev-parse moved-foo2) = $(git rev-parse moved-bar2) &&\n-\ttest $(git rev-parse moved-foo2) = $(git rev-parse master^) &&\n+\ttest $(git rev-parse moved-foo2) = $(git rev-parse main^) &&\n \ttest $orig_invariant = $(git rev-parse invariant2)\n '\n \ndiff --git a/t/t7004-tag.sh b/t/t7004-tag.sh\nindex 0e3086c4a6..943a7d5c1d 100755\n--- a/t/t7004-tag.sh\n+++ b/t/t7004-tag.sh\n@@ -7,7 +7,7 @@ test_description='git tag\n \n Tests for operations with tags.'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -1586,7 +1586,7 @@ test_expect_success 'checking that branch head with --no-contains lists all but\n \"\n \n test_expect_success 'merging original branch into this branch' '\n-\tgit merge --strategy=ours master &&\n+\tgit merge --strategy=ours main &&\n         git tag v4.0\n '\n \n@@ -1947,15 +1947,15 @@ test_expect_success ULIMIT_STACK_SIZE '--contains and --no-contains work in a de\n \ti=1 &&\n \twhile test $i -lt 8000\n \tdo\n-\t\techo \"commit refs/heads/master\n+\t\techo \"commit refs/heads/main\n committer A U Thor <author@example.com> $((1000000000 + $i * 100)) +0200\n data <<EOF\n commit #$i\n EOF\"\n-\t\ttest $i = 1 && echo \"from refs/heads/master^0\"\n+\t\ttest $i = 1 && echo \"from refs/heads/main^0\"\n \t\ti=$(($i + 1))\n \tdone | git fast-import &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag far-far-away HEAD^ &&\n \trun_with_limited_stack git tag --contains HEAD >actual &&\n \ttest_must_be_empty actual &&\ndiff --git a/t/t7030-verify-tag.sh b/t/t7030-verify-tag.sh\nindex bcb3c4f035..3cefde9602 100755\n--- a/t/t7030-verify-tag.sh\n+++ b/t/t7030-verify-tag.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='signed tag tests'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -20,7 +20,7 @@ test_expect_success GPG 'create signed tags' '\n \techo 3 >elif && git add elif &&\n \ttest_tick && git commit -m \"third on side\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick && git merge -S side &&\n \tgit tag -s -m merge merge &&\n \ndiff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh\nindex e65ca019eb..72fb418b89 100755\n--- a/t/t7060-wtstatus.sh\n+++ b/t/t7060-wtstatus.sh\n@@ -2,7 +2,7 @@\n \n test_description='basic work tree status reporting'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -54,7 +54,7 @@ EOF\n \t\tgit checkout -b side HEAD^ &&\n \t\tgit rm foo &&\n \t\tgit commit -m delete &&\n-\t\ttest_must_fail git merge master &&\n+\t\ttest_must_fail git merge main &&\n \t\ttest_must_fail git commit --dry-run >../actual &&\n \t\ttest_i18ncmp ../expect ../actual &&\n \t\tgit status >../actual &&\n@@ -127,18 +127,18 @@ test_expect_success 'git diff-index --cached -C shows 2 copies + 1 unmerged' '\n \n test_expect_success 'status when conflicts with add and rm advice (deleted by them)' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit init main.txt init &&\n \tgit checkout -b second_branch &&\n \tgit rm main.txt &&\n \tgit commit -m \"main.txt deleted on second_branch\" &&\n \ttest_commit second conflict.txt second &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit on_second main.txt on_second &&\n-\ttest_commit master conflict.txt master &&\n+\ttest_commit main conflict.txt main &&\n \ttest_must_fail git merge second_branch &&\n \tcat >expected <<\\EOF &&\n-On branch master\n+On branch main\n You have unmerged paths.\n   (fix conflicts and run \"git commit\")\n   (use \"git merge --abort\" to abort the merge)\n@@ -160,8 +160,8 @@ test_expect_success 'prepare for conflicts' '\n \tgit checkout -b conflict &&\n \ttest_commit one main.txt one &&\n \tgit branch conflict_second &&\n-\tgit mv main.txt sub_master.txt &&\n-\tgit commit -m \"main.txt renamed in sub_master.txt\" &&\n+\tgit mv main.txt sub_main.txt &&\n+\tgit commit -m \"main.txt renamed in sub_main.txt\" &&\n \tgit checkout conflict_second &&\n \tgit mv main.txt sub_second.txt &&\n \tgit commit -m \"main.txt renamed in sub_second.txt\"\n@@ -179,7 +179,7 @@ You have unmerged paths.\n Unmerged paths:\n   (use \"git add/rm <file>...\" as appropriate to mark resolution)\n \tboth deleted:    main.txt\n-\tadded by them:   sub_master.txt\n+\tadded by them:   sub_main.txt\n \tadded by us:     sub_second.txt\n \n no changes added to commit (use \"git add\" and/or \"git commit -a\")\n@@ -192,7 +192,7 @@ EOF\n test_expect_success 'status when conflicts with only rm advice (both deleted)' '\n \tgit reset --hard conflict_second &&\n \ttest_must_fail git merge conflict &&\n-\tgit add sub_master.txt &&\n+\tgit add sub_main.txt &&\n \tgit add sub_second.txt &&\n \tcat >expected <<\\EOF &&\n On branch conflict_second\n@@ -201,7 +201,7 @@ You have unmerged paths.\n   (use \"git merge --abort\" to abort the merge)\n \n Changes to be committed:\n-\tnew file:   sub_master.txt\n+\tnew file:   sub_main.txt\n \n Unmerged paths:\n   (use \"git rm <file>...\" to mark resolution)\n@@ -212,12 +212,12 @@ EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual &&\n \tgit reset --hard &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'status --branch with detached HEAD' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit status --branch --porcelain >actual &&\n \tcat >expected <<-EOF &&\n \t## HEAD (no branch)\n@@ -233,7 +233,7 @@ test_expect_success 'status --branch with detached HEAD' '\n ## Duplicate the above test and verify --porcelain=v1 arg parsing.\n test_expect_success 'status --porcelain=v1 --branch with detached HEAD' '\n \tgit reset --hard &&\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit status --branch --porcelain=v1 >actual &&\n \tcat >expected <<-EOF &&\n \t## HEAD (no branch)\ndiff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh\nindex ae60942347..f01bf27727 100755\n--- a/t/t7063-status-untracked-cache.sh\n+++ b/t/t7063-status-untracked-cache.sh\n@@ -2,7 +2,7 @@\n \n test_description='test untracked cache'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -478,7 +478,7 @@ EOF\n test_expect_success 'set up sparse checkout' '\n \techo \"done/[a-z]*\" >.git/info/sparse-checkout &&\n \ttest_config core.sparsecheckout true &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit update-index --force-untracked-cache &&\n \tgit status --porcelain >/dev/null && # prime the cache\n \ttest_path_is_missing done/.gitignore &&\n@@ -737,13 +737,13 @@ test_expect_success 'test ident field is working' '\n test_expect_success 'untracked cache survives a checkout' '\n \tgit commit --allow-empty -m empty &&\n \ttest-tool dump-untracked-cache >../before &&\n-\ttest_when_finished  \"git checkout master\" &&\n+\ttest_when_finished  \"git checkout main\" &&\n \tgit checkout -b other_branch &&\n \ttest-tool dump-untracked-cache >../after &&\n \ttest_cmp ../before ../after &&\n \ttest_commit test &&\n \ttest-tool dump-untracked-cache >../before &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest-tool dump-untracked-cache >../after &&\n \ttest_cmp ../before ../after\n '\n@@ -778,7 +778,7 @@ test_expect_success SYMLINKS '\"status\" after symlink replacement should be clean\n \tgit checkout HEAD~ &&\n \tstatus_is_clean &&\n \tstatus_is_clean &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tavoid_racy &&\n \tstatus_is_clean &&\n \tstatus_is_clean\n@@ -789,7 +789,7 @@ test_expect_success SYMLINKS '\"status\" after symlink replacement should be clean\n \tgit checkout HEAD~ &&\n \tstatus_is_clean &&\n \tstatus_is_clean &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tavoid_racy &&\n \tstatus_is_clean &&\n \tstatus_is_clean\n@@ -813,7 +813,7 @@ test_expect_success '\"status\" after file replacement should be clean with UC=tru\n \tgit checkout HEAD~ &&\n \tstatus_is_clean &&\n \tstatus_is_clean &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tavoid_racy &&\n \tstatus_is_clean &&\n \ttest-tool dump-untracked-cache >../actual &&\n@@ -831,7 +831,7 @@ test_expect_success '\"status\" after file replacement should be clean with UC=fal\n \tgit checkout HEAD~ &&\n \tstatus_is_clean &&\n \tstatus_is_clean &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tavoid_racy &&\n \tstatus_is_clean &&\n \tstatus_is_clean\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex 4af43d26f1..7d8fb188ee 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -7,7 +7,7 @@ test_description='git reset\n \n Documented tests for git reset'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -148,7 +148,7 @@ test_expect_success 'trying to do reset --soft with pending merge should fail' '\n \tprintf \"1st line 2nd file\\n2nd line 2nd file\\n3rd line\" >secondfile &&\n \tgit commit -a -m \"the change in branch2\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -D branch1 branch2 &&\n \tcheck_changes $head5\n '\n@@ -170,7 +170,7 @@ test_expect_success 'trying to do reset --soft with pending checkout merge shoul\n \tprintf \"1st line 2nd file\\n2nd line 2nd file\\n3rd line\" >secondfile &&\n \tgit commit -a -m \"the line in branch3\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -D branch3 branch4 &&\n \tcheck_changes $head5\n '\n@@ -383,7 +383,7 @@ test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge\n \tgit reset --hard ORIG_HEAD &&\n \tcheck_changes $head5 &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit branch -D branch1 branch2 &&\n \tcheck_changes $head5\n '\ndiff --git a/t/t7113-post-index-change-hook.sh b/t/t7113-post-index-change-hook.sh\nindex 8872c32f94..688fa995c9 100755\n--- a/t/t7113-post-index-change-hook.sh\n+++ b/t/t7113-post-index-change-hook.sh\n@@ -2,7 +2,7 @@\n \n test_description='post index change hook'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -88,7 +88,7 @@ test_expect_success 'test checkout and reset trigger the hook' '\n \tEOF\n \t: force index to be dirty &&\n \ttest-tool chmtime +60 dir1/file1.txt &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_path_is_file testsuccess && rm -f testsuccess &&\n \ttest_path_is_missing testfailure &&\n \ttest-tool chmtime +60 dir1/file1.txt &&\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 12567543c4..daf8678b8a 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -5,10 +5,10 @@\n \n test_description='git checkout tests.\n \n-Creates master, forks renamer and side branches from it.\n+Creates main, forks renamer and side branches from it.\n Test switching across them.\n \n-  ! [master] Initial A one, A two\n+  ! [main] Initial A one, A two\n    * [renamer] Renamer R one->uno, M two\n     ! [side] Side M one, D two, A three\n      ! [simple] Simple D one, M two\n@@ -16,11 +16,11 @@ Test switching across them.\n      + [simple] Simple D one, M two\n     +  [side] Side M one, D two, A three\n    *   [renamer] Renamer R one->uno, M two\n-  +*++ [master] Initial A one, A two\n+  +*++ [main] Initial A one, A two\n \n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -49,27 +49,27 @@ test_expect_success setup '\n \tfill a b c d e f >two &&\n \tgit commit -a -m \"Renamer R one->uno, M two\" &&\n \n-\tgit checkout -b side master &&\n+\tgit checkout -b side main &&\n \tfill 1 2 3 4 5 6 7 >one &&\n \tfill A B C D E >three &&\n \trm -f two &&\n \tgit update-index --add --remove one two three &&\n \tgit commit -m \"Side M one, D two, A three\" &&\n \n-\tgit checkout -b simple master &&\n+\tgit checkout -b simple main &&\n \trm -f one &&\n \tfill a c e >two &&\n \tgit commit -a -m \"Simple D one, M two\" &&\n \n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'checkout from non-existing branch' '\n-\tgit checkout -b delete-me master &&\n+\tgit checkout -b delete-me main &&\n \tgit update-ref -d --no-deref refs/heads/delete-me &&\n \ttest refs/heads/delete-me = \"$(git symbolic-ref HEAD)\" &&\n-\tgit checkout master &&\n-\ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n+\tgit checkout main &&\n+\ttest refs/heads/main = \"$(git symbolic-ref HEAD)\"\n '\n \n test_expect_success 'checkout with dirty tree without -m' '\n@@ -84,7 +84,7 @@ test_expect_success 'checkout with dirty tree without -m' '\n '\n \n test_expect_success 'checkout with unrelated dirty tree without -m' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tfill 0 1 2 3 4 5 6 7 8 >same &&\n \tcp same kept &&\n \tgit checkout side >messages &&\n@@ -94,7 +94,7 @@ test_expect_success 'checkout with unrelated dirty tree without -m' '\n '\n \n test_expect_success 'checkout -m with dirty tree' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit clean -f &&\n \n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n@@ -105,9 +105,9 @@ test_expect_success 'checkout -m with dirty tree' '\n \tprintf \"M\\t%s\\n\" one >expect.messages &&\n \ttest_cmp expect.messages messages &&\n \n-\tfill \"M\tone\" \"A\tthree\" \"D\ttwo\" >expect.master &&\n-\tgit diff --name-status master >current.master &&\n-\ttest_cmp expect.master current.master &&\n+\tfill \"M\tone\" \"A\tthree\" \"D\ttwo\" >expect.main &&\n+\tgit diff --name-status main >current.main &&\n+\ttest_cmp expect.main current.main &&\n \n \tfill \"M\tone\" >expect.side &&\n \tgit diff --name-status side >current.side &&\n@@ -118,7 +118,7 @@ test_expect_success 'checkout -m with dirty tree' '\n '\n \n test_expect_success 'checkout -m with dirty tree, renamed' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f main && git clean -f &&\n \n \tfill 1 2 3 4 5 7 8 >one &&\n \tif git checkout renamer\n@@ -138,7 +138,7 @@ test_expect_success 'checkout -m with dirty tree, renamed' '\n '\n \n test_expect_success 'checkout -m with merge conflict' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f main && git clean -f &&\n \n \tfill 1 T 3 4 5 6 S 8 >one &&\n \tif git checkout renamer\n@@ -151,7 +151,7 @@ test_expect_success 'checkout -m with merge conflict' '\n \n \tgit checkout -m renamer &&\n \n-\tgit diff master:one :3:uno |\n+\tgit diff main:one :3:uno |\n \tsed -e \"1,/^@@/d\" -e \"/^ /d\" -e \"s/^-/d/\" -e \"s/^+/a/\" >current &&\n \tfill d2 aT d7 aS >expect &&\n \ttest_cmp expect current &&\n@@ -160,7 +160,7 @@ test_expect_success 'checkout -m with merge conflict' '\n '\n \n test_expect_success 'format of merge conflict from checkout -m' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit clean -f &&\n \n \tfill b d >two &&\n@@ -184,7 +184,7 @@ test_expect_success 'format of merge conflict from checkout -m' '\n '\n \n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard &&\n \tgit clean -f &&\n \n@@ -196,7 +196,7 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n \ta\n \tc\n \te\n-\t||||||| master\n+\t||||||| main\n \ta\n \tb\n \tc\n@@ -211,7 +211,7 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n '\n \n test_expect_success 'switch to another branch while carrying a deletion' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit reset --hard &&\n \tgit clean -f &&\n \tgit rm two &&\n@@ -232,7 +232,7 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '\n \ttest_i18ngrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count = 1 messages &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tif git symbolic-ref HEAD >/dev/null 2>&1\n \tthen\n@@ -252,7 +252,7 @@ test_expect_success 'checkout to detach HEAD' '\n \tgrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count -gt 1 messages &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tif git symbolic-ref HEAD >/dev/null 2>&1\n \tthen\n@@ -264,11 +264,11 @@ test_expect_success 'checkout to detach HEAD' '\n '\n \n test_expect_success 'checkout to detach HEAD with branchname^' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit clean -f &&\n \tgit checkout renamer^ &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tif git symbolic-ref HEAD >/dev/null 2>&1\n \tthen\n@@ -280,11 +280,11 @@ test_expect_success 'checkout to detach HEAD with branchname^' '\n '\n \n test_expect_success 'checkout to detach HEAD with :/message' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit clean -f &&\n \tgit checkout \":/Initial\" &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tif git symbolic-ref HEAD >/dev/null 2>&1\n \tthen\n@@ -296,11 +296,11 @@ test_expect_success 'checkout to detach HEAD with :/message' '\n '\n \n test_expect_success 'checkout to detach HEAD with HEAD^0' '\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \tgit clean -f &&\n \tgit checkout HEAD^0 &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tif git symbolic-ref HEAD >/dev/null 2>&1\n \tthen\n@@ -313,13 +313,13 @@ test_expect_success 'checkout to detach HEAD with HEAD^0' '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n \tgit tag both side &&\n-\tgit branch both master &&\n+\tgit branch both main &&\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit checkout both &&\n \tH=$(git rev-parse --verify HEAD) &&\n-\tM=$(git show-ref -s --verify refs/heads/master) &&\n+\tM=$(git show-ref -s --verify refs/heads/main) &&\n \ttest \"z$H\" = \"z$M\" &&\n \tname=$(git symbolic-ref HEAD 2>/dev/null) &&\n \ttest \"z$name\" = zrefs/heads/both\n@@ -327,12 +327,12 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit tag frotz side &&\n-\tgit branch frotz master &&\n+\tgit branch frotz main &&\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tgit checkout tags/frotz &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -349,7 +349,7 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \n test_expect_success 'switch branches while in subdirectory' '\n \tgit reset --hard &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tmkdir subs &&\n \tgit -C subs checkout side &&\n@@ -365,7 +365,7 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \tgit add subs/bero &&\n \tgit commit -m \"add subs/bero\" &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tmkdir -p subs &&\n \tgit -C subs checkout side -- bero &&\n \ttest -f subs/bero\n@@ -373,7 +373,7 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \n test_expect_success 'checkout w/--track sets up tracking' '\n     git config branch.autosetupmerge false &&\n-    git checkout master &&\n+    git checkout main &&\n     git checkout --track -b track1 &&\n     test \"$(git config branch.track1.remote)\" &&\n     test \"$(git config branch.track1.merge)\"\n@@ -382,40 +382,40 @@ test_expect_success 'checkout w/--track sets up tracking' '\n test_expect_success 'checkout w/autosetupmerge=always sets up tracking' '\n     test_when_finished git config branch.autosetupmerge false &&\n     git config branch.autosetupmerge always &&\n-    git checkout master &&\n+    git checkout main &&\n     git checkout -b track2 &&\n     test \"$(git config branch.track2.remote)\" &&\n     test \"$(git config branch.track2.merge)\"\n '\n \n test_expect_success 'checkout w/--track from non-branch HEAD fails' '\n-    git checkout master^0 &&\n+    git checkout main^0 &&\n     test_must_fail git symbolic-ref HEAD &&\n     test_must_fail git checkout --track -b track &&\n     test_must_fail git rev-parse --verify track &&\n     test_must_fail git symbolic-ref HEAD &&\n-    test \"z$(git rev-parse master^0)\" = \"z$(git rev-parse HEAD)\"\n+    test \"z$(git rev-parse main^0)\" = \"z$(git rev-parse HEAD)\"\n '\n \n test_expect_success 'checkout w/--track from tag fails' '\n-    git checkout master^0 &&\n+    git checkout main^0 &&\n     test_must_fail git symbolic-ref HEAD &&\n     test_must_fail git checkout --track -b track frotz &&\n     test_must_fail git rev-parse --verify track &&\n     test_must_fail git symbolic-ref HEAD &&\n-    test \"z$(git rev-parse master^0)\" = \"z$(git rev-parse HEAD)\"\n+    test \"z$(git rev-parse main^0)\" = \"z$(git rev-parse HEAD)\"\n '\n \n test_expect_success 'detach a symbolic link HEAD' '\n-    git checkout master &&\n+    git checkout main &&\n     git config --bool core.prefersymlinkrefs yes &&\n     git checkout side &&\n-    git checkout master &&\n+    git checkout main &&\n     it=$(git symbolic-ref HEAD) &&\n-    test \"z$it\" = zrefs/heads/master &&\n-    here=$(git rev-parse --verify refs/heads/master) &&\n+    test \"z$it\" = zrefs/heads/main &&\n+    here=$(git rev-parse --verify refs/heads/main) &&\n     git checkout side^ &&\n-    test \"z$(git rev-parse --verify refs/heads/master)\" = \"z$here\"\n+    test \"z$(git rev-parse --verify refs/heads/main)\" = \"z$here\"\n '\n \n test_expect_success 'checkout with --track fakes a sensible -b <name>' '\n@@ -426,13 +426,13 @@ test_expect_success 'checkout with --track fakes a sensible -b <name>' '\n     test \"refs/heads/koala/bear\" = \"$(git symbolic-ref HEAD)\" &&\n     test \"$(git rev-parse HEAD)\" = \"$(git rev-parse renamer)\" &&\n \n-    git checkout master && git branch -D koala/bear &&\n+    git checkout main && git branch -D koala/bear &&\n \n     git checkout --track refs/remotes/origin/koala/bear &&\n     test \"refs/heads/koala/bear\" = \"$(git symbolic-ref HEAD)\" &&\n     test \"$(git rev-parse HEAD)\" = \"$(git rev-parse renamer)\" &&\n \n-    git checkout master && git branch -D koala/bear &&\n+    git checkout main && git branch -D koala/bear &&\n \n     git checkout --track remotes/origin/koala/bear &&\n     test \"refs/heads/koala/bear\" = \"$(git symbolic-ref HEAD)\" &&\n@@ -585,17 +585,17 @@ test_expect_success 'checkout --conflict=diff3' '\n '\n \n test_expect_success 'failing checkout -b should not break working tree' '\n-\tgit reset --hard master &&\n-\tgit symbolic-ref HEAD refs/heads/master &&\n+\tgit reset --hard main &&\n+\tgit symbolic-ref HEAD refs/heads/main &&\n \ttest_must_fail git checkout -b renamer side^ &&\n-\ttest $(git symbolic-ref HEAD) = refs/heads/master &&\n+\ttest $(git symbolic-ref HEAD) = refs/heads/main &&\n \tgit diff --exit-code &&\n \tgit diff --cached --exit-code\n '\n \n test_expect_success 'switch out of non-branch' '\n-\tgit reset --hard master &&\n-\tgit checkout master^0 &&\n+\tgit reset --hard main &&\n+\tgit checkout main^0 &&\n \techo modified >one &&\n \ttest_must_fail git checkout renamer 2>error.log &&\n \t! grep \"^Previous HEAD\" error.log\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex 8addc0c8c9..d44f696293 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -9,7 +9,7 @@ This test tries to verify basic sanity of the init, update and status\n subcommands of git submodule.\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -127,7 +127,7 @@ inspect() {\n }\n \n test_expect_success 'submodule add' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -226,7 +226,7 @@ test_expect_success 'submodule add --branch' '\n \techo \"refs/heads/initial\" >expect-head &&\n \tcat <<-\\EOF >expect-heads &&\n \trefs/heads/initial\n-\trefs/heads/master\n+\trefs/heads/main\n \tEOF\n \n \t(\n@@ -244,7 +244,7 @@ test_expect_success 'submodule add --branch' '\n '\n \n test_expect_success 'submodule add with ./ in path' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -260,7 +260,7 @@ test_expect_success 'submodule add with ./ in path' '\n '\n \n test_expect_success 'submodule add with /././ in path' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -276,7 +276,7 @@ test_expect_success 'submodule add with /././ in path' '\n '\n \n test_expect_success 'submodule add with // in path' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -292,7 +292,7 @@ test_expect_success 'submodule add with // in path' '\n '\n \n test_expect_success 'submodule add with /.. in path' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -308,7 +308,7 @@ test_expect_success 'submodule add with /.. in path' '\n '\n \n test_expect_success 'submodule add with ./, /.. and // in path' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \t(\n \t\tcd addtest &&\n@@ -338,7 +338,7 @@ test_expect_success !CYGWIN 'submodule add with \\\\ in path' '\n '\n \n test_expect_success 'submodule add in subdirectory' '\n-\techo \"refs/heads/master\" >expect &&\n+\techo \"refs/heads/main\" >expect &&\n \n \tmkdir addtest/sub &&\n \t(\n@@ -560,7 +560,7 @@ test_expect_success 'status should be \"up-to-date\" after update' '\n \n test_expect_success 'checkout superproject with subproject already present' '\n \tgit checkout initial &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'apply submodule diff' '\n@@ -577,7 +577,7 @@ test_expect_success 'apply submodule diff' '\n \tgit checkout second &&\n \tgit apply --index P.diff &&\n \n-\tgit diff --cached master >staged &&\n+\tgit diff --cached main >staged &&\n \ttest_must_be_empty staged\n '\n \ndiff --git a/t/t7403-submodule-sync.sh b/t/t7403-submodule-sync.sh\nindex c95559bed5..7d2ac3322b 100755\n--- a/t/t7403-submodule-sync.sh\n+++ b/t/t7403-submodule-sync.sh\n@@ -8,7 +8,7 @@ test_description='git submodule sync\n These tests exercise the \"git submodule sync\" subcommand.\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -81,7 +81,7 @@ test_expect_success 'change submodule url' '\n \t(\n \t\tcd super &&\n \t\tcd submodule &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit pull\n \t) &&\n \tmv submodule moved-submodule &&\n@@ -115,7 +115,7 @@ test_expect_success '\"git submodule sync\" should update submodule URLs' '\n \t)\" &&\n \t(\n \t\tcd super-clone/submodule &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit pull\n \t) &&\n \t(\n@@ -143,7 +143,7 @@ test_expect_success '\"git submodule sync --recursive\" should update all submodul\n \t)\" &&\n \t(\n \t\tcd super-clone/submodule/sub-submodule &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit pull\n \t)\n '\n@@ -171,7 +171,7 @@ test_expect_success '\"git submodule sync\" should update submodule URLs - subdire\n \t)\" &&\n \t(\n \t\tcd super-clone/submodule &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit pull\n \t) &&\n \t(\n@@ -202,7 +202,7 @@ test_expect_success '\"git submodule sync --recursive\" should update all submodul\n \t)\" &&\n \t(\n \t\tcd super-clone/submodule/sub-submodule &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit pull\n \t)\n '\ndiff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh\nindex 825b1a7e0c..b9c1624fba 100755\n--- a/t/t7406-submodule-update.sh\n+++ b/t/t7406-submodule-update.sh\n@@ -9,7 +9,7 @@ This test verifies that \"git submodule update\" detaches the HEAD of the\n submodule and \"git submodule update --rebase/--merge\" does not detach the HEAD.\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -17,10 +17,10 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n compare_head()\n {\n-    sha_master=$(git rev-list --max-count=1 master)\n+    sha_main=$(git rev-list --max-count=1 main)\n     sha_head=$(git rev-list --max-count=1 HEAD)\n \n-    test \"$sha_master\" = \"$sha_head\"\n+    test \"$sha_main\" = \"$sha_head\"\n }\n \n \n@@ -265,14 +265,14 @@ test_expect_success 'submodule update --remote should fetch upstream changes wit\n \t\tcd super &&\n \t\tgit submodule update --remote --force submodule &&\n \t\tgit -C submodule log -1 --oneline >actual &&\n-\t\tgit -C ../submodule log -1 --oneline master >expect &&\n+\t\tgit -C ../submodule log -1 --oneline main >expect &&\n \t\ttest_cmp expect actual &&\n \t\tgit checkout -b test-branch &&\n \t\tgit submodule update --remote --force submodule &&\n \t\tgit -C submodule log -1 --oneline >actual &&\n \t\tgit -C ../submodule log -1 --oneline test-branch >expect &&\n \t\ttest_cmp expect actual &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit branch -d test-branch &&\n \t\tgit reset --hard HEAD^\n \t)\n@@ -285,7 +285,7 @@ test_expect_success 'local config should override .gitmodules branch' '\n \t git add file &&\n \t test_tick &&\n \t git commit -m \"upstream line5\" &&\n-\t git checkout master\n+\t git checkout main\n \t) &&\n \t(cd super &&\n \t git config submodule.submodule.branch test-branch &&\n@@ -295,9 +295,9 @@ test_expect_success 'local config should override .gitmodules branch' '\n \t)\n '\n \n-test_expect_success 'submodule update --rebase staying on master' '\n+test_expect_success 'submodule update --rebase staying on main' '\n \t(cd super/submodule &&\n-\t  git checkout master\n+\t  git checkout main\n \t) &&\n \t(cd super &&\n \t (cd submodule &&\n@@ -309,7 +309,7 @@ test_expect_success 'submodule update --rebase staying on master' '\n \t)\n '\n \n-test_expect_success 'submodule update --merge staying on master' '\n+test_expect_success 'submodule update --merge staying on main' '\n \t(cd super/submodule &&\n \t  git reset --hard HEAD~1\n \t) &&\n@@ -612,7 +612,7 @@ test_expect_success 'submodule update - update=none in .git/config' '\n \t(cd super &&\n \t git config submodule.submodule.update none &&\n \t (cd submodule &&\n-\t  git checkout master &&\n+\t  git checkout main &&\n \t  compare_head\n \t ) &&\n \t git diff --name-only >out &&\n@@ -632,7 +632,7 @@ test_expect_success 'submodule update - update=none in .git/config but --checkou\n \t(cd super &&\n \t git config submodule.submodule.update none &&\n \t (cd submodule &&\n-\t  git checkout master &&\n+\t  git checkout main &&\n \t  compare_head\n \t ) &&\n \t git diff --name-only >out &&\n@@ -692,7 +692,7 @@ test_expect_success 'submodule update continues after checkout error' '\n test_expect_success 'submodule update continues after recursive checkout error' '\n \t(cd super &&\n \t git reset --hard HEAD &&\n-\t git checkout master &&\n+\t git checkout main &&\n \t git submodule update &&\n \t (cd submodule &&\n \t  git submodule add ../submodule subsubmodule &&\n@@ -736,7 +736,7 @@ test_expect_success 'submodule update continues after recursive checkout error'\n \n test_expect_success 'submodule update exit immediately in case of merge conflict' '\n \t(cd super &&\n-\t git checkout master &&\n+\t git checkout main &&\n \t git reset --hard HEAD &&\n \t (cd submodule &&\n \t  (cd subsubmodule &&\n@@ -754,7 +754,7 @@ test_expect_success 'submodule update exit immediately in case of merge conflict\n \t git add submodule2 &&\n \t git commit -m \"two_new_submodule_commits\" &&\n \t (cd submodule &&\n-\t  git checkout master &&\n+\t  git checkout main &&\n \t  test_commit \"conflict\" file &&\n \t  echo \"conflict\" > file\n \t ) &&\n@@ -773,7 +773,7 @@ test_expect_success 'submodule update exit immediately in case of merge conflict\n \n test_expect_success 'submodule update exit immediately after recursive rebase error' '\n \t(cd super &&\n-\t git checkout master &&\n+\t git checkout main &&\n \t git reset --hard HEAD &&\n \t (cd submodule &&\n \t  git reset --hard HEAD &&\n@@ -789,7 +789,7 @@ test_expect_success 'submodule update exit immediately after recursive rebase er\n \t git add submodule2 &&\n \t git commit -m \"two_new_submodule_commits\" &&\n \t (cd submodule &&\n-\t  git checkout master &&\n+\t  git checkout main &&\n \t  test_commit \"conflict2\" file &&\n \t  echo \"conflict\" > file\n \t ) &&\n@@ -881,21 +881,21 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir re\n \tgit clone subsubsuper_update_r subsubsuper_update_r2 &&\n \t(cd subsubsuper_update_r2 &&\n \t test_commit \"update_subsubsuper\" file &&\n-\t git push origin master\n+\t git push origin main\n \t) &&\n \tgit clone subsuper_update_r subsuper_update_r2 &&\n \t(cd subsuper_update_r2 &&\n \t test_commit \"update_subsuper\" file &&\n \t git submodule add ../subsubsuper_update_r subsubmodule &&\n \t git commit -am \"subsubmodule\" &&\n-\t git push origin master\n+\t git push origin main\n \t) &&\n \tgit clone super_update_r super_update_r2 &&\n \t(cd super_update_r2 &&\n \t test_commit \"update_super\" file &&\n \t git submodule add ../subsuper_update_r submodule &&\n \t git commit -am \"submodule\" &&\n-\t git push origin master\n+\t git push origin main\n \t) &&\n \trm -rf super_update_r2 &&\n \tgit clone super_update_r super_update_r2 &&\n@@ -914,7 +914,7 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir re\n \n test_expect_success 'submodule add properly re-creates deeper level submodules' '\n \t(cd super &&\n-\t git reset --hard master &&\n+\t git reset --hard main &&\n \t rm -rf deeper/ &&\n \t git submodule add --force ../submodule deeper/submodule\n \t)\ndiff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh\nindex 632defc53b..79981b51eb 100755\n--- a/t/t7407-submodule-foreach.sh\n+++ b/t/t7407-submodule-foreach.sh\n@@ -9,7 +9,7 @@ This test verifies that \"git submodule foreach\" correctly visits all submodules\n that are currently checked out.\n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -280,13 +280,13 @@ sub1sha1_short=$(cd clone3/sub1 && git rev-parse --short HEAD)\n sub2sha1_short=$(cd clone3/sub2 && git rev-parse --short HEAD)\n \n cat > expect <<EOF\n- $nested1sha1 nested1 (heads/master)\n- $nested2sha1 nested1/nested2 (heads/master)\n- $nested3sha1 nested1/nested2/nested3 (heads/master)\n- $submodulesha1 nested1/nested2/nested3/submodule (heads/master)\n+ $nested1sha1 nested1 (heads/main)\n+ $nested2sha1 nested1/nested2 (heads/main)\n+ $nested3sha1 nested1/nested2/nested3 (heads/main)\n+ $submodulesha1 nested1/nested2/nested3/submodule (heads/main)\n  $sub1sha1 sub1 ($sub1sha1_short)\n  $sub2sha1 sub2 ($sub2sha1_short)\n- $sub3sha1 sub3 (heads/master)\n+ $sub3sha1 sub3 (heads/main)\n EOF\n \n test_expect_success 'test \"status --recursive\"' '\n@@ -298,10 +298,10 @@ test_expect_success 'test \"status --recursive\"' '\n '\n \n cat > expect <<EOF\n- $nested1sha1 nested1 (heads/master)\n+ $nested1sha1 nested1 (heads/main)\n +$nested2sha1 nested1/nested2 (file2~1)\n- $nested3sha1 nested1/nested2/nested3 (heads/master)\n- $submodulesha1 nested1/nested2/nested3/submodule (heads/master)\n+ $nested3sha1 nested1/nested2/nested3 (heads/main)\n+ $submodulesha1 nested1/nested2/nested3/submodule (heads/main)\n EOF\n \n test_expect_success 'ensure \"status --cached --recursive\" preserves the --cached flag' '\n@@ -319,13 +319,13 @@ test_expect_success 'ensure \"status --cached --recursive\" preserves the --cached\n nested2sha1=$(git -C clone3/nested1/nested2 rev-parse HEAD)\n \n cat > expect <<EOF\n- $nested1sha1 ../nested1 (heads/master)\n+ $nested1sha1 ../nested1 (heads/main)\n +$nested2sha1 ../nested1/nested2 (file2)\n- $nested3sha1 ../nested1/nested2/nested3 (heads/master)\n- $submodulesha1 ../nested1/nested2/nested3/submodule (heads/master)\n+ $nested3sha1 ../nested1/nested2/nested3 (heads/main)\n+ $submodulesha1 ../nested1/nested2/nested3/submodule (heads/main)\n  $sub1sha1 ../sub1 ($sub1sha1_short)\n  $sub2sha1 ../sub2 ($sub2sha1_short)\n- $sub3sha1 ../sub3 (heads/master)\n+ $sub3sha1 ../sub3 (heads/main)\n EOF\n \n test_expect_success 'test \"status --recursive\" from sub directory' '\ndiff --git a/t/t7409-submodule-detached-work-tree.sh b/t/t7409-submodule-detached-work-tree.sh\nindex e9428e2b59..e17ac81a89 100755\n--- a/t/t7409-submodule-detached-work-tree.sh\n+++ b/t/t7409-submodule-detached-work-tree.sh\n@@ -10,7 +10,7 @@ on detached working trees\n '\n \n TEST_NO_CREATE_REPO=1\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -38,7 +38,7 @@ test_expect_success 'submodule on detached working tree' '\n \t\t\tgit rev-parse --verify HEAD >actual &&\n \t\t\ttest_cmp ../../../../expect actual\n \t\t) &&\n-\t\tgit push origin master\n+\t\tgit push origin main\n \t) &&\n \tmkdir home2 &&\n \t(\n@@ -47,7 +47,7 @@ test_expect_success 'submodule on detached working tree' '\n \t\tGIT_WORK_TREE=\"$(pwd)\" &&\n \t\tGIT_DIR=\"$(pwd)/.dotfiles\" &&\n \t\texport GIT_WORK_TREE GIT_DIR &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit submodule update --init &&\n \t\t(\n \t\t\tunset GIT_WORK_TREE GIT_DIR &&\n@@ -67,10 +67,10 @@ test_expect_success 'submodule on detached working pointed by core.worktree' '\n \t\tgit clone --bare ../remote \"$GIT_DIR\" &&\n \t\tgit config core.bare false &&\n \t\tgit config core.worktree .. &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit submodule add ../bundle1 .vim/bundle/dupe &&\n \t\ttest_commit \"dupe\" &&\n-\t\tgit push origin master\n+\t\tgit push origin main\n \t) &&\n \t(\n \t\tcd home &&\ndiff --git a/t/t7417-submodule-path-url.sh b/t/t7417-submodule-path-url.sh\nindex 0a514e951c..f0f6b9fa9e 100755\n--- a/t/t7417-submodule-path-url.sh\n+++ b/t/t7417-submodule-path-url.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='check handling of .gitmodule path with dash'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -39,7 +39,7 @@ test_expect_success MINGW 'submodule paths disallows trailing spaces' '\n \tsed \"s/sub/sub /\" <tree >tree.new &&\n \ttree=$(git -C super mktree <tree.new) &&\n \tcommit=$(echo with space | git -C super commit-tree $tree) &&\n-\tgit -C super update-ref refs/heads/master $commit &&\n+\tgit -C super update-ref refs/heads/main $commit &&\n \n \ttest_must_fail git clone --recurse-submodules super dst 2>err &&\n \ttest_i18ngrep \"sub \" err\n-- \ngitgitgadget\n\n"},{"id":"410302","messageId":"0a4bc77dac2422511c1fb35d988116d4c8ad1ae6.1605743088.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 19/28] t64*: preemptively adjust alignment to prepare for `master` -> `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:37Z","receivedAt":"2020-11-18T23:45:32Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe are in the process of renaming the default branch name to `main`,\nwhich is two characters shorter than `master`. Therefore, some lines\nneed to be adjusted in t6416, t6422 and t6427 that want to align text\ninvolving the default branch name.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t6416-recursive-corner-cases.sh    | 8 ++++----\n t/t6422-merge-rename-corner-cases.sh | 4 ++--\n t/t6427-diff3-conflict-markers.sh    | 4 ++--\n 3 files changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t6416-recursive-corner-cases.sh b/t/t6416-recursive-corner-cases.sh\nindex 6a740771ed..3d515a8e31 100755\n--- a/t/t6416-recursive-corner-cases.sh\n+++ b/t/t6416-recursive-corner-cases.sh\n@@ -388,7 +388,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete' '\n \t\ttest_line_count = 2 out &&\n \n \t\tgit rev-parse >expect       \\\n-\t\t\tmaster:file  B:file &&\n+\t\t\tmaster:file    B:file &&\n \t\tgit rev-parse   >actual      \\\n \t\t\t:1:file      :2:file &&\n \t\ttest_cmp expect actual\n@@ -410,7 +410,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete, rev\n \t\ttest_line_count = 2 out &&\n \n \t\tgit rev-parse >expect       \\\n-\t\t\tmaster:file  B:file &&\n+\t\t\tmaster:file    B:file &&\n \t\tgit rev-parse   >actual      \\\n \t\t\t:1:file      :3:file &&\n \t\ttest_cmp expect actual\n@@ -1556,7 +1556,7 @@ test_expect_failure 'check conflicting modes for regular file' '\n # Setup:\n #          L1---L2\n #         /  \\ /  \\\n-#   master    X    ?\n+#     master    X    ?\n #         \\  / \\  /\n #          R1---R2\n #\n@@ -1751,7 +1751,7 @@ test_expect_success 'check nested conflicts' '\n # Setup:\n #          L1---L2---L3\n #         /  \\ /  \\ /  \\\n-#   master    X1   X2   ?\n+#     master    X1   X2   ?\n #         \\  / \\  / \\  /\n #          R1---R2---R3\n #\ndiff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh\nindex 70c8af7f51..9fb4e72ca3 100755\n--- a/t/t6422-merge-rename-corner-cases.sh\n+++ b/t/t6422-merge-rename-corner-cases.sh\n@@ -1133,7 +1133,7 @@ test_conflicts_with_adds_and_renames() {\n \t# Setup:\n \t#          L\n \t#         / \\\n-\t#   master   ?\n+\t#     master   ?\n \t#         \\ /\n \t#          R\n \t#\n@@ -1293,7 +1293,7 @@ test_conflicts_with_adds_and_renames add    add\n # Setup:\n #          L\n #         / \\\n-#   master   ?\n+#     master   ?\n #         \\ /\n #          R\n #\ndiff --git a/t/t6427-diff3-conflict-markers.sh b/t/t6427-diff3-conflict-markers.sh\nindex c192ee4e42..3ae2d07ae1 100755\n--- a/t/t6427-diff3-conflict-markers.sh\n+++ b/t/t6427-diff3-conflict-markers.sh\n@@ -46,7 +46,7 @@ test_expect_success 'check no merge base' '\n # Setup:\n #          L1\n #         /  \\\n-#   master    ?\n+#     master    ?\n #         \\  /\n #          R1\n #\n@@ -104,7 +104,7 @@ test_expect_success 'check unique merge base' '\n # Setup:\n #          L1---L2--L3\n #         /  \\ /      \\\n-#   master    X1       ?\n+#     master    X1       ?\n #         \\  / \\      /\n #          R1---R2--R3\n #\n-- \ngitgitgadget\n\n"},{"id":"410307","messageId":"b2fda752613499a3a61955333cfa2e7f254fd908.1605743087.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 17/28] t5[6-9]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:35Z","receivedAt":"2020-11-18T23:45:32Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t5[6-9]*.sh)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5601-clone.sh                    |  6 +--\n t/t5604-clone-reference.sh          | 14 +++----\n t/t5605-clone-local.sh              | 12 +++---\n t/t5606-clone-options.sh            | 10 ++---\n t/t5607-clone-bundle.sh             | 16 ++++----\n t/t5608-clone-2gb.sh                |  2 +-\n t/t5609-clone-branch.sh             |  8 ++--\n t/t5610-clone-detached.sh           |  6 +--\n t/t5611-clone-config.sh             | 18 ++++-----\n t/t5612-clone-refspec.sh            | 44 ++++++++++-----------\n t/t5614-clone-submodules-shallow.sh |  2 +-\n t/t5616-partial-clone.sh            | 52 ++++++++++++-------------\n t/t5617-clone-submodules-remote.sh  |  8 ++--\n t/t5700-protocol-v1.sh              | 18 ++++-----\n t/t5701-git-serve.sh                | 18 ++++-----\n t/t5702-protocol-v2.sh              | 52 ++++++++++++-------------\n t/t5703-upload-pack-ref-in-want.sh  | 60 ++++++++++++++---------------\n t/t5801-remote-helpers.sh           | 26 ++++++-------\n 18 files changed, 186 insertions(+), 186 deletions(-)\n\ndiff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\nindex e01c5fe02d..664c913866 100755\n--- a/t/t5601-clone.sh\n+++ b/t/t5601-clone.sh\n@@ -2,7 +2,7 @@\n \n test_description=clone\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -220,7 +220,7 @@ test_expect_success 'clone respects global branch.autosetuprebase' '\n \t\trm -fr dst &&\n \t\tgit clone src dst &&\n \t\tcd dst &&\n-\t\tactual=\"z$(git config branch.master.rebase)\" &&\n+\t\tactual=\"z$(git config branch.main.rebase)\" &&\n \t\ttest ztrue = $actual\n \t)\n '\n@@ -594,7 +594,7 @@ test_expect_success 'clone from a repository with two identical branches' '\n \n \t(\n \t\tcd src &&\n-\t\tgit checkout -b another master\n+\t\tgit checkout -b another main\n \t) &&\n \tgit clone src target-11 &&\n \ttest \"z$( cd target-11 && git symbolic-ref HEAD )\" = zrefs/heads/another\ndiff --git a/t/t5604-clone-reference.sh b/t/t5604-clone-reference.sh\nindex 20fbb1e9a3..5d682706ae 100755\n--- a/t/t5604-clone-reference.sh\n+++ b/t/t5604-clone-reference.sh\n@@ -4,7 +4,7 @@\n #\n \n test_description='test clone --reference'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -52,7 +52,7 @@ test_expect_success 'existence of info/alternates' '\n '\n \n test_expect_success 'pulling from reference' '\n-\tgit -C C pull ../B master\n+\tgit -C C pull ../B main\n '\n \n test_expect_success 'that reference gets used' '\n@@ -73,7 +73,7 @@ test_expect_success 'existence of info/alternates' '\n '\n \n test_expect_success 'pulling from reference' '\n-\tgit -C D pull ../B master\n+\tgit -C D pull ../B main\n '\n \n test_expect_success 'that reference gets used' '\n@@ -139,11 +139,11 @@ test_expect_success 'prepare branched repository' '\n \tgit clone A J &&\n \t(\n \t\tcd J &&\n-\t\tgit checkout -b other master^ &&\n+\t\tgit checkout -b other main^ &&\n \t\techo other >otherfile &&\n \t\tgit add otherfile &&\n \t\tgit commit -m other &&\n-\t\tgit checkout master\n+\t\tgit checkout main\n \t)\n '\n \n@@ -155,9 +155,9 @@ test_expect_success 'fetch with incomplete alternates' '\n \t\tgit remote add J \"file://$base_dir/J\" &&\n \t\tGIT_TRACE_PACKET=$U.K git fetch J\n \t) &&\n-\tmaster_object=$(cd A && git for-each-ref --format=\"%(objectname)\" refs/heads/master) &&\n+\tmain_object=$(cd A && git for-each-ref --format=\"%(objectname)\" refs/heads/main) &&\n \ttest -s \"$U.K\" &&\n-\t! grep \" want $master_object\" \"$U.K\" &&\n+\t! grep \" want $main_object\" \"$U.K\" &&\n \ttag_object=$(cd A && git for-each-ref --format=\"%(objectname)\" refs/tags/HEAD) &&\n \t! grep \" want $tag_object\" \"$U.K\"\n '\ndiff --git a/t/t5605-clone-local.sh b/t/t5605-clone-local.sh\nindex 94028044b0..7d63365f93 100755\n--- a/t/t5605-clone-local.sh\n+++ b/t/t5605-clone-local.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='test local clone'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -18,7 +18,7 @@ test_expect_success 'preparing origin repository' '\n \ttest \"$(cd a.git && git config --bool core.bare)\" = true &&\n \ttest \"$(cd x && git config --bool core.bare)\" = true &&\n \tgit bundle create b1.bundle --all &&\n-\tgit bundle create b2.bundle master &&\n+\tgit bundle create b2.bundle main &&\n \tmkdir dir &&\n \tcp b1.bundle dir/b3 &&\n \tcp b1.bundle b4\n@@ -87,7 +87,7 @@ test_expect_success 'bundle clone with nonexistent HEAD' '\n \tgit clone b2.bundle b2 &&\n \t(cd b2 &&\n \tgit fetch &&\n-\ttest_must_fail git rev-parse --verify refs/heads/master)\n+\ttest_must_fail git rev-parse --verify refs/heads/main)\n '\n \n test_expect_success 'clone empty repository' '\n@@ -101,9 +101,9 @@ test_expect_success 'clone empty repository' '\n \t echo \"content\" >> foo &&\n \t git add foo &&\n \t git commit -m \"Initial commit\" &&\n-\t git push origin master &&\n-\t expected=$(git rev-parse master) &&\n-\t actual=$(git --git-dir=../empty/.git rev-parse master) &&\n+\t git push origin main &&\n+\t expected=$(git rev-parse main) &&\n+\t actual=$(git --git-dir=../empty/.git rev-parse main) &&\n \t test $actual = $expected)\n '\n \ndiff --git a/t/t5606-clone-options.sh b/t/t5606-clone-options.sh\nindex 3893a49e6d..5d6e63a841 100755\n--- a/t/t5606-clone-options.sh\n+++ b/t/t5606-clone-options.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='basic clone options'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -18,7 +18,7 @@ test_expect_success 'setup' '\n test_expect_success 'clone -o' '\n \n \tgit clone -o foo parent clone-o &&\n-\tgit -C clone-o rev-parse --verify refs/remotes/foo/master\n+\tgit -C clone-o rev-parse --verify refs/remotes/foo/main\n \n '\n \n@@ -48,7 +48,7 @@ test_expect_success 'disallows --bare with --separate-git-dir' '\n test_expect_success 'uses \"origin\" for default remote name' '\n \n \tgit clone parent clone-default-origin &&\n-\tgit -C clone-default-origin rev-parse --verify refs/remotes/origin/master\n+\tgit -C clone-default-origin rev-parse --verify refs/remotes/origin/main\n \n '\n \n@@ -77,14 +77,14 @@ test_expect_success 'prefers config \"clone.defaultRemoteName\" over default' '\n \n \ttest_config_global clone.defaultRemoteName from_config &&\n \tgit clone parent clone-config-origin &&\n-\tgit -C clone-config-origin rev-parse --verify refs/remotes/from_config/master\n+\tgit -C clone-config-origin rev-parse --verify refs/remotes/from_config/main\n \n '\n \n test_expect_success 'prefers --origin over -c config' '\n \n \tgit clone -c clone.defaultRemoteName=inline --origin from_option parent clone-o-and-inline-config &&\n-\tgit -C clone-o-and-inline-config rev-parse --verify refs/remotes/from_option/master\n+\tgit -C clone-o-and-inline-config rev-parse --verify refs/remotes/from_option/main\n \n '\n \ndiff --git a/t/t5607-clone-bundle.sh b/t/t5607-clone-bundle.sh\nindex 6e2e4adbb4..5b39f4a288 100755\n--- a/t/t5607-clone-bundle.sh\n+++ b/t/t5607-clone-bundle.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='some bundle related tests'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -22,7 +22,7 @@ test_expect_success 'setup' '\n '\n \n test_expect_success '\"verify\" needs a worktree' '\n-\tgit bundle create tip.bundle -1 master &&\n+\tgit bundle create tip.bundle -1 main &&\n \tnongit test_must_fail git bundle verify ../tip.bundle 2>err &&\n \ttest_i18ngrep \"need a repository\" err\n '\n@@ -42,15 +42,15 @@ test_expect_success 'die if bundle file cannot be created' '\n '\n \n test_expect_failure 'bundle --stdin' '\n-\techo master | git bundle create stdin-bundle.bdl --stdin &&\n+\techo main | git bundle create stdin-bundle.bdl --stdin &&\n \tgit ls-remote stdin-bundle.bdl >output &&\n-\tgrep master output\n+\tgrep main output\n '\n \n test_expect_failure 'bundle --stdin <rev-list options>' '\n-\techo master | git bundle create hybrid-bundle.bdl --stdin tag &&\n+\techo main | git bundle create hybrid-bundle.bdl --stdin tag &&\n \tgit ls-remote hybrid-bundle.bdl >output &&\n-\tgrep master output\n+\tgrep main output\n '\n \n test_expect_success 'empty bundle file is rejected' '\n@@ -86,14 +86,14 @@ test_expect_success 'prerequisites with an empty commit message' '\n \n test_expect_success 'failed bundle creation does not leave cruft' '\n \t# This fails because the bundle would be empty.\n-\ttest_must_fail git bundle create fail.bundle master..master &&\n+\ttest_must_fail git bundle create fail.bundle main..main &&\n \ttest_path_is_missing fail.bundle.lock\n '\n \n test_expect_success 'fetch SHA-1 from bundle' '\n \ttest_create_repo foo &&\n \ttest_commit -C foo x &&\n-\tgit -C foo bundle create tip.bundle -1 master &&\n+\tgit -C foo bundle create tip.bundle -1 main &&\n \tgit -C foo rev-parse HEAD >hash &&\n \n \t# Exercise to ensure that fetching a SHA-1 from a bundle works with no\ndiff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\nindex 4c476d2fa1..87a8cd9f98 100755\n--- a/t/t5608-clone-2gb.sh\n+++ b/t/t5608-clone-2gb.sh\n@@ -26,7 +26,7 @@ test_expect_success 'setup' '\n \t\ti=$(($i+1)) ||\n \t\techo $? > exit-status\n \t done &&\n-\t echo \"commit refs/heads/master\" &&\n+\t echo \"commit refs/heads/main\" &&\n \t echo \"author A U Thor <author@email.com> 123456789 +0000\" &&\n \t echo \"committer C O Mitter <committer@email.com> 123456789 +0000\" &&\n \t echo \"data 5\" &&\ndiff --git a/t/t5609-clone-branch.sh b/t/t5609-clone-branch.sh\nindex e4d5124f89..f86a674a03 100755\n--- a/t/t5609-clone-branch.sh\n+++ b/t/t5609-clone-branch.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='clone --branch option'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -23,7 +23,7 @@ test_expect_success 'setup' '\n \t echo one >file && git add file && git commit -m one &&\n \t git checkout -b two &&\n \t echo two >file && git add file && git commit -m two &&\n-\t git checkout master) &&\n+\t git checkout main) &&\n \tmkdir empty &&\n \t(cd empty && git init)\n '\n@@ -31,7 +31,7 @@ test_expect_success 'setup' '\n test_expect_success 'vanilla clone chooses HEAD' '\n \tgit clone parent clone &&\n \t(cd clone &&\n-\t check_HEAD master &&\n+\t check_HEAD main &&\n \t check_file one\n \t)\n '\n@@ -56,7 +56,7 @@ test_expect_success 'clone -b sets up tracking' '\n \n test_expect_success 'clone -b does not munge remotes/origin/HEAD' '\n \t(cd clone-two &&\n-\t echo refs/remotes/origin/master >expect &&\n+\t echo refs/remotes/origin/main >expect &&\n \t git symbolic-ref refs/remotes/origin/HEAD >actual &&\n \t test_cmp expect actual\n \t)\ndiff --git a/t/t5610-clone-detached.sh b/t/t5610-clone-detached.sh\nindex ba63ba8f42..a7ec21eda5 100755\n--- a/t/t5610-clone-detached.sh\n+++ b/t/t5610-clone-detached.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='test cloning a repository with detached HEAD'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -23,7 +23,7 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'clone repo (detached HEAD points to branch)' '\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit clone \"file://$PWD\" detached-branch\n '\n test_expect_success 'cloned HEAD matches' '\n@@ -62,7 +62,7 @@ test_expect_success 'cloned HEAD is detached' '\n '\n \n test_expect_success 'clone repo (orphan detached HEAD)' '\n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \techo four >file &&\n \tgit commit -a -m four &&\n \tgit clone \"file://$PWD\" detached-orphan\ndiff --git a/t/t5611-clone-config.sh b/t/t5611-clone-config.sh\nindex be4ae10c82..9f555b87ec 100755\n--- a/t/t5611-clone-config.sh\n+++ b/t/t5611-clone-config.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='tests for git clone -c key=value'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -50,16 +50,16 @@ test_expect_success 'clone -c config is available during clone' '\n \n test_expect_success 'clone -c remote.origin.fetch=<refspec> works' '\n \trm -rf child &&\n-\tgit update-ref refs/grab/it refs/heads/master &&\n-\tgit update-ref refs/leave/out refs/heads/master &&\n+\tgit update-ref refs/grab/it refs/heads/main &&\n+\tgit update-ref refs/leave/out refs/heads/main &&\n \tgit clone -c \"remote.origin.fetch=+refs/grab/*:refs/grab/*\" . child &&\n \tgit -C child for-each-ref --format=\"%(refname)\" >actual &&\n \n \tcat >expect <<-\\EOF &&\n \trefs/grab/it\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/remotes/origin/HEAD\n-\trefs/remotes/origin/master\n+\trefs/remotes/origin/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -71,9 +71,9 @@ test_expect_success 'git -c remote.origin.fetch=<refspec> clone works' '\n \n \tcat >expect <<-\\EOF &&\n \trefs/grab/it\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/remotes/origin/HEAD\n-\trefs/remotes/origin/master\n+\trefs/remotes/origin/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -88,9 +88,9 @@ test_expect_success 'clone -c remote.<remote>.fetch=<refspec> --origin=<name>' '\n \n \tcat >expect <<-\\EOF &&\n \trefs/grab/it\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/remotes/upstream/HEAD\n-\trefs/remotes/upstream/master\n+\trefs/remotes/upstream/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5612-clone-refspec.sh b/t/t5612-clone-refspec.sh\nindex 9e37f7fef7..6a6af7449c 100755\n--- a/t/t5612-clone-refspec.sh\n+++ b/t/t5612-clone-refspec.sh\n@@ -1,13 +1,13 @@\n #!/bin/sh\n \n test_description='test refspec written by clone-command'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n \n test_expect_success 'setup' '\n-\t# Make two branches, \"master\" and \"side\"\n+\t# Make two branches, \"main\" and \"side\"\n \techo one >file &&\n \tgit add file &&\n \tgit commit -m one &&\n@@ -19,7 +19,7 @@ test_expect_success 'setup' '\n \tgit checkout -b side &&\n \techo four >file &&\n \tgit commit -a -m four &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag five &&\n \n \t# default clone\n@@ -28,18 +28,18 @@ test_expect_success 'setup' '\n \t# default clone --no-tags\n \tgit clone --no-tags . dir_all_no_tags &&\n \n-\t# default --single that follows HEAD=master\n-\tgit clone --single-branch . dir_master &&\n+\t# default --single that follows HEAD=main\n+\tgit clone --single-branch . dir_main &&\n \n-\t# default --single that follows HEAD=master with no tags\n-\tgit clone --single-branch --no-tags . dir_master_no_tags &&\n+\t# default --single that follows HEAD=main with no tags\n+\tgit clone --single-branch --no-tags . dir_main_no_tags &&\n \n \t# default --single that follows HEAD=side\n \tgit checkout side &&\n \tgit clone --single-branch . dir_side &&\n \n \t# explicit --single that follows side\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit clone --single-branch --branch side . dir_side2 &&\n \n \t# default --single with --mirror\n@@ -58,11 +58,11 @@ test_expect_success 'setup' '\n \t# explicit --single with tag and --no-tags\n \tgit clone --single-branch --no-tags --branch two . dir_tag_no_tags &&\n \n-\t# advance both \"master\" and \"side\" branches\n+\t# advance both \"main\" and \"side\" branches\n \tgit checkout side &&\n \techo five >file &&\n \tgit commit -a -m five &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo six >file &&\n \tgit commit -a -m six &&\n \n@@ -78,7 +78,7 @@ test_expect_success 'by default all branches will be kept updated' '\n \t\tsed -e \"/HEAD$/d\" \\\n \t\t    -e \"s|/remotes/origin/|/heads/|\" refs >../actual\n \t) &&\n-\t# follow both master and side\n+\t# follow both main and side\n \tgit for-each-ref refs/heads >expect &&\n \ttest_cmp expect actual\n '\n@@ -103,20 +103,20 @@ test_expect_success 'clone with --no-tags' '\n \ttest_must_be_empty actual\n '\n \n-test_expect_success '--single-branch while HEAD pointing at master' '\n+test_expect_success '--single-branch while HEAD pointing at main' '\n \t(\n-\t\tcd dir_master &&\n+\t\tcd dir_main &&\n \t\tgit fetch --force &&\n \t\tgit for-each-ref refs/remotes/origin >refs &&\n \t\tsed -e \"/HEAD$/d\" \\\n \t\t    -e \"s|/remotes/origin/|/heads/|\" refs >../actual\n \t) &&\n-\t# only follow master\n-\tgit for-each-ref refs/heads/master >expect &&\n+\t# only follow main\n+\tgit for-each-ref refs/heads/main >expect &&\n \t# get & check latest tags\n \ttest_cmp expect actual &&\n \t(\n-\t\tcd dir_master &&\n+\t\tcd dir_main &&\n \t\tgit fetch --tags --force &&\n \t\tgit for-each-ref refs/tags >../actual\n \t) &&\n@@ -125,20 +125,20 @@ test_expect_success '--single-branch while HEAD pointing at master' '\n \ttest_line_count = 2 actual\n '\n \n-test_expect_success '--single-branch while HEAD pointing at master and --no-tags' '\n+test_expect_success '--single-branch while HEAD pointing at main and --no-tags' '\n \t(\n-\t\tcd dir_master_no_tags &&\n+\t\tcd dir_main_no_tags &&\n \t\tgit fetch &&\n \t\tgit for-each-ref refs/remotes/origin >refs &&\n \t\tsed -e \"/HEAD$/d\" \\\n \t\t    -e \"s|/remotes/origin/|/heads/|\" refs >../actual\n \t) &&\n-\t# only follow master\n-\tgit for-each-ref refs/heads/master >expect &&\n+\t# only follow main\n+\tgit for-each-ref refs/heads/main >expect &&\n \ttest_cmp expect actual &&\n \t# get tags (noop)\n \t(\n-\t\tcd dir_master_no_tags &&\n+\t\tcd dir_main_no_tags &&\n \t\tgit fetch &&\n \t\tgit for-each-ref refs/tags >../actual\n \t) &&\n@@ -146,7 +146,7 @@ test_expect_success '--single-branch while HEAD pointing at master and --no-tags\n \ttest_line_count = 0 actual &&\n \t# get tags with --tags overrides tagOpt\n \t(\n-\t\tcd dir_master_no_tags &&\n+\t\tcd dir_main_no_tags &&\n \t\tgit fetch --tags &&\n \t\tgit for-each-ref refs/tags >../actual\n \t) &&\ndiff --git a/t/t5614-clone-submodules-shallow.sh b/t/t5614-clone-submodules-shallow.sh\nindex e4e6ea4d52..5504b519c7 100755\n--- a/t/t5614-clone-submodules-shallow.sh\n+++ b/t/t5614-clone-submodules-shallow.sh\n@@ -7,7 +7,7 @@ test_description='Test shallow cloning of repos with submodules'\n pwd=$(pwd)\n \n test_expect_success 'setup' '\n-\tgit checkout -b master &&\n+\tgit checkout -b main &&\n \ttest_commit commit1 &&\n \ttest_commit commit2 &&\n \tmkdir sub &&\ndiff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh\nindex b2c3ed4088..8e726f1515 100755\n--- a/t/t5616-partial-clone.sh\n+++ b/t/t5616-partial-clone.sh\n@@ -2,7 +2,7 @@\n \n test_description='git partial clone'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -54,14 +54,14 @@ test_expect_success 'verify that .promisor file contains refs fetched' '\n \ttest_line_count = 1 promisorlist &&\n \tgit -C srv.bare rev-parse --verify HEAD >headhash &&\n \tgrep \"$(cat headhash) HEAD\" $(cat promisorlist) &&\n-\tgrep \"$(cat headhash) refs/heads/master\" $(cat promisorlist)\n+\tgrep \"$(cat headhash) refs/heads/main\" $(cat promisorlist)\n '\n \n-# checkout master to force dynamic object fetch of blobs at HEAD.\n+# checkout main to force dynamic object fetch of blobs at HEAD.\n test_expect_success 'verify checkout with dynamic object fetch' '\n \tgit -C pc1 rev-list --quiet --objects --missing=print HEAD >observed &&\n \ttest_line_count = 4 observed &&\n-\tgit -C pc1 checkout master &&\n+\tgit -C pc1 checkout main &&\n \tgit -C pc1 rev-list --quiet --objects --missing=print HEAD >observed &&\n \ttest_line_count = 0 observed\n '\n@@ -76,8 +76,8 @@ test_expect_success 'push new commits to server' '\n \t\tgit -C src add file.1.txt\n \t\tgit -C src commit -m \"mod $x\"\n \tdone &&\n-\tgit -C src blame master -- file.1.txt >expect.blame &&\n-\tgit -C src push -u srv master\n+\tgit -C src blame main -- file.1.txt >expect.blame &&\n+\tgit -C src push -u srv main\n '\n \n # (partial) fetch in the partial clone repo from the promisor remote.\n@@ -86,26 +86,26 @@ test_expect_success 'push new commits to server' '\n test_expect_success 'partial fetch inherits filter settings' '\n \tgit -C pc1 fetch origin &&\n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\tmaster..origin/master >observed &&\n+\t\tmain..origin/main >observed &&\n \ttest_line_count = 5 observed\n '\n \n # force dynamic object fetch using diff.\n-# we should only get 1 new blob (for the file in origin/master).\n+# we should only get 1 new blob (for the file in origin/main).\n test_expect_success 'verify diff causes dynamic object fetch' '\n-\tgit -C pc1 diff master..origin/master -- file.1.txt &&\n+\tgit -C pc1 diff main..origin/main -- file.1.txt &&\n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\t master..origin/master >observed &&\n+\t\t main..origin/main >observed &&\n \ttest_line_count = 4 observed\n '\n \n # force full dynamic object fetch of the file's history using blame.\n # we should get the intermediate blobs for the file.\n test_expect_success 'verify blame causes dynamic object fetch' '\n-\tgit -C pc1 blame origin/master -- file.1.txt >observed.blame &&\n+\tgit -C pc1 blame origin/main -- file.1.txt >observed.blame &&\n \ttest_cmp expect.blame observed.blame &&\n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\tmaster..origin/master >observed &&\n+\t\tmain..origin/main >observed &&\n \ttest_line_count = 0 observed\n '\n \n@@ -118,7 +118,7 @@ test_expect_success 'push new commits to server for file.2.txt' '\n \t\tgit -C src add file.2.txt\n \t\tgit -C src commit -m \"mod $x\"\n \tdone &&\n-\tgit -C src push -u srv master\n+\tgit -C src push -u srv main\n '\n \n # Do FULL fetch by disabling inherited filter-spec using --no-filter.\n@@ -126,7 +126,7 @@ test_expect_success 'push new commits to server for file.2.txt' '\n test_expect_success 'override inherited filter-spec using --no-filter' '\n \tgit -C pc1 fetch --no-filter origin &&\n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\tmaster..origin/master >observed &&\n+\t\tmain..origin/main >observed &&\n \ttest_line_count = 0 observed\n '\n \n@@ -139,7 +139,7 @@ test_expect_success 'push new commits to server for file.3.txt' '\n \t\tgit -C src add file.3.txt\n \t\tgit -C src commit -m \"mod $x\"\n \tdone &&\n-\tgit -C src push -u srv master\n+\tgit -C src push -u srv main\n '\n \n # Do a partial fetch and then try to manually fetch the missing objects.\n@@ -149,7 +149,7 @@ test_expect_success 'manual prefetch of missing objects' '\n \tgit -C pc1 fetch --filter=blob:none origin &&\n \n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\t master..origin/master >revs &&\n+\t\t main..origin/main >revs &&\n \tawk -f print_1.awk revs |\n \tsed \"s/?//\" |\n \tsort >observed.oids &&\n@@ -158,7 +158,7 @@ test_expect_success 'manual prefetch of missing objects' '\n \tgit -C pc1 fetch-pack --stdin \"file://$(pwd)/srv.bare\" <observed.oids &&\n \n \tgit -C pc1 rev-list --quiet --objects --missing=print \\\n-\t\tmaster..origin/master >revs &&\n+\t\tmain..origin/main >revs &&\n \tawk -f print_1.awk revs |\n \tsed \"s/?//\" |\n \tsort >observed.oids &&\n@@ -199,7 +199,7 @@ test_expect_success 'use fsck before and after manually fetching a missing subtr\n \techo \"in dir\" >src/dir/file.txt &&\n \tgit -C src add dir/file.txt &&\n \tgit -C src commit -m \"file in dir\" &&\n-\tgit -C src push -u srv master &&\n+\tgit -C src push -u srv main &&\n \tSUBTREE=$(git -C src rev-parse HEAD:dir) &&\n \n \trm -rf dst &&\n@@ -207,7 +207,7 @@ test_expect_success 'use fsck before and after manually fetching a missing subtr\n \tgit -C dst fsck &&\n \n \t# Make sure we only have commits, and all trees and blobs are missing.\n-\tgit -C dst rev-list --missing=allow-any --objects master \\\n+\tgit -C dst rev-list --missing=allow-any --objects main \\\n \t\t>fetched_objects &&\n \tawk -f print_1.awk fetched_objects |\n \txargs -n1 git -C dst cat-file -t >fetched_types &&\n@@ -224,7 +224,7 @@ test_expect_success 'use fsck before and after manually fetching a missing subtr\n \tgit -C dst fsck &&\n \n \t# Auto-fetch all remaining trees and blobs with --missing=error\n-\tgit -C dst rev-list --missing=error --objects master >fetched_objects &&\n+\tgit -C dst rev-list --missing=error --objects main >fetched_objects &&\n \ttest_line_count = 70 fetched_objects &&\n \n \tawk -f print_1.awk fetched_objects |\n@@ -334,7 +334,7 @@ test_expect_success 'setup src repo for sparse filter' '\n test_expect_success 'partial clone with sparse filter succeeds' '\n \trm -rf dst.git &&\n \tgit clone --no-local --bare \\\n-\t\t  --filter=sparse:oid=master:only-one \\\n+\t\t  --filter=sparse:oid=main:only-one \\\n \t\t  sparse-src dst.git &&\n \t(\n \t\tcd dst.git &&\n@@ -347,11 +347,11 @@ test_expect_success 'partial clone with sparse filter succeeds' '\n test_expect_success 'partial clone with unresolvable sparse filter fails cleanly' '\n \trm -rf dst.git &&\n \ttest_must_fail git clone --no-local --bare \\\n-\t\t\t\t --filter=sparse:oid=master:no-such-name \\\n+\t\t\t\t --filter=sparse:oid=main:no-such-name \\\n \t\t\t\t sparse-src dst.git 2>err &&\n-\ttest_i18ngrep \"unable to access sparse blob in .master:no-such-name\" err &&\n+\ttest_i18ngrep \"unable to access sparse blob in .main:no-such-name\" err &&\n \ttest_must_fail git clone --no-local --bare \\\n-\t\t\t\t --filter=sparse:oid=master \\\n+\t\t\t\t --filter=sparse:oid=main \\\n \t\t\t\t sparse-src dst.git 2>err &&\n \ttest_i18ngrep \"unable to parse sparse filter data in\" err\n '\n@@ -406,7 +406,7 @@ test_expect_success 'fetch lazy-fetches only to resolve deltas' '\n \t# promisor remote other than for the big tree (because it needs to\n \t# resolve the delta).\n \tGIT_TRACE_PACKET=\"$(pwd)/trace\" git -C client \\\n-\t\tfetch \"file://$(pwd)/server\" master &&\n+\t\tfetch \"file://$(pwd)/server\" main &&\n \n \t# Verify the assumption that the client needed to fetch the delta base\n \t# to resolve the delta.\n@@ -425,7 +425,7 @@ test_expect_success 'fetch lazy-fetches only to resolve deltas, protocol v2' '\n \t# promisor remote other than for the big blob (because it needs to\n \t# resolve the delta).\n \tGIT_TRACE_PACKET=\"$(pwd)/trace\" git -C client \\\n-\t\tfetch \"file://$(pwd)/server\" master &&\n+\t\tfetch \"file://$(pwd)/server\" main &&\n \n \t# Verify that protocol version 2 was used.\n \tgrep \"fetch< version 2\" trace &&\ndiff --git a/t/t5617-clone-submodules-remote.sh b/t/t5617-clone-submodules-remote.sh\nindex cba468fc53..e2dbb4eaba 100755\n--- a/t/t5617-clone-submodules-remote.sh\n+++ b/t/t5617-clone-submodules-remote.sh\n@@ -2,7 +2,7 @@\n \n test_description='Test cloning repos with submodules using remote-tracking branches'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -10,7 +10,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n pwd=$(pwd)\n \n test_expect_success 'setup' '\n-\tgit checkout -b master &&\n+\tgit checkout -b main &&\n \ttest_commit commit1 &&\n \tmkdir sub &&\n \t(\n@@ -42,7 +42,7 @@ test_expect_success 'clone with --remote-submodules' '\n \tgit clone --recurse-submodules --remote-submodules \"file://$pwd/.\" super_clone &&\n \t(\n \t\tcd super_clone/sub &&\n-\t\tgit diff --exit-code remotes/origin/master\n+\t\tgit diff --exit-code remotes/origin/main\n \t)\n '\n \n@@ -60,7 +60,7 @@ test_expect_success 'clone with --single-branch' '\n \tgit clone --recurse-submodules --single-branch \"file://$pwd/.\" super_clone &&\n \t(\n \t\tcd super_clone/sub &&\n-\t\tgit rev-parse --verify origin/master &&\n+\t\tgit rev-parse --verify origin/main &&\n \t\ttest_must_fail git rev-parse --verify origin/other\n \t)\n '\ndiff --git a/t/t5700-protocol-v1.sh b/t/t5700-protocol-v1.sh\nindex 7f0056c1ed..468bd3e13e 100755\n--- a/t/t5700-protocol-v1.sh\n+++ b/t/t5700-protocol-v1.sh\n@@ -8,7 +8,7 @@ TEST_NO_CREATE_REPO=1\n GIT_TEST_PROTOCOL_VERSION=0\n export GIT_TEST_PROTOCOL_VERSION\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -44,7 +44,7 @@ test_expect_success 'fetch with git:// using protocol v1' '\n \tGIT_TRACE_PACKET=1 git -C daemon_child -c protocol.version=1 \\\n \t\tfetch 2>log &&\n \n-\tgit -C daemon_child log -1 --format=%s origin/master >actual &&\n+\tgit -C daemon_child log -1 --format=%s origin/main >actual &&\n \tgit -C \"$daemon_parent\" log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -72,7 +72,7 @@ test_expect_success 'push with git:// using protocol v1' '\n \ttest_commit -C daemon_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=1 git -C daemon_child -c protocol.version=1 \\\n \t\tpush origin HEAD:client_branch 2>log &&\n \n@@ -113,7 +113,7 @@ test_expect_success 'fetch with file:// using protocol v1' '\n \tGIT_TRACE_PACKET=1 git -C file_child -c protocol.version=1 \\\n \t\tfetch 2>log &&\n \n-\tgit -C file_child log -1 --format=%s origin/master >actual &&\n+\tgit -C file_child log -1 --format=%s origin/main >actual &&\n \tgit -C file_parent log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -137,7 +137,7 @@ test_expect_success 'push with file:// using protocol v1' '\n \ttest_commit -C file_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=1 git -C file_child -c protocol.version=1 \\\n \t\tpush origin HEAD:client_branch 2>log &&\n \n@@ -191,7 +191,7 @@ test_expect_success 'fetch with ssh:// using protocol v1' '\n \t\tfetch 2>log &&\n \texpect_ssh git-upload-pack &&\n \n-\tgit -C ssh_child log -1 --format=%s origin/master >actual &&\n+\tgit -C ssh_child log -1 --format=%s origin/main >actual &&\n \tgit -C ssh_parent log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -216,7 +216,7 @@ test_expect_success 'push with ssh:// using protocol v1' '\n \ttest_commit -C ssh_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=1 git -C ssh_child -c protocol.version=1 \\\n \t\tpush origin HEAD:client_branch 2>log &&\n \texpect_ssh git-receive-pack &&\n@@ -260,7 +260,7 @@ test_expect_success 'fetch with http:// using protocol v1' '\n \tGIT_TRACE_PACKET=1 git -C http_child -c protocol.version=1 \\\n \t\tfetch 2>log &&\n \n-\tgit -C http_child log -1 --format=%s origin/master >actual &&\n+\tgit -C http_child log -1 --format=%s origin/main >actual &&\n \tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH/http_parent\" log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -284,7 +284,7 @@ test_expect_success 'push with http:// using protocol v1' '\n \ttest_commit -C http_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=1 git -C http_child -c protocol.version=1 \\\n \t\tpush origin HEAD:client_branch && #2>log &&\n \ndiff --git a/t/t5701-git-serve.sh b/t/t5701-git-serve.sh\nindex 66c47e61d8..d9143b4bd2 100755\n--- a/t/t5701-git-serve.sh\n+++ b/t/t5701-git-serve.sh\n@@ -2,7 +2,7 @@\n \n test_description='test protocol v2 server commands'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -86,9 +86,9 @@ test_expect_success 'wrong object-format' '\n #\n test_expect_success 'setup some refs and tags' '\n \ttest_commit one &&\n-\tgit branch dev master &&\n+\tgit branch dev main &&\n \ttest_commit two &&\n-\tgit symbolic-ref refs/heads/release refs/heads/master &&\n+\tgit symbolic-ref refs/heads/release refs/heads/main &&\n \tgit tag -a -m \"annotated tag\" annotated-tag\n '\n \n@@ -102,7 +102,7 @@ test_expect_success 'basics of ls-refs' '\n \tcat >expect <<-EOF &&\n \t$(git rev-parse HEAD) HEAD\n \t$(git rev-parse refs/heads/dev) refs/heads/dev\n-\t$(git rev-parse refs/heads/master) refs/heads/master\n+\t$(git rev-parse refs/heads/main) refs/heads/main\n \t$(git rev-parse refs/heads/release) refs/heads/release\n \t$(git rev-parse refs/tags/annotated-tag) refs/tags/annotated-tag\n \t$(git rev-parse refs/tags/one) refs/tags/one\n@@ -120,13 +120,13 @@ test_expect_success 'basic ref-prefixes' '\n \tcommand=ls-refs\n \tobject-format=$(test_oid algo)\n \t0001\n-\tref-prefix refs/heads/master\n+\tref-prefix refs/heads/main\n \tref-prefix refs/tags/one\n \t0000\n \tEOF\n \n \tcat >expect <<-EOF &&\n-\t$(git rev-parse refs/heads/master) refs/heads/master\n+\t$(git rev-parse refs/heads/main) refs/heads/main\n \t$(git rev-parse refs/tags/one) refs/tags/one\n \t0000\n \tEOF\n@@ -147,7 +147,7 @@ test_expect_success 'refs/heads prefix' '\n \n \tcat >expect <<-EOF &&\n \t$(git rev-parse refs/heads/dev) refs/heads/dev\n-\t$(git rev-parse refs/heads/master) refs/heads/master\n+\t$(git rev-parse refs/heads/main) refs/heads/main\n \t$(git rev-parse refs/heads/release) refs/heads/release\n \t0000\n \tEOF\n@@ -191,8 +191,8 @@ test_expect_success 'symrefs parameter' '\n \n \tcat >expect <<-EOF &&\n \t$(git rev-parse refs/heads/dev) refs/heads/dev\n-\t$(git rev-parse refs/heads/master) refs/heads/master\n-\t$(git rev-parse refs/heads/release) refs/heads/release symref-target:refs/heads/master\n+\t$(git rev-parse refs/heads/main) refs/heads/main\n+\t$(git rev-parse refs/heads/release) refs/heads/release symref-target:refs/heads/main\n \t0000\n \tEOF\n \ndiff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh\nindex f1f77fe089..3d994e0b1b 100755\n--- a/t/t5702-protocol-v2.sh\n+++ b/t/t5702-protocol-v2.sh\n@@ -4,7 +4,7 @@ test_description='test git wire-protocol version 2'\n \n TEST_NO_CREATE_REPO=1\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -39,10 +39,10 @@ test_expect_success 'ref advertisement is filtered with ls-remote using protocol\n \ttest_when_finished \"rm -f log\" &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -c protocol.version=2 \\\n-\t\tls-remote \"$GIT_DAEMON_URL/parent\" master >actual &&\n+\t\tls-remote \"$GIT_DAEMON_URL/parent\" main >actual &&\n \n \tcat >expect <<-EOF &&\n-\t$(git -C \"$daemon_parent\" rev-parse refs/heads/master)$(printf \"\\t\")refs/heads/master\n+\t$(git -C \"$daemon_parent\" rev-parse refs/heads/main)$(printf \"\\t\")refs/heads/main\n \tEOF\n \n \ttest_cmp expect actual\n@@ -72,7 +72,7 @@ test_expect_success 'fetch with git:// using protocol v2' '\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C daemon_child -c protocol.version=2 \\\n \t\tfetch &&\n \n-\tgit -C daemon_child log -1 --format=%s origin/master >actual &&\n+\tgit -C daemon_child log -1 --format=%s origin/main >actual &&\n \tgit -C \"$daemon_parent\" log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -121,7 +121,7 @@ test_expect_success 'push with git:// and a config of v2 does not request v2' '\n \ttest_commit -C daemon_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C daemon_child -c protocol.version=2 \\\n \t\tpush origin HEAD:client_branch &&\n \n@@ -161,10 +161,10 @@ test_expect_success 'ref advertisement is filtered with ls-remote using protocol\n \ttest_when_finished \"rm -f log\" &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -c protocol.version=2 \\\n-\t\tls-remote \"file://$(pwd)/file_parent\" master >actual &&\n+\t\tls-remote \"file://$(pwd)/file_parent\" main >actual &&\n \n \tcat >expect <<-EOF &&\n-\t$(git -C file_parent rev-parse refs/heads/master)$(printf \"\\t\")refs/heads/master\n+\t$(git -C file_parent rev-parse refs/heads/main)$(printf \"\\t\")refs/heads/main\n \tEOF\n \n \ttest_cmp expect actual\n@@ -174,10 +174,10 @@ test_expect_success 'server-options are sent when using ls-remote' '\n \ttest_when_finished \"rm -f log\" &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -c protocol.version=2 \\\n-\t\tls-remote -o hello -o world \"file://$(pwd)/file_parent\" master >actual &&\n+\t\tls-remote -o hello -o world \"file://$(pwd)/file_parent\" main >actual &&\n \n \tcat >expect <<-EOF &&\n-\t$(git -C file_parent rev-parse refs/heads/master)$(printf \"\\t\")refs/heads/master\n+\t$(git -C file_parent rev-parse refs/heads/main)$(printf \"\\t\")refs/heads/main\n \tEOF\n \n \ttest_cmp expect actual &&\n@@ -187,7 +187,7 @@ test_expect_success 'server-options are sent when using ls-remote' '\n \n test_expect_success 'warn if using server-option with ls-remote with legacy protocol' '\n \ttest_must_fail env GIT_TEST_PROTOCOL_VERSION=0 git -c protocol.version=0 \\\n-\t\tls-remote -o hello -o world \"file://$(pwd)/file_parent\" master 2>err &&\n+\t\tls-remote -o hello -o world \"file://$(pwd)/file_parent\" main 2>err &&\n \n \ttest_i18ngrep \"see protocol.version in\" err &&\n \ttest_i18ngrep \"server options require protocol version 2 or later\" err\n@@ -220,7 +220,7 @@ test_expect_success 'fetch with file:// using protocol v2' '\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C file_child -c protocol.version=2 \\\n \t\tfetch origin &&\n \n-\tgit -C file_child log -1 --format=%s origin/master >actual &&\n+\tgit -C file_child log -1 --format=%s origin/main >actual &&\n \tgit -C file_parent log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -235,13 +235,13 @@ test_expect_success 'ref advertisement is filtered during fetch using protocol v\n \tgit -C file_parent branch unwanted-branch three &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C file_child -c protocol.version=2 \\\n-\t\tfetch origin master &&\n+\t\tfetch origin main &&\n \n-\tgit -C file_child log -1 --format=%s origin/master >actual &&\n+\tgit -C file_child log -1 --format=%s origin/main >actual &&\n \tgit -C file_parent log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n-\tgrep \"refs/heads/master\" log &&\n+\tgrep \"refs/heads/main\" log &&\n \t! grep \"refs/heads/unwanted-branch\" log\n '\n \n@@ -251,9 +251,9 @@ test_expect_success 'server-options are sent when fetching' '\n \ttest_commit -C file_parent four &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C file_child -c protocol.version=2 \\\n-\t\tfetch -o hello -o world origin master &&\n+\t\tfetch -o hello -o world origin main &&\n \n-\tgit -C file_child log -1 --format=%s origin/master >actual &&\n+\tgit -C file_child log -1 --format=%s origin/main >actual &&\n \tgit -C file_parent log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -267,7 +267,7 @@ test_expect_success 'warn if using server-option with fetch with legacy protocol\n \tgit init temp_child &&\n \n \ttest_must_fail env GIT_TEST_PROTOCOL_VERSION=0 git -C temp_child -c protocol.version=0 \\\n-\t\tfetch -o hello -o world \"file://$(pwd)/file_parent\" master 2>err &&\n+\t\tfetch -o hello -o world \"file://$(pwd)/file_parent\" main 2>err &&\n \n \ttest_i18ngrep \"see protocol.version in\" err &&\n \ttest_i18ngrep \"server options require protocol version 2 or later\" err\n@@ -328,7 +328,7 @@ test_expect_success 'partial clone' '\n \tgrep \"version 2\" trace &&\n \n \t# Ensure that the old version of the file is missing\n-\tgit -C client rev-list --quiet --objects --missing=print master \\\n+\tgit -C client rev-list --quiet --objects --missing=print main \\\n \t\t>observed.oids &&\n \tgrep \"$(git -C server rev-parse message1:a.txt)\" observed.oids &&\n \n@@ -353,7 +353,7 @@ test_expect_success 'partial fetch' '\n \tSERVER=\"file://$(pwd)/server\" &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/trace\" git -C client -c protocol.version=2 \\\n-\t\tfetch --filter=blob:none \"$SERVER\" master:refs/heads/other &&\n+\t\tfetch --filter=blob:none \"$SERVER\" main:refs/heads/other &&\n \tgrep \"version 2\" trace &&\n \n \t# Ensure that the old version of the file is missing\n@@ -398,7 +398,7 @@ test_expect_success 'even with handcrafted request, filter does not work if not\n \tcommand=fetch\n \tobject-format=$(test_oid algo)\n \t0001\n-\twant $(git -C server rev-parse master)\n+\twant $(git -C server rev-parse main)\n \tfilter blob:none\n \t0000\n \tEOF\n@@ -542,7 +542,7 @@ test_expect_success 'deepen-relative' '\n \ttest_commit -C server four &&\n \n \t# Sanity check that only \"three\" is downloaded\n-\tgit -C client log --pretty=tformat:%s master >actual &&\n+\tgit -C client log --pretty=tformat:%s main >actual &&\n \techo three >expected &&\n \ttest_cmp expected actual &&\n \n@@ -551,7 +551,7 @@ test_expect_success 'deepen-relative' '\n \t# Ensure that protocol v2 is used\n \tgrep \"fetch< version 2\" trace &&\n \n-\tgit -C client log --pretty=tformat:%s origin/master >actual &&\n+\tgit -C client log --pretty=tformat:%s origin/main >actual &&\n \tcat >expected <<-\\EOF &&\n \tfour\n \tthree\n@@ -673,7 +673,7 @@ test_expect_success 'fetch with http:// using protocol v2' '\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C http_child -c protocol.version=2 \\\n \t\tfetch &&\n \n-\tgit -C http_child log -1 --format=%s origin/master >actual &&\n+\tgit -C http_child log -1 --format=%s origin/main >actual &&\n \tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH/http_parent\" log -1 --format=%s >expect &&\n \ttest_cmp expect actual &&\n \n@@ -701,11 +701,11 @@ test_expect_success 'fetch from namespaced repo respects namespaces' '\n \ttest_commit -C \"$HTTPD_DOCUMENT_ROOT_PATH/nsrepo\" one &&\n \ttest_commit -C \"$HTTPD_DOCUMENT_ROOT_PATH/nsrepo\" two &&\n \tgit -C \"$HTTPD_DOCUMENT_ROOT_PATH/nsrepo\" \\\n-\t\tupdate-ref refs/namespaces/ns/refs/heads/master one &&\n+\t\tupdate-ref refs/namespaces/ns/refs/heads/main one &&\n \n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C http_child -c protocol.version=2 \\\n \t\tfetch \"$HTTPD_URL/smart_namespace/nsrepo\" \\\n-\t\trefs/heads/master:refs/heads/theirs &&\n+\t\trefs/heads/main:refs/heads/theirs &&\n \n \t# Server responded using protocol v2\n \tgrep \"fetch< version 2\" log &&\n@@ -736,7 +736,7 @@ test_expect_success 'push with http:// and a config of v2 does not request v2' '\n \ttest_commit -C http_child three &&\n \n \t# Push to another branch, as the target repository has the\n-\t# master branch checked out and we cannot push into it.\n+\t# main branch checked out and we cannot push into it.\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C http_child -c protocol.version=2 \\\n \t\tpush origin HEAD:client_branch &&\n \ndiff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\nindex c3a52d478f..0f3e0bf15c 100755\n--- a/t/t5703-upload-pack-ref-in-want.sh\n+++ b/t/t5703-upload-pack-ref-in-want.sh\n@@ -2,7 +2,7 @@\n \n test_description='upload-pack ref-in-want'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -41,7 +41,7 @@ write_command () {\n \n # c(o/foo) d(o/bar)\n #        \\ /\n-#         b   e(baz)  f(master)\n+#         b   e(baz)  f(main)\n #          \\__  |  __/\n #             \\ | /\n #               a\n@@ -54,7 +54,7 @@ test_expect_success 'setup repository' '\n \ttest_commit d &&\n \tgit checkout -b baz a &&\n \ttest_commit e &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit f\n '\n \n@@ -91,7 +91,7 @@ test_expect_success 'invalid want-ref line' '\n test_expect_success 'basic want-ref' '\n \toid=$(git rev-parse f) &&\n \tcat >expected_refs <<-EOF &&\n-\t$oid refs/heads/master\n+\t$oid refs/heads/main\n \tEOF\n \tgit rev-parse f >expected_commits &&\n \n@@ -100,7 +100,7 @@ test_expect_success 'basic want-ref' '\n \t$(write_command fetch)\n \t0001\n \tno-progress\n-\twant-ref refs/heads/master\n+\twant-ref refs/heads/main\n \thave $oid\n \tdone\n \t0000\n@@ -138,7 +138,7 @@ test_expect_success 'multiple want-ref lines' '\n test_expect_success 'mix want and want-ref' '\n \toid=$(git rev-parse f) &&\n \tcat >expected_refs <<-EOF &&\n-\t$oid refs/heads/master\n+\t$oid refs/heads/main\n \tEOF\n \tgit rev-parse e f >expected_commits &&\n \n@@ -146,7 +146,7 @@ test_expect_success 'mix want and want-ref' '\n \t$(write_command fetch)\n \t0001\n \tno-progress\n-\twant-ref refs/heads/master\n+\twant-ref refs/heads/main\n \twant $(git rev-parse e)\n \thave $(git rev-parse a)\n \tdone\n@@ -185,7 +185,7 @@ LOCAL_PRISTINE=\"$(pwd)/local_pristine\"\n # $REPO\n # c(o/foo) d(o/bar)\n #        \\ /\n-#         b   e(baz)  f(master)\n+#         b   e(baz)  f(main)\n #          \\__  |  __/\n #             \\ | /\n #               a\n@@ -196,7 +196,7 @@ LOCAL_PRISTINE=\"$(pwd)/local_pristine\"\n #\t\t.\n #\t\t.\n #\t\t|\n-#\t\ta(master)\n+#\t\ta(main)\n test_expect_success 'setup repos for fetching with ref-in-want tests' '\n \t(\n \t\tgit init \"$REPO\" &&\n@@ -212,7 +212,7 @@ test_expect_success 'setup repos for fetching with ref-in-want tests' '\n \t\ttest_commit_bulk --id=s 33 &&\n \n \t\t# Add novel commits to upstream\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tcd \"$REPO\" &&\n \t\tgit checkout -b o/foo &&\n \t\ttest_commit b &&\n@@ -221,7 +221,7 @@ test_expect_success 'setup repos for fetching with ref-in-want tests' '\n \t\ttest_commit d &&\n \t\tgit checkout -b baz a &&\n \t\ttest_commit e &&\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\ttest_commit f\n \t) &&\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant true &&\n@@ -248,12 +248,12 @@ test_expect_success 'fetching multiple refs' '\n \n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C local fetch origin master baz &&\n+\tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C local fetch origin main baz &&\n \n-\tgit -C \"$REPO\" rev-parse \"master\" \"baz\" >expected &&\n-\tgit -C local rev-parse refs/remotes/origin/master refs/remotes/origin/baz >actual &&\n+\tgit -C \"$REPO\" rev-parse \"main\" \"baz\" >expected &&\n+\tgit -C local rev-parse refs/remotes/origin/main refs/remotes/origin/baz >actual &&\n \ttest_cmp expected actual &&\n-\tgrep \"want-ref refs/heads/master\" log &&\n+\tgrep \"want-ref refs/heads/main\" log &&\n \tgrep \"want-ref refs/heads/baz\" log\n '\n \n@@ -264,13 +264,13 @@ test_expect_success 'fetching ref and exact OID' '\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n \toid=$(git -C \"$REPO\" rev-parse b) &&\n \tGIT_TRACE_PACKET=\"$(pwd)/log\" git -C local fetch origin \\\n-\t\tmaster \"$oid\":refs/heads/actual &&\n+\t\tmain \"$oid\":refs/heads/actual &&\n \n-\tgit -C \"$REPO\" rev-parse \"master\" \"b\" >expected &&\n-\tgit -C local rev-parse refs/remotes/origin/master refs/heads/actual >actual &&\n+\tgit -C \"$REPO\" rev-parse \"main\" \"b\" >expected &&\n+\tgit -C local rev-parse refs/remotes/origin/main refs/heads/actual >actual &&\n \ttest_cmp expected actual &&\n \tgrep \"want $oid\" log &&\n-\tgrep \"want-ref refs/heads/master\" log\n+\tgrep \"want-ref refs/heads/main\" log\n '\n \n test_expect_success 'fetching with wildcard that does not match any refs' '\n@@ -319,7 +319,7 @@ test_expect_success 'setup repos for change-while-negotiating test' '\n \t\ttest_commit_bulk --id=s 33 &&\n \n \t\t# Add novel commits to upstream\n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tcd \"$REPO\" &&\n \t\ttest_commit m2 &&\n \t\ttest_commit m3 &&\n@@ -345,7 +345,7 @@ test_expect_success 'server is initially ahead - no ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant false &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tinconsistency master $(test_oid numeric) &&\n+\tinconsistency main $(test_oid numeric) &&\n \ttest_must_fail git -C local fetch 2>err &&\n \ttest_i18ngrep \"fatal: remote error: upload-pack: not our ref\" err\n '\n@@ -354,11 +354,11 @@ test_expect_success 'server is initially ahead - ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant true &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tinconsistency master $(test_oid numeric) &&\n+\tinconsistency main $(test_oid numeric) &&\n \tgit -C local fetch &&\n \n-\tgit -C \"$REPO\" rev-parse --verify master >expected &&\n-\tgit -C local rev-parse --verify refs/remotes/origin/master >actual &&\n+\tgit -C \"$REPO\" rev-parse --verify main >expected &&\n+\tgit -C local rev-parse --verify refs/remotes/origin/main >actual &&\n \ttest_cmp expected actual\n '\n \n@@ -366,11 +366,11 @@ test_expect_success 'server is initially behind - no ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant false &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tinconsistency master \"master^\" &&\n+\tinconsistency main \"main^\" &&\n \tgit -C local fetch &&\n \n-\tgit -C \"$REPO\" rev-parse --verify \"master^\" >expected &&\n-\tgit -C local rev-parse --verify refs/remotes/origin/master >actual &&\n+\tgit -C \"$REPO\" rev-parse --verify \"main^\" >expected &&\n+\tgit -C local rev-parse --verify refs/remotes/origin/main >actual &&\n \ttest_cmp expected actual\n '\n \n@@ -378,11 +378,11 @@ test_expect_success 'server is initially behind - ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant true &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tinconsistency master \"master^\" &&\n+\tinconsistency main \"main^\" &&\n \tgit -C local fetch &&\n \n-\tgit -C \"$REPO\" rev-parse --verify \"master\" >expected &&\n-\tgit -C local rev-parse --verify refs/remotes/origin/master >actual &&\n+\tgit -C \"$REPO\" rev-parse --verify \"main\" >expected &&\n+\tgit -C local rev-parse --verify refs/remotes/origin/main >actual &&\n \ttest_cmp expected actual\n '\n \ndiff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh\nindex 1ecefb57fe..d386076dbd 100755\n--- a/t/t5801-remote-helpers.sh\n+++ b/t/t5801-remote-helpers.sh\n@@ -5,7 +5,7 @@\n \n test_description='Test remote-helper import and export commands'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -74,18 +74,18 @@ test_expect_success 'fetch multiple branches' '\n \t(cd local &&\n \t git fetch\n \t) &&\n-\tcompare_refs server master local refs/remotes/origin/master &&\n+\tcompare_refs server main local refs/remotes/origin/main &&\n \tcompare_refs server new local refs/remotes/origin/new\n '\n \n test_expect_success 'push when remote has extra refs' '\n \t(cd local &&\n-\t git reset --hard origin/master &&\n+\t git reset --hard origin/main &&\n \t echo content >>file &&\n \t git commit -a -m six &&\n \t git push\n \t) &&\n-\tcompare_refs local master server master\n+\tcompare_refs local main server main\n '\n \n test_expect_success 'push new branch by name' '\n@@ -177,7 +177,7 @@ test_expect_failure 'pushing without marks' '\n \n test_expect_success 'push all with existing object' '\n \t(cd local &&\n-\tgit branch dup2 master &&\n+\tgit branch dup2 main &&\n \tgit push origin --all\n \t) &&\n \tcompare_refs local dup2 server dup2\n@@ -185,7 +185,7 @@ test_expect_success 'push all with existing object' '\n \n test_expect_success 'push ref with existing object' '\n \t(cd local &&\n-\tgit branch dup master &&\n+\tgit branch dup main &&\n \tgit push origin dup\n \t) &&\n \tcompare_refs local dup server dup\n@@ -193,7 +193,7 @@ test_expect_success 'push ref with existing object' '\n \n test_expect_success GPG 'push signed tag' '\n \t(cd local &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag -s -m signed-tag signed-tag &&\n \tgit push origin signed-tag\n \t) &&\n@@ -203,7 +203,7 @@ test_expect_success GPG 'push signed tag' '\n \n test_expect_success GPG 'push signed tag with signed-tags capability' '\n \t(cd local &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag -s -m signed-tag signed-tag-2 &&\n \tGIT_REMOTE_TESTGIT_SIGNED_TAGS=1 git push origin signed-tag-2\n \t) &&\n@@ -212,7 +212,7 @@ test_expect_success GPG 'push signed tag with signed-tags capability' '\n \n test_expect_success 'push update refs' '\n \t(cd local &&\n-\tgit checkout -b update master &&\n+\tgit checkout -b update main &&\n \techo update >>file &&\n \tgit commit -a -m update &&\n \tgit push origin update &&\n@@ -263,7 +263,7 @@ test_expect_success 'proper failure checks for fetching' '\n test_expect_success 'proper failure checks for pushing' '\n \ttest_when_finished \"rm -rf local/git.marks local/testgit.marks\" &&\n \t(cd local &&\n-\tgit checkout -b crash master &&\n+\tgit checkout -b crash main &&\n \techo crash >>file &&\n \tgit commit -a -m crash &&\n \ttest_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 git push --all &&\n@@ -275,7 +275,7 @@ test_expect_success 'proper failure checks for pushing' '\n \n test_expect_success 'push messages' '\n \t(cd local &&\n-\tgit checkout -b new_branch master &&\n+\tgit checkout -b new_branch main &&\n \techo new >>file &&\n \tgit commit -a -m new &&\n \tgit push origin new_branch &&\n@@ -289,7 +289,7 @@ test_expect_success 'push messages' '\n \n test_expect_success 'fetch HEAD' '\n \t(cd server &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo more >>file &&\n \tgit commit -a -m more\n \t) &&\n@@ -301,7 +301,7 @@ test_expect_success 'fetch HEAD' '\n \n test_expect_success 'fetch url' '\n \t(cd server &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo more >>file &&\n \tgit commit -a -m more\n \t) &&\n-- \ngitgitgadget\n\n"},{"id":"410312","messageId":"dfbc93923bfb95f1371b9be2dbdca446dd7181ca.1605743088.git.gitgitgadget@gmail.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"[PATCH v3 18/28] t6[0-3]*: adjust the references to the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T23:44:36Z","receivedAt":"2020-11-18T23:45:32Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCarefully excluding t6300, which sees independent development elsewhere\nat the time of writing, we use `main` as the default branch name in\nt6[0-3]*. This trick was performed via\n\n\t$ (cd t &&\n\t   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t6[0-3]*.sh &&\n\t   git checkout HEAD -- t6300\\*)\n\nThis allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`\nfor those tests.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t6000-rev-list-misc.sh                   |  4 +-\n t/t6001-rev-list-graft.sh                  |  4 +-\n t/t6004-rev-list-path-optim.sh             | 16 +++----\n t/t6006-rev-list-format.sh                 | 16 +++----\n t/t6007-rev-list-cherry-pick-file.sh       |  6 +--\n t/t6008-rev-list-submodule.sh              |  4 +-\n t/t6009-rev-list-parent.sh                 |  8 ++--\n t/t6012-rev-list-simplify.sh               | 10 ++--\n t/t6013-rev-list-reverse-parents.sh        | 12 ++---\n t/t6016-rev-list-graph-simplify-history.sh |  4 +-\n t/t6017-rev-list-stdin.sh                  | 10 ++--\n t/t6018-rev-list-glob.sh                   | 52 ++++++++++----------\n t/t6019-rev-list-ancestry-path.sh          |  8 ++--\n t/t6030-bisect-porcelain.sh                | 12 ++---\n t/t6040-tracking-info.sh                   | 56 +++++++++++-----------\n t/t6050-replace.sh                         | 12 ++---\n t/t6101-rev-parse-parents.sh               |  4 +-\n t/t6110-rev-list-sparse.sh                 |  4 +-\n t/t6111-rev-list-treesame.sh               |  8 ++--\n t/t6112-rev-list-filters-objects.sh        | 16 +++----\n t/t6120-describe.sh                        | 22 ++++-----\n t/t6200-fmt-merge-msg.sh                   | 52 ++++++++++----------\n t/t6302-for-each-ref-filter.sh             | 48 +++++++++----------\n 23 files changed, 194 insertions(+), 194 deletions(-)\n\ndiff --git a/t/t6000-rev-list-misc.sh b/t/t6000-rev-list-misc.sh\nindex 664000adf0..12def7bcbf 100755\n--- a/t/t6000-rev-list-misc.sh\n+++ b/t/t6000-rev-list-misc.sh\n@@ -2,7 +2,7 @@\n \n test_description='miscellaneous rev-list tests'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -88,7 +88,7 @@ test_expect_success 'propagate uninteresting flag down correctly' '\n '\n \n test_expect_success 'symleft flag bit is propagated down from tag' '\n-\tgit log --format=\"%m %s\" --left-right v1.0...master >actual &&\n+\tgit log --format=\"%m %s\" --left-right v1.0...main >actual &&\n \tcat >expect <<-\\EOF &&\n \t< another\n \t< that\ndiff --git a/t/t6001-rev-list-graft.sh b/t/t6001-rev-list-graft.sh\nindex 67c384f1e8..90d93f77fa 100755\n--- a/t/t6001-rev-list-graft.sh\n+++ b/t/t6001-rev-list-graft.sh\n@@ -2,7 +2,7 @@\n \n test_description='Revision traversal vs grafts and path limiter'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -23,7 +23,7 @@ test_expect_success setup '\n \tgit commit -a -m \"Third in one history.\" &&\n \tA2=$(git rev-parse --verify HEAD) &&\n \n-\trm -f .git/refs/heads/master .git/index &&\n+\trm -f .git/refs/heads/main .git/index &&\n \n \techo >fileA fileA again &&\n \techo >subdir/fileB fileB again &&\ndiff --git a/t/t6004-rev-list-path-optim.sh b/t/t6004-rev-list-path-optim.sh\nindex ff788199e3..cd4f420e2a 100755\n--- a/t/t6004-rev-list-path-optim.sh\n+++ b/t/t6004-rev-list-path-optim.sh\n@@ -4,7 +4,7 @@ test_description='git rev-list trivial path optimization test\n \n    d/z1\n    b0                             b1\n-   o------------------------*----o master\n+   o------------------------*----o main\n   /                        /\n  o---------o----o----o----o side\n  a0        c0   c1   a1   c2\n@@ -13,7 +13,7 @@ test_description='git rev-list trivial path optimization test\n \n '\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -58,18 +58,18 @@ test_expect_success 'further setup' '\n \tgit add c &&\n \ttest_tick &&\n \tgit commit -m \"Side makes yet another irrelevant commit\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo Another >b &&\n \techo Munged >d/z &&\n \tgit add b d/z &&\n \ttest_tick &&\n-\tgit commit -m \"Master touches b\" &&\n-\tgit tag master_b0 &&\n+\tgit commit -m \"Main touches b\" &&\n+\tgit tag main_b0 &&\n \tgit merge side &&\n \techo Touched >b &&\n \tgit add b &&\n \ttest_tick &&\n-\tgit commit -m \"Master touches b again\"\n+\tgit commit -m \"Main touches b again\"\n '\n \n test_expect_success 'path optimization 2' '\n@@ -79,13 +79,13 @@ test_expect_success 'path optimization 2' '\n '\n \n test_expect_success 'pathspec with leading path' '\n-\tgit rev-parse master^ master_b0 side_c0 initial >expected &&\n+\tgit rev-parse main^ main_b0 side_c0 initial >expected &&\n \tgit rev-list HEAD -- d >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'pathspec with glob (1)' '\n-\tgit rev-parse master^ master_b0 side_c0 initial >expected &&\n+\tgit rev-parse main^ main_b0 side_c0 initial >expected &&\n \tgit rev-list HEAD -- \"d/*\" >actual &&\n \ttest_cmp expected actual\n '\ndiff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh\nindex bbbd577f10..35a2f62392 100755\n--- a/t/t6006-rev-list-format.sh\n+++ b/t/t6006-rev-list-format.sh\n@@ -5,7 +5,7 @@\n \n test_description='git rev-list --pretty=format test'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -56,7 +56,7 @@ test_expect_success 'setup' '\n test_format () {\n \tcat >expect.$1\n \ttest_expect_${3:-success} \"format $1\" \"\n-\t\tgit rev-list --pretty=format:'$2' master >output.$1 &&\n+\t\tgit rev-list --pretty=format:'$2' main >output.$1 &&\n \t\ttest_cmp expect.$1 output.$1\n \t\"\n }\n@@ -187,13 +187,13 @@ test_expect_success 'basic colors' '\n \t<RED>foo<GREEN>bar<BLUE>baz<RESET>xyzzy\n \tEOF\n \tformat=\"%Credfoo%Cgreenbar%Cbluebaz%Cresetxyzzy\" &&\n-\tgit rev-list --color --format=\"$format\" -1 master >actual.raw &&\n+\tgit rev-list --color --format=\"$format\" -1 main >actual.raw &&\n \ttest_decode_color <actual.raw >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success '%S is not a placeholder for rev-list yet' '\n-\tgit rev-list --format=\"%S\" -1 master | grep \"%S\"\n+\tgit rev-list --format=\"%S\" -1 main | grep \"%S\"\n '\n \n test_expect_success 'advanced colors' '\n@@ -202,7 +202,7 @@ test_expect_success 'advanced colors' '\n \t<BOLD;RED;BYELLOW>foo<RESET>\n \tEOF\n \tformat=\"%C(red yellow bold)foo%C(reset)\" &&\n-\tgit rev-list --color --format=\"$format\" -1 master >actual.raw &&\n+\tgit rev-list --color --format=\"$format\" -1 main >actual.raw &&\n \ttest_decode_color <actual.raw >actual &&\n \ttest_cmp expect actual\n '\n@@ -409,7 +409,7 @@ test_expect_success '%x00 shows NUL' '\n \n test_expect_success '%ad respects --date=' '\n \techo 2005-04-07 >expect.ad-short &&\n-\tgit log -1 --date=short --pretty=tformat:%ad >output.ad-short master &&\n+\tgit log -1 --date=short --pretty=tformat:%ad >output.ad-short main &&\n \ttest_cmp expect.ad-short output.ad-short\n '\n \n@@ -497,8 +497,8 @@ test_expect_success '\"%h %gD: %gs\" is same as git-reflog (with --abbrev)' '\n '\n \n test_expect_success '%gd shortens ref name' '\n-\techo \"master@{0}\" >expect.gd-short &&\n-\tgit log -g -1 --format=%gd refs/heads/master >actual.gd-short &&\n+\techo \"main@{0}\" >expect.gd-short &&\n+\tgit log -g -1 --format=%gd refs/heads/main >actual.gd-short &&\n \ttest_cmp expect.gd-short actual.gd-short\n '\n \ndiff --git a/t/t6007-rev-list-cherry-pick-file.sh b/t/t6007-rev-list-cherry-pick-file.sh\nindex 51547ac3a5..b22bf00598 100755\n--- a/t/t6007-rev-list-cherry-pick-file.sh\n+++ b/t/t6007-rev-list-cherry-pick-file.sh\n@@ -2,7 +2,7 @@\n \n test_description='test git rev-list --cherry-pick -- file'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -34,7 +34,7 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m \"E\" &&\n \tgit tag E &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout branch foo &&\n \ttest_tick &&\n \tgit commit -m \"B\" &&\n@@ -236,7 +236,7 @@ test_expect_success '--cherry-pick with independent, but identical branches' '\n \ttest_tick &&\n \tgit commit -m \"independent, too\" foo &&\n \ttest -z \"$(git rev-list --left-right --cherry-pick \\\n-\t\tHEAD...master -- foo)\"\n+\t\tHEAD...main -- foo)\"\n '\n \n cat >expect <<EOF\ndiff --git a/t/t6008-rev-list-submodule.sh b/t/t6008-rev-list-submodule.sh\nindex 871ace31e2..3153a0d891 100755\n--- a/t/t6008-rev-list-submodule.sh\n+++ b/t/t6008-rev-list-submodule.sh\n@@ -5,7 +5,7 @@\n \n test_description='git rev-list involving submodules that this repo has'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -39,7 +39,7 @@ test_expect_success 'setup' '\n '\n \n test_expect_success \"Ilari's test\" '\n-\tgit rev-list --objects super master ^super^\n+\tgit rev-list --objects super main ^super^\n '\n \n test_done\ndiff --git a/t/t6009-rev-list-parent.sh b/t/t6009-rev-list-parent.sh\nindex 114f755d52..63fa7c8313 100755\n--- a/t/t6009-rev-list-parent.sh\n+++ b/t/t6009-rev-list-parent.sh\n@@ -2,7 +2,7 @@\n \n test_description='ancestor culling and limiting by parent number'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -48,7 +48,7 @@ test_expect_success 'setup roots, merges and octopuses' '\n \ttest_commit seven &&\n \tgit checkout -b yetanotherbranch four &&\n \ttest_commit eight &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit merge --allow-unrelated-histories -m normalmerge newroot &&\n \tgit tag normalmerge &&\n@@ -59,7 +59,7 @@ test_expect_success 'setup roots, merges and octopuses' '\n \ttest_tick &&\n \tgit merge -m tetrapus sidebranch anotherbranch yetanotherbranch &&\n \tgit tag tetrapus &&\n-\tgit checkout master\n+\tgit checkout main\n '\n \n test_expect_success 'rev-list roots' '\n@@ -126,7 +126,7 @@ test_expect_success 'dodecapus' '\n \t\troots=\"$roots root$i\" ||\n \t\treturn\n \tdone &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit merge -m dodecapus $roots &&\n \tgit tag dodecapus &&\ndiff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh\nindex d163c24859..4f7fa8b6c0 100755\n--- a/t/t6012-rev-list-simplify.sh\n+++ b/t/t6012-rev-list-simplify.sh\n@@ -2,7 +2,7 @@\n \n test_description='merge simplification'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -46,7 +46,7 @@ test_expect_success setup '\n \tgit add side &&\n \ttest_tick && git commit -m \"Side root\" &&\n \tnote J &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \techo \"Hello\" >file &&\n \techo \"second\" >lost &&\n@@ -68,7 +68,7 @@ test_expect_success setup '\n \tnote D &&\n \n \ttest_tick &&\n-\ttest_must_fail git merge -m \"merge\" master &&\n+\ttest_must_fail git merge -m \"merge\" main &&\n \t>lost && git commit -a -m \"merge\" &&\n \tnote E &&\n \n@@ -77,7 +77,7 @@ test_expect_success setup '\n \ttest_tick && git commit -m \"Irrelevant change\" &&\n \tnote F &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \techo \"Yet another\" >elif &&\n \tgit add elif &&\n \ttest_tick && git commit -m \"Another irrelevant change\" &&\n@@ -90,7 +90,7 @@ test_expect_success setup '\n \ttest_tick && git commit -a -m \"Final change\" &&\n \tnote I &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick && git merge --allow-unrelated-histories -m \"Coolest\" unrelated &&\n \tnote K &&\n \ndiff --git a/t/t6013-rev-list-reverse-parents.sh b/t/t6013-rev-list-reverse-parents.sh\nindex 0298174956..39793cbbd6 100755\n--- a/t/t6013-rev-list-reverse-parents.sh\n+++ b/t/t6013-rev-list-reverse-parents.sh\n@@ -2,7 +2,7 @@\n \n test_description='--reverse combines with --parents'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -21,24 +21,24 @@ test_expect_success 'set up --reverse example' '\n \tcommit two &&\n \tgit checkout -b side HEAD^ &&\n \tcommit three &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge -s ours side &&\n \tcommit five\n \t'\n \n test_expect_success '--reverse --parents --full-history combines correctly' '\n-\tgit rev-list --parents --full-history master -- foo |\n+\tgit rev-list --parents --full-history main -- foo |\n \t\tperl -e \"print reverse <>\" > expected &&\n-\tgit rev-list --reverse --parents --full-history master -- foo \\\n+\tgit rev-list --reverse --parents --full-history main -- foo \\\n \t\t> actual &&\n \ttest_cmp expected actual\n \t'\n \n test_expect_success '--boundary does too' '\n-\tgit rev-list --boundary --parents --full-history master ^root -- foo |\n+\tgit rev-list --boundary --parents --full-history main ^root -- foo |\n \t\tperl -e \"print reverse <>\" > expected &&\n \tgit rev-list --boundary --reverse --parents --full-history \\\n-\t\tmaster ^root -- foo > actual &&\n+\t\tmain ^root -- foo > actual &&\n \ttest_cmp expected actual\n \t'\n \ndiff --git a/t/t6016-rev-list-graph-simplify-history.sh b/t/t6016-rev-list-graph-simplify-history.sh\nindex 3fb7ee0be4..6eddbbcc9f 100755\n--- a/t/t6016-rev-list-graph-simplify-history.sh\n+++ b/t/t6016-rev-list-graph-simplify-history.sh\n@@ -7,7 +7,7 @@\n \n test_description='--graph and simplified history'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -17,7 +17,7 @@ test_expect_success 'set up rev-list --graph test' '\n \ttest_commit A1 foo.txt &&\n \ttest_commit A2 bar.txt &&\n \ttest_commit A3 bar.txt &&\n-\tgit branch -m master A &&\n+\tgit branch -m main A &&\n \n \t# 2 commits on branch B, started from A1\n \tgit checkout -b B A1 &&\ndiff --git a/t/t6017-rev-list-stdin.sh b/t/t6017-rev-list-stdin.sh\nindex e51fe7b9bc..05162512a0 100755\n--- a/t/t6017-rev-list-stdin.sh\n+++ b/t/t6017-rev-list-stdin.sh\n@@ -5,7 +5,7 @@\n \n test_description='log family learns --stdin'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -43,7 +43,7 @@ test_expect_success setup '\n \t\tdone &&\n \t\tfor i in $them\n \t\tdo\n-\t\t\tgit checkout -b side-$i master~$i &&\n+\t\t\tgit checkout -b side-$i main~$i &&\n \t\t\techo updated $i >file-$i &&\n \t\t\tgit add file-$i &&\n \t\t\ttest_tick &&\n@@ -52,7 +52,7 @@ test_expect_success setup '\n \t)\n '\n \n-check master\n+check main\n check side-1 ^side-4\n check side-1 ^side-7 --\n check side-1 ^side-7 -- file-1\n@@ -69,11 +69,11 @@ test_expect_success 'not only --stdin' '\n \tfile-2\n \tEOF\n \tcat >input <<-EOF &&\n-\t^master^\n+\t^main^\n \t--\n \tfile-2\n \tEOF\n-\tgit log --pretty=tformat:%s --name-only --stdin master -- file-1 \\\n+\tgit log --pretty=tformat:%s --name-only --stdin main -- file-1 \\\n \t\t<input >actual &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t6018-rev-list-glob.sh b/t/t6018-rev-list-glob.sh\nindex 60a351c26a..24b34add83 100755\n--- a/t/t6018-rev-list-glob.sh\n+++ b/t/t6018-rev-list-glob.sh\n@@ -2,7 +2,7 @@\n \n test_description='rev-list/rev-parse --glob'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -23,22 +23,22 @@ compare () {\n \n test_expect_success 'setup' '\n \n-\tcommit master &&\n-\tgit checkout -b subspace/one master &&\n+\tcommit main &&\n+\tgit checkout -b subspace/one main &&\n \tcommit one &&\n-\tgit checkout -b subspace/two master &&\n+\tgit checkout -b subspace/two main &&\n \tcommit two &&\n-\tgit checkout -b subspace-x master &&\n+\tgit checkout -b subspace-x main &&\n \tcommit subspace-x &&\n-\tgit checkout -b other/three master &&\n+\tgit checkout -b other/three main &&\n \tcommit three &&\n-\tgit checkout -b someref master &&\n+\tgit checkout -b someref main &&\n \tcommit some &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tcommit topic_2 &&\n-\tgit tag foo/bar master &&\n+\tgit tag foo/bar main &&\n \tcommit topic_3 &&\n-\tgit update-ref refs/remotes/foo/baz master &&\n+\tgit update-ref refs/remotes/foo/baz main &&\n \tcommit topic_4 &&\n \tgit update-ref refs/remotes/upstream/one subspace/one &&\n \tgit update-ref refs/remotes/upstream/two subspace/two &&\n@@ -86,7 +86,7 @@ test_expect_failure 'rev-parse accepts --glob as detached option' '\n \n test_expect_failure 'rev-parse is not confused by option-like glob' '\n \n-\tcompare rev-parse \"master\" \"--glob --symbolic master\"\n+\tcompare rev-parse \"main\" \"--glob --symbolic main\"\n \n '\n \n@@ -114,15 +114,15 @@ test_expect_success 'rev-parse --glob=heads/subspace/* --glob=heads/other/*' '\n \n '\n \n-test_expect_success 'rev-parse --glob=heads/someref/* master' '\n+test_expect_success 'rev-parse --glob=heads/someref/* main' '\n \n-\tcompare rev-parse \"master\" \"--glob=heads/someref/* master\"\n+\tcompare rev-parse \"main\" \"--glob=heads/someref/* main\"\n \n '\n \n test_expect_success 'rev-parse --glob=heads/*' '\n \n-\tcompare rev-parse \"master other/three someref subspace-x subspace/one subspace/two\" \"--glob=heads/*\"\n+\tcompare rev-parse \"main other/three someref subspace-x subspace/one subspace/two\" \"--glob=heads/*\"\n \n '\n \n@@ -139,7 +139,7 @@ test_expect_success 'rev-parse --remotes=foo' '\n '\n \n test_expect_success 'rev-parse --exclude with --branches' '\n-\tcompare rev-parse \"--exclude=*/* --branches\" \"master someref subspace-x\"\n+\tcompare rev-parse \"--exclude=*/* --branches\" \"main someref subspace-x\"\n '\n \n test_expect_success 'rev-parse --exclude with --all' '\n@@ -224,7 +224,7 @@ test_expect_success 'rev-list --glob refs/heads/subspace/*' '\n \n test_expect_success 'rev-list not confused by option-like --glob arg' '\n \n-\tcompare rev-list \"master\" \"--glob -0 master\"\n+\tcompare rev-list \"main\" \"--glob -0 main\"\n \n '\n \n@@ -272,13 +272,13 @@ test_expect_success 'rev-list --branches=subspace' '\n \n test_expect_success 'rev-list --branches' '\n \n-\tcompare rev-list \"master subspace-x someref other/three subspace/one subspace/two\" \"--branches\"\n+\tcompare rev-list \"main subspace-x someref other/three subspace/one subspace/two\" \"--branches\"\n \n '\n \n-test_expect_success 'rev-list --glob=heads/someref/* master' '\n+test_expect_success 'rev-list --glob=heads/someref/* main' '\n \n-\tcompare rev-list \"master\" \"--glob=heads/someref/* master\"\n+\tcompare rev-list \"main\" \"--glob=heads/someref/* main\"\n \n '\n \n@@ -290,7 +290,7 @@ test_expect_success 'rev-list --glob=heads/subspace/* --glob=heads/other/*' '\n \n test_expect_success 'rev-list --glob=heads/*' '\n \n-\tcompare rev-list \"master other/three someref subspace-x subspace/one subspace/two\" \"--glob=heads/*\"\n+\tcompare rev-list \"main other/three someref subspace-x subspace/one subspace/two\" \"--glob=heads/*\"\n \n '\n \n@@ -313,7 +313,7 @@ test_expect_success 'rev-list --remotes=foo' '\n '\n \n test_expect_success 'rev-list --exclude with --branches' '\n-\tcompare rev-list \"--exclude=*/* --branches\" \"master someref subspace-x\"\n+\tcompare rev-list \"--exclude=*/* --branches\" \"main someref subspace-x\"\n '\n \n test_expect_success 'rev-list --exclude with --all' '\n@@ -357,13 +357,13 @@ test_expect_success 'shortlog accepts --glob/--tags/--remotes' '\n \n \tcompare shortlog \"subspace/one subspace/two\" --branches=subspace &&\n \tcompare shortlog \\\n-\t  \"master subspace-x someref other/three subspace/one subspace/two\" \\\n+\t  \"main subspace-x someref other/three subspace/one subspace/two\" \\\n \t  --branches &&\n-\tcompare shortlog master \"--glob=heads/someref/* master\" &&\n+\tcompare shortlog main \"--glob=heads/someref/* main\" &&\n \tcompare shortlog \"subspace/one subspace/two other/three\" \\\n \t  \"--glob=heads/subspace/* --glob=heads/other/*\" &&\n \tcompare shortlog \\\n-\t  \"master other/three someref subspace-x subspace/one subspace/two\" \\\n+\t  \"main other/three someref subspace-x subspace/one subspace/two\" \\\n \t  \"--glob=heads/*\" &&\n \tcompare shortlog foo/bar --tags=foo &&\n \tcompare shortlog \"foo/bar qux/one qux/two qux/x\" --tags &&\n@@ -374,14 +374,14 @@ test_expect_success 'shortlog accepts --glob/--tags/--remotes' '\n test_expect_failure 'shortlog accepts --glob as detached option' '\n \n \tcompare shortlog \\\n-\t  \"master other/three someref subspace-x subspace/one subspace/two\" \\\n+\t  \"main other/three someref subspace-x subspace/one subspace/two\" \\\n \t  \"--glob heads/*\"\n \n '\n \n test_expect_failure 'shortlog --glob is not confused by option-like argument' '\n \n-\tcompare shortlog master \"--glob -e master\"\n+\tcompare shortlog main \"--glob -e main\"\n \n '\n \ndiff --git a/t/t6019-rev-list-ancestry-path.sh b/t/t6019-rev-list-ancestry-path.sh\nindex aeb7defaa3..20adbece65 100755\n--- a/t/t6019-rev-list-ancestry-path.sh\n+++ b/t/t6019-rev-list-ancestry-path.sh\n@@ -21,7 +21,7 @@ test_description='--ancestry-path'\n #  --ancestry-path G..M -- G.t == L\n #  --ancestry-path --simplify-merges G^..M -- G.t == G L\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -131,15 +131,15 @@ test_expect_success 'setup criss-cross' '\n \t(cd criss-cross &&\n \t git init &&\n \t test_commit A &&\n-\t git checkout -b xb master &&\n+\t git checkout -b xb main &&\n \t test_commit B &&\n-\t git checkout -b xc master &&\n+\t git checkout -b xc main &&\n \t test_commit C &&\n \t git checkout -b xbc xb -- &&\n \t git merge xc &&\n \t git checkout -b xcb xc -- &&\n \t git merge xb &&\n-\t git checkout master)\n+\t git checkout main)\n '\n \n # no commits in bc descend from cb\ndiff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh\nindex 7dc65c73cd..f954f0e669 100755\n--- a/t/t6030-bisect-porcelain.sh\n+++ b/t/t6030-bisect-porcelain.sh\n@@ -6,7 +6,7 @@ test_description='Tests git bisect functionality'\n \n exec </dev/null\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -92,9 +92,9 @@ test_expect_success 'bisect start without -- takes unknown arg as pathspec' '\n \tgrep bar \".git/BISECT_NAMES\"\n '\n \n-test_expect_success 'bisect reset: back in the master branch' '\n+test_expect_success 'bisect reset: back in the main branch' '\n \tgit bisect reset &&\n-\techo \"* master\" > branch.expect &&\n+\techo \"* main\" > branch.expect &&\n \tgit branch > branch.output &&\n \tcmp branch.expect branch.output\n '\n@@ -105,7 +105,7 @@ test_expect_success 'bisect reset: back in another branch' '\n \tgit bisect good $HASH1 &&\n \tgit bisect bad $HASH3 &&\n \tgit bisect reset &&\n-\techo \"  master\" > branch.expect &&\n+\techo \"  main\" > branch.expect &&\n \techo \"* other\" >> branch.expect &&\n \tgit branch > branch.output &&\n \tcmp branch.expect branch.output\n@@ -351,7 +351,7 @@ test_expect_success 'bisect skip many ranges' '\n \n test_expect_success 'bisect starting with a detached HEAD' '\n \tgit bisect reset &&\n-\tgit checkout master^ &&\n+\tgit checkout main^ &&\n \tHEAD=$(git rev-parse --verify HEAD) &&\n \tgit bisect start &&\n \ttest $HEAD = $(cat .git/BISECT_START) &&\n@@ -719,7 +719,7 @@ test_expect_success 'bisect: --no-checkout - target after breakage' '\n test_expect_success 'bisect: demonstrate identification of damage boundary' \"\n \tgit bisect reset &&\n \tgit checkout broken &&\n-\tgit bisect start broken master --no-checkout &&\n+\tgit bisect start broken main --no-checkout &&\n \ttest_must_fail git bisect run \\\"\\$SHELL_PATH\\\" -c '\n \t\tGOOD=\\$(git for-each-ref \\\"--format=%(objectname)\\\" refs/bisect/good-*) &&\n \t\tgit rev-list --objects BISECT_HEAD --not \\$GOOD >tmp.\\$\\$ &&\ndiff --git a/t/t6040-tracking-info.sh b/t/t6040-tracking-info.sh\nindex bc95ff6f54..a160b2bf99 100755\n--- a/t/t6040-tracking-info.sh\n+++ b/t/t6040-tracking-info.sh\n@@ -2,7 +2,7 @@\n \n test_description='remote tracking stats'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -37,7 +37,7 @@ test_expect_success setup '\n \t\tgit branch -d brokenbase &&\n \t\tgit checkout -b b6 origin\n \t) &&\n-\tgit checkout -b follower --track master &&\n+\tgit checkout -b follower --track main &&\n \tadvance h\n '\n \n@@ -61,12 +61,12 @@ test_expect_success 'branch -v' '\n '\n \n cat >expect <<\\EOF\n-b1 [origin/master: ahead 1, behind 1] d\n-b2 [origin/master: ahead 1, behind 1] d\n-b3 [origin/master: behind 1] b\n-b4 [origin/master: ahead 2] f\n+b1 [origin/main: ahead 1, behind 1] d\n+b2 [origin/main: ahead 1, behind 1] d\n+b3 [origin/main: behind 1] b\n+b4 [origin/main: ahead 2] f\n b5 [brokenbase: gone] g\n-b6 [origin/master] c\n+b6 [origin/main] c\n EOF\n \n test_expect_success 'branch -vv' '\n@@ -86,7 +86,7 @@ test_expect_success 'checkout (diverged from upstream)' '\n '\n \n test_expect_success 'checkout with local tracked branch' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit checkout follower >actual &&\n \ttest_i18ngrep \"is ahead of\" actual\n '\n@@ -103,7 +103,7 @@ test_expect_success 'checkout (up-to-date with upstream)' '\n \t(\n \t\tcd test && git checkout b6\n \t) >actual &&\n-\ttest_i18ngrep \"Your branch is up to date with .origin/master\" actual\n+\ttest_i18ngrep \"Your branch is up to date with .origin/main\" actual\n '\n \n test_expect_success 'status (diverged from upstream)' '\n@@ -133,11 +133,11 @@ test_expect_success 'status (up-to-date with upstream)' '\n \t\t# reports nothing to commit\n \t\ttest_must_fail git commit --dry-run\n \t) >actual &&\n-\ttest_i18ngrep \"Your branch is up to date with .origin/master\" actual\n+\ttest_i18ngrep \"Your branch is up to date with .origin/main\" actual\n '\n \n cat >expect <<\\EOF\n-## b1...origin/master [ahead 1, behind 1]\n+## b1...origin/main [ahead 1, behind 1]\n EOF\n \n test_expect_success 'status -s -b (diverged from upstream)' '\n@@ -150,7 +150,7 @@ test_expect_success 'status -s -b (diverged from upstream)' '\n '\n \n cat >expect <<\\EOF\n-## b1...origin/master [different]\n+## b1...origin/main [different]\n EOF\n \n test_expect_success 'status -s -b --no-ahead-behind (diverged from upstream)' '\n@@ -163,7 +163,7 @@ test_expect_success 'status -s -b --no-ahead-behind (diverged from upstream)' '\n '\n \n cat >expect <<\\EOF\n-## b1...origin/master [different]\n+## b1...origin/main [different]\n EOF\n \n test_expect_success 'status.aheadbehind=false status -s -b (diverged from upstream)' '\n@@ -177,7 +177,7 @@ test_expect_success 'status.aheadbehind=false status -s -b (diverged from upstre\n \n cat >expect <<\\EOF\n On branch b1\n-Your branch and 'origin/master' have diverged,\n+Your branch and 'origin/main' have diverged,\n and have 1 and 1 different commits each, respectively.\n EOF\n \n@@ -201,7 +201,7 @@ test_expect_success 'status --long --branch' '\n \n cat >expect <<\\EOF\n On branch b1\n-Your branch and 'origin/master' refer to different commits.\n+Your branch and 'origin/main' refer to different commits.\n EOF\n \n test_expect_success 'status --long --branch --no-ahead-behind' '\n@@ -236,7 +236,7 @@ test_expect_success 'status -s -b (upstream is gone)' '\n '\n \n cat >expect <<\\EOF\n-## b6...origin/master\n+## b6...origin/main\n EOF\n \n test_expect_success 'status -s -b (up-to-date with upstream)' '\n@@ -249,7 +249,7 @@ test_expect_success 'status -s -b (up-to-date with upstream)' '\n '\n \n test_expect_success 'fail to track lightweight tags' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag light &&\n \ttest_must_fail git branch --track lighttrack light >actual &&\n \ttest_i18ngrep ! \"set up to track\" actual &&\n@@ -257,7 +257,7 @@ test_expect_success 'fail to track lightweight tags' '\n '\n \n test_expect_success 'fail to track annotated tags' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag -m heavy heavy &&\n \ttest_must_fail git branch --track heavytrack heavy >actual &&\n \ttest_i18ngrep ! \"set up to track\" actual &&\n@@ -265,17 +265,17 @@ test_expect_success 'fail to track annotated tags' '\n '\n \n test_expect_success '--set-upstream-to does not change branch' '\n-\tgit branch from-master master &&\n-\tgit branch --set-upstream-to master from-master &&\n-\tgit branch from-topic_2 master &&\n+\tgit branch from-main main &&\n+\tgit branch --set-upstream-to main from-main &&\n+\tgit branch from-topic_2 main &&\n \ttest_must_fail git config branch.from-topic_2.merge > actual &&\n \tgit rev-list from-topic_2 &&\n \tgit update-ref refs/heads/from-topic_2 from-topic_2^ &&\n \tgit rev-parse from-topic_2 >expect2 &&\n-\tgit branch --set-upstream-to master from-topic_2 &&\n-\tgit config branch.from-master.merge > actual &&\n+\tgit branch --set-upstream-to main from-topic_2 &&\n+\tgit config branch.from-main.merge > actual &&\n \tgit rev-parse from-topic_2 >actual2 &&\n-\tgrep -q \"^refs/heads/master$\" actual &&\n+\tgrep -q \"^refs/heads/main$\" actual &&\n \tcmp expect2 actual2\n '\n \n@@ -283,11 +283,11 @@ test_expect_success '--set-upstream-to @{-1}' '\n \tgit checkout follower &&\n \tgit checkout from-topic_2 &&\n \tgit config branch.from-topic_2.merge > expect2 &&\n-\tgit branch --set-upstream-to @{-1} from-master &&\n-\tgit config branch.from-master.merge > actual &&\n+\tgit branch --set-upstream-to @{-1} from-main &&\n+\tgit config branch.from-main.merge > actual &&\n \tgit config branch.from-topic_2.merge > actual2 &&\n-\tgit branch --set-upstream-to follower from-master &&\n-\tgit config branch.from-master.merge > expect &&\n+\tgit branch --set-upstream-to follower from-main &&\n+\tgit config branch.from-main.merge > expect &&\n \ttest_cmp expect2 actual2 &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t6050-replace.sh b/t/t6050-replace.sh\nindex 0a53462a61..93c08b1999 100755\n--- a/t/t6050-replace.sh\n+++ b/t/t6050-replace.sh\n@@ -4,7 +4,7 @@\n #\n test_description='Tests replace refs functionality'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -136,9 +136,9 @@ test_expect_success 'tag replaced commit' '\n '\n \n test_expect_success '\"git fsck\" works' '\n-     git fsck master >fsck_master.out &&\n-     test_i18ngrep \"dangling commit $R\" fsck_master.out &&\n-     test_i18ngrep \"dangling tag $(git show-ref -s refs/tags/mytag)\" fsck_master.out &&\n+     git fsck main >fsck_main.out &&\n+     test_i18ngrep \"dangling commit $R\" fsck_main.out &&\n+     test_i18ngrep \"dangling tag $(git show-ref -s refs/tags/mytag)\" fsck_main.out &&\n      test -z \"$(git fsck)\"\n '\n \n@@ -221,7 +221,7 @@ test_expect_success 'create parallel branch without the bug' '\n      git cherry-pick $HASH6 &&\n      PARA6=$(git rev-parse --verify HEAD) &&\n      git replace $HASH6 $PARA6 &&\n-     git checkout master &&\n+     git checkout main &&\n      cur=$(git rev-parse --verify HEAD) &&\n      test \"$cur\" = \"$HASH7\" &&\n      git log --pretty=oneline | grep $PARA2 &&\n@@ -464,7 +464,7 @@ test_expect_success GPG 'set up a merge commit with a mergetag' '\n \tgit commit -m \"hello: 2 more lines from a test branch\" &&\n \tHASH9=$(git rev-parse --verify HEAD) &&\n \tgit tag -s -m \"tag for testing with a mergetag\" test_tag HEAD &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge -s ours test_tag &&\n \tHASH10=$(git rev-parse --verify HEAD) &&\n \tgit cat-file commit $HASH10 | grep \"^mergetag object\"\ndiff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh\nindex 19a56f4a4d..78b5851780 100755\n--- a/t/t6101-rev-parse-parents.sh\n+++ b/t/t6101-rev-parse-parents.sh\n@@ -5,7 +5,7 @@\n \n test_description='Test git rev-parse with different parent options'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -21,7 +21,7 @@ test_expect_success 'setup' '\n \ttest_commit second &&\n \tgit checkout --orphan tmp &&\n \ttest_commit start2 &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit merge -m next --allow-unrelated-histories start2 &&\n \ttest_commit final &&\n \ndiff --git a/t/t6110-rev-list-sparse.sh b/t/t6110-rev-list-sparse.sh\nindex 69411862d6..13c1da5352 100755\n--- a/t/t6110-rev-list-sparse.sh\n+++ b/t/t6110-rev-list-sparse.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n test_description='operations that cull histories in unusual ways'\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -13,7 +13,7 @@ test_expect_success setup '\n \tgit checkout -b side HEAD^ &&\n \ttest_commit D &&\n \ttest_commit E &&\n-\tgit merge master\n+\tgit merge main\n '\n \n test_expect_success 'rev-list --first-parent --boundary' '\ndiff --git a/t/t6111-rev-list-treesame.sh b/t/t6111-rev-list-treesame.sh\nindex 58b8d42bf3..e07b6070e0 100755\n--- a/t/t6111-rev-list-treesame.sh\n+++ b/t/t6111-rev-list-treesame.sh\n@@ -13,7 +13,7 @@\n \n test_description='TREESAME and limiting'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -36,13 +36,13 @@ test_expect_success setup '\n \tgit checkout other-branch &&\n \ttest_commit \"Added other\" other \"Hello\" C &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_merge D other-branch &&\n \n \tgit checkout third-branch &&\n \ttest_commit \"Third file\" third \"Nothing\" E &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_commit \"file=Blah\" file \"Blah\" F &&\n \n \ttest_tick && git merge --no-commit third-branch &&\n@@ -59,7 +59,7 @@ test_expect_success setup '\n \n \ttest_tick && git revert I && note J &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick && git merge --no-ff fiddler-branch &&\n \tnote K &&\n \ndiff --git a/t/t6112-rev-list-filters-objects.sh b/t/t6112-rev-list-filters-objects.sh\nindex 5f39c3adb3..31457d13b9 100755\n--- a/t/t6112-rev-list-filters-objects.sh\n+++ b/t/t6112-rev-list-filters-objects.sh\n@@ -2,7 +2,7 @@\n \n test_description='git rev-list using object filtering'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -226,7 +226,7 @@ test_expect_success 'verify sparse:oid=oid-ish omits top-level files' '\n \tsort >expected &&\n \n \tgit -C r3 rev-list --quiet --objects --filter-print-omitted \\\n-\t\t--filter=sparse:oid=master:pattern HEAD >revs &&\n+\t\t--filter=sparse:oid=main:pattern HEAD >revs &&\n \tawk -f print_1.awk revs |\n \tsed \"s/~//\" |\n \tsort >observed &&\n@@ -439,7 +439,7 @@ test_expect_success 'add sparse pattern blobs whose paths have reserved chars' '\n \n test_expect_success 'combine:... with more than two sub-filters' '\n \tgit -C r3 rev-list --objects \\\n-\t\t--filter=combine:tree:3+blob:limit=40+sparse:oid=master:pattern \\\n+\t\t--filter=combine:tree:3+blob:limit=40+sparse:oid=main:pattern \\\n \t\tHEAD >actual &&\n \n \texpect_has HEAD \"\" &&\n@@ -457,7 +457,7 @@ test_expect_success 'combine:... with more than two sub-filters' '\n \tcp actual expect &&\n \n \tgit -C r3 rev-list --objects \\\n-\t\t--filter=combine:tree:3+blob:limit=40+sparse:oid=master:pattern1%2brenamed%25 \\\n+\t\t--filter=combine:tree:3+blob:limit=40+sparse:oid=main:pattern1%2brenamed%25 \\\n \t\tHEAD >actual &&\n \ttest_cmp expect actual &&\n \n@@ -467,23 +467,23 @@ test_expect_success 'combine:... with more than two sub-filters' '\n \ttest_when_finished \"rm -f trace1\" &&\n \tGIT_TRACE=$(pwd)/trace1 git -C r3 rev-list --objects \\\n \t\t--filter=tree:3 --filter=blob:limit=40 \\\n-\t\t--filter=sparse:oid=\"master:p;at%ter+n\" \\\n+\t\t--filter=sparse:oid=\"main:p;at%ter+n\" \\\n \t\tHEAD >actual &&\n \n \ttest_cmp expect actual &&\n-\tgrep \"Add to combine filter-spec: sparse:oid=master:p%3bat%25ter%2bn\" \\\n+\tgrep \"Add to combine filter-spec: sparse:oid=main:p%3bat%25ter%2bn\" \\\n \t\ttrace1 &&\n \n \t# Repeat the above test, but this time, the characters to encode are in\n \t# the LHS of the combined filter.\n \ttest_when_finished \"rm -f trace2\" &&\n \tGIT_TRACE=$(pwd)/trace2 git -C r3 rev-list --objects \\\n-\t\t--filter=sparse:oid=master:^~pattern \\\n+\t\t--filter=sparse:oid=main:^~pattern \\\n \t\t--filter=tree:3 --filter=blob:limit=40 \\\n \t\tHEAD >actual &&\n \n \ttest_cmp expect actual &&\n-\tgrep \"Add to combine filter-spec: sparse:oid=master:%5e%7epattern\" \\\n+\tgrep \"Add to combine filter-spec: sparse:oid=main:%5e%7epattern\" \\\n \t\ttrace2\n '\n \ndiff --git a/t/t6120-describe.sh b/t/t6120-describe.sh\nindex 360e65d3b9..546796f847 100755\n--- a/t/t6120-describe.sh\n+++ b/t/t6120-describe.sh\n@@ -11,7 +11,7 @@ test_description='test describe'\n #\n # First parent of a merge commit is on the same line, second parent below.\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -105,7 +105,7 @@ check_describe c-* --tags HEAD^^2\n check_describe B --tags HEAD^^2^\n check_describe e --tags HEAD^^^\n \n-check_describe heads/master --all HEAD\n+check_describe heads/main --all HEAD\n check_describe tags/c-* --all HEAD^\n check_describe tags/e --all HEAD^^^\n \n@@ -406,15 +406,15 @@ test_expect_success ULIMIT_STACK_SIZE 'name-rev works in a deep repo' '\n \ti=1 &&\n \twhile test $i -lt 8000\n \tdo\n-\t\techo \"commit refs/heads/master\n+\t\techo \"commit refs/heads/main\n committer A U Thor <author@example.com> $((1000000000 + $i * 100)) +0200\n data <<EOF\n commit #$i\n EOF\"\n-\t\ttest $i = 1 && echo \"from refs/heads/master^0\"\n+\t\ttest $i = 1 && echo \"from refs/heads/main^0\"\n \t\ti=$(($i + 1))\n \tdone | git fast-import &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit tag far-far-away HEAD^ &&\n \techo \"HEAD~4000 tags/far-far-away~3999\" >expect &&\n \tgit name-rev HEAD~4000 >actual &&\n@@ -445,7 +445,7 @@ test_expect_success 'describe complains about missing object' '\n '\n \n test_expect_success 'name-rev a rev shortly after epoch' '\n-\ttest_when_finished \"git checkout master\" &&\n+\ttest_when_finished \"git checkout main\" &&\n \n \tgit checkout --orphan no-timestamp-underflow &&\n \t# Any date closer to epoch than the CUTOFF_DATE_SLOP constant\n@@ -459,7 +459,7 @@ test_expect_success 'name-rev a rev shortly after epoch' '\n \ttest_cmp expect actual\n '\n \n-# A--------------master\n+# A--------------main\n #  \\            /\n #   \\----------M2\n #    \\        /\n@@ -490,10 +490,10 @@ test_expect_success 'name-rev covers all conditions while looking at parents' '\n \t\tgit checkout $A &&\n \t\tgit merge --no-ff HEAD@{1} && # M2\n \n-\t\tgit checkout master &&\n+\t\tgit checkout main &&\n \t\tgit merge --no-ff HEAD@{1} &&\n \n-\t\techo \"$B master^2^2~1^2\" >expect &&\n+\t\techo \"$B main^2^2~1^2\" >expect &&\n \t\tgit name-rev $B >actual &&\n \n \t\ttest_cmp expect actual\n@@ -519,7 +519,7 @@ test_expect_success 'describe commits with disjoint bases' '\n \t\tgit checkout --orphan branch && rm file &&\n \t\techo B > file2 && git add file2 && git commit -m B &&\n \t\tgit tag B -a -m B &&\n-\t\tgit merge --no-ff --allow-unrelated-histories master -m x &&\n+\t\tgit merge --no-ff --allow-unrelated-histories main -m x &&\n \n \t\tcheck_describe \"A-3-*\" HEAD\n \t)\n@@ -545,7 +545,7 @@ test_expect_success 'describe commits with disjoint bases 2' '\n \t\techo o >> file2 && git add file2 && GIT_COMMITTER_DATE=\"2020-01-01 15:01\" git commit -m o &&\n \t\techo B >> file2 && git add file2 && GIT_COMMITTER_DATE=\"2020-01-01 15:02\" git commit -m B &&\n \t\tgit tag B -a -m B &&\n-\t\tgit merge --no-ff --allow-unrelated-histories master -m x &&\n+\t\tgit merge --no-ff --allow-unrelated-histories main -m x &&\n \n \t\tcheck_describe \"B-3-*\" HEAD\n \t)\ndiff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh\nindex 725b356d1e..44f55d93fe 100755\n--- a/t/t6200-fmt-merge-msg.sh\n+++ b/t/t6200-fmt-merge-msg.sh\n@@ -5,7 +5,7 @@\n \n test_description='fmt-merge-msg test'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -84,7 +84,7 @@ test_expect_success GPG 'set up a signed tag' '\n test_expect_success 'message for merging local branch' '\n \techo \"Merge branch ${apos}left${apos}\" >expected &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch . left &&\n \n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n@@ -92,7 +92,7 @@ test_expect_success 'message for merging local branch' '\n '\n \n test_expect_success GPG 'message for merging local tag signed by good key' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch . signed-good-tag &&\n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&\n \tgrep \"^Merge tag ${apos}signed-good-tag${apos}\" actual &&\n@@ -101,7 +101,7 @@ test_expect_success GPG 'message for merging local tag signed by good key' '\n '\n \n test_expect_success GPG 'message for merging local tag signed by unknown key' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch . signed-good-tag &&\n \tGNUPGHOME=. git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&\n \tgrep \"^Merge tag ${apos}signed-good-tag${apos}\" actual &&\n@@ -112,7 +112,7 @@ test_expect_success GPG 'message for merging local tag signed by unknown key' '\n test_expect_success 'message for merging external branch' '\n \techo \"Merge branch ${apos}left${apos} of $(pwd)\" >expected &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch \"$(pwd)\" left &&\n \n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n@@ -136,7 +136,7 @@ test_expect_success '[merge] summary/log configuration' '\n \ttest_config merge.log true &&\n \ttest_unconfig merge.summary &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left &&\n \n@@ -145,7 +145,7 @@ test_expect_success '[merge] summary/log configuration' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary true &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left &&\n \n@@ -156,7 +156,7 @@ test_expect_success '[merge] summary/log configuration' '\n '\n \n test_expect_success 'setup FETCH_HEAD' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left\n '\n@@ -284,7 +284,7 @@ test_expect_success 'fmt-merge-msg -m' '\n \n \ttest_unconfig merge.log &&\n \ttest_unconfig merge.summary &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch \"$(pwd)\" left &&\n \tgit fmt-merge-msg -m \"Sync with left\" <.git/FETCH_HEAD >actual &&\n \tgit fmt-merge-msg --log -m \"Sync with left\" \\\n@@ -326,28 +326,28 @@ test_expect_success 'setup: expected shortlog for two branches' '\n test_expect_success 'shortlog for two branches' '\n \ttest_config merge.log true &&\n \ttest_unconfig merge.summary &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual1 &&\n \n \ttest_unconfig merge.log &&\n \ttest_config merge.summary true &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual2 &&\n \n \ttest_config merge.log yes &&\n \ttest_unconfig merge.summary &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual3 &&\n \n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual4 &&\n@@ -361,7 +361,7 @@ test_expect_success 'shortlog for two branches' '\n test_expect_success 'merge-msg -F' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tgit fmt-merge-msg -F .git/FETCH_HEAD >actual &&\n@@ -371,7 +371,7 @@ test_expect_success 'merge-msg -F' '\n test_expect_success 'merge-msg -F in subdirectory' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . left right &&\n \tmkdir sub &&\n@@ -411,7 +411,7 @@ test_expect_success 'merge-msg tag' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . tag tag-r3 &&\n \n@@ -441,7 +441,7 @@ test_expect_success 'merge-msg two tags' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . tag tag-r3 tag tag-l5 &&\n \n@@ -471,7 +471,7 @@ test_expect_success 'merge-msg tag and branch' '\n \ttest_unconfig merge.log &&\n \ttest_config merge.summary yes &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . tag tag-r3 left &&\n \n@@ -498,7 +498,7 @@ test_expect_success 'merge-msg lots of commits' '\n \n \ttest_config merge.summary yes &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_tick &&\n \tgit fetch . long &&\n \n@@ -509,11 +509,11 @@ test_expect_success 'merge-msg lots of commits' '\n test_expect_success 'merge-msg with \"merging\" an annotated tag' '\n \ttest_config merge.log true &&\n \n-\tgit checkout master^0 &&\n+\tgit checkout main^0 &&\n \tgit commit --allow-empty -m \"One step ahead\" &&\n \tgit tag -a -m \"An annotated one\" annote HEAD &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch . annote &&\n \n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n@@ -546,23 +546,23 @@ test_expect_success 'merge-msg with \"merging\" an annotated tag' '\n '\n \n test_expect_success 'merge.suppressDest configuration' '\n-\tgit checkout -B side master &&\n+\tgit checkout -B side main &&\n \tgit commit --allow-empty -m \"One step ahead\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit fetch . side &&\n \n \tgit -c merge.suppressDest=\"\" fmt-merge-msg <.git/FETCH_HEAD >full.1 &&\n \thead -n1 full.1 >actual &&\n-\tgrep -e \"Merge branch .side. into master\" actual &&\n+\tgrep -e \"Merge branch .side. into main\" actual &&\n \n \tgit -c merge.suppressDest=\"mast\" fmt-merge-msg <.git/FETCH_HEAD >full.2 &&\n \thead -n1 full.2 >actual &&\n-\tgrep -e \"Merge branch .side. into master$\" actual &&\n+\tgrep -e \"Merge branch .side. into main$\" actual &&\n \n \tgit -c merge.suppressDest=\"ma?*[rn]\" fmt-merge-msg <.git/FETCH_HEAD >full.3 &&\n \thead -n1 full.3 >actual &&\n \tgrep -e \"Merge branch .side.\" actual &&\n-\t! grep -e \" into master$\" actual\n+\t! grep -e \" into main$\" actual\n '\n \n test_done\ndiff --git a/t/t6302-for-each-ref-filter.sh b/t/t6302-for-each-ref-filter.sh\nindex 0f3e6aa011..e5833af528 100755\n--- a/t/t6302-for-each-ref-filter.sh\n+++ b/t/t6302-for-each-ref-filter.sh\n@@ -2,7 +2,7 @@\n \n test_description='test for-each-refs usage of ref-filter APIs'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -29,17 +29,17 @@ test_expect_success 'setup some history and refs' '\n \tgit tag $sign -m \"A signed tag\" signed-tag &&\n \tgit tag $sign -m \"Signed doubly\" doubly-signed-tag signed-tag &&\n \n-\tgit checkout master &&\n-\tgit update-ref refs/odd/spot master\n+\tgit checkout main &&\n+\tgit update-ref refs/odd/spot main\n '\n \n test_expect_success 'filtering with --points-at' '\n \tcat >expect <<-\\EOF &&\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/odd/spot\n \trefs/tags/three\n \tEOF\n-\tgit for-each-ref --format=\"%(refname)\" --points-at=master >actual &&\n+\tgit for-each-ref --format=\"%(refname)\" --points-at=main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -56,13 +56,13 @@ test_expect_success 'check signed tags with --points-at' '\n \n test_expect_success 'filtering with --merged' '\n \tcat >expect <<-\\EOF &&\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/odd/spot\n \trefs/tags/one\n \trefs/tags/three\n \trefs/tags/two\n \tEOF\n-\tgit for-each-ref --format=\"%(refname)\" --merged=master >actual &&\n+\tgit for-each-ref --format=\"%(refname)\" --merged=main >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -75,13 +75,13 @@ test_expect_success 'filtering with --no-merged' '\n \trefs/tags/four\n \trefs/tags/signed-tag\n \tEOF\n-\tgit for-each-ref --format=\"%(refname)\" --no-merged=master >actual &&\n+\tgit for-each-ref --format=\"%(refname)\" --no-merged=main >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'filtering with --contains' '\n \tcat >expect <<-\\EOF &&\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/heads/side\n \trefs/odd/spot\n \trefs/tags/annotated-tag\n@@ -254,7 +254,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'nested alignment with quote formatt\n \n test_expect_success 'check `%(contents:lines=1)`' '\n \tcat >expect <<-\\EOF &&\n-\tmaster |three\n+\tmain |three\n \tside |four\n \todd/spot |three\n \tannotated-tag |An annotated tag\n@@ -272,7 +272,7 @@ test_expect_success 'check `%(contents:lines=1)`' '\n \n test_expect_success 'check `%(contents:lines=0)`' '\n \tcat >expect <<-\\EOF &&\n-\tmaster |\n+\tmain |\n \tside |\n \todd/spot |\n \tannotated-tag |\n@@ -290,7 +290,7 @@ test_expect_success 'check `%(contents:lines=0)`' '\n \n test_expect_success 'check `%(contents:lines=99999)`' '\n \tcat >expect <<-\\EOF &&\n-\tmaster |three\n+\tmain |three\n \tside |four\n \todd/spot |three\n \tannotated-tag |An annotated tag\n@@ -363,7 +363,7 @@ test_expect_success 'improper usage of %(if), %(then), %(else) and %(end) atoms'\n test_expect_success 'check %(if)...%(then)...%(end) atoms' '\n \tgit for-each-ref --format=\"%(refname)%(if)%(authorname)%(then) Author: %(authorname)%(end)\" >actual &&\n \tcat >expect <<-\\EOF &&\n-\trefs/heads/master Author: A U Thor\n+\trefs/heads/main Author: A U Thor\n \trefs/heads/side Author: A U Thor\n \trefs/odd/spot Author: A U Thor\n \trefs/tags/annotated-tag\n@@ -384,7 +384,7 @@ test_expect_success 'check %(if)...%(then)...%(end) atoms' '\n test_expect_success 'check %(if)...%(then)...%(else)...%(end) atoms' '\n \tgit for-each-ref --format=\"%(if)%(authorname)%(then)%(authorname)%(else)No author%(end): %(refname)\" >actual &&\n \tcat >expect <<-\\EOF &&\n-\tA U Thor: refs/heads/master\n+\tA U Thor: refs/heads/main\n \tA U Thor: refs/heads/side\n \tA U Thor: refs/odd/spot\n \tNo author: refs/tags/annotated-tag\n@@ -404,7 +404,7 @@ test_expect_success 'check %(if)...%(then)...%(else)...%(end) atoms' '\n test_expect_success 'ignore spaces in %(if) atom usage' '\n \tgit for-each-ref --format=\"%(refname:short): %(if)%(HEAD)%(then)Head ref%(else)Not Head ref%(end)\" >actual &&\n \tcat >expect <<-\\EOF &&\n-\tmaster: Head ref\n+\tmain: Head ref\n \tside: Not Head ref\n \todd/spot: Not Head ref\n \tannotated-tag: Not Head ref\n@@ -423,19 +423,19 @@ test_expect_success 'ignore spaces in %(if) atom usage' '\n '\n \n test_expect_success 'check %(if:equals=<string>)' '\n-\tgit for-each-ref --format=\"%(if:equals=master)%(refname:short)%(then)Found master%(else)Not master%(end)\" refs/heads/ >actual &&\n+\tgit for-each-ref --format=\"%(if:equals=main)%(refname:short)%(then)Found main%(else)Not main%(end)\" refs/heads/ >actual &&\n \tcat >expect <<-\\EOF &&\n-\tFound master\n-\tNot master\n+\tFound main\n+\tNot main\n \tEOF\n \ttest_cmp expect actual\n '\n \n test_expect_success 'check %(if:notequals=<string>)' '\n-\tgit for-each-ref --format=\"%(if:notequals=master)%(refname:short)%(then)Not master%(else)Found master%(end)\" refs/heads/ >actual &&\n+\tgit for-each-ref --format=\"%(if:notequals=main)%(refname:short)%(then)Not main%(else)Found main%(end)\" refs/heads/ >actual &&\n \tcat >expect <<-\\EOF &&\n-\tFound master\n-\tNot master\n+\tFound main\n+\tNot main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -446,11 +446,11 @@ test_expect_success '--merged is compatible with --no-merged' '\n \n test_expect_success 'validate worktree atom' '\n \tcat >expect <<-EOF &&\n-\tmaster: $(pwd)\n-\tmaster_worktree: $(pwd)/worktree_dir\n+\tmain: $(pwd)\n+\tmain_worktree: $(pwd)/worktree_dir\n \tside: not checked out\n \tEOF\n-\tgit worktree add -b master_worktree worktree_dir master &&\n+\tgit worktree add -b main_worktree worktree_dir main &&\n \tgit for-each-ref --format=\"%(refname:short): %(if)%(worktreepath)%(then)%(worktreepath)%(else)not checked out%(end)\" refs/heads/ >actual &&\n \trm -r worktree_dir &&\n \tgit worktree prune &&\n-- \ngitgitgadget\n\n"},{"id":"410305","messageId":"1389dabc-33c9-1e65-a3de-43729a6c2e70@iee.email","threadId":"54633","inReplyTo":"xmqqv9e34mq5.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.email","sentAt":"2020-11-18T23:45:37Z","receivedAt":"2020-11-18T23:45:44Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"On 17/11/2020 22:55, Junio C Hamano wrote:\n>  I personally\n> do not like the word 'main' used as such, but the rest of the world\n> seems to be moving in that direction,\n\nI feel that 'main' is rather a rather dull and boring sort of word.\n\nIn that sense, it could be useful as the fall back for those who haven't\nyet got a clear view of what they want to call their first born. So I\nsort of support both views.\n\nAn alternative in the other direction is to go with the 'not currently\non any branch' (detached at nowhere) but then require users to\ndeliberately create their first branch with their chosen name. This\nmoves the 'backward incompatibility' to a different place, which may be\neasier to manage.\n--\nPhilip\n"},{"id":"410314","messageId":"nycvar.QRO.7.76.6.2011190044100.56@tvgsbejvaqbjf.bet","threadId":"54633","inReplyTo":"20201118114834.11137-1-avarab@gmail.com","subject":"Re: [PATCH v2 28/27] tests: run tests omitted by PREPARE_FOR_MAIN_BRANCH","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-18T23:56:20Z","receivedAt":"2020-11-18T23:56:56Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ævar,\n\nOn Wed, 18 Nov 2020, Ævar Arnfjörð Bjarmason wrote:\n\n> Reinstate the test coverage lost due to PREPARE_FOR_MAIN_BRANCH. The\n> remaining impact of that prerequisite was mainly missing coverage from\n> submodule fetches being lost[1], e.g. impacting my in-flight\n> ab/retire-parse-remote. Now the prerequisite is effectively a\n> noop. This goes on top of [2].\n>\n> I'm not removing the PREPARE_FOR_MAIN_BRANCH prerequisite to keep this\n> change small, instead it's now effectively a noop. It can be removed\n> in some later change.\n>\n> The only remaining occurrences in t5526-fetch-submodules.sh can be\n> removed without breakage with:\n>\n>     perl -pi -e 's/PREPARE_FOR_MAIN_BRANCH //g' t/t5526-fetch-submodules.sh\n>\n> Which at this point leaves only the now-unused prerequisite\n> declaration in test-lib.sh.\n>\n> The coverage in t9902-completion.sh was restored by partially\n> reverting[3]. After that we were left with one test in a mixed\n> state. It setup \"master\" but tested for \"mai\". Change it back to\n> \"mas\", pending a more complete refactoring of that test.\n>\n> This change only conflicts between next..seen by clashing with Peter\n> Kaestle's in-flights submodule fix[4]. Fixing the resulting logic\n> error in t5526-fetch-submodules.sh is trivial, simply:\n>\n>     - compare_refs_in_dir A origin/master B origin/master\n>     + compare_refs_in_dir A origin/main B origin/main\n>\n> 1. 66713e84e7 (\"tests: prepare aligned mentions of the default branch name\", 2020-10-23)\n> 2. https://public-inbox.org/git/pull.762.v2.git.1605629547.gitgitgadget@gmail.com/\n> 3. 8164360fc8 (\"t9902: prepare a test for the upcoming default branch name\", 2020-10-23)\n> 4. https://public-inbox.org/git/1605196853-37359-1-git-send-email-peter.kaestle@nokia.com/\n>\n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n> ---\n\nHmm. I have the feeling that doing this will just delay everything even\nfurther. I had really hoped that we could get this done without \"three\nsteps forward, one step back\" dances.\n\n> On Tue, Nov 17 2020, Johannes Schindelin via GitGitGadget wrote:\n> > To avoid even more conflicts with topics that did not even make it to seen\n> > yet, this patch series specifically excludes t3404, t4013, t5310, t5526,\n> > t6300, t7064, t7817, t9902: in those test scripts, we will still use master\n> > for the time being. Once the topics in question have settled, I will send\n> > the appropriate follow-up patches to adjust them to use main instead.\n>\n> This is not a replacement for that subsequent cleanup, but seems like\n> a simple enough thing to have now to reinstate the missing test\n> coverage.\n>\n> Perhaps there's some topics not in \"seen\" that you have in mind as\n> conflicting, but as noted above the conflict produced here with\n> in-flight in \"seen\" is trivial.\n\nThe conflicts might be trivial, but every conflict makes it harder to\njuggle branch thickets like Junio's `seen`. And those things add up.\nThey're no fun, and they make life hard and tedious.\n\nt5526 conflicts _semantically_ with `pk/subsub-fetch-fix` (which touches\nt5526 and adds a new test case referring to `master`).\n\nt9902 conflicts with `fc/bash-completion-post-2.29`, and in contrast to\nthe t5526 issue (which is trivial, even if it does require manual fixing),\nthe t9902 is a bit more hairy to reason about.\n\nSo yes, I would love to have that test coverage back, but not by making\nthe transition to `main` even harder by reverting parts of it.\n\nThat's why I promised publicly to take care of the loose ends as quickly\nas I can, after the conflicting issues graduate to `next` (or when they\nbecome stalled or even dropped from `seen`).\n\nCiao,\nDscho\n\n>\n> Seems worth having that sooner than later if Junio's willing juggle\n> that.\n>\n>  t/t5526-fetch-submodules.sh | 6 +++---\n>  t/t9902-completion.sh       | 6 +++---\n>  t/test-lib.sh               | 9 +++------\n>  3 files changed, 9 insertions(+), 12 deletions(-)\n>\n> diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh\n> index dd8e423d25..f45ba02b8a 100755\n> --- a/t/t5526-fetch-submodules.sh\n> +++ b/t/t5526-fetch-submodules.sh\n> @@ -481,7 +481,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH \"don't fetch submodule when newly re\n>  \ttest_i18ncmp expect.err actual.err &&\n>  \t(\n>  \t\tcd submodule &&\n> -\t\tgit checkout -q master\n> +\t\tgit checkout -q main\n>  \t)\n>  '\n>\n> @@ -663,9 +663,9 @@ test_expect_success 'fetch new submodule commits on-demand without .gitmodules e\n>  \tgit config -f .gitmodules --remove-section submodule.sub1 &&\n>  \tgit add .gitmodules &&\n>  \tgit commit -m \"delete gitmodules file\" &&\n> -\tgit checkout -B master &&\n> +\tgit checkout -B main &&\n>  \tgit -C downstream fetch &&\n> -\tgit -C downstream checkout origin/master &&\n> +\tgit -C downstream checkout origin/main &&\n>\n>  \tC=$(git -C submodule commit-tree -m \"yet another change outside refs/heads\" HEAD^{tree}) &&\n>  \tgit -C submodule update-ref refs/changes/7 $C &&\n> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\n> index 5c01c75d40..3696b85acb 100755\n> --- a/t/t9902-completion.sh\n> +++ b/t/t9902-completion.sh\n> @@ -1055,13 +1055,13 @@ test_expect_success 'teardown after filtering matching refs' '\n>  \tgit -C otherrepo branch -D matching/branch-in-other\n>  '\n>\n> -test_expect_success PREPARE_FOR_MAIN_BRANCH '__git_refs - for-each-ref format specifiers in prefix' '\n> +test_expect_success '__git_refs - for-each-ref format specifiers in prefix' '\n>  \tcat >expected <<-EOF &&\n>  \tevil-%%-%42-%(refname)..master\n>  \tEOF\n>  \t(\n> -\t\tcur=\"evil-%%-%42-%(refname)..mai\" &&\n> -\t\t__git_refs \"\" \"\" \"evil-%%-%42-%(refname)..\" mai >\"$actual\"\n> +\t\tcur=\"evil-%%-%42-%(refname)..mas\" &&\n> +\t\t__git_refs \"\" \"\" \"evil-%%-%42-%(refname)..\" mas >\"$actual\"\n>  \t) &&\n>  \ttest_cmp expected \"$actual\"\n>  '\n> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> index d39bdf04ce..ed489b2213 100644\n> --- a/t/test-lib.sh\n> +++ b/t/test-lib.sh\n> @@ -257,7 +257,7 @@ case \"$TRASH_DIRECTORY\" in\n>  esac\n>\n>  case \"$TEST_NUMBER\" in\n> -3404|4013|5310|5526|6300|7064|7817|9902)\n> +3404|4013|5310|6300|7064|7817|9902)\n>  \t# Avoid conflicts with patch series that are cooking at the same time\n>  \t# as the patch series changing the default of `init.defaultBranch`.\n>  \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n> @@ -1725,12 +1725,9 @@ test_lazy_prereq REBASE_P '\n>  \ttest -z \"$GIT_TEST_SKIP_REBASE_P\"\n>  '\n>\n> -# Special-purpose prereq for transitioning to a new default branch name:\n> -# Some tests need more than just a mindless (case-preserving) s/master/main/g\n> -# replacement. The non-trivial adjustments are guarded behind this\n> -# prerequisite, acting kind of as a feature flag\n> +# Obsolete, do not use, removed soon!\n>  test_lazy_prereq PREPARE_FOR_MAIN_BRANCH '\n> -\ttest \"$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\" = main\n> +\ttest \"$TEST_NAME\" = \"t5526-fetch-submodules\"\n>  '\n>\n>  # Ensure that no test accidentally triggers a Git command\n> --\n> 2.29.2.222.g5d2a92d10f8\n>\n>\n>\n"},{"id":"410315","messageId":"nycvar.QRO.7.76.6.2011190057370.56@tvgsbejvaqbjf.bet","threadId":"54633","inReplyTo":"1389dabc-33c9-1e65-a3de-43729a6c2e70@iee.email","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-19T00:00:02Z","receivedAt":"2020-11-19T00:00:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Philip,\n\nOn Wed, 18 Nov 2020, Philip Oakley wrote:\n\n> An alternative in the other direction is to go with the 'not currently\n> on any branch' (detached at nowhere) but then require users to\n> deliberately create their first branch with their chosen name. This\n> moves the 'backward incompatibility' to a different place, which may be\n> easier to manage.\n\nIt might be easier to manage for _us_, the Git developers. But every user\nwho initializes a repository and wants to push now needs to take the extra\nstep to give their unnamed branch (\"detached HEAD\" is _still_ confusing\nnew users!!!) a name.\n\nThat would be much more disruptive than choosing a \"rather dull and\nboring\" name instead of a rather racially-charged one.\n\nAnd we promised to try to minimize the disruption to Git users.\n\nCiao,\nDscho\n"},{"id":"410318","messageId":"d81da6b9-02ee-dd38-3c94-3509f5e3cbf4@iee.email","threadId":"54633","inReplyTo":"nycvar.QRO.7.76.6.2011190057370.56@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.email","sentAt":"2020-11-19T00:30:18Z","receivedAt":"2020-11-19T00:30:45Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"Hi Dscho,\n\nOn 19/11/2020 00:00, Johannes Schindelin wrote:\n> Hi Philip,\n>\n> On Wed, 18 Nov 2020, Philip Oakley wrote:\n>\n>> An alternative in the other direction is to go with the 'not currently\n>> on any branch' (detached at nowhere) but then require users to\n>> deliberately create their first branch with their chosen name. This\n>> moves the 'backward incompatibility' to a different place, which may be\n>> easier to manage.\n> It might be easier to manage for _us_, the Git developers. But every user\n> who initializes a repository and wants to push now\n\nIs this 'emerges fully formed' initialise & push  really that common.\n\nI'd be expecting a few add & commits prior to the push, so plenty of\ntime for deciding and creating the chosen branch. At least that was the\nthought process...\n\n>  needs to take the extra\n> step to give their unnamed branch\n\n>  (\"detached HEAD\" is _still_ confusing\n> new users!!!) a name.\nI'd only mentioned the detached head to keep the devs happy ;-) I'm\nquite happy with a \"not on any named branch yet\" type message for normal\nusage.\n\n>\n> That would be much more disruptive than choosing a \"rather dull and\n> boring\" name instead of a rather racially-charged one.\n\"Main\" is fine, but Junio had mention say \"Primary\" as being more\npositive, but that is begging the question for the user. We should let\nthem chose.\n\nHence using the not greatly inspiring 'main' as a starter offering would\nmatch that desire that the user should, ideally, make their own choice. \n>\n> And we promised to try to minimize the disruption to Git users.\n...but we haven't said 'it' is an ignorable issue. There's still a lot\nof old documentation and inertia to overcome.\n>\n> Ciao,\n> Dscho\nPhilip\n"},{"id":"410319","messageId":"CABrPy+HYji9yD4pjYcGpmRq488nSgwEMfqFMOsxbmhO3GaXctA@mail.gmail.com","threadId":"54633","inReplyTo":"nycvar.QRO.7.76.6.2011190057370.56@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Peter Hadlaw","fromEmail":"hadlawp@gmail.com","sentAt":"2020-11-19T00:30:43Z","receivedAt":"2020-11-19T00:31:29Z","isPatch":true,"sender":{"key":"hadlawp@gmail.com","avatar":"https://gravatar.com/avatar/5c112c7b0f8a2f31347a23b3c9461c416c1047e5f47ba5c0c588272c1f3b1cda?d=mp&s=160"},"body":"Hello,\n\nIt's worth noting that the word \"slave\" comes from the en_slav_ement\nof Slavs (the Slavic people of Eastern Europe).\n\nI encourage the whole git team to really think about the changes you are making.\n\nIt was just reported to me that a professional friend of mine had\nconfusion as to why,\nafter initializing a new repository, they couldn't navigate to the\n`master` branch of their repository.\n\nI understand this is back-of-the-napkin type math but stay with me for\none moment.\nI also understand GitHub is not all of git users, but I just pulled\nthe number to help me out here.\n\nIf GitHub has 40 million users but let's say half of them aren't\nactive, so now we are at 20 million.\n(Replace this number with how many actual users of git are out there.)\n\nLet's even say half of them are on board and aware of this \"harmless\"\nchange to a more \"sensitive\" doublespeak representation of the\n\"master\" copy/branch of the repo.\n\nThat leaves us with 10 million users of git that are either unaware or\nare not on board. Let's say it takes 3 minutes for a user to search on\nthe web why exactly they can't\nnavigate to their \"master\" branch. That's 30 million minutes of time\nwasted, or about 57 man-YEARs of time wasted.... for what?\n\nWhen do we put our foot down and say enough is enough, and not\neverything is offensive?\n\nAgain, please reconsider making this change towards doublespeak and\nconsider the ramifications of how much actual human life & time will\nbe wasted.\n\nKind Regards,\nPeter\n\nOn Wed, Nov 18, 2020 at 6:01 PM Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n>\n> Hi Philip,\n>\n> On Wed, 18 Nov 2020, Philip Oakley wrote:\n>\n> > An alternative in the other direction is to go with the 'not currently\n> > on any branch' (detached at nowhere) but then require users to\n> > deliberately create their first branch with their chosen name. This\n> > moves the 'backward incompatibility' to a different place, which may be\n> > easier to manage.\n>\n> It might be easier to manage for _us_, the Git developers. But every user\n> who initializes a repository and wants to push now needs to take the extra\n> step to give their unnamed branch (\"detached HEAD\" is _still_ confusing\n> new users!!!) a name.\n>\n> That would be much more disruptive than choosing a \"rather dull and\n> boring\" name instead of a rather racially-charged one.\n>\n> And we promised to try to minimize the disruption to Git users.\n>\n> Ciao,\n> Dscho\n\n\n\n-- \nPeter\n"},{"id":"410320","messageId":"36e028c3-b2be-30ba-11a0-7dc277c1ceca@iee.email","threadId":"54633","inReplyTo":"CABrPy+HYji9yD4pjYcGpmRq488nSgwEMfqFMOsxbmhO3GaXctA@mail.gmail.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.email","sentAt":"2020-11-19T00:44:34Z","receivedAt":"2020-11-19T00:44:39Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"On 19/11/2020 00:30, Peter Hadlaw wrote:\n> That leaves us with 10 million users of git that are either unaware or\n> are not on board. Let's say it takes 3 minutes for a user to search on\n> the web why exactly they can't\n> navigate to their \"master\" branch. That's 30 million minutes of time\n> wasted, or about 57 man-YEARs of time wasted.... for what?\nThat's (3 mins) probably about the same amount of time as most users\nwaste on stack overflow for Git questions, or the old 'RTFM', for their\nproblems in a typical week anyway.\n\n3 mins out of a 35 hr week, over a 44 week x 25 year life is 1.3 ppm,\nunless you work too hard and too long, where it's an even lower ppm.\n\nThere are mechanism in this series for setting the default branch name.\n\n--\nPhilip\n\n"},{"id":"410321","messageId":"CABrPy+EiBRXCFUG-bG5b2ixnxaT6XyUw33qQ9gt-EAGNEk4_2Q@mail.gmail.com","threadId":"54633","inReplyTo":"36e028c3-b2be-30ba-11a0-7dc277c1ceca@iee.email","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Peter Hadlaw","fromEmail":"hadlawp@gmail.com","sentAt":"2020-11-19T00:55:13Z","receivedAt":"2020-11-19T00:55:40Z","isPatch":true,"sender":{"key":"hadlawp@gmail.com","avatar":"https://gravatar.com/avatar/5c112c7b0f8a2f31347a23b3c9461c416c1047e5f47ba5c0c588272c1f3b1cda?d=mp&s=160"},"body":"There's still a responsibility for ~57 years worth of human life that\ndoesn't actually need to be put at risk.\n\nSomeone forgetting how to rebase a branch in some given way and then\nhaving to search is their own responsibility.\nOn the other hand, this is a decision made on their behalf, without\ntheir consent, ... on everyone's behalf.\n\nIf you're not going to change the default without user input, are you\ngoing to ask the user for a default branch name?\nFigure out the math and annoyance on that.\n\nOn Wed, Nov 18, 2020 at 6:44 PM Philip Oakley <philipoakley@iee.email> wrote:\n>\n> On 19/11/2020 00:30, Peter Hadlaw wrote:\n> > That leaves us with 10 million users of git that are either unaware or\n> > are not on board. Let's say it takes 3 minutes for a user to search on\n> > the web why exactly they can't\n> > navigate to their \"master\" branch. That's 30 million minutes of time\n> > wasted, or about 57 man-YEARs of time wasted.... for what?\n> That's (3 mins) probably about the same amount of time as most users\n> waste on stack overflow for Git questions, or the old 'RTFM', for their\n> problems in a typical week anyway.\n>\n> 3 mins out of a 35 hr week, over a 44 week x 25 year life is 1.3 ppm,\n> unless you work too hard and too long, where it's an even lower ppm.\n>\n> There are mechanism in this series for setting the default branch name.\n>\n> --\n> Philip\n>\n\n\n-- \nPeter\n"},{"id":"410324","messageId":"xmqqh7pmyuzn.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"1389dabc-33c9-1e65-a3de-43729a6c2e70@iee.email","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-19T01:51:24Z","receivedAt":"2020-11-19T01:51:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Philip Oakley <philipoakley@iee.email> writes:\n\n> An alternative in the other direction is to go with the 'not currently\n> on any branch' (detached at nowhere) but then require users to\n> deliberately create their first branch with their chosen name. This\n> moves the 'backward incompatibility' to a different place, which may be\n> easier to manage.\n\nAs has already been mentioned by Peff, I do not think that is a\nworkable alternative, especially given that people are generally\nafraid of and easily get confused by being on a detached HEAD.\n\nAnd there is no such thing as unborn detached HEAD.  Existing\nversions of Git would not consider a $GIT_DIR that does not have any\nHEAD, which means a new repository created by such an \"initially\nthere is no branch\" version of Git cannot be accessed by any\nexisting versions of Git.\n\nIt raises the backward incompatibility of such an approach to a\nwhole new level that is simply unmanageable, I am afraid.\n"},{"id":"410338","messageId":"nycvar.QRO.7.76.6.2011191012430.56@tvgsbejvaqbjf.bet","threadId":"54633","inReplyTo":"xmqq1rgq4qn3.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-19T09:22:31Z","receivedAt":"2020-11-19T09:23:03Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Wed, 18 Nov 2020, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>\n> > So yes, I totally agree that triggering an interactive prompt by the empty\n> > value is not really a good idea (nor a particularly intuitive behavior).\n>\n> Puzzled.\n>\n> Nobody talked about going interactive so far and I didn't suggest\n> it---even though I think it is a cute idea to give a \"what branch\n> name do you want to use?\" prompt, I do not think it is practical.\n\nThe interactive prompt was what I understood your \"a notation that asks\nfor the basename behaviour\" comment. The \"ask\" was what tripped me up, I\nalways interpret that as interactive. But now that I re-read it, I\nunderstand that you had not thought that far yet.\n\n> I thought it was obvious, but the key to coming up with a name\n> dynamically instead of using a fixed string is to derive from a cue\n> the end user gives, not directly use what the end user gives.  I do\n> not think anybody in the discussion meant by \"the <basename> thing\"\n> to literally use $(basename $(cwd)) output, but use it to derive a\n> token that check-ref-format likes.  As you may have already known\n> when you wrote them, \"My Documents\" or the root directory case are\n> red herring---it would be trivial to derive \"MyDocuments\" or\n> \"my-documents\" for the former, and for the latter, it is totally OK\n> for the deriving rule to come up with any of \"unnamed\", \"initial\",\n> etc.\n\nThe more magic you introduce, the less intuitive the whole thing gets, and\nthe more disruptive the change.\n\n> Most of the thing you said in the message I am responding to did not\n> make much sense to me.  Perhaps you can retry after reading the\n> message you are responding to again?\n\nCould you be a bit more specific?\n\nWas it the \"I already use the empty string to force a fall-back, it cannot\nalso mean something else\" that did not make sense?\n\nOr my comment that special-casing values that start with a colon would\nlook saner to me?\n\nOr the comment about the basename in a root directory?\n\nOr referencing the SFC statement that we want to minimize disruption?\n\nOr my stated preference to go with `main` in order to fulfill that promise\nof minimizing the disruption to users?\n\nOr my current plan to introduce an `advise()` call when running `git init`\nthat tells users that the fall-back for `init.defaultBranch` will change\nsoon and that users are encouraged to configure it if they care about\nkeeping the current fall-back?\n\nOr that all of this needs to be done with care?\n\nThe message you refer to might not have been the best example of clear\ncommunication, but it hardly deserved _that_ response.\n\nCiao,\nDscho\n"},{"id":"410339","messageId":"nycvar.QRO.7.76.6.2011191030170.56@tvgsbejvaqbjf.bet","threadId":"54633","inReplyTo":"xmqqsg963bg9.fsf@gitster.c.googlers.com","subject":"Re: [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-19T09:32:30Z","receivedAt":"2020-11-19T09:32:52Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio & Ævar,\n\nOn Wed, 18 Nov 2020, Junio C Hamano wrote:\n\n> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>\n> > P.S.: Shouldn't the pull patch in d18c950a69f be using the advice\n> >      facility, not warning()?\n>\n> I think warning() is the right thing here, as it is self squelching.\n> Setting pull.rebase (even to 'false') is sufficient---there is no\n> need to set advise.setpullrebase to 'false' on top.\n\nRight. The only reason to use `advise()` would be to allow users to\nsquelch the warning by setting `advice.*`.\n\nOn the other hand, warnings are not colored, but advice messages are.\n\nAnd now I realize that the same holds for `init.defaultBranch`: it is also\nself-squelching. And it also might benefit from the coloring to make it\nstand out a bit.\n\nThoughts?\n\nCiao,\nDscho\n"},{"id":"410341","messageId":"7df660f2-ad74-7d1f-eb13-a0edadffbfbf@iee.email","threadId":"54633","inReplyTo":"xmqqh7pmyuzn.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.email","sentAt":"2020-11-19T10:35:45Z","receivedAt":"2020-11-19T10:35:50Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"On 19/11/2020 01:51, Junio C Hamano wrote:\n> Philip Oakley <philipoakley@iee.email> writes:\n>\n>> An alternative in the other direction is to go with the 'not currently\n>> on any branch' (detached at nowhere) but then require users to\n>> deliberately create their first branch with their chosen name. This\n>> moves the 'backward incompatibility' to a different place, which may be\n>> easier to manage.\n> As has already been mentioned by Peff, I do not think that is a\n> workable alternative, especially given that people are generally\n> afraid of and easily get confused by being on a detached HEAD.\nYes, our use of the technical phrase 'detached HEAD' is confusing,\ncompared with the more pleasant 'not on any branch', or 'not at a branch\ntip'. Such is the curse of knowledge.\n>\n> And there is no such thing as unborn detached HEAD.  Existing\n> versions of Git would not consider a $GIT_DIR that does not have any\n> HEAD, which means a new repository created by such an \"initially\n> there is no branch\" version of Git cannot be accessed by any\n> existing versions of Git.\nIsn't this, essentially, because there is no 'empty/null commit' that we\n(HEAD) could start at? There have been a few cases where I've been\n'annoyed' that we're missing that. (rather than the orphan branch approach)\n>\n> It raises the backward incompatibility of such an approach to a\n> whole new level that is simply unmanageable, I am afraid.\nOK, accepted.\n\nPhilip\n\n"},{"id":"410342","messageId":"nycvar.QRO.7.76.6.2011191050550.56@tvgsbejvaqbjf.bet","threadId":"54633","inReplyTo":"87ima2rdsm.fsf@evledraar.gmail.com","subject":"Re: [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-19T10:46:45Z","receivedAt":"2020-11-19T10:47:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ævar,\n\nI agree with pretty much all you said, just wanted to comment on a couple\nthings:\n\nOn Wed, 18 Nov 2020, Ævar Arnfjörð Bjarmason wrote:\n\n> In case I didn't make it clear I have no objection entirely replacing\n> \"master\" with \"main\" in the tests. I just had a practical\n> concern/question about coverage while it was landing, and a suggestion\n> of whether perhaps there was an easier/faster way to do the \"init\"\n> change first by omitting some of the test churn.\n>\n> But if you want to do all the legwork that's fine by me :)\n\nI started it, I finish it, I guess. Well, technically Don started it...\n\n> I think some of the people advocating this change can rightly look at\n> some of the previous E-Mail traffic and see what are at best rants and\n> at worst some political grandstanding that's at best pretty irrelevant\n> to any proposed changes in git.git.\n>\n> But that doesn't mean that there aren't some legitimate concerns.\n\nAnd that's so sad to read. It is disheartening how eager certain people\nwere to drown out others' voices, then claiming that they had not heard\nany views opposing their own. I mean, yeah, if you want to hear other\nopinions, it sure helps to stop talking for a while, and to start\nlistening.\n\nI consider myself lucky that I _did_ get the chance to listen. Related to\nmy work in GSoC and Outreachy, and through my day job, wonderful people\napproached me with their stories and perspectives. I am really glad that I\nhad the opportunity to hear those.\n\nAs to legitimate concerns: yes, you are right. There are those. If your\ndocumentation says that you should avoid committing directly to the\n`master` branch, and then you clone a popular Open Source project and it\ndoes not even _have_ a `master` branch, that might be a bit puzzling.\n\nNote that I used a clone as an example, not `git init`, because it is a\nmuch more common operation. Git is a tool for developers to communicate,\nin a way, after all, even if it _can_ be used for working in isolation,\ntoo. Hence clones outnumber inits. And that communication of ideas, of\ncode, and to combine efforts, to collaborate, that is what Git really\nfacilitates. That is why I find it so important to be inclusive, to be\ninviting underrepresented developers. There is such a lot of untapped\npotential there, and even if using a non-offensive default branch name is\nbut a _teeny_ tiny step to open the door a little, it is at least a step\nin the right direction.\n\nNow, since I mentioned `clone`: please note that the default branch name\nused in a `clone` is squarely outside the Git project's control. It is\ndecided by the maintainer(s)/communities of the respective projects. And\nthat's exactly how it should be.\n\nTherefore, as you said before, it does not really matter all that much\nat what date we will change the fall-back for `init.defaultBranch`.\n\nAt the same time, I still think that it is valuable to transition the test\nsuite _now_, to be as independent on a specific default branch name as\npossible, if only to ensure that above-mentioned projects can choose\nfreely what they want their primary branch to be called and Git works just\nfine.\n\n> I do 100% agree that the s/master/main/g change of the default should be\n> made in one form or another. In my mind that doesn't even require a\n> consideration of the political motivations at this point as far as\n> git.git is concerned, just:\n>\n>  1. Major Git hosting providers already made the change\n>\n>  2. Realistically a lot/majority of git's user base interact with that\n>     in a major way.\n>\n>  3. A discrepancy in any default between /usr/bin/git and those\n>     providers is more confusing than not.\n\nRight.\n\nI originally thought that we should switch the default branch name in\nv2.30 for that reason, but I now think that adding that advice is probably\na less disruptive, and almost equally supportive solution.\n\n>  4. #3 doesn't mean they say \"jump\" we say \"how high\" whatever the\n>     change is.\n>\n>     But in this case the default is an entirely arbitrary default. Not\n>     e.g. that they decided to add some ill-thought out header to the\n>     object format or whatever.\n>\n> P.S.: Shouldn't the pull patch in d18c950a69f be using the advice\n>      facility, not warning()?\n\nI submitted a patch for that, but unfortunately forgot to Cc: you:\nhttps://lore.kernel.org/git/pull.795.git.1605781349528.gitgitgadget@gmail.com\n\nCiao,\nDscho\n"},{"id":"410344","messageId":"871rgpr497.fsf@osv.gnss.ru","threadId":"54633","inReplyTo":"7df660f2-ad74-7d1f-eb13-a0edadffbfbf@iee.email","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Sergey Organov","fromEmail":"sorganov@gmail.com","sentAt":"2020-11-19T11:10:44Z","receivedAt":"2020-11-19T11:11:09Z","isPatch":true,"sender":{"key":"sorganov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8501568?v=4"},"body":"Philip Oakley <philipoakley@iee.email> writes:\n\n> On 19/11/2020 01:51, Junio C Hamano wrote:\n>> Philip Oakley <philipoakley@iee.email> writes:\n>>\n>>> An alternative in the other direction is to go with the 'not currently\n>>> on any branch' (detached at nowhere) but then require users to\n>>> deliberately create their first branch with their chosen name. This\n>>> moves the 'backward incompatibility' to a different place, which may be\n>>> easier to manage.\n>> As has already been mentioned by Peff, I do not think that is a\n>> workable alternative, especially given that people are generally\n>> afraid of and easily get confused by being on a detached HEAD.\n> Yes, our use of the technical phrase 'detached HEAD' is confusing,\n> compared with the more pleasant 'not on any branch', or 'not at a branch\n> tip'. Such is the curse of knowledge.\n\nTo me \"not on a branch [tip]\" is also confusing, as in fact you are, as\nis easily seen after you perform a few commits, and now HEAD points\ndirectly to the tip of the branch (that has no other references).\n\nI wonder why Git didn't rather adopt \"unnamed branch\" or \"nameless\nbranch\" to describe this mode of operation?\n\n-- Sergey\n"},{"id":"410349","messageId":"fe8962ee-0e0b-19bb-4b89-4603cdabee74@iee.email","threadId":"54633","inReplyTo":"871rgpr497.fsf@osv.gnss.ru","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.email","sentAt":"2020-11-19T11:50:23Z","receivedAt":"2020-11-19T11:50:28Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"On 19/11/2020 11:10, Sergey Organov wrote:\n> Philip Oakley <philipoakley@iee.email> writes:\n>\n>> On 19/11/2020 01:51, Junio C Hamano wrote:\n>>> Philip Oakley <philipoakley@iee.email> writes:\n>>>\n>>>> An alternative in the other direction is to go with the 'not currently\n>>>> on any branch' (detached at nowhere) but then require users to\n>>>> deliberately create their first branch with their chosen name. This\n>>>> moves the 'backward incompatibility' to a different place, which may be\n>>>> easier to manage.\n>>> As has already been mentioned by Peff, I do not think that is a\n>>> workable alternative, especially given that people are generally\n>>> afraid of and easily get confused by being on a detached HEAD.\n>> Yes, our use of the technical phrase 'detached HEAD' is confusing,\n>> compared with the more pleasant 'not on any branch', or 'not at a branch\n>> tip'. Such is the curse of knowledge.\n> To me \"not on a branch [tip]\" is also confusing, as in fact you are, as\n> is easily seen after you perform a few commits, and now HEAD points\n> directly to the tip of the branch (that has no other references).\n>\n> I wonder why Git didn't rather adopt \"unnamed branch\" or \"nameless\n> branch\" to describe this mode of operation?\nGiven the ephemeral nature of branches they sound like good suggestion.\n\nHowever I suspect \"history\" to be the \"why\" of the current 'detached\nhead' usage.\nMaybe it's a side reference to Nearly Headless Nick or other discussions\nof the time (aka lost in history)?\n--\nPhilip\n"},{"id":"410350","messageId":"873615plu3.fsf@osv.gnss.ru","threadId":"54633","inReplyTo":"fe8962ee-0e0b-19bb-4b89-4603cdabee74@iee.email","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Sergey Organov","fromEmail":"sorganov@gmail.com","sentAt":"2020-11-19T12:33:56Z","receivedAt":"2020-11-19T12:34:21Z","isPatch":true,"sender":{"key":"sorganov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8501568?v=4"},"body":"Philip Oakley <philipoakley@iee.email> writes:\n\n> On 19/11/2020 11:10, Sergey Organov wrote:\n>> Philip Oakley <philipoakley@iee.email> writes:\n>>\n>>> On 19/11/2020 01:51, Junio C Hamano wrote:\n>>>> Philip Oakley <philipoakley@iee.email> writes:\n>>>>\n>>>>> An alternative in the other direction is to go with the 'not currently\n>>>>> on any branch' (detached at nowhere) but then require users to\n>>>>> deliberately create their first branch with their chosen name. This\n>>>>> moves the 'backward incompatibility' to a different place, which may be\n>>>>> easier to manage.\n>>>> As has already been mentioned by Peff, I do not think that is a\n>>>> workable alternative, especially given that people are generally\n>>>> afraid of and easily get confused by being on a detached HEAD.\n>>> Yes, our use of the technical phrase 'detached HEAD' is confusing,\n>>> compared with the more pleasant 'not on any branch', or 'not at a branch\n>>> tip'. Such is the curse of knowledge.\n>> To me \"not on a branch [tip]\" is also confusing, as in fact you are, as\n>> is easily seen after you perform a few commits, and now HEAD points\n>> directly to the tip of the branch (that has no other references).\n>>\n>> I wonder why Git didn't rather adopt \"unnamed branch\" or \"nameless\n>> branch\" to describe this mode of operation?\n> Given the ephemeral nature of branches they sound like good\n> suggestion.\n\nSure, so to me they sound even more natural in Git context than in any\nother VCS I'm aware of.\n\n>\n> However I suspect \"history\" to be the \"why\" of the current 'detached\n> head' usage.\n> Maybe it's a side reference to Nearly Headless Nick or other discussions\n> of the time (aka lost in history)?\n\nI do have a few commits at which HEAD has been detached, not once at\nsome. Bloody they are.\n\n-- Sergey\n"},{"id":"410375","messageId":"xmqqo8jtxhyu.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"nycvar.QRO.7.76.6.2011190044100.56@tvgsbejvaqbjf.bet","subject":"Re: [PATCH v2 28/27] tests: run tests omitted by PREPARE_FOR_MAIN_BRANCH","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-19T19:30:17Z","receivedAt":"2020-11-19T19:30:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> The conflicts might be trivial, but every conflict makes it harder to\n> juggle branch thickets like Junio's `seen`. And those things add up.\n> They're no fun, and they make life hard and tedious.\n\nThe worst part is they can easily be cause of unintended breakage\ndue to mismerge.\n\n> t5526 conflicts _semantically_ with `pk/subsub-fetch-fix` (which touches\n> t5526 and adds a new test case referring to `master`).\n>\n> t9902 conflicts with `fc/bash-completion-post-2.29`, and in contrast to\n> the t5526 issue (which is trivial, even if it does require manual fixing),\n> the t9902 is a bit more hairy to reason about.\n>\n> So yes, I would love to have that test coverage back, but not by making\n> the transition to `main` even harder by reverting parts of it.\n\nHmph, wouldn't the forcing with GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\nto 'master' be the right way to keep test coverage?  After all, the\nprimary goal is to prepare tests so that we won't lose coverage when\nthe fallback default of init.defaultbranch is switched to 'main',\nand it is a secondary goal of much lessor importance to reduce the\nnumber of hits from \"git grep master t/\".\n\n> That's why I promised publicly to take care of the loose ends as quickly\n> as I can, after the conflicting issues graduate to `next` (or when they\n> become stalled or even dropped from `seen`).\n\nPerhaps I should start to more aggressively drop topics from `seen`\nthat are not sufficiently reviewed?  The guiding principle ought to\nbe \"unreviewed patches are not worth applying\", but I have a feeling\nthat we have become more and more lax over time due to shortage of\nquality reviews.  I dunno.\n\n"},{"id":"410376","messageId":"xmqqk0uhxhqh.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"nycvar.QRO.7.76.6.2011191030170.56@tvgsbejvaqbjf.bet","subject":"Re: [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-19T19:35:18Z","receivedAt":"2020-11-19T19:35:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi Junio & Ævar,\n>\n> On Wed, 18 Nov 2020, Junio C Hamano wrote:\n>\n>> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>>\n>> > P.S.: Shouldn't the pull patch in d18c950a69f be using the advice\n>> >      facility, not warning()?\n>>\n>> I think warning() is the right thing here, as it is self squelching.\n>> Setting pull.rebase (even to 'false') is sufficient---there is no\n>> need to set advise.setpullrebase to 'false' on top.\n>\n> Right. The only reason to use `advise()` would be to allow users to\n> squelch the warning by setting `advice.*`.\n>\n> On the other hand, warnings are not colored, but advice messages are.\n>\n> And now I realize that the same holds for `init.defaultBranch`: it is also\n> self-squelching. And it also might benefit from the coloring to make it\n> stand out a bit.\n>\n> Thoughts?\n\nI do not see colors well.  You'll always get \"find some other way to\nmake it stand out more to those like us---if you canhdo so without\ncolors, that would be ideal\" from me, so please don't ask me to vote\nfor more colors.\n\n\n"},{"id":"410394","messageId":"xmqq3614x6mn.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"pull.762.v3.git.1605743086.gitgitgadget@gmail.com","subject":"Re: [PATCH v3 00/28] tests: use main as default branch name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-19T23:35:12Z","receivedAt":"2020-11-19T23:35:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> Note that this branch is based on next, mostly because it would otherwise\n> conflict with en/merge-tests, jk/diff-release-filespec-fix and \n> ds/maintenance-part-3.\n\nNote that what is queued in my tree is unlikely to be based on\n'next', but instead start by merging jk/diff-release-filespec-fix\nand possibly the fix-up for ds/maintenance-part-3 into 'master' and\nthen applying these patches on top.  \n\nThis will be time consuming but cannot be avoided ;-)\n\nI just started building such a topic branch.  It is likely that\nthe result of today's integration cycle would be pushed out much\nlater than usual.\n\nThanks.\n"},{"id":"410413","messageId":"87pn48p8eo.fsf@evledraar.gmail.com","threadId":"54633","inReplyTo":"CAMP44s2Uf4tkBdHWFV6e3K3VqCksJxwz52kgWzTBN_SAHnof-w@mail.gmail.com","subject":"Re: [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2020-11-20T11:36:15Z","receivedAt":"2020-11-20T11:36:24Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Wed, Nov 18 2020, Felipe Contreras wrote:\n\n> On Wed, Nov 18, 2020 at 7:32 AM Ævar Arnfjörð Bjarmason\n> <avarab@gmail.com> wrote:\n>\n>> I do 100% agree that the s/master/main/g change of the default should be\n>> made in one form or another. In my mind that doesn't even require a\n>> consideration of the political motivations at this point as far as\n>> git.git is concerned, just:\n>\n> Others disagree.\n\nSure, and I might end up disagreeing with myself once we have the\nproposed patches & more people inevitably chime in with some useful data\nabout the trade-offs, edge cases we haven't considered etc.\n\n> While the political motivation shouldn't be a central concern, I\n> suspect the vast majority of users have no idea this change is coming,\n> and when they see the warning they will likely complain... Strongly.\n> The fact that this change is extremely politically charged will become\n> a factor.\n>\n>>  1. Major Git hosting providers already made the change\n\n[... addressed below ...]\n\n> That's their decision. The Git project shouldn't be held hostage to\n> third party decisions.\n>\n>>  2. Realistically a lot/majority of git's user base interact with that\n>>     in a major way.\n>>\n>>  3. A discrepancy in any default between /usr/bin/git and those\n>>     providers is more confusing than not.\n>\n> That's a problem for GitHub et al. Fortunately they can tell their\n> users to set init.defaultbranch to whatever they want.\n\nI think this and what you mention in another thread[1] about GitHub's\ninstructions for creating a repository takes a narrow view of our\nresponsibility for creating a sane UI for users.\n\nFor example, right after the instructions you note there GitHub's\ncurrent instructions are:\n\n    git remote add origin $url\n    git branch -M main\n    git push -u origin main\n\nNow, put yourself in the shoes of a novice user who's just been\nintroduced to this \"git\" thing for a job they started 2 days ago. We\ndon't take the s/master/main/g change in git.git, GitHub keeps\ntheirs.\n\nYou followed some tutorial or read the manpage to create a local\nrepository and made a few commits, then to upload it to GitHub or\nanother provider that uses \"main\" by default you copy/pasted the above\ncommands. Now the thing changing from \"master\" to \"main\" is one more\nthing you're confused by.\n\nThat's my motivation for supporting this change. I think most git users\nby number are (hopefully) in the future, yes, as you note we'll have\nversion transitions where that's more confusing than not, but the same\ncan be said about the dashed command transition.\n\nWhatever mistakes we made in that transition and should learn from a\ntypical git user in 2020 has never used a dashed builtin, just like a\nnew user in 2030 probably won't know or have to care about their local\ndefault being different than a $BIG_HOSTING_PROVIDER default.\n\nThat *is* our problem, not just a problem for GitHub et al. To claim\notherwise is to just bury our head in the sand.\n\nAre we on balance going to not make the change because e.g. we don't\nwant various paper books and tutorials to be confusing? Maybe, maybe\nnot. But just dismissing those concerns by saying e.g. \"that's\nO'Reilly's problem\" would be as nonsensical as us pretending that\nperpetuating an (admittedly rather minor) UI difference in perpetuity by\nour inaction is purely GitHub's responsibility.\n\n>>  4. #3 doesn't mean they say \"jump\" we say \"how high\" whatever the\n>>     change is.\n>>\n>>     But in this case the default is an entirely arbitrary default. Not\n>>     e.g. that they decided to add some ill-thought out header to the\n>>     object format or whatever.\n>\n> I don't agree it is arbitrary, otherwise you could set the default to\n> \"loremipsum\". Moreover, even if was arbitrary, it was arbitrary in\n> 2005, not 2020 where \"master\" is already widely used in basically\n> *all* the documentation everywhere. Some people have been using this\n> name for 15 years, they won't give it up just like that.\n\nYes, that was badly phrased and I take that back. I meant to say\nsomething closer to \"a common convention\" or whatever. E.g. if GitHub et\nal for whatever reason switched all use of \"origin\" as the default\nremote to \"source\" I'd think that at some point we'd be improving things\noverall if we made that switch as well.\n\n> People will complain, especially if they don't see a good reason for\n> the change.\n\n\n1. https://lore.kernel.org/git/CAMP44s1515GOwTOYv-wz4qMC9Qb6d8cSVSb_CNVwun0+Yj3VxQ@mail.gmail.com/\n"},{"id":"410418","messageId":"nycvar.QRO.7.76.6.2011201403440.56@tvgsbejvaqbjf.bet","threadId":"54633","inReplyTo":"xmqqo8jtxhyu.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v2 28/27] tests: run tests omitted by PREPARE_FOR_MAIN_BRANCH","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-20T13:09:06Z","receivedAt":"2020-11-20T13:09:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Thu, 19 Nov 2020, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>\n> > The conflicts might be trivial, but every conflict makes it harder to\n> > juggle branch thickets like Junio's `seen`. And those things add up.\n> > They're no fun, and they make life hard and tedious.\n>\n> The worst part is they can easily be cause of unintended breakage\n> due to mismerge.\n>\n> > t5526 conflicts _semantically_ with `pk/subsub-fetch-fix` (which touches\n> > t5526 and adds a new test case referring to `master`).\n> >\n> > t9902 conflicts with `fc/bash-completion-post-2.29`, and in contrast to\n> > the t5526 issue (which is trivial, even if it does require manual fixing),\n> > the t9902 is a bit more hairy to reason about.\n> >\n> > So yes, I would love to have that test coverage back, but not by making\n> > the transition to `main` even harder by reverting parts of it.\n>\n> Hmph, wouldn't the forcing with GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n> to 'master' be the right way to keep test coverage?\n\nWell, I was naive enough to think that this whole \"let's transition the\ntest suite to use `main` as default branch name\" business would go over\nmuch quicker. With that expectation, I was content to already have\n`PREPARE_FOR_MAIN`-marked test cases in t5526 and t9902. They are\ncurrently skipped because that prereq is still waiting for the transition\nto complete.\n\nThat's what my promise was about: as soon as the competing topics settle,\nI want to address those two test scripts in particular, moving them over\nto `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`.\n\n> After all, the primary goal is to prepare tests so that we won't lose\n> coverage when the fallback default of init.defaultbranch is switched to\n> 'main', and it is a secondary goal of much lessor importance to reduce\n> the number of hits from \"git grep master t/\".\n>\n> > That's why I promised publicly to take care of the loose ends as quickly\n> > as I can, after the conflicting issues graduate to `next` (or when they\n> > become stalled or even dropped from `seen`).\n>\n> Perhaps I should start to more aggressively drop topics from `seen`\n> that are not sufficiently reviewed?  The guiding principle ought to\n> be \"unreviewed patches are not worth applying\", but I have a feeling\n> that we have become more and more lax over time due to shortage of\n> quality reviews.  I dunno.\n\nFWIW I think you do a wonderful job of keeping the patch series in `seen`.\nI wish we could keep the CI build passing a bit more, but I'd rather have\nthe branches that are in flight in one place, so that it is easy e.g. to\nfind out whether `git diff next..seen -- t/t9902\\*` is empty (to determine\nwhether working on that script would cause conflicts right now).\n\nCiao,\nDscho\n\n"},{"id":"410424","messageId":"CAMP44s2b7y0WJeJnJG3QoPq5b7yFF2+R-5T0SEx31v=zv1tNvQ@mail.gmail.com","threadId":"54633","inReplyTo":"87pn48p8eo.fsf@evledraar.gmail.com","subject":"Re: [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of)","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-11-20T16:00:27Z","receivedAt":"2020-11-20T16:00:42Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Fri, Nov 20, 2020 at 5:36 AM Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n> On Wed, Nov 18 2020, Felipe Contreras wrote:\n\n> > That's a problem for GitHub et al. Fortunately they can tell their\n> > users to set init.defaultbranch to whatever they want.\n>\n> I think this and what you mention in another thread[1] about GitHub's\n> instructions for creating a repository takes a narrow view of our\n> responsibility for creating a sane UI for users.\n>\n> For example, right after the instructions you note there GitHub's\n> current instructions are:\n>\n>     git remote add origin $url\n>     git branch -M main\n>     git push -u origin main\n>\n> Now, put yourself in the shoes of a novice user who's just been\n> introduced to this \"git\" thing for a job they started 2 days ago. We\n> don't take the s/master/main/g change in git.git, GitHub keeps\n> theirs.\n\nI am.\n\nBut that doesn't change the instructions. The \"git branch -M main\"\nwould still be there (for older versions of Git).\n\nAnd the \"git push -u origin main\" would still be there, because you\nneed to specify the branch you want to push to. Although I would have\nused HEAD instead of main, or even better @, which apparently doesn't\nwork, but should work. If GitHub cares so much about these\ninstructions, they could have fixed this so \"git push -u origin @\"\nworks, why haven't they? Because they don't care as much as they claim\nto (see the obvious inconsistency below).\n\n> You followed some tutorial or read the manpage to create a local\n> repository and made a few commits, then to upload it to GitHub or\n> another provider that uses \"main\" by default you copy/pasted the above\n> commands. Now the thing changing from \"master\" to \"main\" is one more\n> thing you're confused by.\n\nWhat if the project uses \"trunk\"? Or \"default\"?\n\nIf a project uses a non-standard name, it's their responsibility to\nteach their users how to interact with that project. If GitHub chose\n\"main\", it's *their* responsibility to tell their users that this is a\ndiscrepancy from most of the online documentation, including online\ndocumentation specific to GitHub.\n\nThe best way the Git project can help is by not hard-coding any of\nthese names, so the documentation doesn't have to use \"master\", or\n\"main\", but can use @, or @{upstream}.\n\nBut right now the documentation *has* to hard-code these names,\nbecause of poor triangular workflow support from Git, something I\ntried to fix many years ago with my @{publish} patches.\n\nIf we had proper @{upstream} and @{publish} support, and taught users\nhow to use them well, there would be no need for anyone to do \"git\nrebase -i master\" (\"git rebase -i\" would do).\n\n> That's my motivation for supporting this change. I think most git users\n> by number are (hopefully) in the future, yes, as you note we'll have\n> version transitions where that's more confusing than not, but the same\n> can be said about the dashed command transition.\n\nThe number of Git users in the future directly depends on how we treat\nGit users in the present. And the Git users of the present would not\nappreciate that 99% of documentation out there uses \"master\", while\nGit does not, especially if in their mind it's due to bad (political)\nreasons.\n\nWhat's wrong with *first* fixing the interface so we don't have to\ntype \"master\" so much (e.g. by properly supporting triangular\nworkflows), and *then* consider changing \"master\" later, *after* a lot\nof online documentation has stopped using the name \"master\" directly\nas well?\n\n> Whatever mistakes we made in that transition and should learn from a\n> typical git user in 2020 has never used a dashed builtin, just like a\n> new user in 2030 probably won't know or have to care about their local\n> default being different than a $BIG_HOSTING_PROVIDER default.\n\nThat's *if* the current project survives in its current form. Perhaps\nin 2030 there will be a libgit with more than one user interface.\nNobody knows the future.\n\n> That *is* our problem, not just a problem for GitHub et al. To claim\n> otherwise is to just bury our head in the sand.\n\nIt is our problem to improve the interface so users don't have to type\n\"master\" (or \"main), so much.\n\nIt is not our problem that GitHub decided to get ahead of itself and\nchange their instructions without first considering other options,\nlike improving the interface.\n\n> Are we on balance going to not make the change because e.g. we don't\n> want various paper books and tutorials to be confusing? Maybe, maybe\n> not. But just dismissing those concerns by saying e.g. \"that's\n> O'Reilly's problem\" would be as nonsensical as us pretending that\n> perpetuating an (admittedly rather minor) UI difference in perpetuity by\n> our inaction is purely GitHub's responsibility.\n\nGitHub can fix that UI difference *today* by retracting their\ninstructions and instead come here and discuss with us ways to improve\nthe interface first.\n\nThey chose that action *unilaterally* without discussing it with the\nGit project. That's on them.\n\nYes, GitHub users are our users too, but we have many more users, we\nshouldn't hurt them just because GitHub has no patience.\n\nAs an example of GitHub's impatience, look at GitHub's Hello World\n[1], the text has been updated to \"main\", but all the images say\n\"master\". It's their *first* guide, and it's already inconsistent.\n\nhttps://guides.github.com/activities/hello-world/readme-edits.gif\n\nAdditionally, GitHub cannot say \"implement X or we will hurt our\nusers\". That would be manipulative tactics, and the Git project should\nnot succumb to those. Regardless of what GitHub does, the Git project\nshould implement X on its own terms, if and when it has determined\nit's in the best interest of its users.\n\nMoreover, you have not explained precisely how the issues will be\nsolved by changing the default name. All the documentation out there\nwould be inconsistent with \"main\". Even GitHub's own documentation is\ninconsistent at this precise moment.\n\nTake one of the first results you get when googling \"github how to\"\n[2], it says to \"git push -u origin master\". By keeping the name\n\"master\" we are helping those users that are not using a github.com\nguide, and are using one of the hundreds (or thousands) of guides out\nthere that assume the name is master. In fact, the *only* thing that\nis hurting GitHub users right now is those initial instructions they\nchose, which you can ignore, and instead use an external guide.\n\nIt is very likely that by doing this change we would actually hurt\nmore GitHub users than not doing it.\n\nCheers.\n\n[1] https://guides.github.com/activities/hello-world/\n[2] https://opensource.com/article/18/1/step-step-guide-git\n\n-- \nFelipe Contreras\n"},{"id":"410432","messageId":"xmqqy2ivucif.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"nycvar.QRO.7.76.6.2011201403440.56@tvgsbejvaqbjf.bet","subject":"Re: [PATCH v2 28/27] tests: run tests omitted by PREPARE_FOR_MAIN_BRANCH","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-20T18:08:40Z","receivedAt":"2020-11-20T18:08:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> Perhaps I should start to more aggressively drop topics from `seen`\n>> that are not sufficiently reviewed?  The guiding principle ought to\n>> be \"unreviewed patches are not worth applying\", but I have a feeling\n>> that we have become more and more lax over time due to shortage of\n>> quality reviews.  I dunno.\n>\n> FWIW I think you do a wonderful job of keeping the patch series in `seen`.\n> I wish we could keep the CI build passing a bit more, but I'd rather have\n> the branches that are in flight in one place, so that it is easy e.g. to\n> find out whether `git diff next..seen -- t/t9902\\*` is empty (to determine\n> whether working on that script would cause conflicts right now).\n\nI have to disagree.  There are a few topics, perhaps more than a\nfew, that is age old in Git timescale nobody has bothered to ask the\nlist why we still have it in 'seen' [*1*].\n\nIt may be a good thing to pick up as many potentially interesting\nnew topics as possible and to merge them to 'seen' while resolving\npossible conflicts with other topics in flight.  I am willing to\ncontinue doing so.\n\nBut I doubt that a series lingering in 'seen' that has not been\ntouched for more than say four weeks has much chance of gaining any\nnew interest to push it forward.  Perhaps we need a policy to\ndiscard a topic whose author timestamp is 8 weeks or older and not\nin 'next', without preventing those who care about the topic from\nresurrecting it in support, or something along that line.\n\n\n[Footnote]\n\n*1* The question can be asked in two ways.  \"Shouldn't it go 'next'\nalready?  I've read it over, here is the review and the thread shows\na clear concensus that it is a good idea\" is one happy outcome (even\nthough that would indicate the maintainer doing a poor job).\n\nAlternatively, \"Shouldn't it be discarded?  Nobody seemed interested\nback then and now we have X instead, so it is not necessary.\" is\nalso a possible happy outcome.\n"},{"id":"410478","messageId":"xmqqpn46qppl.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"871rgpr497.fsf@osv.gnss.ru","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-21T23:01:42Z","receivedAt":"2020-11-21T23:01:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sergey Organov <sorganov@gmail.com> writes:\n\n> To me \"not on a branch [tip]\" is also confusing, as in fact you are, as\n> is easily seen after you perform a few commits, and now HEAD points\n> directly to the tip of the branch (that has no other references).\n\nAren't you confused about what \"on a branch\" means?\n\nAfter either of these two operations, your HEAD may point at the\nsame commit, but the former is on a branch (the master branch), and\nthe latter is not.\n\n    git checkout master\n    git checkout master^0\n\nThe difference between these two states does *NOT* come from which\ncommit HEAD points at.\n\nThe difference comes from what happens when you make a new commit\nstarting from that state.  The former (i.e. you are on a branch)\ngrows the branch.  The latter (i.e. you are not on a branch) does\nnot grow any branch.\n\nThis is an unrelated trivia, but did anybody know that we were\npretty much on the detached HEAD all the time for more than a month\nof early life of Git, until cad88fdf (git-init-db: set up the full\ndefault environment, 2005-05-30)?\n"},{"id":"410485","messageId":"87y2it8zfm.fsf@osv.gnss.ru","threadId":"54633","inReplyTo":"xmqqpn46qppl.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Sergey Organov","fromEmail":"sorganov@gmail.com","sentAt":"2020-11-22T10:21:17Z","receivedAt":"2020-11-22T10:21:42Z","isPatch":true,"sender":{"key":"sorganov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8501568?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Sergey Organov <sorganov@gmail.com> writes:\n>\n>> To me \"not on a branch [tip]\" is also confusing, as in fact you are, as\n>> is easily seen after you perform a few commits, and now HEAD points\n>> directly to the tip of the branch (that has no other references).\n>\n> Aren't you confused about what \"on a branch\" means?\n\nI believe I'm not.\n\n>\n> After either of these two operations, your HEAD may point at the\n> same commit, but the former is on a branch (the master branch), and\n> the latter is not.\n>\n>     git checkout master\n>     git checkout master^0\n>\n> The difference between these two states does *NOT* come from which\n> commit HEAD points at.\n\nSure.\n\n>\n> The difference comes from what happens when you make a new commit\n> starting from that state.  The former (i.e. you are on a branch)\n> grows the branch.\n\nSure.\n\n> The latter (i.e. you are not on a branch) does not grow any branch.\n\nThat's one way of looking at it, resulting in this \"detached HEAD\"\nthingy that is too technical for the git user proper, I think. Moreover,\nit immediately raises the question: if it doesn't grow any branch, /what/\ndoes it grow?\n\nAnother way of describing it, that I prefer, is that you /are/ on an\n/unnamed/ branch and new commits grow this particular /unnamed/ branch.\nNo need not only for \"detached\", but even for \"HEAD\" to be known to the\nuser to get the idea, I think.\n\n>\n> This is an unrelated trivia, but did anybody know that we were\n> pretty much on the detached HEAD all the time for more than a month\n> of early life of Git, until cad88fdf (git-init-db: set up the full\n> default environment, 2005-05-30)?\n\nI was not aware, and it seems that in my terminology it'd sound: \"Git\ndidn't have named branches until cad88fdf\".\n\n-- Sergey\n"},{"id":"410487","messageId":"9be54e8e-a702-0eb9-97c9-7a1fac82ed5d@iee.email","threadId":"54633","inReplyTo":"87y2it8zfm.fsf@osv.gnss.ru","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.email","sentAt":"2020-11-22T11:20:26Z","receivedAt":"2020-11-22T11:20:32Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"On 22/11/2020 10:21, Sergey Organov wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> Sergey Organov <sorganov@gmail.com> writes:\n>>\n>>> To me \"not on a branch [tip]\" is also confusing, as in fact you are, as\n>>> is easily seen after you perform a few commits, and now HEAD points\n>>> directly to the tip of the branch (that has no other references).\n>> Aren't you confused about what \"on a branch\" means?\n> I believe I'm not.\n\nIsn't this one of those \"implementation detail\" viewpoint arguments,\ncombined with some incompleteness in various places.\n\nFrom a naive english user perspective , 'on' a branch can also mean\nanywhere along a branch and not just at the tip. Being at a commit along\na branch can be tricky to appreciate (that on/at distinction isn't\nimmediately obvious..)\n>\n>> After either of these two operations, your HEAD may point at the\n>> same commit, but the former is on a branch (the master branch), and\n>> the latter is not.\n>>\n>>     git checkout master\n>>     git checkout master^0\n>>\n>> The difference between these two states does *NOT* come from which\n>> commit HEAD points at.\n> Sure.\nFrom an implementation perspective one can go two ways, and we tell the\nuser which way we went, even though, ultimately, we look at the same\ncommit.\n\nThough, for an unborn branch we don't have a null commit value (c.f.\nempty tree) to help in being 'detached at nowhere'.\n>\n>> The difference comes from what happens when you make a new commit\n>> starting from that state.  The former (i.e. you are on a branch)\n>> grows the branch.\n> Sure.\n>\n>> The latter (i.e. you are not on a branch) does not grow any branch.\n> That's one way of looking at it, resulting in this \"detached HEAD\"\n> thingy that is too technical for the git user proper, I think. Moreover,\n> it immediately raises the question: if it doesn't grow any branch, /what/\n> does it grow?\n>\n> Another way of describing it, that I prefer, is that you /are/ on an\n> /unnamed/ branch and new commits grow this particular /unnamed/ branch.\n> No need not only for \"detached\", but even for \"HEAD\" to be known to the\n> user to get the idea, I think.\nI don't think we can start like this and continue with a commit on top\nof the orphaned 'unnamed' branch. (Not tried it though..)\n>\n>> This is an unrelated trivia, but did anybody know that we were\n>> pretty much on the detached HEAD all the time for more than a month\n>> of early life of Git, until cad88fdf (git-init-db: set up the full\n>> default environment, 2005-05-30)?\n> I was not aware, and it seems that in my terminology it'd sound: \"Git\n> didn't have named branches until cad88fdf\".\n>\n> -- Sergey\n\n"},{"id":"410490","messageId":"87zh397cfh.fsf@osv.gnss.ru","threadId":"54633","inReplyTo":"9be54e8e-a702-0eb9-97c9-7a1fac82ed5d@iee.email","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Sergey Organov","fromEmail":"sorganov@gmail.com","sentAt":"2020-11-22T13:23:30Z","receivedAt":"2020-11-22T13:23:37Z","isPatch":true,"sender":{"key":"sorganov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8501568?v=4"},"body":"Philip Oakley <philipoakley@iee.email> writes:\n\n> On 22/11/2020 10:21, Sergey Organov wrote:\n>> Junio C Hamano <gitster@pobox.com> writes:\n>>\n>>> Sergey Organov <sorganov@gmail.com> writes:\n>>>\n>>>> To me \"not on a branch [tip]\" is also confusing, as in fact you are, as\n>>>> is easily seen after you perform a few commits, and now HEAD points\n>>>> directly to the tip of the branch (that has no other references).\n>>> Aren't you confused about what \"on a branch\" means?\n>> I believe I'm not.\n>\n> Isn't this one of those \"implementation detail\" viewpoint arguments,\n> combined with some incompleteness in various places.\n>\n> From a naive english user perspective , 'on' a branch can also mean\n> anywhere along a branch and not just at the tip. Being at a commit along\n> a branch can be tricky to appreciate (that on/at distinction isn't\n> immediately obvious..)\n>>\n>>> After either of these two operations, your HEAD may point at the\n>>> same commit, but the former is on a branch (the master branch), and\n>>> the latter is not.\n>>>\n>>>     git checkout master\n>>>     git checkout master^0\n>>>\n>>> The difference between these two states does *NOT* come from which\n>>> commit HEAD points at.\n>> Sure.\n> From an implementation perspective one can go two ways, and we tell the\n> user which way we went, even though, ultimately, we look at the same\n> commit.\n\nAFAIU, the only difference is that HEAD points to the commit directly in\nthe case of \"detached HEAD\", while it points to the commit indirectly\nthrough the branch reference in the usual case.\n\n>\n> Though, for an unborn branch we don't have a null commit value (c.f.\n> empty tree) to help in being 'detached at nowhere'.\n\nWe can pretend we have a null commit for the sake of regularity, even\nthough Git implementation has none.\n\nActually, it looks like a few things would be easier if Git got the\n\"Adam\" commit that is the ultimate final parent of everything in the\nfirst place, but it didn't.\n\n\n>>\n>>> The difference comes from what happens when you make a new commit\n>>> starting from that state.  The former (i.e. you are on a branch)\n>>> grows the branch.\n>> Sure.\n>>\n>>> The latter (i.e. you are not on a branch) does not grow any branch.\n>> That's one way of looking at it, resulting in this \"detached HEAD\"\n>> thingy that is too technical for the git user proper, I think. Moreover,\n>> it immediately raises the question: if it doesn't grow any branch, /what/\n>> does it grow?\n>>\n>> Another way of describing it, that I prefer, is that you /are/ on an\n>> /unnamed/ branch and new commits grow this particular /unnamed/ branch.\n>> No need not only for \"detached\", but even for \"HEAD\" to be known to the\n>> user to get the idea, I think.\n> I don't think we can start like this and continue with a commit on top\n> of the orphaned 'unnamed' branch. (Not tried it though..)\n\nI rather believe we can, no problems, and that's why \"detached HEAD\" behaves\nexactly as unnamed branch would.\n\nTo make it obvious \"detached HEAD\" is in fact a subset of the usual\ncase, imagine that \"detached HEAD\" is rather first implemented by\npointing to a branch reference with a hidden name that in turn points to\nthe commit, and then this \"incognito branch reference\" is optimized-out\nas being invisible anyway, so HEAD now points to the commit itself.\n\n-- Sergey Organov\n"},{"id":"410498","messageId":"9c285212-3d64-f90c-1b66-9c7172f77ddb@iee.email","threadId":"54633","inReplyTo":"87zh397cfh.fsf@osv.gnss.ru","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.email","sentAt":"2020-11-22T20:18:06Z","receivedAt":"2020-11-22T20:18:13Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"On 22/11/2020 13:23, Sergey Organov wrote:\n>>>> The latter (i.e. you are not on a branch) does not grow any branch.\n>>> That's one way of looking at it, resulting in this \"detached HEAD\"\n>>> thingy that is too technical for the git user proper, I think. Moreover,\n>>> it immediately raises the question: if it doesn't grow any branch, /what/\n>>> does it grow?\n>>>\n>>> Another way of describing it, that I prefer, is that you /are/ on an\n>>> /unnamed/ branch and new commits grow this particular /unnamed/ branch.\n>>> No need not only for \"detached\", but even for \"HEAD\" to be known to the\n>>> user to get the idea, I think.\n>> I don't think we can start like this and continue with a commit on top\n>> of the orphaned 'unnamed' branch. (Not tried it though..)\n> I rather believe we can, no problems, and that's why \"detached HEAD\" behaves\n> exactly as unnamed branch would.\n>\n> To make it obvious \"detached HEAD\" is in fact a subset of the usual\n> case, imagine that \"detached HEAD\" is rather first implemented by\n> pointing to a branch reference with a hidden name that in turn points to\n> the commit, and then this \"incognito branch reference\" is optimized-out\n> as being invisible anyway, so HEAD now points to the commit itself.\n>\nThinking about some options...\n\nAfter a `git init`: We can hack HEAD to \"ref: refs/heads/\" (i.e. a\nsymref to an unnamed branch) and `git status` will report \"No commits yet\".\nMy PS1 will report the current branch as \"()\" (i.e. an empty name).\n\nHowever,\n`git branch` reports \"Failed to resolve HEAD as a valid ref.\", and\n`git commit` reports \"cannot lock ref 'HEAD': there is a non-empty\ndirectory '.git/refs/heads/' blocking reference 'refs/heads/'\".\n\nSo, there could be the option to detect that unnamed ref state (no\ncharacters after the final \"/\") without going \"Fatal:\".\n\nHowever there is still the potential difficulty that after the first\ncommit on that unnamed branch we would have the difficult choice of:\n\n- either keeping that unnamed ref/branch symref, and have nowhere to\nhold the new commit name (oid), because HEAD is already acting as the\nplace holder for the symref,\n- or we have to lose the place holder symref and place the new commit\noid into HEAD, leaving us back at the regular \"detached head\", but for\nan as yet unnamed orphan branch.\n(tested on Windows[1])\n\nFor the second case we would still need to ensure that  protections are\nin place to avoid loosing those detached commits if the user\nswitches/checks out to new branch based on some other oid. (for that to\nhappen then that checkout oid must be somewhere in the unnamed branch,\nbut the latest tip commits should need checking to prevent unexpected\nloss - the current warning may not be enough...)\n\nAt the moment there is a lot of 'lock-in' for the status quo, and the\nalternative may not be any better, and have some backward compatibility\nissues, though those may be overstated, depending on how repos are being\n'shared'.\n\nPhilip\n\n\n[1]\nphili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/unnamed ()\n$ git version\ngit version 2.29.2.windows.2\n\n"},{"id":"410502","messageId":"CAMP44s2eccgXTqFgHwv-ciUJ+v2PkHzHtCpA_+vQ9XZ1Kw6VUA@mail.gmail.com","threadId":"54633","inReplyTo":"87y2it8zfm.fsf@osv.gnss.ru","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-11-22T21:56:22Z","receivedAt":"2020-11-22T21:56:58Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sun, Nov 22, 2020 at 4:24 AM Sergey Organov <sorganov@gmail.com> wrote:\n>\n> Junio C Hamano <gitster@pobox.com> writes:\n\n> > The latter (i.e. you are not on a branch) does not grow any branch.\n>\n> That's one way of looking at it, resulting in this \"detached HEAD\"\n> thingy that is too technical for the git user proper, I think. Moreover,\n> it immediately raises the question: if it doesn't grow any branch, /what/\n> does it grow?\n>\n> Another way of describing it, that I prefer, is that you /are/ on an\n> /unnamed/ branch and new commits grow this particular /unnamed/ branch.\n> No need not only for \"detached\", but even for \"HEAD\" to be known to the\n> user to get the idea, I think.\n\nThis is precisely what it is conceptually.\n\nAnd there's absolutely no need for the user to know what HEAD is\nbehind the curtains, especially since they can just use @, and think\nof it as \"the current branch\".\n\nIt is clearly a branch, for example you can do \"git push origin @:my-fix\".\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"410510","messageId":"xmqq8satosln.fsf@gitster.c.googlers.com","threadId":"54633","inReplyTo":"CAMP44s2eccgXTqFgHwv-ciUJ+v2PkHzHtCpA_+vQ9XZ1Kw6VUA@mail.gmail.com","subject":"Re: [PATCH 00/28] Use main as default branch name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-22T23:54:28Z","receivedAt":"2020-11-22T23:54:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> It is clearly a branch, for example you can do \"git push origin @:my-fix\".\n\nHmm, you can also do \"git push origin c2f3bf071e:maintenance\", but\nit does not make a bare object name a branch.  \n\nAt least I doubt the \"clearly\" part of your statement.  There might\nbe a better example to support the above claim, but this one is not.\n\n\n"},{"id":"410517","messageId":"nycvar.QRO.7.76.6.2011222005160.56@tvgsbejvaqbjf.bet","threadId":"54633","inReplyTo":"xmqqk0uhxhqh.fsf@gitster.c.googlers.com","subject":"Re: [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-22T19:07:52Z","receivedAt":"2020-11-23T09:29:39Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Thu, 19 Nov 2020, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>\n> > On Wed, 18 Nov 2020, Junio C Hamano wrote:\n> >\n> >> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n> >>\n> >> > P.S.: Shouldn't the pull patch in d18c950a69f be using the advice\n> >> >      facility, not warning()?\n> >>\n> >> I think warning() is the right thing here, as it is self squelching.\n> >> Setting pull.rebase (even to 'false') is sufficient---there is no\n> >> need to set advise.setpullrebase to 'false' on top.\n> >\n> > Right. The only reason to use `advise()` would be to allow users to\n> > squelch the warning by setting `advice.*`.\n> >\n> > On the other hand, warnings are not colored, but advice messages are.\n> >\n> > And now I realize that the same holds for `init.defaultBranch`: it is also\n> > self-squelching. And it also might benefit from the coloring to make it\n> > stand out a bit.\n> >\n> > Thoughts?\n>\n> I do not see colors well.  You'll always get \"find some other way to\n> make it stand out more to those like us---if you canhdo so without\n> colors, that would be ideal\" from me, so please don't ask me to vote\n> for more colors.\n\nFrom a purely selfish point of view: colors _do_ serve me well. And from a\nmaintainer's point of view: I added my share of coloring based on users'\nfeedback, so I think that even if it does not benefit everybody equally\nwell, it is valuable to add coloring where helpful.\n\nAs to the aspect \"find some other way to make it stand out\", I believe\nthat `advise()` addresses that _also_, by virtue of prefixing the lines\nwith the uniform `hint:` prefix (which stands out visually, at least to\nme, maybe it also does that for you?).\n\nCiao,\nDscho\n"}]}