{"thread":{"id":"54518","subject":"[PATCH 0/4] Adjust t5411 for the upcoming change of the default branch name","startedAt":"2020-10-27T22:58:12Z","lastAt":"2020-10-31T19:46:15Z","messageCount":14,"participants":["Johannes Schindelin via GitGitGadget","Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"408540","messageId":"pull.760.git.1603839487.gitgitgadget@gmail.com","threadId":"54518","inReplyTo":null,"subject":"[PATCH 0/4] Adjust t5411 for the upcoming change of the default branch name","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-27T22:58:03Z","receivedAt":"2020-10-27T22:58:12Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"The test script t5411-proc-receive-hook.sh is an interesting case: it not\nonly requires tons of mostly straight-forward changes that amount to an\nautomated search-and-replace, but it also requires a few adjustments due to\nthe change of the default branch name's length.\n\nThis patch series is part of the over-all effort tracked in \nhttps://github.com/gitgitgadget/git/pull/655.\n\nJohannes Schindelin (4):\n  t5411: start using the default branch name \"main\"\n  t5411: start adjusting the support files for init.defaultBranch=main\n  t5411: adjust the remaining support files for init.defaultBranch=main\n  t5411: finish preparing for `main` being the default branch name\n\n t/t5411-proc-receive-hook.sh                  |  17 ++-\n t/t5411/common-functions.sh                   |   2 +-\n t/t5411/once-0010-report-status-v1.sh         |  50 ++++----\n t/t5411/test-0000-standard-git-push.sh        |  72 +++++------\n .../test-0001-standard-git-push--porcelain.sh |  72 +++++------\n t/t5411/test-0002-pre-receive-declined.sh     |  12 +-\n ...st-0003-pre-receive-declined--porcelain.sh |  12 +-\n t/t5411/test-0011-no-hook-error.sh            |  38 +++---\n t/t5411/test-0012-no-hook-error--porcelain.sh |  38 +++---\n t/t5411/test-0013-bad-protocol.sh             |  96 +++++++-------\n t/t5411/test-0014-bad-protocol--porcelain.sh  |  70 +++++-----\n t/t5411/test-0020-report-ng.sh                |  40 +++---\n t/t5411/test-0021-report-ng--porcelain.sh     |  40 +++---\n t/t5411/test-0022-report-unexpect-ref.sh      |  36 +++---\n ...est-0023-report-unexpect-ref--porcelain.sh |  36 +++---\n t/t5411/test-0024-report-unknown-ref.sh       |  12 +-\n ...test-0025-report-unknown-ref--porcelain.sh |  12 +-\n t/t5411/test-0026-push-options.sh             |  36 +++---\n t/t5411/test-0027-push-options--porcelain.sh  |  36 +++---\n t/t5411/test-0030-report-ok.sh                |  22 ++--\n t/t5411/test-0031-report-ok--porcelain.sh     |  22 ++--\n t/t5411/test-0032-report-with-options.sh      | 120 +++++++++---------\n ...est-0033-report-with-options--porcelain.sh | 120 +++++++++---------\n t/t5411/test-0034-report-ft.sh                |  30 ++---\n t/t5411/test-0035-report-ft--porcelain.sh     |  30 ++---\n ...t-0036-report-multi-rewrite-for-one-ref.sh |  90 ++++++-------\n ...rt-multi-rewrite-for-one-ref--porcelain.sh |  82 ++++++------\n t/t5411/test-0038-report-mixed-refs.sh        |  40 +++---\n .../test-0039-report-mixed-refs--porcelain.sh |  40 +++---\n t/t5411/test-0040-process-all-refs.sh         |  42 +++---\n .../test-0041-process-all-refs--porcelain.sh  |  42 +++---\n ...t-0050-proc-receive-refs-with-modifiers.sh |  42 +++---\n 32 files changed, 726 insertions(+), 723 deletions(-)\n\n\nbase-commit: 3224b0f0bb7bc90c0156e73c58f1d2e770f0ad7c\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-760%2Fdscho%2Fprepare-for-main-branch-t5411-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-760/dscho/prepare-for-main-branch-t5411-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/760\n-- \ngitgitgadget\n"},{"id":"408541","messageId":"f997166db4c29d971a2343f70c9d9a0505a8cc4b.1603839487.git.gitgitgadget@gmail.com","threadId":"54518","inReplyTo":"pull.760.git.1603839487.gitgitgadget@gmail.com","subject":"[PATCH 1/4] t5411: start using the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-27T22:58:04Z","receivedAt":"2020-10-27T22:58:14Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis is a straight-forward search-and-replace in the test script;\nHowever, this is not yet complete because it requires many more\nreplacements in `t/t5411/`, too many for a single patch (the Git mailing\nlist rejects mails larger than 100kB). For that reason, we disable this\ntest script temporarily via the `PREPARE_FOR_MAIN_BRANCH` prereq.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5411-proc-receive-hook.sh | 19 ++++++++++++-------\n 1 file changed, 12 insertions(+), 7 deletions(-)\n\ndiff --git a/t/t5411-proc-receive-hook.sh b/t/t5411-proc-receive-hook.sh\nindex 746487286f..06bbb02ed2 100755\n--- a/t/t5411-proc-receive-hook.sh\n+++ b/t/t5411-proc-receive-hook.sh\n@@ -7,11 +7,16 @@ test_description='Test proc-receive hook'\n \n . ./test-lib.sh\n \n+test_have_prereq PREPARE_FOR_MAIN_BRANCH || {\n+\ttest_skip=\"In transit for the default branch name 'main'\"\n+\ttest_done\n+}\n+\n . \"$TEST_DIRECTORY\"/t5411/common-functions.sh\n \n setup_upstream_and_workbench () {\n-\t# Refs of upstream : master(A)\n-\t# Refs of workbench: master(A)  tags/v123\n+\t# Refs of upstream : main(A)\n+\t# Refs of workbench: main(A)  tags/v123\n \ttest_expect_success \"setup upstream and workbench\" '\n \t\trm -rf upstream.git &&\n \t\trm -rf workbench &&\n@@ -25,10 +30,10 @@ setup_upstream_and_workbench () {\n \t\t\tgit config core.abbrev 7 &&\n \t\t\tgit tag -m \"v123\" v123 $A &&\n \t\t\tgit remote add origin ../upstream.git &&\n-\t\t\tgit push origin master &&\n-\t\t\tgit update-ref refs/heads/master $A $B &&\n+\t\t\tgit push origin main &&\n+\t\t\tgit update-ref refs/heads/main $A $B &&\n \t\t\tgit -C ../upstream.git update-ref \\\n-\t\t\t\trefs/heads/master $A $B\n+\t\t\t\trefs/heads/main $A $B\n \t\t) &&\n \t\tTAG=$(git -C workbench rev-parse v123) &&\n \n@@ -99,8 +104,8 @@ start_httpd\n # Re-initialize the upstream repository and local workbench.\n setup_upstream_and_workbench\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"setup for HTTP protocol\" '\n \tgit -C upstream.git config http.receivepack true &&\n \tupstream=\"$HTTPD_DOCUMENT_ROOT_PATH/upstream.git\" &&\n-- \ngitgitgadget\n\n"},{"id":"408542","messageId":"ac2173cce7c91e6398d17a1b65e3c5e7c7ac3b10.1603839487.git.gitgitgadget@gmail.com","threadId":"54518","inReplyTo":"pull.760.git.1603839487.gitgitgadget@gmail.com","subject":"[PATCH 4/4] t5411: finish preparing for `main` being the default branch name","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-27T22:58:07Z","receivedAt":"2020-10-27T22:58:17Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn addition to the trivial search-and-replace performed over the course\nof the previous three commits, there is one test in t5411 that depends\non the length of the default branch name.\n\nAdjust it and use `main` as the default branch name in this test.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5411-proc-receive-hook.sh          | 8 +++-----\n t/t5411/once-0010-report-status-v1.sh | 6 +++---\n 2 files changed, 6 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t5411-proc-receive-hook.sh b/t/t5411-proc-receive-hook.sh\nindex 06bbb02ed2..98b0e81208 100755\n--- a/t/t5411-proc-receive-hook.sh\n+++ b/t/t5411-proc-receive-hook.sh\n@@ -5,12 +5,10 @@\n \n test_description='Test proc-receive hook'\n \n-. ./test-lib.sh\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n-test_have_prereq PREPARE_FOR_MAIN_BRANCH || {\n-\ttest_skip=\"In transit for the default branch name 'main'\"\n-\ttest_done\n-}\n+. ./test-lib.sh\n \n . \"$TEST_DIRECTORY\"/t5411/common-functions.sh\n \ndiff --git a/t/t5411/once-0010-report-status-v1.sh b/t/t5411/once-0010-report-status-v1.sh\nindex 6005ee0ecb..cb431a9c91 100644\n--- a/t/t5411/once-0010-report-status-v1.sh\n+++ b/t/t5411/once-0010-report-status-v1.sh\n@@ -69,11 +69,11 @@ test_expect_success \"proc-receive: report status v1\" '\n \tproc-receive> option forced-update\n \tproc-receive> ng refs/for/next/topic target branch not exist\n \t000eunpack ok\n-\t0019ok refs/heads/main\n-\t001eok refs/for/main/topic1\n+\t0017ok refs/heads/main\n+\t001cok refs/for/main/topic1\n \t0016ok refs/heads/foo\n \t0033ng refs/for/next/topic target branch not exist\n-\t001eok refs/for/main/topic2\n+\t001cok refs/for/main/topic2\n \t0000# post-receive hook\n \tpost-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tpost-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic1\n-- \ngitgitgadget\n"},{"id":"408543","messageId":"ca914fbc4be1aa9b9276768ee1d9e7e89b27295d.1603839487.git.gitgitgadget@gmail.com","threadId":"54518","inReplyTo":"pull.760.git.1603839487.gitgitgadget@gmail.com","subject":"[PATCH 3/4] t5411: adjust the remaining support files for init.defaultBranch=main","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-27T22:58:06Z","receivedAt":"2020-10-27T22:58:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t/t5411/*\n\nIn the previous commit, we adjusted roughly half of the support files,\nto stay under the 100kB limit (mails larger than that are rejected by\nthe Git mailing list).\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5411/common-functions.sh                   |  2 +-\n t/t5411/once-0010-report-status-v1.sh         | 50 +++++-----\n t/t5411/test-0000-standard-git-push.sh        | 72 +++++++-------\n .../test-0001-standard-git-push--porcelain.sh | 72 +++++++-------\n t/t5411/test-0002-pre-receive-declined.sh     | 12 +--\n ...st-0003-pre-receive-declined--porcelain.sh | 12 +--\n t/t5411/test-0011-no-hook-error.sh            | 38 ++++----\n t/t5411/test-0012-no-hook-error--porcelain.sh | 38 ++++----\n t/t5411/test-0013-bad-protocol.sh             | 96 +++++++++----------\n t/t5411/test-0014-bad-protocol--porcelain.sh  | 70 +++++++-------\n t/t5411/test-0020-report-ng.sh                | 40 ++++----\n t/t5411/test-0021-report-ng--porcelain.sh     | 40 ++++----\n t/t5411/test-0022-report-unexpect-ref.sh      | 36 +++----\n ...est-0023-report-unexpect-ref--porcelain.sh | 36 +++----\n t/t5411/test-0024-report-unknown-ref.sh       | 12 +--\n ...test-0025-report-unknown-ref--porcelain.sh | 12 +--\n t/t5411/test-0026-push-options.sh             | 36 +++----\n t/t5411/test-0027-push-options--porcelain.sh  | 36 +++----\n 18 files changed, 355 insertions(+), 355 deletions(-)\n\ndiff --git a/t/t5411/common-functions.sh b/t/t5411/common-functions.sh\nindex 6580bebd8e..521a347710 100644\n--- a/t/t5411/common-functions.sh\n+++ b/t/t5411/common-functions.sh\n@@ -28,7 +28,7 @@ create_commits_in () {\n \t\tshift ||\n \t\treturn 1\n \tdone &&\n-\tgit -C \"$repo\" update-ref refs/heads/master $oid\n+\tgit -C \"$repo\" update-ref refs/heads/main $oid\n }\n \n # Format the output of git-push, git-show-ref and other commands to make a\ndiff --git a/t/t5411/once-0010-report-status-v1.sh b/t/t5411/once-0010-report-status-v1.sh\nindex dc2cf4a522..6005ee0ecb 100644\n--- a/t/t5411/once-0010-report-status-v1.sh\n+++ b/t/t5411/once-0010-report-status-v1.sh\n@@ -6,12 +6,12 @@ test_expect_success \"setup proc-receive hook\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic1\" \\\n+\t\t-r \"ok refs/for/main/topic1\" \\\n \t\t-r \"option fall-through\" \\\n-\t\t-r \"ok refs/for/master/topic2\" \\\n+\t\t-r \"ok refs/for/main/topic2\" \\\n \t\t-r \"option refname refs/for/changes/23/123/1\" \\\n \t\t-r \"option new-oid $A\" \\\n-\t\t-r \"ok refs/for/master/topic2\" \\\n+\t\t-r \"ok refs/for/main/topic2\" \\\n \t\t-r \"option refname refs/for/changes/24/124/2\" \\\n \t\t-r \"option old-oid $B\" \\\n \t\t-r \"option new-oid $A\" \\\n@@ -20,26 +20,26 @@ test_expect_success \"setup proc-receive hook\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         : (B)                   refs/for/master/topic1(A)  foo(A)  refs/for/next/topic(A)  refs/for/master/topic2(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         : (B)                   refs/for/main/topic1(A)  foo(A)  refs/for/next/topic(A)  refs/for/main/topic2(A)\n test_expect_success \"proc-receive: report status v1\" '\n \t{\n \t\tif test -z \"$GIT_DEFAULT_HASH\" || test \"$GIT_DEFAULT_HASH\" = \"sha1\"\n \t\tthen\n-\t\t\tprintf \"%s %s refs/heads/master\\0report-status\\n\" \\\n+\t\t\tprintf \"%s %s refs/heads/main\\0report-status\\n\" \\\n \t\t\t\t$A $B | packetize\n \t\telse\n-\t\t\tprintf \"%s %s refs/heads/master\\0report-status object-format=$GIT_DEFAULT_HASH\\n\" \\\n+\t\t\tprintf \"%s %s refs/heads/main\\0report-status object-format=$GIT_DEFAULT_HASH\\n\" \\\n \t\t\t\t$A $B | packetize\n \t\tfi &&\n-\t\tprintf \"%s %s refs/for/master/topic1\\n\" \\\n+\t\tprintf \"%s %s refs/for/main/topic1\\n\" \\\n \t\t\t$ZERO_OID $A | packetize &&\n \t\tprintf \"%s %s refs/heads/foo\\n\" \\\n \t\t\t$ZERO_OID $A | packetize &&\n \t\tprintf \"%s %s refs/for/next/topic\\n\" \\\n \t\t\t$ZERO_OID $A | packetize &&\n-\t\tprintf \"%s %s refs/for/master/topic2\\n\" \\\n+\t\tprintf \"%s %s refs/for/main/topic2\\n\" \\\n \t\t\t$ZERO_OID $A | packetize &&\n \t\tprintf 0000 &&\n \t\tprintf \"\" | git -C \"$upstream\" pack-objects --stdout\n@@ -48,35 +48,35 @@ test_expect_success \"proc-receive: report status v1\" '\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \t# pre-receive hook\n-\tpre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n-\tpre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic1\n+\tpre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n+\tpre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic1\n \tpre-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo\n \tpre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n-\tpre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic2\n+\tpre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic2\n \t# proc-receive hook\n-\tproc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic1\n+\tproc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic1\n \tproc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n-\tproc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic2\n-\tproc-receive> ok refs/for/master/topic1\n+\tproc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic2\n+\tproc-receive> ok refs/for/main/topic1\n \tproc-receive> option fall-through\n-\tproc-receive> ok refs/for/master/topic2\n+\tproc-receive> ok refs/for/main/topic2\n \tproc-receive> option refname refs/for/changes/23/123/1\n \tproc-receive> option new-oid <COMMIT-A>\n-\tproc-receive> ok refs/for/master/topic2\n+\tproc-receive> ok refs/for/main/topic2\n \tproc-receive> option refname refs/for/changes/24/124/2\n \tproc-receive> option old-oid <COMMIT-B>\n \tproc-receive> option new-oid <COMMIT-A>\n \tproc-receive> option forced-update\n \tproc-receive> ng refs/for/next/topic target branch not exist\n \t000eunpack ok\n-\t0019ok refs/heads/master\n-\t001eok refs/for/master/topic1\n+\t0019ok refs/heads/main\n+\t001eok refs/for/main/topic1\n \t0016ok refs/heads/foo\n \t0033ng refs/for/next/topic target branch not exist\n-\t001eok refs/for/master/topic2\n+\t001eok refs/for/main/topic2\n \t0000# post-receive hook\n-\tpost-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n-\tpost-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic1\n+\tpost-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n+\tpost-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic1\n \tpost-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo\n \tpost-receive< <ZERO-OID> <COMMIT-A> refs/for/changes/23/123/1\n \tpost-receive< <COMMIT-B> <COMMIT-A> refs/for/changes/24/124/2\n@@ -86,9 +86,9 @@ test_expect_success \"proc-receive: report status v1\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/for/master/topic1\n+\t<COMMIT-A> refs/for/main/topic1\n \t<COMMIT-A> refs/heads/foo\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0000-standard-git-push.sh b/t/t5411/test-0000-standard-git-push.sh\nindex e206587348..2b04b49367 100644\n--- a/t/t5411/test-0000-standard-git-push.sh\n+++ b/t/t5411/test-0000-standard-git-push.sh\n@@ -1,39 +1,39 @@\n-# Refs of upstream : master(A)  \n-# Refs of workbench: master(A)  tags/v123\n-# git-push         : master(B)             next(A)\n+# Refs of upstream : main(A)  \n+# Refs of workbench: main(A)  tags/v123\n+# git-push         : main(B)             next(A)\n test_expect_success \"git-push ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\t$B:refs/heads/master \\\n+\t\t$B:refs/heads/main \\\n \t\tHEAD:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tTo <URL/of/upstream.git>\n-\t <OID-A>..<OID-B> <COMMIT-B> -> master\n+\t <OID-A>..<OID-B> <COMMIT-B> -> main\n \t * [new branch] HEAD -> next\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)  next(A)\n-# Refs of workbench: master(A)           tags/v123\n-# git-push --atomic: master(A)  next(B)\n+# Refs of upstream : main(B)  next(A)\n+# Refs of workbench: main(A)           tags/v123\n+# git-push --atomic: main(A)  next(B)\n test_expect_success \"git-push --atomic ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push --atomic origin \\\n-\t\tmaster \\\n+\t\tmain \\\n \t\t$B:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out |\n@@ -43,28 +43,28 @@ test_expect_success \"git-push --atomic ($PROTOCOL)\" '\n \t\t\t>actual &&\n \tcat >expect <<-EOF &&\n \tTo <URL/of/upstream.git>\n-\t ! [rejected] master -> master (non-fast-forward)\n+\t ! [rejected] main -> main (non-fast-forward)\n \t ! [rejected] <COMMIT-B> -> next (atomic push failed)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)  next(A)\n-# Refs of workbench: master(A)           tags/v123\n-# git-push         : master(A)  next(B)\n+# Refs of upstream : main(B)  next(A)\n+# Refs of workbench: main(A)           tags/v123\n+# git-push         : main(A)  next(B)\n test_expect_success \"non-fast-forward git-push ($PROTOCOL)\" '\n \ttest_must_fail git \\\n \t\t-C workbench \\\n \t\t-c advice.pushUpdateRejected=false \\\n \t\tpush origin \\\n-\t\tmaster \\\n+\t\tmain \\\n \t\t$B:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n@@ -75,48 +75,48 @@ test_expect_success \"non-fast-forward git-push ($PROTOCOL)\" '\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/next\n \tTo <URL/of/upstream.git>\n \t <OID-A>..<OID-B> <COMMIT-B> -> next\n-\t ! [rejected] master -> master (non-fast-forward)\n+\t ! [rejected] main -> main (non-fast-forward)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \t<COMMIT-B> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)  next(B)\n-# Refs of workbench: master(A)           tags/v123\n-# git-push -f      : master(A)  NULL     tags/v123  refs/review/master/topic(A)  a/b/c(A)\n+# Refs of upstream : main(B)  next(B)\n+# Refs of workbench: main(A)           tags/v123\n+# git-push -f      : main(A)  NULL     tags/v123  refs/review/main/topic(A)  a/b/c(A)\n test_expect_success \"git-push -f ($PROTOCOL)\" '\n \tgit -C workbench push -f origin \\\n \t\trefs/tags/v123 \\\n \t\t:refs/heads/next \\\n-\t\tmaster \\\n-\t\tmaster:refs/review/master/topic \\\n+\t\tmain \\\n+\t\tmain:refs/review/main/topic \\\n \t\tHEAD:refs/heads/a/b/c \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n+\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n \tremote: pre-receive< <COMMIT-B> <ZERO-OID> refs/heads/next\n \tremote: pre-receive< <ZERO-OID> <TAG-v123> refs/tags/v123\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/review/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/review/main/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/a/b/c\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n+\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n \tremote: post-receive< <COMMIT-B> <ZERO-OID> refs/heads/next\n \tremote: post-receive< <ZERO-OID> <TAG-v123> refs/tags/v123\n-\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/review/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/review/main/topic\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/a/b/c\n \tTo <URL/of/upstream.git>\n-\t + <OID-B>...<OID-A> master -> master (forced update)\n+\t + <OID-B>...<OID-A> main -> main (forced update)\n \t - [deleted] next\n \t * [new tag] v123 -> v123\n-\t * [new reference] master -> refs/review/master/topic\n+\t * [new reference] main -> refs/review/main/topic\n \t * [new branch] HEAD -> a/b/c\n \tEOF\n \ttest_cmp expect actual &&\n@@ -124,19 +124,19 @@ test_expect_success \"git-push -f ($PROTOCOL)\" '\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \t<COMMIT-A> refs/heads/a/b/c\n-\t<COMMIT-A> refs/heads/master\n-\t<COMMIT-A> refs/review/master/topic\n+\t<COMMIT-A> refs/heads/main\n+\t<COMMIT-A> refs/review/main/topic\n \t<TAG-v123> refs/tags/v123\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)  tags/v123  refs/review/master/topic(A)  a/b/c(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)  tags/v123  refs/review/main/topic(A)  a/b/c(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n \t(\n \t\tcd \"$upstream\" &&\n-\t\tgit update-ref -d refs/review/master/topic &&\n+\t\tgit update-ref -d refs/review/main/topic &&\n \t\tgit update-ref -d refs/tags/v123 &&\n \t\tgit update-ref -d refs/heads/a/b/c\n \t)\ndiff --git a/t/t5411/test-0001-standard-git-push--porcelain.sh b/t/t5411/test-0001-standard-git-push--porcelain.sh\nindex 48f6fcc846..747307f8da 100644\n--- a/t/t5411/test-0001-standard-git-push--porcelain.sh\n+++ b/t/t5411/test-0001-standard-git-push--porcelain.sh\n@@ -1,21 +1,21 @@\n-# Refs of upstream : master(A)  \n-# Refs of workbench: master(A)  tags/v123\n-# git-push         : master(B)             next(A)\n+# Refs of upstream : main(A)  \n+# Refs of workbench: main(A)  tags/v123\n+# git-push         : main(B)             next(A)\n test_expect_success \"git-push ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\t$B:refs/heads/master \\\n+\t\t$B:refs/heads/main \\\n \t\tHEAD:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tTo <URL/of/upstream.git>\n-\t     <COMMIT-B>:refs/heads/master    <OID-A>..<OID-B>\n+\t     <COMMIT-B>:refs/heads/main    <OID-A>..<OID-B>\n \t*    HEAD:refs/heads/next    [new branch]\n \tDone\n \tEOF\n@@ -23,18 +23,18 @@ test_expect_success \"git-push ($PROTOCOL/porcelain)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)  next(A)\n-# Refs of workbench: master(A)           tags/v123\n-# git-push --atomic: master(A)  next(B)\n+# Refs of upstream : main(B)  next(A)\n+# Refs of workbench: main(A)           tags/v123\n+# git-push --atomic: main(A)  next(B)\n test_expect_success \"git-push --atomic ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --atomic --porcelain origin \\\n-\t\tmaster \\\n+\t\tmain \\\n \t\t$B:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out |\n@@ -45,28 +45,28 @@ test_expect_success \"git-push --atomic ($PROTOCOL/porcelain)\" '\n \t\t\t>actual &&\n \tcat >expect <<-EOF &&\n \tTo <URL/of/upstream.git>\n-\t! refs/heads/master:refs/heads/master [rejected] (non-fast-forward)\n+\t! refs/heads/main:refs/heads/main [rejected] (non-fast-forward)\n \t! <COMMIT-B>:refs/heads/next [rejected] (atomic push failed)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)  next(A)\n-# Refs of workbench: master(A)           tags/v123\n-# git-push         : master(A)  next(B)\n+# Refs of upstream : main(B)  next(A)\n+# Refs of workbench: main(A)           tags/v123\n+# git-push         : main(A)  next(B)\n test_expect_success \"non-fast-forward git-push ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git \\\n \t\t-C workbench \\\n \t\t-c advice.pushUpdateRejected=false \\\n \t\tpush --porcelain origin \\\n-\t\tmaster \\\n+\t\tmain \\\n \t\t$B:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n@@ -77,49 +77,49 @@ test_expect_success \"non-fast-forward git-push ($PROTOCOL/porcelain)\" '\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/next\n \tTo <URL/of/upstream.git>\n \t     <COMMIT-B>:refs/heads/next    <OID-A>..<OID-B>\n-\t!    refs/heads/master:refs/heads/master    [rejected] (non-fast-forward)\n+\t!    refs/heads/main:refs/heads/main    [rejected] (non-fast-forward)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \t<COMMIT-B> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)  next(B)\n-# Refs of workbench: master(A)           tags/v123\n-# git-push -f      : master(A)  NULL     tags/v123  refs/review/master/topic(A)  a/b/c(A)\n+# Refs of upstream : main(B)  next(B)\n+# Refs of workbench: main(A)           tags/v123\n+# git-push -f      : main(A)  NULL     tags/v123  refs/review/main/topic(A)  a/b/c(A)\n test_expect_success \"git-push -f ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain -f origin \\\n \t\trefs/tags/v123 \\\n \t\t:refs/heads/next \\\n-\t\tmaster \\\n-\t\tmaster:refs/review/master/topic \\\n+\t\tmain \\\n+\t\tmain:refs/review/main/topic \\\n \t\tHEAD:refs/heads/a/b/c \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n+\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n \tremote: pre-receive< <COMMIT-B> <ZERO-OID> refs/heads/next\n \tremote: pre-receive< <ZERO-OID> <TAG-v123> refs/tags/v123\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/review/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/review/main/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/a/b/c\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n+\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n \tremote: post-receive< <COMMIT-B> <ZERO-OID> refs/heads/next\n \tremote: post-receive< <ZERO-OID> <TAG-v123> refs/tags/v123\n-\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/review/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/review/main/topic\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/a/b/c\n \tTo <URL/of/upstream.git>\n-\t+    refs/heads/master:refs/heads/master    <OID-B>...<OID-A> (forced update)\n+\t+    refs/heads/main:refs/heads/main    <OID-B>...<OID-A> (forced update)\n \t-    :refs/heads/next    [deleted]\n \t*    refs/tags/v123:refs/tags/v123    [new tag]\n-\t*    refs/heads/master:refs/review/master/topic    [new reference]\n+\t*    refs/heads/main:refs/review/main/topic    [new reference]\n \t*    HEAD:refs/heads/a/b/c    [new branch]\n \tDone\n \tEOF\n@@ -128,19 +128,19 @@ test_expect_success \"git-push -f ($PROTOCOL/porcelain)\" '\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \t<COMMIT-A> refs/heads/a/b/c\n-\t<COMMIT-A> refs/heads/master\n-\t<COMMIT-A> refs/review/master/topic\n+\t<COMMIT-A> refs/heads/main\n+\t<COMMIT-A> refs/review/main/topic\n \t<TAG-v123> refs/tags/v123\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)  tags/v123  refs/review/master/topic(A)  a/b/c(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)  tags/v123  refs/review/main/topic(A)  a/b/c(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n \t(\n \t\tcd \"$upstream\" &&\n-\t\tgit update-ref -d refs/review/master/topic &&\n+\t\tgit update-ref -d refs/review/main/topic &&\n \t\tgit update-ref -d refs/tags/v123 &&\n \t\tgit update-ref -d refs/heads/a/b/c\n \t)\ndiff --git a/t/t5411/test-0002-pre-receive-declined.sh b/t/t5411/test-0002-pre-receive-declined.sh\nindex c246f7e68e..e7d113a158 100644\n--- a/t/t5411/test-0002-pre-receive-declined.sh\n+++ b/t/t5411/test-0002-pre-receive-declined.sh\n@@ -5,25 +5,25 @@ test_expect_success \"setup pre-receive hook ($PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git-push         : master(B)             next(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git-push         : main(B)             next(A)\n test_expect_success \"git-push is declined ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\t$B:refs/heads/master \\\n+\t\t$B:refs/heads/main \\\n \t\tHEAD:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] <COMMIT-B> -> master (pre-receive hook declined)\n+\t ! [remote rejected] <COMMIT-B> -> main (pre-receive hook declined)\n \t ! [remote rejected] HEAD -> next (pre-receive hook declined)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0003-pre-receive-declined--porcelain.sh b/t/t5411/test-0003-pre-receive-declined--porcelain.sh\nindex b14894de81..cc0cca6a47 100644\n--- a/t/t5411/test-0003-pre-receive-declined--porcelain.sh\n+++ b/t/t5411/test-0003-pre-receive-declined--porcelain.sh\n@@ -5,18 +5,18 @@ test_expect_success \"setup pre-receive hook ($PROTOCOL/porcelain)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git-push         : master(B)             next(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git-push         : main(B)             next(A)\n test_expect_success \"git-push is declined ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\t$B:refs/heads/master \\\n+\t\t$B:refs/heads/main \\\n \t\tHEAD:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tTo <URL/of/upstream.git>\n-\t!    <COMMIT-B>:refs/heads/master    [remote rejected] (pre-receive hook declined)\n+\t!    <COMMIT-B>:refs/heads/main    [remote rejected] (pre-receive hook declined)\n \t!    HEAD:refs/heads/next    [remote rejected] (pre-receive hook declined)\n \tDone\n \tEOF\n@@ -24,7 +24,7 @@ test_expect_success \"git-push is declined ($PROTOCOL/porcelain)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0011-no-hook-error.sh b/t/t5411/test-0011-no-hook-error.sh\nindex bb6ec92a92..c50830982f 100644\n--- a/t/t5411/test-0011-no-hook-error.sh\n+++ b/t/t5411/test-0011-no-hook-error.sh\n@@ -1,64 +1,64 @@\n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       next(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       next(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: no hook, fail to push special ref ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n \t\tHEAD:next \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: error: cannot find hook \"proc-receive\"\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tTo <URL/of/upstream.git>\n \t * [new branch] HEAD -> next\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (fail to run proc-receive hook)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (fail to run proc-receive hook)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             next(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             next(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n \tgit -C \"$upstream\" update-ref -d refs/heads/next\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push --atomic: (B)                   next(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push --atomic: (B)                   next(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: no hook, all failed for atomic push ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push --atomic origin \\\n-\t\t$B:master \\\n+\t\t$B:main \\\n \t\tHEAD:next \\\n-\t\tHEAD:refs/for/master/topic >out 2>&1 &&\n+\t\tHEAD:refs/for/main/topic >out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: error: cannot find hook \"proc-receive\"\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] <COMMIT-B> -> master (fail to run proc-receive hook)\n+\t ! [remote rejected] <COMMIT-B> -> main (fail to run proc-receive hook)\n \t ! [remote rejected] HEAD -> next (fail to run proc-receive hook)\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (fail to run proc-receive hook)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (fail to run proc-receive hook)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0012-no-hook-error--porcelain.sh b/t/t5411/test-0012-no-hook-error--porcelain.sh\nindex 4814f74dc2..14ea433481 100644\n--- a/t/t5411/test-0012-no-hook-error--porcelain.sh\n+++ b/t/t5411/test-0012-no-hook-error--porcelain.sh\n@@ -1,66 +1,66 @@\n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       next(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       next(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: no hook, fail to push special ref ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n \t\tHEAD:next \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: error: cannot find hook \"proc-receive\"\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tTo <URL/of/upstream.git>\n \t*    HEAD:refs/heads/next    [new branch]\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (fail to run proc-receive hook)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (fail to run proc-receive hook)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             next(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             next(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n \tgit -C \"$upstream\" update-ref -d refs/heads/next\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push --atomic: (B)                   next(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push --atomic: (B)                   next(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: no hook, all failed for atomic push ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain --atomic origin \\\n-\t\t$B:master \\\n+\t\t$B:main \\\n \t\tHEAD:next \\\n-\t\tHEAD:refs/for/master/topic >out 2>&1 &&\n+\t\tHEAD:refs/for/main/topic >out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: error: cannot find hook \"proc-receive\"\n \tTo <URL/of/upstream.git>\n-\t!    <COMMIT-B>:refs/heads/master    [remote rejected] (fail to run proc-receive hook)\n+\t!    <COMMIT-B>:refs/heads/main    [remote rejected] (fail to run proc-receive hook)\n \t!    HEAD:refs/heads/next    [remote rejected] (fail to run proc-receive hook)\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (fail to run proc-receive hook)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (fail to run proc-receive hook)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0013-bad-protocol.sh b/t/t5411/test-0013-bad-protocol.sh\nindex c5fe4cb37b..854c3e884a 100644\n--- a/t/t5411/test-0013-bad-protocol.sh\n+++ b/t/t5411/test-0013-bad-protocol.sh\n@@ -5,12 +5,12 @@ test_expect_success \"setup proc-receive hook (unknown version, $PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: bad protocol (unknown version, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \n@@ -20,7 +20,7 @@ test_expect_success \"proc-receive: bad protocol (unknown version, $PROTOCOL)\" '\n \t\t<actual >actual-report &&\n \tcat >expect <<-EOF &&\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (fail to run proc-receive hook)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (fail to run proc-receive hook)\n \tEOF\n \ttest_cmp expect actual-report &&\n \n@@ -36,7 +36,7 @@ test_expect_success \"proc-receive: bad protocol (unknown version, $PROTOCOL)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -48,30 +48,30 @@ test_expect_success \"setup proc-receive hook (hook --die-version, $PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: bad protocol (hook --die-version, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n \tremote: fatal: bad protocol version: 1\n \tremote: error: proc-receive version \"0\" is not supported\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (fail to run proc-receive hook)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (fail to run proc-receive hook)\n \tEOF\n \ttest_cmp expect actual &&\n \n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -83,21 +83,21 @@ test_expect_success \"setup proc-receive hook (hook --die-readline, $PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: bad protocol (hook --die-readline, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \n-\tgrep \"remote: fatal: protocol error: expected \\\"old new ref\\\", got \\\"<ZERO-OID> <COMMIT-A> refs/for/master/topic\\\"\" actual &&\n+\tgrep \"remote: fatal: protocol error: expected \\\"old new ref\\\", got \\\"<ZERO-OID> <COMMIT-A> refs/for/main/topic\\\"\" actual &&\n \n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -109,38 +109,38 @@ test_expect_success \"setup proc-receive hook (no report, $PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       next(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       next(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: bad protocol (no report, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n \t\tHEAD:refs/heads/next \\\n-\t\tHEAD:refs/for/master/topic >out 2>&1 &&\n+\t\tHEAD:refs/for/main/topic >out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tTo <URL/of/upstream.git>\n \t * [new branch] HEAD -> next\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             next(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             next(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n \tgit -C \"$upstream\" update-ref -d refs/heads/next\n \n@@ -154,29 +154,29 @@ test_expect_success \"setup proc-receive hook (no ref, $PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: bad protocol (no ref, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic\\\n+\t\tHEAD:refs/for/main/topic\\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive> ok\n \tremote: error: proc-receive reported incomplete status line: \"ok\"\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -185,33 +185,33 @@ test_expect_success \"setup proc-receive hook (unknown status, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"xx refs/for/master/topic\"\n+\t\t-r \"xx refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: bad protocol (unknown status, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\t\tHEAD:refs/for/master/topic \\\n+\t\t\tHEAD:refs/for/main/topic \\\n \t\t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> xx refs/for/master/topic\n-\tremote: error: proc-receive reported bad status \"xx\" on ref \"refs/for/master/topic\"\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> xx refs/for/main/topic\n+\tremote: error: proc-receive reported bad status \"xx\" on ref \"refs/for/main/topic\"\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0014-bad-protocol--porcelain.sh b/t/t5411/test-0014-bad-protocol--porcelain.sh\nindex 53b47b0185..88c56311da 100644\n--- a/t/t5411/test-0014-bad-protocol--porcelain.sh\n+++ b/t/t5411/test-0014-bad-protocol--porcelain.sh\n@@ -5,12 +5,12 @@ test_expect_success \"setup proc-receive hook (unknown version, $PROTOCOL/porcela\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: bad protocol (unknown version, $PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \n@@ -20,7 +20,7 @@ test_expect_success \"proc-receive: bad protocol (unknown version, $PROTOCOL/porc\n \t\t<actual >actual-report &&\n \tcat >expect <<-EOF &&\n \tTo <URL/of/upstream.git>\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (fail to run proc-receive hook)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (fail to run proc-receive hook)\n \tDone\n \tEOF\n \ttest_cmp expect actual-report &&\n@@ -37,7 +37,7 @@ test_expect_success \"proc-receive: bad protocol (unknown version, $PROTOCOL/porc\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -49,39 +49,39 @@ test_expect_success \"setup proc-receive hook (no report, $PROTOCOL/porcelain)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       next(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       next(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: bad protocol (no report, $PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n \t\tHEAD:refs/heads/next \\\n-\t\tHEAD:refs/for/master/topic >out 2>&1 &&\n+\t\tHEAD:refs/for/main/topic >out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tTo <URL/of/upstream.git>\n \t*    HEAD:refs/heads/next    [new branch]\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (proc-receive failed to report status)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (proc-receive failed to report status)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             next(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             next(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n \tgit -C \"$upstream\" update-ref -d refs/heads/next\n \n@@ -95,30 +95,30 @@ test_expect_success \"setup proc-receive hook (no ref, $PROTOCOL/porcelain)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: bad protocol (no ref, $PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic\\\n+\t\tHEAD:refs/for/main/topic\\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive> ok\n \tremote: error: proc-receive reported incomplete status line: \"ok\"\n \tTo <URL/of/upstream.git>\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (proc-receive failed to report status)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (proc-receive failed to report status)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -127,34 +127,34 @@ test_expect_success \"setup proc-receive hook (unknown status, $PROTOCOL/porcelai\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"xx refs/for/master/topic\"\n+\t\t-r \"xx refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: bad protocol (unknown status, $PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\t\tHEAD:refs/for/master/topic \\\n+\t\t\tHEAD:refs/for/main/topic \\\n \t\t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> xx refs/for/master/topic\n-\tremote: error: proc-receive reported bad status \"xx\" on ref \"refs/for/master/topic\"\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> xx refs/for/main/topic\n+\tremote: error: proc-receive reported bad status \"xx\" on ref \"refs/for/main/topic\"\n \tTo <URL/of/upstream.git>\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (proc-receive failed to report status)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (proc-receive failed to report status)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0020-report-ng.sh b/t/t5411/test-0020-report-ng.sh\nindex f726b7ca9c..5a9e0daf2d 100644\n--- a/t/t5411/test-0020-report-ng.sh\n+++ b/t/t5411/test-0020-report-ng.sh\n@@ -2,32 +2,32 @@ test_expect_success \"setup proc-receive hook (ng, no message, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ng refs/for/master/topic\"\n+\t\t-r \"ng refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: fail to update (ng, no message, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ng refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ng refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (failed)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (failed)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -36,32 +36,32 @@ test_expect_success \"setup proc-receive hook (ng message, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ng refs/for/master/topic error msg\"\n+\t\t-r \"ng refs/for/main/topic error msg\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: fail to update (ng, with message, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ng refs/for/master/topic error msg\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ng refs/for/main/topic error msg\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (error msg)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (error msg)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0021-report-ng--porcelain.sh b/t/t5411/test-0021-report-ng--porcelain.sh\nindex fbf5569103..93475a83cf 100644\n--- a/t/t5411/test-0021-report-ng--porcelain.sh\n+++ b/t/t5411/test-0021-report-ng--porcelain.sh\n@@ -2,33 +2,33 @@ test_expect_success \"setup proc-receive hook (ng, no message, $PROTOCOL/porcelai\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ng refs/for/master/topic\"\n+\t\t-r \"ng refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: fail to update (ng, no message, $PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ng refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ng refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (failed)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (failed)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -37,33 +37,33 @@ test_expect_success \"setup proc-receive hook (ng message, $PROTOCOL/porcelain)\"\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ng refs/for/master/topic error msg\"\n+\t\t-r \"ng refs/for/main/topic error msg\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: fail to update (ng, with message, $PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ng refs/for/master/topic error msg\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ng refs/for/main/topic error msg\n \tTo <URL/of/upstream.git>\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (error msg)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (error msg)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0022-report-unexpect-ref.sh b/t/t5411/test-0022-report-unexpect-ref.sh\nindex 92a415b929..f8be8a0ba1 100644\n--- a/t/t5411/test-0022-report-unexpect-ref.sh\n+++ b/t/t5411/test-0022-report-unexpect-ref.sh\n@@ -2,44 +2,44 @@ test_expect_success \"setup proc-receive hook (unexpected ref, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/heads/master\"\n+\t\t-r \"ok refs/heads/main\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         : (B)                   refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         : (B)                   refs/for/main/topic\n test_expect_success \"proc-receive: report unexpected ref ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\t$B:refs/heads/master \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\t$B:refs/heads/main \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/heads/master\n-\tremote: error: proc-receive reported status on unexpected ref: refs/heads/master\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/heads/main\n+\tremote: error: proc-receive reported status on unexpected ref: refs/heads/main\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tTo <URL/of/upstream.git>\n-\t <OID-A>..<OID-B> <COMMIT-B> -> master\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)\n+\t <OID-A>..<OID-B> <COMMIT-B> -> main\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(B)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n-\tgit -C \"$upstream\" update-ref refs/heads/master $A\n+\tgit -C \"$upstream\" update-ref refs/heads/main $A\n '\ndiff --git a/t/t5411/test-0023-report-unexpect-ref--porcelain.sh b/t/t5411/test-0023-report-unexpect-ref--porcelain.sh\nindex acbf93e40a..778150fa03 100644\n--- a/t/t5411/test-0023-report-unexpect-ref--porcelain.sh\n+++ b/t/t5411/test-0023-report-unexpect-ref--porcelain.sh\n@@ -2,45 +2,45 @@ test_expect_success \"setup proc-receive hook (unexpected ref, $PROTOCOL/porcelai\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/heads/master\"\n+\t\t-r \"ok refs/heads/main\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         : (B)                   refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         : (B)                   refs/for/main/topic\n test_expect_success \"proc-receive: report unexpected ref ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\t$B:refs/heads/master \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\t$B:refs/heads/main \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/heads/master\n-\tremote: error: proc-receive reported status on unexpected ref: refs/heads/master\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/heads/main\n+\tremote: error: proc-receive reported status on unexpected ref: refs/heads/main\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tTo <URL/of/upstream.git>\n-\t     <COMMIT-B>:refs/heads/master    <OID-A>..<OID-B>\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (proc-receive failed to report status)\n+\t     <COMMIT-B>:refs/heads/main    <OID-A>..<OID-B>\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (proc-receive failed to report status)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(B)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n-\tgit -C \"$upstream\" update-ref refs/heads/master $A\n+\tgit -C \"$upstream\" update-ref refs/heads/main $A\n '\ndiff --git a/t/t5411/test-0024-report-unknown-ref.sh b/t/t5411/test-0024-report-unknown-ref.sh\nindex c3946f329a..d4e74e4681 100644\n--- a/t/t5411/test-0024-report-unknown-ref.sh\n+++ b/t/t5411/test-0024-report-unknown-ref.sh\n@@ -2,12 +2,12 @@ test_expect_success \"setup proc-receive hook (unexpected ref, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\"\n+\t\t-r \"ok refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n # git push         :                       refs/for/a/b/c/my/topic\n test_expect_success \"proc-receive: report unknown reference ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n@@ -19,8 +19,8 @@ test_expect_success \"proc-receive: report unknown reference ($PROTOCOL)\" '\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/my/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/my/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n-\tremote: error: proc-receive reported status on unknown ref: refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n+\tremote: error: proc-receive reported status on unknown ref: refs/for/main/topic\n \tTo <URL/of/upstream.git>\n \t ! [remote rejected] HEAD -> refs/for/a/b/c/my/topic (proc-receive failed to report status)\n \tEOF\n@@ -28,7 +28,7 @@ test_expect_success \"proc-receive: report unknown reference ($PROTOCOL)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0025-report-unknown-ref--porcelain.sh b/t/t5411/test-0025-report-unknown-ref--porcelain.sh\nindex d093b1a579..039e8b6163 100644\n--- a/t/t5411/test-0025-report-unknown-ref--porcelain.sh\n+++ b/t/t5411/test-0025-report-unknown-ref--porcelain.sh\n@@ -2,12 +2,12 @@ test_expect_success \"setup proc-receive hook (unexpected ref, $PROTOCOL/porcelai\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\"\n+\t\t-r \"ok refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n # git push         :                       refs/for/a/b/c/my/topic\n test_expect_success \"proc-receive: report unknown reference ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n@@ -19,8 +19,8 @@ test_expect_success \"proc-receive: report unknown reference ($PROTOCOL/porcelain\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/my/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/my/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n-\tremote: error: proc-receive reported status on unknown ref: refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n+\tremote: error: proc-receive reported status on unknown ref: refs/for/main/topic\n \tTo <URL/of/upstream.git>\n \t!    HEAD:refs/for/a/b/c/my/topic    [remote rejected] (proc-receive failed to report status)\n \tDone\n@@ -29,7 +29,7 @@ test_expect_success \"proc-receive: report unknown reference ($PROTOCOL/porcelain\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0026-push-options.sh b/t/t5411/test-0026-push-options.sh\nindex d0c4da8b23..d414be87d0 100644\n--- a/t/t5411/test-0026-push-options.sh\n+++ b/t/t5411/test-0026-push-options.sh\n@@ -3,19 +3,19 @@ test_expect_success \"setup proc-receive hook and disable push-options ($PROTOCOL\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\"\n+\t\t-r \"ok refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push -o ...  :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push -o ...  :                       refs/for/main/topic\n test_expect_success \"proc-receive: not support push options ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push \\\n \t\t-o issue=123 \\\n \t\t-o reviewer=user1 \\\n \t\torigin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \ttest_i18ngrep \"fatal: the receiving end does not support push options\" \\\n@@ -23,7 +23,7 @@ test_expect_success \"proc-receive: not support push options ($PROTOCOL)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -32,9 +32,9 @@ test_expect_success \"enable push options ($PROTOCOL)\" '\n \tgit -C \"$upstream\" config receive.advertisePushOptions true\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push -o ...  :                       next(A)  refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push -o ...  :                       next(A)  refs/for/main/topic\n test_expect_success \"proc-receive: push with options ($PROTOCOL)\" '\n \tgit -C workbench push \\\n \t\t--atomic \\\n@@ -42,38 +42,38 @@ test_expect_success \"proc-receive: push with options ($PROTOCOL)\" '\n \t\t-o reviewer=user1 \\\n \t\torigin \\\n \t\tHEAD:refs/heads/next \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive: atomic push_options\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive< issue=123\n \tremote: proc-receive< reviewer=user1\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n \t * [new branch] HEAD -> next\n-\t * [new reference] HEAD -> refs/for/master/topic\n+\t * [new reference] HEAD -> refs/for/main/topic\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             next(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             next(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n \tgit -C \"$upstream\" update-ref -d refs/heads/next\n '\ndiff --git a/t/t5411/test-0027-push-options--porcelain.sh b/t/t5411/test-0027-push-options--porcelain.sh\nindex c89a1e7c57..d5d0dcb172 100644\n--- a/t/t5411/test-0027-push-options--porcelain.sh\n+++ b/t/t5411/test-0027-push-options--porcelain.sh\n@@ -3,20 +3,20 @@ test_expect_success \"setup proc-receive hook and disable push-options ($PROTOCOL\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\"\n+\t\t-r \"ok refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push -o ...  :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push -o ...  :                       refs/for/main/topic\n test_expect_success \"proc-receive: not support push options ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push \\\n \t\t--porcelain \\\n \t\t-o issue=123 \\\n \t\t-o reviewer=user1 \\\n \t\torigin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \ttest_i18ngrep \"fatal: the receiving end does not support push options\" \\\n@@ -24,7 +24,7 @@ test_expect_success \"proc-receive: not support push options ($PROTOCOL/porcelain\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -33,9 +33,9 @@ test_expect_success \"enable push options ($PROTOCOL/porcelain)\" '\n \tgit -C \"$upstream\" config receive.advertisePushOptions true\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push -o ...  :                       next(A)  refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push -o ...  :                       next(A)  refs/for/main/topic\n test_expect_success \"proc-receive: push with options ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push \\\n \t\t--porcelain \\\n@@ -44,39 +44,39 @@ test_expect_success \"proc-receive: push with options ($PROTOCOL/porcelain)\" '\n \t\t-o reviewer=user1 \\\n \t\torigin \\\n \t\tHEAD:refs/heads/next \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive: atomic push_options\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive< issue=123\n \tremote: proc-receive< reviewer=user1\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n \t*    HEAD:refs/heads/next    [new branch]\n-\t*    HEAD:refs/for/master/topic    [new reference]\n+\t*    HEAD:refs/for/main/topic    [new reference]\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             next(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             next(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n \tgit -C \"$upstream\" update-ref -d refs/heads/next\n '\n-- \ngitgitgadget\n\n"},{"id":"408544","messageId":"b9fcc47eb7d14aa2c879a3ec2a7d1f5804fcb283.1603839487.git.gitgitgadget@gmail.com","threadId":"54518","inReplyTo":"pull.760.git.1603839487.gitgitgadget@gmail.com","subject":"[PATCH 2/4] t5411: start adjusting the support files for init.defaultBranch=main","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-27T22:58:05Z","receivedAt":"2020-10-27T22:58:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t/t5411/test-00[3-5]*\n\nWe do not convert the files in `t/t5411/` in one go because the patch\nwould be too big (mails larger than 100kB are rejected by the Git\nmailing list). Instead, we start with roughly half of the support files.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5411/test-0030-report-ok.sh                |  22 ++--\n t/t5411/test-0031-report-ok--porcelain.sh     |  22 ++--\n t/t5411/test-0032-report-with-options.sh      | 120 +++++++++---------\n ...est-0033-report-with-options--porcelain.sh | 120 +++++++++---------\n t/t5411/test-0034-report-ft.sh                |  30 ++---\n t/t5411/test-0035-report-ft--porcelain.sh     |  30 ++---\n ...t-0036-report-multi-rewrite-for-one-ref.sh |  90 ++++++-------\n ...rt-multi-rewrite-for-one-ref--porcelain.sh |  82 ++++++------\n t/t5411/test-0038-report-mixed-refs.sh        |  40 +++---\n .../test-0039-report-mixed-refs--porcelain.sh |  40 +++---\n t/t5411/test-0040-process-all-refs.sh         |  42 +++---\n .../test-0041-process-all-refs--porcelain.sh  |  42 +++---\n ...t-0050-proc-receive-refs-with-modifiers.sh |  42 +++---\n 13 files changed, 361 insertions(+), 361 deletions(-)\n\ndiff --git a/t/t5411/test-0030-report-ok.sh b/t/t5411/test-0030-report-ok.sh\nindex 44c99d3831..5d6feef118 100644\n--- a/t/t5411/test-0030-report-ok.sh\n+++ b/t/t5411/test-0030-report-ok.sh\n@@ -2,34 +2,34 @@ test_expect_success \"setup proc-receive hook (ok, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\"\n+\t\t-r \"ok refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: ok ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: # post-receive hook\n-\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t * [new reference] HEAD -> refs/for/master/topic\n+\t * [new reference] HEAD -> refs/for/main/topic\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0031-report-ok--porcelain.sh b/t/t5411/test-0031-report-ok--porcelain.sh\nindex 3223b26184..91666d32df 100644\n--- a/t/t5411/test-0031-report-ok--porcelain.sh\n+++ b/t/t5411/test-0031-report-ok--porcelain.sh\n@@ -2,35 +2,35 @@ test_expect_success \"setup proc-receive hook (ok, $PROTOCOL/porcelain)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\"\n+\t\t-r \"ok refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: ok ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: # post-receive hook\n-\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t*    HEAD:refs/for/master/topic    [new reference]\n+\t*    HEAD:refs/for/main/topic    [new reference]\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0032-report-with-options.sh b/t/t5411/test-0032-report-with-options.sh\nindex b77b78c49f..a0faf5c7ff 100644\n--- a/t/t5411/test-0032-report-with-options.sh\n+++ b/t/t5411/test-0032-report-with-options.sh\n@@ -7,24 +7,24 @@ test_expect_success \"setup proc-receive hook (option without matching ok, $PROTO\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option without matching ok ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: error: proc-receive reported \"option\" without a matching \"ok/ng\" directive\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -33,25 +33,25 @@ test_expect_success \"setup proc-receive hook (option refname, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option refname ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/pull/123/head\n@@ -65,25 +65,25 @@ test_expect_success \"setup proc-receive hook (option refname and forced-update,\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option forced-update\"\n \tEOF\n '\n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option refname and forced-update ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option forced-update\n \tremote: # post-receive hook\n@@ -98,26 +98,26 @@ test_expect_success \"setup proc-receive hook (option refname and old-oid, $PROTO\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option old-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option refname and old-oid ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: # post-receive hook\n@@ -132,30 +132,30 @@ test_expect_success \"setup proc-receive hook (option old-oid, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option old-oid ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t <OID-B>..<OID-A> HEAD -> refs/for/master/topic\n+\t <OID-B>..<OID-A> HEAD -> refs/for/main/topic\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -164,32 +164,32 @@ test_expect_success \"setup proc-receive hook (option old-oid and new-oid, $PROTO\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option old-oid and new-oid ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t <OID-A>..<OID-B> HEAD -> refs/for/master/topic\n+\t <OID-A>..<OID-B> HEAD -> refs/for/main/topic\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -201,7 +201,7 @@ test_expect_success \"setup proc-receive hook (report with multiple rewrites, $PR\n \t\t-r \"ok refs/for/a/b/c/topic\" \\\n \t\t-r \"ok refs/for/next/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/124/head\" \\\n \t\t-r \"option old-oid $B\" \\\n \t\t-r \"option forced-update\" \\\n@@ -209,29 +209,29 @@ test_expect_success \"setup proc-receive hook (report with multiple rewrites, $PR\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report with multiple rewrites ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n \t\tHEAD:refs/for/next/topic \\\n \t\tHEAD:refs/for/a/b/c/topic \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive> ok refs/for/a/b/c/topic\n \tremote: proc-receive> ok refs/for/next/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/124/head\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: proc-receive> option forced-update\n@@ -250,7 +250,7 @@ test_expect_success \"proc-receive: report with multiple rewrites ($PROTOCOL)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0033-report-with-options--porcelain.sh b/t/t5411/test-0033-report-with-options--porcelain.sh\nindex 1fe352b686..32ae26bcfb 100644\n--- a/t/t5411/test-0033-report-with-options--porcelain.sh\n+++ b/t/t5411/test-0033-report-with-options--porcelain.sh\n@@ -7,24 +7,24 @@ test_expect_success \"setup proc-receive hook (option without matching ok, $PROTO\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option without matching ok ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: error: proc-receive reported \"option\" without a matching \"ok/ng\" directive\n \tTo <URL/of/upstream.git>\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (proc-receive failed to report status)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (proc-receive failed to report status)\n \tDone\n \tEOF\n \ttest_cmp expect actual\n@@ -34,25 +34,25 @@ test_expect_success \"setup proc-receive hook (option refname, $PROTOCOL/porcelai\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option refname ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/pull/123/head\n@@ -67,26 +67,26 @@ test_expect_success \"setup proc-receive hook (option refname and forced-update,\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option forced-update\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option refname and forced-update ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option forced-update\n \tremote: # post-receive hook\n@@ -102,26 +102,26 @@ test_expect_success \"setup proc-receive hook (option refname and old-oid, $PROTO\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option old-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option refname and old-oid ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: # post-receive hook\n@@ -137,30 +137,30 @@ test_expect_success \"setup proc-receive hook (option old-oid, $PROTOCOL/porcelai\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option old-oid ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t     HEAD:refs/for/master/topic    <OID-B>..<OID-A>\n+\t     HEAD:refs/for/main/topic    <OID-B>..<OID-A>\n \tDone\n \tEOF\n \ttest_cmp expect actual\n@@ -170,32 +170,32 @@ test_expect_success \"setup proc-receive hook (option old-oid and new-oid, $PROTO\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option old-oid and new-oid ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t     HEAD:refs/for/master/topic    <OID-A>..<OID-B>\n+\t     HEAD:refs/for/main/topic    <OID-A>..<OID-B>\n \tDone\n \tEOF\n \ttest_cmp expect actual\n@@ -208,7 +208,7 @@ test_expect_success \"setup proc-receive hook (report with multiple rewrites, $PR\n \t\t-r \"ok refs/for/a/b/c/topic\" \\\n \t\t-r \"ok refs/for/next/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/124/head\" \\\n \t\t-r \"option old-oid $B\" \\\n \t\t-r \"option forced-update\" \\\n@@ -217,29 +217,29 @@ test_expect_success \"setup proc-receive hook (report with multiple rewrites, $PR\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report with multiple rewrites ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n \t\tHEAD:refs/for/next/topic \\\n \t\tHEAD:refs/for/a/b/c/topic \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive> ok refs/for/a/b/c/topic\n \tremote: proc-receive> ok refs/for/next/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/124/head\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: proc-receive> option forced-update\n@@ -259,7 +259,7 @@ test_expect_success \"proc-receive: report with multiple rewrites ($PROTOCOL/porc\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0034-report-ft.sh b/t/t5411/test-0034-report-ft.sh\nindex aca2b0676c..c355c290d2 100644\n--- a/t/t5411/test-0034-report-ft.sh\n+++ b/t/t5411/test-0034-report-ft.sh\n@@ -2,43 +2,43 @@ test_expect_success \"setup proc-receive hook (ft, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option fall-through\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(B)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(B)\n test_expect_success \"proc-receive: fall throught, let receive-pack to execute ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\t$B:refs/for/master/topic \\\n+\t\t$B:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option fall-through\n \tremote: # post-receive hook\n-\tremote: post-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t * [new reference] <COMMIT-B> -> refs/for/master/topic\n+\t * [new reference] <COMMIT-B> -> refs/for/main/topic\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/for/master/topic\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-B> refs/for/main/topic\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             refs/for/master/topic(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             refs/for/main/topic(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n-\tgit -C \"$upstream\" update-ref -d refs/for/master/topic\n+\tgit -C \"$upstream\" update-ref -d refs/for/main/topic\n '\ndiff --git a/t/t5411/test-0035-report-ft--porcelain.sh b/t/t5411/test-0035-report-ft--porcelain.sh\nindex 30ffffb352..8ce4e58f2a 100644\n--- a/t/t5411/test-0035-report-ft--porcelain.sh\n+++ b/t/t5411/test-0035-report-ft--porcelain.sh\n@@ -2,44 +2,44 @@ test_expect_success \"setup proc-receive hook (fall-through, $PROTOCOL/porcelain)\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option fall-through\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(B)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(B)\n test_expect_success \"proc-receive: fall throught, let receive-pack to execute ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\t$B:refs/for/master/topic \\\n+\t\t$B:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option fall-through\n \tremote: # post-receive hook\n-\tremote: post-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t*    <COMMIT-B>:refs/for/master/topic    [new reference]\n+\t*    <COMMIT-B>:refs/for/main/topic    [new reference]\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/for/master/topic\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-B> refs/for/main/topic\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             refs/for/master/topic(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             refs/for/main/topic(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n-\tgit -C \"$upstream\" update-ref -d refs/for/master/topic\n+\tgit -C \"$upstream\" update-ref -d refs/for/main/topic\n '\ndiff --git a/t/t5411/test-0036-report-multi-rewrite-for-one-ref.sh b/t/t5411/test-0036-report-multi-rewrite-for-one-ref.sh\nindex 73283d81e8..fad8eea8a0 100644\n--- a/t/t5411/test-0036-report-multi-rewrite-for-one-ref.sh\n+++ b/t/t5411/test-0036-report-multi-rewrite-for-one-ref.sh\n@@ -17,50 +17,50 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, no\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/24/124/1\" \\\n \t\t-r \"option old-oid $ZERO_OID\" \\\n \t\t-r \"option new-oid $A\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/25/125/1\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: multiple rewrite for one ref, no refname for the 1st rewrite ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/24/124/1\n \tremote: proc-receive> option old-oid <ZERO-OID>\n \tremote: proc-receive> option new-oid <COMMIT-A>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/25/125/1\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/changes/24/124/1\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/changes/25/125/1\n \tTo <URL/of/upstream.git>\n-\t <OID-A>..<OID-B> HEAD -> refs/for/master/topic\n+\t <OID-A>..<OID-B> HEAD -> refs/for/main/topic\n \t * [new reference] HEAD -> refs/changes/24/124/1\n \t <OID-A>..<OID-B> HEAD -> refs/changes/25/125/1\n \tEOF\n@@ -68,7 +68,7 @@ test_expect_success \"proc-receive: multiple rewrite for one ref, no refname for\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -80,10 +80,10 @@ test_expect_success \"proc-receive: check remote-tracking #1 ($PROTOCOL)\" '\n \tcat >expect <<-EOF &&\n \t<COMMIT-A> refs/t/changes/24/124/1\n \t<COMMIT-B> refs/t/changes/25/125/1\n-\t<COMMIT-B> refs/t/for/master/topic\n+\t<COMMIT-B> refs/t/for/main/topic\n \tEOF\n \ttest_cmp expect actual &&\n-\tgit -C workbench update-ref -d refs/t/for/master/topic &&\n+\tgit -C workbench update-ref -d refs/t/for/main/topic &&\n \tgit -C workbench update-ref -d refs/t/changes/24/124/1 &&\n \tgit -C workbench update-ref -d refs/t/changes/25/125/1\n '\n@@ -92,14 +92,14 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, no\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/24/124/1\" \\\n \t\t-r \"option old-oid $ZERO_OID\" \\\n \t\t-r \"option new-oid $A\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/25/125/1\" \\\n \t\t-r \"option old-oid $B\" \\\n \t\t-r \"option new-oid $A\" \\\n@@ -107,45 +107,45 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, no\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: multiple rewrites for one ref, no refname for the 2nd rewrite ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/24/124/1\n \tremote: proc-receive> option old-oid <ZERO-OID>\n \tremote: proc-receive> option new-oid <COMMIT-A>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/25/125/1\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: proc-receive> option new-oid <COMMIT-A>\n \tremote: proc-receive> option forced-update\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/changes/24/124/1\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/changes/25/125/1\n \tTo <URL/of/upstream.git>\n \t * [new reference] HEAD -> refs/changes/24/124/1\n-\t <OID-A>..<OID-B> HEAD -> refs/for/master/topic\n+\t <OID-A>..<OID-B> HEAD -> refs/for/main/topic\n \t + <OID-B>...<OID-A> HEAD -> refs/changes/25/125/1 (forced update)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -157,10 +157,10 @@ test_expect_success \"proc-receive: check remote-tracking #2 ($PROTOCOL)\" '\n \tcat >expect <<-EOF &&\n \t<COMMIT-A> refs/t/changes/24/124/1\n \t<COMMIT-A> refs/t/changes/25/125/1\n-\t<COMMIT-B> refs/t/for/master/topic\n+\t<COMMIT-B> refs/t/for/main/topic\n \tEOF\n \ttest_cmp expect actual &&\n-\tgit -C workbench update-ref -d refs/t/for/master/topic &&\n+\tgit -C workbench update-ref -d refs/t/for/main/topic &&\n \tgit -C workbench update-ref -d refs/t/changes/24/124/1 &&\n \tgit -C workbench update-ref -d refs/t/changes/25/125/1\n '\n@@ -169,31 +169,31 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, $PR\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/23/123/1\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/24/124/2\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: multiple rewrites for one ref ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/23/123/1\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/24/124/2\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n@@ -208,7 +208,7 @@ test_expect_success \"proc-receive: multiple rewrites for one ref ($PROTOCOL)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh b/t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh\nindex 77b5b22ed4..dc254d57eb 100644\n--- a/t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh\n+++ b/t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh\n@@ -2,50 +2,50 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, no\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/24/124/1\" \\\n \t\t-r \"option old-oid $ZERO_OID\" \\\n \t\t-r \"option new-oid $A\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/25/125/1\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: multiple rewrite for one ref, no refname for the 1st rewrite ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/24/124/1\n \tremote: proc-receive> option old-oid <ZERO-OID>\n \tremote: proc-receive> option new-oid <COMMIT-A>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/25/125/1\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/changes/24/124/1\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/changes/25/125/1\n \tTo <URL/of/upstream.git>\n-\t     HEAD:refs/for/master/topic    <OID-A>..<OID-B>\n+\t     HEAD:refs/for/main/topic    <OID-A>..<OID-B>\n \t*    HEAD:refs/changes/24/124/1    [new reference]\n \t     HEAD:refs/changes/25/125/1    <OID-A>..<OID-B>\n \tDone\n@@ -54,7 +54,7 @@ test_expect_success \"proc-receive: multiple rewrite for one ref, no refname for\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -63,14 +63,14 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, no\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/24/124/1\" \\\n \t\t-r \"option old-oid $ZERO_OID\" \\\n \t\t-r \"option new-oid $A\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/25/125/1\" \\\n \t\t-r \"option old-oid $B\" \\\n \t\t-r \"option new-oid $A\" \\\n@@ -78,38 +78,38 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, no\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: multiple rewrites for one ref, no refname for the 2nd rewrite ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/24/124/1\n \tremote: proc-receive> option old-oid <ZERO-OID>\n \tremote: proc-receive> option new-oid <COMMIT-A>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/25/125/1\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: proc-receive> option new-oid <COMMIT-A>\n \tremote: proc-receive> option forced-update\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/changes/24/124/1\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/changes/25/125/1\n \tTo <URL/of/upstream.git>\n \t*    HEAD:refs/changes/24/124/1    [new reference]\n-\t     HEAD:refs/for/master/topic    <OID-A>..<OID-B>\n+\t     HEAD:refs/for/main/topic    <OID-A>..<OID-B>\n \t+    HEAD:refs/changes/25/125/1    <OID-B>...<OID-A> (forced update)\n \tDone\n \tEOF\n@@ -117,7 +117,7 @@ test_expect_success \"proc-receive: multiple rewrites for one ref, no refname for\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -126,31 +126,31 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, $PR\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/23/123/1\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/24/124/2\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: multiple rewrites for one ref ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/23/123/1\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/24/124/2\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n@@ -166,7 +166,7 @@ test_expect_success \"proc-receive: multiple rewrites for one ref ($PROTOCOL/porc\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0038-report-mixed-refs.sh b/t/t5411/test-0038-report-mixed-refs.sh\nindex a74a2cb449..0d071ebaa6 100644\n--- a/t/t5411/test-0038-report-mixed-refs.sh\n+++ b/t/t5411/test-0038-report-mixed-refs.sh\n@@ -4,63 +4,63 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL)\" '\n \ttest-tool proc-receive -v \\\n \t\t-r \"ok refs/for/next/topic2\" \\\n \t\t-r \"ng refs/for/next/topic1 fail to call Web API\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n-\t\t-r \"option refname refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n+\t\t-r \"option refname refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         : (B)                   bar(A)  baz(A)  refs/for/next/topic(A)  foo(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         : (B)                   bar(A)  baz(A)  refs/for/next/topic(A)  foo(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report update of mixed refs ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\t$B:refs/heads/master \\\n+\t\t$B:refs/heads/main \\\n \t\tHEAD:refs/heads/bar \\\n \t\tHEAD:refs/heads/baz \\\n \t\tHEAD:refs/for/next/topic2 \\\n \t\tHEAD:refs/for/next/topic1 \\\n \t\tHEAD:refs/heads/foo \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\tHEAD:refs/for/next/topic3 \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3\n \tremote: # proc-receive hook\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3\n \tremote: proc-receive> ok refs/for/next/topic2\n \tremote: proc-receive> ng refs/for/next/topic1 fail to call Web API\n-\tremote: proc-receive> ok refs/for/master/topic\n-\tremote: proc-receive> option refname refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n+\tremote: proc-receive> option refname refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t <OID-A>..<OID-B> <COMMIT-B> -> master\n+\t <OID-A>..<OID-B> <COMMIT-B> -> main\n \t * [new branch] HEAD -> bar\n \t * [new branch] HEAD -> baz\n \t * [new reference] HEAD -> refs/for/next/topic2\n \t * [new branch] HEAD -> foo\n-\t <OID-A>..<OID-B> HEAD -> refs/for/master/topic\n+\t <OID-A>..<OID-B> HEAD -> refs/for/main/topic\n \t ! [remote rejected] HEAD -> refs/for/next/topic1 (fail to call Web API)\n \t ! [remote rejected] HEAD -> refs/for/next/topic3 (proc-receive failed to report status)\n \tEOF\n@@ -71,17 +71,17 @@ test_expect_success \"proc-receive: report update of mixed refs ($PROTOCOL)\" '\n \t<COMMIT-A> refs/heads/bar\n \t<COMMIT-A> refs/heads/baz\n \t<COMMIT-A> refs/heads/foo\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)             foo(A)  bar(A))  baz(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(B)             foo(A)  bar(A))  baz(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n \t(\n \t\tcd \"$upstream\" &&\n-\t\tgit update-ref refs/heads/master $A &&\n+\t\tgit update-ref refs/heads/main $A &&\n \t\tgit update-ref -d refs/heads/foo &&\n \t\tgit update-ref -d refs/heads/bar &&\n \t\tgit update-ref -d refs/heads/baz\ndiff --git a/t/t5411/test-0039-report-mixed-refs--porcelain.sh b/t/t5411/test-0039-report-mixed-refs--porcelain.sh\nindex e4baa13ea3..d8409912fd 100644\n--- a/t/t5411/test-0039-report-mixed-refs--porcelain.sh\n+++ b/t/t5411/test-0039-report-mixed-refs--porcelain.sh\n@@ -4,63 +4,63 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL/porcelain)\" '\n \ttest-tool proc-receive -v \\\n \t\t-r \"ok refs/for/next/topic2\" \\\n \t\t-r \"ng refs/for/next/topic1 fail to call Web API\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n-\t\t-r \"option refname refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n+\t\t-r \"option refname refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         : (B)                   bar(A)  baz(A)  refs/for/next/topic(A)  foo(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         : (B)                   bar(A)  baz(A)  refs/for/next/topic(A)  foo(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report update of mixed refs ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\t$B:refs/heads/master \\\n+\t\t$B:refs/heads/main \\\n \t\tHEAD:refs/heads/bar \\\n \t\tHEAD:refs/heads/baz \\\n \t\tHEAD:refs/for/next/topic2 \\\n \t\tHEAD:refs/for/next/topic1 \\\n \t\tHEAD:refs/heads/foo \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\tHEAD:refs/for/next/topic3 \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3\n \tremote: # proc-receive hook\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3\n \tremote: proc-receive> ok refs/for/next/topic2\n \tremote: proc-receive> ng refs/for/next/topic1 fail to call Web API\n-\tremote: proc-receive> ok refs/for/master/topic\n-\tremote: proc-receive> option refname refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n+\tremote: proc-receive> option refname refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t     <COMMIT-B>:refs/heads/master    <OID-A>..<OID-B>\n+\t     <COMMIT-B>:refs/heads/main    <OID-A>..<OID-B>\n \t*    HEAD:refs/heads/bar    [new branch]\n \t*    HEAD:refs/heads/baz    [new branch]\n \t*    HEAD:refs/for/next/topic2    [new reference]\n \t*    HEAD:refs/heads/foo    [new branch]\n-\t     HEAD:refs/for/master/topic    <OID-A>..<OID-B>\n+\t     HEAD:refs/for/main/topic    <OID-A>..<OID-B>\n \t!    HEAD:refs/for/next/topic1    [remote rejected] (fail to call Web API)\n \t!    HEAD:refs/for/next/topic3    [remote rejected] (proc-receive failed to report status)\n \tDone\n@@ -72,17 +72,17 @@ test_expect_success \"proc-receive: report update of mixed refs ($PROTOCOL/porcel\n \t<COMMIT-A> refs/heads/bar\n \t<COMMIT-A> refs/heads/baz\n \t<COMMIT-A> refs/heads/foo\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)             foo(A)  bar(A))  baz(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(B)             foo(A)  bar(A))  baz(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n \t(\n \t\tcd \"$upstream\" &&\n-\t\tgit update-ref refs/heads/master $A &&\n+\t\tgit update-ref refs/heads/main $A &&\n \t\tgit update-ref -d refs/heads/foo &&\n \t\tgit update-ref -d refs/heads/bar &&\n \t\tgit update-ref -d refs/heads/baz\ndiff --git a/t/t5411/test-0040-process-all-refs.sh b/t/t5411/test-0040-process-all-refs.sh\nindex b07c999f53..2565302a17 100644\n--- a/t/t5411/test-0040-process-all-refs.sh\n+++ b/t/t5411/test-0040-process-all-refs.sh\n@@ -3,12 +3,12 @@ test_expect_success \"config receive.procReceiveRefs = refs ($PROTOCOL)\" '\n \tgit -C \"$upstream\" config --add receive.procReceiveRefs refs\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"setup upstream branches ($PROTOCOL)\" '\n \t(\n \t\tcd \"$upstream\" &&\n-\t\tgit update-ref refs/heads/master $B &&\n+\t\tgit update-ref refs/heads/main $B &&\n \t\tgit update-ref refs/heads/foo $A &&\n \t\tgit update-ref refs/heads/bar $A &&\n \t\tgit update-ref refs/heads/baz $A\n@@ -20,13 +20,13 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/heads/master\" \\\n+\t\t-r \"ok refs/heads/main\" \\\n \t\t-r \"option fall-through\" \\\n \t\t-r \"ok refs/heads/foo\" \\\n \t\t-r \"option fall-through\" \\\n \t\t-r \"ok refs/heads/bar\" \\\n \t\t-r \"option fall-through\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\" \\\n@@ -38,15 +38,15 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(B)             foo(A)  bar(A))  baz(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push -f      : master(A)             (NULL)  (B)              refs/for/master/topic(A)  refs/for/next/topic(A)\n+# Refs of upstream : main(B)             foo(A)  bar(A))  baz(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push -f      : main(A)             (NULL)  (B)              refs/for/main/topic(A)  refs/for/next/topic(A)\n test_expect_success \"proc-receive: process all refs ($PROTOCOL)\" '\n \tgit -C workbench push -f origin \\\n-\t\tHEAD:refs/heads/master \\\n+\t\tHEAD:refs/heads/main \\\n \t\t:refs/heads/foo \\\n \t\t$B:refs/heads/bar \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\tHEAD:refs/for/next/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n@@ -54,22 +54,22 @@ test_expect_success \"proc-receive: process all refs ($PROTOCOL)\" '\n \tremote: # pre-receive hook\n \tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar\n \tremote: pre-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo\n-\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar\n \tremote: proc-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo\n-\tremote: proc-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n-\tremote: proc-receive> ok refs/heads/master\n+\tremote: proc-receive> ok refs/heads/main\n \tremote: proc-receive> option fall-through\n \tremote: proc-receive> ok refs/heads/foo\n \tremote: proc-receive> option fall-through\n \tremote: proc-receive> ok refs/heads/bar\n \tremote: proc-receive> option fall-through\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n@@ -81,13 +81,13 @@ test_expect_success \"proc-receive: process all refs ($PROTOCOL)\" '\n \tremote: # post-receive hook\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar\n \tremote: post-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo\n-\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n+\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/pull/123/head\n \tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/pull/124/head\n \tTo <URL/of/upstream.git>\n \t <OID-A>..<OID-B> <COMMIT-B> -> bar\n \t - [deleted] foo\n-\t + <OID-B>...<OID-A> HEAD -> master (forced update)\n+\t + <OID-B>...<OID-A> HEAD -> main (forced update)\n \t <OID-A>..<OID-B> HEAD -> refs/pull/123/head\n \t + <OID-B>...<OID-A> HEAD -> refs/pull/124/head (forced update)\n \tEOF\n@@ -97,13 +97,13 @@ test_expect_success \"proc-receive: process all refs ($PROTOCOL)\" '\n \tcat >expect <<-EOF &&\n \t<COMMIT-B> refs/heads/bar\n \t<COMMIT-A> refs/heads/baz\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             bar(A)  baz(B)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             bar(A)  baz(B)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n \t(\n \t\tcd \"$upstream\" &&\ndiff --git a/t/t5411/test-0041-process-all-refs--porcelain.sh b/t/t5411/test-0041-process-all-refs--porcelain.sh\nindex 0dd9824616..e21420b60d 100644\n--- a/t/t5411/test-0041-process-all-refs--porcelain.sh\n+++ b/t/t5411/test-0041-process-all-refs--porcelain.sh\n@@ -3,12 +3,12 @@ test_expect_success \"config receive.procReceiveRefs = refs ($PROTOCOL/porcelain)\n \tgit -C \"$upstream\" config --add receive.procReceiveRefs refs\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"setup upstream branches ($PROTOCOL/porcelain)\" '\n \t(\n \t\tcd \"$upstream\" &&\n-\t\tgit update-ref refs/heads/master $B &&\n+\t\tgit update-ref refs/heads/main $B &&\n \t\tgit update-ref refs/heads/foo $A &&\n \t\tgit update-ref refs/heads/bar $A &&\n \t\tgit update-ref refs/heads/baz $A\n@@ -20,13 +20,13 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL/porcelain)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/heads/master\" \\\n+\t\t-r \"ok refs/heads/main\" \\\n \t\t-r \"option fall-through\" \\\n \t\t-r \"ok refs/heads/foo\" \\\n \t\t-r \"option fall-through\" \\\n \t\t-r \"ok refs/heads/bar\" \\\n \t\t-r \"option fall-through\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\" \\\n@@ -38,15 +38,15 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL/porcelain)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(B)             foo(A)  bar(A))  baz(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push -f      : master(A)             (NULL)  (B)              refs/for/master/topic(A)  refs/for/next/topic(A)\n+# Refs of upstream : main(B)             foo(A)  bar(A))  baz(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push -f      : main(A)             (NULL)  (B)              refs/for/main/topic(A)  refs/for/next/topic(A)\n test_expect_success \"proc-receive: process all refs ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain -f origin \\\n-\t\tHEAD:refs/heads/master \\\n+\t\tHEAD:refs/heads/main \\\n \t\t:refs/heads/foo \\\n \t\t$B:refs/heads/bar \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\tHEAD:refs/for/next/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n@@ -54,22 +54,22 @@ test_expect_success \"proc-receive: process all refs ($PROTOCOL/porcelain)\" '\n \tremote: # pre-receive hook\n \tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar\n \tremote: pre-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo\n-\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar\n \tremote: proc-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo\n-\tremote: proc-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n-\tremote: proc-receive> ok refs/heads/master\n+\tremote: proc-receive> ok refs/heads/main\n \tremote: proc-receive> option fall-through\n \tremote: proc-receive> ok refs/heads/foo\n \tremote: proc-receive> option fall-through\n \tremote: proc-receive> ok refs/heads/bar\n \tremote: proc-receive> option fall-through\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n@@ -81,13 +81,13 @@ test_expect_success \"proc-receive: process all refs ($PROTOCOL/porcelain)\" '\n \tremote: # post-receive hook\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar\n \tremote: post-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo\n-\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n+\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/pull/123/head\n \tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/pull/124/head\n \tTo <URL/of/upstream.git>\n \t     <COMMIT-B>:refs/heads/bar    <OID-A>..<OID-B>\n \t-    :refs/heads/foo    [deleted]\n-\t+    HEAD:refs/heads/master    <OID-B>...<OID-A> (forced update)\n+\t+    HEAD:refs/heads/main    <OID-B>...<OID-A> (forced update)\n \t     HEAD:refs/pull/123/head    <OID-A>..<OID-B>\n \t+    HEAD:refs/pull/124/head    <OID-B>...<OID-A> (forced update)\n \tDone\n@@ -98,13 +98,13 @@ test_expect_success \"proc-receive: process all refs ($PROTOCOL/porcelain)\" '\n \tcat >expect <<-EOF &&\n \t<COMMIT-B> refs/heads/bar\n \t<COMMIT-A> refs/heads/baz\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             bar(A)  baz(B)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             bar(A)  baz(B)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n \t(\n \t\tcd \"$upstream\" &&\ndiff --git a/t/t5411/test-0050-proc-receive-refs-with-modifiers.sh b/t/t5411/test-0050-proc-receive-refs-with-modifiers.sh\nindex c22849cbe2..2e29518ec5 100644\n--- a/t/t5411/test-0050-proc-receive-refs-with-modifiers.sh\n+++ b/t/t5411/test-0050-proc-receive-refs-with-modifiers.sh\n@@ -2,7 +2,7 @@ test_expect_success \"config receive.procReceiveRefs with modifiers ($PROTOCOL)\"\n \t(\n \t\tcd \"$upstream\" &&\n \t\tgit config --unset-all receive.procReceiveRefs &&\n-\t\tgit config --add receive.procReceiveRefs m:refs/heads/master &&\n+\t\tgit config --add receive.procReceiveRefs m:refs/heads/main &&\n \t\tgit config --add receive.procReceiveRefs ad:refs/heads &&\n \t\tgit config --add receive.procReceiveRefs \"a!:refs/heads\"\n \t)\n@@ -12,7 +12,7 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/heads/master\" \\\n+\t\t-r \"ok refs/heads/main\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\" \\\n@@ -21,22 +21,22 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         : master(B)  tags/v123\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         : main(B)  tags/v123\n test_expect_success \"proc-receive: update branch and new tag ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\t$B:refs/heads/master \\\n+\t\t$B:refs/heads/main \\\n \t\tv123 >out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: pre-receive< <ZERO-OID> <TAG-v123> refs/tags/v123\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: proc-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: proc-receive< <ZERO-OID> <TAG-v123> refs/tags/v123\n-\tremote: proc-receive> ok refs/heads/master\n+\tremote: proc-receive> ok refs/heads/main\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n@@ -53,20 +53,20 @@ test_expect_success \"proc-receive: update branch and new tag ($PROTOCOL)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"setup upstream: create tags/v123 ($PROTOCOL)\" '\n \tgit -C \"$upstream\" update-ref refs/heads/topic $A &&\n \tgit -C \"$upstream\" update-ref refs/tags/v123 $TAG &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-A> refs/heads/topic\n \t<TAG-v123> refs/tags/v123\n \tEOF\n@@ -77,7 +77,7 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/heads/master\" \\\n+\t\t-r \"ok refs/heads/main\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $ZERO_OID\" \\\n@@ -87,26 +87,26 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)  topic(A)  tags/v123\n-# Refs of workbench: master(A)            tags/v123\n+# Refs of upstream : main(A)  topic(A)  tags/v123\n+# Refs of workbench: main(A)            tags/v123\n # git push         : NULL       topic(B)  NULL       next(A)\n test_expect_success \"proc-receive: create/delete branch, and delete tag ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\t:refs/heads/master \\\n+\t\t:refs/heads/main \\\n \t\t$B:refs/heads/topic \\\n \t\t$A:refs/heads/next \\\n \t\t:refs/tags/v123 >out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <ZERO-OID> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <ZERO-OID> refs/heads/main\n \tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/topic\n \tremote: pre-receive< <TAG-v123> <ZERO-OID> refs/tags/v123\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <COMMIT-A> <ZERO-OID> refs/heads/master\n+\tremote: proc-receive< <COMMIT-A> <ZERO-OID> refs/heads/main\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: proc-receive> ok refs/heads/master\n+\tremote: proc-receive> ok refs/heads/main\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <ZERO-OID>\n@@ -128,7 +128,7 @@ test_expect_success \"proc-receive: create/delete branch, and delete tag ($PROTOC\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-B> refs/heads/topic\n \tEOF\n \ttest_cmp expect actual\n-- \ngitgitgadget\n\n"},{"id":"408555","messageId":"xmqq5z6u9kkv.fsf@gitster.c.googlers.com","threadId":"54518","inReplyTo":"xmqqa6w69l3j.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 1/4] t5411: start using the default branch name \"main\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-28T20:12:00Z","receivedAt":"2020-10-28T21:48:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n>> +test_have_prereq PREPARE_FOR_MAIN_BRANCH || {\n>> +\ttest_skip=\"In transit for the default branch name 'main'\"\n>> +\ttest_done\n>> +}\n>> +\n>\n> IOW, I do not see the point in _conditionally_ skipping the rest of\n> the test in this step.  I'd however understand it if we always skip\n> the rest in 1/4 and then enable the rest only when testing with\n> 'main' as the default in 4/4, when all the necessary pieces in\n> t/t5411 have been converted.\n\nAnother way to protect the test well would be to keep the \"unless\ntesting with master, skip all\" prerequisite check you wrote above,\nbut add\n\n    GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n\nimmediately before that.  We can flip it to use 'master' at the\nfinal step in the series.\n\nThat way, we will not be affected by the GIT_TEST_* environment\nvariable that is passed to these scripts by the tester.  I think\nI'd prefer to do it that way, instead of unconditionally skipping,\nas the result would be more self explanatory.\n\nThanks.\n"},{"id":"408613","messageId":"xmqqa6w69l3j.fsf@gitster.c.googlers.com","threadId":"54518","inReplyTo":"f997166db4c29d971a2343f70c9d9a0505a8cc4b.1603839487.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 1/4] t5411: start using the default branch name \"main\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-28T20:00:48Z","receivedAt":"2020-10-29T02:04:46Z","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> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> This is a straight-forward search-and-replace in the test script;\n> However, this is not yet complete because it requires many more\n> replacements in `t/t5411/`, too many for a single patch (the Git mailing\n> list rejects mails larger than 100kB). For that reason, we disable this\n> test script temporarily via the `PREPARE_FOR_MAIN_BRANCH` prereq.\n\nI do not think it matters too much, as it will become correct at the\nend anyway, but ... \n\n> +test_have_prereq PREPARE_FOR_MAIN_BRANCH || {\n> +\ttest_skip=\"In transit for the default branch name 'main'\"\n> +\ttest_done\n> +}\n> +\n\n... the way I read the introductory paragraph in the proposed log\nmessage is that the point of adding a protection here (done in order\nto work around a transient failure caused by having to artificially\nsplit this topic into four patches) is to avoid an inevitable\nfailure due to some parts of tests adjusted for 'main' while other\nparts still expect 'master'.  Until files in t/5411/* gets adjusted\nfor 'main', nothing is expected to pass whether the default branch\nis 'master' or 'main'.  Or with only 1/4 applied, is this test\nexpected to pass if GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME is set to\n'main' (i.e. PREPARE_FOR_MAIN_BRANCH prerequisite is satisfied)?\n\nIOW, I do not see the point in _conditionally_ skipping the rest of\nthe test in this step.  I'd however understand it if we always skip\nthe rest in 1/4 and then enable the rest only when testing with\n'main' as the default in 4/4, when all the necessary pieces in\nt/t5411 have been converted.\n\nThe \"straight-forward search-and-replace\" part looks obviously good,\nof course.\n\nThanks.\n\n>  . \"$TEST_DIRECTORY\"/t5411/common-functions.sh\n>  \n>  setup_upstream_and_workbench () {\n> -\t# Refs of upstream : master(A)\n> -\t# Refs of workbench: master(A)  tags/v123\n> +\t# Refs of upstream : main(A)\n> +\t# Refs of workbench: main(A)  tags/v123\n>  \ttest_expect_success \"setup upstream and workbench\" '\n>  \t\trm -rf upstream.git &&\n>  \t\trm -rf workbench &&\n> @@ -25,10 +30,10 @@ setup_upstream_and_workbench () {\n>  \t\t\tgit config core.abbrev 7 &&\n>  \t\t\tgit tag -m \"v123\" v123 $A &&\n>  \t\t\tgit remote add origin ../upstream.git &&\n> -\t\t\tgit push origin master &&\n> -\t\t\tgit update-ref refs/heads/master $A $B &&\n> +\t\t\tgit push origin main &&\n> +\t\t\tgit update-ref refs/heads/main $A $B &&\n>  \t\t\tgit -C ../upstream.git update-ref \\\n> -\t\t\t\trefs/heads/master $A $B\n> +\t\t\t\trefs/heads/main $A $B\n>  \t\t) &&\n>  \t\tTAG=$(git -C workbench rev-parse v123) &&\n>  \n> @@ -99,8 +104,8 @@ start_httpd\n>  # Re-initialize the upstream repository and local workbench.\n>  setup_upstream_and_workbench\n>  \n> -# Refs of upstream : master(A)\n> -# Refs of workbench: master(A)  tags/v123\n> +# Refs of upstream : main(A)\n> +# Refs of workbench: main(A)  tags/v123\n>  test_expect_success \"setup for HTTP protocol\" '\n>  \tgit -C upstream.git config http.receivepack true &&\n>  \tupstream=\"$HTTPD_DOCUMENT_ROOT_PATH/upstream.git\" &&\n"},{"id":"408750","messageId":"nycvar.QRO.7.76.6.2010301559540.18437@tvgsbejvaqbjf.bet","threadId":"54518","inReplyTo":"xmqq5z6u9kkv.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 1/4] t5411: start using the default branch name \"main\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-10-30T15:04:19Z","receivedAt":"2020-10-30T15:04:22Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Wed, 28 Oct 2020, Junio C Hamano wrote:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n> >> +test_have_prereq PREPARE_FOR_MAIN_BRANCH || {\n> >> +\ttest_skip=\"In transit for the default branch name 'main'\"\n> >> +\ttest_done\n> >> +}\n> >> +\n> >\n> > IOW, I do not see the point in _conditionally_ skipping the rest of\n> > the test in this step.  I'd however understand it if we always skip\n> > the rest in 1/4 and then enable the rest only when testing with\n> > 'main' as the default in 4/4, when all the necessary pieces in\n> > t/t5411 have been converted.\n>\n> Another way to protect the test well would be to keep the \"unless\n> testing with master, skip all\" prerequisite check you wrote above,\n> but add\n>\n>     GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n>\n> immediately before that.  We can flip it to use 'master' at the\n> final step in the series.\n>\n> That way, we will not be affected by the GIT_TEST_* environment\n> variable that is passed to these scripts by the tester.  I think\n> I'd prefer to do it that way, instead of unconditionally skipping,\n> as the result would be more self explanatory.\n\nDo you mean that this patch, squashed into 1/4:\n\n-- snip --\ndiff --git a/t/t5411-proc-receive-hook.sh b/t/t5411-proc-receive-hook.sh\nindex 06bbb02ed22..6da6f597a50 100755\n--- a/t/t5411-proc-receive-hook.sh\n+++ b/t/t5411-proc-receive-hook.sh\n@@ -5,6 +5,9 @@\n\n test_description='Test proc-receive hook'\n\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n\n test_have_prereq PREPARE_FOR_MAIN_BRANCH || {\n\n-- snap --\n\nso that 4/4 starts with:\n\n-- snip --\ndiff --git a/t/t5411-proc-receive-hook.sh b/t/t5411-proc-receive-hook.sh\nindex 6da6f597a50..98b0e812082 100755\n--- a/t/t5411-proc-receive-hook.sh\n+++ b/t/t5411-proc-receive-hook.sh\n@@ -5,16 +5,11 @@\n\n test_description='Test proc-receive hook'\n\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n\n . ./test-lib.sh\n\n-test_have_prereq PREPARE_FOR_MAIN_BRANCH || {\n-\ttest_skip=\"In transit for the default branch name 'main'\"\n-\ttest_done\n-}\n-\n . \"$TEST_DIRECTORY\"/t5411/common-functions.sh\n\n setup_upstream_and_workbench () {\n-- snap --\n\nwould be much more understandable?\n\nIf so, I agree, and I will gladly send off the next iteration with that\nchange.\n\nIf I misunderstood, can I please ask you to give it another try to explain\nit to me?\n\nThanks,\nDscho\n\n"},{"id":"408761","messageId":"xmqqlffn3aok.fsf@gitster.c.googlers.com","threadId":"54518","inReplyTo":"nycvar.QRO.7.76.6.2010301559540.18437@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 1/4] t5411: start using the default branch name \"main\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-30T17:06:51Z","receivedAt":"2020-10-30T17:06:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Do you mean that this patch, squashed into 1/4:\n> ...\n> would be much more understandable?\n\nYes, that was what I meant.  \n\nWe could have a \"test_skip='under construction'\" without any\nPREPARE_FOR_MAIN_BRANCH in 1/4 and then replace that with the\nendgame state you already had in 4/4, alternatively, which might\nalready be enough explanation for a short transition period that\nlasts just few patches ;-).\n\n> If so, I agree, and I will gladly send off the next iteration with that\n> change.\n>\n> If I misunderstood, can I please ask you to give it another try to explain\n> it to me?\n\nNo, you understood what I meant perfectly.\n\nThanks.\n"},{"id":"408795","messageId":"pull.760.v2.git.1604173563.gitgitgadget@gmail.com","threadId":"54518","inReplyTo":"pull.760.git.1603839487.gitgitgadget@gmail.com","subject":"[PATCH v2 0/4] Adjust t5411 for the upcoming change of the default branch name","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-31T19:45:59Z","receivedAt":"2020-10-31T19:46:08Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"The test script t5411-proc-receive-hook.sh is an interesting case: it not\nonly requires tons of mostly straight-forward changes that amount to an\nautomated search-and-replace, but it also requires a few adjustments due to\nthe change of the default branch name's length.\n\nThis patch series is part of the over-all effort tracked in \nhttps://github.com/gitgitgadget/git/pull/655.\n\nChanges since v1:\n\n * We now set GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME explicitly to master in\n   patch 1/4, effectively disabling the test due to the use of the \n   PREPARE_FOR_MAIN_BRANCH prereq until we switch it over to setting the\n   initial branch name to main with patch 4/4.\n\nJohannes Schindelin (4):\n  t5411: start using the default branch name \"main\"\n  t5411: start adjusting the support files for init.defaultBranch=main\n  t5411: adjust the remaining support files for init.defaultBranch=main\n  t5411: finish preparing for `main` being the default branch name\n\n t/t5411-proc-receive-hook.sh                  |  17 ++-\n t/t5411/common-functions.sh                   |   2 +-\n t/t5411/once-0010-report-status-v1.sh         |  50 ++++----\n t/t5411/test-0000-standard-git-push.sh        |  72 +++++------\n .../test-0001-standard-git-push--porcelain.sh |  72 +++++------\n t/t5411/test-0002-pre-receive-declined.sh     |  12 +-\n ...st-0003-pre-receive-declined--porcelain.sh |  12 +-\n t/t5411/test-0011-no-hook-error.sh            |  38 +++---\n t/t5411/test-0012-no-hook-error--porcelain.sh |  38 +++---\n t/t5411/test-0013-bad-protocol.sh             |  96 +++++++-------\n t/t5411/test-0014-bad-protocol--porcelain.sh  |  70 +++++-----\n t/t5411/test-0020-report-ng.sh                |  40 +++---\n t/t5411/test-0021-report-ng--porcelain.sh     |  40 +++---\n t/t5411/test-0022-report-unexpect-ref.sh      |  36 +++---\n ...est-0023-report-unexpect-ref--porcelain.sh |  36 +++---\n t/t5411/test-0024-report-unknown-ref.sh       |  12 +-\n ...test-0025-report-unknown-ref--porcelain.sh |  12 +-\n t/t5411/test-0026-push-options.sh             |  36 +++---\n t/t5411/test-0027-push-options--porcelain.sh  |  36 +++---\n t/t5411/test-0030-report-ok.sh                |  22 ++--\n t/t5411/test-0031-report-ok--porcelain.sh     |  22 ++--\n t/t5411/test-0032-report-with-options.sh      | 120 +++++++++---------\n ...est-0033-report-with-options--porcelain.sh | 120 +++++++++---------\n t/t5411/test-0034-report-ft.sh                |  30 ++---\n t/t5411/test-0035-report-ft--porcelain.sh     |  30 ++---\n ...t-0036-report-multi-rewrite-for-one-ref.sh |  90 ++++++-------\n ...rt-multi-rewrite-for-one-ref--porcelain.sh |  82 ++++++------\n t/t5411/test-0038-report-mixed-refs.sh        |  40 +++---\n .../test-0039-report-mixed-refs--porcelain.sh |  40 +++---\n t/t5411/test-0040-process-all-refs.sh         |  42 +++---\n .../test-0041-process-all-refs--porcelain.sh  |  42 +++---\n ...t-0050-proc-receive-refs-with-modifiers.sh |  42 +++---\n 32 files changed, 726 insertions(+), 723 deletions(-)\n\n\nbase-commit: 3224b0f0bb7bc90c0156e73c58f1d2e770f0ad7c\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-760%2Fdscho%2Fprepare-for-main-branch-t5411-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-760/dscho/prepare-for-main-branch-t5411-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/760\n\nRange-diff vs v1:\n\n 1:  f997166db4 ! 1:  9b1c7eb0b4 t5411: start using the default branch name \"main\"\n     @@ Commit message\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n       ## t/t5411-proc-receive-hook.sh ##\n     -@@ t/t5411-proc-receive-hook.sh: test_description='Test proc-receive hook'\n     +@@\n       \n     + test_description='Test proc-receive hook'\n     + \n     ++GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n     ++export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     ++\n       . ./test-lib.sh\n       \n      +test_have_prereq PREPARE_FOR_MAIN_BRANCH || {\n 2:  b9fcc47eb7 = 2:  0667f18244 t5411: start adjusting the support files for init.defaultBranch=main\n 3:  ca914fbc4b = 3:  cf2a378793 t5411: adjust the remaining support files for init.defaultBranch=main\n 4:  ac2173cce7 ! 4:  6f1f1a9264 t5411: finish preparing for `main` being the default branch name\n     @@ t/t5411-proc-receive-hook.sh\n       \n       test_description='Test proc-receive hook'\n       \n     --. ./test-lib.sh\n     +-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n      +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n     -+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     + \n     + . ./test-lib.sh\n       \n      -test_have_prereq PREPARE_FOR_MAIN_BRANCH || {\n      -\ttest_skip=\"In transit for the default branch name 'main'\"\n      -\ttest_done\n      -}\n     -+. ./test-lib.sh\n     - \n     +-\n       . \"$TEST_DIRECTORY\"/t5411/common-functions.sh\n       \n     + setup_upstream_and_workbench () {\n      \n       ## t/t5411/once-0010-report-status-v1.sh ##\n      @@ t/t5411/once-0010-report-status-v1.sh: test_expect_success \"proc-receive: report status v1\" '\n\n-- \ngitgitgadget\n"},{"id":"408796","messageId":"9b1c7eb0b4a007c4820aefeb221374887c8d9f8f.1604173563.git.gitgitgadget@gmail.com","threadId":"54518","inReplyTo":"pull.760.v2.git.1604173563.gitgitgadget@gmail.com","subject":"[PATCH v2 1/4] t5411: start using the default branch name \"main\"","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-31T19:46:00Z","receivedAt":"2020-10-31T19:46:15Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis is a straight-forward search-and-replace in the test script;\nHowever, this is not yet complete because it requires many more\nreplacements in `t/t5411/`, too many for a single patch (the Git mailing\nlist rejects mails larger than 100kB). For that reason, we disable this\ntest script temporarily via the `PREPARE_FOR_MAIN_BRANCH` prereq.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5411-proc-receive-hook.sh | 22 +++++++++++++++-------\n 1 file changed, 15 insertions(+), 7 deletions(-)\n\ndiff --git a/t/t5411-proc-receive-hook.sh b/t/t5411-proc-receive-hook.sh\nindex 746487286f..6da6f597a5 100755\n--- a/t/t5411-proc-receive-hook.sh\n+++ b/t/t5411-proc-receive-hook.sh\n@@ -5,13 +5,21 @@\n \n test_description='Test proc-receive hook'\n \n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n . ./test-lib.sh\n \n+test_have_prereq PREPARE_FOR_MAIN_BRANCH || {\n+\ttest_skip=\"In transit for the default branch name 'main'\"\n+\ttest_done\n+}\n+\n . \"$TEST_DIRECTORY\"/t5411/common-functions.sh\n \n setup_upstream_and_workbench () {\n-\t# Refs of upstream : master(A)\n-\t# Refs of workbench: master(A)  tags/v123\n+\t# Refs of upstream : main(A)\n+\t# Refs of workbench: main(A)  tags/v123\n \ttest_expect_success \"setup upstream and workbench\" '\n \t\trm -rf upstream.git &&\n \t\trm -rf workbench &&\n@@ -25,10 +33,10 @@ setup_upstream_and_workbench () {\n \t\t\tgit config core.abbrev 7 &&\n \t\t\tgit tag -m \"v123\" v123 $A &&\n \t\t\tgit remote add origin ../upstream.git &&\n-\t\t\tgit push origin master &&\n-\t\t\tgit update-ref refs/heads/master $A $B &&\n+\t\t\tgit push origin main &&\n+\t\t\tgit update-ref refs/heads/main $A $B &&\n \t\t\tgit -C ../upstream.git update-ref \\\n-\t\t\t\trefs/heads/master $A $B\n+\t\t\t\trefs/heads/main $A $B\n \t\t) &&\n \t\tTAG=$(git -C workbench rev-parse v123) &&\n \n@@ -99,8 +107,8 @@ start_httpd\n # Re-initialize the upstream repository and local workbench.\n setup_upstream_and_workbench\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"setup for HTTP protocol\" '\n \tgit -C upstream.git config http.receivepack true &&\n \tupstream=\"$HTTPD_DOCUMENT_ROOT_PATH/upstream.git\" &&\n-- \ngitgitgadget\n\n"},{"id":"408797","messageId":"6f1f1a926460a836aa6fa169e67a3545c1451d6f.1604173564.git.gitgitgadget@gmail.com","threadId":"54518","inReplyTo":"pull.760.v2.git.1604173563.gitgitgadget@gmail.com","subject":"[PATCH v2 4/4] t5411: finish preparing for `main` being the default branch name","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-31T19:46:03Z","receivedAt":"2020-10-31T19:46:15Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn addition to the trivial search-and-replace performed over the course\nof the previous three commits, there is one test in t5411 that depends\non the length of the default branch name.\n\nAdjust it and use `main` as the default branch name in this test.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5411-proc-receive-hook.sh          | 7 +------\n t/t5411/once-0010-report-status-v1.sh | 6 +++---\n 2 files changed, 4 insertions(+), 9 deletions(-)\n\ndiff --git a/t/t5411-proc-receive-hook.sh b/t/t5411-proc-receive-hook.sh\nindex 6da6f597a5..98b0e81208 100755\n--- a/t/t5411-proc-receive-hook.sh\n+++ b/t/t5411-proc-receive-hook.sh\n@@ -5,16 +5,11 @@\n \n test_description='Test proc-receive hook'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n \n-test_have_prereq PREPARE_FOR_MAIN_BRANCH || {\n-\ttest_skip=\"In transit for the default branch name 'main'\"\n-\ttest_done\n-}\n-\n . \"$TEST_DIRECTORY\"/t5411/common-functions.sh\n \n setup_upstream_and_workbench () {\ndiff --git a/t/t5411/once-0010-report-status-v1.sh b/t/t5411/once-0010-report-status-v1.sh\nindex 6005ee0ecb..cb431a9c91 100644\n--- a/t/t5411/once-0010-report-status-v1.sh\n+++ b/t/t5411/once-0010-report-status-v1.sh\n@@ -69,11 +69,11 @@ test_expect_success \"proc-receive: report status v1\" '\n \tproc-receive> option forced-update\n \tproc-receive> ng refs/for/next/topic target branch not exist\n \t000eunpack ok\n-\t0019ok refs/heads/main\n-\t001eok refs/for/main/topic1\n+\t0017ok refs/heads/main\n+\t001cok refs/for/main/topic1\n \t0016ok refs/heads/foo\n \t0033ng refs/for/next/topic target branch not exist\n-\t001eok refs/for/main/topic2\n+\t001cok refs/for/main/topic2\n \t0000# post-receive hook\n \tpost-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tpost-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic1\n-- \ngitgitgadget\n"},{"id":"408798","messageId":"cf2a3787933fbcd9a95b1882ee82d0f6b57116b3.1604173563.git.gitgitgadget@gmail.com","threadId":"54518","inReplyTo":"pull.760.v2.git.1604173563.gitgitgadget@gmail.com","subject":"[PATCH v2 3/4] t5411: adjust the remaining support files for init.defaultBranch=main","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-31T19:46:02Z","receivedAt":"2020-10-31T19:46:15Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t/t5411/*\n\nIn the previous commit, we adjusted roughly half of the support files,\nto stay under the 100kB limit (mails larger than that are rejected by\nthe Git mailing list).\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5411/common-functions.sh                   |  2 +-\n t/t5411/once-0010-report-status-v1.sh         | 50 +++++-----\n t/t5411/test-0000-standard-git-push.sh        | 72 +++++++-------\n .../test-0001-standard-git-push--porcelain.sh | 72 +++++++-------\n t/t5411/test-0002-pre-receive-declined.sh     | 12 +--\n ...st-0003-pre-receive-declined--porcelain.sh | 12 +--\n t/t5411/test-0011-no-hook-error.sh            | 38 ++++----\n t/t5411/test-0012-no-hook-error--porcelain.sh | 38 ++++----\n t/t5411/test-0013-bad-protocol.sh             | 96 +++++++++----------\n t/t5411/test-0014-bad-protocol--porcelain.sh  | 70 +++++++-------\n t/t5411/test-0020-report-ng.sh                | 40 ++++----\n t/t5411/test-0021-report-ng--porcelain.sh     | 40 ++++----\n t/t5411/test-0022-report-unexpect-ref.sh      | 36 +++----\n ...est-0023-report-unexpect-ref--porcelain.sh | 36 +++----\n t/t5411/test-0024-report-unknown-ref.sh       | 12 +--\n ...test-0025-report-unknown-ref--porcelain.sh | 12 +--\n t/t5411/test-0026-push-options.sh             | 36 +++----\n t/t5411/test-0027-push-options--porcelain.sh  | 36 +++----\n 18 files changed, 355 insertions(+), 355 deletions(-)\n\ndiff --git a/t/t5411/common-functions.sh b/t/t5411/common-functions.sh\nindex 6580bebd8e..521a347710 100644\n--- a/t/t5411/common-functions.sh\n+++ b/t/t5411/common-functions.sh\n@@ -28,7 +28,7 @@ create_commits_in () {\n \t\tshift ||\n \t\treturn 1\n \tdone &&\n-\tgit -C \"$repo\" update-ref refs/heads/master $oid\n+\tgit -C \"$repo\" update-ref refs/heads/main $oid\n }\n \n # Format the output of git-push, git-show-ref and other commands to make a\ndiff --git a/t/t5411/once-0010-report-status-v1.sh b/t/t5411/once-0010-report-status-v1.sh\nindex dc2cf4a522..6005ee0ecb 100644\n--- a/t/t5411/once-0010-report-status-v1.sh\n+++ b/t/t5411/once-0010-report-status-v1.sh\n@@ -6,12 +6,12 @@ test_expect_success \"setup proc-receive hook\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic1\" \\\n+\t\t-r \"ok refs/for/main/topic1\" \\\n \t\t-r \"option fall-through\" \\\n-\t\t-r \"ok refs/for/master/topic2\" \\\n+\t\t-r \"ok refs/for/main/topic2\" \\\n \t\t-r \"option refname refs/for/changes/23/123/1\" \\\n \t\t-r \"option new-oid $A\" \\\n-\t\t-r \"ok refs/for/master/topic2\" \\\n+\t\t-r \"ok refs/for/main/topic2\" \\\n \t\t-r \"option refname refs/for/changes/24/124/2\" \\\n \t\t-r \"option old-oid $B\" \\\n \t\t-r \"option new-oid $A\" \\\n@@ -20,26 +20,26 @@ test_expect_success \"setup proc-receive hook\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         : (B)                   refs/for/master/topic1(A)  foo(A)  refs/for/next/topic(A)  refs/for/master/topic2(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         : (B)                   refs/for/main/topic1(A)  foo(A)  refs/for/next/topic(A)  refs/for/main/topic2(A)\n test_expect_success \"proc-receive: report status v1\" '\n \t{\n \t\tif test -z \"$GIT_DEFAULT_HASH\" || test \"$GIT_DEFAULT_HASH\" = \"sha1\"\n \t\tthen\n-\t\t\tprintf \"%s %s refs/heads/master\\0report-status\\n\" \\\n+\t\t\tprintf \"%s %s refs/heads/main\\0report-status\\n\" \\\n \t\t\t\t$A $B | packetize\n \t\telse\n-\t\t\tprintf \"%s %s refs/heads/master\\0report-status object-format=$GIT_DEFAULT_HASH\\n\" \\\n+\t\t\tprintf \"%s %s refs/heads/main\\0report-status object-format=$GIT_DEFAULT_HASH\\n\" \\\n \t\t\t\t$A $B | packetize\n \t\tfi &&\n-\t\tprintf \"%s %s refs/for/master/topic1\\n\" \\\n+\t\tprintf \"%s %s refs/for/main/topic1\\n\" \\\n \t\t\t$ZERO_OID $A | packetize &&\n \t\tprintf \"%s %s refs/heads/foo\\n\" \\\n \t\t\t$ZERO_OID $A | packetize &&\n \t\tprintf \"%s %s refs/for/next/topic\\n\" \\\n \t\t\t$ZERO_OID $A | packetize &&\n-\t\tprintf \"%s %s refs/for/master/topic2\\n\" \\\n+\t\tprintf \"%s %s refs/for/main/topic2\\n\" \\\n \t\t\t$ZERO_OID $A | packetize &&\n \t\tprintf 0000 &&\n \t\tprintf \"\" | git -C \"$upstream\" pack-objects --stdout\n@@ -48,35 +48,35 @@ test_expect_success \"proc-receive: report status v1\" '\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \t# pre-receive hook\n-\tpre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n-\tpre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic1\n+\tpre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n+\tpre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic1\n \tpre-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo\n \tpre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n-\tpre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic2\n+\tpre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic2\n \t# proc-receive hook\n-\tproc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic1\n+\tproc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic1\n \tproc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n-\tproc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic2\n-\tproc-receive> ok refs/for/master/topic1\n+\tproc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic2\n+\tproc-receive> ok refs/for/main/topic1\n \tproc-receive> option fall-through\n-\tproc-receive> ok refs/for/master/topic2\n+\tproc-receive> ok refs/for/main/topic2\n \tproc-receive> option refname refs/for/changes/23/123/1\n \tproc-receive> option new-oid <COMMIT-A>\n-\tproc-receive> ok refs/for/master/topic2\n+\tproc-receive> ok refs/for/main/topic2\n \tproc-receive> option refname refs/for/changes/24/124/2\n \tproc-receive> option old-oid <COMMIT-B>\n \tproc-receive> option new-oid <COMMIT-A>\n \tproc-receive> option forced-update\n \tproc-receive> ng refs/for/next/topic target branch not exist\n \t000eunpack ok\n-\t0019ok refs/heads/master\n-\t001eok refs/for/master/topic1\n+\t0019ok refs/heads/main\n+\t001eok refs/for/main/topic1\n \t0016ok refs/heads/foo\n \t0033ng refs/for/next/topic target branch not exist\n-\t001eok refs/for/master/topic2\n+\t001eok refs/for/main/topic2\n \t0000# post-receive hook\n-\tpost-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n-\tpost-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic1\n+\tpost-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n+\tpost-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic1\n \tpost-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo\n \tpost-receive< <ZERO-OID> <COMMIT-A> refs/for/changes/23/123/1\n \tpost-receive< <COMMIT-B> <COMMIT-A> refs/for/changes/24/124/2\n@@ -86,9 +86,9 @@ test_expect_success \"proc-receive: report status v1\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/for/master/topic1\n+\t<COMMIT-A> refs/for/main/topic1\n \t<COMMIT-A> refs/heads/foo\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0000-standard-git-push.sh b/t/t5411/test-0000-standard-git-push.sh\nindex e206587348..2b04b49367 100644\n--- a/t/t5411/test-0000-standard-git-push.sh\n+++ b/t/t5411/test-0000-standard-git-push.sh\n@@ -1,39 +1,39 @@\n-# Refs of upstream : master(A)  \n-# Refs of workbench: master(A)  tags/v123\n-# git-push         : master(B)             next(A)\n+# Refs of upstream : main(A)  \n+# Refs of workbench: main(A)  tags/v123\n+# git-push         : main(B)             next(A)\n test_expect_success \"git-push ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\t$B:refs/heads/master \\\n+\t\t$B:refs/heads/main \\\n \t\tHEAD:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tTo <URL/of/upstream.git>\n-\t <OID-A>..<OID-B> <COMMIT-B> -> master\n+\t <OID-A>..<OID-B> <COMMIT-B> -> main\n \t * [new branch] HEAD -> next\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)  next(A)\n-# Refs of workbench: master(A)           tags/v123\n-# git-push --atomic: master(A)  next(B)\n+# Refs of upstream : main(B)  next(A)\n+# Refs of workbench: main(A)           tags/v123\n+# git-push --atomic: main(A)  next(B)\n test_expect_success \"git-push --atomic ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push --atomic origin \\\n-\t\tmaster \\\n+\t\tmain \\\n \t\t$B:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out |\n@@ -43,28 +43,28 @@ test_expect_success \"git-push --atomic ($PROTOCOL)\" '\n \t\t\t>actual &&\n \tcat >expect <<-EOF &&\n \tTo <URL/of/upstream.git>\n-\t ! [rejected] master -> master (non-fast-forward)\n+\t ! [rejected] main -> main (non-fast-forward)\n \t ! [rejected] <COMMIT-B> -> next (atomic push failed)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)  next(A)\n-# Refs of workbench: master(A)           tags/v123\n-# git-push         : master(A)  next(B)\n+# Refs of upstream : main(B)  next(A)\n+# Refs of workbench: main(A)           tags/v123\n+# git-push         : main(A)  next(B)\n test_expect_success \"non-fast-forward git-push ($PROTOCOL)\" '\n \ttest_must_fail git \\\n \t\t-C workbench \\\n \t\t-c advice.pushUpdateRejected=false \\\n \t\tpush origin \\\n-\t\tmaster \\\n+\t\tmain \\\n \t\t$B:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n@@ -75,48 +75,48 @@ test_expect_success \"non-fast-forward git-push ($PROTOCOL)\" '\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/next\n \tTo <URL/of/upstream.git>\n \t <OID-A>..<OID-B> <COMMIT-B> -> next\n-\t ! [rejected] master -> master (non-fast-forward)\n+\t ! [rejected] main -> main (non-fast-forward)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \t<COMMIT-B> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)  next(B)\n-# Refs of workbench: master(A)           tags/v123\n-# git-push -f      : master(A)  NULL     tags/v123  refs/review/master/topic(A)  a/b/c(A)\n+# Refs of upstream : main(B)  next(B)\n+# Refs of workbench: main(A)           tags/v123\n+# git-push -f      : main(A)  NULL     tags/v123  refs/review/main/topic(A)  a/b/c(A)\n test_expect_success \"git-push -f ($PROTOCOL)\" '\n \tgit -C workbench push -f origin \\\n \t\trefs/tags/v123 \\\n \t\t:refs/heads/next \\\n-\t\tmaster \\\n-\t\tmaster:refs/review/master/topic \\\n+\t\tmain \\\n+\t\tmain:refs/review/main/topic \\\n \t\tHEAD:refs/heads/a/b/c \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n+\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n \tremote: pre-receive< <COMMIT-B> <ZERO-OID> refs/heads/next\n \tremote: pre-receive< <ZERO-OID> <TAG-v123> refs/tags/v123\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/review/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/review/main/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/a/b/c\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n+\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n \tremote: post-receive< <COMMIT-B> <ZERO-OID> refs/heads/next\n \tremote: post-receive< <ZERO-OID> <TAG-v123> refs/tags/v123\n-\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/review/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/review/main/topic\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/a/b/c\n \tTo <URL/of/upstream.git>\n-\t + <OID-B>...<OID-A> master -> master (forced update)\n+\t + <OID-B>...<OID-A> main -> main (forced update)\n \t - [deleted] next\n \t * [new tag] v123 -> v123\n-\t * [new reference] master -> refs/review/master/topic\n+\t * [new reference] main -> refs/review/main/topic\n \t * [new branch] HEAD -> a/b/c\n \tEOF\n \ttest_cmp expect actual &&\n@@ -124,19 +124,19 @@ test_expect_success \"git-push -f ($PROTOCOL)\" '\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \t<COMMIT-A> refs/heads/a/b/c\n-\t<COMMIT-A> refs/heads/master\n-\t<COMMIT-A> refs/review/master/topic\n+\t<COMMIT-A> refs/heads/main\n+\t<COMMIT-A> refs/review/main/topic\n \t<TAG-v123> refs/tags/v123\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)  tags/v123  refs/review/master/topic(A)  a/b/c(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)  tags/v123  refs/review/main/topic(A)  a/b/c(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n \t(\n \t\tcd \"$upstream\" &&\n-\t\tgit update-ref -d refs/review/master/topic &&\n+\t\tgit update-ref -d refs/review/main/topic &&\n \t\tgit update-ref -d refs/tags/v123 &&\n \t\tgit update-ref -d refs/heads/a/b/c\n \t)\ndiff --git a/t/t5411/test-0001-standard-git-push--porcelain.sh b/t/t5411/test-0001-standard-git-push--porcelain.sh\nindex 48f6fcc846..747307f8da 100644\n--- a/t/t5411/test-0001-standard-git-push--porcelain.sh\n+++ b/t/t5411/test-0001-standard-git-push--porcelain.sh\n@@ -1,21 +1,21 @@\n-# Refs of upstream : master(A)  \n-# Refs of workbench: master(A)  tags/v123\n-# git-push         : master(B)             next(A)\n+# Refs of upstream : main(A)  \n+# Refs of workbench: main(A)  tags/v123\n+# git-push         : main(B)             next(A)\n test_expect_success \"git-push ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\t$B:refs/heads/master \\\n+\t\t$B:refs/heads/main \\\n \t\tHEAD:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tTo <URL/of/upstream.git>\n-\t     <COMMIT-B>:refs/heads/master    <OID-A>..<OID-B>\n+\t     <COMMIT-B>:refs/heads/main    <OID-A>..<OID-B>\n \t*    HEAD:refs/heads/next    [new branch]\n \tDone\n \tEOF\n@@ -23,18 +23,18 @@ test_expect_success \"git-push ($PROTOCOL/porcelain)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)  next(A)\n-# Refs of workbench: master(A)           tags/v123\n-# git-push --atomic: master(A)  next(B)\n+# Refs of upstream : main(B)  next(A)\n+# Refs of workbench: main(A)           tags/v123\n+# git-push --atomic: main(A)  next(B)\n test_expect_success \"git-push --atomic ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --atomic --porcelain origin \\\n-\t\tmaster \\\n+\t\tmain \\\n \t\t$B:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out |\n@@ -45,28 +45,28 @@ test_expect_success \"git-push --atomic ($PROTOCOL/porcelain)\" '\n \t\t\t>actual &&\n \tcat >expect <<-EOF &&\n \tTo <URL/of/upstream.git>\n-\t! refs/heads/master:refs/heads/master [rejected] (non-fast-forward)\n+\t! refs/heads/main:refs/heads/main [rejected] (non-fast-forward)\n \t! <COMMIT-B>:refs/heads/next [rejected] (atomic push failed)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)  next(A)\n-# Refs of workbench: master(A)           tags/v123\n-# git-push         : master(A)  next(B)\n+# Refs of upstream : main(B)  next(A)\n+# Refs of workbench: main(A)           tags/v123\n+# git-push         : main(A)  next(B)\n test_expect_success \"non-fast-forward git-push ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git \\\n \t\t-C workbench \\\n \t\t-c advice.pushUpdateRejected=false \\\n \t\tpush --porcelain origin \\\n-\t\tmaster \\\n+\t\tmain \\\n \t\t$B:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n@@ -77,49 +77,49 @@ test_expect_success \"non-fast-forward git-push ($PROTOCOL/porcelain)\" '\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/next\n \tTo <URL/of/upstream.git>\n \t     <COMMIT-B>:refs/heads/next    <OID-A>..<OID-B>\n-\t!    refs/heads/master:refs/heads/master    [rejected] (non-fast-forward)\n+\t!    refs/heads/main:refs/heads/main    [rejected] (non-fast-forward)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \t<COMMIT-B> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)  next(B)\n-# Refs of workbench: master(A)           tags/v123\n-# git-push -f      : master(A)  NULL     tags/v123  refs/review/master/topic(A)  a/b/c(A)\n+# Refs of upstream : main(B)  next(B)\n+# Refs of workbench: main(A)           tags/v123\n+# git-push -f      : main(A)  NULL     tags/v123  refs/review/main/topic(A)  a/b/c(A)\n test_expect_success \"git-push -f ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain -f origin \\\n \t\trefs/tags/v123 \\\n \t\t:refs/heads/next \\\n-\t\tmaster \\\n-\t\tmaster:refs/review/master/topic \\\n+\t\tmain \\\n+\t\tmain:refs/review/main/topic \\\n \t\tHEAD:refs/heads/a/b/c \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n+\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n \tremote: pre-receive< <COMMIT-B> <ZERO-OID> refs/heads/next\n \tremote: pre-receive< <ZERO-OID> <TAG-v123> refs/tags/v123\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/review/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/review/main/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/a/b/c\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n+\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n \tremote: post-receive< <COMMIT-B> <ZERO-OID> refs/heads/next\n \tremote: post-receive< <ZERO-OID> <TAG-v123> refs/tags/v123\n-\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/review/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/review/main/topic\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/a/b/c\n \tTo <URL/of/upstream.git>\n-\t+    refs/heads/master:refs/heads/master    <OID-B>...<OID-A> (forced update)\n+\t+    refs/heads/main:refs/heads/main    <OID-B>...<OID-A> (forced update)\n \t-    :refs/heads/next    [deleted]\n \t*    refs/tags/v123:refs/tags/v123    [new tag]\n-\t*    refs/heads/master:refs/review/master/topic    [new reference]\n+\t*    refs/heads/main:refs/review/main/topic    [new reference]\n \t*    HEAD:refs/heads/a/b/c    [new branch]\n \tDone\n \tEOF\n@@ -128,19 +128,19 @@ test_expect_success \"git-push -f ($PROTOCOL/porcelain)\" '\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \t<COMMIT-A> refs/heads/a/b/c\n-\t<COMMIT-A> refs/heads/master\n-\t<COMMIT-A> refs/review/master/topic\n+\t<COMMIT-A> refs/heads/main\n+\t<COMMIT-A> refs/review/main/topic\n \t<TAG-v123> refs/tags/v123\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)  tags/v123  refs/review/master/topic(A)  a/b/c(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)  tags/v123  refs/review/main/topic(A)  a/b/c(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n \t(\n \t\tcd \"$upstream\" &&\n-\t\tgit update-ref -d refs/review/master/topic &&\n+\t\tgit update-ref -d refs/review/main/topic &&\n \t\tgit update-ref -d refs/tags/v123 &&\n \t\tgit update-ref -d refs/heads/a/b/c\n \t)\ndiff --git a/t/t5411/test-0002-pre-receive-declined.sh b/t/t5411/test-0002-pre-receive-declined.sh\nindex c246f7e68e..e7d113a158 100644\n--- a/t/t5411/test-0002-pre-receive-declined.sh\n+++ b/t/t5411/test-0002-pre-receive-declined.sh\n@@ -5,25 +5,25 @@ test_expect_success \"setup pre-receive hook ($PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git-push         : master(B)             next(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git-push         : main(B)             next(A)\n test_expect_success \"git-push is declined ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\t$B:refs/heads/master \\\n+\t\t$B:refs/heads/main \\\n \t\tHEAD:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] <COMMIT-B> -> master (pre-receive hook declined)\n+\t ! [remote rejected] <COMMIT-B> -> main (pre-receive hook declined)\n \t ! [remote rejected] HEAD -> next (pre-receive hook declined)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0003-pre-receive-declined--porcelain.sh b/t/t5411/test-0003-pre-receive-declined--porcelain.sh\nindex b14894de81..cc0cca6a47 100644\n--- a/t/t5411/test-0003-pre-receive-declined--porcelain.sh\n+++ b/t/t5411/test-0003-pre-receive-declined--porcelain.sh\n@@ -5,18 +5,18 @@ test_expect_success \"setup pre-receive hook ($PROTOCOL/porcelain)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git-push         : master(B)             next(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git-push         : main(B)             next(A)\n test_expect_success \"git-push is declined ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\t$B:refs/heads/master \\\n+\t\t$B:refs/heads/main \\\n \t\tHEAD:refs/heads/next \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tTo <URL/of/upstream.git>\n-\t!    <COMMIT-B>:refs/heads/master    [remote rejected] (pre-receive hook declined)\n+\t!    <COMMIT-B>:refs/heads/main    [remote rejected] (pre-receive hook declined)\n \t!    HEAD:refs/heads/next    [remote rejected] (pre-receive hook declined)\n \tDone\n \tEOF\n@@ -24,7 +24,7 @@ test_expect_success \"git-push is declined ($PROTOCOL/porcelain)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0011-no-hook-error.sh b/t/t5411/test-0011-no-hook-error.sh\nindex bb6ec92a92..c50830982f 100644\n--- a/t/t5411/test-0011-no-hook-error.sh\n+++ b/t/t5411/test-0011-no-hook-error.sh\n@@ -1,64 +1,64 @@\n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       next(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       next(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: no hook, fail to push special ref ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n \t\tHEAD:next \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: error: cannot find hook \"proc-receive\"\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tTo <URL/of/upstream.git>\n \t * [new branch] HEAD -> next\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (fail to run proc-receive hook)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (fail to run proc-receive hook)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             next(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             next(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n \tgit -C \"$upstream\" update-ref -d refs/heads/next\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push --atomic: (B)                   next(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push --atomic: (B)                   next(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: no hook, all failed for atomic push ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push --atomic origin \\\n-\t\t$B:master \\\n+\t\t$B:main \\\n \t\tHEAD:next \\\n-\t\tHEAD:refs/for/master/topic >out 2>&1 &&\n+\t\tHEAD:refs/for/main/topic >out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: error: cannot find hook \"proc-receive\"\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] <COMMIT-B> -> master (fail to run proc-receive hook)\n+\t ! [remote rejected] <COMMIT-B> -> main (fail to run proc-receive hook)\n \t ! [remote rejected] HEAD -> next (fail to run proc-receive hook)\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (fail to run proc-receive hook)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (fail to run proc-receive hook)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0012-no-hook-error--porcelain.sh b/t/t5411/test-0012-no-hook-error--porcelain.sh\nindex 4814f74dc2..14ea433481 100644\n--- a/t/t5411/test-0012-no-hook-error--porcelain.sh\n+++ b/t/t5411/test-0012-no-hook-error--porcelain.sh\n@@ -1,66 +1,66 @@\n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       next(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       next(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: no hook, fail to push special ref ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n \t\tHEAD:next \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: error: cannot find hook \"proc-receive\"\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tTo <URL/of/upstream.git>\n \t*    HEAD:refs/heads/next    [new branch]\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (fail to run proc-receive hook)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (fail to run proc-receive hook)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             next(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             next(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n \tgit -C \"$upstream\" update-ref -d refs/heads/next\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push --atomic: (B)                   next(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push --atomic: (B)                   next(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: no hook, all failed for atomic push ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain --atomic origin \\\n-\t\t$B:master \\\n+\t\t$B:main \\\n \t\tHEAD:next \\\n-\t\tHEAD:refs/for/master/topic >out 2>&1 &&\n+\t\tHEAD:refs/for/main/topic >out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: error: cannot find hook \"proc-receive\"\n \tTo <URL/of/upstream.git>\n-\t!    <COMMIT-B>:refs/heads/master    [remote rejected] (fail to run proc-receive hook)\n+\t!    <COMMIT-B>:refs/heads/main    [remote rejected] (fail to run proc-receive hook)\n \t!    HEAD:refs/heads/next    [remote rejected] (fail to run proc-receive hook)\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (fail to run proc-receive hook)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (fail to run proc-receive hook)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0013-bad-protocol.sh b/t/t5411/test-0013-bad-protocol.sh\nindex c5fe4cb37b..854c3e884a 100644\n--- a/t/t5411/test-0013-bad-protocol.sh\n+++ b/t/t5411/test-0013-bad-protocol.sh\n@@ -5,12 +5,12 @@ test_expect_success \"setup proc-receive hook (unknown version, $PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: bad protocol (unknown version, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \n@@ -20,7 +20,7 @@ test_expect_success \"proc-receive: bad protocol (unknown version, $PROTOCOL)\" '\n \t\t<actual >actual-report &&\n \tcat >expect <<-EOF &&\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (fail to run proc-receive hook)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (fail to run proc-receive hook)\n \tEOF\n \ttest_cmp expect actual-report &&\n \n@@ -36,7 +36,7 @@ test_expect_success \"proc-receive: bad protocol (unknown version, $PROTOCOL)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -48,30 +48,30 @@ test_expect_success \"setup proc-receive hook (hook --die-version, $PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: bad protocol (hook --die-version, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n \tremote: fatal: bad protocol version: 1\n \tremote: error: proc-receive version \"0\" is not supported\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (fail to run proc-receive hook)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (fail to run proc-receive hook)\n \tEOF\n \ttest_cmp expect actual &&\n \n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -83,21 +83,21 @@ test_expect_success \"setup proc-receive hook (hook --die-readline, $PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: bad protocol (hook --die-readline, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \n-\tgrep \"remote: fatal: protocol error: expected \\\"old new ref\\\", got \\\"<ZERO-OID> <COMMIT-A> refs/for/master/topic\\\"\" actual &&\n+\tgrep \"remote: fatal: protocol error: expected \\\"old new ref\\\", got \\\"<ZERO-OID> <COMMIT-A> refs/for/main/topic\\\"\" actual &&\n \n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -109,38 +109,38 @@ test_expect_success \"setup proc-receive hook (no report, $PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       next(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       next(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: bad protocol (no report, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n \t\tHEAD:refs/heads/next \\\n-\t\tHEAD:refs/for/master/topic >out 2>&1 &&\n+\t\tHEAD:refs/for/main/topic >out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tTo <URL/of/upstream.git>\n \t * [new branch] HEAD -> next\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             next(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             next(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n \tgit -C \"$upstream\" update-ref -d refs/heads/next\n \n@@ -154,29 +154,29 @@ test_expect_success \"setup proc-receive hook (no ref, $PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: bad protocol (no ref, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic\\\n+\t\tHEAD:refs/for/main/topic\\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive> ok\n \tremote: error: proc-receive reported incomplete status line: \"ok\"\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -185,33 +185,33 @@ test_expect_success \"setup proc-receive hook (unknown status, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"xx refs/for/master/topic\"\n+\t\t-r \"xx refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: bad protocol (unknown status, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\t\tHEAD:refs/for/master/topic \\\n+\t\t\tHEAD:refs/for/main/topic \\\n \t\t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> xx refs/for/master/topic\n-\tremote: error: proc-receive reported bad status \"xx\" on ref \"refs/for/master/topic\"\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> xx refs/for/main/topic\n+\tremote: error: proc-receive reported bad status \"xx\" on ref \"refs/for/main/topic\"\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0014-bad-protocol--porcelain.sh b/t/t5411/test-0014-bad-protocol--porcelain.sh\nindex 53b47b0185..88c56311da 100644\n--- a/t/t5411/test-0014-bad-protocol--porcelain.sh\n+++ b/t/t5411/test-0014-bad-protocol--porcelain.sh\n@@ -5,12 +5,12 @@ test_expect_success \"setup proc-receive hook (unknown version, $PROTOCOL/porcela\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: bad protocol (unknown version, $PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \n@@ -20,7 +20,7 @@ test_expect_success \"proc-receive: bad protocol (unknown version, $PROTOCOL/porc\n \t\t<actual >actual-report &&\n \tcat >expect <<-EOF &&\n \tTo <URL/of/upstream.git>\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (fail to run proc-receive hook)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (fail to run proc-receive hook)\n \tDone\n \tEOF\n \ttest_cmp expect actual-report &&\n@@ -37,7 +37,7 @@ test_expect_success \"proc-receive: bad protocol (unknown version, $PROTOCOL/porc\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -49,39 +49,39 @@ test_expect_success \"setup proc-receive hook (no report, $PROTOCOL/porcelain)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       next(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       next(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: bad protocol (no report, $PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n \t\tHEAD:refs/heads/next \\\n-\t\tHEAD:refs/for/master/topic >out 2>&1 &&\n+\t\tHEAD:refs/for/main/topic >out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tTo <URL/of/upstream.git>\n \t*    HEAD:refs/heads/next    [new branch]\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (proc-receive failed to report status)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (proc-receive failed to report status)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             next(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             next(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n \tgit -C \"$upstream\" update-ref -d refs/heads/next\n \n@@ -95,30 +95,30 @@ test_expect_success \"setup proc-receive hook (no ref, $PROTOCOL/porcelain)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: bad protocol (no ref, $PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic\\\n+\t\tHEAD:refs/for/main/topic\\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive> ok\n \tremote: error: proc-receive reported incomplete status line: \"ok\"\n \tTo <URL/of/upstream.git>\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (proc-receive failed to report status)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (proc-receive failed to report status)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -127,34 +127,34 @@ test_expect_success \"setup proc-receive hook (unknown status, $PROTOCOL/porcelai\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"xx refs/for/master/topic\"\n+\t\t-r \"xx refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: bad protocol (unknown status, $PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\t\tHEAD:refs/for/master/topic \\\n+\t\t\tHEAD:refs/for/main/topic \\\n \t\t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> xx refs/for/master/topic\n-\tremote: error: proc-receive reported bad status \"xx\" on ref \"refs/for/master/topic\"\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> xx refs/for/main/topic\n+\tremote: error: proc-receive reported bad status \"xx\" on ref \"refs/for/main/topic\"\n \tTo <URL/of/upstream.git>\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (proc-receive failed to report status)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (proc-receive failed to report status)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0020-report-ng.sh b/t/t5411/test-0020-report-ng.sh\nindex f726b7ca9c..5a9e0daf2d 100644\n--- a/t/t5411/test-0020-report-ng.sh\n+++ b/t/t5411/test-0020-report-ng.sh\n@@ -2,32 +2,32 @@ test_expect_success \"setup proc-receive hook (ng, no message, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ng refs/for/master/topic\"\n+\t\t-r \"ng refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: fail to update (ng, no message, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ng refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ng refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (failed)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (failed)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -36,32 +36,32 @@ test_expect_success \"setup proc-receive hook (ng message, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ng refs/for/master/topic error msg\"\n+\t\t-r \"ng refs/for/main/topic error msg\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: fail to update (ng, with message, $PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ng refs/for/master/topic error msg\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ng refs/for/main/topic error msg\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (error msg)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (error msg)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0021-report-ng--porcelain.sh b/t/t5411/test-0021-report-ng--porcelain.sh\nindex fbf5569103..93475a83cf 100644\n--- a/t/t5411/test-0021-report-ng--porcelain.sh\n+++ b/t/t5411/test-0021-report-ng--porcelain.sh\n@@ -2,33 +2,33 @@ test_expect_success \"setup proc-receive hook (ng, no message, $PROTOCOL/porcelai\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ng refs/for/master/topic\"\n+\t\t-r \"ng refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: fail to update (ng, no message, $PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ng refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ng refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (failed)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (failed)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -37,33 +37,33 @@ test_expect_success \"setup proc-receive hook (ng message, $PROTOCOL/porcelain)\"\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ng refs/for/master/topic error msg\"\n+\t\t-r \"ng refs/for/main/topic error msg\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: fail to update (ng, with message, $PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ng refs/for/master/topic error msg\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ng refs/for/main/topic error msg\n \tTo <URL/of/upstream.git>\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (error msg)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (error msg)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0022-report-unexpect-ref.sh b/t/t5411/test-0022-report-unexpect-ref.sh\nindex 92a415b929..f8be8a0ba1 100644\n--- a/t/t5411/test-0022-report-unexpect-ref.sh\n+++ b/t/t5411/test-0022-report-unexpect-ref.sh\n@@ -2,44 +2,44 @@ test_expect_success \"setup proc-receive hook (unexpected ref, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/heads/master\"\n+\t\t-r \"ok refs/heads/main\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         : (B)                   refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         : (B)                   refs/for/main/topic\n test_expect_success \"proc-receive: report unexpected ref ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\t$B:refs/heads/master \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\t$B:refs/heads/main \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/heads/master\n-\tremote: error: proc-receive reported status on unexpected ref: refs/heads/master\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/heads/main\n+\tremote: error: proc-receive reported status on unexpected ref: refs/heads/main\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tTo <URL/of/upstream.git>\n-\t <OID-A>..<OID-B> <COMMIT-B> -> master\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)\n+\t <OID-A>..<OID-B> <COMMIT-B> -> main\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(B)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n-\tgit -C \"$upstream\" update-ref refs/heads/master $A\n+\tgit -C \"$upstream\" update-ref refs/heads/main $A\n '\ndiff --git a/t/t5411/test-0023-report-unexpect-ref--porcelain.sh b/t/t5411/test-0023-report-unexpect-ref--porcelain.sh\nindex acbf93e40a..778150fa03 100644\n--- a/t/t5411/test-0023-report-unexpect-ref--porcelain.sh\n+++ b/t/t5411/test-0023-report-unexpect-ref--porcelain.sh\n@@ -2,45 +2,45 @@ test_expect_success \"setup proc-receive hook (unexpected ref, $PROTOCOL/porcelai\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/heads/master\"\n+\t\t-r \"ok refs/heads/main\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         : (B)                   refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         : (B)                   refs/for/main/topic\n test_expect_success \"proc-receive: report unexpected ref ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\t$B:refs/heads/master \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\t$B:refs/heads/main \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/heads/master\n-\tremote: error: proc-receive reported status on unexpected ref: refs/heads/master\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/heads/main\n+\tremote: error: proc-receive reported status on unexpected ref: refs/heads/main\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tTo <URL/of/upstream.git>\n-\t     <COMMIT-B>:refs/heads/master    <OID-A>..<OID-B>\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (proc-receive failed to report status)\n+\t     <COMMIT-B>:refs/heads/main    <OID-A>..<OID-B>\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (proc-receive failed to report status)\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(B)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n-\tgit -C \"$upstream\" update-ref refs/heads/master $A\n+\tgit -C \"$upstream\" update-ref refs/heads/main $A\n '\ndiff --git a/t/t5411/test-0024-report-unknown-ref.sh b/t/t5411/test-0024-report-unknown-ref.sh\nindex c3946f329a..d4e74e4681 100644\n--- a/t/t5411/test-0024-report-unknown-ref.sh\n+++ b/t/t5411/test-0024-report-unknown-ref.sh\n@@ -2,12 +2,12 @@ test_expect_success \"setup proc-receive hook (unexpected ref, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\"\n+\t\t-r \"ok refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n # git push         :                       refs/for/a/b/c/my/topic\n test_expect_success \"proc-receive: report unknown reference ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n@@ -19,8 +19,8 @@ test_expect_success \"proc-receive: report unknown reference ($PROTOCOL)\" '\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/my/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/my/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n-\tremote: error: proc-receive reported status on unknown ref: refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n+\tremote: error: proc-receive reported status on unknown ref: refs/for/main/topic\n \tTo <URL/of/upstream.git>\n \t ! [remote rejected] HEAD -> refs/for/a/b/c/my/topic (proc-receive failed to report status)\n \tEOF\n@@ -28,7 +28,7 @@ test_expect_success \"proc-receive: report unknown reference ($PROTOCOL)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0025-report-unknown-ref--porcelain.sh b/t/t5411/test-0025-report-unknown-ref--porcelain.sh\nindex d093b1a579..039e8b6163 100644\n--- a/t/t5411/test-0025-report-unknown-ref--porcelain.sh\n+++ b/t/t5411/test-0025-report-unknown-ref--porcelain.sh\n@@ -2,12 +2,12 @@ test_expect_success \"setup proc-receive hook (unexpected ref, $PROTOCOL/porcelai\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\"\n+\t\t-r \"ok refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n # git push         :                       refs/for/a/b/c/my/topic\n test_expect_success \"proc-receive: report unknown reference ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n@@ -19,8 +19,8 @@ test_expect_success \"proc-receive: report unknown reference ($PROTOCOL/porcelain\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/my/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/my/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n-\tremote: error: proc-receive reported status on unknown ref: refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n+\tremote: error: proc-receive reported status on unknown ref: refs/for/main/topic\n \tTo <URL/of/upstream.git>\n \t!    HEAD:refs/for/a/b/c/my/topic    [remote rejected] (proc-receive failed to report status)\n \tDone\n@@ -29,7 +29,7 @@ test_expect_success \"proc-receive: report unknown reference ($PROTOCOL/porcelain\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0026-push-options.sh b/t/t5411/test-0026-push-options.sh\nindex d0c4da8b23..d414be87d0 100644\n--- a/t/t5411/test-0026-push-options.sh\n+++ b/t/t5411/test-0026-push-options.sh\n@@ -3,19 +3,19 @@ test_expect_success \"setup proc-receive hook and disable push-options ($PROTOCOL\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\"\n+\t\t-r \"ok refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push -o ...  :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push -o ...  :                       refs/for/main/topic\n test_expect_success \"proc-receive: not support push options ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push \\\n \t\t-o issue=123 \\\n \t\t-o reviewer=user1 \\\n \t\torigin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \ttest_i18ngrep \"fatal: the receiving end does not support push options\" \\\n@@ -23,7 +23,7 @@ test_expect_success \"proc-receive: not support push options ($PROTOCOL)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -32,9 +32,9 @@ test_expect_success \"enable push options ($PROTOCOL)\" '\n \tgit -C \"$upstream\" config receive.advertisePushOptions true\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push -o ...  :                       next(A)  refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push -o ...  :                       next(A)  refs/for/main/topic\n test_expect_success \"proc-receive: push with options ($PROTOCOL)\" '\n \tgit -C workbench push \\\n \t\t--atomic \\\n@@ -42,38 +42,38 @@ test_expect_success \"proc-receive: push with options ($PROTOCOL)\" '\n \t\t-o reviewer=user1 \\\n \t\torigin \\\n \t\tHEAD:refs/heads/next \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive: atomic push_options\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive< issue=123\n \tremote: proc-receive< reviewer=user1\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n \t * [new branch] HEAD -> next\n-\t * [new reference] HEAD -> refs/for/master/topic\n+\t * [new reference] HEAD -> refs/for/main/topic\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             next(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             next(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n \tgit -C \"$upstream\" update-ref -d refs/heads/next\n '\ndiff --git a/t/t5411/test-0027-push-options--porcelain.sh b/t/t5411/test-0027-push-options--porcelain.sh\nindex c89a1e7c57..d5d0dcb172 100644\n--- a/t/t5411/test-0027-push-options--porcelain.sh\n+++ b/t/t5411/test-0027-push-options--porcelain.sh\n@@ -3,20 +3,20 @@ test_expect_success \"setup proc-receive hook and disable push-options ($PROTOCOL\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\"\n+\t\t-r \"ok refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push -o ...  :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push -o ...  :                       refs/for/main/topic\n test_expect_success \"proc-receive: not support push options ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push \\\n \t\t--porcelain \\\n \t\t-o issue=123 \\\n \t\t-o reviewer=user1 \\\n \t\torigin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \ttest_i18ngrep \"fatal: the receiving end does not support push options\" \\\n@@ -24,7 +24,7 @@ test_expect_success \"proc-receive: not support push options ($PROTOCOL/porcelain\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -33,9 +33,9 @@ test_expect_success \"enable push options ($PROTOCOL/porcelain)\" '\n \tgit -C \"$upstream\" config receive.advertisePushOptions true\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push -o ...  :                       next(A)  refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push -o ...  :                       next(A)  refs/for/main/topic\n test_expect_success \"proc-receive: push with options ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push \\\n \t\t--porcelain \\\n@@ -44,39 +44,39 @@ test_expect_success \"proc-receive: push with options ($PROTOCOL/porcelain)\" '\n \t\t-o reviewer=user1 \\\n \t\torigin \\\n \t\tHEAD:refs/heads/next \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive: atomic push_options\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive< issue=123\n \tremote: proc-receive< reviewer=user1\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n \t*    HEAD:refs/heads/next    [new branch]\n-\t*    HEAD:refs/for/master/topic    [new reference]\n+\t*    HEAD:refs/for/main/topic    [new reference]\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-A> refs/heads/next\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             next(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             next(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n \tgit -C \"$upstream\" update-ref -d refs/heads/next\n '\n-- \ngitgitgadget\n\n"},{"id":"408799","messageId":"0667f182449a8c18df53326bed0f7555aea4029c.1604173563.git.gitgitgadget@gmail.com","threadId":"54518","inReplyTo":"pull.760.v2.git.1604173563.gitgitgadget@gmail.com","subject":"[PATCH v2 2/4] t5411: start adjusting the support files for init.defaultBranch=main","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-31T19:46:01Z","receivedAt":"2020-10-31T19:46:15Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis trick was performed via\n\n\t$ sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \\\n\t\t-e 's/Master/Main/g' -- t/t5411/test-00[3-5]*\n\nWe do not convert the files in `t/t5411/` in one go because the patch\nwould be too big (mails larger than 100kB are rejected by the Git\nmailing list). Instead, we start with roughly half of the support files.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t5411/test-0030-report-ok.sh                |  22 ++--\n t/t5411/test-0031-report-ok--porcelain.sh     |  22 ++--\n t/t5411/test-0032-report-with-options.sh      | 120 +++++++++---------\n ...est-0033-report-with-options--porcelain.sh | 120 +++++++++---------\n t/t5411/test-0034-report-ft.sh                |  30 ++---\n t/t5411/test-0035-report-ft--porcelain.sh     |  30 ++---\n ...t-0036-report-multi-rewrite-for-one-ref.sh |  90 ++++++-------\n ...rt-multi-rewrite-for-one-ref--porcelain.sh |  82 ++++++------\n t/t5411/test-0038-report-mixed-refs.sh        |  40 +++---\n .../test-0039-report-mixed-refs--porcelain.sh |  40 +++---\n t/t5411/test-0040-process-all-refs.sh         |  42 +++---\n .../test-0041-process-all-refs--porcelain.sh  |  42 +++---\n ...t-0050-proc-receive-refs-with-modifiers.sh |  42 +++---\n 13 files changed, 361 insertions(+), 361 deletions(-)\n\ndiff --git a/t/t5411/test-0030-report-ok.sh b/t/t5411/test-0030-report-ok.sh\nindex 44c99d3831..5d6feef118 100644\n--- a/t/t5411/test-0030-report-ok.sh\n+++ b/t/t5411/test-0030-report-ok.sh\n@@ -2,34 +2,34 @@ test_expect_success \"setup proc-receive hook (ok, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\"\n+\t\t-r \"ok refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: ok ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: # post-receive hook\n-\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t * [new reference] HEAD -> refs/for/master/topic\n+\t * [new reference] HEAD -> refs/for/main/topic\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0031-report-ok--porcelain.sh b/t/t5411/test-0031-report-ok--porcelain.sh\nindex 3223b26184..91666d32df 100644\n--- a/t/t5411/test-0031-report-ok--porcelain.sh\n+++ b/t/t5411/test-0031-report-ok--porcelain.sh\n@@ -2,35 +2,35 @@ test_expect_success \"setup proc-receive hook (ok, $PROTOCOL/porcelain)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\"\n+\t\t-r \"ok refs/for/main/topic\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic\n test_expect_success \"proc-receive: ok ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: # post-receive hook\n-\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t*    HEAD:refs/for/master/topic    [new reference]\n+\t*    HEAD:refs/for/main/topic    [new reference]\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0032-report-with-options.sh b/t/t5411/test-0032-report-with-options.sh\nindex b77b78c49f..a0faf5c7ff 100644\n--- a/t/t5411/test-0032-report-with-options.sh\n+++ b/t/t5411/test-0032-report-with-options.sh\n@@ -7,24 +7,24 @@ test_expect_success \"setup proc-receive hook (option without matching ok, $PROTO\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option without matching ok ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: error: proc-receive reported \"option\" without a matching \"ok/ng\" directive\n \tTo <URL/of/upstream.git>\n-\t ! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)\n+\t ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -33,25 +33,25 @@ test_expect_success \"setup proc-receive hook (option refname, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option refname ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/pull/123/head\n@@ -65,25 +65,25 @@ test_expect_success \"setup proc-receive hook (option refname and forced-update,\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option forced-update\"\n \tEOF\n '\n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option refname and forced-update ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option forced-update\n \tremote: # post-receive hook\n@@ -98,26 +98,26 @@ test_expect_success \"setup proc-receive hook (option refname and old-oid, $PROTO\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option old-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option refname and old-oid ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: # post-receive hook\n@@ -132,30 +132,30 @@ test_expect_success \"setup proc-receive hook (option old-oid, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option old-oid ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t <OID-B>..<OID-A> HEAD -> refs/for/master/topic\n+\t <OID-B>..<OID-A> HEAD -> refs/for/main/topic\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -164,32 +164,32 @@ test_expect_success \"setup proc-receive hook (option old-oid and new-oid, $PROTO\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option old-oid and new-oid ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t <OID-A>..<OID-B> HEAD -> refs/for/master/topic\n+\t <OID-A>..<OID-B> HEAD -> refs/for/main/topic\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -201,7 +201,7 @@ test_expect_success \"setup proc-receive hook (report with multiple rewrites, $PR\n \t\t-r \"ok refs/for/a/b/c/topic\" \\\n \t\t-r \"ok refs/for/next/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/124/head\" \\\n \t\t-r \"option old-oid $B\" \\\n \t\t-r \"option forced-update\" \\\n@@ -209,29 +209,29 @@ test_expect_success \"setup proc-receive hook (report with multiple rewrites, $PR\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report with multiple rewrites ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n \t\tHEAD:refs/for/next/topic \\\n \t\tHEAD:refs/for/a/b/c/topic \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive> ok refs/for/a/b/c/topic\n \tremote: proc-receive> ok refs/for/next/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/124/head\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: proc-receive> option forced-update\n@@ -250,7 +250,7 @@ test_expect_success \"proc-receive: report with multiple rewrites ($PROTOCOL)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0033-report-with-options--porcelain.sh b/t/t5411/test-0033-report-with-options--porcelain.sh\nindex 1fe352b686..32ae26bcfb 100644\n--- a/t/t5411/test-0033-report-with-options--porcelain.sh\n+++ b/t/t5411/test-0033-report-with-options--porcelain.sh\n@@ -7,24 +7,24 @@ test_expect_success \"setup proc-receive hook (option without matching ok, $PROTO\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option without matching ok ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: error: proc-receive reported \"option\" without a matching \"ok/ng\" directive\n \tTo <URL/of/upstream.git>\n-\t!    HEAD:refs/for/master/topic    [remote rejected] (proc-receive failed to report status)\n+\t!    HEAD:refs/for/main/topic    [remote rejected] (proc-receive failed to report status)\n \tDone\n \tEOF\n \ttest_cmp expect actual\n@@ -34,25 +34,25 @@ test_expect_success \"setup proc-receive hook (option refname, $PROTOCOL/porcelai\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option refname ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/pull/123/head\n@@ -67,26 +67,26 @@ test_expect_success \"setup proc-receive hook (option refname and forced-update,\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option forced-update\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option refname and forced-update ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option forced-update\n \tremote: # post-receive hook\n@@ -102,26 +102,26 @@ test_expect_success \"setup proc-receive hook (option refname and old-oid, $PROTO\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option old-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option refname and old-oid ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: # post-receive hook\n@@ -137,30 +137,30 @@ test_expect_success \"setup proc-receive hook (option old-oid, $PROTOCOL/porcelai\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option old-oid ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t     HEAD:refs/for/master/topic    <OID-B>..<OID-A>\n+\t     HEAD:refs/for/main/topic    <OID-B>..<OID-A>\n \tDone\n \tEOF\n \ttest_cmp expect actual\n@@ -170,32 +170,32 @@ test_expect_success \"setup proc-receive hook (option old-oid and new-oid, $PROTO\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report option old-oid and new-oid ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t     HEAD:refs/for/master/topic    <OID-A>..<OID-B>\n+\t     HEAD:refs/for/main/topic    <OID-A>..<OID-B>\n \tDone\n \tEOF\n \ttest_cmp expect actual\n@@ -208,7 +208,7 @@ test_expect_success \"setup proc-receive hook (report with multiple rewrites, $PR\n \t\t-r \"ok refs/for/a/b/c/topic\" \\\n \t\t-r \"ok refs/for/next/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/124/head\" \\\n \t\t-r \"option old-oid $B\" \\\n \t\t-r \"option forced-update\" \\\n@@ -217,29 +217,29 @@ test_expect_success \"setup proc-receive hook (report with multiple rewrites, $PR\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report with multiple rewrites ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n \t\tHEAD:refs/for/next/topic \\\n \t\tHEAD:refs/for/a/b/c/topic \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive> ok refs/for/a/b/c/topic\n \tremote: proc-receive> ok refs/for/next/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/124/head\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: proc-receive> option forced-update\n@@ -259,7 +259,7 @@ test_expect_success \"proc-receive: report with multiple rewrites ($PROTOCOL/porc\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0034-report-ft.sh b/t/t5411/test-0034-report-ft.sh\nindex aca2b0676c..c355c290d2 100644\n--- a/t/t5411/test-0034-report-ft.sh\n+++ b/t/t5411/test-0034-report-ft.sh\n@@ -2,43 +2,43 @@ test_expect_success \"setup proc-receive hook (ft, $PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option fall-through\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(B)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(B)\n test_expect_success \"proc-receive: fall throught, let receive-pack to execute ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\t$B:refs/for/master/topic \\\n+\t\t$B:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option fall-through\n \tremote: # post-receive hook\n-\tremote: post-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t * [new reference] <COMMIT-B> -> refs/for/master/topic\n+\t * [new reference] <COMMIT-B> -> refs/for/main/topic\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/for/master/topic\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-B> refs/for/main/topic\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             refs/for/master/topic(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             refs/for/main/topic(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n-\tgit -C \"$upstream\" update-ref -d refs/for/master/topic\n+\tgit -C \"$upstream\" update-ref -d refs/for/main/topic\n '\ndiff --git a/t/t5411/test-0035-report-ft--porcelain.sh b/t/t5411/test-0035-report-ft--porcelain.sh\nindex 30ffffb352..8ce4e58f2a 100644\n--- a/t/t5411/test-0035-report-ft--porcelain.sh\n+++ b/t/t5411/test-0035-report-ft--porcelain.sh\n@@ -2,44 +2,44 @@ test_expect_success \"setup proc-receive hook (fall-through, $PROTOCOL/porcelain)\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option fall-through\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(B)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(B)\n test_expect_success \"proc-receive: fall throught, let receive-pack to execute ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\t$B:refs/for/master/topic \\\n+\t\t$B:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option fall-through\n \tremote: # post-receive hook\n-\tremote: post-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t*    <COMMIT-B>:refs/for/master/topic    [new reference]\n+\t*    <COMMIT-B>:refs/for/main/topic    [new reference]\n \tDone\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-B> refs/for/master/topic\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-B> refs/for/main/topic\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             refs/for/master/topic(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             refs/for/main/topic(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n-\tgit -C \"$upstream\" update-ref -d refs/for/master/topic\n+\tgit -C \"$upstream\" update-ref -d refs/for/main/topic\n '\ndiff --git a/t/t5411/test-0036-report-multi-rewrite-for-one-ref.sh b/t/t5411/test-0036-report-multi-rewrite-for-one-ref.sh\nindex 73283d81e8..fad8eea8a0 100644\n--- a/t/t5411/test-0036-report-multi-rewrite-for-one-ref.sh\n+++ b/t/t5411/test-0036-report-multi-rewrite-for-one-ref.sh\n@@ -17,50 +17,50 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, no\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/24/124/1\" \\\n \t\t-r \"option old-oid $ZERO_OID\" \\\n \t\t-r \"option new-oid $A\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/25/125/1\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: multiple rewrite for one ref, no refname for the 1st rewrite ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/24/124/1\n \tremote: proc-receive> option old-oid <ZERO-OID>\n \tremote: proc-receive> option new-oid <COMMIT-A>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/25/125/1\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/changes/24/124/1\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/changes/25/125/1\n \tTo <URL/of/upstream.git>\n-\t <OID-A>..<OID-B> HEAD -> refs/for/master/topic\n+\t <OID-A>..<OID-B> HEAD -> refs/for/main/topic\n \t * [new reference] HEAD -> refs/changes/24/124/1\n \t <OID-A>..<OID-B> HEAD -> refs/changes/25/125/1\n \tEOF\n@@ -68,7 +68,7 @@ test_expect_success \"proc-receive: multiple rewrite for one ref, no refname for\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -80,10 +80,10 @@ test_expect_success \"proc-receive: check remote-tracking #1 ($PROTOCOL)\" '\n \tcat >expect <<-EOF &&\n \t<COMMIT-A> refs/t/changes/24/124/1\n \t<COMMIT-B> refs/t/changes/25/125/1\n-\t<COMMIT-B> refs/t/for/master/topic\n+\t<COMMIT-B> refs/t/for/main/topic\n \tEOF\n \ttest_cmp expect actual &&\n-\tgit -C workbench update-ref -d refs/t/for/master/topic &&\n+\tgit -C workbench update-ref -d refs/t/for/main/topic &&\n \tgit -C workbench update-ref -d refs/t/changes/24/124/1 &&\n \tgit -C workbench update-ref -d refs/t/changes/25/125/1\n '\n@@ -92,14 +92,14 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, no\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/24/124/1\" \\\n \t\t-r \"option old-oid $ZERO_OID\" \\\n \t\t-r \"option new-oid $A\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/25/125/1\" \\\n \t\t-r \"option old-oid $B\" \\\n \t\t-r \"option new-oid $A\" \\\n@@ -107,45 +107,45 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, no\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: multiple rewrites for one ref, no refname for the 2nd rewrite ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/24/124/1\n \tremote: proc-receive> option old-oid <ZERO-OID>\n \tremote: proc-receive> option new-oid <COMMIT-A>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/25/125/1\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: proc-receive> option new-oid <COMMIT-A>\n \tremote: proc-receive> option forced-update\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/changes/24/124/1\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/changes/25/125/1\n \tTo <URL/of/upstream.git>\n \t * [new reference] HEAD -> refs/changes/24/124/1\n-\t <OID-A>..<OID-B> HEAD -> refs/for/master/topic\n+\t <OID-A>..<OID-B> HEAD -> refs/for/main/topic\n \t + <OID-B>...<OID-A> HEAD -> refs/changes/25/125/1 (forced update)\n \tEOF\n \ttest_cmp expect actual &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -157,10 +157,10 @@ test_expect_success \"proc-receive: check remote-tracking #2 ($PROTOCOL)\" '\n \tcat >expect <<-EOF &&\n \t<COMMIT-A> refs/t/changes/24/124/1\n \t<COMMIT-A> refs/t/changes/25/125/1\n-\t<COMMIT-B> refs/t/for/master/topic\n+\t<COMMIT-B> refs/t/for/main/topic\n \tEOF\n \ttest_cmp expect actual &&\n-\tgit -C workbench update-ref -d refs/t/for/master/topic &&\n+\tgit -C workbench update-ref -d refs/t/for/main/topic &&\n \tgit -C workbench update-ref -d refs/t/changes/24/124/1 &&\n \tgit -C workbench update-ref -d refs/t/changes/25/125/1\n '\n@@ -169,31 +169,31 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, $PR\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/23/123/1\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/24/124/2\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: multiple rewrites for one ref ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/23/123/1\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/24/124/2\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n@@ -208,7 +208,7 @@ test_expect_success \"proc-receive: multiple rewrites for one ref ($PROTOCOL)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh b/t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh\nindex 77b5b22ed4..dc254d57eb 100644\n--- a/t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh\n+++ b/t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh\n@@ -2,50 +2,50 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, no\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/24/124/1\" \\\n \t\t-r \"option old-oid $ZERO_OID\" \\\n \t\t-r \"option new-oid $A\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/25/125/1\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: multiple rewrite for one ref, no refname for the 1st rewrite ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/24/124/1\n \tremote: proc-receive> option old-oid <ZERO-OID>\n \tremote: proc-receive> option new-oid <COMMIT-A>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/25/125/1\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/changes/24/124/1\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/changes/25/125/1\n \tTo <URL/of/upstream.git>\n-\t     HEAD:refs/for/master/topic    <OID-A>..<OID-B>\n+\t     HEAD:refs/for/main/topic    <OID-A>..<OID-B>\n \t*    HEAD:refs/changes/24/124/1    [new reference]\n \t     HEAD:refs/changes/25/125/1    <OID-A>..<OID-B>\n \tDone\n@@ -54,7 +54,7 @@ test_expect_success \"proc-receive: multiple rewrite for one ref, no refname for\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -63,14 +63,14 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, no\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/24/124/1\" \\\n \t\t-r \"option old-oid $ZERO_OID\" \\\n \t\t-r \"option new-oid $A\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/25/125/1\" \\\n \t\t-r \"option old-oid $B\" \\\n \t\t-r \"option new-oid $A\" \\\n@@ -78,38 +78,38 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, no\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: multiple rewrites for one ref, no refname for the 2nd rewrite ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/24/124/1\n \tremote: proc-receive> option old-oid <ZERO-OID>\n \tremote: proc-receive> option new-oid <COMMIT-A>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/25/125/1\n \tremote: proc-receive> option old-oid <COMMIT-B>\n \tremote: proc-receive> option new-oid <COMMIT-A>\n \tremote: proc-receive> option forced-update\n \tremote: # post-receive hook\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/changes/24/124/1\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/changes/25/125/1\n \tTo <URL/of/upstream.git>\n \t*    HEAD:refs/changes/24/124/1    [new reference]\n-\t     HEAD:refs/for/master/topic    <OID-A>..<OID-B>\n+\t     HEAD:refs/for/main/topic    <OID-A>..<OID-B>\n \t+    HEAD:refs/changes/25/125/1    <OID-B>...<OID-A> (forced update)\n \tDone\n \tEOF\n@@ -117,7 +117,7 @@ test_expect_success \"proc-receive: multiple rewrites for one ref, no refname for\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n@@ -126,31 +126,31 @@ test_expect_success \"setup proc-receive hook (multiple rewrites for one ref, $PR\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/23/123/1\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/changes/24/124/2\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         :                       refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         :                       refs/for/main/topic(A)\n test_expect_success \"proc-receive: multiple rewrites for one ref ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain origin \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/23/123/1\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/changes/24/124/2\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n@@ -166,7 +166,7 @@ test_expect_success \"proc-receive: multiple rewrites for one ref ($PROTOCOL/porc\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\ndiff --git a/t/t5411/test-0038-report-mixed-refs.sh b/t/t5411/test-0038-report-mixed-refs.sh\nindex a74a2cb449..0d071ebaa6 100644\n--- a/t/t5411/test-0038-report-mixed-refs.sh\n+++ b/t/t5411/test-0038-report-mixed-refs.sh\n@@ -4,63 +4,63 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL)\" '\n \ttest-tool proc-receive -v \\\n \t\t-r \"ok refs/for/next/topic2\" \\\n \t\t-r \"ng refs/for/next/topic1 fail to call Web API\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n-\t\t-r \"option refname refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n+\t\t-r \"option refname refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         : (B)                   bar(A)  baz(A)  refs/for/next/topic(A)  foo(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         : (B)                   bar(A)  baz(A)  refs/for/next/topic(A)  foo(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report update of mixed refs ($PROTOCOL)\" '\n \ttest_must_fail git -C workbench push origin \\\n-\t\t$B:refs/heads/master \\\n+\t\t$B:refs/heads/main \\\n \t\tHEAD:refs/heads/bar \\\n \t\tHEAD:refs/heads/baz \\\n \t\tHEAD:refs/for/next/topic2 \\\n \t\tHEAD:refs/for/next/topic1 \\\n \t\tHEAD:refs/heads/foo \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\tHEAD:refs/for/next/topic3 \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3\n \tremote: # proc-receive hook\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3\n \tremote: proc-receive> ok refs/for/next/topic2\n \tremote: proc-receive> ng refs/for/next/topic1 fail to call Web API\n-\tremote: proc-receive> ok refs/for/master/topic\n-\tremote: proc-receive> option refname refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n+\tremote: proc-receive> option refname refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t <OID-A>..<OID-B> <COMMIT-B> -> master\n+\t <OID-A>..<OID-B> <COMMIT-B> -> main\n \t * [new branch] HEAD -> bar\n \t * [new branch] HEAD -> baz\n \t * [new reference] HEAD -> refs/for/next/topic2\n \t * [new branch] HEAD -> foo\n-\t <OID-A>..<OID-B> HEAD -> refs/for/master/topic\n+\t <OID-A>..<OID-B> HEAD -> refs/for/main/topic\n \t ! [remote rejected] HEAD -> refs/for/next/topic1 (fail to call Web API)\n \t ! [remote rejected] HEAD -> refs/for/next/topic3 (proc-receive failed to report status)\n \tEOF\n@@ -71,17 +71,17 @@ test_expect_success \"proc-receive: report update of mixed refs ($PROTOCOL)\" '\n \t<COMMIT-A> refs/heads/bar\n \t<COMMIT-A> refs/heads/baz\n \t<COMMIT-A> refs/heads/foo\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)             foo(A)  bar(A))  baz(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(B)             foo(A)  bar(A))  baz(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n \t(\n \t\tcd \"$upstream\" &&\n-\t\tgit update-ref refs/heads/master $A &&\n+\t\tgit update-ref refs/heads/main $A &&\n \t\tgit update-ref -d refs/heads/foo &&\n \t\tgit update-ref -d refs/heads/bar &&\n \t\tgit update-ref -d refs/heads/baz\ndiff --git a/t/t5411/test-0039-report-mixed-refs--porcelain.sh b/t/t5411/test-0039-report-mixed-refs--porcelain.sh\nindex e4baa13ea3..d8409912fd 100644\n--- a/t/t5411/test-0039-report-mixed-refs--porcelain.sh\n+++ b/t/t5411/test-0039-report-mixed-refs--porcelain.sh\n@@ -4,63 +4,63 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL/porcelain)\" '\n \ttest-tool proc-receive -v \\\n \t\t-r \"ok refs/for/next/topic2\" \\\n \t\t-r \"ng refs/for/next/topic1 fail to call Web API\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n-\t\t-r \"option refname refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n+\t\t-r \"option refname refs/for/main/topic\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\"\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         : (B)                   bar(A)  baz(A)  refs/for/next/topic(A)  foo(A)  refs/for/master/topic(A)\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         : (B)                   bar(A)  baz(A)  refs/for/next/topic(A)  foo(A)  refs/for/main/topic(A)\n test_expect_success \"proc-receive: report update of mixed refs ($PROTOCOL/porcelain)\" '\n \ttest_must_fail git -C workbench push --porcelain origin \\\n-\t\t$B:refs/heads/master \\\n+\t\t$B:refs/heads/main \\\n \t\tHEAD:refs/heads/bar \\\n \t\tHEAD:refs/heads/baz \\\n \t\tHEAD:refs/for/next/topic2 \\\n \t\tHEAD:refs/for/next/topic1 \\\n \t\tHEAD:refs/heads/foo \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\tHEAD:refs/for/next/topic3 \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3\n \tremote: # proc-receive hook\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3\n \tremote: proc-receive> ok refs/for/next/topic2\n \tremote: proc-receive> ng refs/for/next/topic1 fail to call Web API\n-\tremote: proc-receive> ok refs/for/master/topic\n-\tremote: proc-receive> option refname refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n+\tremote: proc-receive> option refname refs/for/main/topic\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n \tremote: # post-receive hook\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2\n \tremote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo\n-\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic\n+\tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic\n \tTo <URL/of/upstream.git>\n-\t     <COMMIT-B>:refs/heads/master    <OID-A>..<OID-B>\n+\t     <COMMIT-B>:refs/heads/main    <OID-A>..<OID-B>\n \t*    HEAD:refs/heads/bar    [new branch]\n \t*    HEAD:refs/heads/baz    [new branch]\n \t*    HEAD:refs/for/next/topic2    [new reference]\n \t*    HEAD:refs/heads/foo    [new branch]\n-\t     HEAD:refs/for/master/topic    <OID-A>..<OID-B>\n+\t     HEAD:refs/for/main/topic    <OID-A>..<OID-B>\n \t!    HEAD:refs/for/next/topic1    [remote rejected] (fail to call Web API)\n \t!    HEAD:refs/for/next/topic3    [remote rejected] (proc-receive failed to report status)\n \tDone\n@@ -72,17 +72,17 @@ test_expect_success \"proc-receive: report update of mixed refs ($PROTOCOL/porcel\n \t<COMMIT-A> refs/heads/bar\n \t<COMMIT-A> refs/heads/baz\n \t<COMMIT-A> refs/heads/foo\n-\t<COMMIT-B> refs/heads/master\n+\t<COMMIT-B> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(B)             foo(A)  bar(A))  baz(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(B)             foo(A)  bar(A))  baz(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n \t(\n \t\tcd \"$upstream\" &&\n-\t\tgit update-ref refs/heads/master $A &&\n+\t\tgit update-ref refs/heads/main $A &&\n \t\tgit update-ref -d refs/heads/foo &&\n \t\tgit update-ref -d refs/heads/bar &&\n \t\tgit update-ref -d refs/heads/baz\ndiff --git a/t/t5411/test-0040-process-all-refs.sh b/t/t5411/test-0040-process-all-refs.sh\nindex b07c999f53..2565302a17 100644\n--- a/t/t5411/test-0040-process-all-refs.sh\n+++ b/t/t5411/test-0040-process-all-refs.sh\n@@ -3,12 +3,12 @@ test_expect_success \"config receive.procReceiveRefs = refs ($PROTOCOL)\" '\n \tgit -C \"$upstream\" config --add receive.procReceiveRefs refs\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"setup upstream branches ($PROTOCOL)\" '\n \t(\n \t\tcd \"$upstream\" &&\n-\t\tgit update-ref refs/heads/master $B &&\n+\t\tgit update-ref refs/heads/main $B &&\n \t\tgit update-ref refs/heads/foo $A &&\n \t\tgit update-ref refs/heads/bar $A &&\n \t\tgit update-ref refs/heads/baz $A\n@@ -20,13 +20,13 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/heads/master\" \\\n+\t\t-r \"ok refs/heads/main\" \\\n \t\t-r \"option fall-through\" \\\n \t\t-r \"ok refs/heads/foo\" \\\n \t\t-r \"option fall-through\" \\\n \t\t-r \"ok refs/heads/bar\" \\\n \t\t-r \"option fall-through\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\" \\\n@@ -38,15 +38,15 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(B)             foo(A)  bar(A))  baz(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push -f      : master(A)             (NULL)  (B)              refs/for/master/topic(A)  refs/for/next/topic(A)\n+# Refs of upstream : main(B)             foo(A)  bar(A))  baz(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push -f      : main(A)             (NULL)  (B)              refs/for/main/topic(A)  refs/for/next/topic(A)\n test_expect_success \"proc-receive: process all refs ($PROTOCOL)\" '\n \tgit -C workbench push -f origin \\\n-\t\tHEAD:refs/heads/master \\\n+\t\tHEAD:refs/heads/main \\\n \t\t:refs/heads/foo \\\n \t\t$B:refs/heads/bar \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\tHEAD:refs/for/next/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n@@ -54,22 +54,22 @@ test_expect_success \"proc-receive: process all refs ($PROTOCOL)\" '\n \tremote: # pre-receive hook\n \tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar\n \tremote: pre-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo\n-\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar\n \tremote: proc-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo\n-\tremote: proc-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n-\tremote: proc-receive> ok refs/heads/master\n+\tremote: proc-receive> ok refs/heads/main\n \tremote: proc-receive> option fall-through\n \tremote: proc-receive> ok refs/heads/foo\n \tremote: proc-receive> option fall-through\n \tremote: proc-receive> ok refs/heads/bar\n \tremote: proc-receive> option fall-through\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n@@ -81,13 +81,13 @@ test_expect_success \"proc-receive: process all refs ($PROTOCOL)\" '\n \tremote: # post-receive hook\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar\n \tremote: post-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo\n-\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n+\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/pull/123/head\n \tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/pull/124/head\n \tTo <URL/of/upstream.git>\n \t <OID-A>..<OID-B> <COMMIT-B> -> bar\n \t - [deleted] foo\n-\t + <OID-B>...<OID-A> HEAD -> master (forced update)\n+\t + <OID-B>...<OID-A> HEAD -> main (forced update)\n \t <OID-A>..<OID-B> HEAD -> refs/pull/123/head\n \t + <OID-B>...<OID-A> HEAD -> refs/pull/124/head (forced update)\n \tEOF\n@@ -97,13 +97,13 @@ test_expect_success \"proc-receive: process all refs ($PROTOCOL)\" '\n \tcat >expect <<-EOF &&\n \t<COMMIT-B> refs/heads/bar\n \t<COMMIT-A> refs/heads/baz\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             bar(A)  baz(B)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             bar(A)  baz(B)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL)\" '\n \t(\n \t\tcd \"$upstream\" &&\ndiff --git a/t/t5411/test-0041-process-all-refs--porcelain.sh b/t/t5411/test-0041-process-all-refs--porcelain.sh\nindex 0dd9824616..e21420b60d 100644\n--- a/t/t5411/test-0041-process-all-refs--porcelain.sh\n+++ b/t/t5411/test-0041-process-all-refs--porcelain.sh\n@@ -3,12 +3,12 @@ test_expect_success \"config receive.procReceiveRefs = refs ($PROTOCOL/porcelain)\n \tgit -C \"$upstream\" config --add receive.procReceiveRefs refs\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"setup upstream branches ($PROTOCOL/porcelain)\" '\n \t(\n \t\tcd \"$upstream\" &&\n-\t\tgit update-ref refs/heads/master $B &&\n+\t\tgit update-ref refs/heads/main $B &&\n \t\tgit update-ref refs/heads/foo $A &&\n \t\tgit update-ref refs/heads/bar $A &&\n \t\tgit update-ref refs/heads/baz $A\n@@ -20,13 +20,13 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL/porcelain)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/heads/master\" \\\n+\t\t-r \"ok refs/heads/main\" \\\n \t\t-r \"option fall-through\" \\\n \t\t-r \"ok refs/heads/foo\" \\\n \t\t-r \"option fall-through\" \\\n \t\t-r \"ok refs/heads/bar\" \\\n \t\t-r \"option fall-through\" \\\n-\t\t-r \"ok refs/for/master/topic\" \\\n+\t\t-r \"ok refs/for/main/topic\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\" \\\n@@ -38,15 +38,15 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL/porcelain)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(B)             foo(A)  bar(A))  baz(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push -f      : master(A)             (NULL)  (B)              refs/for/master/topic(A)  refs/for/next/topic(A)\n+# Refs of upstream : main(B)             foo(A)  bar(A))  baz(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push -f      : main(A)             (NULL)  (B)              refs/for/main/topic(A)  refs/for/next/topic(A)\n test_expect_success \"proc-receive: process all refs ($PROTOCOL/porcelain)\" '\n \tgit -C workbench push --porcelain -f origin \\\n-\t\tHEAD:refs/heads/master \\\n+\t\tHEAD:refs/heads/main \\\n \t\t:refs/heads/foo \\\n \t\t$B:refs/heads/bar \\\n-\t\tHEAD:refs/for/master/topic \\\n+\t\tHEAD:refs/for/main/topic \\\n \t\tHEAD:refs/for/next/topic \\\n \t\t>out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n@@ -54,22 +54,22 @@ test_expect_success \"proc-receive: process all refs ($PROTOCOL/porcelain)\" '\n \tremote: # pre-receive hook\n \tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar\n \tremote: pre-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo\n-\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n-\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n+\tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n \tremote: # proc-receive hook\n \tremote: proc-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar\n \tremote: proc-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo\n-\tremote: proc-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n-\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic\n+\tremote: proc-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n+\tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic\n-\tremote: proc-receive> ok refs/heads/master\n+\tremote: proc-receive> ok refs/heads/main\n \tremote: proc-receive> option fall-through\n \tremote: proc-receive> ok refs/heads/foo\n \tremote: proc-receive> option fall-through\n \tremote: proc-receive> ok refs/heads/bar\n \tremote: proc-receive> option fall-through\n-\tremote: proc-receive> ok refs/for/master/topic\n+\tremote: proc-receive> ok refs/for/main/topic\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n@@ -81,13 +81,13 @@ test_expect_success \"proc-receive: process all refs ($PROTOCOL/porcelain)\" '\n \tremote: # post-receive hook\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar\n \tremote: post-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo\n-\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/master\n+\tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/main\n \tremote: post-receive< <COMMIT-A> <COMMIT-B> refs/pull/123/head\n \tremote: post-receive< <COMMIT-B> <COMMIT-A> refs/pull/124/head\n \tTo <URL/of/upstream.git>\n \t     <COMMIT-B>:refs/heads/bar    <OID-A>..<OID-B>\n \t-    :refs/heads/foo    [deleted]\n-\t+    HEAD:refs/heads/master    <OID-B>...<OID-A> (forced update)\n+\t+    HEAD:refs/heads/main    <OID-B>...<OID-A> (forced update)\n \t     HEAD:refs/pull/123/head    <OID-A>..<OID-B>\n \t+    HEAD:refs/pull/124/head    <OID-B>...<OID-A> (forced update)\n \tDone\n@@ -98,13 +98,13 @@ test_expect_success \"proc-receive: process all refs ($PROTOCOL/porcelain)\" '\n \tcat >expect <<-EOF &&\n \t<COMMIT-B> refs/heads/bar\n \t<COMMIT-A> refs/heads/baz\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)             bar(A)  baz(B)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)             bar(A)  baz(B)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"cleanup ($PROTOCOL/porcelain)\" '\n \t(\n \t\tcd \"$upstream\" &&\ndiff --git a/t/t5411/test-0050-proc-receive-refs-with-modifiers.sh b/t/t5411/test-0050-proc-receive-refs-with-modifiers.sh\nindex c22849cbe2..2e29518ec5 100644\n--- a/t/t5411/test-0050-proc-receive-refs-with-modifiers.sh\n+++ b/t/t5411/test-0050-proc-receive-refs-with-modifiers.sh\n@@ -2,7 +2,7 @@ test_expect_success \"config receive.procReceiveRefs with modifiers ($PROTOCOL)\"\n \t(\n \t\tcd \"$upstream\" &&\n \t\tgit config --unset-all receive.procReceiveRefs &&\n-\t\tgit config --add receive.procReceiveRefs m:refs/heads/master &&\n+\t\tgit config --add receive.procReceiveRefs m:refs/heads/main &&\n \t\tgit config --add receive.procReceiveRefs ad:refs/heads &&\n \t\tgit config --add receive.procReceiveRefs \"a!:refs/heads\"\n \t)\n@@ -12,7 +12,7 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/heads/master\" \\\n+\t\t-r \"ok refs/heads/main\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $B\" \\\n@@ -21,22 +21,22 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n-# git push         : master(B)  tags/v123\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n+# git push         : main(B)  tags/v123\n test_expect_success \"proc-receive: update branch and new tag ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\t$B:refs/heads/master \\\n+\t\t$B:refs/heads/main \\\n \t\tv123 >out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: pre-receive< <ZERO-OID> <TAG-v123> refs/tags/v123\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <COMMIT-A> <COMMIT-B> refs/heads/master\n+\tremote: proc-receive< <COMMIT-A> <COMMIT-B> refs/heads/main\n \tremote: proc-receive< <ZERO-OID> <TAG-v123> refs/tags/v123\n-\tremote: proc-receive> ok refs/heads/master\n+\tremote: proc-receive> ok refs/heads/main\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <COMMIT-B>\n@@ -53,20 +53,20 @@ test_expect_success \"proc-receive: update branch and new tag ($PROTOCOL)\" '\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \tEOF\n \ttest_cmp expect actual\n '\n \n-# Refs of upstream : master(A)\n-# Refs of workbench: master(A)  tags/v123\n+# Refs of upstream : main(A)\n+# Refs of workbench: main(A)  tags/v123\n test_expect_success \"setup upstream: create tags/v123 ($PROTOCOL)\" '\n \tgit -C \"$upstream\" update-ref refs/heads/topic $A &&\n \tgit -C \"$upstream\" update-ref refs/tags/v123 $TAG &&\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-A> refs/heads/topic\n \t<TAG-v123> refs/tags/v123\n \tEOF\n@@ -77,7 +77,7 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL)\" '\n \twrite_script \"$upstream/hooks/proc-receive\" <<-EOF\n \tprintf >&2 \"# proc-receive hook\\n\"\n \ttest-tool proc-receive -v \\\n-\t\t-r \"ok refs/heads/master\" \\\n+\t\t-r \"ok refs/heads/main\" \\\n \t\t-r \"option refname refs/pull/123/head\" \\\n \t\t-r \"option old-oid $A\" \\\n \t\t-r \"option new-oid $ZERO_OID\" \\\n@@ -87,26 +87,26 @@ test_expect_success \"setup proc-receive hook ($PROTOCOL)\" '\n \tEOF\n '\n \n-# Refs of upstream : master(A)  topic(A)  tags/v123\n-# Refs of workbench: master(A)            tags/v123\n+# Refs of upstream : main(A)  topic(A)  tags/v123\n+# Refs of workbench: main(A)            tags/v123\n # git push         : NULL       topic(B)  NULL       next(A)\n test_expect_success \"proc-receive: create/delete branch, and delete tag ($PROTOCOL)\" '\n \tgit -C workbench push origin \\\n-\t\t:refs/heads/master \\\n+\t\t:refs/heads/main \\\n \t\t$B:refs/heads/topic \\\n \t\t$A:refs/heads/next \\\n \t\t:refs/tags/v123 >out 2>&1 &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n \tremote: # pre-receive hook\n-\tremote: pre-receive< <COMMIT-A> <ZERO-OID> refs/heads/master\n+\tremote: pre-receive< <COMMIT-A> <ZERO-OID> refs/heads/main\n \tremote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/topic\n \tremote: pre-receive< <TAG-v123> <ZERO-OID> refs/tags/v123\n \tremote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n \tremote: # proc-receive hook\n-\tremote: proc-receive< <COMMIT-A> <ZERO-OID> refs/heads/master\n+\tremote: proc-receive< <COMMIT-A> <ZERO-OID> refs/heads/main\n \tremote: proc-receive< <ZERO-OID> <COMMIT-A> refs/heads/next\n-\tremote: proc-receive> ok refs/heads/master\n+\tremote: proc-receive> ok refs/heads/main\n \tremote: proc-receive> option refname refs/pull/123/head\n \tremote: proc-receive> option old-oid <COMMIT-A>\n \tremote: proc-receive> option new-oid <ZERO-OID>\n@@ -128,7 +128,7 @@ test_expect_success \"proc-receive: create/delete branch, and delete tag ($PROTOC\n \tgit -C \"$upstream\" show-ref >out &&\n \tmake_user_friendly_and_stable_output <out >actual &&\n \tcat >expect <<-EOF &&\n-\t<COMMIT-A> refs/heads/master\n+\t<COMMIT-A> refs/heads/main\n \t<COMMIT-B> refs/heads/topic\n \tEOF\n \ttest_cmp expect actual\n-- \ngitgitgadget\n\n"}]}