{"thread":{"id":"54841","subject":"[PATCH 00/11] Drop the PREPARE_FOR_MAIN_BRANCH prereq","startedAt":"2020-12-17T01:07:55Z","lastAt":"2020-12-17T01:42:18Z","messageCount":13,"participants":["Johannes Schindelin via GitGitGadget","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":11},"messages":[{"id":"412456","messageId":"pull.816.git.1608167230.gitgitgadget@gmail.com","threadId":"54841","inReplyTo":null,"subject":"[PATCH 00/11] Drop the PREPARE_FOR_MAIN_BRANCH prereq","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-12-17T01:06:59Z","receivedAt":"2020-12-17T01:07:55Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"When I started contributing all those patch series to start preparing for\nthe default branch name main, I had the idea that we could change the\ndefault branch name in time for v2.30.0, and therefore felt free to\nintroduce the PREPARE_FOR_MAIN_BRANCH prereq whose sole purpose was to\nadjust a few tests preemptively that would then have to be skipped until the\ntest suite was converted to using main as default branch name.\n\nHowever, this was too ambitious a plan.\n\nThe current state is therefore an undesirable one: we skip a few test cases,\nin preparation for a time when git init will default to using a different\nname than master for the initial branch name, and nobody realistically knows\nwhen this will happen.\n\nTo address that, I spent some time to convert just the affected scripts to\nusing main, adjusting them in a way where they do not depend on the name git\ninit gave the initial branch at all, which allowed me to drop that prereq\naltogether.\n\nNone of these changes should be controversial, intentionally so, to allow\nthis patch series to go in before v2.30.0 is tagged, so that we can enjoy\nthe full coverage of the test suite again.\n\nJohannes Schindelin (11):\n  t1400: use `main` as initial branch name\n  t3200: finish transitioning to the initial branch name `main`\n  t3201: finalize transitioning to using the branch name `main`\n  t3203: complete the transition to using the branch name `main`\n  t3205: finalize transitioning to using the branch name `main`\n  t5505: finalize transitioning to using the branch name `main`\n  t5510: use `main` as initial branch name\n  t5703: use `main` as initial branch name\n  t6302: use `main` as initial branch name\n  t9902: use `main` as initial branch name\n  tests: drop the `PREPARE_FOR_MAIN_BRANCH` prereq\n\n t/t1400-update-ref.sh              |  75 +++----\n t/t3200-branch.sh                  | 265 +++++++++++++------------\n t/t3201-branch-contains.sh         |  83 ++++----\n t/t3203-branch-output.sh           |  43 ++--\n t/t3205-branch-color.sh            |   9 +-\n t/t5505-remote.sh                  | 156 +++++++--------\n t/t5510-fetch.sh                   | 168 ++++++++--------\n t/t5703-upload-pack-ref-in-want.sh |  65 +++---\n t/t6302-for-each-ref-filter.sh     |  59 +++---\n t/t9902-completion.sh              | 309 +++++++++++++++--------------\n t/test-lib.sh                      |   8 -\n 11 files changed, 621 insertions(+), 619 deletions(-)\n\n\nbase-commit: 1c52ecf4ba0f4f7af72775695fee653f50737c71\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-816%2Fdscho%2Fdrop-prepare-for-main-branch-prereq-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-816/dscho/drop-prepare-for-main-branch-prereq-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/816\n-- \ngitgitgadget\n"},{"id":"412457","messageId":"802e8f2cfd2cec86d54202a844665c222f868605.1608167230.git.gitgitgadget@gmail.com","threadId":"54841","inReplyTo":"pull.816.git.1608167230.gitgitgadget@gmail.com","subject":"[PATCH 01/11] t1400: use `main` as initial branch name","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-12-17T01:07:00Z","receivedAt":"2020-12-17T01:08:11Z","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 3224b0f0bb7 (t1400: prepare for `main` being default branch name,\n2020-10-23), we prepared t1400 for a time when the default initial\nbranch name would be `main`.\n\nHowever, there is no need to wait that long: let's adjust the test\nscript to stop relying on a specific initial branch name by setting it\nexplicitly. This allows us to drop the `PREPARE_FOR_MAIN_BRANCH` prereq\nfrom two test cases.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t1400-update-ref.sh | 75 ++++++++++++++++++++++---------------------\n 1 file changed, 38 insertions(+), 37 deletions(-)\n\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex 31b64be521d..6ee7d216fb8 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@@ -27,10 +27,11 @@ create_test_commits ()\n }\n \n test_expect_success setup '\n+\tgit checkout --orphan main &&\n \tcreate_test_commits \"\" &&\n \tmkdir $bare &&\n \tcd $bare &&\n-\tgit init --bare &&\n+\tgit init --bare -b main &&\n \tcreate_test_commits \"bare\" &&\n \tcd -\n '\n@@ -264,7 +265,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@@ -300,7 +301,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@@ -364,68 +365,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@@ -467,14 +468,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@@ -586,21 +587,21 @@ 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+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 '\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' '\n@@ -710,7 +711,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 &&\n-- \ngitgitgadget\n\n"},{"id":"412458","messageId":"fd58ce9e56c7f832d4c62ac444e69332c8ea7b96.1608167230.git.gitgitgadget@gmail.com","threadId":"54841","inReplyTo":"pull.816.git.1608167230.gitgitgadget@gmail.com","subject":"[PATCH 02/11] t3200: finish transitioning to the initial branch name `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-12-17T01:07:01Z","receivedAt":"2020-12-17T01:08:11Z","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 56300ff356b (t3200: prepare for `main` being shorter than `master`,\n2020-10-23) and in 66713e84e71 (tests: prepare aligned mentions of the\ndefault branch name, 2020-10-23), we started to prepare t3200 for a new\nworld where `git init` uses the branch name `main` for the initial\nbranch.\n\nWe do not even have to wait for that new world: we can easily ensure\nthat that branch name is used, independent of the exact name `git init`\nwill give the initial branch, so let's do that.\n\nThis also lets us remove the `PREPARE_FOR_MAIN_BRANCH` prereq from three\ntest cases in that script.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3200-branch.sh | 265 +++++++++++++++++++++++-----------------------\n 1 file changed, 133 insertions(+), 132 deletions(-)\n\ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex a0b832d59e6..3ec3e1d7303 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -12,6 +12,7 @@ test_expect_success 'prepare a trivial repository' '\n \techo Hello >A &&\n \tgit update-index --add A &&\n \tgit commit -m \"Initial commit.\" &&\n+\tgit branch -M main &&\n \techo World >>A &&\n \tgit update-index --add A &&\n \tgit commit -m \"Second commit.\" &&\n@@ -27,8 +28,8 @@ test_expect_success 'branch -h in broken repository' '\n \tmkdir broken &&\n \t(\n \t\tcd broken &&\n-\t\tgit init &&\n-\t\t>.git/refs/heads/master &&\n+\t\tgit init -b main &&\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 +43,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 +52,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 +111,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 +125,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@@ -178,14 +179,14 @@ test_expect_success 'git branch -M baz bam should add entries to .git/logs/HEAD'\n '\n \n test_expect_success 'git branch -M should leave orphaned HEAD alone' '\n-\tgit init orphan &&\n+\tgit init -b main orphan &&\n \t(\n \t\tcd orphan &&\n \t\ttest_commit initial &&\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 +202,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 +225,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@@ -289,11 +290,11 @@ test_expect_success 'deleting checked-out branch from repo that is a submodule'\n test_expect_success 'bare main worktree has HEAD at branch deleted by secondary worktree' '\n \ttest_when_finished \"rm -rf nonbare base secondary\" &&\n \n-\tgit init nonbare &&\n+\tgit init -b main 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@@ -321,7 +322,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@@ -345,7 +346,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@@ -358,7 +359,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 +376,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 &&\n@@ -388,7 +389,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 +428,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 +588,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 +621,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 +712,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 +729,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 +758,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 +837,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 +875,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 +907,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 +935,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 +957,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 +991,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 +1050,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 +1061,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 +1072,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 +1083,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 +1094,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 +1115,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 +1125,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 +1136,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 +1147,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 +1158,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 +1169,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 +1180,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 +1191,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 +1202,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 +1213,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 +1222,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 +1250,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 +1288,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 +1302,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@@ -1324,17 +1325,17 @@ test_expect_success '--list during rebase from detached HEAD' '\n \n test_expect_success 'tracking with unexpected .fetch refspec' '\n \trm -rf a b c d &&\n-\tgit init a &&\n+\tgit init -b main a &&\n \t(\n \t\tcd a &&\n \t\ttest_commit a\n \t) &&\n-\tgit init b &&\n+\tgit init -b main b &&\n \t(\n \t\tcd b &&\n \t\ttest_commit b\n \t) &&\n-\tgit init c &&\n+\tgit init -b main c &&\n \t(\n \t\tcd c &&\n \t\ttest_commit c &&\n@@ -1342,23 +1343,23 @@ test_expect_success 'tracking with unexpected .fetch refspec' '\n \t\tgit remote add b ../b &&\n \t\tgit fetch --all\n \t) &&\n-\tgit init d &&\n+\tgit init -b main d &&\n \t(\n \t\tcd d &&\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 \n test_expect_success 'configured committerdate sort' '\n-\tgit init sort &&\n+\tgit init -b main sort &&\n \t(\n \t\tcd sort &&\n \t\tgit config branch.sort committerdate &&\n@@ -1371,7 +1372,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 +1390,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)\n-- \ngitgitgadget\n\n"},{"id":"412459","messageId":"4360881016dd204c63288ee04588db1a469a6752.1608167230.git.gitgitgadget@gmail.com","threadId":"54841","inReplyTo":"pull.816.git.1608167230.gitgitgadget@gmail.com","subject":"[PATCH 03/11] t3201: finalize transitioning to using the branch name `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-12-17T01:07:02Z","receivedAt":"2020-12-17T01:08:12Z","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 66713e84e71 (tests: prepare aligned mentions of the default branch\nname, 2020-10-23), we started that transition, trying to prepare for a\ntime when `git init` would use that name for the initial branch.\n\nEven if that time has not arrived, we can complete the transition by\nmaking the test script independent of the default branch name. This also\nallows us to drop the `PREPARE_FOR_MAIN_BRANCH` prereq from one test\ncase.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3201-branch-contains.sh | 83 +++++++++++++++++++-------------------\n 1 file changed, 42 insertions(+), 41 deletions(-)\n\ndiff --git a/t/t3201-branch-contains.sh b/t/t3201-branch-contains.sh\nindex 3733cd0091e..6c1ab69ca6d 100755\n--- a/t/t3201-branch-contains.sh\n+++ b/t/t3201-branch-contains.sh\n@@ -10,51 +10,52 @@ test_expect_success setup '\n \tgit add file &&\n \ttest_tick &&\n \tgit commit -m initial &&\n+\tgit branch -M main &&\n \tgit branch side &&\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 +74,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 +82,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 +92,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 +101,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 +110,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 +125,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 +148,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 +173,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 +189,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 +201,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 +215,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 +240,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+test_expect_success 'branch --merged with --verbose' '\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\n-- \ngitgitgadget\n\n"},{"id":"412460","messageId":"34309526806256171215daf54b4e283eb3e7e0a7.1608167230.git.gitgitgadget@gmail.com","threadId":"54841","inReplyTo":"pull.816.git.1608167230.gitgitgadget@gmail.com","subject":"[PATCH 06/11] t5505: finalize transitioning to using the branch name `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-12-17T01:07:05Z","receivedAt":"2020-12-17T01:08:37Z","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 66713e84e71 (tests: prepare aligned mentions of the default branch\nname, 2020-10-23), we started that transition, trying to prepare for a\ntime when `git init` would use that name for the initial branch.\n\nEven if that time has not arrived, we can complete the transition by\nmaking the test script independent of the default branch name. This also\nallows us to drop the `PREPARE_FOR_MAIN_BRANCH` prereq from four test\ncases.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5505-remote.sh | 156 +++++++++++++++++++++++-----------------------\n 1 file changed, 78 insertions(+), 78 deletions(-)\n\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex eaa6e902204..ecadf02d64b 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -7,7 +7,7 @@ test_description='git remote porcelain-ish'\n setup_repository () {\n \tmkdir \"$1\" && (\n \tcd \"$1\" &&\n-\tgit init &&\n+\tgit init -b main &&\n \t>file &&\n \tgit add file &&\n \ttest_tick &&\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,32 +221,32 @@ 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 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/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@@ -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@@ -322,18 +322,18 @@ 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 '\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 \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@@ -394,7 +394,7 @@ test_expect_success 'add --mirror && prune' '\n \n test_expect_success 'add --mirror=fetch' '\n \tmkdir mirror-fetch &&\n-\tgit init mirror-fetch/parent &&\n+\tgit init -b main mirror-fetch/parent &&\n \t(\n \t\tcd mirror-fetch/parent &&\n \t\ttest_commit one\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@@ -465,7 +465,7 @@ test_expect_success 'fetch mirror respects specific branches' '\n test_expect_success 'add --mirror=push' '\n \tmkdir mirror-push &&\n \tgit init --bare mirror-push/public &&\n-\tgit init mirror-push/private &&\n+\tgit init -b main mirror-push/private &&\n \t(\n \t\tcd mirror-push/private &&\n \t\ttest_commit one &&\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@@ -923,12 +923,12 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '\n \t(\n \t\tcd six &&\n \t\tgit remote rm origin &&\n-\t\techo \"$origin_url\" >.git/branches/origin &&\n+\t\techo \"$origin_url#main\" >.git/branches/origin &&\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@@ -1348,10 +1348,10 @@ 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 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) &&\n-- \ngitgitgadget\n\n"},{"id":"412461","messageId":"b8e7b6ed428b8ebd4ae7625cf818ed523535f6fd.1608167230.git.gitgitgadget@gmail.com","threadId":"54841","inReplyTo":"pull.816.git.1608167230.gitgitgadget@gmail.com","subject":"[PATCH 04/11] t3203: complete the transition to using the branch name `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-12-17T01:07:03Z","receivedAt":"2020-12-17T01:08:38Z","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 66713e84e71 (tests: prepare aligned mentions of the default branch\nname, 2020-10-23), we started that transition, trying to prepare for a\ntime when `git init` would use that name for the initial branch.\n\nEven if that time has not arrived, we can complete the transition by\nmaking the test script independent of the default branch name. This also\nallows us to drop the `PREPARE_FOR_MAIN_BRANCH` prereq from one test\ncase.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3203-branch-output.sh | 43 ++++++++++++++++++++--------------------\n 1 file changed, 22 insertions(+), 21 deletions(-)\n\ndiff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh\nindex d65586541d2..b945faf4702 100755\n--- a/t/t3203-branch-output.sh\n+++ b/t/t3203-branch-output.sh\n@@ -8,6 +8,7 @@ test_expect_success 'make commits' '\n \techo content >file &&\n \tgit add file &&\n \tgit commit -m one &&\n+\tgit branch -M main &&\n \techo content >>file &&\n \tgit commit -a -m two\n '\n@@ -26,7 +27,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 +61,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 +153,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 +161,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 +178,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 +190,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 +203,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 +215,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 +224,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@@ -251,7 +252,7 @@ test_expect_success 'local-branch symrefs shortened properly' '\n \n test_expect_success 'sort branches, ignore case' '\n \t(\n-\t\tgit init sort-icase &&\n+\t\tgit init -b main sort-icase &&\n \t\tcd sort-icase &&\n \t\ttest_commit initial &&\n \t\tgit branch branch-one &&\n@@ -260,14 +261,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 +280,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 +294,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 +307,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@@ -329,9 +330,9 @@ 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 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\n-- \ngitgitgadget\n\n"},{"id":"412462","messageId":"3dc48ce96867005b55f44e41e9baab7f0750ab98.1608167230.git.gitgitgadget@gmail.com","threadId":"54841","inReplyTo":"pull.816.git.1608167230.gitgitgadget@gmail.com","subject":"[PATCH 11/11] tests: drop the `PREPARE_FOR_MAIN_BRANCH` prereq","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-12-17T01:07:10Z","receivedAt":"2020-12-17T01:08: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\nWe no longer use it.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/test-lib.sh | 8 --------\n 1 file changed, 8 deletions(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex a863ccee7e9..9fa7c1d0f6d 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -1712,14 +1712,6 @@ 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-test_lazy_prereq PREPARE_FOR_MAIN_BRANCH '\n-\ttest \"$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\" = main\n-'\n-\n # Ensure that no test accidentally triggers a Git command\n # that runs 'crontab', affecting a user's cron schedule.\n # Tests that verify the cron integration must set this locally\n-- \ngitgitgadget\n"},{"id":"412463","messageId":"ac494c4431cf1fc77bb93a9753a30e5aa65731ed.1608167230.git.gitgitgadget@gmail.com","threadId":"54841","inReplyTo":"pull.816.git.1608167230.gitgitgadget@gmail.com","subject":"[PATCH 09/11] t6302: use `main` as initial branch name","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-12-17T01:07:08Z","receivedAt":"2020-12-17T01:08: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\nIn 66713e84e71 (tests: prepare aligned mentions of the default branch\nname, 2020-10-23), we started adjusting this test script for the default\ninitial branch name changing to `main`.\n\nHowever, there is no need to wait for that: let's adjust the test script\nto stop relying on a specific initial branch name by setting it\nexplicitly. This allows us to drop the `PREPARE_FOR_MAIN_BRANCH` prereq\nfrom six test cases.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t6302-for-each-ref-filter.sh | 59 +++++++++++++++++-----------------\n 1 file changed, 30 insertions(+), 29 deletions(-)\n\ndiff --git a/t/t6302-for-each-ref-filter.sh b/t/t6302-for-each-ref-filter.sh\nindex 0a21669f56d..9b8c8b2842f 100755\n--- a/t/t6302-for-each-ref-filter.sh\n+++ b/t/t6302-for-each-ref-filter.sh\n@@ -7,6 +7,7 @@ test_description='test for-each-refs usage of ref-filter APIs'\n \n test_expect_success 'setup some history and refs' '\n \ttest_commit one &&\n+\tgit branch -M main &&\n \ttest_commit two &&\n \ttest_commit three &&\n \tgit checkout -b side &&\n@@ -26,17 +27,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 +54,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 +73,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@@ -113,7 +114,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 +132,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 +150,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 +185,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 +214,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 +232,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@@ -251,7 +252,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 +270,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 +288,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 +361,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 +382,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 +402,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 +421,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 +444,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":"412464","messageId":"fa4063cf9feed180a8f4869680d13b51823306a2.1608167230.git.gitgitgadget@gmail.com","threadId":"54841","inReplyTo":"pull.816.git.1608167230.gitgitgadget@gmail.com","subject":"[PATCH 05/11] t3205: finalize transitioning to using the branch name `main`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-12-17T01:07:04Z","receivedAt":"2020-12-17T01:08: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\nIn 66713e84e71 (tests: prepare aligned mentions of the default branch\nname, 2020-10-23), we started that transition, trying to prepare for a\ntime when `git init` would use that name for the initial branch.\n\nEven if that time has not arrived, we can complete the transition by\nmaking the test script independent of the default branch name. This also\nallows us to drop the `PREPARE_FOR_MAIN_BRANCH` prereq from one test\ncase.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3205-branch-color.sh | 9 +++++----\n 1 file changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t3205-branch-color.sh b/t/t3205-branch-color.sh\nindex 289625c4646..da1c202fa71 100755\n--- a/t/t3205-branch-color.sh\n+++ b/t/t3205-branch-color.sh\n@@ -5,7 +5,8 @@ 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 branch -M main &&\n+\tgit update-ref refs/remotes/origin/main HEAD &&\n \tgit update-ref refs/heads/other HEAD\n '\n \n@@ -19,16 +20,16 @@ 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 &&\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\n-- \ngitgitgadget\n\n"},{"id":"412465","messageId":"e87b344df47d9a1f46ed41c2c387ada83f356ab0.1608167230.git.gitgitgadget@gmail.com","threadId":"54841","inReplyTo":"pull.816.git.1608167230.gitgitgadget@gmail.com","subject":"[PATCH 08/11] t5703: use `main` as initial branch name","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-12-17T01:07:07Z","receivedAt":"2020-12-17T01:08: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\nIn 97cf8d50b59 (t5703: adjust a test case for the upcoming default\nbranch name, 2020-10-23), we prepared this test script for a world when\nthe default initial branch name would be `main`.\n\nHowever, there is no need to wait for that: let's adjust the test script\nto stop relying on a specific initial branch name by setting it\nexplicitly. This allows us to drop the `PREPARE_FOR_MAIN_BRANCH` prereq\nfrom one test case.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5703-upload-pack-ref-in-want.sh | 65 +++++++++++++++---------------\n 1 file changed, 33 insertions(+), 32 deletions(-)\n\ndiff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\nindex b46940b725b..eab966985b7 100755\n--- a/t/t5703-upload-pack-ref-in-want.sh\n+++ b/t/t5703-upload-pack-ref-in-want.sh\n@@ -38,12 +38,13 @@ 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 test_expect_success 'setup repository' '\n \ttest_commit a &&\n+\tgit branch -M main &&\n \tgit checkout -b o/foo &&\n \ttest_commit b &&\n \ttest_commit c &&\n@@ -51,7 +52,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 +89,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 +98,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 +136,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 +144,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 +183,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,10 +194,10 @@ 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+\t\tgit init -b main \"$REPO\" &&\n \t\tcd \"$REPO\" &&\n \t\ttest_commit a &&\n \n@@ -209,7 +210,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 +219,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 +246,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 +262,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@@ -301,7 +302,7 @@ LOCAL_PRISTINE=\"$(pwd)/local_pristine\"\n \n test_expect_success 'setup repos for change-while-negotiating test' '\n \t(\n-\t\tgit init \"$REPO\" &&\n+\t\tgit init -b main \"$REPO\" &&\n \t\tcd \"$REPO\" &&\n \t\t>.git/git-daemon-export-ok &&\n \t\ttest_commit m1 &&\n@@ -316,7 +317,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 +343,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 +352,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 +364,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,15 +376,15 @@ 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 \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 &&\n-- \ngitgitgadget\n\n"},{"id":"412466","messageId":"ba7d113587597fdce68860ab9d9074cbf12e1368.1608167230.git.gitgitgadget@gmail.com","threadId":"54841","inReplyTo":"pull.816.git.1608167230.gitgitgadget@gmail.com","subject":"[PATCH 10/11] t9902: use `main` as initial branch name","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-12-17T01:07:09Z","receivedAt":"2020-12-17T01:08: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\nIn 8164360fc86 (t9902: prepare a test for the upcoming default branch\nname, 2020-10-23), we started adjusting this test script for the default\ninitial branch name changing to `main`.\n\nHowever, there is no need to wait for that: let's adjust the test script\nto stop relying on a specific initial branch name by setting it\nexplicitly. This allows us to drop the `PREPARE_FOR_MAIN_BRANCH` prereq\nfrom one test case.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9902-completion.sh | 309 +++++++++++++++++++++---------------------\n 1 file changed, 155 insertions(+), 154 deletions(-)\n\ndiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\nindex 81a728c7433..a1c4f1f6d40 100755\n--- a/t/t9902-completion.sh\n+++ b/t/t9902-completion.sh\n@@ -136,7 +136,7 @@ fi\n test_expect_success 'setup for __git_find_repo_path/__gitdir tests' '\n \tmkdir -p subdir/subsubdir &&\n \tmkdir -p non-repo &&\n-\tgit init otherrepo\n+\tgit init -b main otherrepo\n '\n \n test_expect_success '__git_find_repo_path - from command line (through $__git_dir)' '\n@@ -614,12 +614,13 @@ test_expect_success '__git_is_configured_remote' '\n \n test_expect_success 'setup for ref completion' '\n \tgit commit --allow-empty -m initial &&\n+\tgit branch -M main &&\n \tgit branch matching-branch &&\n \tgit tag matching-tag &&\n \t(\n \t\tcd otherrepo &&\n \t\tgit commit --allow-empty -m initial &&\n-\t\tgit branch -m master master-in-other &&\n+\t\tgit branch -m main main-in-other &&\n \t\tgit branch branch-in-other &&\n \t\tgit tag tag-in-other\n \t) &&\n@@ -632,10 +633,10 @@ test_expect_success 'setup for ref completion' '\n test_expect_success '__git_refs - simple' '\n \tcat >expected <<-EOF &&\n \tHEAD\n-\tmaster\n+\tmain\n \tmatching-branch\n \tother/branch-in-other\n-\tother/master-in-other\n+\tother/main-in-other\n \tmatching-tag\n \tEOF\n \t(\n@@ -647,10 +648,10 @@ test_expect_success '__git_refs - simple' '\n \n test_expect_success '__git_refs - full refs' '\n \tcat >expected <<-EOF &&\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/heads/matching-branch\n \trefs/remotes/other/branch-in-other\n-\trefs/remotes/other/master-in-other\n+\trefs/remotes/other/main-in-other\n \trefs/tags/matching-tag\n \tEOF\n \t(\n@@ -664,7 +665,7 @@ test_expect_success '__git_refs - repo given on the command line' '\n \tcat >expected <<-EOF &&\n \tHEAD\n \tbranch-in-other\n-\tmaster-in-other\n+\tmain-in-other\n \ttag-in-other\n \tEOF\n \t(\n@@ -679,7 +680,7 @@ test_expect_success '__git_refs - remote on local file system' '\n \tcat >expected <<-EOF &&\n \tHEAD\n \tbranch-in-other\n-\tmaster-in-other\n+\tmain-in-other\n \ttag-in-other\n \tEOF\n \t(\n@@ -692,7 +693,7 @@ test_expect_success '__git_refs - remote on local file system' '\n test_expect_success '__git_refs - remote on local file system - full refs' '\n \tcat >expected <<-EOF &&\n \trefs/heads/branch-in-other\n-\trefs/heads/master-in-other\n+\trefs/heads/main-in-other\n \trefs/tags/tag-in-other\n \tEOF\n \t(\n@@ -706,7 +707,7 @@ test_expect_success '__git_refs - configured remote' '\n \tcat >expected <<-EOF &&\n \tHEAD\n \tbranch-in-other\n-\tmaster-in-other\n+\tmain-in-other\n \tEOF\n \t(\n \t\tcur= &&\n@@ -719,7 +720,7 @@ test_expect_success '__git_refs - configured remote - full refs' '\n \tcat >expected <<-EOF &&\n \tHEAD\n \trefs/heads/branch-in-other\n-\trefs/heads/master-in-other\n+\trefs/heads/main-in-other\n \trefs/tags/tag-in-other\n \tEOF\n \t(\n@@ -733,7 +734,7 @@ test_expect_success '__git_refs - configured remote - repo given on the command\n \tcat >expected <<-EOF &&\n \tHEAD\n \tbranch-in-other\n-\tmaster-in-other\n+\tmain-in-other\n \tEOF\n \t(\n \t\tcd thirdrepo &&\n@@ -748,7 +749,7 @@ test_expect_success '__git_refs - configured remote - full refs - repo given on\n \tcat >expected <<-EOF &&\n \tHEAD\n \trefs/heads/branch-in-other\n-\trefs/heads/master-in-other\n+\trefs/heads/main-in-other\n \trefs/tags/tag-in-other\n \tEOF\n \t(\n@@ -764,7 +765,7 @@ test_expect_success '__git_refs - configured remote - remote name matches a dire\n \tcat >expected <<-EOF &&\n \tHEAD\n \tbranch-in-other\n-\tmaster-in-other\n+\tmain-in-other\n \tEOF\n \tmkdir other &&\n \ttest_when_finished \"rm -rf other\" &&\n@@ -779,7 +780,7 @@ test_expect_success '__git_refs - URL remote' '\n \tcat >expected <<-EOF &&\n \tHEAD\n \tbranch-in-other\n-\tmaster-in-other\n+\tmain-in-other\n \ttag-in-other\n \tEOF\n \t(\n@@ -793,7 +794,7 @@ test_expect_success '__git_refs - URL remote - full refs' '\n \tcat >expected <<-EOF &&\n \tHEAD\n \trefs/heads/branch-in-other\n-\trefs/heads/master-in-other\n+\trefs/heads/main-in-other\n \trefs/tags/tag-in-other\n \tEOF\n \t(\n@@ -849,23 +850,23 @@ test_expect_success '__git_refs - not in a git repository' '\n test_expect_success '__git_refs - unique remote branches for git checkout DWIMery' '\n \tcat >expected <<-EOF &&\n \tHEAD\n-\tmaster\n+\tmain\n \tmatching-branch\n \tother/ambiguous\n \tother/branch-in-other\n-\tother/master-in-other\n+\tother/main-in-other\n \tremote/ambiguous\n \tremote/branch-in-remote\n \tmatching-tag\n \tbranch-in-other\n \tbranch-in-remote\n-\tmaster-in-other\n+\tmain-in-other\n \tEOF\n \tfor remote_ref in refs/remotes/other/ambiguous \\\n \t\trefs/remotes/remote/ambiguous \\\n \t\trefs/remotes/remote/branch-in-remote\n \tdo\n-\t\tgit update-ref $remote_ref master &&\n+\t\tgit update-ref $remote_ref main &&\n \t\ttest_when_finished \"git update-ref -d $remote_ref\"\n \tdone &&\n \t(\n@@ -878,10 +879,10 @@ test_expect_success '__git_refs - unique remote branches for git checkout DWIMer\n test_expect_success '__git_refs - after --opt=' '\n \tcat >expected <<-EOF &&\n \tHEAD\n-\tmaster\n+\tmain\n \tmatching-branch\n \tother/branch-in-other\n-\tother/master-in-other\n+\tother/main-in-other\n \tmatching-tag\n \tEOF\n \t(\n@@ -893,10 +894,10 @@ test_expect_success '__git_refs - after --opt=' '\n \n test_expect_success '__git_refs - after --opt= - full refs' '\n \tcat >expected <<-EOF &&\n-\trefs/heads/master\n+\trefs/heads/main\n \trefs/heads/matching-branch\n \trefs/remotes/other/branch-in-other\n-\trefs/remotes/other/master-in-other\n+\trefs/remotes/other/main-in-other\n \trefs/tags/matching-tag\n \tEOF\n \t(\n@@ -909,10 +910,10 @@ test_expect_success '__git_refs - after --opt= - full refs' '\n test_expect_success '__git refs - excluding refs' '\n \tcat >expected <<-EOF &&\n \t^HEAD\n-\t^master\n+\t^main\n \t^matching-branch\n \t^other/branch-in-other\n-\t^other/master-in-other\n+\t^other/main-in-other\n \t^matching-tag\n \tEOF\n \t(\n@@ -924,10 +925,10 @@ test_expect_success '__git refs - excluding refs' '\n \n test_expect_success '__git refs - excluding full refs' '\n \tcat >expected <<-EOF &&\n-\t^refs/heads/master\n+\t^refs/heads/main\n \t^refs/heads/matching-branch\n \t^refs/remotes/other/branch-in-other\n-\t^refs/remotes/other/master-in-other\n+\t^refs/remotes/other/main-in-other\n \t^refs/tags/matching-tag\n \tEOF\n \t(\n@@ -948,17 +949,17 @@ test_expect_success 'setup for filtering matching refs' '\n test_expect_success '__git_refs - do not filter refs unless told so' '\n \tcat >expected <<-EOF &&\n \tHEAD\n-\tmaster\n+\tmain\n \tmatching-branch\n \tmatching/branch\n \tother/branch-in-other\n-\tother/master-in-other\n+\tother/main-in-other\n \tother/matching/branch-in-other\n \tmatching-tag\n \tmatching/tag\n \tEOF\n \t(\n-\t\tcur=master &&\n+\t\tcur=main &&\n \t\t__git_refs >\"$actual\"\n \t) &&\n \ttest_cmp expected \"$actual\"\n@@ -992,7 +993,7 @@ test_expect_success '__git_refs - only matching refs - full refs' '\n \n test_expect_success '__git_refs - only matching refs - remote on local file system' '\n \tcat >expected <<-EOF &&\n-\tmaster-in-other\n+\tmain-in-other\n \tmatching/branch-in-other\n \tEOF\n \t(\n@@ -1004,7 +1005,7 @@ test_expect_success '__git_refs - only matching refs - remote on local file syst\n \n test_expect_success '__git_refs - only matching refs - configured remote' '\n \tcat >expected <<-EOF &&\n-\tmaster-in-other\n+\tmain-in-other\n \tmatching/branch-in-other\n \tEOF\n \t(\n@@ -1016,7 +1017,7 @@ test_expect_success '__git_refs - only matching refs - configured remote' '\n \n test_expect_success '__git_refs - only matching refs - remote - full refs' '\n \tcat >expected <<-EOF &&\n-\trefs/heads/master-in-other\n+\trefs/heads/main-in-other\n \trefs/heads/matching/branch-in-other\n \tEOF\n \t(\n@@ -1038,7 +1039,7 @@ test_expect_success '__git_refs - only matching refs - checkout DWIMery' '\n \t\trefs/remotes/remote/ambiguous \\\n \t\trefs/remotes/remote/branch-in-remote\n \tdo\n-\t\tgit update-ref $remote_ref master &&\n+\t\tgit update-ref $remote_ref main &&\n \t\ttest_when_finished \"git update-ref -d $remote_ref\"\n \tdone &&\n \t(\n@@ -1055,9 +1056,9 @@ 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+\tevil-%%-%42-%(refname)..main\n \tEOF\n \t(\n \t\tcur=\"evil-%%-%42-%(refname)..mai\" &&\n@@ -1069,10 +1070,10 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH '__git_refs - for-each-ref format sp\n test_expect_success '__git_complete_refs - simple' '\n \tsed -e \"s/Z$//\" >expected <<-EOF &&\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tmatching-tag Z\n \tEOF\n \t(\n@@ -1100,7 +1101,7 @@ test_expect_success '__git_complete_refs - remote' '\n \tsed -e \"s/Z$//\" >expected <<-EOF &&\n \tHEAD Z\n \tbranch-in-other Z\n-\tmaster-in-other Z\n+\tmain-in-other Z\n \tEOF\n \t(\n \t\tcur= &&\n@@ -1113,13 +1114,13 @@ test_expect_success '__git_complete_refs - remote' '\n test_expect_success '__git_complete_refs - track' '\n \tsed -e \"s/Z$//\" >expected <<-EOF &&\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tmatching-tag Z\n \tbranch-in-other Z\n-\tmaster-in-other Z\n+\tmain-in-other Z\n \tEOF\n \t(\n \t\tcur= &&\n@@ -1158,10 +1159,10 @@ test_expect_success '__git_complete_refs - prefix' '\n test_expect_success '__git_complete_refs - suffix' '\n \tcat >expected <<-EOF &&\n \tHEAD.\n-\tmaster.\n+\tmain.\n \tmatching-branch.\n \tother/branch-in-other.\n-\tother/master-in-other.\n+\tother/main-in-other.\n \tmatching-tag.\n \tEOF\n \t(\n@@ -1176,7 +1177,7 @@ test_expect_success '__git_complete_fetch_refspecs - simple' '\n \tsed -e \"s/Z$//\" >expected <<-EOF &&\n \tHEAD:HEAD Z\n \tbranch-in-other:branch-in-other Z\n-\tmaster-in-other:master-in-other Z\n+\tmain-in-other:main-in-other Z\n \tEOF\n \t(\n \t\tcur= &&\n@@ -1202,7 +1203,7 @@ test_expect_success '__git_complete_fetch_refspecs - prefix' '\n \tsed -e \"s/Z$//\" >expected <<-EOF &&\n \t+HEAD:HEAD Z\n \t+branch-in-other:branch-in-other Z\n-\t+master-in-other:master-in-other Z\n+\t+main-in-other:main-in-other Z\n \tEOF\n \t(\n \t\tcur=\"+\" &&\n@@ -1215,7 +1216,7 @@ test_expect_success '__git_complete_fetch_refspecs - prefix' '\n test_expect_success '__git_complete_fetch_refspecs - fully qualified' '\n \tsed -e \"s/Z$//\" >expected <<-EOF &&\n \trefs/heads/branch-in-other:refs/heads/branch-in-other Z\n-\trefs/heads/master-in-other:refs/heads/master-in-other Z\n+\trefs/heads/main-in-other:refs/heads/main-in-other Z\n \trefs/tags/tag-in-other:refs/tags/tag-in-other Z\n \tEOF\n \t(\n@@ -1229,7 +1230,7 @@ test_expect_success '__git_complete_fetch_refspecs - fully qualified' '\n test_expect_success '__git_complete_fetch_refspecs - fully qualified & prefix' '\n \tsed -e \"s/Z$//\" >expected <<-EOF &&\n \t+refs/heads/branch-in-other:refs/heads/branch-in-other Z\n-\t+refs/heads/master-in-other:refs/heads/master-in-other Z\n+\t+refs/heads/main-in-other:refs/heads/main-in-other Z\n \t+refs/tags/tag-in-other:refs/tags/tag-in-other Z\n \tEOF\n \t(\n@@ -1243,8 +1244,8 @@ test_expect_success '__git_complete_fetch_refspecs - fully qualified & prefix' '\n test_expect_success 'git switch - with no options, complete local branches and unique remote branch names for DWIM logic' '\n \ttest_completion \"git switch \" <<-\\EOF\n \tbranch-in-other Z\n-\tmaster Z\n-\tmaster-in-other Z\n+\tmain Z\n+\tmain-in-other Z\n \tmatching-branch Z\n \tEOF\n '\n@@ -1253,25 +1254,25 @@ test_expect_success 'git checkout - completes refs and unique remote branches fo\n \ttest_completion \"git checkout \" <<-\\EOF\n \tHEAD Z\n \tbranch-in-other Z\n-\tmaster Z\n-\tmaster-in-other Z\n+\tmain Z\n+\tmain-in-other Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git switch - with --no-guess, complete only local branches' '\n \ttest_completion \"git switch --no-guess \" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tEOF\n '\n \n test_expect_success 'git switch - with GIT_COMPLETION_CHECKOUT_NO_GUESS=1, complete only local branches' '\n \tGIT_COMPLETION_CHECKOUT_NO_GUESS=1 test_completion \"git switch \" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tEOF\n '\n@@ -1279,8 +1280,8 @@ test_expect_success 'git switch - with GIT_COMPLETION_CHECKOUT_NO_GUESS=1, compl\n test_expect_success 'git switch - --guess overrides GIT_COMPLETION_CHECKOUT_NO_GUESS=1, complete local branches and unique remote names for DWIM logic' '\n \tGIT_COMPLETION_CHECKOUT_NO_GUESS=1 test_completion \"git switch --guess \" <<-\\EOF\n \tbranch-in-other Z\n-\tmaster Z\n-\tmaster-in-other Z\n+\tmain Z\n+\tmain-in-other Z\n \tmatching-branch Z\n \tEOF\n '\n@@ -1288,15 +1289,15 @@ test_expect_success 'git switch - --guess overrides GIT_COMPLETION_CHECKOUT_NO_G\n test_expect_success 'git switch - a later --guess overrides previous --no-guess, complete local and remote unique branches for DWIM' '\n \ttest_completion \"git switch --no-guess --guess \" <<-\\EOF\n \tbranch-in-other Z\n-\tmaster Z\n-\tmaster-in-other Z\n+\tmain Z\n+\tmain-in-other Z\n \tmatching-branch Z\n \tEOF\n '\n \n test_expect_success 'git switch - a later --no-guess overrides previous --guess, complete only local branches' '\n \ttest_completion \"git switch --guess --no-guess \" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tEOF\n '\n@@ -1304,11 +1305,11 @@ test_expect_success 'git switch - a later --no-guess overrides previous --guess,\n test_expect_success 'git checkout - with GIT_COMPLETION_NO_GUESS=1 only completes refs' '\n \tGIT_COMPLETION_CHECKOUT_NO_GUESS=1 test_completion \"git checkout \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n@@ -1316,23 +1317,23 @@ test_expect_success 'git checkout - --guess overrides GIT_COMPLETION_NO_GUESS=1,\n \tGIT_COMPLETION_CHECKOUT_NO_GUESS=1 test_completion \"git checkout --guess \" <<-\\EOF\n \tHEAD Z\n \tbranch-in-other Z\n-\tmaster Z\n-\tmaster-in-other Z\n+\tmain Z\n+\tmain-in-other Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git checkout - with --no-guess, only completes refs' '\n \ttest_completion \"git checkout --no-guess \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n@@ -1340,23 +1341,23 @@ test_expect_success 'git checkout - a later --guess overrides previous --no-gues\n \ttest_completion \"git checkout --no-guess --guess \" <<-\\EOF\n \tHEAD Z\n \tbranch-in-other Z\n-\tmaster Z\n-\tmaster-in-other Z\n+\tmain Z\n+\tmain-in-other Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git checkout - a later --no-guess overrides previous --guess, complete only refs' '\n \ttest_completion \"git checkout --guess --no-guess \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n@@ -1364,11 +1365,11 @@ test_expect_success 'git checkout - with checkout.guess = false, only completes\n \ttest_config checkout.guess false &&\n \ttest_completion \"git checkout \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n@@ -1377,12 +1378,12 @@ test_expect_success 'git checkout - with checkout.guess = true, completes refs a\n \ttest_completion \"git checkout \" <<-\\EOF\n \tHEAD Z\n \tbranch-in-other Z\n-\tmaster Z\n-\tmaster-in-other Z\n+\tmain Z\n+\tmain-in-other Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n@@ -1391,12 +1392,12 @@ test_expect_success 'git checkout - a later --guess overrides previous checkout.\n \ttest_completion \"git checkout --guess \" <<-\\EOF\n \tHEAD Z\n \tbranch-in-other Z\n-\tmaster Z\n-\tmaster-in-other Z\n+\tmain Z\n+\tmain-in-other Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n@@ -1404,75 +1405,75 @@ test_expect_success 'git checkout - a later --no-guess overrides previous checko\n \ttest_config checkout.guess true &&\n \ttest_completion \"git checkout --no-guess \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git switch - with --detach, complete all references' '\n \ttest_completion \"git switch --detach \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git checkout - with --detach, complete only references' '\n \ttest_completion \"git checkout --detach \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git switch - with -d, complete all references' '\n \ttest_completion \"git switch -d \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git checkout - with -d, complete only references' '\n \ttest_completion \"git checkout -d \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git switch - with --track, complete only remote branches' '\n \ttest_completion \"git switch --track \" <<-\\EOF\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git checkout - with --track, complete only remote branches' '\n \ttest_completion \"git checkout --track \" <<-\\EOF\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git switch - with --no-track, complete only local branch names' '\n \ttest_completion \"git switch --no-track \" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tEOF\n '\n@@ -1480,151 +1481,151 @@ test_expect_success 'git switch - with --no-track, complete only local branch na\n test_expect_success 'git checkout - with --no-track, complete only local references' '\n \ttest_completion \"git checkout --no-track \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git switch - with -c, complete all references' '\n \ttest_completion \"git switch -c new-branch \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git switch - with -C, complete all references' '\n \ttest_completion \"git switch -C new-branch \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git switch - with -c and --track, complete all references' '\n \ttest_completion \"git switch -c new-branch --track \" <<-EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git switch - with -C and --track, complete all references' '\n \ttest_completion \"git switch -C new-branch --track \" <<-EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git switch - with -c and --no-track, complete all references' '\n \ttest_completion \"git switch -c new-branch --no-track \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git switch - with -C and --no-track, complete all references' '\n \ttest_completion \"git switch -C new-branch --no-track \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git checkout - with -b, complete all references' '\n \ttest_completion \"git checkout -b new-branch \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git checkout - with -B, complete all references' '\n \ttest_completion \"git checkout -B new-branch \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git checkout - with -b and --track, complete all references' '\n \ttest_completion \"git checkout -b new-branch --track \" <<-EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git checkout - with -B and --track, complete all references' '\n \ttest_completion \"git checkout -B new-branch --track \" <<-EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git checkout - with -b and --no-track, complete all references' '\n \ttest_completion \"git checkout -b new-branch --no-track \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git checkout - with -B and --no-track, complete all references' '\n \ttest_completion \"git checkout -B new-branch --no-track \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n test_expect_success 'git switch - for -c, complete local branches and unique remote branches' '\n \ttest_completion \"git switch -c \" <<-\\EOF\n \tbranch-in-other Z\n-\tmaster Z\n-\tmaster-in-other Z\n+\tmain Z\n+\tmain-in-other Z\n \tmatching-branch Z\n \tEOF\n '\n@@ -1632,36 +1633,36 @@ test_expect_success 'git switch - for -c, complete local branches and unique rem\n test_expect_success 'git switch - for -C, complete local branches and unique remote branches' '\n \ttest_completion \"git switch -C \" <<-\\EOF\n \tbranch-in-other Z\n-\tmaster Z\n-\tmaster-in-other Z\n+\tmain Z\n+\tmain-in-other Z\n \tmatching-branch Z\n \tEOF\n '\n \n test_expect_success 'git switch - for -c with --no-guess, complete local branches only' '\n \ttest_completion \"git switch --no-guess -c \" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tEOF\n '\n \n test_expect_success 'git switch - for -C with --no-guess, complete local branches only' '\n \ttest_completion \"git switch --no-guess -C \" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tEOF\n '\n \n test_expect_success 'git switch - for -c with --no-track, complete local branches only' '\n \ttest_completion \"git switch --no-track -c \" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tEOF\n '\n \n test_expect_success 'git switch - for -C with --no-track, complete local branches only' '\n \ttest_completion \"git switch --no-track -C \" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tEOF\n '\n@@ -1669,8 +1670,8 @@ test_expect_success 'git switch - for -C with --no-track, complete local branche\n test_expect_success 'git checkout - for -b, complete local branches and unique remote branches' '\n \ttest_completion \"git checkout -b \" <<-\\EOF\n \tbranch-in-other Z\n-\tmaster Z\n-\tmaster-in-other Z\n+\tmain Z\n+\tmain-in-other Z\n \tmatching-branch Z\n \tEOF\n '\n@@ -1678,36 +1679,36 @@ test_expect_success 'git checkout - for -b, complete local branches and unique r\n test_expect_success 'git checkout - for -B, complete local branches and unique remote branches' '\n \ttest_completion \"git checkout -B \" <<-\\EOF\n \tbranch-in-other Z\n-\tmaster Z\n-\tmaster-in-other Z\n+\tmain Z\n+\tmain-in-other Z\n \tmatching-branch Z\n \tEOF\n '\n \n test_expect_success 'git checkout - for -b with --no-guess, complete local branches only' '\n \ttest_completion \"git checkout --no-guess -b \" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tEOF\n '\n \n test_expect_success 'git checkout - for -B with --no-guess, complete local branches only' '\n \ttest_completion \"git checkout --no-guess -B \" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tEOF\n '\n \n test_expect_success 'git checkout - for -b with --no-track, complete local branches only' '\n \ttest_completion \"git checkout --no-track -b \" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tEOF\n '\n \n test_expect_success 'git checkout - for -B with --no-track, complete local branches only' '\n \ttest_completion \"git checkout --no-track -B \" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tEOF\n '\n@@ -1715,14 +1716,14 @@ test_expect_success 'git checkout - for -B with --no-track, complete local branc\n test_expect_success 'git switch - with --orphan completes local branch names and unique remote branch names' '\n \ttest_completion \"git switch --orphan \" <<-\\EOF\n \tbranch-in-other Z\n-\tmaster Z\n-\tmaster-in-other Z\n+\tmain Z\n+\tmain-in-other Z\n \tmatching-branch Z\n \tEOF\n '\n \n test_expect_success 'git switch - --orphan with branch already provided completes nothing else' '\n-\ttest_completion \"git switch --orphan master \" <<-\\EOF\n+\ttest_completion \"git switch --orphan main \" <<-\\EOF\n \n \tEOF\n '\n@@ -1730,20 +1731,20 @@ test_expect_success 'git switch - --orphan with branch already provided complete\n test_expect_success 'git checkout - with --orphan completes local branch names and unique remote branch names' '\n \ttest_completion \"git checkout --orphan \" <<-\\EOF\n \tbranch-in-other Z\n-\tmaster Z\n-\tmaster-in-other Z\n+\tmain Z\n+\tmain-in-other Z\n \tmatching-branch Z\n \tEOF\n '\n \n test_expect_success 'git checkout - --orphan with branch already provided completes local refs for a start-point' '\n-\ttest_completion \"git checkout --orphan master \" <<-\\EOF\n+\ttest_completion \"git checkout --orphan main \" <<-\\EOF\n \tHEAD Z\n-\tmaster Z\n+\tmain Z\n \tmatching-branch Z\n \tmatching-tag Z\n \tother/branch-in-other Z\n-\tother/master-in-other Z\n+\tother/main-in-other Z\n \tEOF\n '\n \n@@ -2067,7 +2068,7 @@ test_expect_success 'setup for integration tests' '\n \n test_expect_success 'checkout completes ref names' '\n \ttest_completion \"git checkout m\" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmybranch Z\n \tmytag Z\n \tEOF\n@@ -2081,7 +2082,7 @@ test_expect_success 'git -C <path> checkout uses the right repo' '\n \n test_expect_success 'show completes all refs' '\n \ttest_completion \"git show m\" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmybranch Z\n \tmytag Z\n \tEOF\n@@ -2118,7 +2119,7 @@ test_expect_success PERL 'send-email' '\n \t--cover-from-description=Z\n \t--cover-letter Z\n \tEOF\n-\ttest_completion \"git send-email ma\" \"master \"\n+\ttest_completion \"git send-email ma\" \"main \"\n '\n \n test_expect_success 'complete files' '\n@@ -2198,7 +2199,7 @@ test_expect_success 'complete files' '\n test_expect_success \"simple alias\" '\n \ttest_config alias.co checkout &&\n \ttest_completion \"git co m\" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmybranch Z\n \tmytag Z\n \tEOF\n@@ -2208,7 +2209,7 @@ test_expect_success \"recursive alias\" '\n \ttest_config alias.co checkout &&\n \ttest_config alias.cod \"co --detached\" &&\n \ttest_completion \"git cod m\" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmybranch Z\n \tmytag Z\n \tEOF\n@@ -2217,7 +2218,7 @@ test_expect_success \"recursive alias\" '\n test_expect_success \"completion uses <cmd> completion for alias: !sh -c 'git <cmd> ...'\" '\n \ttest_config alias.co \"!sh -c '\"'\"'git checkout ...'\"'\"'\" &&\n \ttest_completion \"git co m\" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmybranch Z\n \tmytag Z\n \tEOF\n@@ -2226,7 +2227,7 @@ test_expect_success \"completion uses <cmd> completion for alias: !sh -c 'git <cm\n test_expect_success 'completion uses <cmd> completion for alias: !f () { VAR=val git <cmd> ... }' '\n \ttest_config alias.co \"!f () { VAR=val git checkout ... ; } f\" &&\n \ttest_completion \"git co m\" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmybranch Z\n \tmytag Z\n \tEOF\n@@ -2235,7 +2236,7 @@ test_expect_success 'completion uses <cmd> completion for alias: !f () { VAR=val\n test_expect_success 'completion used <cmd> completion for alias: !f() { : git <cmd> ; ... }' '\n \ttest_config alias.co \"!f() { : git checkout ; if ... } f\" &&\n \ttest_completion \"git co m\" <<-\\EOF\n-\tmaster Z\n+\tmain Z\n \tmybranch Z\n \tmytag Z\n \tEOF\n@@ -2266,7 +2267,7 @@ for flag in -d --delete\n do\n \ttest_expect_success \"__git_complete_remote_or_refspec - push $flag other\" '\n \t\tsed -e \"s/Z$//\" >expected <<-EOF &&\n-\t\tmaster-in-other Z\n+\t\tmain-in-other Z\n \t\tEOF\n \t\t(\n \t\t\twords=(git push '$flag' other ma) &&\n@@ -2279,7 +2280,7 @@ do\n \n \ttest_expect_failure \"__git_complete_remote_or_refspec - push other $flag\" '\n \t\tsed -e \"s/Z$//\" >expected <<-EOF &&\n-\t\tmaster-in-other Z\n+\t\tmain-in-other Z\n \t\tEOF\n \t\t(\n \t\t\twords=(git push other '$flag' ma) &&\n-- \ngitgitgadget\n\n"},{"id":"412467","messageId":"5ad7c105cf97322b2302ef24887926a5e8582929.1608167230.git.gitgitgadget@gmail.com","threadId":"54841","inReplyTo":"pull.816.git.1608167230.gitgitgadget@gmail.com","subject":"[PATCH 07/11] t5510: use `main` as initial branch name","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-12-17T01:07:06Z","receivedAt":"2020-12-17T01:08:45Z","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 66713e84e71 (tests: prepare aligned mentions of the default branch\nname, 2020-10-23), we prepared this test script for a time when the\ndefault initial branch name would be `main`.\n\nHowever, there is no need to wait for that: let's adjust the test script\nto stop relying on a specific initial branch name by setting it\nexplicitly. This allows us to drop the `PREPARE_FOR_MAIN_BRANCH` prereq\nfrom two test cases.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5510-fetch.sh | 168 ++++++++++++++++++++++++-----------------------\n 1 file changed, 85 insertions(+), 83 deletions(-)\n\ndiff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh\nindex 5d673358f9b..2013051a64e 100755\n--- a/t/t5510-fetch.sh\n+++ b/t/t5510-fetch.sh\n@@ -25,7 +25,9 @@ convert_bundle_to_pack () {\n test_expect_success setup '\n \techo >file original &&\n \tgit add file &&\n-\tgit commit -a -m original'\n+\tgit commit -a -m original &&\n+\tgit branch -M main\n+'\n \n test_expect_success \"clone and setup child repos\" '\n \tgit clone . one &&\n@@ -37,19 +39,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 +67,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 +77,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 +90,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 +100,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 +112,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 +131,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 +139,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 +154,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 +166,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 +179,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 +252,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 +283,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 +291,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 +300,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 +319,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 +337,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 +364,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 +375,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 +391,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 +401,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 +414,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 +429,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 +451,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 +466,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 +481,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 +495,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 +526,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 +535,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 +570,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 +879,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@@ -942,7 +944,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 +959,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(\n@@ -1001,7 +1003,7 @@ setup_negotiation_tip () {\n \tUSE_PROTOCOL_V2=\"$3\"\n \n \trm -rf \"$SERVER\" client trace &&\n-\tgit init \"$SERVER\" &&\n+\tgit init -b main \"$SERVER\" &&\n \ttest_commit -C \"$SERVER\" alpha_1 &&\n \ttest_commit -C \"$SERVER\" alpha_2 &&\n \tgit -C \"$SERVER\" checkout --orphan beta &&\n@@ -1017,7 +1019,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 }\n-- \ngitgitgadget\n\n"},{"id":"412471","messageId":"xmqqv9d1yzta.fsf@gitster.c.googlers.com","threadId":"54841","inReplyTo":"pull.816.git.1608167230.gitgitgadget@gmail.com","subject":"Re: [PATCH 00/11] Drop the PREPARE_FOR_MAIN_BRANCH prereq","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-12-17T01:41:05Z","receivedAt":"2020-12-17T01:42:18Z","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> To address that, I spent some time to convert just the affected scripts to\n> using main, adjusting them in a way where they do not depend on the name git\n> init gave the initial branch at all, which allowed me to drop that prereq\n> altogether.\n>\n> None of these changes should be controversial, intentionally so, to allow\n> this patch series to go in before v2.30.0 is tagged, so that we can enjoy\n> the full coverage of the test suite again.\n\nThanks for taking care of this one.  The titles all imply that we\nare committed to switch the default to 'main', but I understand that\nthe focus is more about using a hardcoded initial branch in these\ntests, so that the tests will not be affected when the default\nchanges from 'master' to any other value, even when the \":dirname\"\nand \":random\" magic were to be invented and used as the default ;-)\n\nSo these may get unwarranted \"who says we gained a concensus to\nchange the default in that direction?\" complaint, which might want\nto be reworded, ...\n\n>   t3200: finish transitioning to the initial branch name `main`\n>   t3201: finalize transitioning to using the branch name `main`\n>   t3203: complete the transition to using the branch name `main`\n>   t3205: finalize transitioning to using the branch name `main`\n>   t5505: finalize transitioning to using the branch name `main`\n\n... but these just make a statement of fact (i.e. these scripts use\nX as initial branch name), and less likely to confuse the matter.\n\n>   t1400: use `main` as initial branch name\n>   t5510: use `main` as initial branch name\n>   t5703: use `main` as initial branch name\n>   t6302: use `main` as initial branch name\n>   t9902: use `main` as initial branch name\n\nAnd of course, this is what we want:\n\n>   tests: drop the `PREPARE_FOR_MAIN_BRANCH` prereq\n\nThanks.\n"}]}