{"thread":{"id":"64047","subject":"[PATCH 0/6] breaking changes: switch default initial branch name to \"main\"","startedAt":"2025-08-27T15:25:09Z","lastAt":"2025-09-18T18:42:16Z","messageCount":56,"participants":["Phillip Wood","Junio C Hamano","Johannes Schindelin","brian m. carlson","Patrick Steinhardt","Kristoffer Haugsbakk"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"525039","messageId":"cover.1756308283.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":null,"subject":"[PATCH 0/6] breaking changes: switch default initial branch name to \"main\"","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-08-27T15:24:44Z","receivedAt":"2025-08-27T15:25:09Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nThis series switches the default branch name from \"master\" to \"main\"\nwhen WITH_BREAKING_CHANGES is enabled. We have been warning that the\ndefault name will change since 675704c74dd (init: provide useful advice\nabout init.defaultBranch, 2020-12-11) and the major git forges have all\nswitched their default branch name to \"main\", so I think it makes sense\nto change the default branch name in git to match the wider ecosystem.\n\nThe first five patches update tests that currently require a default\nbranch name different to \"main\". The sixth patch then changes the\ndefault branch \"main\" and removes GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\nwhen WITH_BREAKING_CHANGES is enabled. Patch 2 is quite large but\nis mechanically generated so it should be possible to review it by\nchecking that the changes can be reproduced.\n\nThis is an alternative to changing the branch name now as suggested in\nhttps://lore.kernel.org<pull.1961.git.1756183921623.gitgitgadget@gmail.com\n\nBase-Commit: f814da676ae46aac5be0a98b99373a76dee6cedb\nPublished-As: https://github.com/phillipwood/git/releases/tag/pw%2Finitial-branch-is-main%2Fv1\nView-Changes-At: https://github.com/phillipwood/git/compare/f814da676...487d1a331\nFetch-It-Via: git fetch https://github.com/phillipwood/git pw/initial-branch-is-main/v1\n\n\nPhillip Wood (6):\n  t0018: switch default branch name to main\n  t4013: switch default branch name to main\n  t9902: switch default branch name to main\n  t0613: stop setting default initial branch\n  t1403: remove dependency on GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n  breaking-changes: switch default branch to main\n\n Documentation/BreakingChanges.adoc            |   5 +\n Documentation/git-init.adoc                   |  12 +-\n advice.c                                      |   2 +\n advice.h                                      |   2 +\n ci/run-build-and-tests.sh                     |   1 -\n refs.c                                        |  16 +-\n t/t0001-init.sh                               |   9 +-\n t/t0018-advice.sh                             |   8 +-\n t/t0613-reftable-write-options.sh             |  18 +-\n t/t1403-show-ref.sh                           |   6 +-\n t/t4013-diff-various.sh                       | 228 +++++++++---------\n ...ree_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...iff.diff-tree_--cc_--patch-with-stat_main} |   2 +-\n ...r => diff.diff-tree_--cc_--shortstat_main} |   2 +-\n ...diff.diff-tree_--cc_--stat_--summary_main} |   2 +-\n ...master => diff.diff-tree_--cc_--stat_main} |   2 +-\n ...e_--cc_master => diff.diff-tree_--cc_main} |   2 +-\n ...master => diff.diff-tree_-c_--abbrev_main} |   2 +-\n ...> diff.diff-tree_-c_--stat_--summary_main} |   2 +-\n ...t_master => diff.diff-tree_-c_--stat_main} |   2 +-\n ...-tree_-c_master => diff.diff-tree_-c_main} |   2 +-\n ...-tree_-m_master => diff.diff-tree_-m_main} |   2 +-\n ...-p_-m_master => diff.diff-tree_-p_-m_main} |   2 +-\n t/t4013/diff.diff-tree_-p_main                |   2 +\n t/t4013/diff.diff-tree_-p_master              |   2 -\n t/t4013/diff.diff-tree_main                   |   2 +\n t/t4013/diff.diff-tree_master                 |   2 -\n t/t4013/diff.diff_--dirstat_--cc_main~1_main  |   3 +\n .../diff.diff_--dirstat_--cc_master~1_master  |   3 -\n t/t4013/diff.diff_--dirstat_main~1_main~2     |   3 +\n t/t4013/diff.diff_--dirstat_master~1_master~2 |   3 -\n ...ff.diff_--line-prefix=abc_main_main^_side} |   2 +-\n ...master^_side => diff.diff_main_main^_side} |   2 +-\n ...mat-patch_--attach_--stdout_initial..main} |   2 +-\n ...at-patch_--attach_--stdout_initial..main^} |   2 +-\n ...e_--stdout_--numbered-files_initial..main} |   2 +-\n ...t_--subject-prefix=TESTCASE_initial..main} |   2 +-\n ...mat-patch_--inline_--stdout_initial..main} |   2 +-\n ...at-patch_--inline_--stdout_initial..main^} |   2 +-\n ...t-patch_--inline_--stdout_initial..main^^} |   2 +-\n ...--stdout_--cover-letter_-n_initial..main^} |   2 +-\n ...atch_--stdout_--no-numbered_initial..main} |   2 +-\n ...t-patch_--stdout_--numbered_initial..main} |   2 +-\n ... diff.format-patch_--stdout_initial..main} |   2 +-\n ...diff.format-patch_--stdout_initial..main^} |   2 +-\n ..._-m_-p_master => diff.log_--cc_-m_-p_main} |   2 +-\n t/t4013/diff.log_--decorate=full_--all        |   2 +-\n ..._--decorate=full_--clear-decorations_--all |   2 +-\n ...f.log_--decorate=full_--decorate-all_--all |   2 +-\n t/t4013/diff.log_--decorate_--all             |   2 +-\n ...f.log_--decorate_--clear-decorations_--all |   2 +-\n .../diff.log_--decorate_--decorate-all_--all  |   2 +-\n ... diff.log_--diff-merges=first-parent_main} |   2 +-\n ..._--diff-merges=off_-p_--first-parent_main} |   2 +-\n ..._--first-parent_--diff-merges=off_-p_main} |   2 +-\n ...g_--no-diff-merges_-p_--first-parent_main} |   2 +-\n ..._--patch-with-stat_--summary_main_--_dir_} |   2 +-\n ...master => diff.log_--patch-with-stat_main} |   2 +-\n ...> diff.log_--patch-with-stat_main_--_dir_} |   2 +-\n ...oot_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...g_--root_--patch-with-stat_--summary_main} |   2 +-\n ...=> diff.log_--root_--patch-with-stat_main} |   2 +-\n ...-root_-c_--patch-with-stat_--summary_main} |   2 +-\n ...root_-p_master => diff.log_--root_-p_main} |   2 +-\n ...log_--root_master => diff.log_--root_main} |   2 +-\n ...ter => diff.log_-GF_-p_--pickaxe-all_main} |   2 +-\n ...log_-GF_-p_master => diff.log_-GF_-p_main} |   2 +-\n ...{diff.log_-SF_master => diff.log_-GF_main} |   2 +-\n ...aster => diff.log_-IA_-IB_-I1_-I2_-p_main} |   2 +-\n ...log_-SF_-p_master => diff.log_-SF_-p_main} |   2 +-\n ...{diff.log_-GF_master => diff.log_-SF_main} |   2 +-\n t/t4013/diff.log_-SF_main_--max-count=0       |   2 +\n ...ount=2 => diff.log_-SF_main_--max-count=1} |   2 +-\n t/t4013/diff.log_-SF_main_--max-count=2       |   7 +\n t/t4013/diff.log_-SF_master_--max-count=0     |   2 -\n t/t4013/diff.log_-SF_master_--max-count=1     |   7 -\n ...iff.log_-S_F_master => diff.log_-S_F_main} |   2 +-\n ...cc_-m_-p_master => diff.log_-c_-m_-p_main} |   2 +-\n ...-m_--raw_master => diff.log_-m_--raw_main} |   2 +-\n ..._--stat_master => diff.log_-m_--stat_main} |   2 +-\n ...ter => diff.log_-m_-p_--first-parent_main} |   2 +-\n ...f.log_-m_-p_master => diff.log_-m_-p_main} |   2 +-\n ...ff.log_-p_--diff-merges=first-parent_main} |   2 +-\n ...master => diff.log_-p_--first-parent_main} |   2 +-\n .../{diff.log_-p_master => diff.log_-p_main}  |   2 +-\n t/t4013/{diff.log_master => diff.log_main}    |   2 +-\n ...iff.noellipses-diff-tree_-c_--abbrev_main} |   2 +-\n ...> diff.noellipses-whatchanged_--root_main} |   2 +-\n ...r => diff.noellipses-whatchanged_-SF_main} |   2 +-\n ...aster => diff.noellipses-whatchanged_main} |   2 +-\n ...t_master => diff.show_--first-parent_main} |   2 +-\n ...{diff.show_-c_master => diff.show_-c_main} |   2 +-\n ...{diff.show_-m_master => diff.show_-m_main} |   2 +-\n t/t4013/{diff.show_master => diff.show_main}  |   2 +-\n ..._--patch-with-stat_--summary_main_--_dir_} |   2 +-\n ...> diff.whatchanged_--patch-with-stat_main} |   2 +-\n ...hatchanged_--patch-with-stat_main_--_dir_} |   2 +-\n ...oot_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...d_--root_--patch-with-stat_--summary_main} |   2 +-\n ...whatchanged_--root_--patch-with-stat_main} |   2 +-\n ...-root_-c_--patch-with-stat_--summary_main} |   2 +-\n ...master => diff.whatchanged_--root_-p_main} |   2 +-\n ...ot_master => diff.whatchanged_--root_main} |   2 +-\n ...-p_master => diff.whatchanged_-SF_-p_main} |   2 +-\n ...d_-SF_master => diff.whatchanged_-SF_main} |   2 +-\n ...ged_-p_master => diff.whatchanged_-p_main} |   2 +-\n ...atchanged_master => diff.whatchanged_main} |   2 +-\n t/t9902-completion.sh                         |   6 +-\n t/test-lib.sh                                 |  15 +-\n 109 files changed, 281 insertions(+), 253 deletions(-)\n rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_--summary_master => diff.diff-tree_--cc_--patch-with-stat_--summary_main} (86%)\n rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_master => diff.diff-tree_--cc_--patch-with-stat_main} (89%)\n rename t/t4013/{diff.diff-tree_--cc_--shortstat_master => diff.diff-tree_--cc_--shortstat_main} (65%)\n rename t/t4013/{diff.diff-tree_-c_--stat_--summary_master => diff.diff-tree_--cc_--stat_--summary_main} (71%)\n rename t/t4013/{diff.diff-tree_-c_--stat_master => diff.diff-tree_--cc_--stat_main} (76%)\n rename t/t4013/{diff.diff-tree_--cc_master => diff.diff-tree_--cc_main} (91%)\n rename t/t4013/{diff.diff-tree_-c_--abbrev_master => diff.diff-tree_-c_--abbrev_main} (83%)\n rename t/t4013/{diff.diff-tree_--cc_--stat_--summary_master => diff.diff-tree_-c_--stat_--summary_main} (70%)\n rename t/t4013/{diff.diff-tree_--cc_--stat_master => diff.diff-tree_-c_--stat_main} (75%)\n rename t/t4013/{diff.diff-tree_-c_master => diff.diff-tree_-c_main} (93%)\n rename t/t4013/{diff.diff-tree_-m_master => diff.diff-tree_-m_main} (96%)\n rename t/t4013/{diff.diff-tree_-p_-m_master => diff.diff-tree_-p_-m_main} (97%)\n create mode 100644 t/t4013/diff.diff-tree_-p_main\n delete mode 100644 t/t4013/diff.diff-tree_-p_master\n create mode 100644 t/t4013/diff.diff-tree_main\n delete mode 100644 t/t4013/diff.diff-tree_master\n create mode 100644 t/t4013/diff.diff_--dirstat_--cc_main~1_main\n delete mode 100644 t/t4013/diff.diff_--dirstat_--cc_master~1_master\n create mode 100644 t/t4013/diff.diff_--dirstat_main~1_main~2\n delete mode 100644 t/t4013/diff.diff_--dirstat_master~1_master~2\n rename t/t4013/{diff.diff_--line-prefix=abc_master_master^_side => diff.diff_--line-prefix=abc_main_main^_side} (87%)\n rename t/t4013/{diff.diff_master_master^_side => diff.diff_main_main^_side} (89%)\n rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master => diff.format-patch_--attach_--stdout_initial..main} (98%)\n rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master^ => diff.format-patch_--attach_--stdout_initial..main^} (97%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_--numbered-files_initial..master => diff.format-patch_--inline_--stdout_--numbered-files_initial..main} (99%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master => diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main} (99%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master => diff.format-patch_--inline_--stdout_initial..main} (98%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^ => diff.format-patch_--inline_--stdout_initial..main^} (97%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^^ => diff.format-patch_--inline_--stdout_initial..main^^} (95%)\n rename t/t4013/{diff.format-patch_--stdout_--cover-letter_-n_initial..master^ => diff.format-patch_--stdout_--cover-letter_-n_initial..main^} (96%)\n rename t/t4013/{diff.format-patch_--stdout_--no-numbered_initial..master => diff.format-patch_--stdout_--no-numbered_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_--numbered_initial..master => diff.format-patch_--stdout_--numbered_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_initial..master => diff.format-patch_--stdout_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_initial..master^ => diff.format-patch_--stdout_initial..main^} (96%)\n rename t/t4013/{diff.log_-c_-m_-p_master => diff.log_--cc_-m_-p_main} (99%)\n rename t/t4013/{diff.log_--diff-merges=first-parent_master => diff.log_--diff-merges=first-parent_main} (95%)\n rename t/t4013/{diff.log_--no-diff-merges_-p_--first-parent_master => diff.log_--diff-merges=off_-p_--first-parent_main} (95%)\n rename t/t4013/{diff.log_--first-parent_--diff-merges=off_-p_master => diff.log_--first-parent_--diff-merges=off_-p_main} (95%)\n rename t/t4013/{diff.log_--diff-merges=off_-p_--first-parent_master => diff.log_--no-diff-merges_-p_--first-parent_main} (95%)\n rename t/t4013/{diff.log_--patch-with-stat_--summary_master_--_dir_ => diff.log_--patch-with-stat_--summary_main_--_dir_} (96%)\n rename t/t4013/{diff.log_--patch-with-stat_master => diff.log_--patch-with-stat_main} (98%)\n rename t/t4013/{diff.log_--patch-with-stat_master_--_dir_ => diff.log_--patch-with-stat_main_--_dir_} (96%)\n rename t/t4013/{diff.log_--root_--cc_--patch-with-stat_--summary_master => diff.log_--root_--cc_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_--patch-with-stat_--summary_master => diff.log_--root_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_--patch-with-stat_master => diff.log_--root_--patch-with-stat_main} (98%)\n rename t/t4013/{diff.log_--root_-c_--patch-with-stat_--summary_master => diff.log_--root_-c_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_-p_master => diff.log_--root_-p_main} (98%)\n rename t/t4013/{diff.log_--root_master => diff.log_--root_main} (96%)\n rename t/t4013/{diff.log_-GF_-p_--pickaxe-all_master => diff.log_-GF_-p_--pickaxe-all_main} (90%)\n rename t/t4013/{diff.log_-GF_-p_master => diff.log_-GF_-p_main} (91%)\n rename t/t4013/{diff.log_-SF_master => diff.log_-GF_main} (86%)\n rename t/t4013/{diff.log_-IA_-IB_-I1_-I2_-p_master => diff.log_-IA_-IB_-I1_-I2_-p_main} (97%)\n rename t/t4013/{diff.log_-SF_-p_master => diff.log_-SF_-p_main} (91%)\n rename t/t4013/{diff.log_-GF_master => diff.log_-SF_main} (86%)\n create mode 100644 t/t4013/diff.log_-SF_main_--max-count=0\n rename t/t4013/{diff.log_-SF_master_--max-count=2 => diff.log_-SF_main_--max-count=1} (79%)\n create mode 100644 t/t4013/diff.log_-SF_main_--max-count=2\n delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=0\n delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=1\n rename t/t4013/{diff.log_-S_F_master => diff.log_-S_F_main} (86%)\n rename t/t4013/{diff.log_--cc_-m_-p_master => diff.log_-c_-m_-p_main} (99%)\n rename t/t4013/{diff.log_-m_--raw_master => diff.log_-m_--raw_main} (98%)\n rename t/t4013/{diff.log_-m_--stat_master => diff.log_-m_--stat_main} (98%)\n rename t/t4013/{diff.log_-m_-p_--first-parent_master => diff.log_-m_-p_--first-parent_main} (97%)\n rename t/t4013/{diff.log_-m_-p_master => diff.log_-m_-p_main} (99%)\n rename t/t4013/{diff.log_-p_--diff-merges=first-parent_master => diff.log_-p_--diff-merges=first-parent_main} (97%)\n rename t/t4013/{diff.log_-p_--first-parent_master => diff.log_-p_--first-parent_main} (97%)\n rename t/t4013/{diff.log_-p_master => diff.log_-p_main} (98%)\n rename t/t4013/{diff.log_master => diff.log_main} (97%)\n rename t/t4013/{diff.noellipses-diff-tree_-c_--abbrev_master => diff.noellipses-diff-tree_-c_--abbrev_main} (81%)\n rename t/t4013/{diff.noellipses-whatchanged_--root_master => diff.noellipses-whatchanged_--root_main} (96%)\n rename t/t4013/{diff.noellipses-whatchanged_-SF_master => diff.noellipses-whatchanged_-SF_main} (86%)\n rename t/t4013/{diff.noellipses-whatchanged_master => diff.noellipses-whatchanged_main} (96%)\n rename t/t4013/{diff.show_--first-parent_master => diff.show_--first-parent_main} (92%)\n rename t/t4013/{diff.show_-c_master => diff.show_-c_main} (95%)\n rename t/t4013/{diff.show_-m_master => diff.show_-m_main} (98%)\n rename t/t4013/{diff.show_master => diff.show_main} (96%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ => diff.whatchanged_--patch-with-stat_--summary_main_--_dir_} (94%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_master => diff.whatchanged_--patch-with-stat_main} (97%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_master_--_dir_ => diff.whatchanged_--patch-with-stat_main_--_dir_} (94%)\n rename t/t4013/{diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master => diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_--summary_master => diff.whatchanged_--root_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_master => diff.whatchanged_--root_--patch-with-stat_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_-c_--patch-with-stat_--summary_master => diff.whatchanged_--root_-c_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_-p_master => diff.whatchanged_--root_-p_main} (98%)\n rename t/t4013/{diff.whatchanged_--root_master => diff.whatchanged_--root_main} (97%)\n rename t/t4013/{diff.whatchanged_-SF_-p_master => diff.whatchanged_-SF_-p_main} (89%)\n rename t/t4013/{diff.whatchanged_-SF_master => diff.whatchanged_-SF_main} (86%)\n rename t/t4013/{diff.whatchanged_-p_master => diff.whatchanged_-p_main} (98%)\n rename t/t4013/{diff.whatchanged_master => diff.whatchanged_main} (97%)\n\n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"525040","messageId":"7c20f7693f4518ef79be0a2277515bb00d912213.1756308283.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1756308283.git.phillip.wood@dunelm.org.uk","subject":"[PATCH 1/6] t0018: switch default branch name to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-08-27T15:24:45Z","receivedAt":"2025-08-27T15:25:09Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nThese tests use \"trunk\" as the default branch name but the exact\nname of the branch is incidental to testing if the advice message\nincludes it. Git 3.0 will change the default branch name to \"main\"\nand remove support for GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME so change\nthese test to use \"main\" instead of \"topic\".\n\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n t/t0018-advice.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t0018-advice.sh b/t/t0018-advice.sh\nindex f68e08d0b14..c695ade4be8 100755\n--- a/t/t0018-advice.sh\n+++ b/t/t0018-advice.sh\n@@ -2,7 +2,7 @@\n \n test_description='Test advise_if_enabled functionality'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=trunk\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -33,7 +33,7 @@ test_expect_success 'advice should not be printed when config variable is set to\n \n test_expect_success 'advice should not be printed when --no-advice is used' '\n \tq_to_tab >expect <<-\\EOF &&\n-\tOn branch trunk\n+\tOn branch main\n \n \tNo commits yet\n \n@@ -55,7 +55,7 @@ test_expect_success 'advice should not be printed when --no-advice is used' '\n \n test_expect_success 'advice should not be printed when GIT_ADVICE is set to false' '\n \tq_to_tab >expect <<-\\EOF &&\n-\tOn branch trunk\n+\tOn branch main\n \n \tNo commits yet\n \n@@ -77,7 +77,7 @@ test_expect_success 'advice should not be printed when GIT_ADVICE is set to fals\n \n test_expect_success 'advice should be printed when GIT_ADVICE is set to true' '\n \tq_to_tab >expect <<-\\EOF &&\n-\tOn branch trunk\n+\tOn branch main\n \n \tNo commits yet\n \n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"525041","messageId":"d8a382a79eb4441ab3f8837a50ca072a38fee7c2.1756308283.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1756308283.git.phillip.wood@dunelm.org.uk","subject":"[PATCH 3/6] t9902: switch default branch name to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-08-27T15:24:47Z","receivedAt":"2025-08-27T15:25:11Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nIn preparation for removing GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME in\nGit 3.0 update the bash completion tests that rely on the default\nbranch name being master.\n\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n t/t9902-completion.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\nindex 6650d33fba6..964e1f15693 100755\n--- a/t/t9902-completion.sh\n+++ b/t/t9902-completion.sh\n@@ -11,9 +11,9 @@ test_description='test bash completion'\n # untraceable with such ancient Bash versions.\n test_untraceable=UnfortunatelyYes\n \n-# Override environment and always use master for the default initial branch\n+# Override environment and always use main for the default initial branch\n # name for these tests, so that rev completion candidates are as expected.\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-bash.sh\n@@ -1453,7 +1453,7 @@ test_expect_success 'git bisect - start subcommand arguments before double-dash\n \t\tHEAD Z\n \t\tfinal Z\n \t\tinitial Z\n-\t\tmaster Z\n+\t\tmain Z\n \t\tEOF\n \t)\n '\n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"525045","messageId":"c445cf9c65e2f56fc36cfe1bb012c795c5f5ad7c.1756308283.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1756308283.git.phillip.wood@dunelm.org.uk","subject":"[PATCH 2/6] t4013: switch default branch name to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-08-27T15:24:46Z","receivedAt":"2025-08-27T15:25:11Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nIn preparation for removing TEST_GIT_DEFAULT_INITIAL_BRANCH in Git 3.0\nswitch the default branch name to main.\n\nThe changes here are purely mechanical replacing 'master' with 'main'\n\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n t/t4013-diff-various.sh                       | 228 +++++++++---------\n ...ree_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...iff.diff-tree_--cc_--patch-with-stat_main} |   2 +-\n ...r => diff.diff-tree_--cc_--shortstat_main} |   2 +-\n ...diff.diff-tree_--cc_--stat_--summary_main} |   2 +-\n ...master => diff.diff-tree_--cc_--stat_main} |   2 +-\n ...e_--cc_master => diff.diff-tree_--cc_main} |   2 +-\n ...master => diff.diff-tree_-c_--abbrev_main} |   2 +-\n ...> diff.diff-tree_-c_--stat_--summary_main} |   2 +-\n ...t_master => diff.diff-tree_-c_--stat_main} |   2 +-\n ...-tree_-c_master => diff.diff-tree_-c_main} |   2 +-\n ...-tree_-m_master => diff.diff-tree_-m_main} |   2 +-\n ...-p_-m_master => diff.diff-tree_-p_-m_main} |   2 +-\n t/t4013/diff.diff-tree_-p_main                |   2 +\n t/t4013/diff.diff-tree_-p_master              |   2 -\n t/t4013/diff.diff-tree_main                   |   2 +\n t/t4013/diff.diff-tree_master                 |   2 -\n t/t4013/diff.diff_--dirstat_--cc_main~1_main  |   3 +\n .../diff.diff_--dirstat_--cc_master~1_master  |   3 -\n t/t4013/diff.diff_--dirstat_main~1_main~2     |   3 +\n t/t4013/diff.diff_--dirstat_master~1_master~2 |   3 -\n ...ff.diff_--line-prefix=abc_main_main^_side} |   2 +-\n ...master^_side => diff.diff_main_main^_side} |   2 +-\n ...mat-patch_--attach_--stdout_initial..main} |   2 +-\n ...at-patch_--attach_--stdout_initial..main^} |   2 +-\n ...e_--stdout_--numbered-files_initial..main} |   2 +-\n ...t_--subject-prefix=TESTCASE_initial..main} |   2 +-\n ...mat-patch_--inline_--stdout_initial..main} |   2 +-\n ...at-patch_--inline_--stdout_initial..main^} |   2 +-\n ...t-patch_--inline_--stdout_initial..main^^} |   2 +-\n ...--stdout_--cover-letter_-n_initial..main^} |   2 +-\n ...atch_--stdout_--no-numbered_initial..main} |   2 +-\n ...t-patch_--stdout_--numbered_initial..main} |   2 +-\n ... diff.format-patch_--stdout_initial..main} |   2 +-\n ...diff.format-patch_--stdout_initial..main^} |   2 +-\n ..._-m_-p_master => diff.log_--cc_-m_-p_main} |   2 +-\n t/t4013/diff.log_--decorate=full_--all        |   2 +-\n ..._--decorate=full_--clear-decorations_--all |   2 +-\n ...f.log_--decorate=full_--decorate-all_--all |   2 +-\n t/t4013/diff.log_--decorate_--all             |   2 +-\n ...f.log_--decorate_--clear-decorations_--all |   2 +-\n .../diff.log_--decorate_--decorate-all_--all  |   2 +-\n ... diff.log_--diff-merges=first-parent_main} |   2 +-\n ..._--diff-merges=off_-p_--first-parent_main} |   2 +-\n ..._--first-parent_--diff-merges=off_-p_main} |   2 +-\n ...g_--no-diff-merges_-p_--first-parent_main} |   2 +-\n ..._--patch-with-stat_--summary_main_--_dir_} |   2 +-\n ...master => diff.log_--patch-with-stat_main} |   2 +-\n ...> diff.log_--patch-with-stat_main_--_dir_} |   2 +-\n ...oot_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...g_--root_--patch-with-stat_--summary_main} |   2 +-\n ...=> diff.log_--root_--patch-with-stat_main} |   2 +-\n ...-root_-c_--patch-with-stat_--summary_main} |   2 +-\n ...root_-p_master => diff.log_--root_-p_main} |   2 +-\n ...log_--root_master => diff.log_--root_main} |   2 +-\n ...ter => diff.log_-GF_-p_--pickaxe-all_main} |   2 +-\n ...log_-GF_-p_master => diff.log_-GF_-p_main} |   2 +-\n ...{diff.log_-SF_master => diff.log_-GF_main} |   2 +-\n ...aster => diff.log_-IA_-IB_-I1_-I2_-p_main} |   2 +-\n ...log_-SF_-p_master => diff.log_-SF_-p_main} |   2 +-\n ...{diff.log_-GF_master => diff.log_-SF_main} |   2 +-\n t/t4013/diff.log_-SF_main_--max-count=0       |   2 +\n ...ount=2 => diff.log_-SF_main_--max-count=1} |   2 +-\n t/t4013/diff.log_-SF_main_--max-count=2       |   7 +\n t/t4013/diff.log_-SF_master_--max-count=0     |   2 -\n t/t4013/diff.log_-SF_master_--max-count=1     |   7 -\n ...iff.log_-S_F_master => diff.log_-S_F_main} |   2 +-\n ...cc_-m_-p_master => diff.log_-c_-m_-p_main} |   2 +-\n ...-m_--raw_master => diff.log_-m_--raw_main} |   2 +-\n ..._--stat_master => diff.log_-m_--stat_main} |   2 +-\n ...ter => diff.log_-m_-p_--first-parent_main} |   2 +-\n ...f.log_-m_-p_master => diff.log_-m_-p_main} |   2 +-\n ...ff.log_-p_--diff-merges=first-parent_main} |   2 +-\n ...master => diff.log_-p_--first-parent_main} |   2 +-\n .../{diff.log_-p_master => diff.log_-p_main}  |   2 +-\n t/t4013/{diff.log_master => diff.log_main}    |   2 +-\n ...iff.noellipses-diff-tree_-c_--abbrev_main} |   2 +-\n ...> diff.noellipses-whatchanged_--root_main} |   2 +-\n ...r => diff.noellipses-whatchanged_-SF_main} |   2 +-\n ...aster => diff.noellipses-whatchanged_main} |   2 +-\n ...t_master => diff.show_--first-parent_main} |   2 +-\n ...{diff.show_-c_master => diff.show_-c_main} |   2 +-\n ...{diff.show_-m_master => diff.show_-m_main} |   2 +-\n t/t4013/{diff.show_master => diff.show_main}  |   2 +-\n ..._--patch-with-stat_--summary_main_--_dir_} |   2 +-\n ...> diff.whatchanged_--patch-with-stat_main} |   2 +-\n ...hatchanged_--patch-with-stat_main_--_dir_} |   2 +-\n ...oot_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...d_--root_--patch-with-stat_--summary_main} |   2 +-\n ...whatchanged_--root_--patch-with-stat_main} |   2 +-\n ...-root_-c_--patch-with-stat_--summary_main} |   2 +-\n ...master => diff.whatchanged_--root_-p_main} |   2 +-\n ...ot_master => diff.whatchanged_--root_main} |   2 +-\n ...-p_master => diff.whatchanged_-SF_-p_main} |   2 +-\n ...d_-SF_master => diff.whatchanged_-SF_main} |   2 +-\n ...ged_-p_master => diff.whatchanged_-p_main} |   2 +-\n ...atchanged_master => diff.whatchanged_main} |   2 +-\n 97 files changed, 217 insertions(+), 217 deletions(-)\n rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_--summary_master => diff.diff-tree_--cc_--patch-with-stat_--summary_main} (86%)\n rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_master => diff.diff-tree_--cc_--patch-with-stat_main} (89%)\n rename t/t4013/{diff.diff-tree_--cc_--shortstat_master => diff.diff-tree_--cc_--shortstat_main} (65%)\n rename t/t4013/{diff.diff-tree_-c_--stat_--summary_master => diff.diff-tree_--cc_--stat_--summary_main} (71%)\n rename t/t4013/{diff.diff-tree_-c_--stat_master => diff.diff-tree_--cc_--stat_main} (76%)\n rename t/t4013/{diff.diff-tree_--cc_master => diff.diff-tree_--cc_main} (91%)\n rename t/t4013/{diff.diff-tree_-c_--abbrev_master => diff.diff-tree_-c_--abbrev_main} (83%)\n rename t/t4013/{diff.diff-tree_--cc_--stat_--summary_master => diff.diff-tree_-c_--stat_--summary_main} (70%)\n rename t/t4013/{diff.diff-tree_--cc_--stat_master => diff.diff-tree_-c_--stat_main} (75%)\n rename t/t4013/{diff.diff-tree_-c_master => diff.diff-tree_-c_main} (93%)\n rename t/t4013/{diff.diff-tree_-m_master => diff.diff-tree_-m_main} (96%)\n rename t/t4013/{diff.diff-tree_-p_-m_master => diff.diff-tree_-p_-m_main} (97%)\n create mode 100644 t/t4013/diff.diff-tree_-p_main\n delete mode 100644 t/t4013/diff.diff-tree_-p_master\n create mode 100644 t/t4013/diff.diff-tree_main\n delete mode 100644 t/t4013/diff.diff-tree_master\n create mode 100644 t/t4013/diff.diff_--dirstat_--cc_main~1_main\n delete mode 100644 t/t4013/diff.diff_--dirstat_--cc_master~1_master\n create mode 100644 t/t4013/diff.diff_--dirstat_main~1_main~2\n delete mode 100644 t/t4013/diff.diff_--dirstat_master~1_master~2\n rename t/t4013/{diff.diff_--line-prefix=abc_master_master^_side => diff.diff_--line-prefix=abc_main_main^_side} (87%)\n rename t/t4013/{diff.diff_master_master^_side => diff.diff_main_main^_side} (89%)\n rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master => diff.format-patch_--attach_--stdout_initial..main} (98%)\n rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master^ => diff.format-patch_--attach_--stdout_initial..main^} (97%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_--numbered-files_initial..master => diff.format-patch_--inline_--stdout_--numbered-files_initial..main} (99%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master => diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main} (99%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master => diff.format-patch_--inline_--stdout_initial..main} (98%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^ => diff.format-patch_--inline_--stdout_initial..main^} (97%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^^ => diff.format-patch_--inline_--stdout_initial..main^^} (95%)\n rename t/t4013/{diff.format-patch_--stdout_--cover-letter_-n_initial..master^ => diff.format-patch_--stdout_--cover-letter_-n_initial..main^} (96%)\n rename t/t4013/{diff.format-patch_--stdout_--no-numbered_initial..master => diff.format-patch_--stdout_--no-numbered_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_--numbered_initial..master => diff.format-patch_--stdout_--numbered_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_initial..master => diff.format-patch_--stdout_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_initial..master^ => diff.format-patch_--stdout_initial..main^} (96%)\n rename t/t4013/{diff.log_-c_-m_-p_master => diff.log_--cc_-m_-p_main} (99%)\n rename t/t4013/{diff.log_--diff-merges=first-parent_master => diff.log_--diff-merges=first-parent_main} (95%)\n rename t/t4013/{diff.log_--no-diff-merges_-p_--first-parent_master => diff.log_--diff-merges=off_-p_--first-parent_main} (95%)\n rename t/t4013/{diff.log_--first-parent_--diff-merges=off_-p_master => diff.log_--first-parent_--diff-merges=off_-p_main} (95%)\n rename t/t4013/{diff.log_--diff-merges=off_-p_--first-parent_master => diff.log_--no-diff-merges_-p_--first-parent_main} (95%)\n rename t/t4013/{diff.log_--patch-with-stat_--summary_master_--_dir_ => diff.log_--patch-with-stat_--summary_main_--_dir_} (96%)\n rename t/t4013/{diff.log_--patch-with-stat_master => diff.log_--patch-with-stat_main} (98%)\n rename t/t4013/{diff.log_--patch-with-stat_master_--_dir_ => diff.log_--patch-with-stat_main_--_dir_} (96%)\n rename t/t4013/{diff.log_--root_--cc_--patch-with-stat_--summary_master => diff.log_--root_--cc_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_--patch-with-stat_--summary_master => diff.log_--root_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_--patch-with-stat_master => diff.log_--root_--patch-with-stat_main} (98%)\n rename t/t4013/{diff.log_--root_-c_--patch-with-stat_--summary_master => diff.log_--root_-c_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_-p_master => diff.log_--root_-p_main} (98%)\n rename t/t4013/{diff.log_--root_master => diff.log_--root_main} (96%)\n rename t/t4013/{diff.log_-GF_-p_--pickaxe-all_master => diff.log_-GF_-p_--pickaxe-all_main} (90%)\n rename t/t4013/{diff.log_-GF_-p_master => diff.log_-GF_-p_main} (91%)\n rename t/t4013/{diff.log_-SF_master => diff.log_-GF_main} (86%)\n rename t/t4013/{diff.log_-IA_-IB_-I1_-I2_-p_master => diff.log_-IA_-IB_-I1_-I2_-p_main} (97%)\n rename t/t4013/{diff.log_-SF_-p_master => diff.log_-SF_-p_main} (91%)\n rename t/t4013/{diff.log_-GF_master => diff.log_-SF_main} (86%)\n create mode 100644 t/t4013/diff.log_-SF_main_--max-count=0\n rename t/t4013/{diff.log_-SF_master_--max-count=2 => diff.log_-SF_main_--max-count=1} (79%)\n create mode 100644 t/t4013/diff.log_-SF_main_--max-count=2\n delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=0\n delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=1\n rename t/t4013/{diff.log_-S_F_master => diff.log_-S_F_main} (86%)\n rename t/t4013/{diff.log_--cc_-m_-p_master => diff.log_-c_-m_-p_main} (99%)\n rename t/t4013/{diff.log_-m_--raw_master => diff.log_-m_--raw_main} (98%)\n rename t/t4013/{diff.log_-m_--stat_master => diff.log_-m_--stat_main} (98%)\n rename t/t4013/{diff.log_-m_-p_--first-parent_master => diff.log_-m_-p_--first-parent_main} (97%)\n rename t/t4013/{diff.log_-m_-p_master => diff.log_-m_-p_main} (99%)\n rename t/t4013/{diff.log_-p_--diff-merges=first-parent_master => diff.log_-p_--diff-merges=first-parent_main} (97%)\n rename t/t4013/{diff.log_-p_--first-parent_master => diff.log_-p_--first-parent_main} (97%)\n rename t/t4013/{diff.log_-p_master => diff.log_-p_main} (98%)\n rename t/t4013/{diff.log_master => diff.log_main} (97%)\n rename t/t4013/{diff.noellipses-diff-tree_-c_--abbrev_master => diff.noellipses-diff-tree_-c_--abbrev_main} (81%)\n rename t/t4013/{diff.noellipses-whatchanged_--root_master => diff.noellipses-whatchanged_--root_main} (96%)\n rename t/t4013/{diff.noellipses-whatchanged_-SF_master => diff.noellipses-whatchanged_-SF_main} (86%)\n rename t/t4013/{diff.noellipses-whatchanged_master => diff.noellipses-whatchanged_main} (96%)\n rename t/t4013/{diff.show_--first-parent_master => diff.show_--first-parent_main} (92%)\n rename t/t4013/{diff.show_-c_master => diff.show_-c_main} (95%)\n rename t/t4013/{diff.show_-m_master => diff.show_-m_main} (98%)\n rename t/t4013/{diff.show_master => diff.show_main} (96%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ => diff.whatchanged_--patch-with-stat_--summary_main_--_dir_} (94%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_master => diff.whatchanged_--patch-with-stat_main} (97%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_master_--_dir_ => diff.whatchanged_--patch-with-stat_main_--_dir_} (94%)\n rename t/t4013/{diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master => diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_--summary_master => diff.whatchanged_--root_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_master => diff.whatchanged_--root_--patch-with-stat_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_-c_--patch-with-stat_--summary_master => diff.whatchanged_--root_-c_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_-p_master => diff.whatchanged_--root_-p_main} (98%)\n rename t/t4013/{diff.whatchanged_--root_master => diff.whatchanged_--root_main} (97%)\n rename t/t4013/{diff.whatchanged_-SF_-p_master => diff.whatchanged_-SF_-p_main} (89%)\n rename t/t4013/{diff.whatchanged_-SF_master => diff.whatchanged_-SF_main} (86%)\n rename t/t4013/{diff.whatchanged_-p_master => diff.whatchanged_-p_main} (98%)\n rename t/t4013/{diff.whatchanged_master => diff.whatchanged_main} (97%)\n\ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex cfeec239e09..55a06eadb31 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -5,7 +5,7 @@\n \n test_description='Various diff formatting options'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -70,7 +70,7 @@ test_expect_success setup '\n \tGIT_COMMITTER_DATE=\"2006-06-26 00:04:00 +0000\" &&\n \texport GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit pull -s ours --no-rebase . side &&\n \n \tGIT_AUTHOR_DATE=\"2006-06-26 00:05:00 +0000\" &&\n@@ -95,15 +95,15 @@ test_expect_success setup '\n \ttest_write_lines B A >dir/sub &&\n \tgit add dir/sub &&\n \tgit commit -m \"Rearranged lines in dir/sub\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tGIT_AUTHOR_DATE=\"2006-06-26 00:06:00 +0000\" &&\n \tGIT_COMMITTER_DATE=\"2006-06-26 00:06:00 +0000\" &&\n \texport GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&\n \tgit checkout -b mode initial &&\n \tgit update-index --chmod=+x file0 &&\n \tgit commit -m \"update mode\" &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \n \tGIT_AUTHOR_DATE=\"2006-06-26 00:06:00 +0000\" &&\n \tGIT_COMMITTER_DATE=\"2006-06-26 00:06:00 +0000\" &&\n@@ -112,12 +112,12 @@ test_expect_success setup '\n \tgit update-index --chmod=+x file2 &&\n \tgit commit -m \"update mode (file2)\" &&\n \tgit notes add -m \"note\" &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \n-\t# Same merge as master, but with parents reversed. Hide it in a\n+\t# Same merge as main, but with parents reversed. Hide it in a\n \t# pseudo-ref to avoid impacting tests with --all.\n \tcommit=$(echo reverse |\n-\t\t git commit-tree -p master^2 -p master^1 master^{tree}) &&\n+\t\t git commit-tree -p main^2 -p main^1 main^{tree}) &&\n \tgit update-ref REVERSE $commit &&\n \n \tgit config diff.renames false &&\n@@ -127,15 +127,15 @@ test_expect_success setup '\n \n : <<\\EOF\n ! [initial] Initial\n- * [master] Merge branch 'side'\n+ * [main] Merge branch 'side'\n   ! [rearrange] Rearranged lines in dir/sub\n    ! [side] Side\n ----\n   +  [rearrange] Rearranged lines in dir/sub\n- -   [master] Merge branch 'side'\n+ -   [main] Merge branch 'side'\n  * + [side] Side\n- *   [master^] Third\n- *   [master~2] Second\n+ *   [main^] Third\n+ *   [main~2] Second\n +*++ [initial] Initial\n EOF\n \n@@ -311,64 +311,64 @@ diff-tree initial mode\n diff-tree --stat initial mode\n diff-tree --summary initial mode\n \n-diff-tree master\n-diff-tree -m master\n-diff-tree -p master\n-diff-tree -p -m master\n-diff-tree -c master\n-diff-tree -c --abbrev master\n-:noellipses diff-tree -c --abbrev master\n-diff-tree --cc master\n+diff-tree main\n+diff-tree -m main\n+diff-tree -p main\n+diff-tree -p -m main\n+diff-tree -c main\n+diff-tree -c --abbrev main\n+:noellipses diff-tree -c --abbrev main\n+diff-tree --cc main\n # stat only should show the diffstat with the first parent\n-diff-tree -c --stat master\n-diff-tree --cc --stat master\n-diff-tree -c --stat --summary master\n-diff-tree --cc --stat --summary master\n+diff-tree -c --stat main\n+diff-tree --cc --stat main\n+diff-tree -c --stat --summary main\n+diff-tree --cc --stat --summary main\n # stat summary should show the diffstat and summary with the first parent\n diff-tree -c --stat --summary side\n diff-tree --cc --stat --summary side\n-diff-tree --cc --shortstat master\n+diff-tree --cc --shortstat main\n diff-tree --cc --summary REVERSE\n # improved by Timo's patch\n-diff-tree --cc --patch-with-stat master\n+diff-tree --cc --patch-with-stat main\n # improved by Timo's patch\n-diff-tree --cc --patch-with-stat --summary master\n+diff-tree --cc --patch-with-stat --summary main\n # this is correct\n diff-tree --cc --patch-with-stat --summary side\n \n-log master\n-log -p master\n-log --root master\n-log --root -p master\n-log --patch-with-stat master\n-log --root --patch-with-stat master\n-log --root --patch-with-stat --summary master\n-# improved by Timo's patch\n-log --root -c --patch-with-stat --summary master\n-# improved by Timo's patch\n-log --root --cc --patch-with-stat --summary master\n-log --no-diff-merges -p --first-parent master\n-log --diff-merges=off -p --first-parent master\n-log --first-parent --diff-merges=off -p master\n-log -p --first-parent master\n-log -p --diff-merges=first-parent master\n-log --diff-merges=first-parent master\n-log -m -p --first-parent master\n-log -m -p master\n-log --cc -m -p master\n-log -c -m -p master\n-log -m --raw master\n-log -m --stat master\n-log -SF master\n-log -S F master\n-log -SF -p master\n-log -SF master --max-count=0\n-log -SF master --max-count=1\n-log -SF master --max-count=2\n-log -GF master\n-log -GF -p master\n-log -GF -p --pickaxe-all master\n-log -IA -IB -I1 -I2 -p master\n+log main\n+log -p main\n+log --root main\n+log --root -p main\n+log --patch-with-stat main\n+log --root --patch-with-stat main\n+log --root --patch-with-stat --summary main\n+# improved by Timo's patch\n+log --root -c --patch-with-stat --summary main\n+# improved by Timo's patch\n+log --root --cc --patch-with-stat --summary main\n+log --no-diff-merges -p --first-parent main\n+log --diff-merges=off -p --first-parent main\n+log --first-parent --diff-merges=off -p main\n+log -p --first-parent main\n+log -p --diff-merges=first-parent main\n+log --diff-merges=first-parent main\n+log -m -p --first-parent main\n+log -m -p main\n+log --cc -m -p main\n+log -c -m -p main\n+log -m --raw main\n+log -m --stat main\n+log -SF main\n+log -S F main\n+log -SF -p main\n+log -SF main --max-count=0\n+log -SF main --max-count=1\n+log -SF main --max-count=2\n+log -GF main\n+log -GF -p main\n+log -GF -p --pickaxe-all main\n+log -IA -IB -I1 -I2 -p main\n log --decorate --all\n log --decorate=full --all\n log --decorate --clear-decorations --all\n@@ -377,35 +377,35 @@ log --decorate=full --clear-decorations --all\n rev-list --parents HEAD\n rev-list --children HEAD\n \n-whatchanged master\n-:noellipses whatchanged master\n-whatchanged -p master\n-whatchanged --root master\n-:noellipses whatchanged --root master\n-whatchanged --root -p master\n-whatchanged --patch-with-stat master\n-whatchanged --root --patch-with-stat master\n-whatchanged --root --patch-with-stat --summary master\n-# improved by Timo's patch\n-whatchanged --root -c --patch-with-stat --summary master\n-# improved by Timo's patch\n-whatchanged --root --cc --patch-with-stat --summary master\n-whatchanged -SF master\n-:noellipses whatchanged -SF master\n-whatchanged -SF -p master\n+whatchanged main\n+:noellipses whatchanged main\n+whatchanged -p main\n+whatchanged --root main\n+:noellipses whatchanged --root main\n+whatchanged --root -p main\n+whatchanged --patch-with-stat main\n+whatchanged --root --patch-with-stat main\n+whatchanged --root --patch-with-stat --summary main\n+# improved by Timo's patch\n+whatchanged --root -c --patch-with-stat --summary main\n+# improved by Timo's patch\n+whatchanged --root --cc --patch-with-stat --summary main\n+whatchanged -SF main\n+:noellipses whatchanged -SF main\n+whatchanged -SF -p main\n \n-log --patch-with-stat master -- dir/\n-whatchanged --patch-with-stat master -- dir/\n-log --patch-with-stat --summary master -- dir/\n-whatchanged --patch-with-stat --summary master -- dir/\n+log --patch-with-stat main -- dir/\n+whatchanged --patch-with-stat main -- dir/\n+log --patch-with-stat --summary main -- dir/\n+whatchanged --patch-with-stat --summary main -- dir/\n \n show initial\n show --root initial\n show side\n-show master\n-show -c master\n-show -m master\n-show --first-parent master\n+show main\n+show -c main\n+show -m main\n+show --first-parent main\n show --stat side\n show --stat --summary side\n show --patch-with-stat side\n@@ -414,22 +414,22 @@ show --patch-with-raw side\n show --patch-with-stat --summary side\n \n format-patch --stdout initial..side\n-format-patch --stdout initial..master^\n-format-patch --stdout initial..master\n-format-patch --stdout --no-numbered initial..master\n-format-patch --stdout --numbered initial..master\n+format-patch --stdout initial..main^\n+format-patch --stdout initial..main\n+format-patch --stdout --no-numbered initial..main\n+format-patch --stdout --numbered initial..main\n format-patch --attach --stdout initial..side\n format-patch --attach --stdout --suffix=.diff initial..side\n-format-patch --attach --stdout initial..master^\n-format-patch --attach --stdout initial..master\n+format-patch --attach --stdout initial..main^\n+format-patch --attach --stdout initial..main\n format-patch --inline --stdout initial..side\n-format-patch --inline --stdout initial..master^\n-format-patch --inline --stdout --numbered-files initial..master\n-format-patch --inline --stdout initial..master\n-format-patch --inline --stdout --subject-prefix=TESTCASE initial..master\n+format-patch --inline --stdout initial..main^\n+format-patch --inline --stdout --numbered-files initial..main\n+format-patch --inline --stdout initial..main\n+format-patch --inline --stdout --subject-prefix=TESTCASE initial..main\n config format.subjectprefix DIFFERENT_PREFIX\n-format-patch --inline --stdout initial..master^^\n-format-patch --stdout --cover-letter -n initial..master^\n+format-patch --inline --stdout initial..main^^\n+format-patch --stdout --cover-letter -n initial..main^\n \n diff --abbrev initial..side\n diff -U initial..side\n@@ -448,13 +448,13 @@ diff --name-status dir2 dir\n diff --no-index --name-status dir2 dir\n diff --no-index --name-status -- dir2 dir\n diff --no-index dir dir3\n-diff master master^ side\n+diff main main^ side\n # Can't use spaces...\n-diff --line-prefix=abc master master^ side\n-diff --dirstat master~1 master~2\n+diff --line-prefix=abc main main^ side\n+diff --dirstat main~1 main~2\n diff --dirstat initial rearrange\n diff --dirstat-by-file initial rearrange\n-diff --dirstat --cc master~1 master\n+diff --dirstat --cc main~1 main\n # No-index --abbrev and --no-abbrev\n diff --raw initial\n :noellipses diff --raw initial\n@@ -482,25 +482,25 @@ test_expect_success !WITH_BREAKING_CHANGES 'whatchanged needs --i-still-use-this\n '\n \n test_expect_success 'log -m matches pure log' '\n-\tgit log master >result &&\n+\tgit log main >result &&\n \tprocess_diffs result >expected &&\n \tgit log -m >result &&\n \tprocess_diffs result >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'log --diff-merges=on matches --diff-merges=separate' '\n-\tgit log -p --diff-merges=separate master >result &&\n+\tgit log -p --diff-merges=separate main >result &&\n \tprocess_diffs result >expected &&\n-\tgit log -p --diff-merges=on master >result &&\n+\tgit log -p --diff-merges=on main >result &&\n \tprocess_diffs result >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'log --dd matches --diff-merges=1 -p' '\n-\tgit log --diff-merges=1 -p master >result &&\n+\tgit log --diff-merges=1 -p main >result &&\n \tprocess_diffs result >expected &&\n-\tgit log --dd master >result &&\n+\tgit log --dd main >result &&\n \tprocess_diffs result >actual &&\n \ttest_cmp expected actual\n '\n@@ -511,19 +511,19 @@ test_expect_success 'deny wrong log.diffMerges config' '\n '\n \n test_expect_success 'git config log.diffMerges first-parent' '\n-\tgit log -p --diff-merges=first-parent master >result &&\n+\tgit log -p --diff-merges=first-parent main >result &&\n \tprocess_diffs result >expected &&\n \ttest_config log.diffMerges first-parent &&\n-\tgit log -p --diff-merges=on master >result &&\n+\tgit log -p --diff-merges=on main >result &&\n \tprocess_diffs result >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'git config log.diffMerges first-parent vs -m' '\n-\tgit log -p --diff-merges=first-parent master >result &&\n+\tgit log -p --diff-merges=first-parent main >result &&\n \tprocess_diffs result >expected &&\n \ttest_config log.diffMerges first-parent &&\n-\tgit log -p -m master >result &&\n+\tgit log -p -m main >result &&\n \tprocess_diffs result >actual &&\n \ttest_cmp expected actual\n '\n@@ -572,7 +572,7 @@ test_expect_success 'diff-tree --stdin with log formatting' '\n \tThird\n \tSecond\n \tEOF\n-\tgit rev-list master | git diff-tree --stdin --format=%s -s >actual &&\n+\tgit rev-list main | git diff-tree --stdin --format=%s -s >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -585,16 +585,16 @@ test_expect_success 'diff-tree --stdin with pathspec' '\n \n \tdir/sub\n \tEOF\n-\tgit rev-list master^ |\n+\tgit rev-list main^ |\n \tgit diff-tree -r --stdin --name-only --format=%s dir >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'show A B ... -- <pathspec>' '\n \t# side touches dir/sub, file0, and file3\n-\t# master^ touches dir/sub, and file1\n-\t# master^^ touches dir/sub, file0, and file2\n-\tgit show --name-only --format=\"<%s>\" side master^ master^^ -- dir >actual &&\n+\t# main^ touches dir/sub, and file1\n+\t# main^^ touches dir/sub, file0, and file2\n+\tgit show --name-only --format=\"<%s>\" side main^ main^^ -- dir >actual &&\n \tcat >expect <<-\\EOF &&\n \t<Side>\n \n@@ -610,7 +610,7 @@ test_expect_success 'show A B ... -- <pathspec>' '\n '\n \n test_expect_success 'diff -I<regex>: setup' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_seq 50 >file0 &&\n \tgit commit -m \"Set up -I<regex> test file\" file0 &&\n \ttest_seq 50 | sed -e \"s/13/ten and three/\" -e \"/7\\$/d\" >file0 &&\ndiff --git a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main\nsimilarity index 86%\nrename from t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master\nrename to t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main\nindex 9951e3677d6..af1cf20f4ca 100644\n--- a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc --patch-with-stat --summary master\n+$ git diff-tree --cc --patch-with-stat --summary main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_master b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_main\nsimilarity index 89%\nrename from t/t4013/diff.diff-tree_--cc_--patch-with-stat_master\nrename to t/t4013/diff.diff-tree_--cc_--patch-with-stat_main\nindex db3c0a7b2cc..0ec60420970 100644\n--- a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_master\n+++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc --patch-with-stat master\n+$ git diff-tree --cc --patch-with-stat main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_--cc_--shortstat_master b/t/t4013/diff.diff-tree_--cc_--shortstat_main\nsimilarity index 65%\nrename from t/t4013/diff.diff-tree_--cc_--shortstat_master\nrename to t/t4013/diff.diff-tree_--cc_--shortstat_main\nindex a4ca42df2a4..9a4ef031973 100644\n--- a/t/t4013/diff.diff-tree_--cc_--shortstat_master\n+++ b/t/t4013/diff.diff-tree_--cc_--shortstat_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc --shortstat master\n+$ git diff-tree --cc --shortstat main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  2 files changed, 5 insertions(+)\n $\ndiff --git a/t/t4013/diff.diff-tree_-c_--stat_--summary_master b/t/t4013/diff.diff-tree_--cc_--stat_--summary_main\nsimilarity index 71%\nrename from t/t4013/diff.diff-tree_-c_--stat_--summary_master\nrename to t/t4013/diff.diff-tree_--cc_--stat_--summary_main\nindex 81c3021541b..9db08a4aa96 100644\n--- a/t/t4013/diff.diff-tree_-c_--stat_--summary_master\n+++ b/t/t4013/diff.diff-tree_--cc_--stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -c --stat --summary master\n+$ git diff-tree --cc --stat --summary main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_-c_--stat_master b/t/t4013/diff.diff-tree_--cc_--stat_main\nsimilarity index 76%\nrename from t/t4013/diff.diff-tree_-c_--stat_master\nrename to t/t4013/diff.diff-tree_--cc_--stat_main\nindex 89d59b15480..7ecc67a524e 100644\n--- a/t/t4013/diff.diff-tree_-c_--stat_master\n+++ b/t/t4013/diff.diff-tree_--cc_--stat_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -c --stat master\n+$ git diff-tree --cc --stat main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_--cc_master b/t/t4013/diff.diff-tree_--cc_main\nsimilarity index 91%\nrename from t/t4013/diff.diff-tree_--cc_master\nrename to t/t4013/diff.diff-tree_--cc_main\nindex 5ecb4e14ae4..1a962856ad4 100644\n--- a/t/t4013/diff.diff-tree_--cc_master\n+++ b/t/t4013/diff.diff-tree_--cc_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc master\n+$ git diff-tree --cc main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n diff --cc dir/sub\n index cead32e,7289e35..992913c\ndiff --git a/t/t4013/diff.diff-tree_-c_--abbrev_master b/t/t4013/diff.diff-tree_-c_--abbrev_main\nsimilarity index 83%\nrename from t/t4013/diff.diff-tree_-c_--abbrev_master\nrename to t/t4013/diff.diff-tree_-c_--abbrev_main\nindex b8e4aa25307..039d127cf24 100644\n--- a/t/t4013/diff.diff-tree_-c_--abbrev_master\n+++ b/t/t4013/diff.diff-tree_-c_--abbrev_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -c --abbrev master\n+$ git diff-tree -c --abbrev main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n ::100644 100644 100644 cead32e... 7289e35... 992913c... MM\tdir/sub\n ::100644 100644 100644 b414108... f4615da... 10a8a9f... MM\tfile0\ndiff --git a/t/t4013/diff.diff-tree_--cc_--stat_--summary_master b/t/t4013/diff.diff-tree_-c_--stat_--summary_main\nsimilarity index 70%\nrename from t/t4013/diff.diff-tree_--cc_--stat_--summary_master\nrename to t/t4013/diff.diff-tree_-c_--stat_--summary_main\nindex d019867dd94..05a8d16ba70 100644\n--- a/t/t4013/diff.diff-tree_--cc_--stat_--summary_master\n+++ b/t/t4013/diff.diff-tree_-c_--stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc --stat --summary master\n+$ git diff-tree -c --stat --summary main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_--cc_--stat_master b/t/t4013/diff.diff-tree_-c_--stat_main\nsimilarity index 75%\nrename from t/t4013/diff.diff-tree_--cc_--stat_master\nrename to t/t4013/diff.diff-tree_-c_--stat_main\nindex 40b91796b34..61d9f450dfd 100644\n--- a/t/t4013/diff.diff-tree_--cc_--stat_master\n+++ b/t/t4013/diff.diff-tree_-c_--stat_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc --stat master\n+$ git diff-tree -c --stat main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_-c_master b/t/t4013/diff.diff-tree_-c_main\nsimilarity index 93%\nrename from t/t4013/diff.diff-tree_-c_master\nrename to t/t4013/diff.diff-tree_-c_main\nindex e2d2bb26114..a84e1185cf5 100644\n--- a/t/t4013/diff.diff-tree_-c_master\n+++ b/t/t4013/diff.diff-tree_-c_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -c master\n+$ git diff-tree -c main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n ::100644 100644 100644 cead32e925b1420c84c14cbf7cf755e7e45af8ad 7289e35bff32727c08dda207511bec138fdb9ea5 992913c5aa0a5476d10c49ed0f21fc0c6d1aedf3 MM\tdir/sub\n ::100644 100644 100644 b414108e81e5091fe0974a1858b4d0d22b107f70 f4615da674c09df322d6ba8d6b21ecfb1b1ba510 10a8a9f3657f91a156b9f0184ed79a20adef9f7f MM\tfile0\ndiff --git a/t/t4013/diff.diff-tree_-m_master b/t/t4013/diff.diff-tree_-m_main\nsimilarity index 96%\nrename from t/t4013/diff.diff-tree_-m_master\nrename to t/t4013/diff.diff-tree_-m_main\nindex 6d0a2207fb3..5da1f7f5251 100644\n--- a/t/t4013/diff.diff-tree_-m_master\n+++ b/t/t4013/diff.diff-tree_-m_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -m master\n+$ git diff-tree -m main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n :040000 040000 65f5c9dd60ce3b2b3324b618ac7accf8d912c113 0564e026437809817a64fff393079714b6dd4628 M\tdir\n :100644 100644 b414108e81e5091fe0974a1858b4d0d22b107f70 10a8a9f3657f91a156b9f0184ed79a20adef9f7f M\tfile0\ndiff --git a/t/t4013/diff.diff-tree_-p_-m_master b/t/t4013/diff.diff-tree_-p_-m_main\nsimilarity index 97%\nrename from t/t4013/diff.diff-tree_-p_-m_master\nrename to t/t4013/diff.diff-tree_-p_-m_main\nindex b60bea039d9..29c9fc20b8b 100644\n--- a/t/t4013/diff.diff-tree_-p_-m_master\n+++ b/t/t4013/diff.diff-tree_-p_-m_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -p -m master\n+$ git diff-tree -p -m main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n diff --git a/dir/sub b/dir/sub\n index cead32e..992913c 100644\ndiff --git a/t/t4013/diff.diff-tree_-p_main b/t/t4013/diff.diff-tree_-p_main\nnew file mode 100644\nindex 00000000000..c658062422e\n--- /dev/null\n+++ b/t/t4013/diff.diff-tree_-p_main\n@@ -0,0 +1,2 @@\n+$ git diff-tree -p main\n+$\ndiff --git a/t/t4013/diff.diff-tree_-p_master b/t/t4013/diff.diff-tree_-p_master\ndeleted file mode 100644\nindex b182875fb2f..00000000000\n--- a/t/t4013/diff.diff-tree_-p_master\n+++ /dev/null\n@@ -1,2 +0,0 @@\n-$ git diff-tree -p master\n-$\ndiff --git a/t/t4013/diff.diff-tree_main b/t/t4013/diff.diff-tree_main\nnew file mode 100644\nindex 00000000000..dc5b9fdeb6e\n--- /dev/null\n+++ b/t/t4013/diff.diff-tree_main\n@@ -0,0 +1,2 @@\n+$ git diff-tree main\n+$\ndiff --git a/t/t4013/diff.diff-tree_master b/t/t4013/diff.diff-tree_master\ndeleted file mode 100644\nindex fe9226f8a12..00000000000\n--- a/t/t4013/diff.diff-tree_master\n+++ /dev/null\n@@ -1,2 +0,0 @@\n-$ git diff-tree master\n-$\ndiff --git a/t/t4013/diff.diff_--dirstat_--cc_main~1_main b/t/t4013/diff.diff_--dirstat_--cc_main~1_main\nnew file mode 100644\nindex 00000000000..168a357a02e\n--- /dev/null\n+++ b/t/t4013/diff.diff_--dirstat_--cc_main~1_main\n@@ -0,0 +1,3 @@\n+$ git diff --dirstat --cc main~1 main\n+  40.0% dir/\n+$\ndiff --git a/t/t4013/diff.diff_--dirstat_--cc_master~1_master b/t/t4013/diff.diff_--dirstat_--cc_master~1_master\ndeleted file mode 100644\nindex fba4e34175e..00000000000\n--- a/t/t4013/diff.diff_--dirstat_--cc_master~1_master\n+++ /dev/null\n@@ -1,3 +0,0 @@\n-$ git diff --dirstat --cc master~1 master\n-  40.0% dir/\n-$\ndiff --git a/t/t4013/diff.diff_--dirstat_main~1_main~2 b/t/t4013/diff.diff_--dirstat_main~1_main~2\nnew file mode 100644\nindex 00000000000..68097337089\n--- /dev/null\n+++ b/t/t4013/diff.diff_--dirstat_main~1_main~2\n@@ -0,0 +1,3 @@\n+$ git diff --dirstat main~1 main~2\n+  40.0% dir/\n+$\ndiff --git a/t/t4013/diff.diff_--dirstat_master~1_master~2 b/t/t4013/diff.diff_--dirstat_master~1_master~2\ndeleted file mode 100644\nindex b672e1ca63d..00000000000\n--- a/t/t4013/diff.diff_--dirstat_master~1_master~2\n+++ /dev/null\n@@ -1,3 +0,0 @@\n-$ git diff --dirstat master~1 master~2\n-  40.0% dir/\n-$\ndiff --git a/t/t4013/diff.diff_--line-prefix=abc_master_master^_side b/t/t4013/diff.diff_--line-prefix=abc_main_main^_side\nsimilarity index 87%\nrename from t/t4013/diff.diff_--line-prefix=abc_master_master^_side\nrename to t/t4013/diff.diff_--line-prefix=abc_main_main^_side\nindex 99f91e7f0e3..67a2145a365 100644\n--- a/t/t4013/diff.diff_--line-prefix=abc_master_master^_side\n+++ b/t/t4013/diff.diff_--line-prefix=abc_main_main^_side\n@@ -1,4 +1,4 @@\n-$ git diff --line-prefix=abc master master^ side\n+$ git diff --line-prefix=abc main main^ side\n abcdiff --cc dir/sub\n abcindex cead32e,7289e35..992913c\n abc--- a/dir/sub\ndiff --git a/t/t4013/diff.diff_master_master^_side b/t/t4013/diff.diff_main_main^_side\nsimilarity index 89%\nrename from t/t4013/diff.diff_master_master^_side\nrename to t/t4013/diff.diff_main_main^_side\nindex 50ec9cadd61..ab81ec9e47b 100644\n--- a/t/t4013/diff.diff_master_master^_side\n+++ b/t/t4013/diff.diff_main_main^_side\n@@ -1,4 +1,4 @@\n-$ git diff master master^ side\n+$ git diff main main^ side\n diff --cc dir/sub\n index cead32e,7289e35..992913c\n --- a/dir/sub\ndiff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master b/t/t4013/diff.format-patch_--attach_--stdout_initial..main\nsimilarity index 98%\nrename from t/t4013/diff.format-patch_--attach_--stdout_initial..master\nrename to t/t4013/diff.format-patch_--attach_--stdout_initial..main\nindex 52fedc179e5..9f56380350d 100644\n--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master\n+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --attach --stdout initial..master\n+$ git format-patch --attach --stdout initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main^\nsimilarity index 97%\nrename from t/t4013/diff.format-patch_--attach_--stdout_initial..master^\nrename to t/t4013/diff.format-patch_--attach_--stdout_initial..main^\nindex 1c3cde251b5..80132ea99eb 100644\n--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^\n+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main^\n@@ -1,4 +1,4 @@\n-$ git format-patch --attach --stdout initial..master^\n+$ git format-patch --attach --stdout initial..main^\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main\nsimilarity index 99%\nrename from t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master\nrename to t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main\nindex 02c4db7ec58..8e889090fbe 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --inline --stdout --numbered-files initial..master\n+$ git format-patch --inline --stdout --numbered-files initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main\nsimilarity index 99%\nrename from t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master\nrename to t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main\nindex c7677c5951c..d7d2b12d155 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..master\n+$ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_initial..main\nsimilarity index 98%\nrename from t/t4013/diff.format-patch_--inline_--stdout_initial..master\nrename to t/t4013/diff.format-patch_--inline_--stdout_initial..main\nindex 5b3e34e2c0c..c49c423f82f 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --inline --stdout initial..master\n+$ git format-patch --inline --stdout initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^\nsimilarity index 97%\nrename from t/t4013/diff.format-patch_--inline_--stdout_initial..master^\nrename to t/t4013/diff.format-patch_--inline_--stdout_initial..main^\nindex d13f8a81280..8669dbfe6c9 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^\n@@ -1,4 +1,4 @@\n-$ git format-patch --inline --stdout initial..master^\n+$ git format-patch --inline --stdout initial..main^\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^^\nsimilarity index 95%\nrename from t/t4013/diff.format-patch_--inline_--stdout_initial..master^^\nrename to t/t4013/diff.format-patch_--inline_--stdout_initial..main^^\nindex caec5537de3..b749be58b0a 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^^\n@@ -1,4 +1,4 @@\n-$ git format-patch --inline --stdout initial..master^^\n+$ git format-patch --inline --stdout initial..main^^\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^\nsimilarity index 96%\nrename from t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^\nrename to t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^\nindex 244d964fc67..567f2221982 100644\n--- a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^\n+++ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^\n@@ -1,4 +1,4 @@\n-$ git format-patch --stdout --cover-letter -n initial..master^\n+$ git format-patch --stdout --cover-letter -n initial..main^\n From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001\n From: C O Mitter <committer@example.com>\n Date: Mon, 26 Jun 2006 00:06:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main\nsimilarity index 97%\nrename from t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master\nrename to t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main\nindex bfc287a147d..195b62ea4f5 100644\n--- a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master\n+++ b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --stdout --no-numbered initial..master\n+$ git format-patch --stdout --no-numbered initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--numbered_initial..main\nsimilarity index 97%\nrename from t/t4013/diff.format-patch_--stdout_--numbered_initial..master\nrename to t/t4013/diff.format-patch_--stdout_--numbered_initial..main\nindex 568f6f584e6..0678a38515d 100644\n--- a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master\n+++ b/t/t4013/diff.format-patch_--stdout_--numbered_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --stdout --numbered initial..master\n+$ git format-patch --stdout --numbered initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--stdout_initial..master b/t/t4013/diff.format-patch_--stdout_initial..main\nsimilarity index 97%\nrename from t/t4013/diff.format-patch_--stdout_initial..master\nrename to t/t4013/diff.format-patch_--stdout_initial..main\nindex 5f0352f9f70..b4a6302e7cb 100644\n--- a/t/t4013/diff.format-patch_--stdout_initial..master\n+++ b/t/t4013/diff.format-patch_--stdout_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --stdout initial..master\n+$ git format-patch --stdout initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--stdout_initial..master^ b/t/t4013/diff.format-patch_--stdout_initial..main^\nsimilarity index 96%\nrename from t/t4013/diff.format-patch_--stdout_initial..master^\nrename to t/t4013/diff.format-patch_--stdout_initial..main^\nindex 2ae454d8073..36b32215826 100644\n--- a/t/t4013/diff.format-patch_--stdout_initial..master^\n+++ b/t/t4013/diff.format-patch_--stdout_initial..main^\n@@ -1,4 +1,4 @@\n-$ git format-patch --stdout initial..master^\n+$ git format-patch --stdout initial..main^\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.log_-c_-m_-p_master b/t/t4013/diff.log_--cc_-m_-p_main\nsimilarity index 99%\nrename from t/t4013/diff.log_-c_-m_-p_master\nrename to t/t4013/diff.log_--cc_-m_-p_main\nindex b660f3d5f28..f32746ea3ed 100644\n--- a/t/t4013/diff.log_-c_-m_-p_master\n+++ b/t/t4013/diff.log_--cc_-m_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -c -m -p master\n+$ git log --cc -m -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--decorate=full_--all b/t/t4013/diff.log_--decorate=full_--all\nindex 6b0b334a5d6..c099399525a 100644\n--- a/t/t4013/diff.log_--decorate=full_--all\n+++ b/t/t4013/diff.log_--decorate=full_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate=full_--clear-decorations_--all b/t/t4013/diff.log_--decorate=full_--clear-decorations_--all\nindex 1c030a6554e..c43684e5361 100644\n--- a/t/t4013/diff.log_--decorate=full_--clear-decorations_--all\n+++ b/t/t4013/diff.log_--decorate=full_--clear-decorations_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate=full_--decorate-all_--all b/t/t4013/diff.log_--decorate=full_--decorate-all_--all\nindex d6e79287846..48dca61681c 100644\n--- a/t/t4013/diff.log_--decorate=full_--decorate-all_--all\n+++ b/t/t4013/diff.log_--decorate=full_--decorate-all_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate_--all b/t/t4013/diff.log_--decorate_--all\nindex c7df1f58141..8bbf891f658 100644\n--- a/t/t4013/diff.log_--decorate_--all\n+++ b/t/t4013/diff.log_--decorate_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate_--clear-decorations_--all b/t/t4013/diff.log_--decorate_--clear-decorations_--all\nindex 88be82cce31..86b1353f514 100644\n--- a/t/t4013/diff.log_--decorate_--clear-decorations_--all\n+++ b/t/t4013/diff.log_--decorate_--clear-decorations_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate_--decorate-all_--all b/t/t4013/diff.log_--decorate_--decorate-all_--all\nindex 5d22618bb60..59fb17bfc54 100644\n--- a/t/t4013/diff.log_--decorate_--decorate-all_--all\n+++ b/t/t4013/diff.log_--decorate_--decorate-all_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--diff-merges=first-parent_master b/t/t4013/diff.log_--diff-merges=first-parent_main\nsimilarity index 95%\nrename from t/t4013/diff.log_--diff-merges=first-parent_master\nrename to t/t4013/diff.log_--diff-merges=first-parent_main\nindex fa63a557dd1..bacee621e54 100644\n--- a/t/t4013/diff.log_--diff-merges=first-parent_master\n+++ b/t/t4013/diff.log_--diff-merges=first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log --diff-merges=first-parent master\n+$ git log --diff-merges=first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master b/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_main\nsimilarity index 95%\nrename from t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master\nrename to t/t4013/diff.log_--diff-merges=off_-p_--first-parent_main\nindex 597002232e5..fe180fda3be 100644\n--- a/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master\n+++ b/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log --no-diff-merges -p --first-parent master\n+$ git log --diff-merges=off -p --first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_master b/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_main\nsimilarity index 95%\nrename from t/t4013/diff.log_--first-parent_--diff-merges=off_-p_master\nrename to t/t4013/diff.log_--first-parent_--diff-merges=off_-p_main\nindex 5d7461a167e..dca62d4e608 100644\n--- a/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_master\n+++ b/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_main\n@@ -1,4 +1,4 @@\n-$ git log --first-parent --diff-merges=off -p master\n+$ git log --first-parent --diff-merges=off -p main\n commit 80e25ffa65bcdbe82ef654b4d06dbbde7945c37f\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_master b/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_main\nsimilarity index 95%\nrename from t/t4013/diff.log_--diff-merges=off_-p_--first-parent_master\nrename to t/t4013/diff.log_--no-diff-merges_-p_--first-parent_main\nindex 194e893c94f..0b541180887 100644\n--- a/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_master\n+++ b/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log --diff-merges=off -p --first-parent master\n+$ git log --no-diff-merges -p --first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_\nsimilarity index 96%\nrename from t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_\nrename to t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_\nindex a18f1472a9a..3ed46cc8672 100644\n--- a/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_\n+++ b/t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_\n@@ -1,4 +1,4 @@\n-$ git log --patch-with-stat --summary master -- dir/\n+$ git log --patch-with-stat --summary main -- dir/\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--patch-with-stat_master b/t/t4013/diff.log_--patch-with-stat_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--patch-with-stat_master\nrename to t/t4013/diff.log_--patch-with-stat_main\nindex ae425c46722..2e12b557cb7 100644\n--- a/t/t4013/diff.log_--patch-with-stat_master\n+++ b/t/t4013/diff.log_--patch-with-stat_main\n@@ -1,4 +1,4 @@\n-$ git log --patch-with-stat master\n+$ git log --patch-with-stat main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--patch-with-stat_master_--_dir_ b/t/t4013/diff.log_--patch-with-stat_main_--_dir_\nsimilarity index 96%\nrename from t/t4013/diff.log_--patch-with-stat_master_--_dir_\nrename to t/t4013/diff.log_--patch-with-stat_main_--_dir_\nindex d5207cadf44..d511ea7f6bf 100644\n--- a/t/t4013/diff.log_--patch-with-stat_master_--_dir_\n+++ b/t/t4013/diff.log_--patch-with-stat_main_--_dir_\n@@ -1,4 +1,4 @@\n-$ git log --patch-with-stat master -- dir/\n+$ git log --patch-with-stat main -- dir/\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master\nrename to t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main\nindex 0fc1e8cd71f..3cfd0e64229 100644\n--- a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git log --root --cc --patch-with-stat --summary master\n+$ git log --root --cc --patch-with-stat --summary main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--patch-with-stat_--summary_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--root_--patch-with-stat_--summary_master\nrename to t/t4013/diff.log_--root_--patch-with-stat_--summary_main\nindex dffc09dde9e..9f4d6dfa44e 100644\n--- a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.log_--root_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git log --root --patch-with-stat --summary master\n+$ git log --root --patch-with-stat --summary main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_--patch-with-stat_master b/t/t4013/diff.log_--root_--patch-with-stat_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--root_--patch-with-stat_master\nrename to t/t4013/diff.log_--root_--patch-with-stat_main\nindex 55aa98012de..0d69ae2e11b 100644\n--- a/t/t4013/diff.log_--root_--patch-with-stat_master\n+++ b/t/t4013/diff.log_--root_--patch-with-stat_main\n@@ -1,4 +1,4 @@\n-$ git log --root --patch-with-stat master\n+$ git log --root --patch-with-stat main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master\nrename to t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main\nindex 019d85f7de6..1b71add9dea 100644\n--- a/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git log --root -c --patch-with-stat --summary master\n+$ git log --root -c --patch-with-stat --summary main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_-p_master b/t/t4013/diff.log_--root_-p_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--root_-p_master\nrename to t/t4013/diff.log_--root_-p_main\nindex b42c334439b..04581296ed5 100644\n--- a/t/t4013/diff.log_--root_-p_master\n+++ b/t/t4013/diff.log_--root_-p_main\n@@ -1,4 +1,4 @@\n-$ git log --root -p master\n+$ git log --root -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_master b/t/t4013/diff.log_--root_main\nsimilarity index 96%\nrename from t/t4013/diff.log_--root_master\nrename to t/t4013/diff.log_--root_main\nindex e8f46159da1..d5e90fd6b48 100644\n--- a/t/t4013/diff.log_--root_master\n+++ b/t/t4013/diff.log_--root_main\n@@ -1,4 +1,4 @@\n-$ git log --root master\n+$ git log --root main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-GF_-p_--pickaxe-all_master b/t/t4013/diff.log_-GF_-p_--pickaxe-all_main\nsimilarity index 90%\nrename from t/t4013/diff.log_-GF_-p_--pickaxe-all_master\nrename to t/t4013/diff.log_-GF_-p_--pickaxe-all_main\nindex d36f88098b0..1f7a497c2d7 100644\n--- a/t/t4013/diff.log_-GF_-p_--pickaxe-all_master\n+++ b/t/t4013/diff.log_-GF_-p_--pickaxe-all_main\n@@ -1,4 +1,4 @@\n-$ git log -GF -p --pickaxe-all master\n+$ git log -GF -p --pickaxe-all main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-GF_-p_master b/t/t4013/diff.log_-GF_-p_main\nsimilarity index 91%\nrename from t/t4013/diff.log_-GF_-p_master\nrename to t/t4013/diff.log_-GF_-p_main\nindex 9d93f2c23a8..c80dda41e9f 100644\n--- a/t/t4013/diff.log_-GF_-p_master\n+++ b/t/t4013/diff.log_-GF_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -GF -p master\n+$ git log -GF -p main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-SF_master b/t/t4013/diff.log_-GF_main\nsimilarity index 86%\nrename from t/t4013/diff.log_-SF_master\nrename to t/t4013/diff.log_-GF_main\nindex c1599f2f520..b94a7f78398 100644\n--- a/t/t4013/diff.log_-SF_master\n+++ b/t/t4013/diff.log_-GF_main\n@@ -1,4 +1,4 @@\n-$ git log -SF master\n+$ git log -GF main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master b/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main\nsimilarity index 97%\nrename from t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master\nrename to t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main\nindex 929f35a05b4..67e26b4e547 100644\n--- a/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master\n+++ b/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -IA -IB -I1 -I2 -p master\n+$ git log -IA -IB -I1 -I2 -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-SF_-p_master b/t/t4013/diff.log_-SF_-p_main\nsimilarity index 91%\nrename from t/t4013/diff.log_-SF_-p_master\nrename to t/t4013/diff.log_-SF_-p_main\nindex 5e324389729..fa82ac14908 100644\n--- a/t/t4013/diff.log_-SF_-p_master\n+++ b/t/t4013/diff.log_-SF_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -SF -p master\n+$ git log -SF -p main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-GF_master b/t/t4013/diff.log_-SF_main\nsimilarity index 86%\nrename from t/t4013/diff.log_-GF_master\nrename to t/t4013/diff.log_-SF_main\nindex 4c6708d2d0d..dbf770db49d 100644\n--- a/t/t4013/diff.log_-GF_master\n+++ b/t/t4013/diff.log_-SF_main\n@@ -1,4 +1,4 @@\n-$ git log -GF master\n+$ git log -SF main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-SF_main_--max-count=0 b/t/t4013/diff.log_-SF_main_--max-count=0\nnew file mode 100644\nindex 00000000000..683b17eb998\n--- /dev/null\n+++ b/t/t4013/diff.log_-SF_main_--max-count=0\n@@ -0,0 +1,2 @@\n+$ git log -SF main --max-count=0\n+$\ndiff --git a/t/t4013/diff.log_-SF_master_--max-count=2 b/t/t4013/diff.log_-SF_main_--max-count=1\nsimilarity index 79%\nrename from t/t4013/diff.log_-SF_master_--max-count=2\nrename to t/t4013/diff.log_-SF_main_--max-count=1\nindex a6c55fd4822..2102426f8cc 100644\n--- a/t/t4013/diff.log_-SF_master_--max-count=2\n+++ b/t/t4013/diff.log_-SF_main_--max-count=1\n@@ -1,4 +1,4 @@\n-$ git log -SF master --max-count=2\n+$ git log -SF main --max-count=1\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-SF_main_--max-count=2 b/t/t4013/diff.log_-SF_main_--max-count=2\nnew file mode 100644\nindex 00000000000..23e12a4cbbd\n--- /dev/null\n+++ b/t/t4013/diff.log_-SF_main_--max-count=2\n@@ -0,0 +1,7 @@\n+$ git log -SF main --max-count=2\n+commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n+Author: A U Thor <author@example.com>\n+Date:   Mon Jun 26 00:02:00 2006 +0000\n+\n+    Third\n+$\ndiff --git a/t/t4013/diff.log_-SF_master_--max-count=0 b/t/t4013/diff.log_-SF_master_--max-count=0\ndeleted file mode 100644\nindex c1fc6c87317..00000000000\n--- a/t/t4013/diff.log_-SF_master_--max-count=0\n+++ /dev/null\n@@ -1,2 +0,0 @@\n-$ git log -SF master --max-count=0\n-$\ndiff --git a/t/t4013/diff.log_-SF_master_--max-count=1 b/t/t4013/diff.log_-SF_master_--max-count=1\ndeleted file mode 100644\nindex c981a038147..00000000000\n--- a/t/t4013/diff.log_-SF_master_--max-count=1\n+++ /dev/null\n@@ -1,7 +0,0 @@\n-$ git log -SF master --max-count=1\n-commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n-Author: A U Thor <author@example.com>\n-Date:   Mon Jun 26 00:02:00 2006 +0000\n-\n-    Third\n-$\ndiff --git a/t/t4013/diff.log_-S_F_master b/t/t4013/diff.log_-S_F_main\nsimilarity index 86%\nrename from t/t4013/diff.log_-S_F_master\nrename to t/t4013/diff.log_-S_F_main\nindex 978d2b41188..a75a42e1433 100644\n--- a/t/t4013/diff.log_-S_F_master\n+++ b/t/t4013/diff.log_-S_F_main\n@@ -1,4 +1,4 @@\n-$ git log -S F master\n+$ git log -S F main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--cc_-m_-p_master b/t/t4013/diff.log_-c_-m_-p_main\nsimilarity index 99%\nrename from t/t4013/diff.log_--cc_-m_-p_master\nrename to t/t4013/diff.log_-c_-m_-p_main\nindex 7c217cf348c..427f7324568 100644\n--- a/t/t4013/diff.log_--cc_-m_-p_master\n+++ b/t/t4013/diff.log_-c_-m_-p_main\n@@ -1,4 +1,4 @@\n-$ git log --cc -m -p master\n+$ git log -c -m -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-m_--raw_master b/t/t4013/diff.log_-m_--raw_main\nsimilarity index 98%\nrename from t/t4013/diff.log_-m_--raw_master\nrename to t/t4013/diff.log_-m_--raw_main\nindex cd2ecc46283..31d9bc77073 100644\n--- a/t/t4013/diff.log_-m_--raw_master\n+++ b/t/t4013/diff.log_-m_--raw_main\n@@ -1,4 +1,4 @@\n-$ git log -m --raw master\n+$ git log -m --raw main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-m_--stat_master b/t/t4013/diff.log_-m_--stat_main\nsimilarity index 98%\nrename from t/t4013/diff.log_-m_--stat_master\nrename to t/t4013/diff.log_-m_--stat_main\nindex c7db084fd90..4c8909229bf 100644\n--- a/t/t4013/diff.log_-m_--stat_master\n+++ b/t/t4013/diff.log_-m_--stat_main\n@@ -1,4 +1,4 @@\n-$ git log -m --stat master\n+$ git log -m --stat main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-m_-p_--first-parent_master b/t/t4013/diff.log_-m_-p_--first-parent_main\nsimilarity index 97%\nrename from t/t4013/diff.log_-m_-p_--first-parent_master\nrename to t/t4013/diff.log_-m_-p_--first-parent_main\nindex 7a0073f5296..459e10786b9 100644\n--- a/t/t4013/diff.log_-m_-p_--first-parent_master\n+++ b/t/t4013/diff.log_-m_-p_--first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log -m -p --first-parent master\n+$ git log -m -p --first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-m_-p_master b/t/t4013/diff.log_-m_-p_main\nsimilarity index 99%\nrename from t/t4013/diff.log_-m_-p_master\nrename to t/t4013/diff.log_-m_-p_main\nindex 9ca62a01ed2..07453c56983 100644\n--- a/t/t4013/diff.log_-m_-p_master\n+++ b/t/t4013/diff.log_-m_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -m -p master\n+$ git log -m -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-p_--diff-merges=first-parent_master b/t/t4013/diff.log_-p_--diff-merges=first-parent_main\nsimilarity index 97%\nrename from t/t4013/diff.log_-p_--diff-merges=first-parent_master\nrename to t/t4013/diff.log_-p_--diff-merges=first-parent_main\nindex 9538a275112..264a2f373ec 100644\n--- a/t/t4013/diff.log_-p_--diff-merges=first-parent_master\n+++ b/t/t4013/diff.log_-p_--diff-merges=first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log -p --diff-merges=first-parent master\n+$ git log -p --diff-merges=first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-p_--first-parent_master b/t/t4013/diff.log_-p_--first-parent_main\nsimilarity index 97%\nrename from t/t4013/diff.log_-p_--first-parent_master\nrename to t/t4013/diff.log_-p_--first-parent_main\nindex 28840ebea1e..247980817b5 100644\n--- a/t/t4013/diff.log_-p_--first-parent_master\n+++ b/t/t4013/diff.log_-p_--first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log -p --first-parent master\n+$ git log -p --first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-p_master b/t/t4013/diff.log_-p_main\nsimilarity index 98%\nrename from t/t4013/diff.log_-p_master\nrename to t/t4013/diff.log_-p_main\nindex bf1326dc366..c82b4dbf165 100644\n--- a/t/t4013/diff.log_-p_master\n+++ b/t/t4013/diff.log_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -p master\n+$ git log -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_master b/t/t4013/diff.log_main\nsimilarity index 97%\nrename from t/t4013/diff.log_master\nrename to t/t4013/diff.log_main\nindex a8f6ce5abd6..50401f73e6e 100644\n--- a/t/t4013/diff.log_master\n+++ b/t/t4013/diff.log_main\n@@ -1,4 +1,4 @@\n-$ git log master\n+$ git log main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master b/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main\nsimilarity index 81%\nrename from t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master\nrename to t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main\nindex bb80f013b37..3aa1f80af35 100644\n--- a/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master\n+++ b/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -c --abbrev master\n+$ git diff-tree -c --abbrev main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n ::100644 100644 100644 cead32e 7289e35 992913c MM\tdir/sub\n ::100644 100644 100644 b414108 f4615da 10a8a9f MM\tfile0\ndiff --git a/t/t4013/diff.noellipses-whatchanged_--root_master b/t/t4013/diff.noellipses-whatchanged_--root_main\nsimilarity index 96%\nrename from t/t4013/diff.noellipses-whatchanged_--root_master\nrename to t/t4013/diff.noellipses-whatchanged_--root_main\nindex c2cfd4e7292..2bec0558356 100644\n--- a/t/t4013/diff.noellipses-whatchanged_--root_master\n+++ b/t/t4013/diff.noellipses-whatchanged_--root_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root master\n+$ git whatchanged --root main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.noellipses-whatchanged_-SF_master b/t/t4013/diff.noellipses-whatchanged_-SF_main\nsimilarity index 86%\nrename from t/t4013/diff.noellipses-whatchanged_-SF_master\nrename to t/t4013/diff.noellipses-whatchanged_-SF_main\nindex b36ce5886e0..0c1476d19eb 100644\n--- a/t/t4013/diff.noellipses-whatchanged_-SF_master\n+++ b/t/t4013/diff.noellipses-whatchanged_-SF_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged -SF master\n+$ git whatchanged -SF main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.noellipses-whatchanged_master b/t/t4013/diff.noellipses-whatchanged_main\nsimilarity index 96%\nrename from t/t4013/diff.noellipses-whatchanged_master\nrename to t/t4013/diff.noellipses-whatchanged_main\nindex 55e500f2edb..c48d2851aab 100644\n--- a/t/t4013/diff.noellipses-whatchanged_master\n+++ b/t/t4013/diff.noellipses-whatchanged_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged master\n+$ git whatchanged main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.show_--first-parent_master b/t/t4013/diff.show_--first-parent_main\nsimilarity index 92%\nrename from t/t4013/diff.show_--first-parent_master\nrename to t/t4013/diff.show_--first-parent_main\nindex 3dcbe473a0d..480502d65c2 100644\n--- a/t/t4013/diff.show_--first-parent_master\n+++ b/t/t4013/diff.show_--first-parent_main\n@@ -1,4 +1,4 @@\n-$ git show --first-parent master\n+$ git show --first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.show_-c_master b/t/t4013/diff.show_-c_main\nsimilarity index 95%\nrename from t/t4013/diff.show_-c_master\nrename to t/t4013/diff.show_-c_main\nindex 81aba8da96c..74ef8bc96b2 100644\n--- a/t/t4013/diff.show_-c_master\n+++ b/t/t4013/diff.show_-c_main\n@@ -1,4 +1,4 @@\n-$ git show -c master\n+$ git show -c main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.show_-m_master b/t/t4013/diff.show_-m_main\nsimilarity index 98%\nrename from t/t4013/diff.show_-m_master\nrename to t/t4013/diff.show_-m_main\nindex 4ea2ee453d5..8fd56736d97 100644\n--- a/t/t4013/diff.show_-m_master\n+++ b/t/t4013/diff.show_-m_main\n@@ -1,4 +1,4 @@\n-$ git show -m master\n+$ git show -m main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.show_master b/t/t4013/diff.show_main\nsimilarity index 96%\nrename from t/t4013/diff.show_master\nrename to t/t4013/diff.show_main\nindex fb08ce0e46d..630b52a95ef 100644\n--- a/t/t4013/diff.show_master\n+++ b/t/t4013/diff.show_main\n@@ -1,4 +1,4 @@\n-$ git show master\n+$ git show main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_\nsimilarity index 94%\nrename from t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_\nrename to t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_\nindex c8b6af2f438..ce0754d556e 100644\n--- a/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_\n+++ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_\n@@ -1,4 +1,4 @@\n-$ git whatchanged --patch-with-stat --summary master -- dir/\n+$ git whatchanged --patch-with-stat --summary main -- dir/\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--patch-with-stat_master b/t/t4013/diff.whatchanged_--patch-with-stat_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--patch-with-stat_master\nrename to t/t4013/diff.whatchanged_--patch-with-stat_main\nindex 1ac431ba921..aabccf39a53 100644\n--- a/t/t4013/diff.whatchanged_--patch-with-stat_master\n+++ b/t/t4013/diff.whatchanged_--patch-with-stat_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --patch-with-stat master\n+$ git whatchanged --patch-with-stat main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_ b/t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_\nsimilarity index 94%\nrename from t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_\nrename to t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_\nindex b30c28588f9..c05a0e81496 100644\n--- a/t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_\n+++ b/t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_\n@@ -1,4 +1,4 @@\n-$ git whatchanged --patch-with-stat master -- dir/\n+$ git whatchanged --patch-with-stat main -- dir/\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master\nrename to t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main\nindex 30aae7817b9..1f74b1b5487 100644\n--- a/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root --cc --patch-with-stat --summary master\n+$ git whatchanged --root --cc --patch-with-stat --summary main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master\nrename to t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main\nindex db90e515254..80d98121511 100644\n--- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root --patch-with-stat --summary master\n+$ git whatchanged --root --patch-with-stat --summary main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--root_--patch-with-stat_master\nrename to t/t4013/diff.whatchanged_--root_--patch-with-stat_main\nindex 9a6cc92ce7d..c0b9082a2c8 100644\n--- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master\n+++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root --patch-with-stat master\n+$ git whatchanged --root --patch-with-stat main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master\nrename to t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main\nindex d1d32bd34c3..0002c6912e1 100644\n--- a/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root -c --patch-with-stat --summary master\n+$ git whatchanged --root -c --patch-with-stat --summary main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.whatchanged_--root_-p_master b/t/t4013/diff.whatchanged_--root_-p_main\nsimilarity index 98%\nrename from t/t4013/diff.whatchanged_--root_-p_master\nrename to t/t4013/diff.whatchanged_--root_-p_main\nindex ebf1f0661e0..39f3e2be746 100644\n--- a/t/t4013/diff.whatchanged_--root_-p_master\n+++ b/t/t4013/diff.whatchanged_--root_-p_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root -p master\n+$ git whatchanged --root -p main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--root_master b/t/t4013/diff.whatchanged_--root_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--root_master\nrename to t/t4013/diff.whatchanged_--root_main\nindex a405cb61388..36f4d6697f5 100644\n--- a/t/t4013/diff.whatchanged_--root_master\n+++ b/t/t4013/diff.whatchanged_--root_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root master\n+$ git whatchanged --root main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_-SF_-p_master b/t/t4013/diff.whatchanged_-SF_-p_main\nsimilarity index 89%\nrename from t/t4013/diff.whatchanged_-SF_-p_master\nrename to t/t4013/diff.whatchanged_-SF_-p_main\nindex f39da848228..0e2e67c0df8 100644\n--- a/t/t4013/diff.whatchanged_-SF_-p_master\n+++ b/t/t4013/diff.whatchanged_-SF_-p_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged -SF -p master\n+$ git whatchanged -SF -p main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_-SF_master b/t/t4013/diff.whatchanged_-SF_main\nsimilarity index 86%\nrename from t/t4013/diff.whatchanged_-SF_master\nrename to t/t4013/diff.whatchanged_-SF_main\nindex 0499321d0eb..34c6bf6b950 100644\n--- a/t/t4013/diff.whatchanged_-SF_master\n+++ b/t/t4013/diff.whatchanged_-SF_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged -SF master\n+$ git whatchanged -SF main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_-p_master b/t/t4013/diff.whatchanged_-p_main\nsimilarity index 98%\nrename from t/t4013/diff.whatchanged_-p_master\nrename to t/t4013/diff.whatchanged_-p_main\nindex f18d43209c0..18f3bdeef48 100644\n--- a/t/t4013/diff.whatchanged_-p_master\n+++ b/t/t4013/diff.whatchanged_-p_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged -p master\n+$ git whatchanged -p main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_master b/t/t4013/diff.whatchanged_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_master\nrename to t/t4013/diff.whatchanged_main\nindex cd3bcc2c726..d6c83ed8b03 100644\n--- a/t/t4013/diff.whatchanged_master\n+++ b/t/t4013/diff.whatchanged_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged master\n+$ git whatchanged main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"525042","messageId":"bbf79dd64fef485b75bf0fbb37322a6cff7df7f8.1756308283.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1756308283.git.phillip.wood@dunelm.org.uk","subject":"[PATCH 4/6] t0613: stop setting default initial branch","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-08-27T15:24:48Z","receivedAt":"2025-08-27T15:25:12Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nAs the tests are all run in separate repositories, set the branch\nname to \"master\" when creating the repository for the tests where\nthe result depends on the branch name. This is in preparation for\nremoving GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME in Git 3.0.\n\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n t/t0613-reftable-write-options.sh | 18 +++++++-----------\n 1 file changed, 7 insertions(+), 11 deletions(-)\n\ndiff --git a/t/t0613-reftable-write-options.sh b/t/t0613-reftable-write-options.sh\nindex d77e601111f..b547e12d66d 100755\n--- a/t/t0613-reftable-write-options.sh\n+++ b/t/t0613-reftable-write-options.sh\n@@ -11,16 +11,12 @@ export GIT_TEST_REFTABLE_AUTOCOMPACTION\n # Block sizes depend on the hash function, so we force SHA1 here.\n GIT_TEST_DEFAULT_HASH=sha1\n export GIT_TEST_DEFAULT_HASH\n-# Block sizes also depend on the actual refs we write, so we force \"master\" to\n-# be the default initial branch name.\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n \n test_expect_success 'default write options' '\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tgit init --initial-branch master repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n@@ -43,7 +39,7 @@ test_expect_success 'default write options' '\n test_expect_success 'disabled reflog writes no log blocks' '\n \ttest_config_global core.logAllRefUpdates false &&\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tgit init --initial-branch master repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n@@ -62,7 +58,7 @@ test_expect_success 'disabled reflog writes no log blocks' '\n \n test_expect_success 'many refs results in multiple blocks' '\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tgit init --initial-branch master repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n@@ -115,7 +111,7 @@ test_expect_success 'tiny block size leads to error' '\n test_expect_success 'small block size leads to multiple ref blocks' '\n \ttest_config_global core.logAllRefUpdates false &&\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tgit init --initial-branch master repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit A &&\n@@ -172,7 +168,7 @@ test_expect_success 'block size exceeding maximum supported size' '\n \n test_expect_success 'restart interval at every single record' '\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tgit init --initial-branch master repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n@@ -212,7 +208,7 @@ test_expect_success 'restart interval exceeding maximum supported interval' '\n test_expect_success 'object index gets written by default with ref index' '\n \ttest_config_global core.logAllRefUpdates false &&\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tgit init --initial-branch master repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n@@ -247,7 +243,7 @@ test_expect_success 'object index gets written by default with ref index' '\n test_expect_success 'object index can be disabled' '\n \ttest_config_global core.logAllRefUpdates false &&\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tgit init --initial-branch master repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"525043","messageId":"a46c0dd25a63c2e7520a0aada691334bfd6b819f.1756308283.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1756308283.git.phillip.wood@dunelm.org.uk","subject":"[PATCH 5/6] t1403: remove dependency on GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-08-27T15:24:49Z","receivedAt":"2025-08-27T15:25:13Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nSome of the tests use GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME when\nchecking if a ref exists. However, as that variable is always set to\n\"main\" at the start of the test file, we can hard code the name in the\ntests in preparation for removing GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\nin Git 3.0.\n\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n t/t1403-show-ref.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t1403-show-ref.sh b/t/t1403-show-ref.sh\nindex 9da3650e91b..7b83daeaa32 100755\n--- a/t/t1403-show-ref.sh\n+++ b/t/t1403-show-ref.sh\n@@ -229,15 +229,15 @@ test_expect_success 'show-ref sub-modes are mutually exclusive' '\n '\n \n test_expect_success '--exists with existing reference' '\n-\tgit show-ref --exists refs/heads/$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\tgit show-ref --exists refs/heads/main\n '\n \n test_expect_success '--exists with missing reference' '\n \ttest_expect_code 2 git show-ref --exists refs/heads/does-not-exist\n '\n \n test_expect_success '--exists does not use DWIM' '\n-\ttest_expect_code 2 git show-ref --exists $GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 2>err &&\n+\ttest_expect_code 2 git show-ref --exists main 2>err &&\n \tgrep \"reference does not exist\" err\n '\n \n@@ -254,7 +254,7 @@ test_expect_success '--exists with bad reference name' '\n \n test_expect_success '--exists with arbitrary symref' '\n \ttest_when_finished \"git symbolic-ref -d refs/symref\" &&\n-\tgit symbolic-ref refs/symref refs/heads/$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME &&\n+\tgit symbolic-ref refs/symref refs/heads/main &&\n \tgit show-ref --exists refs/symref\n '\n \n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"525044","messageId":"487d1a33130cb2fafadcf98da00a332a7408a0e8.1756308283.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1756308283.git.phillip.wood@dunelm.org.uk","subject":"[PATCH 6/6] breaking-changes: switch default branch to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-08-27T15:24:50Z","receivedAt":"2025-08-27T15:25:14Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nSince 1296cbe4b46 (init: document `init.defaultBranch` better,\n2020-12-11) \"git-init.adoc\" has advertized that the default name\nof the initial branch may change in the future. The name \"main\"\nis chosen to match the default used by the big git forge web sites.\n\nThe advice printed when init.defaultBranch is not set is\nupdated to say that the default will change to \"main\" in Git\n3.0. Building with WITH_BREAKING_CHANGES enabled removes the advice,\nchanges the default branch name is \"main\" and removes support for\nGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME. The code in guess_remote_head()\nthat looks for \"refs/heads/master\" is left unchanged as that is only\ncalled when the remote server does not support the symref capability\nin the v0 protocol or the symref extension to the ls-refs list in the\nv2 protocol. Such an old server is more likely to be using \"master\"\nas the default branch name.\n\nWith the exception of the \"git-init.adoc\" the documentation is left\nunchanged. I had hoped to parameterize the name of the default branch\nby using an asciidoc attribute. Unfortunately attribute expansion\nis inhibited by backticks and we use backticks to mark up ref names\nso that idea does not work. As the changes to git-init.adoc show\ninserting ifdef's around each instance of the branch name \"master\"\nis cumbersome and makes the documentation sources harder to read.\n\nApart from \"git-init.adoc\" there are some other files where \"master\" is\nused as the name of the initial branch rather than as an example of a\nbranch name such as \"user-manual.adoc\" and \"gitcore-tutorial.adoc\". The\nname appears a lot in those so updating it with ifdef's is not really\npractical. We can update that document in the 3.0 release cycle. The\nother documentation where master is used as an example branch name\ncan be gradually converted over time.\n\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n Documentation/BreakingChanges.adoc |  5 +++++\n Documentation/git-init.adoc        | 12 +++++++++---\n advice.c                           |  2 ++\n advice.h                           |  2 ++\n ci/run-build-and-tests.sh          |  1 -\n refs.c                             | 16 +++++++++++++---\n t/t0001-init.sh                    |  9 +++++----\n t/test-lib.sh                      | 15 +++++++++++----\n 8 files changed, 47 insertions(+), 15 deletions(-)\n\ndiff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc\nindex f8d2eba061c..93922299321 100644\n--- a/Documentation/BreakingChanges.adoc\n+++ b/Documentation/BreakingChanges.adoc\n@@ -165,6 +165,11 @@ A prerequisite for this change is that the ecosystem is ready to support the\n \"reftable\" format. Most importantly, alternative implementations of Git like\n JGit, libgit2 and Gitoxide need to support it.\n \n+* The default branch name will be `main`. We have been warning that the default\n+  name will change since 675704c74dd (init: provide useful advice about\n+  init.defaultBranch, 2020-12-11). The new name matches the default branch name\n+  used by many of the big git forges.\n+\n === Removals\n \n * Support for grafting commits has long been superseded by git-replace(1).\ndiff --git a/Documentation/git-init.adoc b/Documentation/git-init.adoc\nindex a0dffba665f..39d4db6bccb 100644\n--- a/Documentation/git-init.adoc\n+++ b/Documentation/git-init.adoc\n@@ -77,9 +77,15 @@ If this is a reinitialization, the repository will be moved to the specified pat\n `-b <branch-name>`::\n `--initial-branch=<branch-name>`::\n Use _<branch-name>_ for the initial branch in the newly created\n-repository.  If not specified, fall back to the default name (currently\n-`master`, but this is subject to change in the future; the name can be\n-customized via the `init.defaultBranch` configuration variable).\n+repository.  If not specified, fall back to the default name\n+ifndef::with-breaking-changes[]\n+(currently `master`, but this will change to `main` when Git 3.0 is released).\n+endif::with-breaking-changes[]\n+ifdef::with-breaking-changes[]\n+(`main`).\n+endif::with-breaking-changes[]\n+The default name can be customized via the `init.defaultBranch` configuration\n+variable.\n \n `--shared[=(false|true|umask|group|all|world|everybody|<perm>)]`::\n \ndiff --git a/advice.c b/advice.c\nindex e5f0ff84491..48c49ee4145 100644\n--- a/advice.c\n+++ b/advice.c\n@@ -51,7 +51,9 @@ static struct {\n \t[ADVICE_AM_WORK_DIR] \t\t\t\t= { \"amWorkDir\" },\n \t[ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] \t= { \"checkoutAmbiguousRemoteBranchName\" },\n \t[ADVICE_COMMIT_BEFORE_MERGE]\t\t\t= { \"commitBeforeMerge\" },\n+#ifndef WITH_BREAKING_CHANGES\n \t[ADVICE_DEFAULT_BRANCH_NAME]\t\t\t= { \"defaultBranchName\" },\n+#endif /* WITH_BREAKING_CHANGES */\n \t[ADVICE_DETACHED_HEAD]\t\t\t\t= { \"detachedHead\" },\n \t[ADVICE_DIVERGING]\t\t\t\t= { \"diverging\" },\n \t[ADVICE_FETCH_SET_HEAD_WARN]\t\t\t= { \"fetchRemoteHEADWarn\" },\ndiff --git a/advice.h b/advice.h\nindex 727dcecf4a3..fc1dc872049 100644\n--- a/advice.h\n+++ b/advice.h\n@@ -18,7 +18,9 @@ enum advice_type {\n \tADVICE_AM_WORK_DIR,\n \tADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME,\n \tADVICE_COMMIT_BEFORE_MERGE,\n+#ifndef WITH_BREAKING_CHANGES\n \tADVICE_DEFAULT_BRANCH_NAME,\n+#endif /* WITH_BREAKING_CHANGES */\n \tADVICE_DETACHED_HEAD,\n \tADVICE_DIVERGING,\n \tADVICE_FETCH_SET_HEAD_WARN,\ndiff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh\nindex 01823fd0f14..a21834043f3 100755\n--- a/ci/run-build-and-tests.sh\n+++ b/ci/run-build-and-tests.sh\n@@ -9,7 +9,6 @@ run_tests=t\n \n case \"$jobname\" in\n linux-breaking-changes)\n-\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport WITH_BREAKING_CHANGES=YesPlease\n \t;;\n linux-TEST-vars)\ndiff --git a/refs.c b/refs.c\nindex 4ff55cf24f6..e73f63ff6b8 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -627,10 +627,12 @@ void expand_ref_prefix(struct strvec *prefixes, const char *prefix)\n \t\tstrvec_pushf(prefixes, *p, len, prefix);\n }\n \n+#ifndef WITH_BREAKING_CHANGES\n static const char default_branch_name_advice[] = N_(\n \"Using '%s' as the name for the initial branch. This default branch name\\n\"\n-\"is subject to change. To configure the initial branch name to use in all\\n\"\n-\"of your new repositories, which will suppress this warning, call:\\n\"\n+\"will change to \\\"main\\\" in Git 3.0. To configure the initial branch name\\n\"\n+\"to use in all of your new repositories, which will suppress this warning,\\n\"\n+\"call:\\n\"\n \"\\n\"\n \"\\tgit config --global init.defaultBranch <name>\\n\"\n \"\\n\"\n@@ -639,24 +641,32 @@ static const char default_branch_name_advice[] = N_(\n \"\\n\"\n \"\\tgit branch -m <name>\\n\"\n );\n+#endif /* WITH_BREAKING_CHANGES */\n \n char *repo_default_branch_name(struct repository *r, int quiet)\n {\n \tconst char *config_key = \"init.defaultbranch\";\n \tconst char *config_display_key = \"init.defaultBranch\";\n \tchar *ret = NULL, *full_ref;\n+#ifndef WITH_BREAKING_CHANGES\n \tconst char *env = getenv(\"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\");\n \n \tif (env && *env)\n \t\tret = xstrdup(env);\n-\telse if (repo_config_get_string(r, config_key, &ret) < 0)\n+#endif /* WITH_BREAKING_CHANGES */\n+\tif (!ret && repo_config_get_string(r, config_key, &ret) < 0)\n \t\tdie(_(\"could not retrieve `%s`\"), config_display_key);\n \n \tif (!ret) {\n+#ifdef WITH_BREAKING_CHANGES\n+\t\tret = xstrdup(\"main\");\n+\t\t(void) quiet; /* Silence -Wunused-parameter */\n+#else\n \t\tret = xstrdup(\"master\");\n \t\tif (!quiet)\n \t\t\tadvise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME,\n \t\t\t\t\t  _(default_branch_name_advice), ret);\n+#endif /* WITH_BREAKING_CHANGES */\n \t}\n \n \tfull_ref = xstrfmt(\"refs/heads/%s\", ret);\ndiff --git a/t/t0001-init.sh b/t/t0001-init.sh\nindex f593c536874..7223a98773d 100755\n--- a/t/t0001-init.sh\n+++ b/t/t0001-init.sh\n@@ -868,7 +868,7 @@ test_expect_success 'overridden default initial branch name (config)' '\n \tgrep nmb actual\n '\n \n-test_expect_success 'advice on unconfigured init.defaultBranch' '\n+test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' '\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \\\n \t\tinit unconfigured-default-branch-name 2>err &&\n \ttest_decode_color <err >decoded &&\n@@ -883,16 +883,17 @@ test_expect_success 'advice on unconfigured init.defaultBranch disabled' '\n \ttest_grep ! \"hint: \" err\n '\n \n-test_expect_success 'overridden default main branch name (env)' '\n+test_expect_success !WITH_BREAKING_CHANGES 'overridden default main branch name (env)' '\n \ttest_config_global init.defaultBranch nmb &&\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=env git init main-branch-env &&\n \tgit -C main-branch-env symbolic-ref HEAD >actual &&\n \tgrep env actual\n '\n \n test_expect_success 'invalid default branch name' '\n-\ttest_must_fail env GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=\"with space\" \\\n-\t\tgit init initial-branch-invalid 2>err &&\n+\ttest_must_fail env GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \\\n+\t\tgit -c init.defaultBranch=\"with space\" \\\n+\t\t\tinit initial-branch-invalid 2>err &&\n \ttest_grep \"invalid branch name\" err\n '\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 621cd31ae1d..ec6b8ebcabb 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -127,10 +127,17 @@ then\n \texport GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS\n fi\n \n-# Explicitly set the default branch name for testing, to avoid the\n-# transitory \"git init\" warning under --verbose.\n-: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master}\n-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+if test -z \"$WITH_BREAKING_CHANGES\"\n+then\n+\t# Explicitly set the default branch name for testing, to avoid the\n+\t# transitory \"git init\" warning under --verbose.\n+\t: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master}\n+\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+else\n+\t# Unset the default branch name that is set in many test scripts\n+\t# before sourcing this file.\n+\tunset GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+fi\n \n ################################################################\n # It appears that people try to run tests without building...\n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"525065","messageId":"xmqq5xe81y0i.fsf@gitster.g","threadId":"64047","inReplyTo":"7c20f7693f4518ef79be0a2277515bb00d912213.1756308283.git.phillip.wood@dunelm.org.uk","subject":"Re: [PATCH 1/6] t0018: switch default branch name to main","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-08-27T17:21:17Z","receivedAt":"2025-08-27T17:21:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n> From: Phillip Wood <phillip.wood@dunelm.org.uk>\n>\n> These tests use \"trunk\" as the default branch name but the exact\n> name of the branch is incidental to testing if the advice message\n> includes it. ...\n\nWould't we be better prepared for a future where advice messages may\nstart including the current branch name, though, if we made sure we\nare on the branch whose name is known?\n\n> ... Git 3.0 will change the default branch name to \"main\"\n> and remove support for GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME so change\n\nWill it?  I would have expected and hoped that this support won't be\nripped out.  The political atomosphere to decide if a name is\n\"correct\" will change over time.  When somebody comes up with a\nreason to burn 'main', just like everybody moved out of 'master' a\nfew years ago, wouldn't we be better off to keep this mechanism?\n\nIf we truly believe that we have chosen the forever-perfect name\nthat nobody would ever bring up renaming again, we can rip the\nsupport out.  But I am not that optimistic.\n\n> these test to use \"main\" instead of \"topic\".\n\nYou meant \"trunk\" here.\n\n> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n> ---\n>  t/t0018-advice.sh | 8 ++++----\n>  1 file changed, 4 insertions(+), 4 deletions(-)\n>\n> diff --git a/t/t0018-advice.sh b/t/t0018-advice.sh\n> index f68e08d0b14..c695ade4be8 100755\n> --- a/t/t0018-advice.sh\n> +++ b/t/t0018-advice.sh\n> @@ -2,7 +2,7 @@\n>  \n>  test_description='Test advise_if_enabled functionality'\n>  \n> -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=trunk\n> +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n>  export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n>  \n>  . ./test-lib.sh\n> @@ -33,7 +33,7 @@ test_expect_success 'advice should not be printed when config variable is set to\n>  \n>  test_expect_success 'advice should not be printed when --no-advice is used' '\n>  \tq_to_tab >expect <<-\\EOF &&\n> -\tOn branch trunk\n> +\tOn branch main\n>  \n>  \tNo commits yet\n>  \n> @@ -55,7 +55,7 @@ test_expect_success 'advice should not be printed when --no-advice is used' '\n>  \n>  test_expect_success 'advice should not be printed when GIT_ADVICE is set to false' '\n>  \tq_to_tab >expect <<-\\EOF &&\n> -\tOn branch trunk\n> +\tOn branch main\n>  \n>  \tNo commits yet\n>  \n> @@ -77,7 +77,7 @@ test_expect_success 'advice should not be printed when GIT_ADVICE is set to fals\n>  \n>  test_expect_success 'advice should be printed when GIT_ADVICE is set to true' '\n>  \tq_to_tab >expect <<-\\EOF &&\n> -\tOn branch trunk\n> +\tOn branch main\n>  \n>  \tNo commits yet\n"},{"id":"525066","messageId":"xmqqwm6ozn7d.fsf@gitster.g","threadId":"64047","inReplyTo":"bbf79dd64fef485b75bf0fbb37322a6cff7df7f8.1756308283.git.phillip.wood@dunelm.org.uk","subject":"Re: [PATCH 4/6] t0613: stop setting default initial branch","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-08-27T17:30:46Z","receivedAt":"2025-08-27T17:30:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n> From: Phillip Wood <phillip.wood@dunelm.org.uk>\n>\n> As the tests are all run in separate repositories, set the branch\n> name to \"master\" when creating the repository for the tests where\n> the result depends on the branch name. This is in preparation for\n> removing GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME in Git 3.0.\n\nI do not agree with the statement that Git 3.0 should remove support\nfor GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME facility in its test suite,\nso it is somewhat moot for me to review almost all the patches in\nthis series, but this caught my attention.  As this one needs to fix\nthe initial branch name to a fixed string, no matter the hardcoded\ninitial branch name of the time is (even after we rename again from\n'main' to something else), I do think this change is VERY MUCH a\ngood thing to do.\n\n> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n> ---\n>  t/t0613-reftable-write-options.sh | 18 +++++++-----------\n>  1 file changed, 7 insertions(+), 11 deletions(-)\n>\n> diff --git a/t/t0613-reftable-write-options.sh b/t/t0613-reftable-write-options.sh\n> index d77e601111f..b547e12d66d 100755\n> --- a/t/t0613-reftable-write-options.sh\n> +++ b/t/t0613-reftable-write-options.sh\n> @@ -11,16 +11,12 @@ export GIT_TEST_REFTABLE_AUTOCOMPACTION\n>  # Block sizes depend on the hash function, so we force SHA1 here.\n>  GIT_TEST_DEFAULT_HASH=sha1\n>  export GIT_TEST_DEFAULT_HASH\n> -# Block sizes also depend on the actual refs we write, so we force \"master\" to\n> -# be the default initial branch name.\n\nWe may however need to keep this comment somewhere in this file, to\nwarn against future developers that all \"git init\" invocations must\nuse 'master' (by the way, would any 6-byte name do?  I dunno) as the\ninitial branch name.\n\n> -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n> -export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n>  \n>  . ./test-lib.sh\n>  \n>  test_expect_success 'default write options' '\n>  \ttest_when_finished \"rm -rf repo\" &&\n> -\tgit init repo &&\n> +\tgit init --initial-branch master repo &&\n\nAnd being explict like this is a good idea.\n\nI am curious how the CC: list was formulated, though, as neither\nname comes up in \"git shortlog t/t0613-reftable-write-options.sh\".\n\nI've added Patrick for comment (primarily to pick his brain for the\n6-byte thing).\n\nThanks.\n"},{"id":"525067","messageId":"xmqqplcgzjya.fsf@gitster.g","threadId":"64047","inReplyTo":"487d1a33130cb2fafadcf98da00a332a7408a0e8.1756308283.git.phillip.wood@dunelm.org.uk","subject":"Re: [PATCH 6/6] breaking-changes: switch default branch to main","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-08-27T18:41:01Z","receivedAt":"2025-08-27T18:41:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n> diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc\n> index f8d2eba061c..93922299321 100644\n> --- a/Documentation/BreakingChanges.adoc\n> +++ b/Documentation/BreakingChanges.adoc\n> @@ -165,6 +165,11 @@ A prerequisite for this change is that the ecosystem is ready to support the\n>  \"reftable\" format. Most importantly, alternative implementations of Git like\n>  JGit, libgit2 and Gitoxide need to support it.\n>  \n> +* The default branch name will be `main`. We have been warning that the default\n> +  name will change since 675704c74dd (init: provide useful advice about\n> +  init.defaultBranch, 2020-12-11). The new name matches the default branch name\n> +  used by many of the big git forges.\n> +\n\nGood.\n\n> diff --git a/Documentation/git-init.adoc b/Documentation/git-init.adoc\n> index a0dffba665f..39d4db6bccb 100644\n> --- a/Documentation/git-init.adoc\n> +++ b/Documentation/git-init.adoc\n> @@ -77,9 +77,15 @@ If this is a reinitialization, the repository will be moved to the specified pat\n>  `-b <branch-name>`::\n>  `--initial-branch=<branch-name>`::\n>  Use _<branch-name>_ for the initial branch in the newly created\n> -repository.  If not specified, fall back to the default name (currently\n> -`master`, but this is subject to change in the future; the name can be\n> -customized via the `init.defaultBranch` configuration variable).\n> +repository.  If not specified, fall back to the default name\n> +ifndef::with-breaking-changes[]\n> +(currently `master`, but this will change to `main` when Git 3.0 is released).\n> +endif::with-breaking-changes[]\n> +ifdef::with-breaking-changes[]\n> +(`main`).\n> +endif::with-breaking-changes[]\n\nGood.  We might have to change it back to \"(currently `main`)\" again\nbut I do not see the need to prepare for such a re-rename.  As we do\nnot have the \"currently\", we can say\n\n\t... to the default name `main`.\n\nwithout parentheses.\n\n> +The default name can be customized via the `init.defaultBranch` configuration\n> +variable.\n\n> diff --git a/advice.c b/advice.c\n> index e5f0ff84491..48c49ee4145 100644\n> --- a/advice.c\n> +++ b/advice.c\n> @@ -51,7 +51,9 @@ static struct {\n>  \t[ADVICE_AM_WORK_DIR] \t\t\t\t= { \"amWorkDir\" },\n>  \t[ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] \t= { \"checkoutAmbiguousRemoteBranchName\" },\n>  \t[ADVICE_COMMIT_BEFORE_MERGE]\t\t\t= { \"commitBeforeMerge\" },\n> +#ifndef WITH_BREAKING_CHANGES\n>  \t[ADVICE_DEFAULT_BRANCH_NAME]\t\t\t= { \"defaultBranchName\" },\n> +#endif /* WITH_BREAKING_CHANGES */\n>  \t[ADVICE_DETACHED_HEAD]\t\t\t\t= { \"detachedHead\" },\n>  \t[ADVICE_DIVERGING]\t\t\t\t= { \"diverging\" },\n>  \t[ADVICE_FETCH_SET_HEAD_WARN]\t\t\t= { \"fetchRemoteHEADWarn\" },\n> diff --git a/advice.h b/advice.h\n> index 727dcecf4a3..fc1dc872049 100644\n> --- a/advice.h\n> +++ b/advice.h\n> @@ -18,7 +18,9 @@ enum advice_type {\n>  \tADVICE_AM_WORK_DIR,\n>  \tADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME,\n>  \tADVICE_COMMIT_BEFORE_MERGE,\n> +#ifndef WITH_BREAKING_CHANGES\n>  \tADVICE_DEFAULT_BRANCH_NAME,\n> +#endif /* WITH_BREAKING_CHANGES */\n>  \tADVICE_DETACHED_HEAD,\n>  \tADVICE_DIVERGING,\n>  \tADVICE_FETCH_SET_HEAD_WARN,\n\nGood.\n\n> diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh\n> index 01823fd0f14..a21834043f3 100755\n> --- a/ci/run-build-and-tests.sh\n> +++ b/ci/run-build-and-tests.sh\n> @@ -9,7 +9,6 @@ run_tests=t\n>  \n>  case \"$jobname\" in\n>  linux-breaking-changes)\n> -\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n\nQuestionable.\n\n> diff --git a/refs.c b/refs.c\n> index 4ff55cf24f6..e73f63ff6b8 100644\n> --- a/refs.c\n> +++ b/refs.c\n> @@ -627,10 +627,12 @@ void expand_ref_prefix(struct strvec *prefixes, const char *prefix)\n>  \t\tstrvec_pushf(prefixes, *p, len, prefix);\n>  }\n>  \n> +#ifndef WITH_BREAKING_CHANGES\n>  static const char default_branch_name_advice[] = N_(\n>  \"Using '%s' as the name for the initial branch. This default branch name\\n\"\n> -\"is subject to change. To configure the initial branch name to use in all\\n\"\n> -\"of your new repositories, which will suppress this warning, call:\\n\"\n> +\"will change to \\\"main\\\" in Git 3.0. To configure the initial branch name\\n\"\n> +\"to use in all of your new repositories, which will suppress this warning,\\n\"\n> +\"call:\\n\"\n>  \"\\n\"\n>  \"\\tgit config --global init.defaultBranch <name>\\n\"\n>  \"\\n\"\n> @@ -639,24 +641,32 @@ static const char default_branch_name_advice[] = N_(\n>  \"\\n\"\n>  \"\\tgit branch -m <name>\\n\"\n>  );\n> +#endif /* WITH_BREAKING_CHANGES */\n\nGood.\n\n>  char *repo_default_branch_name(struct repository *r, int quiet)\n>  {\n>  \tconst char *config_key = \"init.defaultbranch\";\n>  \tconst char *config_display_key = \"init.defaultBranch\";\n>  \tchar *ret = NULL, *full_ref;\n> +#ifndef WITH_BREAKING_CHANGES\n>  \tconst char *env = getenv(\"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\");\n>  \n>  \tif (env && *env)\n>  \t\tret = xstrdup(env);\n> -\telse if (repo_config_get_string(r, config_key, &ret) < 0)\n> +#endif /* WITH_BREAKING_CHANGES */\n\nQuestionable.\n\n> +\tif (!ret && repo_config_get_string(r, config_key, &ret) < 0)\n>  \t\tdie(_(\"could not retrieve `%s`\"), config_display_key);\n>  \n>  \tif (!ret) {\n> +#ifdef WITH_BREAKING_CHANGES\n> +\t\tret = xstrdup(\"main\");\n> +\t\t(void) quiet; /* Silence -Wunused-parameter */\n> +#else\n>  \t\tret = xstrdup(\"master\");\n>  \t\tif (!quiet)\n>  \t\t\tadvise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME,\n>  \t\t\t\t\t  _(default_branch_name_advice), ret);\n> +#endif /* WITH_BREAKING_CHANGES */\n\nVery good.\n\nThanks.\n"},{"id":"525101","messageId":"1260e88d-8e04-2d58-a25e-ac312b79e04f@gmx.de","threadId":"64047","inReplyTo":"cover.1756308283.git.phillip.wood@dunelm.org.uk","subject":"Re: [PATCH 0/6] breaking changes: switch default initial branch name to \"main\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2025-08-28T13:12:57Z","receivedAt":"2025-08-28T13:13:04Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Phillip,\n\nOn Wed, 27 Aug 2025, Phillip Wood wrote:\n\n> From: Phillip Wood <phillip.wood@dunelm.org.uk>\n> \n> This series switches the default branch name from \"master\" to \"main\"\n> when WITH_BREAKING_CHANGES is enabled. We have been warning that the\n> default name will change since 675704c74dd (init: provide useful advice\n> about init.defaultBranch, 2020-12-11) and the major git forges have all\n> switched their default branch name to \"main\", so I think it makes sense\n> to change the default branch name in git to match the wider ecosystem.\n> \n> The first five patches update tests that currently require a default\n> branch name different to \"main\". The sixth patch then changes the\n> default branch \"main\" and removes GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n> when WITH_BREAKING_CHANGES is enabled. Patch 2 is quite large but\n> is mechanically generated so it should be possible to review it by\n> checking that the changes can be reproduced.\n> \n> This is an alternative to changing the branch name now as suggested in\n> https://lore.kernel.org<pull.1961.git.1756183921623.gitgitgadget@gmail.com\n\nThis link is slightly broken; The unbroken version is\nhttps://lore.kernel.org/git/pull.1961.git.1756183921623.gitgitgadget@gmail.com/\n\nThank you for picking this effort up! I am impressed by your courage in\nface of the way this `master -> main` initiative was received and the\namount of leadership that was put behind it.\n\nThe changes all look good to me, and while I have my doubts that Git will\nfollow the laudable leadership demonstrated by the big Git forges in\ntrying to be a bit more mindful, I will remain eagerly interested in any\nprogress that can possibly be made here.\n\nCiao,\nJohannes\n\n> \n> Base-Commit: f814da676ae46aac5be0a98b99373a76dee6cedb\n> Published-As: https://github.com/phillipwood/git/releases/tag/pw%2Finitial-branch-is-main%2Fv1\n> View-Changes-At: https://github.com/phillipwood/git/compare/f814da676...487d1a331\n> Fetch-It-Via: git fetch https://github.com/phillipwood/git pw/initial-branch-is-main/v1\n> \n> \n> Phillip Wood (6):\n>   t0018: switch default branch name to main\n>   t4013: switch default branch name to main\n>   t9902: switch default branch name to main\n>   t0613: stop setting default initial branch\n>   t1403: remove dependency on GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n>   breaking-changes: switch default branch to main\n> \n>  Documentation/BreakingChanges.adoc            |   5 +\n>  Documentation/git-init.adoc                   |  12 +-\n>  advice.c                                      |   2 +\n>  advice.h                                      |   2 +\n>  ci/run-build-and-tests.sh                     |   1 -\n>  refs.c                                        |  16 +-\n>  t/t0001-init.sh                               |   9 +-\n>  t/t0018-advice.sh                             |   8 +-\n>  t/t0613-reftable-write-options.sh             |  18 +-\n>  t/t1403-show-ref.sh                           |   6 +-\n>  t/t4013-diff-various.sh                       | 228 +++++++++---------\n>  ...ree_--cc_--patch-with-stat_--summary_main} |   2 +-\n>  ...iff.diff-tree_--cc_--patch-with-stat_main} |   2 +-\n>  ...r => diff.diff-tree_--cc_--shortstat_main} |   2 +-\n>  ...diff.diff-tree_--cc_--stat_--summary_main} |   2 +-\n>  ...master => diff.diff-tree_--cc_--stat_main} |   2 +-\n>  ...e_--cc_master => diff.diff-tree_--cc_main} |   2 +-\n>  ...master => diff.diff-tree_-c_--abbrev_main} |   2 +-\n>  ...> diff.diff-tree_-c_--stat_--summary_main} |   2 +-\n>  ...t_master => diff.diff-tree_-c_--stat_main} |   2 +-\n>  ...-tree_-c_master => diff.diff-tree_-c_main} |   2 +-\n>  ...-tree_-m_master => diff.diff-tree_-m_main} |   2 +-\n>  ...-p_-m_master => diff.diff-tree_-p_-m_main} |   2 +-\n>  t/t4013/diff.diff-tree_-p_main                |   2 +\n>  t/t4013/diff.diff-tree_-p_master              |   2 -\n>  t/t4013/diff.diff-tree_main                   |   2 +\n>  t/t4013/diff.diff-tree_master                 |   2 -\n>  t/t4013/diff.diff_--dirstat_--cc_main~1_main  |   3 +\n>  .../diff.diff_--dirstat_--cc_master~1_master  |   3 -\n>  t/t4013/diff.diff_--dirstat_main~1_main~2     |   3 +\n>  t/t4013/diff.diff_--dirstat_master~1_master~2 |   3 -\n>  ...ff.diff_--line-prefix=abc_main_main^_side} |   2 +-\n>  ...master^_side => diff.diff_main_main^_side} |   2 +-\n>  ...mat-patch_--attach_--stdout_initial..main} |   2 +-\n>  ...at-patch_--attach_--stdout_initial..main^} |   2 +-\n>  ...e_--stdout_--numbered-files_initial..main} |   2 +-\n>  ...t_--subject-prefix=TESTCASE_initial..main} |   2 +-\n>  ...mat-patch_--inline_--stdout_initial..main} |   2 +-\n>  ...at-patch_--inline_--stdout_initial..main^} |   2 +-\n>  ...t-patch_--inline_--stdout_initial..main^^} |   2 +-\n>  ...--stdout_--cover-letter_-n_initial..main^} |   2 +-\n>  ...atch_--stdout_--no-numbered_initial..main} |   2 +-\n>  ...t-patch_--stdout_--numbered_initial..main} |   2 +-\n>  ... diff.format-patch_--stdout_initial..main} |   2 +-\n>  ...diff.format-patch_--stdout_initial..main^} |   2 +-\n>  ..._-m_-p_master => diff.log_--cc_-m_-p_main} |   2 +-\n>  t/t4013/diff.log_--decorate=full_--all        |   2 +-\n>  ..._--decorate=full_--clear-decorations_--all |   2 +-\n>  ...f.log_--decorate=full_--decorate-all_--all |   2 +-\n>  t/t4013/diff.log_--decorate_--all             |   2 +-\n>  ...f.log_--decorate_--clear-decorations_--all |   2 +-\n>  .../diff.log_--decorate_--decorate-all_--all  |   2 +-\n>  ... diff.log_--diff-merges=first-parent_main} |   2 +-\n>  ..._--diff-merges=off_-p_--first-parent_main} |   2 +-\n>  ..._--first-parent_--diff-merges=off_-p_main} |   2 +-\n>  ...g_--no-diff-merges_-p_--first-parent_main} |   2 +-\n>  ..._--patch-with-stat_--summary_main_--_dir_} |   2 +-\n>  ...master => diff.log_--patch-with-stat_main} |   2 +-\n>  ...> diff.log_--patch-with-stat_main_--_dir_} |   2 +-\n>  ...oot_--cc_--patch-with-stat_--summary_main} |   2 +-\n>  ...g_--root_--patch-with-stat_--summary_main} |   2 +-\n>  ...=> diff.log_--root_--patch-with-stat_main} |   2 +-\n>  ...-root_-c_--patch-with-stat_--summary_main} |   2 +-\n>  ...root_-p_master => diff.log_--root_-p_main} |   2 +-\n>  ...log_--root_master => diff.log_--root_main} |   2 +-\n>  ...ter => diff.log_-GF_-p_--pickaxe-all_main} |   2 +-\n>  ...log_-GF_-p_master => diff.log_-GF_-p_main} |   2 +-\n>  ...{diff.log_-SF_master => diff.log_-GF_main} |   2 +-\n>  ...aster => diff.log_-IA_-IB_-I1_-I2_-p_main} |   2 +-\n>  ...log_-SF_-p_master => diff.log_-SF_-p_main} |   2 +-\n>  ...{diff.log_-GF_master => diff.log_-SF_main} |   2 +-\n>  t/t4013/diff.log_-SF_main_--max-count=0       |   2 +\n>  ...ount=2 => diff.log_-SF_main_--max-count=1} |   2 +-\n>  t/t4013/diff.log_-SF_main_--max-count=2       |   7 +\n>  t/t4013/diff.log_-SF_master_--max-count=0     |   2 -\n>  t/t4013/diff.log_-SF_master_--max-count=1     |   7 -\n>  ...iff.log_-S_F_master => diff.log_-S_F_main} |   2 +-\n>  ...cc_-m_-p_master => diff.log_-c_-m_-p_main} |   2 +-\n>  ...-m_--raw_master => diff.log_-m_--raw_main} |   2 +-\n>  ..._--stat_master => diff.log_-m_--stat_main} |   2 +-\n>  ...ter => diff.log_-m_-p_--first-parent_main} |   2 +-\n>  ...f.log_-m_-p_master => diff.log_-m_-p_main} |   2 +-\n>  ...ff.log_-p_--diff-merges=first-parent_main} |   2 +-\n>  ...master => diff.log_-p_--first-parent_main} |   2 +-\n>  .../{diff.log_-p_master => diff.log_-p_main}  |   2 +-\n>  t/t4013/{diff.log_master => diff.log_main}    |   2 +-\n>  ...iff.noellipses-diff-tree_-c_--abbrev_main} |   2 +-\n>  ...> diff.noellipses-whatchanged_--root_main} |   2 +-\n>  ...r => diff.noellipses-whatchanged_-SF_main} |   2 +-\n>  ...aster => diff.noellipses-whatchanged_main} |   2 +-\n>  ...t_master => diff.show_--first-parent_main} |   2 +-\n>  ...{diff.show_-c_master => diff.show_-c_main} |   2 +-\n>  ...{diff.show_-m_master => diff.show_-m_main} |   2 +-\n>  t/t4013/{diff.show_master => diff.show_main}  |   2 +-\n>  ..._--patch-with-stat_--summary_main_--_dir_} |   2 +-\n>  ...> diff.whatchanged_--patch-with-stat_main} |   2 +-\n>  ...hatchanged_--patch-with-stat_main_--_dir_} |   2 +-\n>  ...oot_--cc_--patch-with-stat_--summary_main} |   2 +-\n>  ...d_--root_--patch-with-stat_--summary_main} |   2 +-\n>  ...whatchanged_--root_--patch-with-stat_main} |   2 +-\n>  ...-root_-c_--patch-with-stat_--summary_main} |   2 +-\n>  ...master => diff.whatchanged_--root_-p_main} |   2 +-\n>  ...ot_master => diff.whatchanged_--root_main} |   2 +-\n>  ...-p_master => diff.whatchanged_-SF_-p_main} |   2 +-\n>  ...d_-SF_master => diff.whatchanged_-SF_main} |   2 +-\n>  ...ged_-p_master => diff.whatchanged_-p_main} |   2 +-\n>  ...atchanged_master => diff.whatchanged_main} |   2 +-\n>  t/t9902-completion.sh                         |   6 +-\n>  t/test-lib.sh                                 |  15 +-\n>  109 files changed, 281 insertions(+), 253 deletions(-)\n>  rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_--summary_master => diff.diff-tree_--cc_--patch-with-stat_--summary_main} (86%)\n>  rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_master => diff.diff-tree_--cc_--patch-with-stat_main} (89%)\n>  rename t/t4013/{diff.diff-tree_--cc_--shortstat_master => diff.diff-tree_--cc_--shortstat_main} (65%)\n>  rename t/t4013/{diff.diff-tree_-c_--stat_--summary_master => diff.diff-tree_--cc_--stat_--summary_main} (71%)\n>  rename t/t4013/{diff.diff-tree_-c_--stat_master => diff.diff-tree_--cc_--stat_main} (76%)\n>  rename t/t4013/{diff.diff-tree_--cc_master => diff.diff-tree_--cc_main} (91%)\n>  rename t/t4013/{diff.diff-tree_-c_--abbrev_master => diff.diff-tree_-c_--abbrev_main} (83%)\n>  rename t/t4013/{diff.diff-tree_--cc_--stat_--summary_master => diff.diff-tree_-c_--stat_--summary_main} (70%)\n>  rename t/t4013/{diff.diff-tree_--cc_--stat_master => diff.diff-tree_-c_--stat_main} (75%)\n>  rename t/t4013/{diff.diff-tree_-c_master => diff.diff-tree_-c_main} (93%)\n>  rename t/t4013/{diff.diff-tree_-m_master => diff.diff-tree_-m_main} (96%)\n>  rename t/t4013/{diff.diff-tree_-p_-m_master => diff.diff-tree_-p_-m_main} (97%)\n>  create mode 100644 t/t4013/diff.diff-tree_-p_main\n>  delete mode 100644 t/t4013/diff.diff-tree_-p_master\n>  create mode 100644 t/t4013/diff.diff-tree_main\n>  delete mode 100644 t/t4013/diff.diff-tree_master\n>  create mode 100644 t/t4013/diff.diff_--dirstat_--cc_main~1_main\n>  delete mode 100644 t/t4013/diff.diff_--dirstat_--cc_master~1_master\n>  create mode 100644 t/t4013/diff.diff_--dirstat_main~1_main~2\n>  delete mode 100644 t/t4013/diff.diff_--dirstat_master~1_master~2\n>  rename t/t4013/{diff.diff_--line-prefix=abc_master_master^_side => diff.diff_--line-prefix=abc_main_main^_side} (87%)\n>  rename t/t4013/{diff.diff_master_master^_side => diff.diff_main_main^_side} (89%)\n>  rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master => diff.format-patch_--attach_--stdout_initial..main} (98%)\n>  rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master^ => diff.format-patch_--attach_--stdout_initial..main^} (97%)\n>  rename t/t4013/{diff.format-patch_--inline_--stdout_--numbered-files_initial..master => diff.format-patch_--inline_--stdout_--numbered-files_initial..main} (99%)\n>  rename t/t4013/{diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master => diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main} (99%)\n>  rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master => diff.format-patch_--inline_--stdout_initial..main} (98%)\n>  rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^ => diff.format-patch_--inline_--stdout_initial..main^} (97%)\n>  rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^^ => diff.format-patch_--inline_--stdout_initial..main^^} (95%)\n>  rename t/t4013/{diff.format-patch_--stdout_--cover-letter_-n_initial..master^ => diff.format-patch_--stdout_--cover-letter_-n_initial..main^} (96%)\n>  rename t/t4013/{diff.format-patch_--stdout_--no-numbered_initial..master => diff.format-patch_--stdout_--no-numbered_initial..main} (97%)\n>  rename t/t4013/{diff.format-patch_--stdout_--numbered_initial..master => diff.format-patch_--stdout_--numbered_initial..main} (97%)\n>  rename t/t4013/{diff.format-patch_--stdout_initial..master => diff.format-patch_--stdout_initial..main} (97%)\n>  rename t/t4013/{diff.format-patch_--stdout_initial..master^ => diff.format-patch_--stdout_initial..main^} (96%)\n>  rename t/t4013/{diff.log_-c_-m_-p_master => diff.log_--cc_-m_-p_main} (99%)\n>  rename t/t4013/{diff.log_--diff-merges=first-parent_master => diff.log_--diff-merges=first-parent_main} (95%)\n>  rename t/t4013/{diff.log_--no-diff-merges_-p_--first-parent_master => diff.log_--diff-merges=off_-p_--first-parent_main} (95%)\n>  rename t/t4013/{diff.log_--first-parent_--diff-merges=off_-p_master => diff.log_--first-parent_--diff-merges=off_-p_main} (95%)\n>  rename t/t4013/{diff.log_--diff-merges=off_-p_--first-parent_master => diff.log_--no-diff-merges_-p_--first-parent_main} (95%)\n>  rename t/t4013/{diff.log_--patch-with-stat_--summary_master_--_dir_ => diff.log_--patch-with-stat_--summary_main_--_dir_} (96%)\n>  rename t/t4013/{diff.log_--patch-with-stat_master => diff.log_--patch-with-stat_main} (98%)\n>  rename t/t4013/{diff.log_--patch-with-stat_master_--_dir_ => diff.log_--patch-with-stat_main_--_dir_} (96%)\n>  rename t/t4013/{diff.log_--root_--cc_--patch-with-stat_--summary_master => diff.log_--root_--cc_--patch-with-stat_--summary_main} (98%)\n>  rename t/t4013/{diff.log_--root_--patch-with-stat_--summary_master => diff.log_--root_--patch-with-stat_--summary_main} (98%)\n>  rename t/t4013/{diff.log_--root_--patch-with-stat_master => diff.log_--root_--patch-with-stat_main} (98%)\n>  rename t/t4013/{diff.log_--root_-c_--patch-with-stat_--summary_master => diff.log_--root_-c_--patch-with-stat_--summary_main} (98%)\n>  rename t/t4013/{diff.log_--root_-p_master => diff.log_--root_-p_main} (98%)\n>  rename t/t4013/{diff.log_--root_master => diff.log_--root_main} (96%)\n>  rename t/t4013/{diff.log_-GF_-p_--pickaxe-all_master => diff.log_-GF_-p_--pickaxe-all_main} (90%)\n>  rename t/t4013/{diff.log_-GF_-p_master => diff.log_-GF_-p_main} (91%)\n>  rename t/t4013/{diff.log_-SF_master => diff.log_-GF_main} (86%)\n>  rename t/t4013/{diff.log_-IA_-IB_-I1_-I2_-p_master => diff.log_-IA_-IB_-I1_-I2_-p_main} (97%)\n>  rename t/t4013/{diff.log_-SF_-p_master => diff.log_-SF_-p_main} (91%)\n>  rename t/t4013/{diff.log_-GF_master => diff.log_-SF_main} (86%)\n>  create mode 100644 t/t4013/diff.log_-SF_main_--max-count=0\n>  rename t/t4013/{diff.log_-SF_master_--max-count=2 => diff.log_-SF_main_--max-count=1} (79%)\n>  create mode 100644 t/t4013/diff.log_-SF_main_--max-count=2\n>  delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=0\n>  delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=1\n>  rename t/t4013/{diff.log_-S_F_master => diff.log_-S_F_main} (86%)\n>  rename t/t4013/{diff.log_--cc_-m_-p_master => diff.log_-c_-m_-p_main} (99%)\n>  rename t/t4013/{diff.log_-m_--raw_master => diff.log_-m_--raw_main} (98%)\n>  rename t/t4013/{diff.log_-m_--stat_master => diff.log_-m_--stat_main} (98%)\n>  rename t/t4013/{diff.log_-m_-p_--first-parent_master => diff.log_-m_-p_--first-parent_main} (97%)\n>  rename t/t4013/{diff.log_-m_-p_master => diff.log_-m_-p_main} (99%)\n>  rename t/t4013/{diff.log_-p_--diff-merges=first-parent_master => diff.log_-p_--diff-merges=first-parent_main} (97%)\n>  rename t/t4013/{diff.log_-p_--first-parent_master => diff.log_-p_--first-parent_main} (97%)\n>  rename t/t4013/{diff.log_-p_master => diff.log_-p_main} (98%)\n>  rename t/t4013/{diff.log_master => diff.log_main} (97%)\n>  rename t/t4013/{diff.noellipses-diff-tree_-c_--abbrev_master => diff.noellipses-diff-tree_-c_--abbrev_main} (81%)\n>  rename t/t4013/{diff.noellipses-whatchanged_--root_master => diff.noellipses-whatchanged_--root_main} (96%)\n>  rename t/t4013/{diff.noellipses-whatchanged_-SF_master => diff.noellipses-whatchanged_-SF_main} (86%)\n>  rename t/t4013/{diff.noellipses-whatchanged_master => diff.noellipses-whatchanged_main} (96%)\n>  rename t/t4013/{diff.show_--first-parent_master => diff.show_--first-parent_main} (92%)\n>  rename t/t4013/{diff.show_-c_master => diff.show_-c_main} (95%)\n>  rename t/t4013/{diff.show_-m_master => diff.show_-m_main} (98%)\n>  rename t/t4013/{diff.show_master => diff.show_main} (96%)\n>  rename t/t4013/{diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ => diff.whatchanged_--patch-with-stat_--summary_main_--_dir_} (94%)\n>  rename t/t4013/{diff.whatchanged_--patch-with-stat_master => diff.whatchanged_--patch-with-stat_main} (97%)\n>  rename t/t4013/{diff.whatchanged_--patch-with-stat_master_--_dir_ => diff.whatchanged_--patch-with-stat_main_--_dir_} (94%)\n>  rename t/t4013/{diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master => diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main} (97%)\n>  rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_--summary_master => diff.whatchanged_--root_--patch-with-stat_--summary_main} (97%)\n>  rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_master => diff.whatchanged_--root_--patch-with-stat_main} (97%)\n>  rename t/t4013/{diff.whatchanged_--root_-c_--patch-with-stat_--summary_master => diff.whatchanged_--root_-c_--patch-with-stat_--summary_main} (97%)\n>  rename t/t4013/{diff.whatchanged_--root_-p_master => diff.whatchanged_--root_-p_main} (98%)\n>  rename t/t4013/{diff.whatchanged_--root_master => diff.whatchanged_--root_main} (97%)\n>  rename t/t4013/{diff.whatchanged_-SF_-p_master => diff.whatchanged_-SF_-p_main} (89%)\n>  rename t/t4013/{diff.whatchanged_-SF_master => diff.whatchanged_-SF_main} (86%)\n>  rename t/t4013/{diff.whatchanged_-p_master => diff.whatchanged_-p_main} (98%)\n>  rename t/t4013/{diff.whatchanged_master => diff.whatchanged_main} (97%)\n> \n> -- \n> 2.49.0.897.gfad3eb7d210\n> \n> \n> \n"},{"id":"525108","messageId":"b6b60e6b-c06d-4dc6-8722-b53736f8b059@gmail.com","threadId":"64047","inReplyTo":"xmqq5xe81y0i.fsf@gitster.g","subject":"Re: [PATCH 1/6] t0018: switch default branch name to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-08-28T14:00:08Z","receivedAt":"2025-08-28T14:00:14Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"Hi Junio\n\nOn 27/08/2025 18:21, Junio C Hamano wrote:\n> Phillip Wood <phillip.wood123@gmail.com> writes:\n> \n>> From: Phillip Wood <phillip.wood@dunelm.org.uk>\n>>\n>> These tests use \"trunk\" as the default branch name but the exact\n>> name of the branch is incidental to testing if the advice message\n>> includes it. ...\n> \n> Would't we be better prepared for a future where advice messages may\n> start including the current branch name, though, if we made sure we\n> are on the branch whose name is known?\n\nThe advice message does include the current branch name, that's why the \ntest needs to be updated when we change that name from \"trunk\" to \n\"main\". The sentence above is trying to say that it does not matter what \nthat name is, we just need to check it appears in the advice message. I \ncould see an argument for the tests not depending on git's default \nbranch name if it changed frequently but realistically we're unlikely to \nchange in again in the near future. If we did use a different name in \nthe tests it is just as likely to cause objections and need to be \nchanged as git's default name so I'm not sure it gains us much.\n>> ... Git 3.0 will change the default branch name to \"main\"\n>> and remove support for GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME so change\n> \n> Will it?  I would have expected and hoped that this support won't be\n> ripped out.  The political atomosphere to decide if a name is\n> \"correct\" will change over time.  When somebody comes up with a\n> reason to burn 'main', just like everybody moved out of 'master' a\n> few years ago, wouldn't we be better off to keep this mechanism?\n> \n> If we truly believe that we have chosen the forever-perfect name\n> that nobody would ever bring up renaming again, we can rip the\n> support out.  But I am not that optimistic.\n\nIf it's another 20 years until we change the default branch is it really \nworth supporting this variable until then? I find setting it in tests is \nmostly pointless boilerplate. When the variable was introduced in \n704fed9ea22 (tests: start moving to a different default main branch \nname, 2020-10-23) it was described as \"This `GIT_TEST_*` variable is \nmeant purely for the transitional period while the entire test suite is \nconverted to use `main` as the initial branch name by default.\" so I was \nhoping we could remove it.\n>> these test to use \"main\" instead of \"topic\".\n> \n> You meant \"trunk\" here.\n\nWill fix\n\nThanks\n\nPhillip\n>> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n>> ---\n>>   t/t0018-advice.sh | 8 ++++----\n>>   1 file changed, 4 insertions(+), 4 deletions(-)\n>>\n>> diff --git a/t/t0018-advice.sh b/t/t0018-advice.sh\n>> index f68e08d0b14..c695ade4be8 100755\n>> --- a/t/t0018-advice.sh\n>> +++ b/t/t0018-advice.sh\n>> @@ -2,7 +2,7 @@\n>>   \n>>   test_description='Test advise_if_enabled functionality'\n>>   \n>> -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=trunk\n>> +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n>>   export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n>>   \n>>   . ./test-lib.sh\n>> @@ -33,7 +33,7 @@ test_expect_success 'advice should not be printed when config variable is set to\n>>   \n>>   test_expect_success 'advice should not be printed when --no-advice is used' '\n>>   \tq_to_tab >expect <<-\\EOF &&\n>> -\tOn branch trunk\n>> +\tOn branch main\n>>   \n>>   \tNo commits yet\n>>   \n>> @@ -55,7 +55,7 @@ test_expect_success 'advice should not be printed when --no-advice is used' '\n>>   \n>>   test_expect_success 'advice should not be printed when GIT_ADVICE is set to false' '\n>>   \tq_to_tab >expect <<-\\EOF &&\n>> -\tOn branch trunk\n>> +\tOn branch main\n>>   \n>>   \tNo commits yet\n>>   \n>> @@ -77,7 +77,7 @@ test_expect_success 'advice should not be printed when GIT_ADVICE is set to fals\n>>   \n>>   test_expect_success 'advice should be printed when GIT_ADVICE is set to true' '\n>>   \tq_to_tab >expect <<-\\EOF &&\n>> -\tOn branch trunk\n>> +\tOn branch main\n>>   \n>>   \tNo commits yet\n\n"},{"id":"525121","messageId":"xmqqbjnzwfvk.fsf@gitster.g","threadId":"64047","inReplyTo":"b6b60e6b-c06d-4dc6-8722-b53736f8b059@gmail.com","subject":"Re: [PATCH 1/6] t0018: switch default branch name to main","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-08-28T16:49:35Z","receivedAt":"2025-08-28T16:49:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n>>> These tests use \"trunk\" as the default branch name but the exact\n>>> name of the branch is incidental to testing if the advice message\n>>> includes it. ...\n>> Would't we be better prepared for a future where advice messages may\n>> start including the current branch name, though, if we made sure we\n>> are on the branch whose name is known?\n>\n> The advice message does include the current branch name, that's why\n> the test needs to be updated when we change that name from \"trunk\" to\n> \"main\". The sentence above is trying to say that it does not matter\n> what that name is, we just need to check it appears in the advice\n> message.\n\nThat makes 100% sense.\n\n> I could see an argument for the tests not depending on git's\n> default branch name if it changed frequently but realistically we're\n> unlikely to change in again in the near future.\n\nA test that automatically adjusts to the then-current default so\nthat we do not have to worry about what it is is much better than a\ntest that needs constant maintenance every 10 years.  A test that\nuses one fixed name is slightly worse than auto-adjusting one, but\nis still far better as it is maintenance-free.\n\nHardwiring a name the test uses does have one distinct advantage,\ni.e., it serves as a documentation that the test vector depends on\nthe branch name, making it clear where the thing that the test\nexpects comes from.\n\n> If we did use a different name in the tests it is just as likely\n> to cause objections and need to be changed as git's default name\n> so I'm not sure it gains us much.\n\nI do not quite understand.  Do you mean in 20 years some animal\nrights activists object that 'trunk' is offensive to elephants and\nwe will be forced to change?  As I do not see the difference between\n'main' and 'trunk' about how likely either of them get such\ncomplaint against, I can live with hardwiring the branch name used\nin the test 'main', but then 'trunk' would equally work well, so\nunless there are other things the patch changes, I do not quite see\nmuch point in this patch.\n\n\n[Footnote]\n\nBy the way, I do appreciate the \"let's switch the default as\npromised at the major version boundary\", the primary theme of this\ntopic.  I think we have done enough prep work to ensure that the\nresult would work without disruption with existing projects by\nensuring that (1) existing user repositories can keep working, as\nthis is only about the initial branch name, (2) existing project\nrepositories cloned anew will keep working as before, as we follow\nwhat the upstream does.\n\nOne thing that is missing is probably a way to remotely create a\nsymref (or repoint one).  As it would break existing users if an\nupstream suddenly switches its 'master' to 'main', the second best\nthing to do is to ensure that they always point at the same commit,\nand the natural way to do so is to\n\n    $ git symbolic-ref refs/heads/main refs/heads/master\n\nbut we cannot do so remotely.  I've been doing the third best thing\nsince late November 2021, which is to push to both at the same time,\nwhich is ugly but https://git.kernel.org/pub/scm/git/git.git/ and\nother mirrors may tell you that both are available.\n\nAll other mirrors do not have CI attached to them, and they have\nbeen running with both 'main' and 'master' pointing at the same\ncommit for quite some time, but https://github.com/git/git/ does not\nhave 'main'; I attempted back when I arranged to do the \"push to\nboth\" back in November 2021, but it caused two CI jobs on 'master'\nand 'main' run on the identical sources simultanously, wasting\nresources, every time the topics graduated, so I stopped doing so.\n\nPerhaps tweaking the .github/workflows/main.yml file a bit and\nexplicitly excluding either one of these two identical branches\nwould be what it takes, but it would probably be a multi-step\nprocess, to (1) tell it to ignore the 'main' branch, (2) start\npushing to 'main' in addition to 'master', and then finally (3) flip\nthe CI config to tell it to ignore the 'master' branch instead.\n"},{"id":"525156","messageId":"aLDKlfsUrDTrKrl_@fruit.crustytoothpaste.net","threadId":"64047","inReplyTo":"xmqqbjnzwfvk.fsf@gitster.g","subject":"Re: [PATCH 1/6] t0018: switch default branch name to main","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2025-08-28T21:31:01Z","receivedAt":"2025-08-28T21:31:10Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2025-08-28 at 16:49:35, Junio C Hamano wrote:\n> One thing that is missing is probably a way to remotely create a\n> symref (or repoint one).  As it would break existing users if an\n> upstream suddenly switches its 'master' to 'main', the second best\n> thing to do is to ensure that they always point at the same commit,\n> and the natural way to do so is to\n> \n>     $ git symbolic-ref refs/heads/main refs/heads/master\n> \n> but we cannot do so remotely.  I've been doing the third best thing\n> since late November 2021, which is to push to both at the same time,\n> which is ugly but https://git.kernel.org/pub/scm/git/git.git/ and\n> other mirrors may tell you that both are available.\n\nYes, this would be a nice feature to have.  Oftentimes forges have\nexternal functionality that needs to hook in to name changes, so they\nmight not choose to enable such an option, at least at first, but users\nusing things like Gitolite or simply bare repositories over SSH might\nfind this to be very useful.\n-- \nbrian m. carlson (they/them)\nToronto, Ontario, CA\n"},{"id":"525335","messageId":"aLbWuGQhriQCMFbO@pks.im","threadId":"64047","inReplyTo":"487d1a33130cb2fafadcf98da00a332a7408a0e8.1756308283.git.phillip.wood@dunelm.org.uk","subject":"Re: [PATCH 6/6] breaking-changes: switch default branch to main","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-09-02T11:36:24Z","receivedAt":"2025-09-02T11:36:31Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Wed, Aug 27, 2025 at 04:24:50PM +0100, Phillip Wood wrote:\n> From: Phillip Wood <phillip.wood@dunelm.org.uk>\n> \n> Since 1296cbe4b46 (init: document `init.defaultBranch` better,\n> 2020-12-11) \"git-init.adoc\" has advertized that the default name\n\ns/advertized/advertised/\n\n> of the initial branch may change in the future. The name \"main\"\n> is chosen to match the default used by the big git forge web sites.\n\ns/git/Git/\n\n> The advice printed when init.defaultBranch is not set is\n> updated to say that the default will change to \"main\" in Git\n> 3.0. Building with WITH_BREAKING_CHANGES enabled removes the advice,\n> changes the default branch name is \"main\" and removes support for\n\ns/is/to/\n\n> GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME. The code in guess_remote_head()\n\nAs Junio already mentioned, I don't really think it's necessary to drop\n`GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME`, making much of this commit\nseries obsolete.\n\n> that looks for \"refs/heads/master\" is left unchanged as that is only\n> called when the remote server does not support the symref capability\n> in the v0 protocol or the symref extension to the ls-refs list in the\n> v2 protocol. Such an old server is more likely to be using \"master\"\n> as the default branch name.\n\nHm, that's probably fair.\n\n> With the exception of the \"git-init.adoc\" the documentation is left\n> unchanged. I had hoped to parameterize the name of the default branch\n> by using an asciidoc attribute. Unfortunately attribute expansion\n> is inhibited by backticks and we use backticks to mark up ref names\n> so that idea does not work. As the changes to git-init.adoc show\n> inserting ifdef's around each instance of the branch name \"master\"\n> is cumbersome and makes the documentation sources harder to read.\n> \n> Apart from \"git-init.adoc\" there are some other files where \"master\" is\n> used as the name of the initial branch rather than as an example of a\n> branch name such as \"user-manual.adoc\" and \"gitcore-tutorial.adoc\". The\n> name appears a lot in those so updating it with ifdef's is not really\n> practical. We can update that document in the 3.0 release cycle. The\n> other documentation where master is used as an example branch name\n> can be gradually converted over time.\n\nAgreed.\n\n> diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc\n> index f8d2eba061c..93922299321 100644\n> --- a/Documentation/BreakingChanges.adoc\n> +++ b/Documentation/BreakingChanges.adoc\n> @@ -165,6 +165,11 @@ A prerequisite for this change is that the ecosystem is ready to support the\n>  \"reftable\" format. Most importantly, alternative implementations of Git like\n>  JGit, libgit2 and Gitoxide need to support it.\n>  \n> +* The default branch name will be `main`. We have been warning that the default\n\nLet's explicitly mention here that this is only going to be the case for\n_new_ repositories. It's obvious to us, but for others it might not be\nthat existing repositories will not see any change in behaviour due to\nthis.\n\n> +  name will change since 675704c74dd (init: provide useful advice about\n> +  init.defaultBranch, 2020-12-11). The new name matches the default branch name\n> +  used by many of the big git forges.\n\ns/git/Git/\n\n> diff --git a/Documentation/git-init.adoc b/Documentation/git-init.adoc\n> index a0dffba665f..39d4db6bccb 100644\n> --- a/Documentation/git-init.adoc\n> +++ b/Documentation/git-init.adoc\n> @@ -77,9 +77,15 @@ If this is a reinitialization, the repository will be moved to the specified pat\n>  `-b <branch-name>`::\n>  `--initial-branch=<branch-name>`::\n>  Use _<branch-name>_ for the initial branch in the newly created\n> -repository.  If not specified, fall back to the default name (currently\n> -`master`, but this is subject to change in the future; the name can be\n> -customized via the `init.defaultBranch` configuration variable).\n> +repository.  If not specified, fall back to the default name\n> +ifndef::with-breaking-changes[]\n> +(currently `master`, but this will change to `main` when Git 3.0 is released).\n> +endif::with-breaking-changes[]\n> +ifdef::with-breaking-changes[]\n> +(`main`).\n> +endif::with-breaking-changes[]\n> +The default name can be customized via the `init.defaultBranch` configuration\n> +variable.\n>  \n>  `--shared[=(false|true|umask|group|all|world|everybody|<perm>)]`::\n>  \n\nThis is ugly indeed, but we cannot do anything about that *shrug*\n\n> diff --git a/advice.c b/advice.c\n> index e5f0ff84491..48c49ee4145 100644\n> --- a/advice.c\n> +++ b/advice.c\n> @@ -51,7 +51,9 @@ static struct {\n>  \t[ADVICE_AM_WORK_DIR] \t\t\t\t= { \"amWorkDir\" },\n>  \t[ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] \t= { \"checkoutAmbiguousRemoteBranchName\" },\n>  \t[ADVICE_COMMIT_BEFORE_MERGE]\t\t\t= { \"commitBeforeMerge\" },\n> +#ifndef WITH_BREAKING_CHANGES\n>  \t[ADVICE_DEFAULT_BRANCH_NAME]\t\t\t= { \"defaultBranchName\" },\n> +#endif /* WITH_BREAKING_CHANGES */\n>  \t[ADVICE_DETACHED_HEAD]\t\t\t\t= { \"detachedHead\" },\n>  \t[ADVICE_DIVERGING]\t\t\t\t= { \"diverging\" },\n>  \t[ADVICE_FETCH_SET_HEAD_WARN]\t\t\t= { \"fetchRemoteHEADWarn\" },\n> diff --git a/advice.h b/advice.h\n> index 727dcecf4a3..fc1dc872049 100644\n> --- a/advice.h\n> +++ b/advice.h\n> @@ -18,7 +18,9 @@ enum advice_type {\n>  \tADVICE_AM_WORK_DIR,\n>  \tADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME,\n>  \tADVICE_COMMIT_BEFORE_MERGE,\n> +#ifndef WITH_BREAKING_CHANGES\n>  \tADVICE_DEFAULT_BRANCH_NAME,\n> +#endif /* WITH_BREAKING_CHANGES */\n>  \tADVICE_DETACHED_HEAD,\n>  \tADVICE_DIVERGING,\n>  \tADVICE_FETCH_SET_HEAD_WARN,\n\nOkay. I don't really think it's necessary to conditionally compile this,\nbut it doesn't hurt much, either.\n\n> diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh\n> index 01823fd0f14..a21834043f3 100755\n> --- a/ci/run-build-and-tests.sh\n> +++ b/ci/run-build-and-tests.sh\n> @@ -9,7 +9,6 @@ run_tests=t\n>  \n>  case \"$jobname\" in\n>  linux-breaking-changes)\n> -\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n>  \texport WITH_BREAKING_CHANGES=YesPlease\n>  \t;;\n>  linux-TEST-vars)\n\nNice.\n\n> diff --git a/refs.c b/refs.c\n> index 4ff55cf24f6..e73f63ff6b8 100644\n> --- a/refs.c\n> +++ b/refs.c\n> @@ -627,10 +627,12 @@ void expand_ref_prefix(struct strvec *prefixes, const char *prefix)\n>  \t\tstrvec_pushf(prefixes, *p, len, prefix);\n>  }\n>  \n> +#ifndef WITH_BREAKING_CHANGES\n>  static const char default_branch_name_advice[] = N_(\n>  \"Using '%s' as the name for the initial branch. This default branch name\\n\"\n> -\"is subject to change. To configure the initial branch name to use in all\\n\"\n> -\"of your new repositories, which will suppress this warning, call:\\n\"\n> +\"will change to \\\"main\\\" in Git 3.0. To configure the initial branch name\\n\"\n> +\"to use in all of your new repositories, which will suppress this warning,\\n\"\n> +\"call:\\n\"\n>  \"\\n\"\n>  \"\\tgit config --global init.defaultBranch <name>\\n\"\n>  \"\\n\"\n> @@ -639,24 +641,32 @@ static const char default_branch_name_advice[] = N_(\n>  \"\\n\"\n>  \"\\tgit branch -m <name>\\n\"\n>  );\n> +#endif /* WITH_BREAKING_CHANGES */\n>  \n>  char *repo_default_branch_name(struct repository *r, int quiet)\n>  {\n>  \tconst char *config_key = \"init.defaultbranch\";\n>  \tconst char *config_display_key = \"init.defaultBranch\";\n>  \tchar *ret = NULL, *full_ref;\n> +#ifndef WITH_BREAKING_CHANGES\n>  \tconst char *env = getenv(\"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\");\n>  \n>  \tif (env && *env)\n>  \t\tret = xstrdup(env);\n> -\telse if (repo_config_get_string(r, config_key, &ret) < 0)\n> +#endif /* WITH_BREAKING_CHANGES */\n> +\tif (!ret && repo_config_get_string(r, config_key, &ret) < 0)\n>  \t\tdie(_(\"could not retrieve `%s`\"), config_display_key);\n>  \n>  \tif (!ret) {\n> +#ifdef WITH_BREAKING_CHANGES\n> +\t\tret = xstrdup(\"main\");\n> +\t\t(void) quiet; /* Silence -Wunused-parameter */\n\nWe have the `MAYBE_UNUSED` attribute that you can apply to `int\nquiet` to avoid this cast.\n\n> diff --git a/t/t0001-init.sh b/t/t0001-init.sh\n> index f593c536874..7223a98773d 100755\n> --- a/t/t0001-init.sh\n> +++ b/t/t0001-init.sh\n> @@ -868,7 +868,7 @@ test_expect_success 'overridden default initial branch name (config)' '\n>  \tgrep nmb actual\n>  '\n>  \n> -test_expect_success 'advice on unconfigured init.defaultBranch' '\n> +test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' '\n>  \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \\\n>  \t\tinit unconfigured-default-branch-name 2>err &&\n>  \ttest_decode_color <err >decoded &&\n> @@ -883,16 +883,17 @@ test_expect_success 'advice on unconfigured init.defaultBranch disabled' '\n>  \ttest_grep ! \"hint: \" err\n>  '\n>  \n> -test_expect_success 'overridden default main branch name (env)' '\n> +test_expect_success !WITH_BREAKING_CHANGES 'overridden default main branch name (env)' '\n>  \ttest_config_global init.defaultBranch nmb &&\n>  \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=env git init main-branch-env &&\n>  \tgit -C main-branch-env symbolic-ref HEAD >actual &&\n>  \tgrep env actual\n>  '\n>  \n>  test_expect_success 'invalid default branch name' '\n> -\ttest_must_fail env GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=\"with space\" \\\n> -\t\tgit init initial-branch-invalid 2>err &&\n> +\ttest_must_fail env GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \\\n> +\t\tgit -c init.defaultBranch=\"with space\" \\\n> +\t\t\tinit initial-branch-invalid 2>err &&\n>  \ttest_grep \"invalid branch name\" err\n>  '\n>  \n\nShould we also add a test conditional on `WITH_BREAKING_CHANGES` to\nverify that the new branch name is `main` as expected?\n\nThanks for working on this change, I'm very much supportive of this. It\nfeels like the ecosystem has already been moving into that direction, so\nit's time that Git catches up with that change.\n\nPatrick\n"},{"id":"525345","messageId":"96e128d9-e5e3-4bfc-9e33-3caa75cacfe6@gmail.com","threadId":"64047","inReplyTo":"aLbWuGQhriQCMFbO@pks.im","subject":"Re: [PATCH 6/6] breaking-changes: switch default branch to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-02T15:13:27Z","receivedAt":"2025-09-02T15:13:30Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"Hi Patrick\n\nOn 02/09/2025 12:36, Patrick Steinhardt wrote:\n> On Wed, Aug 27, 2025 at 04:24:50PM +0100, Phillip Wood wrote:\n>> From: Phillip Wood <phillip.wood@dunelm.org.uk>\n>>\n>> The advice printed when init.defaultBranch is not set is\n>> updated to say that the default will change to \"main\" in Git\n>> 3.0. Building with WITH_BREAKING_CHANGES enabled removes the advice,\n>> changes the default branch name is \"main\" and removes support for\n> \n> s/is/to/\n> \n>> GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME. The code in guess_remote_head()\n> \n> As Junio already mentioned, I don't really think it's necessary to drop\n> `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME`, making much of this commit\n> series obsolete.\n\nI'm happy to drop those patches if there is a consensus that \nGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME is still useful after we've \nswitched the branch name. I'm still not quite sure what it is useful for \nthough. Removing it makes it clear that the tests are relying on the \nbuiltin default branch name that users see rather than some special name \nused only for tests.\n\n>> that looks for \"refs/heads/master\" is left unchanged as that is only\n>> called when the remote server does not support the symref capability\n>> in the v0 protocol or the symref extension to the ls-refs list in the\n>> v2 protocol. Such an old server is more likely to be using \"master\"\n>> as the default branch name.\n> \n> Hm, that's probably fair.\n\nThat's more or less a direct quote from Peff's mail \n<20250826111234.GA1925107@coredump.intra.peff.net>\n>> diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc\n>> index f8d2eba061c..93922299321 100644\n>> --- a/Documentation/BreakingChanges.adoc\n>> +++ b/Documentation/BreakingChanges.adoc\n>> @@ -165,6 +165,11 @@ A prerequisite for this change is that the ecosystem is ready to support the\n>>   \"reftable\" format. Most importantly, alternative implementations of Git like\n>>   JGit, libgit2 and Gitoxide need to support it.\n>>   \n>> +* The default branch name will be `main`. We have been warning that the default\n> \n> Let's explicitly mention here that this is only going to be the case for\n> _new_ repositories. It's obvious to us, but for others it might not be\n> that existing repositories will not see any change in behaviour due to\n> this.\n\nSure\n\n>> diff --git a/advice.h b/advice.h\n>> index 727dcecf4a3..fc1dc872049 100644\n>> --- a/advice.h\n>> +++ b/advice.h\n>> @@ -18,7 +18,9 @@ enum advice_type {\n>>   \tADVICE_AM_WORK_DIR,\n>>   \tADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME,\n>>   \tADVICE_COMMIT_BEFORE_MERGE,\n>> +#ifndef WITH_BREAKING_CHANGES\n>>   \tADVICE_DEFAULT_BRANCH_NAME,\n>> +#endif /* WITH_BREAKING_CHANGES */\n>>   \tADVICE_DETACHED_HEAD,\n>>   \tADVICE_DIVERGING,\n>>   \tADVICE_FETCH_SET_HEAD_WARN,\n> \n> Okay. I don't really think it's necessary to conditionally compile this,\n> but it doesn't hurt much, either.\n\nMy thought was that by making it conditional, it makes it harder to \nforget to remove this after Git 3.0\n>> diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh\n>> index 01823fd0f14..a21834043f3 100755\n>> --- a/ci/run-build-and-tests.sh\n>> +++ b/ci/run-build-and-tests.sh\n>> @@ -9,7 +9,6 @@ run_tests=t\n>>   \n>>   case \"$jobname\" in\n>>   linux-breaking-changes)\n>> -\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n>>   \texport WITH_BREAKING_CHANGES=YesPlease\n>>   \t;;\n>>   linux-TEST-vars)\n> \n> Nice.\n\nOnly if we remove GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME though? Part of \nthe reason for removing it was to make it clear that the tests are using \n\"main\" when WITH_BREAKING_CHANGES is enabled.\n\n>> diff --git a/refs.c b/refs.c\n>> index 4ff55cf24f6..e73f63ff6b8 100644\n>> --- a/refs.c\n>> +++ b/refs.c\n >> [...]>> +#ifdef WITH_BREAKING_CHANGES\n>> +\t\tret = xstrdup(\"main\");\n>> +\t\t(void) quiet; /* Silence -Wunused-parameter */\n> \n> We have the `MAYBE_UNUSED` attribute that you can apply to `int\n> quiet` to avoid this cast.\n\nThanks, I didn't know we had that\n\n>> diff --git a/t/t0001-init.sh b/t/t0001-init.sh\n>> index f593c536874..7223a98773d 100755\n>> --- a/t/t0001-init.sh\n>> +++ b/t/t0001-init.sh\n>> [...]\n> Should we also add a test conditional on `WITH_BREAKING_CHANGES` to\n> verify that the new branch name is `main` as expected?\n\nIf we remove GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME then all of the tests \nthat rely on the branch name \"main\" are testing that. If we keep that \nvariable then we should probably add a test that unsets \nGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME and ensures the default branch name \nis \"main\"\n> Thanks for working on this change, I'm very much supportive of this. It\n> feels like the ecosystem has already been moving into that direction, so\n> it's time that Git catches up with that change.\n\nThanks for your comments, I'll try and re-roll later this week.\n\nPhillip\n\n"},{"id":"525390","messageId":"aLfHvl5JuttXrI0y@pks.im","threadId":"64047","inReplyTo":"96e128d9-e5e3-4bfc-9e33-3caa75cacfe6@gmail.com","subject":"Re: [PATCH 6/6] breaking-changes: switch default branch to main","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-09-03T04:44:46Z","receivedAt":"2025-09-03T04:44:53Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Tue, Sep 02, 2025 at 04:13:27PM +0100, Phillip Wood wrote:\n> On 02/09/2025 12:36, Patrick Steinhardt wrote:\n> > On Wed, Aug 27, 2025 at 04:24:50PM +0100, Phillip Wood wrote:\n> > > From: Phillip Wood <phillip.wood@dunelm.org.uk>\n> > > \n> > > The advice printed when init.defaultBranch is not set is\n> > > updated to say that the default will change to \"main\" in Git\n> > > 3.0. Building with WITH_BREAKING_CHANGES enabled removes the advice,\n> > > changes the default branch name is \"main\" and removes support for\n> > \n> > s/is/to/\n> > \n> > > GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME. The code in guess_remote_head()\n> > \n> > As Junio already mentioned, I don't really think it's necessary to drop\n> > `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME`, making much of this commit\n> > series obsolete.\n> \n> I'm happy to drop those patches if there is a consensus that\n> GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME is still useful after we've switched\n> the branch name. I'm still not quite sure what it is useful for though.\n> Removing it makes it clear that the tests are relying on the builtin default\n> branch name that users see rather than some special name used only for\n> tests.\n\nWe may eventually want to remove the whole infra. But I just don't think\nit's necessary as part of the Git 3.0 deprecation and that we can rather\ndo it as a follow-up once Git 3.0 is out of the door.\n\nIIRC, the initial idea behind this variable was to adapt tests to not\neven care what the default initial branch name is in the first place.\nTests should be agnostic of that name and use e.g. git-symbolic-ref(1)\nto figure out what HEAD points to. So maybe we should follow through\nwith that idea and start refactoring tests into this direction so that\nthey never set or read the variable in the first place.\n\nCould very well be that I misremember though.\n\nPatrick\n"},{"id":"525410","messageId":"9d52f24e-d495-44d4-b122-7d80d1f4b77f@gmail.com","threadId":"64047","inReplyTo":"aLfHvl5JuttXrI0y@pks.im","subject":"Re: [PATCH 6/6] breaking-changes: switch default branch to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-03T09:54:06Z","receivedAt":"2025-09-03T09:54:10Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 03/09/2025 05:44, Patrick Steinhardt wrote:\n> On Tue, Sep 02, 2025 at 04:13:27PM +0100, Phillip Wood wrote:\n>>\n>> I'm happy to drop those patches if there is a consensus that\n>> GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME is still useful after we've switched\n>> the branch name. I'm still not quite sure what it is useful for though.\n>> Removing it makes it clear that the tests are relying on the builtin default\n>> branch name that users see rather than some special name used only for\n>> tests.\n> \n> We may eventually want to remove the whole infra. But I just don't think\n> it's necessary as part of the Git 3.0 deprecation and that we can rather\n> do it as a follow-up once Git 3.0 is out of the door.\n> \n> IIRC, the initial idea behind this variable was to adapt tests to not\n> even care what the default initial branch name is in the first place.\n\nWhen the variable was introduced in 704fed9ea22 (tests: start moving to \na different default main branch name, 2020-10-23) it was described as \n\"This `GIT_TEST_*` variable is meant purely for the transitional period \nwhile the entire test suite is converted to use `main` as the initial \nbranch name by default.\" The way it has been used is to allow tests to \ncontinue to hard code a fixed name for the default initial branch.\n\n> Tests should be agnostic of that name and use e.g. git-symbolic-ref(1)\n> to figure out what HEAD points to. So maybe we should follow through\n> with that idea and start refactoring tests into this direction so that\n> they never set or read the variable in the first place.\n\nThat might be a good direction for the future. The test suite could set \nTEST_DEFAULT_BRANCH to the default name and tests could use that rather \nsetting GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME and hard coding the \nexpected name or running 'git symbolic-ref'.\n\nI'll drop the removal of GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME but I'd \nlike to keep the patches that switch the tests from using \"master\" to \n\"main\". We've converted nearly all of the tests already so it seems a \nshame to leave a handful unconverted.\n\nThanks\n\nPhillip\n\n"},{"id":"525421","messageId":"aLgrtLtqTnSOatTD@pks.im","threadId":"64047","inReplyTo":"9d52f24e-d495-44d4-b122-7d80d1f4b77f@gmail.com","subject":"Re: [PATCH 6/6] breaking-changes: switch default branch to main","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-09-03T11:51:16Z","receivedAt":"2025-09-03T11:51:23Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Wed, Sep 03, 2025 at 10:54:06AM +0100, Phillip Wood wrote:\n> On 03/09/2025 05:44, Patrick Steinhardt wrote:\n> > Tests should be agnostic of that name and use e.g. git-symbolic-ref(1)\n> > to figure out what HEAD points to. So maybe we should follow through\n> > with that idea and start refactoring tests into this direction so that\n> > they never set or read the variable in the first place.\n> \n> That might be a good direction for the future. The test suite could set\n> TEST_DEFAULT_BRANCH to the default name and tests could use that rather\n> setting GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME and hard coding the expected\n> name or running 'git symbolic-ref'.\n> \n> I'll drop the removal of GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME but I'd like\n> to keep the patches that switch the tests from using \"master\" to \"main\".\n> We've converted nearly all of the tests already so it seems a shame to leave\n> a handful unconverted.\n\nFair enough.\n\nPatrick\n"},{"id":"525455","messageId":"xmqqcy87fkhm.fsf@gitster.g","threadId":"64047","inReplyTo":"9d52f24e-d495-44d4-b122-7d80d1f4b77f@gmail.com","subject":"Re: [PATCH 6/6] breaking-changes: switch default branch to main","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-09-03T18:40:05Z","receivedAt":"2025-09-03T18:40:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n> When the variable was introduced in 704fed9ea22 (tests: start moving\n> to a different default main branch name, 2020-10-23) it was described\n> as \"This `GIT_TEST_*` variable is meant purely for the transitional\n> period while the entire test suite is converted to use `main` as the\n> initial branch name by default.\" The way it has been used is to allow\n> tests to continue to hard code a fixed name for the default initial\n> branch.\n\nYes, but ripping it out would mean that you make it much harder to\ntransition out of 'main' and move to the next correct name when the\nneed comes, wouldn't it?\n\n> ... like to keep the patches that switch the tests from using\n> \"master\" to \"main\".\n\nI have no problem with that.  I am still unsure about that \"reftable\ncares about the name being 'master'\" thing.  If that can live with\nany 6 byte name, we may want to fix it to something different from\n'master', for the sake of removing 'master'.  Perhaps 'banana' or\nsomething?\n\n"},{"id":"525484","messageId":"aLk7QEEWy4nWxsQK@pks.im","threadId":"64047","inReplyTo":"xmqqcy87fkhm.fsf@gitster.g","subject":"Re: [PATCH 6/6] breaking-changes: switch default branch to main","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-09-04T07:09:52Z","receivedAt":"2025-09-04T07:10:00Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Wed, Sep 03, 2025 at 11:40:05AM -0700, Junio C Hamano wrote:\n> Phillip Wood <phillip.wood123@gmail.com> writes:\n> \n> > When the variable was introduced in 704fed9ea22 (tests: start moving\n> > to a different default main branch name, 2020-10-23) it was described\n> > as \"This `GIT_TEST_*` variable is meant purely for the transitional\n> > period while the entire test suite is converted to use `main` as the\n> > initial branch name by default.\" The way it has been used is to allow\n> > tests to continue to hard code a fixed name for the default initial\n> > branch.\n> \n> Yes, but ripping it out would mean that you make it much harder to\n> transition out of 'main' and move to the next correct name when the\n> need comes, wouldn't it?\n\nI guess it depends. If we transition our tests towards becoming mostly\nagnostic of the default branch name then we can strip out the whole\ninfra but still remain agile.\n\n> > ... like to keep the patches that switch the tests from using\n> > \"master\" to \"main\".\n> \n> I have no problem with that.  I am still unsure about that \"reftable\n> cares about the name being 'master'\" thing.  If that can live with\n> any 6 byte name, we may want to fix it to something different from\n> 'master', for the sake of removing 'master'.  Perhaps 'banana' or\n> something?\n\nHuh, did I miss anything? I scanned the thread for reftables but\ncouldn't find any discussion around it relying on a 6 byte name. Could\nyou maybe provide a pointer to what you are referring to?\n\nThanks!\n\nPatrick\n"},{"id":"525505","messageId":"cover.1756992089.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1756308283.git.phillip.wood@dunelm.org.uk","subject":"[PATCH v2 0/4] breaking changes: switch default initial branch name to \"main\"","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-04T13:21:28Z","receivedAt":"2025-09-04T13:22:56Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nThis series switches the default branch name from \"master\" to \"main\"\nwhen WITH_BREAKING_CHANGES is enabled. We have been warning that the\ndefault name will change since 675704c74dd (init: provide useful advice\nabout init.defaultBranch, 2020-12-11) and the major git forges have all\nswitched their default branch name to \"main\", so I think it makes sense\nto change the default branch name in git to match the wider ecosystem.\n\nThe first patch switches the default initial branch name to \"main\"\nand the other three patches remove the last remaining instances of\nGIT_TEST_DEFAULT_BRANCH_NAME=master from the test suite. Patch 2 is\nquite large but is mechanically generated so it should be possible\nto review it by checking that the changes can be reproduced. As this\nseries changes the default branch name it focuses on updating tests\nthat rely on the default branch name being \"master\", there are still\na number of tests that create a branch called \"master\".\n\nThanks to everyone who commented on V1, I have dropped the removal of\nGIT_TEST_DEFAULT_BRANCH_NAME and the test changes related to that but\nhave kept the patches that remove GIT_TEST_DEFAULT_BRANCH_NAME=master.\nThe patches have been re-ordered so that the change to the default\ninitial branch name comes first. That patch now includes a test\nfor the default initial branch name and includes the changes to the\ncommit message and documentation suggested by Patrick and Junio. The\ncommit messages for the other patches have been reworded now that\nGIT_TEST_DEFAULT_BRANCH_NAME is not being removed but the code changes\nare the same.\n\nThis is an alternative to changing the branch name now as suggested in\nhttps://lore.kernel.org<pull.1961.git.1756183921623.gitgitgadget@gmail.com\n\nBase-Commit: f814da676ae46aac5be0a98b99373a76dee6cedb\nPublished-As: https://github.com/phillipwood/git/releases/tag/pw%2Finitial-branch-is-main%2Fv2\nView-Changes-At: https://github.com/phillipwood/git/compare/f814da676...c4d89c376\nFetch-It-Via: git fetch https://github.com/phillipwood/git pw/initial-branch-is-main/v2\n\n\nPhillip Wood (4):\n  breaking-changes: switch default branch to main\n  t4013: switch default branch name to main\n  t9902: switch default branch name to main\n  t0613: stop setting default initial branch\n\n Documentation/BreakingChanges.adoc            |   5 +\n Documentation/git-init.adoc                   |  12 +-\n advice.c                                      |   2 +\n advice.h                                      |   2 +\n ci/run-build-and-tests.sh                     |   1 -\n refs.c                                        |  15 +-\n t/t0001-init.sh                               |  18 +-\n t/t0613-reftable-write-options.sh             |  20 +-\n t/t4013-diff-various.sh                       | 228 +++++++++---------\n ...ree_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...iff.diff-tree_--cc_--patch-with-stat_main} |   2 +-\n ...r => diff.diff-tree_--cc_--shortstat_main} |   2 +-\n ...diff.diff-tree_--cc_--stat_--summary_main} |   2 +-\n ...master => diff.diff-tree_--cc_--stat_main} |   2 +-\n ...e_--cc_master => diff.diff-tree_--cc_main} |   2 +-\n ...master => diff.diff-tree_-c_--abbrev_main} |   2 +-\n ...> diff.diff-tree_-c_--stat_--summary_main} |   2 +-\n ...t_master => diff.diff-tree_-c_--stat_main} |   2 +-\n ...-tree_-c_master => diff.diff-tree_-c_main} |   2 +-\n ...-tree_-m_master => diff.diff-tree_-m_main} |   2 +-\n ...-p_-m_master => diff.diff-tree_-p_-m_main} |   2 +-\n t/t4013/diff.diff-tree_-p_main                |   2 +\n t/t4013/diff.diff-tree_-p_master              |   2 -\n t/t4013/diff.diff-tree_main                   |   2 +\n t/t4013/diff.diff-tree_master                 |   2 -\n t/t4013/diff.diff_--dirstat_--cc_main~1_main  |   3 +\n .../diff.diff_--dirstat_--cc_master~1_master  |   3 -\n t/t4013/diff.diff_--dirstat_main~1_main~2     |   3 +\n t/t4013/diff.diff_--dirstat_master~1_master~2 |   3 -\n ...ff.diff_--line-prefix=abc_main_main^_side} |   2 +-\n ...master^_side => diff.diff_main_main^_side} |   2 +-\n ...mat-patch_--attach_--stdout_initial..main} |   2 +-\n ...at-patch_--attach_--stdout_initial..main^} |   2 +-\n ...e_--stdout_--numbered-files_initial..main} |   2 +-\n ...t_--subject-prefix=TESTCASE_initial..main} |   2 +-\n ...mat-patch_--inline_--stdout_initial..main} |   2 +-\n ...at-patch_--inline_--stdout_initial..main^} |   2 +-\n ...t-patch_--inline_--stdout_initial..main^^} |   2 +-\n ...--stdout_--cover-letter_-n_initial..main^} |   2 +-\n ...atch_--stdout_--no-numbered_initial..main} |   2 +-\n ...t-patch_--stdout_--numbered_initial..main} |   2 +-\n ... diff.format-patch_--stdout_initial..main} |   2 +-\n ...diff.format-patch_--stdout_initial..main^} |   2 +-\n ..._-m_-p_master => diff.log_--cc_-m_-p_main} |   2 +-\n t/t4013/diff.log_--decorate=full_--all        |   2 +-\n ..._--decorate=full_--clear-decorations_--all |   2 +-\n ...f.log_--decorate=full_--decorate-all_--all |   2 +-\n t/t4013/diff.log_--decorate_--all             |   2 +-\n ...f.log_--decorate_--clear-decorations_--all |   2 +-\n .../diff.log_--decorate_--decorate-all_--all  |   2 +-\n ... diff.log_--diff-merges=first-parent_main} |   2 +-\n ..._--diff-merges=off_-p_--first-parent_main} |   2 +-\n ..._--first-parent_--diff-merges=off_-p_main} |   2 +-\n ...g_--no-diff-merges_-p_--first-parent_main} |   2 +-\n ..._--patch-with-stat_--summary_main_--_dir_} |   2 +-\n ...master => diff.log_--patch-with-stat_main} |   2 +-\n ...> diff.log_--patch-with-stat_main_--_dir_} |   2 +-\n ...oot_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...g_--root_--patch-with-stat_--summary_main} |   2 +-\n ...=> diff.log_--root_--patch-with-stat_main} |   2 +-\n ...-root_-c_--patch-with-stat_--summary_main} |   2 +-\n ...root_-p_master => diff.log_--root_-p_main} |   2 +-\n ...log_--root_master => diff.log_--root_main} |   2 +-\n ...ter => diff.log_-GF_-p_--pickaxe-all_main} |   2 +-\n ...log_-GF_-p_master => diff.log_-GF_-p_main} |   2 +-\n ...{diff.log_-SF_master => diff.log_-GF_main} |   2 +-\n ...aster => diff.log_-IA_-IB_-I1_-I2_-p_main} |   2 +-\n ...log_-SF_-p_master => diff.log_-SF_-p_main} |   2 +-\n ...{diff.log_-GF_master => diff.log_-SF_main} |   2 +-\n t/t4013/diff.log_-SF_main_--max-count=0       |   2 +\n ...ount=2 => diff.log_-SF_main_--max-count=1} |   2 +-\n t/t4013/diff.log_-SF_main_--max-count=2       |   7 +\n t/t4013/diff.log_-SF_master_--max-count=0     |   2 -\n t/t4013/diff.log_-SF_master_--max-count=1     |   7 -\n ...iff.log_-S_F_master => diff.log_-S_F_main} |   2 +-\n ...cc_-m_-p_master => diff.log_-c_-m_-p_main} |   2 +-\n ...-m_--raw_master => diff.log_-m_--raw_main} |   2 +-\n ..._--stat_master => diff.log_-m_--stat_main} |   2 +-\n ...ter => diff.log_-m_-p_--first-parent_main} |   2 +-\n ...f.log_-m_-p_master => diff.log_-m_-p_main} |   2 +-\n ...ff.log_-p_--diff-merges=first-parent_main} |   2 +-\n ...master => diff.log_-p_--first-parent_main} |   2 +-\n .../{diff.log_-p_master => diff.log_-p_main}  |   2 +-\n t/t4013/{diff.log_master => diff.log_main}    |   2 +-\n ...iff.noellipses-diff-tree_-c_--abbrev_main} |   2 +-\n ...> diff.noellipses-whatchanged_--root_main} |   2 +-\n ...r => diff.noellipses-whatchanged_-SF_main} |   2 +-\n ...aster => diff.noellipses-whatchanged_main} |   2 +-\n ...t_master => diff.show_--first-parent_main} |   2 +-\n ...{diff.show_-c_master => diff.show_-c_main} |   2 +-\n ...{diff.show_-m_master => diff.show_-m_main} |   2 +-\n t/t4013/{diff.show_master => diff.show_main}  |   2 +-\n ..._--patch-with-stat_--summary_main_--_dir_} |   2 +-\n ...> diff.whatchanged_--patch-with-stat_main} |   2 +-\n ...hatchanged_--patch-with-stat_main_--_dir_} |   2 +-\n ...oot_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...d_--root_--patch-with-stat_--summary_main} |   2 +-\n ...whatchanged_--root_--patch-with-stat_main} |   2 +-\n ...-root_-c_--patch-with-stat_--summary_main} |   2 +-\n ...master => diff.whatchanged_--root_-p_main} |   2 +-\n ...ot_master => diff.whatchanged_--root_main} |   2 +-\n ...-p_master => diff.whatchanged_-SF_-p_main} |   2 +-\n ...d_-SF_master => diff.whatchanged_-SF_main} |   2 +-\n ...ged_-p_master => diff.whatchanged_-p_main} |   2 +-\n ...atchanged_master => diff.whatchanged_main} |   2 +-\n t/t9902-completion.sh                         |   6 +-\n t/test-lib.sh                                 |  11 +-\n 107 files changed, 282 insertions(+), 244 deletions(-)\n rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_--summary_master => diff.diff-tree_--cc_--patch-with-stat_--summary_main} (86%)\n rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_master => diff.diff-tree_--cc_--patch-with-stat_main} (89%)\n rename t/t4013/{diff.diff-tree_--cc_--shortstat_master => diff.diff-tree_--cc_--shortstat_main} (65%)\n rename t/t4013/{diff.diff-tree_-c_--stat_--summary_master => diff.diff-tree_--cc_--stat_--summary_main} (71%)\n rename t/t4013/{diff.diff-tree_-c_--stat_master => diff.diff-tree_--cc_--stat_main} (76%)\n rename t/t4013/{diff.diff-tree_--cc_master => diff.diff-tree_--cc_main} (91%)\n rename t/t4013/{diff.diff-tree_-c_--abbrev_master => diff.diff-tree_-c_--abbrev_main} (83%)\n rename t/t4013/{diff.diff-tree_--cc_--stat_--summary_master => diff.diff-tree_-c_--stat_--summary_main} (70%)\n rename t/t4013/{diff.diff-tree_--cc_--stat_master => diff.diff-tree_-c_--stat_main} (75%)\n rename t/t4013/{diff.diff-tree_-c_master => diff.diff-tree_-c_main} (93%)\n rename t/t4013/{diff.diff-tree_-m_master => diff.diff-tree_-m_main} (96%)\n rename t/t4013/{diff.diff-tree_-p_-m_master => diff.diff-tree_-p_-m_main} (97%)\n create mode 100644 t/t4013/diff.diff-tree_-p_main\n delete mode 100644 t/t4013/diff.diff-tree_-p_master\n create mode 100644 t/t4013/diff.diff-tree_main\n delete mode 100644 t/t4013/diff.diff-tree_master\n create mode 100644 t/t4013/diff.diff_--dirstat_--cc_main~1_main\n delete mode 100644 t/t4013/diff.diff_--dirstat_--cc_master~1_master\n create mode 100644 t/t4013/diff.diff_--dirstat_main~1_main~2\n delete mode 100644 t/t4013/diff.diff_--dirstat_master~1_master~2\n rename t/t4013/{diff.diff_--line-prefix=abc_master_master^_side => diff.diff_--line-prefix=abc_main_main^_side} (87%)\n rename t/t4013/{diff.diff_master_master^_side => diff.diff_main_main^_side} (89%)\n rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master => diff.format-patch_--attach_--stdout_initial..main} (98%)\n rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master^ => diff.format-patch_--attach_--stdout_initial..main^} (97%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_--numbered-files_initial..master => diff.format-patch_--inline_--stdout_--numbered-files_initial..main} (99%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master => diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main} (99%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master => diff.format-patch_--inline_--stdout_initial..main} (98%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^ => diff.format-patch_--inline_--stdout_initial..main^} (97%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^^ => diff.format-patch_--inline_--stdout_initial..main^^} (95%)\n rename t/t4013/{diff.format-patch_--stdout_--cover-letter_-n_initial..master^ => diff.format-patch_--stdout_--cover-letter_-n_initial..main^} (96%)\n rename t/t4013/{diff.format-patch_--stdout_--no-numbered_initial..master => diff.format-patch_--stdout_--no-numbered_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_--numbered_initial..master => diff.format-patch_--stdout_--numbered_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_initial..master => diff.format-patch_--stdout_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_initial..master^ => diff.format-patch_--stdout_initial..main^} (96%)\n rename t/t4013/{diff.log_-c_-m_-p_master => diff.log_--cc_-m_-p_main} (99%)\n rename t/t4013/{diff.log_--diff-merges=first-parent_master => diff.log_--diff-merges=first-parent_main} (95%)\n rename t/t4013/{diff.log_--no-diff-merges_-p_--first-parent_master => diff.log_--diff-merges=off_-p_--first-parent_main} (95%)\n rename t/t4013/{diff.log_--first-parent_--diff-merges=off_-p_master => diff.log_--first-parent_--diff-merges=off_-p_main} (95%)\n rename t/t4013/{diff.log_--diff-merges=off_-p_--first-parent_master => diff.log_--no-diff-merges_-p_--first-parent_main} (95%)\n rename t/t4013/{diff.log_--patch-with-stat_--summary_master_--_dir_ => diff.log_--patch-with-stat_--summary_main_--_dir_} (96%)\n rename t/t4013/{diff.log_--patch-with-stat_master => diff.log_--patch-with-stat_main} (98%)\n rename t/t4013/{diff.log_--patch-with-stat_master_--_dir_ => diff.log_--patch-with-stat_main_--_dir_} (96%)\n rename t/t4013/{diff.log_--root_--cc_--patch-with-stat_--summary_master => diff.log_--root_--cc_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_--patch-with-stat_--summary_master => diff.log_--root_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_--patch-with-stat_master => diff.log_--root_--patch-with-stat_main} (98%)\n rename t/t4013/{diff.log_--root_-c_--patch-with-stat_--summary_master => diff.log_--root_-c_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_-p_master => diff.log_--root_-p_main} (98%)\n rename t/t4013/{diff.log_--root_master => diff.log_--root_main} (96%)\n rename t/t4013/{diff.log_-GF_-p_--pickaxe-all_master => diff.log_-GF_-p_--pickaxe-all_main} (90%)\n rename t/t4013/{diff.log_-GF_-p_master => diff.log_-GF_-p_main} (91%)\n rename t/t4013/{diff.log_-SF_master => diff.log_-GF_main} (86%)\n rename t/t4013/{diff.log_-IA_-IB_-I1_-I2_-p_master => diff.log_-IA_-IB_-I1_-I2_-p_main} (97%)\n rename t/t4013/{diff.log_-SF_-p_master => diff.log_-SF_-p_main} (91%)\n rename t/t4013/{diff.log_-GF_master => diff.log_-SF_main} (86%)\n create mode 100644 t/t4013/diff.log_-SF_main_--max-count=0\n rename t/t4013/{diff.log_-SF_master_--max-count=2 => diff.log_-SF_main_--max-count=1} (79%)\n create mode 100644 t/t4013/diff.log_-SF_main_--max-count=2\n delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=0\n delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=1\n rename t/t4013/{diff.log_-S_F_master => diff.log_-S_F_main} (86%)\n rename t/t4013/{diff.log_--cc_-m_-p_master => diff.log_-c_-m_-p_main} (99%)\n rename t/t4013/{diff.log_-m_--raw_master => diff.log_-m_--raw_main} (98%)\n rename t/t4013/{diff.log_-m_--stat_master => diff.log_-m_--stat_main} (98%)\n rename t/t4013/{diff.log_-m_-p_--first-parent_master => diff.log_-m_-p_--first-parent_main} (97%)\n rename t/t4013/{diff.log_-m_-p_master => diff.log_-m_-p_main} (99%)\n rename t/t4013/{diff.log_-p_--diff-merges=first-parent_master => diff.log_-p_--diff-merges=first-parent_main} (97%)\n rename t/t4013/{diff.log_-p_--first-parent_master => diff.log_-p_--first-parent_main} (97%)\n rename t/t4013/{diff.log_-p_master => diff.log_-p_main} (98%)\n rename t/t4013/{diff.log_master => diff.log_main} (97%)\n rename t/t4013/{diff.noellipses-diff-tree_-c_--abbrev_master => diff.noellipses-diff-tree_-c_--abbrev_main} (81%)\n rename t/t4013/{diff.noellipses-whatchanged_--root_master => diff.noellipses-whatchanged_--root_main} (96%)\n rename t/t4013/{diff.noellipses-whatchanged_-SF_master => diff.noellipses-whatchanged_-SF_main} (86%)\n rename t/t4013/{diff.noellipses-whatchanged_master => diff.noellipses-whatchanged_main} (96%)\n rename t/t4013/{diff.show_--first-parent_master => diff.show_--first-parent_main} (92%)\n rename t/t4013/{diff.show_-c_master => diff.show_-c_main} (95%)\n rename t/t4013/{diff.show_-m_master => diff.show_-m_main} (98%)\n rename t/t4013/{diff.show_master => diff.show_main} (96%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ => diff.whatchanged_--patch-with-stat_--summary_main_--_dir_} (94%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_master => diff.whatchanged_--patch-with-stat_main} (97%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_master_--_dir_ => diff.whatchanged_--patch-with-stat_main_--_dir_} (94%)\n rename t/t4013/{diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master => diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_--summary_master => diff.whatchanged_--root_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_master => diff.whatchanged_--root_--patch-with-stat_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_-c_--patch-with-stat_--summary_master => diff.whatchanged_--root_-c_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_-p_master => diff.whatchanged_--root_-p_main} (98%)\n rename t/t4013/{diff.whatchanged_--root_master => diff.whatchanged_--root_main} (97%)\n rename t/t4013/{diff.whatchanged_-SF_-p_master => diff.whatchanged_-SF_-p_main} (89%)\n rename t/t4013/{diff.whatchanged_-SF_master => diff.whatchanged_-SF_main} (86%)\n rename t/t4013/{diff.whatchanged_-p_master => diff.whatchanged_-p_main} (98%)\n rename t/t4013/{diff.whatchanged_master => diff.whatchanged_main} (97%)\n\nRange-diff against v1:\n1:  7c20f7693f4 < -:  ----------- t0018: switch default branch name to main\n6:  487d1a33130 ! 1:  6986375dc37 breaking-changes: switch default branch to main\n    @@ Commit message\n         breaking-changes: switch default branch to main\n     \n         Since 1296cbe4b46 (init: document `init.defaultBranch` better,\n    -    2020-12-11) \"git-init.adoc\" has advertized that the default name\n    +    2020-12-11) \"git-init.adoc\" has advertised that the default name\n         of the initial branch may change in the future. The name \"main\"\n    -    is chosen to match the default used by the big git forge web sites.\n    +    is chosen to match the default used by the big Git forge web sites.\n     \n    -    The advice printed when init.defaultBranch is not set is\n    -    updated to say that the default will change to \"main\" in Git\n    -    3.0. Building with WITH_BREAKING_CHANGES enabled removes the advice,\n    -    changes the default branch name is \"main\" and removes support for\n    -    GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME. The code in guess_remote_head()\n    +    The advice printed when init.defaultBranch is not set is updated\n    +    to say that the default will change to \"main\" in Git 3.0. Building\n    +    with WITH_BREAKING_CHANGES enabled removes the advice and changes\n    +    the default branch name to \"main\". The code in guess_remote_head()\n         that looks for \"refs/heads/master\" is left unchanged as that is only\n         called when the remote server does not support the symref capability\n         in the v0 protocol or the symref extension to the ls-refs list in the\n    @@ Documentation/BreakingChanges.adoc: A prerequisite for this change is that the e\n      \"reftable\" format. Most importantly, alternative implementations of Git like\n      JGit, libgit2 and Gitoxide need to support it.\n      \n    -+* The default branch name will be `main`. We have been warning that the default\n    -+  name will change since 675704c74dd (init: provide useful advice about\n    -+  init.defaultBranch, 2020-12-11). The new name matches the default branch name\n    -+  used by many of the big git forges.\n    ++* In new repositories the default branch name will be `main`. We have been\n    ++  warning that the default name will change since 675704c74dd (init: provide\n    ++  useful advice about init.defaultBranch, 2020-12-11).  The new name matches\n    ++  the default branch name used by many of the big Git forges.\n     +\n      === Removals\n      \n    @@ Documentation/git-init.adoc: If this is a reinitialization, the repository will\n     +(currently `master`, but this will change to `main` when Git 3.0 is released).\n     +endif::with-breaking-changes[]\n     +ifdef::with-breaking-changes[]\n    -+(`main`).\n    ++`main`.\n     +endif::with-breaking-changes[]\n     +The default name can be customized via the `init.defaultBranch` configuration\n     +variable.\n    @@ refs.c: static const char default_branch_name_advice[] = N_(\n      );\n     +#endif /* WITH_BREAKING_CHANGES */\n      \n    - char *repo_default_branch_name(struct repository *r, int quiet)\n    +-char *repo_default_branch_name(struct repository *r, int quiet)\n    ++char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet)\n      {\n      \tconst char *config_key = \"init.defaultbranch\";\n      \tconst char *config_display_key = \"init.defaultBranch\";\n    - \tchar *ret = NULL, *full_ref;\n    -+#ifndef WITH_BREAKING_CHANGES\n    - \tconst char *env = getenv(\"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\");\n    +@@ refs.c: char *repo_default_branch_name(struct repository *r, int quiet)\n      \n      \tif (env && *env)\n      \t\tret = xstrdup(env);\n     -\telse if (repo_config_get_string(r, config_key, &ret) < 0)\n    -+#endif /* WITH_BREAKING_CHANGES */\n     +\tif (!ret && repo_config_get_string(r, config_key, &ret) < 0)\n      \t\tdie(_(\"could not retrieve `%s`\"), config_display_key);\n      \n      \tif (!ret) {\n     +#ifdef WITH_BREAKING_CHANGES\n     +\t\tret = xstrdup(\"main\");\n    -+\t\t(void) quiet; /* Silence -Wunused-parameter */\n     +#else\n      \t\tret = xstrdup(\"master\");\n      \t\tif (!quiet)\n    @@ t/t0001-init.sh: test_expect_success 'advice on unconfigured init.defaultBranch\n      \ttest_grep ! \"hint: \" err\n      '\n      \n    --test_expect_success 'overridden default main branch name (env)' '\n    -+test_expect_success !WITH_BREAKING_CHANGES 'overridden default main branch name (env)' '\n    ++test_expect_success 'default branch name' '\n    ++\tif test_have_prereq WITH_BREAKING_CHANGES\n    ++\tthen\n    ++\t\texpect=main\n    ++\telse\n    ++\t\texpect=master\n    ++\tfi &&\n    ++\techo \"refs/heads/$expect\" >expect &&\n    ++\t(\n    ++\t\tsane_unset GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME &&\n    ++\t\tgit init default-initial-branch-name\n    ++\t) &&\n    ++\tgit -C default-initial-branch-name symbolic-ref HEAD >actual &&\n    ++\ttest_cmp expect actual\n    ++'\n    ++\n    + test_expect_success 'overridden default main branch name (env)' '\n      \ttest_config_global init.defaultBranch nmb &&\n      \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=env git init main-branch-env &&\n    - \tgit -C main-branch-env symbolic-ref HEAD >actual &&\n    - \tgrep env actual\n    - '\n    - \n    - test_expect_success 'invalid default branch name' '\n    --\ttest_must_fail env GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=\"with space\" \\\n    --\t\tgit init initial-branch-invalid 2>err &&\n    -+\ttest_must_fail env GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \\\n    -+\t\tgit -c init.defaultBranch=\"with space\" \\\n    -+\t\t\tinit initial-branch-invalid 2>err &&\n    - \ttest_grep \"invalid branch name\" err\n    - '\n    - \n     \n      ## t/test-lib.sh ##\n     @@ t/test-lib.sh: then\n    @@ t/test-lib.sh: then\n     +\t# transitory \"git init\" warning under --verbose.\n     +\t: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master}\n     +\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n    -+else\n    -+\t# Unset the default branch name that is set in many test scripts\n    -+\t# before sourcing this file.\n    -+\tunset GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n     +fi\n      \n      ################################################################\n2:  c445cf9c65e ! 2:  2a112a1b983 t4013: switch default branch name to main\n    @@ Metadata\n      ## Commit message ##\n         t4013: switch default branch name to main\n     \n    -    In preparation for removing TEST_GIT_DEFAULT_INITIAL_BRANCH in Git 3.0\n    -    switch the default branch name to main.\n    -\n    -    The changes here are purely mechanical replacing 'master' with 'main'\n    +    Remove one of the last remaining uses of\n    +    \"TEST_GIT_DEFAULT_INITIAL_BRANCH= main\" in the test suite. We have\n    +    been steadily be converting tests from using \"master\" as the default\n    +    branch name since the introduction of TEST_GIT_DEFAULT_INITIAL_BRANCH\n    +    in 704fed9ea22 (tests: start moving to a different default main branch\n    +    name, 2020-10-23) The changes here are purely mechanical replacing\n    +    \"master\" with \"main\"\n     \n         Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n     \n3:  d8a382a79eb ! 3:  f1bf01e1322 t9902: switch default branch name to main\n    @@ Metadata\n      ## Commit message ##\n         t9902: switch default branch name to main\n     \n    -    In preparation for removing GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME in\n    -    Git 3.0 update the bash completion tests that rely on the default\n    -    branch name being master.\n    +    Remove the penultimate use of \"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=\n    +    main\" in our test suite. We have slowly been removing these ever since\n    +    we started to switch the default branch name used in tests to \"main\".\n     \n         Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n     \n4:  bbf79dd64fe ! 4:  c4d89c3761b t0613: stop setting default initial branch\n    @@ Metadata\n      ## Commit message ##\n         t0613: stop setting default initial branch\n     \n    -    As the tests are all run in separate repositories, set the branch\n    -    name to \"master\" when creating the repository for the tests where\n    -    the result depends on the branch name. This is in preparation for\n    -    removing GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME in Git 3.0.\n    +    As the tests are all run in separate repositories, set the branch name\n    +    to \"master\" when creating the repository for the tests where the result\n    +    depends on the branch name. This reduceds the number of tests that\n    +    depend on the default branch name being \"master\" and removes the last\n    +    instance of a test file using \"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=\n    +    master\".\n     \n         Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n     \n    @@ t/t0613-reftable-write-options.sh: export GIT_TEST_REFTABLE_AUTOCOMPACTION\n      test_expect_success 'default write options' '\n      \ttest_when_finished \"rm -rf repo\" &&\n     -\tgit init repo &&\n    ++\t# Block sizes also depend on the actual refs we write, so we force\n    ++\t# \"master\" to be the default initial branch name.\n     +\tgit init --initial-branch master repo &&\n      \t(\n      \t\tcd repo &&\n5:  a46c0dd25a6 < -:  ----------- t1403: remove dependency on GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"525506","messageId":"6986375dc379a646bb184be3cf7a018b2eb3eec7.1756992089.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1756992089.git.phillip.wood@dunelm.org.uk","subject":"[PATCH v2 1/4] breaking-changes: switch default branch to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-04T13:21:29Z","receivedAt":"2025-09-04T13:22:56Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nSince 1296cbe4b46 (init: document `init.defaultBranch` better,\n2020-12-11) \"git-init.adoc\" has advertised that the default name\nof the initial branch may change in the future. The name \"main\"\nis chosen to match the default used by the big Git forge web sites.\n\nThe advice printed when init.defaultBranch is not set is updated\nto say that the default will change to \"main\" in Git 3.0. Building\nwith WITH_BREAKING_CHANGES enabled removes the advice and changes\nthe default branch name to \"main\". The code in guess_remote_head()\nthat looks for \"refs/heads/master\" is left unchanged as that is only\ncalled when the remote server does not support the symref capability\nin the v0 protocol or the symref extension to the ls-refs list in the\nv2 protocol. Such an old server is more likely to be using \"master\"\nas the default branch name.\n\nWith the exception of the \"git-init.adoc\" the documentation is left\nunchanged. I had hoped to parameterize the name of the default branch\nby using an asciidoc attribute. Unfortunately attribute expansion\nis inhibited by backticks and we use backticks to mark up ref names\nso that idea does not work. As the changes to git-init.adoc show\ninserting ifdef's around each instance of the branch name \"master\"\nis cumbersome and makes the documentation sources harder to read.\n\nApart from \"git-init.adoc\" there are some other files where \"master\" is\nused as the name of the initial branch rather than as an example of a\nbranch name such as \"user-manual.adoc\" and \"gitcore-tutorial.adoc\". The\nname appears a lot in those so updating it with ifdef's is not really\npractical. We can update that document in the 3.0 release cycle. The\nother documentation where master is used as an example branch name\ncan be gradually converted over time.\n\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n Documentation/BreakingChanges.adoc |  5 +++++\n Documentation/git-init.adoc        | 12 +++++++++---\n advice.c                           |  2 ++\n advice.h                           |  2 ++\n ci/run-build-and-tests.sh          |  1 -\n refs.c                             | 15 +++++++++++----\n t/t0001-init.sh                    | 18 +++++++++++++++++-\n t/test-lib.sh                      | 11 +++++++----\n 8 files changed, 53 insertions(+), 13 deletions(-)\n\ndiff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc\nindex f8d2eba061c..eb92e6f6a7d 100644\n--- a/Documentation/BreakingChanges.adoc\n+++ b/Documentation/BreakingChanges.adoc\n@@ -165,6 +165,11 @@ A prerequisite for this change is that the ecosystem is ready to support the\n \"reftable\" format. Most importantly, alternative implementations of Git like\n JGit, libgit2 and Gitoxide need to support it.\n \n+* In new repositories the default branch name will be `main`. We have been\n+  warning that the default name will change since 675704c74dd (init: provide\n+  useful advice about init.defaultBranch, 2020-12-11).  The new name matches\n+  the default branch name used by many of the big Git forges.\n+\n === Removals\n \n * Support for grafting commits has long been superseded by git-replace(1).\ndiff --git a/Documentation/git-init.adoc b/Documentation/git-init.adoc\nindex a0dffba665f..bab99b9b477 100644\n--- a/Documentation/git-init.adoc\n+++ b/Documentation/git-init.adoc\n@@ -77,9 +77,15 @@ If this is a reinitialization, the repository will be moved to the specified pat\n `-b <branch-name>`::\n `--initial-branch=<branch-name>`::\n Use _<branch-name>_ for the initial branch in the newly created\n-repository.  If not specified, fall back to the default name (currently\n-`master`, but this is subject to change in the future; the name can be\n-customized via the `init.defaultBranch` configuration variable).\n+repository.  If not specified, fall back to the default name\n+ifndef::with-breaking-changes[]\n+(currently `master`, but this will change to `main` when Git 3.0 is released).\n+endif::with-breaking-changes[]\n+ifdef::with-breaking-changes[]\n+`main`.\n+endif::with-breaking-changes[]\n+The default name can be customized via the `init.defaultBranch` configuration\n+variable.\n \n `--shared[=(false|true|umask|group|all|world|everybody|<perm>)]`::\n \ndiff --git a/advice.c b/advice.c\nindex e5f0ff84491..48c49ee4145 100644\n--- a/advice.c\n+++ b/advice.c\n@@ -51,7 +51,9 @@ static struct {\n \t[ADVICE_AM_WORK_DIR] \t\t\t\t= { \"amWorkDir\" },\n \t[ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] \t= { \"checkoutAmbiguousRemoteBranchName\" },\n \t[ADVICE_COMMIT_BEFORE_MERGE]\t\t\t= { \"commitBeforeMerge\" },\n+#ifndef WITH_BREAKING_CHANGES\n \t[ADVICE_DEFAULT_BRANCH_NAME]\t\t\t= { \"defaultBranchName\" },\n+#endif /* WITH_BREAKING_CHANGES */\n \t[ADVICE_DETACHED_HEAD]\t\t\t\t= { \"detachedHead\" },\n \t[ADVICE_DIVERGING]\t\t\t\t= { \"diverging\" },\n \t[ADVICE_FETCH_SET_HEAD_WARN]\t\t\t= { \"fetchRemoteHEADWarn\" },\ndiff --git a/advice.h b/advice.h\nindex 727dcecf4a3..fc1dc872049 100644\n--- a/advice.h\n+++ b/advice.h\n@@ -18,7 +18,9 @@ enum advice_type {\n \tADVICE_AM_WORK_DIR,\n \tADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME,\n \tADVICE_COMMIT_BEFORE_MERGE,\n+#ifndef WITH_BREAKING_CHANGES\n \tADVICE_DEFAULT_BRANCH_NAME,\n+#endif /* WITH_BREAKING_CHANGES */\n \tADVICE_DETACHED_HEAD,\n \tADVICE_DIVERGING,\n \tADVICE_FETCH_SET_HEAD_WARN,\ndiff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh\nindex 01823fd0f14..a21834043f3 100755\n--- a/ci/run-build-and-tests.sh\n+++ b/ci/run-build-and-tests.sh\n@@ -9,7 +9,6 @@ run_tests=t\n \n case \"$jobname\" in\n linux-breaking-changes)\n-\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport WITH_BREAKING_CHANGES=YesPlease\n \t;;\n linux-TEST-vars)\ndiff --git a/refs.c b/refs.c\nindex 4ff55cf24f6..149a8d1cec1 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -627,10 +627,12 @@ void expand_ref_prefix(struct strvec *prefixes, const char *prefix)\n \t\tstrvec_pushf(prefixes, *p, len, prefix);\n }\n \n+#ifndef WITH_BREAKING_CHANGES\n static const char default_branch_name_advice[] = N_(\n \"Using '%s' as the name for the initial branch. This default branch name\\n\"\n-\"is subject to change. To configure the initial branch name to use in all\\n\"\n-\"of your new repositories, which will suppress this warning, call:\\n\"\n+\"will change to \\\"main\\\" in Git 3.0. To configure the initial branch name\\n\"\n+\"to use in all of your new repositories, which will suppress this warning,\\n\"\n+\"call:\\n\"\n \"\\n\"\n \"\\tgit config --global init.defaultBranch <name>\\n\"\n \"\\n\"\n@@ -639,8 +641,9 @@ static const char default_branch_name_advice[] = N_(\n \"\\n\"\n \"\\tgit branch -m <name>\\n\"\n );\n+#endif /* WITH_BREAKING_CHANGES */\n \n-char *repo_default_branch_name(struct repository *r, int quiet)\n+char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet)\n {\n \tconst char *config_key = \"init.defaultbranch\";\n \tconst char *config_display_key = \"init.defaultBranch\";\n@@ -649,14 +652,18 @@ char *repo_default_branch_name(struct repository *r, int quiet)\n \n \tif (env && *env)\n \t\tret = xstrdup(env);\n-\telse if (repo_config_get_string(r, config_key, &ret) < 0)\n+\tif (!ret && repo_config_get_string(r, config_key, &ret) < 0)\n \t\tdie(_(\"could not retrieve `%s`\"), config_display_key);\n \n \tif (!ret) {\n+#ifdef WITH_BREAKING_CHANGES\n+\t\tret = xstrdup(\"main\");\n+#else\n \t\tret = xstrdup(\"master\");\n \t\tif (!quiet)\n \t\t\tadvise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME,\n \t\t\t\t\t  _(default_branch_name_advice), ret);\n+#endif /* WITH_BREAKING_CHANGES */\n \t}\n \n \tfull_ref = xstrfmt(\"refs/heads/%s\", ret);\ndiff --git a/t/t0001-init.sh b/t/t0001-init.sh\nindex f593c536874..df0040b9ace 100755\n--- a/t/t0001-init.sh\n+++ b/t/t0001-init.sh\n@@ -868,7 +868,7 @@ test_expect_success 'overridden default initial branch name (config)' '\n \tgrep nmb actual\n '\n \n-test_expect_success 'advice on unconfigured init.defaultBranch' '\n+test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' '\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \\\n \t\tinit unconfigured-default-branch-name 2>err &&\n \ttest_decode_color <err >decoded &&\n@@ -883,6 +883,22 @@ test_expect_success 'advice on unconfigured init.defaultBranch disabled' '\n \ttest_grep ! \"hint: \" err\n '\n \n+test_expect_success 'default branch name' '\n+\tif test_have_prereq WITH_BREAKING_CHANGES\n+\tthen\n+\t\texpect=main\n+\telse\n+\t\texpect=master\n+\tfi &&\n+\techo \"refs/heads/$expect\" >expect &&\n+\t(\n+\t\tsane_unset GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME &&\n+\t\tgit init default-initial-branch-name\n+\t) &&\n+\tgit -C default-initial-branch-name symbolic-ref HEAD >actual &&\n+\ttest_cmp expect actual\n+'\n+\n test_expect_success 'overridden default main branch name (env)' '\n \ttest_config_global init.defaultBranch nmb &&\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=env git init main-branch-env &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 621cd31ae1d..b191954c3c4 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -127,10 +127,13 @@ then\n \texport GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS\n fi\n \n-# Explicitly set the default branch name for testing, to avoid the\n-# transitory \"git init\" warning under --verbose.\n-: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master}\n-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+if test -z \"$WITH_BREAKING_CHANGES\"\n+then\n+\t# Explicitly set the default branch name for testing, to avoid the\n+\t# transitory \"git init\" warning under --verbose.\n+\t: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master}\n+\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+fi\n \n ################################################################\n # It appears that people try to run tests without building...\n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"525507","messageId":"f1bf01e13226cf3f6ca0e811123278248e4eea6d.1756992089.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1756992089.git.phillip.wood@dunelm.org.uk","subject":"[PATCH v2 3/4] t9902: switch default branch name to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-04T13:21:31Z","receivedAt":"2025-09-04T13:22:58Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nRemove the penultimate use of \"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=\nmain\" in our test suite. We have slowly been removing these ever since\nwe started to switch the default branch name used in tests to \"main\".\n\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n t/t9902-completion.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\nindex 6650d33fba6..964e1f15693 100755\n--- a/t/t9902-completion.sh\n+++ b/t/t9902-completion.sh\n@@ -11,9 +11,9 @@ test_description='test bash completion'\n # untraceable with such ancient Bash versions.\n test_untraceable=UnfortunatelyYes\n \n-# Override environment and always use master for the default initial branch\n+# Override environment and always use main for the default initial branch\n # name for these tests, so that rev completion candidates are as expected.\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-bash.sh\n@@ -1453,7 +1453,7 @@ test_expect_success 'git bisect - start subcommand arguments before double-dash\n \t\tHEAD Z\n \t\tfinal Z\n \t\tinitial Z\n-\t\tmaster Z\n+\t\tmain Z\n \t\tEOF\n \t)\n '\n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"525509","messageId":"2a112a1b983e44a53f52cd0fd1d1ad9b2ba12e3b.1756992089.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1756992089.git.phillip.wood@dunelm.org.uk","subject":"[PATCH v2 2/4] t4013: switch default branch name to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-04T13:21:30Z","receivedAt":"2025-09-04T13:22:58Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nRemove one of the last remaining uses of\n\"TEST_GIT_DEFAULT_INITIAL_BRANCH= main\" in the test suite. We have\nbeen steadily be converting tests from using \"master\" as the default\nbranch name since the introduction of TEST_GIT_DEFAULT_INITIAL_BRANCH\nin 704fed9ea22 (tests: start moving to a different default main branch\nname, 2020-10-23) The changes here are purely mechanical replacing\n\"master\" with \"main\"\n\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n t/t4013-diff-various.sh                       | 228 +++++++++---------\n ...ree_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...iff.diff-tree_--cc_--patch-with-stat_main} |   2 +-\n ...r => diff.diff-tree_--cc_--shortstat_main} |   2 +-\n ...diff.diff-tree_--cc_--stat_--summary_main} |   2 +-\n ...master => diff.diff-tree_--cc_--stat_main} |   2 +-\n ...e_--cc_master => diff.diff-tree_--cc_main} |   2 +-\n ...master => diff.diff-tree_-c_--abbrev_main} |   2 +-\n ...> diff.diff-tree_-c_--stat_--summary_main} |   2 +-\n ...t_master => diff.diff-tree_-c_--stat_main} |   2 +-\n ...-tree_-c_master => diff.diff-tree_-c_main} |   2 +-\n ...-tree_-m_master => diff.diff-tree_-m_main} |   2 +-\n ...-p_-m_master => diff.diff-tree_-p_-m_main} |   2 +-\n t/t4013/diff.diff-tree_-p_main                |   2 +\n t/t4013/diff.diff-tree_-p_master              |   2 -\n t/t4013/diff.diff-tree_main                   |   2 +\n t/t4013/diff.diff-tree_master                 |   2 -\n t/t4013/diff.diff_--dirstat_--cc_main~1_main  |   3 +\n .../diff.diff_--dirstat_--cc_master~1_master  |   3 -\n t/t4013/diff.diff_--dirstat_main~1_main~2     |   3 +\n t/t4013/diff.diff_--dirstat_master~1_master~2 |   3 -\n ...ff.diff_--line-prefix=abc_main_main^_side} |   2 +-\n ...master^_side => diff.diff_main_main^_side} |   2 +-\n ...mat-patch_--attach_--stdout_initial..main} |   2 +-\n ...at-patch_--attach_--stdout_initial..main^} |   2 +-\n ...e_--stdout_--numbered-files_initial..main} |   2 +-\n ...t_--subject-prefix=TESTCASE_initial..main} |   2 +-\n ...mat-patch_--inline_--stdout_initial..main} |   2 +-\n ...at-patch_--inline_--stdout_initial..main^} |   2 +-\n ...t-patch_--inline_--stdout_initial..main^^} |   2 +-\n ...--stdout_--cover-letter_-n_initial..main^} |   2 +-\n ...atch_--stdout_--no-numbered_initial..main} |   2 +-\n ...t-patch_--stdout_--numbered_initial..main} |   2 +-\n ... diff.format-patch_--stdout_initial..main} |   2 +-\n ...diff.format-patch_--stdout_initial..main^} |   2 +-\n ..._-m_-p_master => diff.log_--cc_-m_-p_main} |   2 +-\n t/t4013/diff.log_--decorate=full_--all        |   2 +-\n ..._--decorate=full_--clear-decorations_--all |   2 +-\n ...f.log_--decorate=full_--decorate-all_--all |   2 +-\n t/t4013/diff.log_--decorate_--all             |   2 +-\n ...f.log_--decorate_--clear-decorations_--all |   2 +-\n .../diff.log_--decorate_--decorate-all_--all  |   2 +-\n ... diff.log_--diff-merges=first-parent_main} |   2 +-\n ..._--diff-merges=off_-p_--first-parent_main} |   2 +-\n ..._--first-parent_--diff-merges=off_-p_main} |   2 +-\n ...g_--no-diff-merges_-p_--first-parent_main} |   2 +-\n ..._--patch-with-stat_--summary_main_--_dir_} |   2 +-\n ...master => diff.log_--patch-with-stat_main} |   2 +-\n ...> diff.log_--patch-with-stat_main_--_dir_} |   2 +-\n ...oot_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...g_--root_--patch-with-stat_--summary_main} |   2 +-\n ...=> diff.log_--root_--patch-with-stat_main} |   2 +-\n ...-root_-c_--patch-with-stat_--summary_main} |   2 +-\n ...root_-p_master => diff.log_--root_-p_main} |   2 +-\n ...log_--root_master => diff.log_--root_main} |   2 +-\n ...ter => diff.log_-GF_-p_--pickaxe-all_main} |   2 +-\n ...log_-GF_-p_master => diff.log_-GF_-p_main} |   2 +-\n ...{diff.log_-SF_master => diff.log_-GF_main} |   2 +-\n ...aster => diff.log_-IA_-IB_-I1_-I2_-p_main} |   2 +-\n ...log_-SF_-p_master => diff.log_-SF_-p_main} |   2 +-\n ...{diff.log_-GF_master => diff.log_-SF_main} |   2 +-\n t/t4013/diff.log_-SF_main_--max-count=0       |   2 +\n ...ount=2 => diff.log_-SF_main_--max-count=1} |   2 +-\n t/t4013/diff.log_-SF_main_--max-count=2       |   7 +\n t/t4013/diff.log_-SF_master_--max-count=0     |   2 -\n t/t4013/diff.log_-SF_master_--max-count=1     |   7 -\n ...iff.log_-S_F_master => diff.log_-S_F_main} |   2 +-\n ...cc_-m_-p_master => diff.log_-c_-m_-p_main} |   2 +-\n ...-m_--raw_master => diff.log_-m_--raw_main} |   2 +-\n ..._--stat_master => diff.log_-m_--stat_main} |   2 +-\n ...ter => diff.log_-m_-p_--first-parent_main} |   2 +-\n ...f.log_-m_-p_master => diff.log_-m_-p_main} |   2 +-\n ...ff.log_-p_--diff-merges=first-parent_main} |   2 +-\n ...master => diff.log_-p_--first-parent_main} |   2 +-\n .../{diff.log_-p_master => diff.log_-p_main}  |   2 +-\n t/t4013/{diff.log_master => diff.log_main}    |   2 +-\n ...iff.noellipses-diff-tree_-c_--abbrev_main} |   2 +-\n ...> diff.noellipses-whatchanged_--root_main} |   2 +-\n ...r => diff.noellipses-whatchanged_-SF_main} |   2 +-\n ...aster => diff.noellipses-whatchanged_main} |   2 +-\n ...t_master => diff.show_--first-parent_main} |   2 +-\n ...{diff.show_-c_master => diff.show_-c_main} |   2 +-\n ...{diff.show_-m_master => diff.show_-m_main} |   2 +-\n t/t4013/{diff.show_master => diff.show_main}  |   2 +-\n ..._--patch-with-stat_--summary_main_--_dir_} |   2 +-\n ...> diff.whatchanged_--patch-with-stat_main} |   2 +-\n ...hatchanged_--patch-with-stat_main_--_dir_} |   2 +-\n ...oot_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...d_--root_--patch-with-stat_--summary_main} |   2 +-\n ...whatchanged_--root_--patch-with-stat_main} |   2 +-\n ...-root_-c_--patch-with-stat_--summary_main} |   2 +-\n ...master => diff.whatchanged_--root_-p_main} |   2 +-\n ...ot_master => diff.whatchanged_--root_main} |   2 +-\n ...-p_master => diff.whatchanged_-SF_-p_main} |   2 +-\n ...d_-SF_master => diff.whatchanged_-SF_main} |   2 +-\n ...ged_-p_master => diff.whatchanged_-p_main} |   2 +-\n ...atchanged_master => diff.whatchanged_main} |   2 +-\n 97 files changed, 217 insertions(+), 217 deletions(-)\n rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_--summary_master => diff.diff-tree_--cc_--patch-with-stat_--summary_main} (86%)\n rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_master => diff.diff-tree_--cc_--patch-with-stat_main} (89%)\n rename t/t4013/{diff.diff-tree_--cc_--shortstat_master => diff.diff-tree_--cc_--shortstat_main} (65%)\n rename t/t4013/{diff.diff-tree_-c_--stat_--summary_master => diff.diff-tree_--cc_--stat_--summary_main} (71%)\n rename t/t4013/{diff.diff-tree_-c_--stat_master => diff.diff-tree_--cc_--stat_main} (76%)\n rename t/t4013/{diff.diff-tree_--cc_master => diff.diff-tree_--cc_main} (91%)\n rename t/t4013/{diff.diff-tree_-c_--abbrev_master => diff.diff-tree_-c_--abbrev_main} (83%)\n rename t/t4013/{diff.diff-tree_--cc_--stat_--summary_master => diff.diff-tree_-c_--stat_--summary_main} (70%)\n rename t/t4013/{diff.diff-tree_--cc_--stat_master => diff.diff-tree_-c_--stat_main} (75%)\n rename t/t4013/{diff.diff-tree_-c_master => diff.diff-tree_-c_main} (93%)\n rename t/t4013/{diff.diff-tree_-m_master => diff.diff-tree_-m_main} (96%)\n rename t/t4013/{diff.diff-tree_-p_-m_master => diff.diff-tree_-p_-m_main} (97%)\n create mode 100644 t/t4013/diff.diff-tree_-p_main\n delete mode 100644 t/t4013/diff.diff-tree_-p_master\n create mode 100644 t/t4013/diff.diff-tree_main\n delete mode 100644 t/t4013/diff.diff-tree_master\n create mode 100644 t/t4013/diff.diff_--dirstat_--cc_main~1_main\n delete mode 100644 t/t4013/diff.diff_--dirstat_--cc_master~1_master\n create mode 100644 t/t4013/diff.diff_--dirstat_main~1_main~2\n delete mode 100644 t/t4013/diff.diff_--dirstat_master~1_master~2\n rename t/t4013/{diff.diff_--line-prefix=abc_master_master^_side => diff.diff_--line-prefix=abc_main_main^_side} (87%)\n rename t/t4013/{diff.diff_master_master^_side => diff.diff_main_main^_side} (89%)\n rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master => diff.format-patch_--attach_--stdout_initial..main} (98%)\n rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master^ => diff.format-patch_--attach_--stdout_initial..main^} (97%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_--numbered-files_initial..master => diff.format-patch_--inline_--stdout_--numbered-files_initial..main} (99%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master => diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main} (99%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master => diff.format-patch_--inline_--stdout_initial..main} (98%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^ => diff.format-patch_--inline_--stdout_initial..main^} (97%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^^ => diff.format-patch_--inline_--stdout_initial..main^^} (95%)\n rename t/t4013/{diff.format-patch_--stdout_--cover-letter_-n_initial..master^ => diff.format-patch_--stdout_--cover-letter_-n_initial..main^} (96%)\n rename t/t4013/{diff.format-patch_--stdout_--no-numbered_initial..master => diff.format-patch_--stdout_--no-numbered_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_--numbered_initial..master => diff.format-patch_--stdout_--numbered_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_initial..master => diff.format-patch_--stdout_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_initial..master^ => diff.format-patch_--stdout_initial..main^} (96%)\n rename t/t4013/{diff.log_-c_-m_-p_master => diff.log_--cc_-m_-p_main} (99%)\n rename t/t4013/{diff.log_--diff-merges=first-parent_master => diff.log_--diff-merges=first-parent_main} (95%)\n rename t/t4013/{diff.log_--no-diff-merges_-p_--first-parent_master => diff.log_--diff-merges=off_-p_--first-parent_main} (95%)\n rename t/t4013/{diff.log_--first-parent_--diff-merges=off_-p_master => diff.log_--first-parent_--diff-merges=off_-p_main} (95%)\n rename t/t4013/{diff.log_--diff-merges=off_-p_--first-parent_master => diff.log_--no-diff-merges_-p_--first-parent_main} (95%)\n rename t/t4013/{diff.log_--patch-with-stat_--summary_master_--_dir_ => diff.log_--patch-with-stat_--summary_main_--_dir_} (96%)\n rename t/t4013/{diff.log_--patch-with-stat_master => diff.log_--patch-with-stat_main} (98%)\n rename t/t4013/{diff.log_--patch-with-stat_master_--_dir_ => diff.log_--patch-with-stat_main_--_dir_} (96%)\n rename t/t4013/{diff.log_--root_--cc_--patch-with-stat_--summary_master => diff.log_--root_--cc_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_--patch-with-stat_--summary_master => diff.log_--root_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_--patch-with-stat_master => diff.log_--root_--patch-with-stat_main} (98%)\n rename t/t4013/{diff.log_--root_-c_--patch-with-stat_--summary_master => diff.log_--root_-c_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_-p_master => diff.log_--root_-p_main} (98%)\n rename t/t4013/{diff.log_--root_master => diff.log_--root_main} (96%)\n rename t/t4013/{diff.log_-GF_-p_--pickaxe-all_master => diff.log_-GF_-p_--pickaxe-all_main} (90%)\n rename t/t4013/{diff.log_-GF_-p_master => diff.log_-GF_-p_main} (91%)\n rename t/t4013/{diff.log_-SF_master => diff.log_-GF_main} (86%)\n rename t/t4013/{diff.log_-IA_-IB_-I1_-I2_-p_master => diff.log_-IA_-IB_-I1_-I2_-p_main} (97%)\n rename t/t4013/{diff.log_-SF_-p_master => diff.log_-SF_-p_main} (91%)\n rename t/t4013/{diff.log_-GF_master => diff.log_-SF_main} (86%)\n create mode 100644 t/t4013/diff.log_-SF_main_--max-count=0\n rename t/t4013/{diff.log_-SF_master_--max-count=2 => diff.log_-SF_main_--max-count=1} (79%)\n create mode 100644 t/t4013/diff.log_-SF_main_--max-count=2\n delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=0\n delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=1\n rename t/t4013/{diff.log_-S_F_master => diff.log_-S_F_main} (86%)\n rename t/t4013/{diff.log_--cc_-m_-p_master => diff.log_-c_-m_-p_main} (99%)\n rename t/t4013/{diff.log_-m_--raw_master => diff.log_-m_--raw_main} (98%)\n rename t/t4013/{diff.log_-m_--stat_master => diff.log_-m_--stat_main} (98%)\n rename t/t4013/{diff.log_-m_-p_--first-parent_master => diff.log_-m_-p_--first-parent_main} (97%)\n rename t/t4013/{diff.log_-m_-p_master => diff.log_-m_-p_main} (99%)\n rename t/t4013/{diff.log_-p_--diff-merges=first-parent_master => diff.log_-p_--diff-merges=first-parent_main} (97%)\n rename t/t4013/{diff.log_-p_--first-parent_master => diff.log_-p_--first-parent_main} (97%)\n rename t/t4013/{diff.log_-p_master => diff.log_-p_main} (98%)\n rename t/t4013/{diff.log_master => diff.log_main} (97%)\n rename t/t4013/{diff.noellipses-diff-tree_-c_--abbrev_master => diff.noellipses-diff-tree_-c_--abbrev_main} (81%)\n rename t/t4013/{diff.noellipses-whatchanged_--root_master => diff.noellipses-whatchanged_--root_main} (96%)\n rename t/t4013/{diff.noellipses-whatchanged_-SF_master => diff.noellipses-whatchanged_-SF_main} (86%)\n rename t/t4013/{diff.noellipses-whatchanged_master => diff.noellipses-whatchanged_main} (96%)\n rename t/t4013/{diff.show_--first-parent_master => diff.show_--first-parent_main} (92%)\n rename t/t4013/{diff.show_-c_master => diff.show_-c_main} (95%)\n rename t/t4013/{diff.show_-m_master => diff.show_-m_main} (98%)\n rename t/t4013/{diff.show_master => diff.show_main} (96%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ => diff.whatchanged_--patch-with-stat_--summary_main_--_dir_} (94%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_master => diff.whatchanged_--patch-with-stat_main} (97%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_master_--_dir_ => diff.whatchanged_--patch-with-stat_main_--_dir_} (94%)\n rename t/t4013/{diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master => diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_--summary_master => diff.whatchanged_--root_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_master => diff.whatchanged_--root_--patch-with-stat_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_-c_--patch-with-stat_--summary_master => diff.whatchanged_--root_-c_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_-p_master => diff.whatchanged_--root_-p_main} (98%)\n rename t/t4013/{diff.whatchanged_--root_master => diff.whatchanged_--root_main} (97%)\n rename t/t4013/{diff.whatchanged_-SF_-p_master => diff.whatchanged_-SF_-p_main} (89%)\n rename t/t4013/{diff.whatchanged_-SF_master => diff.whatchanged_-SF_main} (86%)\n rename t/t4013/{diff.whatchanged_-p_master => diff.whatchanged_-p_main} (98%)\n rename t/t4013/{diff.whatchanged_master => diff.whatchanged_main} (97%)\n\ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex cfeec239e09..55a06eadb31 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -5,7 +5,7 @@\n \n test_description='Various diff formatting options'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -70,7 +70,7 @@ test_expect_success setup '\n \tGIT_COMMITTER_DATE=\"2006-06-26 00:04:00 +0000\" &&\n \texport GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit pull -s ours --no-rebase . side &&\n \n \tGIT_AUTHOR_DATE=\"2006-06-26 00:05:00 +0000\" &&\n@@ -95,15 +95,15 @@ test_expect_success setup '\n \ttest_write_lines B A >dir/sub &&\n \tgit add dir/sub &&\n \tgit commit -m \"Rearranged lines in dir/sub\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tGIT_AUTHOR_DATE=\"2006-06-26 00:06:00 +0000\" &&\n \tGIT_COMMITTER_DATE=\"2006-06-26 00:06:00 +0000\" &&\n \texport GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&\n \tgit checkout -b mode initial &&\n \tgit update-index --chmod=+x file0 &&\n \tgit commit -m \"update mode\" &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \n \tGIT_AUTHOR_DATE=\"2006-06-26 00:06:00 +0000\" &&\n \tGIT_COMMITTER_DATE=\"2006-06-26 00:06:00 +0000\" &&\n@@ -112,12 +112,12 @@ test_expect_success setup '\n \tgit update-index --chmod=+x file2 &&\n \tgit commit -m \"update mode (file2)\" &&\n \tgit notes add -m \"note\" &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \n-\t# Same merge as master, but with parents reversed. Hide it in a\n+\t# Same merge as main, but with parents reversed. Hide it in a\n \t# pseudo-ref to avoid impacting tests with --all.\n \tcommit=$(echo reverse |\n-\t\t git commit-tree -p master^2 -p master^1 master^{tree}) &&\n+\t\t git commit-tree -p main^2 -p main^1 main^{tree}) &&\n \tgit update-ref REVERSE $commit &&\n \n \tgit config diff.renames false &&\n@@ -127,15 +127,15 @@ test_expect_success setup '\n \n : <<\\EOF\n ! [initial] Initial\n- * [master] Merge branch 'side'\n+ * [main] Merge branch 'side'\n   ! [rearrange] Rearranged lines in dir/sub\n    ! [side] Side\n ----\n   +  [rearrange] Rearranged lines in dir/sub\n- -   [master] Merge branch 'side'\n+ -   [main] Merge branch 'side'\n  * + [side] Side\n- *   [master^] Third\n- *   [master~2] Second\n+ *   [main^] Third\n+ *   [main~2] Second\n +*++ [initial] Initial\n EOF\n \n@@ -311,64 +311,64 @@ diff-tree initial mode\n diff-tree --stat initial mode\n diff-tree --summary initial mode\n \n-diff-tree master\n-diff-tree -m master\n-diff-tree -p master\n-diff-tree -p -m master\n-diff-tree -c master\n-diff-tree -c --abbrev master\n-:noellipses diff-tree -c --abbrev master\n-diff-tree --cc master\n+diff-tree main\n+diff-tree -m main\n+diff-tree -p main\n+diff-tree -p -m main\n+diff-tree -c main\n+diff-tree -c --abbrev main\n+:noellipses diff-tree -c --abbrev main\n+diff-tree --cc main\n # stat only should show the diffstat with the first parent\n-diff-tree -c --stat master\n-diff-tree --cc --stat master\n-diff-tree -c --stat --summary master\n-diff-tree --cc --stat --summary master\n+diff-tree -c --stat main\n+diff-tree --cc --stat main\n+diff-tree -c --stat --summary main\n+diff-tree --cc --stat --summary main\n # stat summary should show the diffstat and summary with the first parent\n diff-tree -c --stat --summary side\n diff-tree --cc --stat --summary side\n-diff-tree --cc --shortstat master\n+diff-tree --cc --shortstat main\n diff-tree --cc --summary REVERSE\n # improved by Timo's patch\n-diff-tree --cc --patch-with-stat master\n+diff-tree --cc --patch-with-stat main\n # improved by Timo's patch\n-diff-tree --cc --patch-with-stat --summary master\n+diff-tree --cc --patch-with-stat --summary main\n # this is correct\n diff-tree --cc --patch-with-stat --summary side\n \n-log master\n-log -p master\n-log --root master\n-log --root -p master\n-log --patch-with-stat master\n-log --root --patch-with-stat master\n-log --root --patch-with-stat --summary master\n-# improved by Timo's patch\n-log --root -c --patch-with-stat --summary master\n-# improved by Timo's patch\n-log --root --cc --patch-with-stat --summary master\n-log --no-diff-merges -p --first-parent master\n-log --diff-merges=off -p --first-parent master\n-log --first-parent --diff-merges=off -p master\n-log -p --first-parent master\n-log -p --diff-merges=first-parent master\n-log --diff-merges=first-parent master\n-log -m -p --first-parent master\n-log -m -p master\n-log --cc -m -p master\n-log -c -m -p master\n-log -m --raw master\n-log -m --stat master\n-log -SF master\n-log -S F master\n-log -SF -p master\n-log -SF master --max-count=0\n-log -SF master --max-count=1\n-log -SF master --max-count=2\n-log -GF master\n-log -GF -p master\n-log -GF -p --pickaxe-all master\n-log -IA -IB -I1 -I2 -p master\n+log main\n+log -p main\n+log --root main\n+log --root -p main\n+log --patch-with-stat main\n+log --root --patch-with-stat main\n+log --root --patch-with-stat --summary main\n+# improved by Timo's patch\n+log --root -c --patch-with-stat --summary main\n+# improved by Timo's patch\n+log --root --cc --patch-with-stat --summary main\n+log --no-diff-merges -p --first-parent main\n+log --diff-merges=off -p --first-parent main\n+log --first-parent --diff-merges=off -p main\n+log -p --first-parent main\n+log -p --diff-merges=first-parent main\n+log --diff-merges=first-parent main\n+log -m -p --first-parent main\n+log -m -p main\n+log --cc -m -p main\n+log -c -m -p main\n+log -m --raw main\n+log -m --stat main\n+log -SF main\n+log -S F main\n+log -SF -p main\n+log -SF main --max-count=0\n+log -SF main --max-count=1\n+log -SF main --max-count=2\n+log -GF main\n+log -GF -p main\n+log -GF -p --pickaxe-all main\n+log -IA -IB -I1 -I2 -p main\n log --decorate --all\n log --decorate=full --all\n log --decorate --clear-decorations --all\n@@ -377,35 +377,35 @@ log --decorate=full --clear-decorations --all\n rev-list --parents HEAD\n rev-list --children HEAD\n \n-whatchanged master\n-:noellipses whatchanged master\n-whatchanged -p master\n-whatchanged --root master\n-:noellipses whatchanged --root master\n-whatchanged --root -p master\n-whatchanged --patch-with-stat master\n-whatchanged --root --patch-with-stat master\n-whatchanged --root --patch-with-stat --summary master\n-# improved by Timo's patch\n-whatchanged --root -c --patch-with-stat --summary master\n-# improved by Timo's patch\n-whatchanged --root --cc --patch-with-stat --summary master\n-whatchanged -SF master\n-:noellipses whatchanged -SF master\n-whatchanged -SF -p master\n+whatchanged main\n+:noellipses whatchanged main\n+whatchanged -p main\n+whatchanged --root main\n+:noellipses whatchanged --root main\n+whatchanged --root -p main\n+whatchanged --patch-with-stat main\n+whatchanged --root --patch-with-stat main\n+whatchanged --root --patch-with-stat --summary main\n+# improved by Timo's patch\n+whatchanged --root -c --patch-with-stat --summary main\n+# improved by Timo's patch\n+whatchanged --root --cc --patch-with-stat --summary main\n+whatchanged -SF main\n+:noellipses whatchanged -SF main\n+whatchanged -SF -p main\n \n-log --patch-with-stat master -- dir/\n-whatchanged --patch-with-stat master -- dir/\n-log --patch-with-stat --summary master -- dir/\n-whatchanged --patch-with-stat --summary master -- dir/\n+log --patch-with-stat main -- dir/\n+whatchanged --patch-with-stat main -- dir/\n+log --patch-with-stat --summary main -- dir/\n+whatchanged --patch-with-stat --summary main -- dir/\n \n show initial\n show --root initial\n show side\n-show master\n-show -c master\n-show -m master\n-show --first-parent master\n+show main\n+show -c main\n+show -m main\n+show --first-parent main\n show --stat side\n show --stat --summary side\n show --patch-with-stat side\n@@ -414,22 +414,22 @@ show --patch-with-raw side\n show --patch-with-stat --summary side\n \n format-patch --stdout initial..side\n-format-patch --stdout initial..master^\n-format-patch --stdout initial..master\n-format-patch --stdout --no-numbered initial..master\n-format-patch --stdout --numbered initial..master\n+format-patch --stdout initial..main^\n+format-patch --stdout initial..main\n+format-patch --stdout --no-numbered initial..main\n+format-patch --stdout --numbered initial..main\n format-patch --attach --stdout initial..side\n format-patch --attach --stdout --suffix=.diff initial..side\n-format-patch --attach --stdout initial..master^\n-format-patch --attach --stdout initial..master\n+format-patch --attach --stdout initial..main^\n+format-patch --attach --stdout initial..main\n format-patch --inline --stdout initial..side\n-format-patch --inline --stdout initial..master^\n-format-patch --inline --stdout --numbered-files initial..master\n-format-patch --inline --stdout initial..master\n-format-patch --inline --stdout --subject-prefix=TESTCASE initial..master\n+format-patch --inline --stdout initial..main^\n+format-patch --inline --stdout --numbered-files initial..main\n+format-patch --inline --stdout initial..main\n+format-patch --inline --stdout --subject-prefix=TESTCASE initial..main\n config format.subjectprefix DIFFERENT_PREFIX\n-format-patch --inline --stdout initial..master^^\n-format-patch --stdout --cover-letter -n initial..master^\n+format-patch --inline --stdout initial..main^^\n+format-patch --stdout --cover-letter -n initial..main^\n \n diff --abbrev initial..side\n diff -U initial..side\n@@ -448,13 +448,13 @@ diff --name-status dir2 dir\n diff --no-index --name-status dir2 dir\n diff --no-index --name-status -- dir2 dir\n diff --no-index dir dir3\n-diff master master^ side\n+diff main main^ side\n # Can't use spaces...\n-diff --line-prefix=abc master master^ side\n-diff --dirstat master~1 master~2\n+diff --line-prefix=abc main main^ side\n+diff --dirstat main~1 main~2\n diff --dirstat initial rearrange\n diff --dirstat-by-file initial rearrange\n-diff --dirstat --cc master~1 master\n+diff --dirstat --cc main~1 main\n # No-index --abbrev and --no-abbrev\n diff --raw initial\n :noellipses diff --raw initial\n@@ -482,25 +482,25 @@ test_expect_success !WITH_BREAKING_CHANGES 'whatchanged needs --i-still-use-this\n '\n \n test_expect_success 'log -m matches pure log' '\n-\tgit log master >result &&\n+\tgit log main >result &&\n \tprocess_diffs result >expected &&\n \tgit log -m >result &&\n \tprocess_diffs result >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'log --diff-merges=on matches --diff-merges=separate' '\n-\tgit log -p --diff-merges=separate master >result &&\n+\tgit log -p --diff-merges=separate main >result &&\n \tprocess_diffs result >expected &&\n-\tgit log -p --diff-merges=on master >result &&\n+\tgit log -p --diff-merges=on main >result &&\n \tprocess_diffs result >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'log --dd matches --diff-merges=1 -p' '\n-\tgit log --diff-merges=1 -p master >result &&\n+\tgit log --diff-merges=1 -p main >result &&\n \tprocess_diffs result >expected &&\n-\tgit log --dd master >result &&\n+\tgit log --dd main >result &&\n \tprocess_diffs result >actual &&\n \ttest_cmp expected actual\n '\n@@ -511,19 +511,19 @@ test_expect_success 'deny wrong log.diffMerges config' '\n '\n \n test_expect_success 'git config log.diffMerges first-parent' '\n-\tgit log -p --diff-merges=first-parent master >result &&\n+\tgit log -p --diff-merges=first-parent main >result &&\n \tprocess_diffs result >expected &&\n \ttest_config log.diffMerges first-parent &&\n-\tgit log -p --diff-merges=on master >result &&\n+\tgit log -p --diff-merges=on main >result &&\n \tprocess_diffs result >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'git config log.diffMerges first-parent vs -m' '\n-\tgit log -p --diff-merges=first-parent master >result &&\n+\tgit log -p --diff-merges=first-parent main >result &&\n \tprocess_diffs result >expected &&\n \ttest_config log.diffMerges first-parent &&\n-\tgit log -p -m master >result &&\n+\tgit log -p -m main >result &&\n \tprocess_diffs result >actual &&\n \ttest_cmp expected actual\n '\n@@ -572,7 +572,7 @@ test_expect_success 'diff-tree --stdin with log formatting' '\n \tThird\n \tSecond\n \tEOF\n-\tgit rev-list master | git diff-tree --stdin --format=%s -s >actual &&\n+\tgit rev-list main | git diff-tree --stdin --format=%s -s >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -585,16 +585,16 @@ test_expect_success 'diff-tree --stdin with pathspec' '\n \n \tdir/sub\n \tEOF\n-\tgit rev-list master^ |\n+\tgit rev-list main^ |\n \tgit diff-tree -r --stdin --name-only --format=%s dir >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'show A B ... -- <pathspec>' '\n \t# side touches dir/sub, file0, and file3\n-\t# master^ touches dir/sub, and file1\n-\t# master^^ touches dir/sub, file0, and file2\n-\tgit show --name-only --format=\"<%s>\" side master^ master^^ -- dir >actual &&\n+\t# main^ touches dir/sub, and file1\n+\t# main^^ touches dir/sub, file0, and file2\n+\tgit show --name-only --format=\"<%s>\" side main^ main^^ -- dir >actual &&\n \tcat >expect <<-\\EOF &&\n \t<Side>\n \n@@ -610,7 +610,7 @@ test_expect_success 'show A B ... -- <pathspec>' '\n '\n \n test_expect_success 'diff -I<regex>: setup' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_seq 50 >file0 &&\n \tgit commit -m \"Set up -I<regex> test file\" file0 &&\n \ttest_seq 50 | sed -e \"s/13/ten and three/\" -e \"/7\\$/d\" >file0 &&\ndiff --git a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main\nsimilarity index 86%\nrename from t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master\nrename to t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main\nindex 9951e3677d6..af1cf20f4ca 100644\n--- a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc --patch-with-stat --summary master\n+$ git diff-tree --cc --patch-with-stat --summary main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_master b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_main\nsimilarity index 89%\nrename from t/t4013/diff.diff-tree_--cc_--patch-with-stat_master\nrename to t/t4013/diff.diff-tree_--cc_--patch-with-stat_main\nindex db3c0a7b2cc..0ec60420970 100644\n--- a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_master\n+++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc --patch-with-stat master\n+$ git diff-tree --cc --patch-with-stat main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_--cc_--shortstat_master b/t/t4013/diff.diff-tree_--cc_--shortstat_main\nsimilarity index 65%\nrename from t/t4013/diff.diff-tree_--cc_--shortstat_master\nrename to t/t4013/diff.diff-tree_--cc_--shortstat_main\nindex a4ca42df2a4..9a4ef031973 100644\n--- a/t/t4013/diff.diff-tree_--cc_--shortstat_master\n+++ b/t/t4013/diff.diff-tree_--cc_--shortstat_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc --shortstat master\n+$ git diff-tree --cc --shortstat main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  2 files changed, 5 insertions(+)\n $\ndiff --git a/t/t4013/diff.diff-tree_-c_--stat_--summary_master b/t/t4013/diff.diff-tree_--cc_--stat_--summary_main\nsimilarity index 71%\nrename from t/t4013/diff.diff-tree_-c_--stat_--summary_master\nrename to t/t4013/diff.diff-tree_--cc_--stat_--summary_main\nindex 81c3021541b..9db08a4aa96 100644\n--- a/t/t4013/diff.diff-tree_-c_--stat_--summary_master\n+++ b/t/t4013/diff.diff-tree_--cc_--stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -c --stat --summary master\n+$ git diff-tree --cc --stat --summary main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_-c_--stat_master b/t/t4013/diff.diff-tree_--cc_--stat_main\nsimilarity index 76%\nrename from t/t4013/diff.diff-tree_-c_--stat_master\nrename to t/t4013/diff.diff-tree_--cc_--stat_main\nindex 89d59b15480..7ecc67a524e 100644\n--- a/t/t4013/diff.diff-tree_-c_--stat_master\n+++ b/t/t4013/diff.diff-tree_--cc_--stat_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -c --stat master\n+$ git diff-tree --cc --stat main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_--cc_master b/t/t4013/diff.diff-tree_--cc_main\nsimilarity index 91%\nrename from t/t4013/diff.diff-tree_--cc_master\nrename to t/t4013/diff.diff-tree_--cc_main\nindex 5ecb4e14ae4..1a962856ad4 100644\n--- a/t/t4013/diff.diff-tree_--cc_master\n+++ b/t/t4013/diff.diff-tree_--cc_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc master\n+$ git diff-tree --cc main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n diff --cc dir/sub\n index cead32e,7289e35..992913c\ndiff --git a/t/t4013/diff.diff-tree_-c_--abbrev_master b/t/t4013/diff.diff-tree_-c_--abbrev_main\nsimilarity index 83%\nrename from t/t4013/diff.diff-tree_-c_--abbrev_master\nrename to t/t4013/diff.diff-tree_-c_--abbrev_main\nindex b8e4aa25307..039d127cf24 100644\n--- a/t/t4013/diff.diff-tree_-c_--abbrev_master\n+++ b/t/t4013/diff.diff-tree_-c_--abbrev_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -c --abbrev master\n+$ git diff-tree -c --abbrev main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n ::100644 100644 100644 cead32e... 7289e35... 992913c... MM\tdir/sub\n ::100644 100644 100644 b414108... f4615da... 10a8a9f... MM\tfile0\ndiff --git a/t/t4013/diff.diff-tree_--cc_--stat_--summary_master b/t/t4013/diff.diff-tree_-c_--stat_--summary_main\nsimilarity index 70%\nrename from t/t4013/diff.diff-tree_--cc_--stat_--summary_master\nrename to t/t4013/diff.diff-tree_-c_--stat_--summary_main\nindex d019867dd94..05a8d16ba70 100644\n--- a/t/t4013/diff.diff-tree_--cc_--stat_--summary_master\n+++ b/t/t4013/diff.diff-tree_-c_--stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc --stat --summary master\n+$ git diff-tree -c --stat --summary main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_--cc_--stat_master b/t/t4013/diff.diff-tree_-c_--stat_main\nsimilarity index 75%\nrename from t/t4013/diff.diff-tree_--cc_--stat_master\nrename to t/t4013/diff.diff-tree_-c_--stat_main\nindex 40b91796b34..61d9f450dfd 100644\n--- a/t/t4013/diff.diff-tree_--cc_--stat_master\n+++ b/t/t4013/diff.diff-tree_-c_--stat_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc --stat master\n+$ git diff-tree -c --stat main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_-c_master b/t/t4013/diff.diff-tree_-c_main\nsimilarity index 93%\nrename from t/t4013/diff.diff-tree_-c_master\nrename to t/t4013/diff.diff-tree_-c_main\nindex e2d2bb26114..a84e1185cf5 100644\n--- a/t/t4013/diff.diff-tree_-c_master\n+++ b/t/t4013/diff.diff-tree_-c_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -c master\n+$ git diff-tree -c main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n ::100644 100644 100644 cead32e925b1420c84c14cbf7cf755e7e45af8ad 7289e35bff32727c08dda207511bec138fdb9ea5 992913c5aa0a5476d10c49ed0f21fc0c6d1aedf3 MM\tdir/sub\n ::100644 100644 100644 b414108e81e5091fe0974a1858b4d0d22b107f70 f4615da674c09df322d6ba8d6b21ecfb1b1ba510 10a8a9f3657f91a156b9f0184ed79a20adef9f7f MM\tfile0\ndiff --git a/t/t4013/diff.diff-tree_-m_master b/t/t4013/diff.diff-tree_-m_main\nsimilarity index 96%\nrename from t/t4013/diff.diff-tree_-m_master\nrename to t/t4013/diff.diff-tree_-m_main\nindex 6d0a2207fb3..5da1f7f5251 100644\n--- a/t/t4013/diff.diff-tree_-m_master\n+++ b/t/t4013/diff.diff-tree_-m_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -m master\n+$ git diff-tree -m main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n :040000 040000 65f5c9dd60ce3b2b3324b618ac7accf8d912c113 0564e026437809817a64fff393079714b6dd4628 M\tdir\n :100644 100644 b414108e81e5091fe0974a1858b4d0d22b107f70 10a8a9f3657f91a156b9f0184ed79a20adef9f7f M\tfile0\ndiff --git a/t/t4013/diff.diff-tree_-p_-m_master b/t/t4013/diff.diff-tree_-p_-m_main\nsimilarity index 97%\nrename from t/t4013/diff.diff-tree_-p_-m_master\nrename to t/t4013/diff.diff-tree_-p_-m_main\nindex b60bea039d9..29c9fc20b8b 100644\n--- a/t/t4013/diff.diff-tree_-p_-m_master\n+++ b/t/t4013/diff.diff-tree_-p_-m_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -p -m master\n+$ git diff-tree -p -m main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n diff --git a/dir/sub b/dir/sub\n index cead32e..992913c 100644\ndiff --git a/t/t4013/diff.diff-tree_-p_main b/t/t4013/diff.diff-tree_-p_main\nnew file mode 100644\nindex 00000000000..c658062422e\n--- /dev/null\n+++ b/t/t4013/diff.diff-tree_-p_main\n@@ -0,0 +1,2 @@\n+$ git diff-tree -p main\n+$\ndiff --git a/t/t4013/diff.diff-tree_-p_master b/t/t4013/diff.diff-tree_-p_master\ndeleted file mode 100644\nindex b182875fb2f..00000000000\n--- a/t/t4013/diff.diff-tree_-p_master\n+++ /dev/null\n@@ -1,2 +0,0 @@\n-$ git diff-tree -p master\n-$\ndiff --git a/t/t4013/diff.diff-tree_main b/t/t4013/diff.diff-tree_main\nnew file mode 100644\nindex 00000000000..dc5b9fdeb6e\n--- /dev/null\n+++ b/t/t4013/diff.diff-tree_main\n@@ -0,0 +1,2 @@\n+$ git diff-tree main\n+$\ndiff --git a/t/t4013/diff.diff-tree_master b/t/t4013/diff.diff-tree_master\ndeleted file mode 100644\nindex fe9226f8a12..00000000000\n--- a/t/t4013/diff.diff-tree_master\n+++ /dev/null\n@@ -1,2 +0,0 @@\n-$ git diff-tree master\n-$\ndiff --git a/t/t4013/diff.diff_--dirstat_--cc_main~1_main b/t/t4013/diff.diff_--dirstat_--cc_main~1_main\nnew file mode 100644\nindex 00000000000..168a357a02e\n--- /dev/null\n+++ b/t/t4013/diff.diff_--dirstat_--cc_main~1_main\n@@ -0,0 +1,3 @@\n+$ git diff --dirstat --cc main~1 main\n+  40.0% dir/\n+$\ndiff --git a/t/t4013/diff.diff_--dirstat_--cc_master~1_master b/t/t4013/diff.diff_--dirstat_--cc_master~1_master\ndeleted file mode 100644\nindex fba4e34175e..00000000000\n--- a/t/t4013/diff.diff_--dirstat_--cc_master~1_master\n+++ /dev/null\n@@ -1,3 +0,0 @@\n-$ git diff --dirstat --cc master~1 master\n-  40.0% dir/\n-$\ndiff --git a/t/t4013/diff.diff_--dirstat_main~1_main~2 b/t/t4013/diff.diff_--dirstat_main~1_main~2\nnew file mode 100644\nindex 00000000000..68097337089\n--- /dev/null\n+++ b/t/t4013/diff.diff_--dirstat_main~1_main~2\n@@ -0,0 +1,3 @@\n+$ git diff --dirstat main~1 main~2\n+  40.0% dir/\n+$\ndiff --git a/t/t4013/diff.diff_--dirstat_master~1_master~2 b/t/t4013/diff.diff_--dirstat_master~1_master~2\ndeleted file mode 100644\nindex b672e1ca63d..00000000000\n--- a/t/t4013/diff.diff_--dirstat_master~1_master~2\n+++ /dev/null\n@@ -1,3 +0,0 @@\n-$ git diff --dirstat master~1 master~2\n-  40.0% dir/\n-$\ndiff --git a/t/t4013/diff.diff_--line-prefix=abc_master_master^_side b/t/t4013/diff.diff_--line-prefix=abc_main_main^_side\nsimilarity index 87%\nrename from t/t4013/diff.diff_--line-prefix=abc_master_master^_side\nrename to t/t4013/diff.diff_--line-prefix=abc_main_main^_side\nindex 99f91e7f0e3..67a2145a365 100644\n--- a/t/t4013/diff.diff_--line-prefix=abc_master_master^_side\n+++ b/t/t4013/diff.diff_--line-prefix=abc_main_main^_side\n@@ -1,4 +1,4 @@\n-$ git diff --line-prefix=abc master master^ side\n+$ git diff --line-prefix=abc main main^ side\n abcdiff --cc dir/sub\n abcindex cead32e,7289e35..992913c\n abc--- a/dir/sub\ndiff --git a/t/t4013/diff.diff_master_master^_side b/t/t4013/diff.diff_main_main^_side\nsimilarity index 89%\nrename from t/t4013/diff.diff_master_master^_side\nrename to t/t4013/diff.diff_main_main^_side\nindex 50ec9cadd61..ab81ec9e47b 100644\n--- a/t/t4013/diff.diff_master_master^_side\n+++ b/t/t4013/diff.diff_main_main^_side\n@@ -1,4 +1,4 @@\n-$ git diff master master^ side\n+$ git diff main main^ side\n diff --cc dir/sub\n index cead32e,7289e35..992913c\n --- a/dir/sub\ndiff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master b/t/t4013/diff.format-patch_--attach_--stdout_initial..main\nsimilarity index 98%\nrename from t/t4013/diff.format-patch_--attach_--stdout_initial..master\nrename to t/t4013/diff.format-patch_--attach_--stdout_initial..main\nindex 52fedc179e5..9f56380350d 100644\n--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master\n+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --attach --stdout initial..master\n+$ git format-patch --attach --stdout initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main^\nsimilarity index 97%\nrename from t/t4013/diff.format-patch_--attach_--stdout_initial..master^\nrename to t/t4013/diff.format-patch_--attach_--stdout_initial..main^\nindex 1c3cde251b5..80132ea99eb 100644\n--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^\n+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main^\n@@ -1,4 +1,4 @@\n-$ git format-patch --attach --stdout initial..master^\n+$ git format-patch --attach --stdout initial..main^\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main\nsimilarity index 99%\nrename from t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master\nrename to t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main\nindex 02c4db7ec58..8e889090fbe 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --inline --stdout --numbered-files initial..master\n+$ git format-patch --inline --stdout --numbered-files initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main\nsimilarity index 99%\nrename from t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master\nrename to t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main\nindex c7677c5951c..d7d2b12d155 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..master\n+$ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_initial..main\nsimilarity index 98%\nrename from t/t4013/diff.format-patch_--inline_--stdout_initial..master\nrename to t/t4013/diff.format-patch_--inline_--stdout_initial..main\nindex 5b3e34e2c0c..c49c423f82f 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --inline --stdout initial..master\n+$ git format-patch --inline --stdout initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^\nsimilarity index 97%\nrename from t/t4013/diff.format-patch_--inline_--stdout_initial..master^\nrename to t/t4013/diff.format-patch_--inline_--stdout_initial..main^\nindex d13f8a81280..8669dbfe6c9 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^\n@@ -1,4 +1,4 @@\n-$ git format-patch --inline --stdout initial..master^\n+$ git format-patch --inline --stdout initial..main^\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^^\nsimilarity index 95%\nrename from t/t4013/diff.format-patch_--inline_--stdout_initial..master^^\nrename to t/t4013/diff.format-patch_--inline_--stdout_initial..main^^\nindex caec5537de3..b749be58b0a 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^^\n@@ -1,4 +1,4 @@\n-$ git format-patch --inline --stdout initial..master^^\n+$ git format-patch --inline --stdout initial..main^^\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^\nsimilarity index 96%\nrename from t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^\nrename to t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^\nindex 244d964fc67..567f2221982 100644\n--- a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^\n+++ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^\n@@ -1,4 +1,4 @@\n-$ git format-patch --stdout --cover-letter -n initial..master^\n+$ git format-patch --stdout --cover-letter -n initial..main^\n From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001\n From: C O Mitter <committer@example.com>\n Date: Mon, 26 Jun 2006 00:06:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main\nsimilarity index 97%\nrename from t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master\nrename to t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main\nindex bfc287a147d..195b62ea4f5 100644\n--- a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master\n+++ b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --stdout --no-numbered initial..master\n+$ git format-patch --stdout --no-numbered initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--numbered_initial..main\nsimilarity index 97%\nrename from t/t4013/diff.format-patch_--stdout_--numbered_initial..master\nrename to t/t4013/diff.format-patch_--stdout_--numbered_initial..main\nindex 568f6f584e6..0678a38515d 100644\n--- a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master\n+++ b/t/t4013/diff.format-patch_--stdout_--numbered_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --stdout --numbered initial..master\n+$ git format-patch --stdout --numbered initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--stdout_initial..master b/t/t4013/diff.format-patch_--stdout_initial..main\nsimilarity index 97%\nrename from t/t4013/diff.format-patch_--stdout_initial..master\nrename to t/t4013/diff.format-patch_--stdout_initial..main\nindex 5f0352f9f70..b4a6302e7cb 100644\n--- a/t/t4013/diff.format-patch_--stdout_initial..master\n+++ b/t/t4013/diff.format-patch_--stdout_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --stdout initial..master\n+$ git format-patch --stdout initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--stdout_initial..master^ b/t/t4013/diff.format-patch_--stdout_initial..main^\nsimilarity index 96%\nrename from t/t4013/diff.format-patch_--stdout_initial..master^\nrename to t/t4013/diff.format-patch_--stdout_initial..main^\nindex 2ae454d8073..36b32215826 100644\n--- a/t/t4013/diff.format-patch_--stdout_initial..master^\n+++ b/t/t4013/diff.format-patch_--stdout_initial..main^\n@@ -1,4 +1,4 @@\n-$ git format-patch --stdout initial..master^\n+$ git format-patch --stdout initial..main^\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.log_-c_-m_-p_master b/t/t4013/diff.log_--cc_-m_-p_main\nsimilarity index 99%\nrename from t/t4013/diff.log_-c_-m_-p_master\nrename to t/t4013/diff.log_--cc_-m_-p_main\nindex b660f3d5f28..f32746ea3ed 100644\n--- a/t/t4013/diff.log_-c_-m_-p_master\n+++ b/t/t4013/diff.log_--cc_-m_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -c -m -p master\n+$ git log --cc -m -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--decorate=full_--all b/t/t4013/diff.log_--decorate=full_--all\nindex 6b0b334a5d6..c099399525a 100644\n--- a/t/t4013/diff.log_--decorate=full_--all\n+++ b/t/t4013/diff.log_--decorate=full_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate=full_--clear-decorations_--all b/t/t4013/diff.log_--decorate=full_--clear-decorations_--all\nindex 1c030a6554e..c43684e5361 100644\n--- a/t/t4013/diff.log_--decorate=full_--clear-decorations_--all\n+++ b/t/t4013/diff.log_--decorate=full_--clear-decorations_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate=full_--decorate-all_--all b/t/t4013/diff.log_--decorate=full_--decorate-all_--all\nindex d6e79287846..48dca61681c 100644\n--- a/t/t4013/diff.log_--decorate=full_--decorate-all_--all\n+++ b/t/t4013/diff.log_--decorate=full_--decorate-all_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate_--all b/t/t4013/diff.log_--decorate_--all\nindex c7df1f58141..8bbf891f658 100644\n--- a/t/t4013/diff.log_--decorate_--all\n+++ b/t/t4013/diff.log_--decorate_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate_--clear-decorations_--all b/t/t4013/diff.log_--decorate_--clear-decorations_--all\nindex 88be82cce31..86b1353f514 100644\n--- a/t/t4013/diff.log_--decorate_--clear-decorations_--all\n+++ b/t/t4013/diff.log_--decorate_--clear-decorations_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate_--decorate-all_--all b/t/t4013/diff.log_--decorate_--decorate-all_--all\nindex 5d22618bb60..59fb17bfc54 100644\n--- a/t/t4013/diff.log_--decorate_--decorate-all_--all\n+++ b/t/t4013/diff.log_--decorate_--decorate-all_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--diff-merges=first-parent_master b/t/t4013/diff.log_--diff-merges=first-parent_main\nsimilarity index 95%\nrename from t/t4013/diff.log_--diff-merges=first-parent_master\nrename to t/t4013/diff.log_--diff-merges=first-parent_main\nindex fa63a557dd1..bacee621e54 100644\n--- a/t/t4013/diff.log_--diff-merges=first-parent_master\n+++ b/t/t4013/diff.log_--diff-merges=first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log --diff-merges=first-parent master\n+$ git log --diff-merges=first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master b/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_main\nsimilarity index 95%\nrename from t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master\nrename to t/t4013/diff.log_--diff-merges=off_-p_--first-parent_main\nindex 597002232e5..fe180fda3be 100644\n--- a/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master\n+++ b/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log --no-diff-merges -p --first-parent master\n+$ git log --diff-merges=off -p --first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_master b/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_main\nsimilarity index 95%\nrename from t/t4013/diff.log_--first-parent_--diff-merges=off_-p_master\nrename to t/t4013/diff.log_--first-parent_--diff-merges=off_-p_main\nindex 5d7461a167e..dca62d4e608 100644\n--- a/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_master\n+++ b/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_main\n@@ -1,4 +1,4 @@\n-$ git log --first-parent --diff-merges=off -p master\n+$ git log --first-parent --diff-merges=off -p main\n commit 80e25ffa65bcdbe82ef654b4d06dbbde7945c37f\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_master b/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_main\nsimilarity index 95%\nrename from t/t4013/diff.log_--diff-merges=off_-p_--first-parent_master\nrename to t/t4013/diff.log_--no-diff-merges_-p_--first-parent_main\nindex 194e893c94f..0b541180887 100644\n--- a/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_master\n+++ b/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log --diff-merges=off -p --first-parent master\n+$ git log --no-diff-merges -p --first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_\nsimilarity index 96%\nrename from t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_\nrename to t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_\nindex a18f1472a9a..3ed46cc8672 100644\n--- a/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_\n+++ b/t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_\n@@ -1,4 +1,4 @@\n-$ git log --patch-with-stat --summary master -- dir/\n+$ git log --patch-with-stat --summary main -- dir/\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--patch-with-stat_master b/t/t4013/diff.log_--patch-with-stat_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--patch-with-stat_master\nrename to t/t4013/diff.log_--patch-with-stat_main\nindex ae425c46722..2e12b557cb7 100644\n--- a/t/t4013/diff.log_--patch-with-stat_master\n+++ b/t/t4013/diff.log_--patch-with-stat_main\n@@ -1,4 +1,4 @@\n-$ git log --patch-with-stat master\n+$ git log --patch-with-stat main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--patch-with-stat_master_--_dir_ b/t/t4013/diff.log_--patch-with-stat_main_--_dir_\nsimilarity index 96%\nrename from t/t4013/diff.log_--patch-with-stat_master_--_dir_\nrename to t/t4013/diff.log_--patch-with-stat_main_--_dir_\nindex d5207cadf44..d511ea7f6bf 100644\n--- a/t/t4013/diff.log_--patch-with-stat_master_--_dir_\n+++ b/t/t4013/diff.log_--patch-with-stat_main_--_dir_\n@@ -1,4 +1,4 @@\n-$ git log --patch-with-stat master -- dir/\n+$ git log --patch-with-stat main -- dir/\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master\nrename to t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main\nindex 0fc1e8cd71f..3cfd0e64229 100644\n--- a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git log --root --cc --patch-with-stat --summary master\n+$ git log --root --cc --patch-with-stat --summary main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--patch-with-stat_--summary_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--root_--patch-with-stat_--summary_master\nrename to t/t4013/diff.log_--root_--patch-with-stat_--summary_main\nindex dffc09dde9e..9f4d6dfa44e 100644\n--- a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.log_--root_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git log --root --patch-with-stat --summary master\n+$ git log --root --patch-with-stat --summary main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_--patch-with-stat_master b/t/t4013/diff.log_--root_--patch-with-stat_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--root_--patch-with-stat_master\nrename to t/t4013/diff.log_--root_--patch-with-stat_main\nindex 55aa98012de..0d69ae2e11b 100644\n--- a/t/t4013/diff.log_--root_--patch-with-stat_master\n+++ b/t/t4013/diff.log_--root_--patch-with-stat_main\n@@ -1,4 +1,4 @@\n-$ git log --root --patch-with-stat master\n+$ git log --root --patch-with-stat main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master\nrename to t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main\nindex 019d85f7de6..1b71add9dea 100644\n--- a/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git log --root -c --patch-with-stat --summary master\n+$ git log --root -c --patch-with-stat --summary main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_-p_master b/t/t4013/diff.log_--root_-p_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--root_-p_master\nrename to t/t4013/diff.log_--root_-p_main\nindex b42c334439b..04581296ed5 100644\n--- a/t/t4013/diff.log_--root_-p_master\n+++ b/t/t4013/diff.log_--root_-p_main\n@@ -1,4 +1,4 @@\n-$ git log --root -p master\n+$ git log --root -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_master b/t/t4013/diff.log_--root_main\nsimilarity index 96%\nrename from t/t4013/diff.log_--root_master\nrename to t/t4013/diff.log_--root_main\nindex e8f46159da1..d5e90fd6b48 100644\n--- a/t/t4013/diff.log_--root_master\n+++ b/t/t4013/diff.log_--root_main\n@@ -1,4 +1,4 @@\n-$ git log --root master\n+$ git log --root main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-GF_-p_--pickaxe-all_master b/t/t4013/diff.log_-GF_-p_--pickaxe-all_main\nsimilarity index 90%\nrename from t/t4013/diff.log_-GF_-p_--pickaxe-all_master\nrename to t/t4013/diff.log_-GF_-p_--pickaxe-all_main\nindex d36f88098b0..1f7a497c2d7 100644\n--- a/t/t4013/diff.log_-GF_-p_--pickaxe-all_master\n+++ b/t/t4013/diff.log_-GF_-p_--pickaxe-all_main\n@@ -1,4 +1,4 @@\n-$ git log -GF -p --pickaxe-all master\n+$ git log -GF -p --pickaxe-all main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-GF_-p_master b/t/t4013/diff.log_-GF_-p_main\nsimilarity index 91%\nrename from t/t4013/diff.log_-GF_-p_master\nrename to t/t4013/diff.log_-GF_-p_main\nindex 9d93f2c23a8..c80dda41e9f 100644\n--- a/t/t4013/diff.log_-GF_-p_master\n+++ b/t/t4013/diff.log_-GF_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -GF -p master\n+$ git log -GF -p main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-SF_master b/t/t4013/diff.log_-GF_main\nsimilarity index 86%\nrename from t/t4013/diff.log_-SF_master\nrename to t/t4013/diff.log_-GF_main\nindex c1599f2f520..b94a7f78398 100644\n--- a/t/t4013/diff.log_-SF_master\n+++ b/t/t4013/diff.log_-GF_main\n@@ -1,4 +1,4 @@\n-$ git log -SF master\n+$ git log -GF main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master b/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main\nsimilarity index 97%\nrename from t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master\nrename to t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main\nindex 929f35a05b4..67e26b4e547 100644\n--- a/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master\n+++ b/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -IA -IB -I1 -I2 -p master\n+$ git log -IA -IB -I1 -I2 -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-SF_-p_master b/t/t4013/diff.log_-SF_-p_main\nsimilarity index 91%\nrename from t/t4013/diff.log_-SF_-p_master\nrename to t/t4013/diff.log_-SF_-p_main\nindex 5e324389729..fa82ac14908 100644\n--- a/t/t4013/diff.log_-SF_-p_master\n+++ b/t/t4013/diff.log_-SF_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -SF -p master\n+$ git log -SF -p main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-GF_master b/t/t4013/diff.log_-SF_main\nsimilarity index 86%\nrename from t/t4013/diff.log_-GF_master\nrename to t/t4013/diff.log_-SF_main\nindex 4c6708d2d0d..dbf770db49d 100644\n--- a/t/t4013/diff.log_-GF_master\n+++ b/t/t4013/diff.log_-SF_main\n@@ -1,4 +1,4 @@\n-$ git log -GF master\n+$ git log -SF main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-SF_main_--max-count=0 b/t/t4013/diff.log_-SF_main_--max-count=0\nnew file mode 100644\nindex 00000000000..683b17eb998\n--- /dev/null\n+++ b/t/t4013/diff.log_-SF_main_--max-count=0\n@@ -0,0 +1,2 @@\n+$ git log -SF main --max-count=0\n+$\ndiff --git a/t/t4013/diff.log_-SF_master_--max-count=2 b/t/t4013/diff.log_-SF_main_--max-count=1\nsimilarity index 79%\nrename from t/t4013/diff.log_-SF_master_--max-count=2\nrename to t/t4013/diff.log_-SF_main_--max-count=1\nindex a6c55fd4822..2102426f8cc 100644\n--- a/t/t4013/diff.log_-SF_master_--max-count=2\n+++ b/t/t4013/diff.log_-SF_main_--max-count=1\n@@ -1,4 +1,4 @@\n-$ git log -SF master --max-count=2\n+$ git log -SF main --max-count=1\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-SF_main_--max-count=2 b/t/t4013/diff.log_-SF_main_--max-count=2\nnew file mode 100644\nindex 00000000000..23e12a4cbbd\n--- /dev/null\n+++ b/t/t4013/diff.log_-SF_main_--max-count=2\n@@ -0,0 +1,7 @@\n+$ git log -SF main --max-count=2\n+commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n+Author: A U Thor <author@example.com>\n+Date:   Mon Jun 26 00:02:00 2006 +0000\n+\n+    Third\n+$\ndiff --git a/t/t4013/diff.log_-SF_master_--max-count=0 b/t/t4013/diff.log_-SF_master_--max-count=0\ndeleted file mode 100644\nindex c1fc6c87317..00000000000\n--- a/t/t4013/diff.log_-SF_master_--max-count=0\n+++ /dev/null\n@@ -1,2 +0,0 @@\n-$ git log -SF master --max-count=0\n-$\ndiff --git a/t/t4013/diff.log_-SF_master_--max-count=1 b/t/t4013/diff.log_-SF_master_--max-count=1\ndeleted file mode 100644\nindex c981a038147..00000000000\n--- a/t/t4013/diff.log_-SF_master_--max-count=1\n+++ /dev/null\n@@ -1,7 +0,0 @@\n-$ git log -SF master --max-count=1\n-commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n-Author: A U Thor <author@example.com>\n-Date:   Mon Jun 26 00:02:00 2006 +0000\n-\n-    Third\n-$\ndiff --git a/t/t4013/diff.log_-S_F_master b/t/t4013/diff.log_-S_F_main\nsimilarity index 86%\nrename from t/t4013/diff.log_-S_F_master\nrename to t/t4013/diff.log_-S_F_main\nindex 978d2b41188..a75a42e1433 100644\n--- a/t/t4013/diff.log_-S_F_master\n+++ b/t/t4013/diff.log_-S_F_main\n@@ -1,4 +1,4 @@\n-$ git log -S F master\n+$ git log -S F main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--cc_-m_-p_master b/t/t4013/diff.log_-c_-m_-p_main\nsimilarity index 99%\nrename from t/t4013/diff.log_--cc_-m_-p_master\nrename to t/t4013/diff.log_-c_-m_-p_main\nindex 7c217cf348c..427f7324568 100644\n--- a/t/t4013/diff.log_--cc_-m_-p_master\n+++ b/t/t4013/diff.log_-c_-m_-p_main\n@@ -1,4 +1,4 @@\n-$ git log --cc -m -p master\n+$ git log -c -m -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-m_--raw_master b/t/t4013/diff.log_-m_--raw_main\nsimilarity index 98%\nrename from t/t4013/diff.log_-m_--raw_master\nrename to t/t4013/diff.log_-m_--raw_main\nindex cd2ecc46283..31d9bc77073 100644\n--- a/t/t4013/diff.log_-m_--raw_master\n+++ b/t/t4013/diff.log_-m_--raw_main\n@@ -1,4 +1,4 @@\n-$ git log -m --raw master\n+$ git log -m --raw main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-m_--stat_master b/t/t4013/diff.log_-m_--stat_main\nsimilarity index 98%\nrename from t/t4013/diff.log_-m_--stat_master\nrename to t/t4013/diff.log_-m_--stat_main\nindex c7db084fd90..4c8909229bf 100644\n--- a/t/t4013/diff.log_-m_--stat_master\n+++ b/t/t4013/diff.log_-m_--stat_main\n@@ -1,4 +1,4 @@\n-$ git log -m --stat master\n+$ git log -m --stat main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-m_-p_--first-parent_master b/t/t4013/diff.log_-m_-p_--first-parent_main\nsimilarity index 97%\nrename from t/t4013/diff.log_-m_-p_--first-parent_master\nrename to t/t4013/diff.log_-m_-p_--first-parent_main\nindex 7a0073f5296..459e10786b9 100644\n--- a/t/t4013/diff.log_-m_-p_--first-parent_master\n+++ b/t/t4013/diff.log_-m_-p_--first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log -m -p --first-parent master\n+$ git log -m -p --first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-m_-p_master b/t/t4013/diff.log_-m_-p_main\nsimilarity index 99%\nrename from t/t4013/diff.log_-m_-p_master\nrename to t/t4013/diff.log_-m_-p_main\nindex 9ca62a01ed2..07453c56983 100644\n--- a/t/t4013/diff.log_-m_-p_master\n+++ b/t/t4013/diff.log_-m_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -m -p master\n+$ git log -m -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-p_--diff-merges=first-parent_master b/t/t4013/diff.log_-p_--diff-merges=first-parent_main\nsimilarity index 97%\nrename from t/t4013/diff.log_-p_--diff-merges=first-parent_master\nrename to t/t4013/diff.log_-p_--diff-merges=first-parent_main\nindex 9538a275112..264a2f373ec 100644\n--- a/t/t4013/diff.log_-p_--diff-merges=first-parent_master\n+++ b/t/t4013/diff.log_-p_--diff-merges=first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log -p --diff-merges=first-parent master\n+$ git log -p --diff-merges=first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-p_--first-parent_master b/t/t4013/diff.log_-p_--first-parent_main\nsimilarity index 97%\nrename from t/t4013/diff.log_-p_--first-parent_master\nrename to t/t4013/diff.log_-p_--first-parent_main\nindex 28840ebea1e..247980817b5 100644\n--- a/t/t4013/diff.log_-p_--first-parent_master\n+++ b/t/t4013/diff.log_-p_--first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log -p --first-parent master\n+$ git log -p --first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-p_master b/t/t4013/diff.log_-p_main\nsimilarity index 98%\nrename from t/t4013/diff.log_-p_master\nrename to t/t4013/diff.log_-p_main\nindex bf1326dc366..c82b4dbf165 100644\n--- a/t/t4013/diff.log_-p_master\n+++ b/t/t4013/diff.log_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -p master\n+$ git log -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_master b/t/t4013/diff.log_main\nsimilarity index 97%\nrename from t/t4013/diff.log_master\nrename to t/t4013/diff.log_main\nindex a8f6ce5abd6..50401f73e6e 100644\n--- a/t/t4013/diff.log_master\n+++ b/t/t4013/diff.log_main\n@@ -1,4 +1,4 @@\n-$ git log master\n+$ git log main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master b/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main\nsimilarity index 81%\nrename from t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master\nrename to t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main\nindex bb80f013b37..3aa1f80af35 100644\n--- a/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master\n+++ b/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -c --abbrev master\n+$ git diff-tree -c --abbrev main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n ::100644 100644 100644 cead32e 7289e35 992913c MM\tdir/sub\n ::100644 100644 100644 b414108 f4615da 10a8a9f MM\tfile0\ndiff --git a/t/t4013/diff.noellipses-whatchanged_--root_master b/t/t4013/diff.noellipses-whatchanged_--root_main\nsimilarity index 96%\nrename from t/t4013/diff.noellipses-whatchanged_--root_master\nrename to t/t4013/diff.noellipses-whatchanged_--root_main\nindex c2cfd4e7292..2bec0558356 100644\n--- a/t/t4013/diff.noellipses-whatchanged_--root_master\n+++ b/t/t4013/diff.noellipses-whatchanged_--root_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root master\n+$ git whatchanged --root main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.noellipses-whatchanged_-SF_master b/t/t4013/diff.noellipses-whatchanged_-SF_main\nsimilarity index 86%\nrename from t/t4013/diff.noellipses-whatchanged_-SF_master\nrename to t/t4013/diff.noellipses-whatchanged_-SF_main\nindex b36ce5886e0..0c1476d19eb 100644\n--- a/t/t4013/diff.noellipses-whatchanged_-SF_master\n+++ b/t/t4013/diff.noellipses-whatchanged_-SF_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged -SF master\n+$ git whatchanged -SF main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.noellipses-whatchanged_master b/t/t4013/diff.noellipses-whatchanged_main\nsimilarity index 96%\nrename from t/t4013/diff.noellipses-whatchanged_master\nrename to t/t4013/diff.noellipses-whatchanged_main\nindex 55e500f2edb..c48d2851aab 100644\n--- a/t/t4013/diff.noellipses-whatchanged_master\n+++ b/t/t4013/diff.noellipses-whatchanged_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged master\n+$ git whatchanged main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.show_--first-parent_master b/t/t4013/diff.show_--first-parent_main\nsimilarity index 92%\nrename from t/t4013/diff.show_--first-parent_master\nrename to t/t4013/diff.show_--first-parent_main\nindex 3dcbe473a0d..480502d65c2 100644\n--- a/t/t4013/diff.show_--first-parent_master\n+++ b/t/t4013/diff.show_--first-parent_main\n@@ -1,4 +1,4 @@\n-$ git show --first-parent master\n+$ git show --first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.show_-c_master b/t/t4013/diff.show_-c_main\nsimilarity index 95%\nrename from t/t4013/diff.show_-c_master\nrename to t/t4013/diff.show_-c_main\nindex 81aba8da96c..74ef8bc96b2 100644\n--- a/t/t4013/diff.show_-c_master\n+++ b/t/t4013/diff.show_-c_main\n@@ -1,4 +1,4 @@\n-$ git show -c master\n+$ git show -c main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.show_-m_master b/t/t4013/diff.show_-m_main\nsimilarity index 98%\nrename from t/t4013/diff.show_-m_master\nrename to t/t4013/diff.show_-m_main\nindex 4ea2ee453d5..8fd56736d97 100644\n--- a/t/t4013/diff.show_-m_master\n+++ b/t/t4013/diff.show_-m_main\n@@ -1,4 +1,4 @@\n-$ git show -m master\n+$ git show -m main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.show_master b/t/t4013/diff.show_main\nsimilarity index 96%\nrename from t/t4013/diff.show_master\nrename to t/t4013/diff.show_main\nindex fb08ce0e46d..630b52a95ef 100644\n--- a/t/t4013/diff.show_master\n+++ b/t/t4013/diff.show_main\n@@ -1,4 +1,4 @@\n-$ git show master\n+$ git show main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_\nsimilarity index 94%\nrename from t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_\nrename to t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_\nindex c8b6af2f438..ce0754d556e 100644\n--- a/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_\n+++ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_\n@@ -1,4 +1,4 @@\n-$ git whatchanged --patch-with-stat --summary master -- dir/\n+$ git whatchanged --patch-with-stat --summary main -- dir/\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--patch-with-stat_master b/t/t4013/diff.whatchanged_--patch-with-stat_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--patch-with-stat_master\nrename to t/t4013/diff.whatchanged_--patch-with-stat_main\nindex 1ac431ba921..aabccf39a53 100644\n--- a/t/t4013/diff.whatchanged_--patch-with-stat_master\n+++ b/t/t4013/diff.whatchanged_--patch-with-stat_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --patch-with-stat master\n+$ git whatchanged --patch-with-stat main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_ b/t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_\nsimilarity index 94%\nrename from t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_\nrename to t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_\nindex b30c28588f9..c05a0e81496 100644\n--- a/t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_\n+++ b/t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_\n@@ -1,4 +1,4 @@\n-$ git whatchanged --patch-with-stat master -- dir/\n+$ git whatchanged --patch-with-stat main -- dir/\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master\nrename to t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main\nindex 30aae7817b9..1f74b1b5487 100644\n--- a/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root --cc --patch-with-stat --summary master\n+$ git whatchanged --root --cc --patch-with-stat --summary main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master\nrename to t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main\nindex db90e515254..80d98121511 100644\n--- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root --patch-with-stat --summary master\n+$ git whatchanged --root --patch-with-stat --summary main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--root_--patch-with-stat_master\nrename to t/t4013/diff.whatchanged_--root_--patch-with-stat_main\nindex 9a6cc92ce7d..c0b9082a2c8 100644\n--- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master\n+++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root --patch-with-stat master\n+$ git whatchanged --root --patch-with-stat main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master\nrename to t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main\nindex d1d32bd34c3..0002c6912e1 100644\n--- a/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root -c --patch-with-stat --summary master\n+$ git whatchanged --root -c --patch-with-stat --summary main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.whatchanged_--root_-p_master b/t/t4013/diff.whatchanged_--root_-p_main\nsimilarity index 98%\nrename from t/t4013/diff.whatchanged_--root_-p_master\nrename to t/t4013/diff.whatchanged_--root_-p_main\nindex ebf1f0661e0..39f3e2be746 100644\n--- a/t/t4013/diff.whatchanged_--root_-p_master\n+++ b/t/t4013/diff.whatchanged_--root_-p_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root -p master\n+$ git whatchanged --root -p main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--root_master b/t/t4013/diff.whatchanged_--root_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--root_master\nrename to t/t4013/diff.whatchanged_--root_main\nindex a405cb61388..36f4d6697f5 100644\n--- a/t/t4013/diff.whatchanged_--root_master\n+++ b/t/t4013/diff.whatchanged_--root_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root master\n+$ git whatchanged --root main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_-SF_-p_master b/t/t4013/diff.whatchanged_-SF_-p_main\nsimilarity index 89%\nrename from t/t4013/diff.whatchanged_-SF_-p_master\nrename to t/t4013/diff.whatchanged_-SF_-p_main\nindex f39da848228..0e2e67c0df8 100644\n--- a/t/t4013/diff.whatchanged_-SF_-p_master\n+++ b/t/t4013/diff.whatchanged_-SF_-p_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged -SF -p master\n+$ git whatchanged -SF -p main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_-SF_master b/t/t4013/diff.whatchanged_-SF_main\nsimilarity index 86%\nrename from t/t4013/diff.whatchanged_-SF_master\nrename to t/t4013/diff.whatchanged_-SF_main\nindex 0499321d0eb..34c6bf6b950 100644\n--- a/t/t4013/diff.whatchanged_-SF_master\n+++ b/t/t4013/diff.whatchanged_-SF_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged -SF master\n+$ git whatchanged -SF main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_-p_master b/t/t4013/diff.whatchanged_-p_main\nsimilarity index 98%\nrename from t/t4013/diff.whatchanged_-p_master\nrename to t/t4013/diff.whatchanged_-p_main\nindex f18d43209c0..18f3bdeef48 100644\n--- a/t/t4013/diff.whatchanged_-p_master\n+++ b/t/t4013/diff.whatchanged_-p_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged -p master\n+$ git whatchanged -p main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_master b/t/t4013/diff.whatchanged_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_master\nrename to t/t4013/diff.whatchanged_main\nindex cd3bcc2c726..d6c83ed8b03 100644\n--- a/t/t4013/diff.whatchanged_master\n+++ b/t/t4013/diff.whatchanged_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged master\n+$ git whatchanged main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"525508","messageId":"c4d89c3761be77f1539668c8d543bb73fbf0dfee.1756992089.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1756992089.git.phillip.wood@dunelm.org.uk","subject":"[PATCH v2 4/4] t0613: stop setting default initial branch","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-04T13:21:32Z","receivedAt":"2025-09-04T13:22:59Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nAs the tests are all run in separate repositories, set the branch name\nto \"master\" when creating the repository for the tests where the result\ndepends on the branch name. This reduceds the number of tests that\ndepend on the default branch name being \"master\" and removes the last\ninstance of a test file using \"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=\nmaster\".\n\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n t/t0613-reftable-write-options.sh | 20 +++++++++-----------\n 1 file changed, 9 insertions(+), 11 deletions(-)\n\ndiff --git a/t/t0613-reftable-write-options.sh b/t/t0613-reftable-write-options.sh\nindex d77e601111f..6d00432219f 100755\n--- a/t/t0613-reftable-write-options.sh\n+++ b/t/t0613-reftable-write-options.sh\n@@ -11,16 +11,14 @@ export GIT_TEST_REFTABLE_AUTOCOMPACTION\n # Block sizes depend on the hash function, so we force SHA1 here.\n GIT_TEST_DEFAULT_HASH=sha1\n export GIT_TEST_DEFAULT_HASH\n-# Block sizes also depend on the actual refs we write, so we force \"master\" to\n-# be the default initial branch name.\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n \n test_expect_success 'default write options' '\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\t# Block sizes also depend on the actual refs we write, so we force\n+\t# \"master\" to be the default initial branch name.\n+\tgit init --initial-branch master repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n@@ -43,7 +41,7 @@ test_expect_success 'default write options' '\n test_expect_success 'disabled reflog writes no log blocks' '\n \ttest_config_global core.logAllRefUpdates false &&\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tgit init --initial-branch master repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n@@ -62,7 +60,7 @@ test_expect_success 'disabled reflog writes no log blocks' '\n \n test_expect_success 'many refs results in multiple blocks' '\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tgit init --initial-branch master repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n@@ -115,7 +113,7 @@ test_expect_success 'tiny block size leads to error' '\n test_expect_success 'small block size leads to multiple ref blocks' '\n \ttest_config_global core.logAllRefUpdates false &&\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tgit init --initial-branch master repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit A &&\n@@ -172,7 +170,7 @@ test_expect_success 'block size exceeding maximum supported size' '\n \n test_expect_success 'restart interval at every single record' '\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tgit init --initial-branch master repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n@@ -212,7 +210,7 @@ test_expect_success 'restart interval exceeding maximum supported interval' '\n test_expect_success 'object index gets written by default with ref index' '\n \ttest_config_global core.logAllRefUpdates false &&\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tgit init --initial-branch master repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n@@ -247,7 +245,7 @@ test_expect_success 'object index gets written by default with ref index' '\n test_expect_success 'object index can be disabled' '\n \ttest_config_global core.logAllRefUpdates false &&\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tgit init --initial-branch master repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"525512","messageId":"fcf633f6-26bb-405a-8cfb-718333c71dcd@gmail.com","threadId":"64047","inReplyTo":"xmqqcy87fkhm.fsf@gitster.g","subject":"Re: [PATCH 6/6] breaking-changes: switch default branch to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-04T13:27:44Z","receivedAt":"2025-09-04T13:27:47Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 03/09/2025 19:40, Junio C Hamano wrote:\n> Phillip Wood <phillip.wood123@gmail.com> writes:\n>> ... like to keep the patches that switch the tests from using\n>> \"master\" to \"main\".\n> \n> I have no problem with that.  I am still unsure about that \"reftable\n> cares about the name being 'master'\" thing.  If that can live with\n> any 6 byte name, we may want to fix it to something different from\n> 'master', for the sake of removing 'master'.  Perhaps 'banana' or\n> something?\n\nIn the end I left it as \"master\" as the series was really about changing \nthe default branch name rather than eliminating \"master\" from the test \nsuite. There are a bunch of other tests that also use \"git init -b \nmaster\" which we may want to change in the future, though to me updating \nthe documentation to stop using \"master\" as an example branch name would \nbe a higher priority.\n\nThanks\n\nPhillip\n\n"},{"id":"525513","messageId":"d990d908-5513-4f35-91ec-ff860ca126d5@gmail.com","threadId":"64047","inReplyTo":"aLk7QEEWy4nWxsQK@pks.im","subject":"Re: [PATCH 6/6] breaking-changes: switch default branch to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-04T13:30:58Z","receivedAt":"2025-09-04T13:31:01Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 04/09/2025 08:09, Patrick Steinhardt wrote:\n> On Wed, Sep 03, 2025 at 11:40:05AM -0700, Junio C Hamano wrote:\n>>\n>> I have no problem with that.  I am still unsure about that \"reftable\n>> cares about the name being 'master'\" thing.  If that can live with\n>> any 6 byte name, we may want to fix it to something different from\n>> 'master', for the sake of removing 'master'.  Perhaps 'banana' or\n>> something?\n> \n> Huh, did I miss anything? I scanned the thread for reftables but\n> couldn't find any discussion around it relying on a 6 byte name. Could\n> you maybe provide a pointer to what you are referring to?\n\nc.f. <xmqqwm6ozn7d.fsf@gitster.g>. In t0613 some of the tests check \nvarious sizes of things in the reftable and those depend on the length \nof the branch name\n\nThanks\n\nPhillip\n\n"},{"id":"525551","messageId":"xmqq7bye9mla.fsf@gitster.g","threadId":"64047","inReplyTo":"cover.1756992089.git.phillip.wood@dunelm.org.uk","subject":"Re: [PATCH v2 0/4] breaking changes: switch default initial branch name to \"main\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-09-04T17:03:29Z","receivedAt":"2025-09-04T17:03:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n> The patches have been re-ordered so that the change to the default\n> initial branch name comes first.\n\nWe have been running for quite some time the \"breaking-changes\" CI\njob with 'main' as the default initial branch name, long before this\nseries materialized.  Thanks to it, we know that such a flip should\nnot break any of our tests, so this patch being the first in the\nseries makes perfect sense.\n\n> That patch now includes a test\n> for the default initial branch name and includes the changes to the\n> commit message and documentation suggested by Patrick and Junio. The\n> commit messages for the other patches have been reworded now that\n> GIT_TEST_DEFAULT_BRANCH_NAME is not being removed but the code changes\n> are the same.\n>\n> This is an alternative to changing the branch name now as suggested in\n> https://lore.kernel.org<pull.1961.git.1756183921623.gitgitgadget@gmail.com\n\nNo reason to repost, but for those who are reading from the\nsidelines, the URL would work better with \"org<pull\" ->\n\"org/git/pull\".\n\nThanks.\n"},{"id":"525553","messageId":"xmqqjz2e86b7.fsf@gitster.g","threadId":"64047","inReplyTo":"6986375dc379a646bb184be3cf7a018b2eb3eec7.1756992089.git.phillip.wood@dunelm.org.uk","subject":"Re: [PATCH v2 1/4] breaking-changes: switch default branch to main","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-09-04T17:40:28Z","receivedAt":"2025-09-04T17:40:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n> diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc\n> index f8d2eba061c..eb92e6f6a7d 100644\n> --- a/Documentation/BreakingChanges.adoc\n> +++ b/Documentation/BreakingChanges.adoc\n> @@ -165,6 +165,11 @@ A prerequisite for this change is that the ecosystem is ready to support the\n>  \"reftable\" format. Most importantly, alternative implementations of Git like\n>  JGit, libgit2 and Gitoxide need to support it.\n>  \n> +* In new repositories the default branch name will be `main`. We have been\n> +  warning that the default name will change since 675704c74dd (init: provide\n> +  useful advice about init.defaultBranch, 2020-12-11).  The new name matches\n> +  the default branch name used by many of the big Git forges.\n\nAs I am not a native, this is a mere question and not a suggestion,\nbut my reading hiccups when I see the lack of comma after \"In new\nrepositories\".\n\n\"used by many of\" -> \"used for new repositories by many of\"?\n\n> diff --git a/Documentation/git-init.adoc b/Documentation/git-init.adoc\n> index a0dffba665f..bab99b9b477 100644\n> --- a/Documentation/git-init.adoc\n> +++ b/Documentation/git-init.adoc\n> @@ -77,9 +77,15 @@ If this is a reinitialization, the repository will be moved to the specified pat\n>  `-b <branch-name>`::\n>  `--initial-branch=<branch-name>`::\n>  Use _<branch-name>_ for the initial branch in the newly created\n> -repository.  If not specified, fall back to the default name (currently\n> -`master`, but this is subject to change in the future; the name can be\n> -customized via the `init.defaultBranch` configuration variable).\n> +repository.  If not specified, fall back to the default name\n> +ifndef::with-breaking-changes[]\n> +(currently `master`, but this will change to `main` when Git 3.0 is released).\n> +endif::with-breaking-changes[]\n> +ifdef::with-breaking-changes[]\n> +`main`.\n> +endif::with-breaking-changes[]\n> +The default name can be customized via the `init.defaultBranch` configuration\n> +variable.\n\nGood.  Both the text for post-3.0 period and the rephrasing of the\noriginal for pre-3.0 period look good.\n\n> diff --git a/advice.c b/advice.c\n> index e5f0ff84491..48c49ee4145 100644\n> --- a/advice.c\n> +++ b/advice.c\n> @@ -51,7 +51,9 @@ static struct {\n>  \t[ADVICE_AM_WORK_DIR] \t\t\t\t= { \"amWorkDir\" },\n>  \t[ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] \t= { \"checkoutAmbiguousRemoteBranchName\" },\n>  \t[ADVICE_COMMIT_BEFORE_MERGE]\t\t\t= { \"commitBeforeMerge\" },\n> +#ifndef WITH_BREAKING_CHANGES\n>  \t[ADVICE_DEFAULT_BRANCH_NAME]\t\t\t= { \"defaultBranchName\" },\n> +#endif /* WITH_BREAKING_CHANGES */\n>  \t[ADVICE_DETACHED_HEAD]\t\t\t\t= { \"detachedHead\" },\n>  \t[ADVICE_DIVERGING]\t\t\t\t= { \"diverging\" },\n>  \t[ADVICE_FETCH_SET_HEAD_WARN]\t\t\t= { \"fetchRemoteHEADWarn\" },\n\nWould there be folks who type \"git init\" to get a 'main' branch,\nwhile trying to follow a recipe written in pre-3.0 days that assumes\nthe initial branch is called differently, and get confused after\nseeing many commands written in the recipe for them to follow , like\n\"git checkout -b next master\" fail?  Do they need a different advice\nmessage to help them, i.e.e.g, \n\n    $ git init\n    Initialized empty Git repository in /a/b/c/.git/\n    hint: Since Git 3.0, an initial branch is 'main' these days.\n    hint: If you need its name to be different (e.g. 'frotz'),\n    hint: you can immediately rename it with \"git branch -m frotz\".\n    hint: Disable this message with \"got config set advice.foo false\"\n\nor something?  I dunno.  In any case, that will have to be a new and\ndifferent advice message, and defaultBranchName should not be reused\nfor that purpose, so the change in the the above hunk is fine.  I am\nwondering if we need a new entry protected by the same #ifdef on the\n#else side.\n\n> diff --git a/advice.h b/advice.h\n> index 727dcecf4a3..fc1dc872049 100644\n> --- a/advice.h\n> +++ b/advice.h\n> @@ -18,7 +18,9 @@ enum advice_type {\n>  \tADVICE_AM_WORK_DIR,\n>  \tADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME,\n>  \tADVICE_COMMIT_BEFORE_MERGE,\n> +#ifndef WITH_BREAKING_CHANGES\n>  \tADVICE_DEFAULT_BRANCH_NAME,\n> +#endif /* WITH_BREAKING_CHANGES */\n>  \tADVICE_DETACHED_HEAD,\n>  \tADVICE_DIVERGING,\n>  \tADVICE_FETCH_SET_HEAD_WARN,\n\nDitto.\n\n> diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh\n> index 01823fd0f14..a21834043f3 100755\n> --- a/ci/run-build-and-tests.sh\n> +++ b/ci/run-build-and-tests.sh\n> @@ -9,7 +9,6 @@ run_tests=t\n>  \n>  case \"$jobname\" in\n>  linux-breaking-changes)\n> -\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n>  \texport WITH_BREAKING_CHANGES=YesPlease\n>  \t;;\n\nOK.\n\n>  linux-TEST-vars)\n\nWe have been very careful to make sure that none of our tests\nimplicitly rely on that the initial branch name will still be\n'master' with the above.  Now we should make sure that none of our\ntests implicitly assume that the initial branch name will forever be\ncalled 'main'.  In the post-context, linux-TEST-vars arm has\nsomething that forces the initial branch name to be 'master', and we\nprobably should keep it for a while to serve that purpose.\n\n> diff --git a/refs.c b/refs.c\n> index 4ff55cf24f6..149a8d1cec1 100644\n> --- a/refs.c\n> +++ b/refs.c\n> @@ -627,10 +627,12 @@ void expand_ref_prefix(struct strvec *prefixes, const char *prefix)\n>  \t\tstrvec_pushf(prefixes, *p, len, prefix);\n>  }\n>  \n> +#ifndef WITH_BREAKING_CHANGES\n>  static const char default_branch_name_advice[] = N_(\n>  \"Using '%s' as the name for the initial branch. This default branch name\\n\"\n> -\"is subject to change. To configure the initial branch name to use in all\\n\"\n> -\"of your new repositories, which will suppress this warning, call:\\n\"\n> +\"will change to \\\"main\\\" in Git 3.0. To configure the initial branch name\\n\"\n> +\"to use in all of your new repositories, which will suppress this warning,\\n\"\n> +\"call:\\n\"\n>  \"\\n\"\n>  \"\\tgit config --global init.defaultBranch <name>\\n\"\n>  \"\\n\"\n> @@ -639,8 +641,9 @@ static const char default_branch_name_advice[] = N_(\n>  \"\\n\"\n>  \"\\tgit branch -m <name>\\n\"\n>  );\n> +#endif /* WITH_BREAKING_CHANGES */\n>  \n> -char *repo_default_branch_name(struct repository *r, int quiet)\n> +char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet)\n>  {\n\nAnd if we were to introduce a new advice to help people who still\nexpected the traditional name, this MAYBE_UNUSED would not become\nnecessary ...\n\n>  \tconst char *config_key = \"init.defaultbranch\";\n>  \tconst char *config_display_key = \"init.defaultBranch\";\n> @@ -649,14 +652,18 @@ char *repo_default_branch_name(struct repository *r, int quiet)\n>  \n>  \tif (env && *env)\n>  \t\tret = xstrdup(env);\n> -\telse if (repo_config_get_string(r, config_key, &ret) < 0)\n> +\tif (!ret && repo_config_get_string(r, config_key, &ret) < 0)\n>  \t\tdie(_(\"could not retrieve `%s`\"), config_display_key);\n>  \n>  \tif (!ret) {\n> +#ifdef WITH_BREAKING_CHANGES\n> +\t\tret = xstrdup(\"main\");\n\n... as we will have the same if (!quiet) advice sequence here,\nprotected with a different ADVICE_ thing.\n\n> +#else\n>  \t\tret = xstrdup(\"master\");\n>  \t\tif (!quiet)\n>  \t\t\tadvise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME,\n>  \t\t\t\t\t  _(default_branch_name_advice), ret);\n> +#endif /* WITH_BREAKING_CHANGES */\n>  \t}\n>  \n>  \tfull_ref = xstrfmt(\"refs/heads/%s\", ret);\n\nThanks.\n"},{"id":"525556","messageId":"xmqqfrd28448.fsf@gitster.g","threadId":"64047","inReplyTo":"f1bf01e13226cf3f6ca0e811123278248e4eea6d.1756992089.git.phillip.wood@dunelm.org.uk","subject":"Re: [PATCH v2 3/4] t9902: switch default branch name to main","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-09-04T18:27:51Z","receivedAt":"2025-09-04T18:27:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n> From: Phillip Wood <phillip.wood@dunelm.org.uk>\n>\n> Remove the penultimate use of \"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=\n> main\" in our test suite. We have slowly been removing these ever since\n\ns|main|master|, probably?\n\n> we started to switch the default branch name used in tests to \"main\".\n>\n> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n> ---\n>  t/t9902-completion.sh | 6 +++---\n>  1 file changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\n> index 6650d33fba6..964e1f15693 100755\n> --- a/t/t9902-completion.sh\n> +++ b/t/t9902-completion.sh\n> @@ -11,9 +11,9 @@ test_description='test bash completion'\n>  # untraceable with such ancient Bash versions.\n>  test_untraceable=UnfortunatelyYes\n>  \n> -# Override environment and always use master for the default initial branch\n> +# Override environment and always use main for the default initial branch\n>  # name for these tests, so that rev completion candidates are as expected.\n> -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n> +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n>  export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n>  \n>  . ./lib-bash.sh\n> @@ -1453,7 +1453,7 @@ test_expect_success 'git bisect - start subcommand arguments before double-dash\n>  \t\tHEAD Z\n>  \t\tfinal Z\n>  \t\tinitial Z\n> -\t\tmaster Z\n> +\t\tmain Z\n>  \t\tEOF\n>  \t)\n>  '\n"},{"id":"525557","messageId":"xmqqa53a83rg.fsf@gitster.g","threadId":"64047","inReplyTo":"c4d89c3761be77f1539668c8d543bb73fbf0dfee.1756992089.git.phillip.wood@dunelm.org.uk","subject":"Re: [PATCH v2 4/4] t0613: stop setting default initial branch","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-09-04T18:35:31Z","receivedAt":"2025-09-04T18:35:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n> From: Phillip Wood <phillip.wood@dunelm.org.uk>\n>\n> As the tests are all run in separate repositories, set the branch name\n> to \"master\" when creating the repository for the tests where the result\n> depends on the branch name. This reduceds the number of tests that\n> depend on the default branch name being \"master\" and removes the last\n> instance of a test file using \"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=\n> master\".\n>\n> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n> ---\n>  t/t0613-reftable-write-options.sh | 20 +++++++++-----------\n>  1 file changed, 9 insertions(+), 11 deletions(-)\n>\n> diff --git a/t/t0613-reftable-write-options.sh b/t/t0613-reftable-write-options.sh\n> index d77e601111f..6d00432219f 100755\n> --- a/t/t0613-reftable-write-options.sh\n> +++ b/t/t0613-reftable-write-options.sh\n> @@ -11,16 +11,14 @@ export GIT_TEST_REFTABLE_AUTOCOMPACTION\n>  # Block sizes depend on the hash function, so we force SHA1 here.\n>  GIT_TEST_DEFAULT_HASH=sha1\n>  export GIT_TEST_DEFAULT_HASH\n> -# Block sizes also depend on the actual refs we write, so we force \"master\" to\n> -# be the default initial branch name.\n> -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n> -export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n>  \n>  . ./test-lib.sh\n>  \n>  test_expect_success 'default write options' '\n>  \ttest_when_finished \"rm -rf repo\" &&\n> -\tgit init repo &&\n> +\t# Block sizes also depend on the actual refs we write, so we force\n> +\t# \"master\" to be the default initial branch name.\n\nA new developer who would want to add a new test later may or may\nnot pay attention to this first test piece that would look an equal\namong many others.  I suspect that keeping the comment before these\ntest sequences begin would have been better.  Or perhaps append \"all\nthe following test use the --initial-branch option for the same\nreason\" after it?\n\n> +\tgit init --initial-branch master repo &&\n> +\tgit init --initial-branch master repo &&\n> +\tgit init --initial-branch master repo &&\n> +\tgit init --initial-branch master repo &&\n> +\tgit init --initial-branch master repo &&\n> +\tgit init --initial-branch master repo &&\n> +\tgit init --initial-branch master repo &&\n\nHaving to change this many \"git init\" invocations feels awkward,\nespecially when we envision what needs to be done if somebody needs\nto update this file later.  I wonder if a new helper function\nupfront\n\n        +init_repo () {\n        +\tgit init --initial-branch master repo\n        +}\n        +\n\nwith many changes like this to the rest of file\n\n\t-\tgit init repo &&\n\t+\tinit_repo &&\n\nmay be easier to maintain over time?  I dunno.\n"},{"id":"525559","messageId":"cca02e90-a7a1-495f-94e5-426bc0c5f13e@gmail.com","threadId":"64047","inReplyTo":"xmqq7bye9mla.fsf@gitster.g","subject":"Re: [PATCH v2 0/4] breaking changes: switch default initial branch name to \"main\"","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-04T18:47:55Z","receivedAt":"2025-09-04T18:47:58Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 04/09/2025 18:03, Junio C Hamano wrote:\n> Phillip Wood <phillip.wood123@gmail.com> writes:\n> \n>> This is an alternative to changing the branch name now as suggested in\n>> https://lore.kernel.org<pull.1961.git.1756183921623.gitgitgadget@gmail.com\n> \n> No reason to repost, but for those who are reading from the\n> sidelines, the URL would work better with \"org<pull\" ->\n> \"org/git/pull\".\n\nThanks for correcting that. dscho pointed it out last time and I'd \nforgotten to change it.\nThanks\n\nPhillip\n\n"},{"id":"525587","messageId":"aLp-NA6FIIX5k7xh@pks.im","threadId":"64047","inReplyTo":"d990d908-5513-4f35-91ec-ff860ca126d5@gmail.com","subject":"Re: [PATCH 6/6] breaking-changes: switch default branch to main","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-09-05T06:07:48Z","receivedAt":"2025-09-05T06:07:55Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Thu, Sep 04, 2025 at 02:30:58PM +0100, Phillip Wood wrote:\n> On 04/09/2025 08:09, Patrick Steinhardt wrote:\n> > On Wed, Sep 03, 2025 at 11:40:05AM -0700, Junio C Hamano wrote:\n> > > \n> > > I have no problem with that.  I am still unsure about that \"reftable\n> > > cares about the name being 'master'\" thing.  If that can live with\n> > > any 6 byte name, we may want to fix it to something different from\n> > > 'master', for the sake of removing 'master'.  Perhaps 'banana' or\n> > > something?\n> > \n> > Huh, did I miss anything? I scanned the thread for reftables but\n> > couldn't find any discussion around it relying on a 6 byte name. Could\n> > you maybe provide a pointer to what you are referring to?\n> \n> c.f. <xmqqwm6ozn7d.fsf@gitster.g>. In t0613 some of the tests check various\n> sizes of things in the reftable and those depend on the length of the branch\n> name\n\nAh, makes sense. Thanks for the pointer.\n\nPatrick\n"},{"id":"525602","messageId":"f43c3e61-01c8-47d8-bf0d-7cfa13cacca5@gmail.com","threadId":"64047","inReplyTo":"xmqqjz2e86b7.fsf@gitster.g","subject":"Re: [PATCH v2 1/4] breaking-changes: switch default branch to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-05T10:06:41Z","receivedAt":"2025-09-05T10:06:45Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 04/09/2025 18:40, Junio C Hamano wrote:\n> Phillip Wood <phillip.wood123@gmail.com> writes:\n> \n>> diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc\n>> index f8d2eba061c..eb92e6f6a7d 100644\n>> --- a/Documentation/BreakingChanges.adoc\n>> +++ b/Documentation/BreakingChanges.adoc\n>> @@ -165,6 +165,11 @@ A prerequisite for this change is that the ecosystem is ready to support the\n>>   \"reftable\" format. Most importantly, alternative implementations of Git like\n>>   JGit, libgit2 and Gitoxide need to support it.\n>>   \n>> +* In new repositories the default branch name will be `main`. We have been\n>> +  warning that the default name will change since 675704c74dd (init: provide\n>> +  useful advice about init.defaultBranch, 2020-12-11).  The new name matches\n>> +  the default branch name used by many of the big Git forges.\n> \n> As I am not a native, this is a mere question and not a suggestion,\n> but my reading hiccups when I see the lack of comma after \"In new\n> repositories\".\n\nI agree a comma would be good here\n> \"used by many of\" -> \"used for new repositories by many of\"?\n\nSounds good\n>> diff --git a/advice.c b/advice.c\n>> index e5f0ff84491..48c49ee4145 100644\n>> --- a/advice.c\n>> +++ b/advice.c\n>> @@ -51,7 +51,9 @@ static struct {\n>>   \t[ADVICE_AM_WORK_DIR] \t\t\t\t= { \"amWorkDir\" },\n>>   \t[ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] \t= { \"checkoutAmbiguousRemoteBranchName\" },\n>>   \t[ADVICE_COMMIT_BEFORE_MERGE]\t\t\t= { \"commitBeforeMerge\" },\n>> +#ifndef WITH_BREAKING_CHANGES\n>>   \t[ADVICE_DEFAULT_BRANCH_NAME]\t\t\t= { \"defaultBranchName\" },\n>> +#endif /* WITH_BREAKING_CHANGES */\n>>   \t[ADVICE_DETACHED_HEAD]\t\t\t\t= { \"detachedHead\" },\n>>   \t[ADVICE_DIVERGING]\t\t\t\t= { \"diverging\" },\n>>   \t[ADVICE_FETCH_SET_HEAD_WARN]\t\t\t= { \"fetchRemoteHEADWarn\" },\n> \n> Would there be folks who type \"git init\" to get a 'main' branch,\n> while trying to follow a recipe written in pre-3.0 days that assumes\n> the initial branch is called differently, and get confused after\n> seeing many commands written in the recipe for them to follow , like\n> \"git checkout -b next master\" fail?  Do they need a different advice\n> message to help them, i.e.e.g,\n> \n>      $ git init\n>      Initialized empty Git repository in /a/b/c/.git/\n>      hint: Since Git 3.0, an initial branch is 'main' these days.\n>      hint: If you need its name to be different (e.g. 'frotz'),\n>      hint: you can immediately rename it with \"git branch -m frotz\".\n>      hint: Disable this message with \"got config set advice.foo false\"\n> \n> or something?  I dunno.  In any case, that will have to be a new and\n> different advice message, and defaultBranchName should not be reused\n> for that purpose, so the change in the the above hunk is fine.  I am\n> wondering if we need a new entry protected by the same #ifdef on the\n> #else side.\n\nPersonally I find the current advice pretty annoying and would be glad \nto see it go away. Are there really that many people who want to \ncustomize the initial branch name that it is worth adding some new \nadvice post Git 3.0? Although I find it annoying, I do think the current \nadvice serves a useful purpose as it informs people the default that \nthey are used to is changing and that they can override it. Given how \nlong we've been warning people I'm not sure we need to say anything once \nthe default has changed.\n\n>> diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh\n>> index 01823fd0f14..a21834043f3 100755\n>> --- a/ci/run-build-and-tests.sh\n>> +++ b/ci/run-build-and-tests.sh\n>> @@ -9,7 +9,6 @@ run_tests=t\n>>   \n>>   case \"$jobname\" in\n>>   linux-breaking-changes)\n>> -\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n>>   \texport WITH_BREAKING_CHANGES=YesPlease\n>>   \t;;\n> \n> OK.\n> \n>>   linux-TEST-vars)\n> \n> We have been very careful to make sure that none of our tests\n> implicitly rely on that the initial branch name will still be\n> 'master' with the above.  Now we should make sure that none of our\n> tests implicitly assume that the initial branch name will forever be\n> called 'main'.  In the post-context, linux-TEST-vars arm has\n> something that forces the initial branch name to be 'master', and we\n> probably should keep it for a while to serve that purpose.\n\nThat sounds sensible. I'll wait a few days to see if there are any other \ncomments and then re-roll the the documentation tweaks you suggested above.\n\nThanks\n\nPhillip\n\n>> diff --git a/refs.c b/refs.c\n>> index 4ff55cf24f6..149a8d1cec1 100644\n>> --- a/refs.c\n>> +++ b/refs.c\n>> @@ -627,10 +627,12 @@ void expand_ref_prefix(struct strvec *prefixes, const char *prefix)\n>>   \t\tstrvec_pushf(prefixes, *p, len, prefix);\n>>   }\n>>   \n>> +#ifndef WITH_BREAKING_CHANGES\n>>   static const char default_branch_name_advice[] = N_(\n>>   \"Using '%s' as the name for the initial branch. This default branch name\\n\"\n>> -\"is subject to change. To configure the initial branch name to use in all\\n\"\n>> -\"of your new repositories, which will suppress this warning, call:\\n\"\n>> +\"will change to \\\"main\\\" in Git 3.0. To configure the initial branch name\\n\"\n>> +\"to use in all of your new repositories, which will suppress this warning,\\n\"\n>> +\"call:\\n\"\n>>   \"\\n\"\n>>   \"\\tgit config --global init.defaultBranch <name>\\n\"\n>>   \"\\n\"\n>> @@ -639,8 +641,9 @@ static const char default_branch_name_advice[] = N_(\n>>   \"\\n\"\n>>   \"\\tgit branch -m <name>\\n\"\n>>   );\n>> +#endif /* WITH_BREAKING_CHANGES */\n>>   \n>> -char *repo_default_branch_name(struct repository *r, int quiet)\n>> +char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet)\n>>   {\n> \n> And if we were to introduce a new advice to help people who still\n> expected the traditional name, this MAYBE_UNUSED would not become\n> necessary ...\n> \n>>   \tconst char *config_key = \"init.defaultbranch\";\n>>   \tconst char *config_display_key = \"init.defaultBranch\";\n>> @@ -649,14 +652,18 @@ char *repo_default_branch_name(struct repository *r, int quiet)\n>>   \n>>   \tif (env && *env)\n>>   \t\tret = xstrdup(env);\n>> -\telse if (repo_config_get_string(r, config_key, &ret) < 0)\n>> +\tif (!ret && repo_config_get_string(r, config_key, &ret) < 0)\n>>   \t\tdie(_(\"could not retrieve `%s`\"), config_display_key);\n>>   \n>>   \tif (!ret) {\n>> +#ifdef WITH_BREAKING_CHANGES\n>> +\t\tret = xstrdup(\"main\");\n> \n> ... as we will have the same if (!quiet) advice sequence here,\n> protected with a different ADVICE_ thing.\n> \n>> +#else\n>>   \t\tret = xstrdup(\"master\");\n>>   \t\tif (!quiet)\n>>   \t\t\tadvise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME,\n>>   \t\t\t\t\t  _(default_branch_name_advice), ret);\n>> +#endif /* WITH_BREAKING_CHANGES */\n>>   \t}\n>>   \n>>   \tfull_ref = xstrfmt(\"refs/heads/%s\", ret);\n> \n> Thanks.\n\n"},{"id":"525603","messageId":"5b725ba8-c349-4630-91db-8992d893205e@gmail.com","threadId":"64047","inReplyTo":"xmqqfrd28448.fsf@gitster.g","subject":"Re: [PATCH v2 3/4] t9902: switch default branch name to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-05T10:07:34Z","receivedAt":"2025-09-05T10:07:39Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 04/09/2025 19:27, Junio C Hamano wrote:\n> Phillip Wood <phillip.wood123@gmail.com> writes:\n> \n>> From: Phillip Wood <phillip.wood@dunelm.org.uk>\n>>\n>> Remove the penultimate use of \"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=\n>> main\" in our test suite. We have slowly been removing these ever since\n> \n> s|main|master|, probably?\n\nOops, yes\n\nThanks\n\nPhillip\n>> we started to switch the default branch name used in tests to \"main\".\n>>\n>> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n>> ---\n>>   t/t9902-completion.sh | 6 +++---\n>>   1 file changed, 3 insertions(+), 3 deletions(-)\n>>\n>> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\n>> index 6650d33fba6..964e1f15693 100755\n>> --- a/t/t9902-completion.sh\n>> +++ b/t/t9902-completion.sh\n>> @@ -11,9 +11,9 @@ test_description='test bash completion'\n>>   # untraceable with such ancient Bash versions.\n>>   test_untraceable=UnfortunatelyYes\n>>   \n>> -# Override environment and always use master for the default initial branch\n>> +# Override environment and always use main for the default initial branch\n>>   # name for these tests, so that rev completion candidates are as expected.\n>> -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n>> +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n>>   export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n>>   \n>>   . ./lib-bash.sh\n>> @@ -1453,7 +1453,7 @@ test_expect_success 'git bisect - start subcommand arguments before double-dash\n>>   \t\tHEAD Z\n>>   \t\tfinal Z\n>>   \t\tinitial Z\n>> -\t\tmaster Z\n>> +\t\tmain Z\n>>   \t\tEOF\n>>   \t)\n>>   '\n\n"},{"id":"525604","messageId":"9f609d58-0abf-4bf3-8482-fc5487d72f31@gmail.com","threadId":"64047","inReplyTo":"xmqqa53a83rg.fsf@gitster.g","subject":"Re: [PATCH v2 4/4] t0613: stop setting default initial branch","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-05T10:09:30Z","receivedAt":"2025-09-05T10:09:35Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 04/09/2025 19:35, Junio C Hamano wrote:\n> \n> Having to change this many \"git init\" invocations feels awkward,\n> especially when we envision what needs to be done if somebody needs\n> to update this file later.  I wonder if a new helper function\n> upfront\n> \n>          +init_repo () {\n>          +\tgit init --initial-branch master repo\n>          +}\n>          +\n> \n> with many changes like this to the rest of file\n> \n> \t-\tgit init repo &&\n> \t+\tinit_repo &&\n> \n> may be easier to maintain over time?  I dunno.\n\nGood idea, that would give us a convenient place to move the comment to \nas well\n\nThanks\n\nPhillip\n\n"},{"id":"525617","messageId":"aLrULt3p_sHvj8r0@pks.im","threadId":"64047","inReplyTo":"f1bf01e13226cf3f6ca0e811123278248e4eea6d.1756992089.git.phillip.wood@dunelm.org.uk","subject":"Re: [PATCH v2 3/4] t9902: switch default branch name to main","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-09-05T12:14:38Z","receivedAt":"2025-09-05T12:14:46Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Thu, Sep 04, 2025 at 02:21:31PM +0100, Phillip Wood wrote:\n> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\n> index 6650d33fba6..964e1f15693 100755\n> --- a/t/t9902-completion.sh\n> +++ b/t/t9902-completion.sh\n> @@ -11,9 +11,9 @@ test_description='test bash completion'\n>  # untraceable with such ancient Bash versions.\n>  test_untraceable=UnfortunatelyYes\n>  \n> -# Override environment and always use master for the default initial branch\n> +# Override environment and always use main for the default initial branch\n>  # name for these tests, so that rev completion candidates are as expected.\n> -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n> +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n>  export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n>  \n>  . ./lib-bash.sh\n> @@ -1453,7 +1453,7 @@ test_expect_success 'git bisect - start subcommand arguments before double-dash\n>  \t\tHEAD Z\n>  \t\tfinal Z\n>  \t\tinitial Z\n> -\t\tmaster Z\n> +\t\tmain Z\n>  \t\tEOF\n>  \t)\n>  '\n\nHm. Wouldn't it be preferable to do something like the below patch\ninstead? We would potentially also have to sort the output, but like\nthis we don't care about the initial branch name at all.\n\nPatrick\n\ndiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\nindex 6650d33fba..321005a06a 100755\n--- a/t/t9902-completion.sh\n+++ b/t/t9902-completion.sh\n@@ -11,11 +11,6 @@ test_description='test bash completion'\n # untraceable with such ancient Bash versions.\n test_untraceable=UnfortunatelyYes\n \n-# Override environment and always use master for the default initial branch\n-# name for these tests, so that rev completion candidates are as expected.\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n-\n . ./lib-bash.sh\n \n complete ()\n@@ -1449,11 +1444,11 @@ test_expect_success 'setup for git-bisect tests requiring a repo' '\n test_expect_success 'git bisect - start subcommand arguments before double-dash are completed as revs' '\n \t(\n \t\tcd git-bisect &&\n-\t\ttest_completion \"git bisect start \" <<-\\EOF\n+\t\ttest_completion \"git bisect start \" <<-EOF\n \t\tHEAD Z\n \t\tfinal Z\n \t\tinitial Z\n-\t\tmaster Z\n+\t\t$(git branch --show-current) Z\n \t\tEOF\n \t)\n '\n"},{"id":"525645","messageId":"xmqqwm6d3pq2.fsf@gitster.g","threadId":"64047","inReplyTo":"f43c3e61-01c8-47d8-bf0d-7cfa13cacca5@gmail.com","subject":"Re: [PATCH v2 1/4] breaking-changes: switch default branch to main","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-09-05T15:04:37Z","receivedAt":"2025-09-05T15:04:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n>> Would there be folks who type \"git init\" to get a 'main' branch,\n>> while trying to follow a recipe written in pre-3.0 days that assumes\n>> the initial branch is called differently, and get confused after\n>> seeing many commands written in the recipe for them to follow , like\n>> \"git checkout -b next master\" fail?  Do they need a different advice\n>> message to help them, i.e.e.g,\n>>      $ git init\n>>      Initialized empty Git repository in /a/b/c/.git/\n>>      hint: Since Git 3.0, an initial branch is 'main' these days.\n>>      hint: If you need its name to be different (e.g. 'frotz'),\n>>      hint: you can immediately rename it with \"git branch -m frotz\".\n>>      hint: Disable this message with \"got config set advice.foo false\"\n>> or something?  I dunno.  In any case, that will have to be a new and\n>> different advice message, and defaultBranchName should not be reused\n>> for that purpose, so the change in the the above hunk is fine.  I am\n>> wondering if we need a new entry protected by the same #ifdef on the\n>> #else side.\n>\n> Personally I find the current advice pretty annoying and would be glad\n> to see it go away. Are there really that many people who want to\n> customize the initial branch name that it is worth adding some new\n> advice post Git 3.0?\n\nGiven that the tutorial materials that were written when we gave the\ninit.defaultBranchName mechanism _all_ assumed that by default the\ninitial branch that gets created is called 'master', the current\nadvice messages were primarily not about usability but personal\npreference.  The message targets those who dislike 'master' so much\nthat they are willing to replace all 'master' they read in the\ntutorial material as 'main' if they are following an existing\ntutorial material.  And the instruction is primarily about how to\nswitch to a new default permanently with the configuration.\n\nBut the one that I pointed out as missing in your proposal is quite\ndifferent.  It is meant for those who need help about usability, not\npersonal preference.  Even if they strongly prefer 'main' over\n'master', in order to follow along an existing tutorial material,\nthey will find it less error prone if the initial branch used in\ntheir practice repository were 'master'.  That is why the\ninstruction is only about recovering only _this_ repository they\njust have created (Notice that I did not tell them how to use the\nconfiguration mechanism to permanently live in the past in the above\n\"... or something?\" example?  It is very deliberate---\"the world has\nmoved, so should they, except for this single instance\" is the\nmessage they need to hear).\n\n> Although I find it annoying, I do think the\n> current advice serves a useful purpose as it informs people the\n> default that they are used to is changing and that they can override\n> it. Given how long we've been warning people I'm not sure we need to\n> say anything once the default has changed.\n\nYou need to remember that there always are new users who use Git\nseriously for the first time _after_ switchover happens.\n\nBecause it is more about usability than preference, I see at least\nthe same degree of need, if not more, to help these people who still\nneed to use the old name to follow along the tutorial material than\nthose who have been helped by the existing \"Sorry you got 'master',\nbut you may prefer a different name, and you can do so by doing\nthese things\" message,\n"},{"id":"525937","messageId":"6914d50d-20bb-40f2-9d52-920f37b6a3f1@gmail.com","threadId":"64047","inReplyTo":"aLrULt3p_sHvj8r0@pks.im","subject":"Re: [PATCH v2 3/4] t9902: switch default branch name to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-09T09:12:34Z","receivedAt":"2025-09-09T09:12:40Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 05/09/2025 13:14, Patrick Steinhardt wrote:\n> On Thu, Sep 04, 2025 at 02:21:31PM +0100, Phillip Wood wrote:\n>> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\n>> index 6650d33fba6..964e1f15693 100755\n>> --- a/t/t9902-completion.sh\n>> +++ b/t/t9902-completion.sh\n>> @@ -11,9 +11,9 @@ test_description='test bash completion'\n>>   # untraceable with such ancient Bash versions.\n>>   test_untraceable=UnfortunatelyYes\n>>   \n>> -# Override environment and always use master for the default initial branch\n>> +# Override environment and always use main for the default initial branch\n>>   # name for these tests, so that rev completion candidates are as expected.\n>> -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n>> +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n>>   export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n>>   \n>>   . ./lib-bash.sh\n>> @@ -1453,7 +1453,7 @@ test_expect_success 'git bisect - start subcommand arguments before double-dash\n>>   \t\tHEAD Z\n>>   \t\tfinal Z\n>>   \t\tinitial Z\n>> -\t\tmaster Z\n>> +\t\tmain Z\n>>   \t\tEOF\n>>   \t)\n>>   '\n> \n> Hm. Wouldn't it be preferable to do something like the below patch\n> instead? We would potentially also have to sort the output, but like\n> this we don't care about the initial branch name at all.\n\nIf we're going to do that then I'd strongly prefer that we have the test \nsuite set something like TEST_DEFAULT_BRANCH and use that instead of \nforking \"git branch\" or \"git symbolic-ref\" everywhere. It keeps the \ntests cleaner and avoids slowing the test suite down by adding a bunch \nof new processes.\n\nAs this patch series is focused on removing \nGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main rather than making tests \nindependent of the default branch name I'd prefer to leave this patch as is.\n\nThanks\n\nPhillip\n\n\n> Patrick\n> \n> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\n> index 6650d33fba..321005a06a 100755\n> --- a/t/t9902-completion.sh\n> +++ b/t/t9902-completion.sh\n> @@ -11,11 +11,6 @@ test_description='test bash completion'\n>   # untraceable with such ancient Bash versions.\n>   test_untraceable=UnfortunatelyYes\n>   \n> -# Override environment and always use master for the default initial branch\n> -# name for these tests, so that rev completion candidates are as expected.\n> -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n> -export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n> -\n>   . ./lib-bash.sh\n>   \n>   complete ()\n> @@ -1449,11 +1444,11 @@ test_expect_success 'setup for git-bisect tests requiring a repo' '\n>   test_expect_success 'git bisect - start subcommand arguments before double-dash are completed as revs' '\n>   \t(\n>   \t\tcd git-bisect &&\n> -\t\ttest_completion \"git bisect start \" <<-\\EOF\n> +\t\ttest_completion \"git bisect start \" <<-EOF\n>   \t\tHEAD Z\n>   \t\tfinal Z\n>   \t\tinitial Z\n> -\t\tmaster Z\n> +\t\t$(git branch --show-current) Z\n>   \t\tEOF\n>   \t)\n>   '\n> \n\n"},{"id":"526038","messageId":"cover.1757518141.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1756308283.git.phillip.wood@dunelm.org.uk","subject":"[PATCH v3 0/4] breaking changes: switch default initial branch name to \"main\"","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-10T15:28:59Z","receivedAt":"2025-09-10T15:29:23Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nThis series switches the default branch name from \"master\" to \"main\"\nwhen WITH_BREAKING_CHANGES is enabled. We have been warning that the\ndefault name will change since 675704c74dd (init: provide useful advice\nabout init.defaultBranch, 2020-12-11) and the major git forges have all\nswitched their default branch name to \"main\", so I think it makes sense\nto change the default branch name in git to match the wider ecosystem.\n\nThe first patch switches the default initial branch name to \"main\"\nand the other three patches remove the last remaining instances of\nGIT_TEST_DEFAULT_BRANCH_NAME=master from the test suite. Patch 2 is\nquite large but is mechanically generated so it should be possible\nto review it by checking that the changes can be reproduced. As this\nseries changes the default branch name it focuses on updating tests\nthat rely on the default branch name being \"master\", there are still\na number of tests that create a branch called \"master\".\n\nChanges since V2:\nPatch 1: reworded documentation\nPatch 3: fixed typo in commit message\nPatch 4: added helper function to initialise repository\n\nI'm still on the fence about the suggestion to add some advice on how\nto rename the branch after it is created in order to help users who\nare following tutorials using \"master\" rather than \"main\". One the\none hand I can see that would be helpful, on the other it is pretty\nannoying to everyone else. If it turns out that we want to add it we\ncan always do so at a later date.\n\nV2 Cover letter:\n\nThanks to everyone who commented on V1, I have dropped the removal of\nGIT_TEST_DEFAULT_BRANCH_NAME and the test changes related to that but\nhave kept the patches that remove GIT_TEST_DEFAULT_BRANCH_NAME=master.\nThe patches have been re-ordered so that the change to the default\ninitial branch name comes first. That patch now includes a test\nfor the default initial branch name and includes the changes to the\ncommit message and documentation suggested by Patrick and Junio. The\ncommit messages for the other patches have been reworded now that\nGIT_TEST_DEFAULT_BRANCH_NAME is not being removed but the code changes\nare the same.\n\nThis is an alternative to changing the branch name now as suggested in\nhttps://lore.kernel.org/git/pull.1961.git.1756183921623.gitgitgadget@gmail.com\n\nBase-Commit: f814da676ae46aac5be0a98b99373a76dee6cedb\nPublished-As: https://github.com/phillipwood/git/releases/tag/pw%2Finitial-branch-is-main%2Fv3\nView-Changes-At: https://github.com/phillipwood/git/compare/f814da676...353328c61\nFetch-It-Via: git fetch https://github.com/phillipwood/git pw/initial-branch-is-main/v3\n\n\nPhillip Wood (4):\n  breaking-changes: switch default branch to main\n  t4013: switch default branch name to main\n  t9902: switch default branch name to main\n  t0613: stop setting default initial branch\n\n Documentation/BreakingChanges.adoc            |   6 +\n Documentation/git-init.adoc                   |  12 +-\n advice.c                                      |   2 +\n advice.h                                      |   2 +\n ci/run-build-and-tests.sh                     |   1 -\n refs.c                                        |  15 +-\n t/t0001-init.sh                               |  18 +-\n t/t0613-reftable-write-options.sh             |  24 +-\n t/t4013-diff-various.sh                       | 228 +++++++++---------\n ...ree_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...iff.diff-tree_--cc_--patch-with-stat_main} |   2 +-\n ...r => diff.diff-tree_--cc_--shortstat_main} |   2 +-\n ...diff.diff-tree_--cc_--stat_--summary_main} |   2 +-\n ...master => diff.diff-tree_--cc_--stat_main} |   2 +-\n ...e_--cc_master => diff.diff-tree_--cc_main} |   2 +-\n ...master => diff.diff-tree_-c_--abbrev_main} |   2 +-\n ...> diff.diff-tree_-c_--stat_--summary_main} |   2 +-\n ...t_master => diff.diff-tree_-c_--stat_main} |   2 +-\n ...-tree_-c_master => diff.diff-tree_-c_main} |   2 +-\n ...-tree_-m_master => diff.diff-tree_-m_main} |   2 +-\n ...-p_-m_master => diff.diff-tree_-p_-m_main} |   2 +-\n t/t4013/diff.diff-tree_-p_main                |   2 +\n t/t4013/diff.diff-tree_-p_master              |   2 -\n t/t4013/diff.diff-tree_main                   |   2 +\n t/t4013/diff.diff-tree_master                 |   2 -\n t/t4013/diff.diff_--dirstat_--cc_main~1_main  |   3 +\n .../diff.diff_--dirstat_--cc_master~1_master  |   3 -\n t/t4013/diff.diff_--dirstat_main~1_main~2     |   3 +\n t/t4013/diff.diff_--dirstat_master~1_master~2 |   3 -\n ...ff.diff_--line-prefix=abc_main_main^_side} |   2 +-\n ...master^_side => diff.diff_main_main^_side} |   2 +-\n ...mat-patch_--attach_--stdout_initial..main} |   2 +-\n ...at-patch_--attach_--stdout_initial..main^} |   2 +-\n ...e_--stdout_--numbered-files_initial..main} |   2 +-\n ...t_--subject-prefix=TESTCASE_initial..main} |   2 +-\n ...mat-patch_--inline_--stdout_initial..main} |   2 +-\n ...at-patch_--inline_--stdout_initial..main^} |   2 +-\n ...t-patch_--inline_--stdout_initial..main^^} |   2 +-\n ...--stdout_--cover-letter_-n_initial..main^} |   2 +-\n ...atch_--stdout_--no-numbered_initial..main} |   2 +-\n ...t-patch_--stdout_--numbered_initial..main} |   2 +-\n ... diff.format-patch_--stdout_initial..main} |   2 +-\n ...diff.format-patch_--stdout_initial..main^} |   2 +-\n ..._-m_-p_master => diff.log_--cc_-m_-p_main} |   2 +-\n t/t4013/diff.log_--decorate=full_--all        |   2 +-\n ..._--decorate=full_--clear-decorations_--all |   2 +-\n ...f.log_--decorate=full_--decorate-all_--all |   2 +-\n t/t4013/diff.log_--decorate_--all             |   2 +-\n ...f.log_--decorate_--clear-decorations_--all |   2 +-\n .../diff.log_--decorate_--decorate-all_--all  |   2 +-\n ... diff.log_--diff-merges=first-parent_main} |   2 +-\n ..._--diff-merges=off_-p_--first-parent_main} |   2 +-\n ..._--first-parent_--diff-merges=off_-p_main} |   2 +-\n ...g_--no-diff-merges_-p_--first-parent_main} |   2 +-\n ..._--patch-with-stat_--summary_main_--_dir_} |   2 +-\n ...master => diff.log_--patch-with-stat_main} |   2 +-\n ...> diff.log_--patch-with-stat_main_--_dir_} |   2 +-\n ...oot_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...g_--root_--patch-with-stat_--summary_main} |   2 +-\n ...=> diff.log_--root_--patch-with-stat_main} |   2 +-\n ...-root_-c_--patch-with-stat_--summary_main} |   2 +-\n ...root_-p_master => diff.log_--root_-p_main} |   2 +-\n ...log_--root_master => diff.log_--root_main} |   2 +-\n ...ter => diff.log_-GF_-p_--pickaxe-all_main} |   2 +-\n ...log_-GF_-p_master => diff.log_-GF_-p_main} |   2 +-\n ...{diff.log_-SF_master => diff.log_-GF_main} |   2 +-\n ...aster => diff.log_-IA_-IB_-I1_-I2_-p_main} |   2 +-\n ...log_-SF_-p_master => diff.log_-SF_-p_main} |   2 +-\n ...{diff.log_-GF_master => diff.log_-SF_main} |   2 +-\n t/t4013/diff.log_-SF_main_--max-count=0       |   2 +\n ...ount=2 => diff.log_-SF_main_--max-count=1} |   2 +-\n t/t4013/diff.log_-SF_main_--max-count=2       |   7 +\n t/t4013/diff.log_-SF_master_--max-count=0     |   2 -\n t/t4013/diff.log_-SF_master_--max-count=1     |   7 -\n ...iff.log_-S_F_master => diff.log_-S_F_main} |   2 +-\n ...cc_-m_-p_master => diff.log_-c_-m_-p_main} |   2 +-\n ...-m_--raw_master => diff.log_-m_--raw_main} |   2 +-\n ..._--stat_master => diff.log_-m_--stat_main} |   2 +-\n ...ter => diff.log_-m_-p_--first-parent_main} |   2 +-\n ...f.log_-m_-p_master => diff.log_-m_-p_main} |   2 +-\n ...ff.log_-p_--diff-merges=first-parent_main} |   2 +-\n ...master => diff.log_-p_--first-parent_main} |   2 +-\n .../{diff.log_-p_master => diff.log_-p_main}  |   2 +-\n t/t4013/{diff.log_master => diff.log_main}    |   2 +-\n ...iff.noellipses-diff-tree_-c_--abbrev_main} |   2 +-\n ...> diff.noellipses-whatchanged_--root_main} |   2 +-\n ...r => diff.noellipses-whatchanged_-SF_main} |   2 +-\n ...aster => diff.noellipses-whatchanged_main} |   2 +-\n ...t_master => diff.show_--first-parent_main} |   2 +-\n ...{diff.show_-c_master => diff.show_-c_main} |   2 +-\n ...{diff.show_-m_master => diff.show_-m_main} |   2 +-\n t/t4013/{diff.show_master => diff.show_main}  |   2 +-\n ..._--patch-with-stat_--summary_main_--_dir_} |   2 +-\n ...> diff.whatchanged_--patch-with-stat_main} |   2 +-\n ...hatchanged_--patch-with-stat_main_--_dir_} |   2 +-\n ...oot_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...d_--root_--patch-with-stat_--summary_main} |   2 +-\n ...whatchanged_--root_--patch-with-stat_main} |   2 +-\n ...-root_-c_--patch-with-stat_--summary_main} |   2 +-\n ...master => diff.whatchanged_--root_-p_main} |   2 +-\n ...ot_master => diff.whatchanged_--root_main} |   2 +-\n ...-p_master => diff.whatchanged_-SF_-p_main} |   2 +-\n ...d_-SF_master => diff.whatchanged_-SF_main} |   2 +-\n ...ged_-p_master => diff.whatchanged_-p_main} |   2 +-\n ...atchanged_master => diff.whatchanged_main} |   2 +-\n t/t9902-completion.sh                         |   6 +-\n t/test-lib.sh                                 |  11 +-\n 107 files changed, 287 insertions(+), 244 deletions(-)\n rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_--summary_master => diff.diff-tree_--cc_--patch-with-stat_--summary_main} (86%)\n rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_master => diff.diff-tree_--cc_--patch-with-stat_main} (89%)\n rename t/t4013/{diff.diff-tree_--cc_--shortstat_master => diff.diff-tree_--cc_--shortstat_main} (65%)\n rename t/t4013/{diff.diff-tree_-c_--stat_--summary_master => diff.diff-tree_--cc_--stat_--summary_main} (71%)\n rename t/t4013/{diff.diff-tree_-c_--stat_master => diff.diff-tree_--cc_--stat_main} (76%)\n rename t/t4013/{diff.diff-tree_--cc_master => diff.diff-tree_--cc_main} (91%)\n rename t/t4013/{diff.diff-tree_-c_--abbrev_master => diff.diff-tree_-c_--abbrev_main} (83%)\n rename t/t4013/{diff.diff-tree_--cc_--stat_--summary_master => diff.diff-tree_-c_--stat_--summary_main} (70%)\n rename t/t4013/{diff.diff-tree_--cc_--stat_master => diff.diff-tree_-c_--stat_main} (75%)\n rename t/t4013/{diff.diff-tree_-c_master => diff.diff-tree_-c_main} (93%)\n rename t/t4013/{diff.diff-tree_-m_master => diff.diff-tree_-m_main} (96%)\n rename t/t4013/{diff.diff-tree_-p_-m_master => diff.diff-tree_-p_-m_main} (97%)\n create mode 100644 t/t4013/diff.diff-tree_-p_main\n delete mode 100644 t/t4013/diff.diff-tree_-p_master\n create mode 100644 t/t4013/diff.diff-tree_main\n delete mode 100644 t/t4013/diff.diff-tree_master\n create mode 100644 t/t4013/diff.diff_--dirstat_--cc_main~1_main\n delete mode 100644 t/t4013/diff.diff_--dirstat_--cc_master~1_master\n create mode 100644 t/t4013/diff.diff_--dirstat_main~1_main~2\n delete mode 100644 t/t4013/diff.diff_--dirstat_master~1_master~2\n rename t/t4013/{diff.diff_--line-prefix=abc_master_master^_side => diff.diff_--line-prefix=abc_main_main^_side} (87%)\n rename t/t4013/{diff.diff_master_master^_side => diff.diff_main_main^_side} (89%)\n rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master => diff.format-patch_--attach_--stdout_initial..main} (98%)\n rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master^ => diff.format-patch_--attach_--stdout_initial..main^} (97%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_--numbered-files_initial..master => diff.format-patch_--inline_--stdout_--numbered-files_initial..main} (99%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master => diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main} (99%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master => diff.format-patch_--inline_--stdout_initial..main} (98%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^ => diff.format-patch_--inline_--stdout_initial..main^} (97%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^^ => diff.format-patch_--inline_--stdout_initial..main^^} (95%)\n rename t/t4013/{diff.format-patch_--stdout_--cover-letter_-n_initial..master^ => diff.format-patch_--stdout_--cover-letter_-n_initial..main^} (96%)\n rename t/t4013/{diff.format-patch_--stdout_--no-numbered_initial..master => diff.format-patch_--stdout_--no-numbered_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_--numbered_initial..master => diff.format-patch_--stdout_--numbered_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_initial..master => diff.format-patch_--stdout_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_initial..master^ => diff.format-patch_--stdout_initial..main^} (96%)\n rename t/t4013/{diff.log_-c_-m_-p_master => diff.log_--cc_-m_-p_main} (99%)\n rename t/t4013/{diff.log_--diff-merges=first-parent_master => diff.log_--diff-merges=first-parent_main} (95%)\n rename t/t4013/{diff.log_--no-diff-merges_-p_--first-parent_master => diff.log_--diff-merges=off_-p_--first-parent_main} (95%)\n rename t/t4013/{diff.log_--first-parent_--diff-merges=off_-p_master => diff.log_--first-parent_--diff-merges=off_-p_main} (95%)\n rename t/t4013/{diff.log_--diff-merges=off_-p_--first-parent_master => diff.log_--no-diff-merges_-p_--first-parent_main} (95%)\n rename t/t4013/{diff.log_--patch-with-stat_--summary_master_--_dir_ => diff.log_--patch-with-stat_--summary_main_--_dir_} (96%)\n rename t/t4013/{diff.log_--patch-with-stat_master => diff.log_--patch-with-stat_main} (98%)\n rename t/t4013/{diff.log_--patch-with-stat_master_--_dir_ => diff.log_--patch-with-stat_main_--_dir_} (96%)\n rename t/t4013/{diff.log_--root_--cc_--patch-with-stat_--summary_master => diff.log_--root_--cc_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_--patch-with-stat_--summary_master => diff.log_--root_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_--patch-with-stat_master => diff.log_--root_--patch-with-stat_main} (98%)\n rename t/t4013/{diff.log_--root_-c_--patch-with-stat_--summary_master => diff.log_--root_-c_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_-p_master => diff.log_--root_-p_main} (98%)\n rename t/t4013/{diff.log_--root_master => diff.log_--root_main} (96%)\n rename t/t4013/{diff.log_-GF_-p_--pickaxe-all_master => diff.log_-GF_-p_--pickaxe-all_main} (90%)\n rename t/t4013/{diff.log_-GF_-p_master => diff.log_-GF_-p_main} (91%)\n rename t/t4013/{diff.log_-SF_master => diff.log_-GF_main} (86%)\n rename t/t4013/{diff.log_-IA_-IB_-I1_-I2_-p_master => diff.log_-IA_-IB_-I1_-I2_-p_main} (97%)\n rename t/t4013/{diff.log_-SF_-p_master => diff.log_-SF_-p_main} (91%)\n rename t/t4013/{diff.log_-GF_master => diff.log_-SF_main} (86%)\n create mode 100644 t/t4013/diff.log_-SF_main_--max-count=0\n rename t/t4013/{diff.log_-SF_master_--max-count=2 => diff.log_-SF_main_--max-count=1} (79%)\n create mode 100644 t/t4013/diff.log_-SF_main_--max-count=2\n delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=0\n delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=1\n rename t/t4013/{diff.log_-S_F_master => diff.log_-S_F_main} (86%)\n rename t/t4013/{diff.log_--cc_-m_-p_master => diff.log_-c_-m_-p_main} (99%)\n rename t/t4013/{diff.log_-m_--raw_master => diff.log_-m_--raw_main} (98%)\n rename t/t4013/{diff.log_-m_--stat_master => diff.log_-m_--stat_main} (98%)\n rename t/t4013/{diff.log_-m_-p_--first-parent_master => diff.log_-m_-p_--first-parent_main} (97%)\n rename t/t4013/{diff.log_-m_-p_master => diff.log_-m_-p_main} (99%)\n rename t/t4013/{diff.log_-p_--diff-merges=first-parent_master => diff.log_-p_--diff-merges=first-parent_main} (97%)\n rename t/t4013/{diff.log_-p_--first-parent_master => diff.log_-p_--first-parent_main} (97%)\n rename t/t4013/{diff.log_-p_master => diff.log_-p_main} (98%)\n rename t/t4013/{diff.log_master => diff.log_main} (97%)\n rename t/t4013/{diff.noellipses-diff-tree_-c_--abbrev_master => diff.noellipses-diff-tree_-c_--abbrev_main} (81%)\n rename t/t4013/{diff.noellipses-whatchanged_--root_master => diff.noellipses-whatchanged_--root_main} (96%)\n rename t/t4013/{diff.noellipses-whatchanged_-SF_master => diff.noellipses-whatchanged_-SF_main} (86%)\n rename t/t4013/{diff.noellipses-whatchanged_master => diff.noellipses-whatchanged_main} (96%)\n rename t/t4013/{diff.show_--first-parent_master => diff.show_--first-parent_main} (92%)\n rename t/t4013/{diff.show_-c_master => diff.show_-c_main} (95%)\n rename t/t4013/{diff.show_-m_master => diff.show_-m_main} (98%)\n rename t/t4013/{diff.show_master => diff.show_main} (96%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ => diff.whatchanged_--patch-with-stat_--summary_main_--_dir_} (94%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_master => diff.whatchanged_--patch-with-stat_main} (97%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_master_--_dir_ => diff.whatchanged_--patch-with-stat_main_--_dir_} (94%)\n rename t/t4013/{diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master => diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_--summary_master => diff.whatchanged_--root_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_master => diff.whatchanged_--root_--patch-with-stat_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_-c_--patch-with-stat_--summary_master => diff.whatchanged_--root_-c_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_-p_master => diff.whatchanged_--root_-p_main} (98%)\n rename t/t4013/{diff.whatchanged_--root_master => diff.whatchanged_--root_main} (97%)\n rename t/t4013/{diff.whatchanged_-SF_-p_master => diff.whatchanged_-SF_-p_main} (89%)\n rename t/t4013/{diff.whatchanged_-SF_master => diff.whatchanged_-SF_main} (86%)\n rename t/t4013/{diff.whatchanged_-p_master => diff.whatchanged_-p_main} (98%)\n rename t/t4013/{diff.whatchanged_master => diff.whatchanged_main} (97%)\n\nRange-diff against v2:\n1:  6986375dc37 ! 1:  441bc5f9bcb breaking-changes: switch default branch to main\n    @@ Documentation/BreakingChanges.adoc: A prerequisite for this change is that the e\n      \"reftable\" format. Most importantly, alternative implementations of Git like\n      JGit, libgit2 and Gitoxide need to support it.\n      \n    -+* In new repositories the default branch name will be `main`. We have been\n    -+  warning that the default name will change since 675704c74dd (init: provide\n    -+  useful advice about init.defaultBranch, 2020-12-11).  The new name matches\n    -+  the default branch name used by many of the big Git forges.\n    ++* In new repositories, the default branch name will be `main`. We have been\n    ++  warning that the default name will change since 675704c74dd (init:\n    ++  provide useful advice about init.defaultBranch, 2020-12-11).  The new name\n    ++  matches the default branch name used in new repositories by many of the\n    ++  big Git forges.\n     +\n      === Removals\n      \n2:  2a112a1b983 = 2:  f1a778e76c3 t4013: switch default branch name to main\n3:  f1bf01e1322 ! 3:  8e32712a158 t9902: switch default branch name to main\n    @@ Commit message\n         t9902: switch default branch name to main\n     \n         Remove the penultimate use of \"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=\n    -    main\" in our test suite. We have slowly been removing these ever since\n    -    we started to switch the default branch name used in tests to \"main\".\n    +    master\" in our test suite. We have slowly been removing these ever\n    +    since we started to switch the default branch name used in tests to\n    +    \"main\".\n     \n         Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n     \n4:  c4d89c3761b ! 4:  353328c6189 t0613: stop setting default initial branch\n    @@ Metadata\n      ## Commit message ##\n         t0613: stop setting default initial branch\n     \n    -    As the tests are all run in separate repositories, set the branch name\n    -    to \"master\" when creating the repository for the tests where the result\n    -    depends on the branch name. This reduceds the number of tests that\n    -    depend on the default branch name being \"master\" and removes the last\n    -    instance of a test file using \"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=\n    -    master\".\n    +    As the tests are all run in separate repositories, set the branch\n    +    name to \"master\" when creating the repository for the tests where\n    +    the result depends on the branch name. In order to make it easier to\n    +    change the branch name in the future a helper function is used. This\n    +    reduces the number of tests that depend on the default branch name\n    +    being \"master\" and removes the last instance of a test file using\n    +    \"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\".\n     \n    +    Helped-by: Junio C Hamano <gitster@pobox.com>\n         Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n     \n      ## t/t0613-reftable-write-options.sh ##\n    @@ t/t0613-reftable-write-options.sh: export GIT_TEST_REFTABLE_AUTOCOMPACTION\n      \n      . ./test-lib.sh\n      \n    ++# Block sizes depend on the actual refs we write, so, for tests\n    ++# that check block size, we force the initial branch name to be \"master\".\n    ++init_repo () {\n    ++\tgit init --initial-branch master repo\n    ++}\n    ++\n      test_expect_success 'default write options' '\n      \ttest_when_finished \"rm -rf repo\" &&\n     -\tgit init repo &&\n    -+\t# Block sizes also depend on the actual refs we write, so we force\n    -+\t# \"master\" to be the default initial branch name.\n    -+\tgit init --initial-branch master repo &&\n    ++\tinit_repo &&\n      \t(\n      \t\tcd repo &&\n      \t\ttest_commit initial &&\n    @@ t/t0613-reftable-write-options.sh: test_expect_success 'default write options' '\n      \ttest_config_global core.logAllRefUpdates false &&\n      \ttest_when_finished \"rm -rf repo\" &&\n     -\tgit init repo &&\n    -+\tgit init --initial-branch master repo &&\n    ++\tinit_repo &&\n      \t(\n      \t\tcd repo &&\n      \t\ttest_commit initial &&\n    @@ t/t0613-reftable-write-options.sh: test_expect_success 'disabled reflog writes n\n      test_expect_success 'many refs results in multiple blocks' '\n      \ttest_when_finished \"rm -rf repo\" &&\n     -\tgit init repo &&\n    -+\tgit init --initial-branch master repo &&\n    ++\tinit_repo &&\n      \t(\n      \t\tcd repo &&\n      \t\ttest_commit initial &&\n    @@ t/t0613-reftable-write-options.sh: test_expect_success 'tiny block size leads to\n      \ttest_config_global core.logAllRefUpdates false &&\n      \ttest_when_finished \"rm -rf repo\" &&\n     -\tgit init repo &&\n    -+\tgit init --initial-branch master repo &&\n    ++\tinit_repo &&\n      \t(\n      \t\tcd repo &&\n      \t\ttest_commit A &&\n    @@ t/t0613-reftable-write-options.sh: test_expect_success 'block size exceeding max\n      test_expect_success 'restart interval at every single record' '\n      \ttest_when_finished \"rm -rf repo\" &&\n     -\tgit init repo &&\n    -+\tgit init --initial-branch master repo &&\n    ++\tinit_repo &&\n      \t(\n      \t\tcd repo &&\n      \t\ttest_commit initial &&\n    @@ t/t0613-reftable-write-options.sh: test_expect_success 'restart interval exceedi\n      \ttest_config_global core.logAllRefUpdates false &&\n      \ttest_when_finished \"rm -rf repo\" &&\n     -\tgit init repo &&\n    -+\tgit init --initial-branch master repo &&\n    ++\tinit_repo &&\n      \t(\n      \t\tcd repo &&\n      \t\ttest_commit initial &&\n    @@ t/t0613-reftable-write-options.sh: test_expect_success 'object index gets writte\n      \ttest_config_global core.logAllRefUpdates false &&\n      \ttest_when_finished \"rm -rf repo\" &&\n     -\tgit init repo &&\n    -+\tgit init --initial-branch master repo &&\n    ++\tinit_repo &&\n      \t(\n      \t\tcd repo &&\n      \t\ttest_commit initial &&\n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"526039","messageId":"441bc5f9bcbf70f401fd9df01c441cda23d4f5ca.1757518141.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1757518141.git.phillip.wood@dunelm.org.uk","subject":"[PATCH v3 1/4] breaking-changes: switch default branch to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-10T15:29:00Z","receivedAt":"2025-09-10T15:29:24Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nSince 1296cbe4b46 (init: document `init.defaultBranch` better,\n2020-12-11) \"git-init.adoc\" has advertised that the default name\nof the initial branch may change in the future. The name \"main\"\nis chosen to match the default used by the big Git forge web sites.\n\nThe advice printed when init.defaultBranch is not set is updated\nto say that the default will change to \"main\" in Git 3.0. Building\nwith WITH_BREAKING_CHANGES enabled removes the advice and changes\nthe default branch name to \"main\". The code in guess_remote_head()\nthat looks for \"refs/heads/master\" is left unchanged as that is only\ncalled when the remote server does not support the symref capability\nin the v0 protocol or the symref extension to the ls-refs list in the\nv2 protocol. Such an old server is more likely to be using \"master\"\nas the default branch name.\n\nWith the exception of the \"git-init.adoc\" the documentation is left\nunchanged. I had hoped to parameterize the name of the default branch\nby using an asciidoc attribute. Unfortunately attribute expansion\nis inhibited by backticks and we use backticks to mark up ref names\nso that idea does not work. As the changes to git-init.adoc show\ninserting ifdef's around each instance of the branch name \"master\"\nis cumbersome and makes the documentation sources harder to read.\n\nApart from \"git-init.adoc\" there are some other files where \"master\" is\nused as the name of the initial branch rather than as an example of a\nbranch name such as \"user-manual.adoc\" and \"gitcore-tutorial.adoc\". The\nname appears a lot in those so updating it with ifdef's is not really\npractical. We can update that document in the 3.0 release cycle. The\nother documentation where master is used as an example branch name\ncan be gradually converted over time.\n\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n Documentation/BreakingChanges.adoc |  6 ++++++\n Documentation/git-init.adoc        | 12 +++++++++---\n advice.c                           |  2 ++\n advice.h                           |  2 ++\n ci/run-build-and-tests.sh          |  1 -\n refs.c                             | 15 +++++++++++----\n t/t0001-init.sh                    | 18 +++++++++++++++++-\n t/test-lib.sh                      | 11 +++++++----\n 8 files changed, 54 insertions(+), 13 deletions(-)\n\ndiff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc\nindex f8d2eba061c..f4e11c88655 100644\n--- a/Documentation/BreakingChanges.adoc\n+++ b/Documentation/BreakingChanges.adoc\n@@ -165,6 +165,12 @@ A prerequisite for this change is that the ecosystem is ready to support the\n \"reftable\" format. Most importantly, alternative implementations of Git like\n JGit, libgit2 and Gitoxide need to support it.\n \n+* In new repositories, the default branch name will be `main`. We have been\n+  warning that the default name will change since 675704c74dd (init:\n+  provide useful advice about init.defaultBranch, 2020-12-11).  The new name\n+  matches the default branch name used in new repositories by many of the\n+  big Git forges.\n+\n === Removals\n \n * Support for grafting commits has long been superseded by git-replace(1).\ndiff --git a/Documentation/git-init.adoc b/Documentation/git-init.adoc\nindex a0dffba665f..bab99b9b477 100644\n--- a/Documentation/git-init.adoc\n+++ b/Documentation/git-init.adoc\n@@ -77,9 +77,15 @@ If this is a reinitialization, the repository will be moved to the specified pat\n `-b <branch-name>`::\n `--initial-branch=<branch-name>`::\n Use _<branch-name>_ for the initial branch in the newly created\n-repository.  If not specified, fall back to the default name (currently\n-`master`, but this is subject to change in the future; the name can be\n-customized via the `init.defaultBranch` configuration variable).\n+repository.  If not specified, fall back to the default name\n+ifndef::with-breaking-changes[]\n+(currently `master`, but this will change to `main` when Git 3.0 is released).\n+endif::with-breaking-changes[]\n+ifdef::with-breaking-changes[]\n+`main`.\n+endif::with-breaking-changes[]\n+The default name can be customized via the `init.defaultBranch` configuration\n+variable.\n \n `--shared[=(false|true|umask|group|all|world|everybody|<perm>)]`::\n \ndiff --git a/advice.c b/advice.c\nindex e5f0ff84491..48c49ee4145 100644\n--- a/advice.c\n+++ b/advice.c\n@@ -51,7 +51,9 @@ static struct {\n \t[ADVICE_AM_WORK_DIR] \t\t\t\t= { \"amWorkDir\" },\n \t[ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] \t= { \"checkoutAmbiguousRemoteBranchName\" },\n \t[ADVICE_COMMIT_BEFORE_MERGE]\t\t\t= { \"commitBeforeMerge\" },\n+#ifndef WITH_BREAKING_CHANGES\n \t[ADVICE_DEFAULT_BRANCH_NAME]\t\t\t= { \"defaultBranchName\" },\n+#endif /* WITH_BREAKING_CHANGES */\n \t[ADVICE_DETACHED_HEAD]\t\t\t\t= { \"detachedHead\" },\n \t[ADVICE_DIVERGING]\t\t\t\t= { \"diverging\" },\n \t[ADVICE_FETCH_SET_HEAD_WARN]\t\t\t= { \"fetchRemoteHEADWarn\" },\ndiff --git a/advice.h b/advice.h\nindex 727dcecf4a3..fc1dc872049 100644\n--- a/advice.h\n+++ b/advice.h\n@@ -18,7 +18,9 @@ enum advice_type {\n \tADVICE_AM_WORK_DIR,\n \tADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME,\n \tADVICE_COMMIT_BEFORE_MERGE,\n+#ifndef WITH_BREAKING_CHANGES\n \tADVICE_DEFAULT_BRANCH_NAME,\n+#endif /* WITH_BREAKING_CHANGES */\n \tADVICE_DETACHED_HEAD,\n \tADVICE_DIVERGING,\n \tADVICE_FETCH_SET_HEAD_WARN,\ndiff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh\nindex 01823fd0f14..a21834043f3 100755\n--- a/ci/run-build-and-tests.sh\n+++ b/ci/run-build-and-tests.sh\n@@ -9,7 +9,6 @@ run_tests=t\n \n case \"$jobname\" in\n linux-breaking-changes)\n-\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n \texport WITH_BREAKING_CHANGES=YesPlease\n \t;;\n linux-TEST-vars)\ndiff --git a/refs.c b/refs.c\nindex 4ff55cf24f6..149a8d1cec1 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -627,10 +627,12 @@ void expand_ref_prefix(struct strvec *prefixes, const char *prefix)\n \t\tstrvec_pushf(prefixes, *p, len, prefix);\n }\n \n+#ifndef WITH_BREAKING_CHANGES\n static const char default_branch_name_advice[] = N_(\n \"Using '%s' as the name for the initial branch. This default branch name\\n\"\n-\"is subject to change. To configure the initial branch name to use in all\\n\"\n-\"of your new repositories, which will suppress this warning, call:\\n\"\n+\"will change to \\\"main\\\" in Git 3.0. To configure the initial branch name\\n\"\n+\"to use in all of your new repositories, which will suppress this warning,\\n\"\n+\"call:\\n\"\n \"\\n\"\n \"\\tgit config --global init.defaultBranch <name>\\n\"\n \"\\n\"\n@@ -639,8 +641,9 @@ static const char default_branch_name_advice[] = N_(\n \"\\n\"\n \"\\tgit branch -m <name>\\n\"\n );\n+#endif /* WITH_BREAKING_CHANGES */\n \n-char *repo_default_branch_name(struct repository *r, int quiet)\n+char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet)\n {\n \tconst char *config_key = \"init.defaultbranch\";\n \tconst char *config_display_key = \"init.defaultBranch\";\n@@ -649,14 +652,18 @@ char *repo_default_branch_name(struct repository *r, int quiet)\n \n \tif (env && *env)\n \t\tret = xstrdup(env);\n-\telse if (repo_config_get_string(r, config_key, &ret) < 0)\n+\tif (!ret && repo_config_get_string(r, config_key, &ret) < 0)\n \t\tdie(_(\"could not retrieve `%s`\"), config_display_key);\n \n \tif (!ret) {\n+#ifdef WITH_BREAKING_CHANGES\n+\t\tret = xstrdup(\"main\");\n+#else\n \t\tret = xstrdup(\"master\");\n \t\tif (!quiet)\n \t\t\tadvise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME,\n \t\t\t\t\t  _(default_branch_name_advice), ret);\n+#endif /* WITH_BREAKING_CHANGES */\n \t}\n \n \tfull_ref = xstrfmt(\"refs/heads/%s\", ret);\ndiff --git a/t/t0001-init.sh b/t/t0001-init.sh\nindex f593c536874..df0040b9ace 100755\n--- a/t/t0001-init.sh\n+++ b/t/t0001-init.sh\n@@ -868,7 +868,7 @@ test_expect_success 'overridden default initial branch name (config)' '\n \tgrep nmb actual\n '\n \n-test_expect_success 'advice on unconfigured init.defaultBranch' '\n+test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' '\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \\\n \t\tinit unconfigured-default-branch-name 2>err &&\n \ttest_decode_color <err >decoded &&\n@@ -883,6 +883,22 @@ test_expect_success 'advice on unconfigured init.defaultBranch disabled' '\n \ttest_grep ! \"hint: \" err\n '\n \n+test_expect_success 'default branch name' '\n+\tif test_have_prereq WITH_BREAKING_CHANGES\n+\tthen\n+\t\texpect=main\n+\telse\n+\t\texpect=master\n+\tfi &&\n+\techo \"refs/heads/$expect\" >expect &&\n+\t(\n+\t\tsane_unset GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME &&\n+\t\tgit init default-initial-branch-name\n+\t) &&\n+\tgit -C default-initial-branch-name symbolic-ref HEAD >actual &&\n+\ttest_cmp expect actual\n+'\n+\n test_expect_success 'overridden default main branch name (env)' '\n \ttest_config_global init.defaultBranch nmb &&\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=env git init main-branch-env &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 621cd31ae1d..b191954c3c4 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -127,10 +127,13 @@ then\n \texport GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS\n fi\n \n-# Explicitly set the default branch name for testing, to avoid the\n-# transitory \"git init\" warning under --verbose.\n-: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master}\n-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+if test -z \"$WITH_BREAKING_CHANGES\"\n+then\n+\t# Explicitly set the default branch name for testing, to avoid the\n+\t# transitory \"git init\" warning under --verbose.\n+\t: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master}\n+\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+fi\n \n ################################################################\n # It appears that people try to run tests without building...\n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"526042","messageId":"f1a778e76c3c6b35af0f0a5aef57ab4e24fe27c0.1757518141.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1757518141.git.phillip.wood@dunelm.org.uk","subject":"[PATCH v3 2/4] t4013: switch default branch name to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-10T15:29:01Z","receivedAt":"2025-09-10T15:29:25Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nRemove one of the last remaining uses of\n\"TEST_GIT_DEFAULT_INITIAL_BRANCH= main\" in the test suite. We have\nbeen steadily be converting tests from using \"master\" as the default\nbranch name since the introduction of TEST_GIT_DEFAULT_INITIAL_BRANCH\nin 704fed9ea22 (tests: start moving to a different default main branch\nname, 2020-10-23) The changes here are purely mechanical replacing\n\"master\" with \"main\"\n\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n t/t4013-diff-various.sh                       | 228 +++++++++---------\n ...ree_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...iff.diff-tree_--cc_--patch-with-stat_main} |   2 +-\n ...r => diff.diff-tree_--cc_--shortstat_main} |   2 +-\n ...diff.diff-tree_--cc_--stat_--summary_main} |   2 +-\n ...master => diff.diff-tree_--cc_--stat_main} |   2 +-\n ...e_--cc_master => diff.diff-tree_--cc_main} |   2 +-\n ...master => diff.diff-tree_-c_--abbrev_main} |   2 +-\n ...> diff.diff-tree_-c_--stat_--summary_main} |   2 +-\n ...t_master => diff.diff-tree_-c_--stat_main} |   2 +-\n ...-tree_-c_master => diff.diff-tree_-c_main} |   2 +-\n ...-tree_-m_master => diff.diff-tree_-m_main} |   2 +-\n ...-p_-m_master => diff.diff-tree_-p_-m_main} |   2 +-\n t/t4013/diff.diff-tree_-p_main                |   2 +\n t/t4013/diff.diff-tree_-p_master              |   2 -\n t/t4013/diff.diff-tree_main                   |   2 +\n t/t4013/diff.diff-tree_master                 |   2 -\n t/t4013/diff.diff_--dirstat_--cc_main~1_main  |   3 +\n .../diff.diff_--dirstat_--cc_master~1_master  |   3 -\n t/t4013/diff.diff_--dirstat_main~1_main~2     |   3 +\n t/t4013/diff.diff_--dirstat_master~1_master~2 |   3 -\n ...ff.diff_--line-prefix=abc_main_main^_side} |   2 +-\n ...master^_side => diff.diff_main_main^_side} |   2 +-\n ...mat-patch_--attach_--stdout_initial..main} |   2 +-\n ...at-patch_--attach_--stdout_initial..main^} |   2 +-\n ...e_--stdout_--numbered-files_initial..main} |   2 +-\n ...t_--subject-prefix=TESTCASE_initial..main} |   2 +-\n ...mat-patch_--inline_--stdout_initial..main} |   2 +-\n ...at-patch_--inline_--stdout_initial..main^} |   2 +-\n ...t-patch_--inline_--stdout_initial..main^^} |   2 +-\n ...--stdout_--cover-letter_-n_initial..main^} |   2 +-\n ...atch_--stdout_--no-numbered_initial..main} |   2 +-\n ...t-patch_--stdout_--numbered_initial..main} |   2 +-\n ... diff.format-patch_--stdout_initial..main} |   2 +-\n ...diff.format-patch_--stdout_initial..main^} |   2 +-\n ..._-m_-p_master => diff.log_--cc_-m_-p_main} |   2 +-\n t/t4013/diff.log_--decorate=full_--all        |   2 +-\n ..._--decorate=full_--clear-decorations_--all |   2 +-\n ...f.log_--decorate=full_--decorate-all_--all |   2 +-\n t/t4013/diff.log_--decorate_--all             |   2 +-\n ...f.log_--decorate_--clear-decorations_--all |   2 +-\n .../diff.log_--decorate_--decorate-all_--all  |   2 +-\n ... diff.log_--diff-merges=first-parent_main} |   2 +-\n ..._--diff-merges=off_-p_--first-parent_main} |   2 +-\n ..._--first-parent_--diff-merges=off_-p_main} |   2 +-\n ...g_--no-diff-merges_-p_--first-parent_main} |   2 +-\n ..._--patch-with-stat_--summary_main_--_dir_} |   2 +-\n ...master => diff.log_--patch-with-stat_main} |   2 +-\n ...> diff.log_--patch-with-stat_main_--_dir_} |   2 +-\n ...oot_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...g_--root_--patch-with-stat_--summary_main} |   2 +-\n ...=> diff.log_--root_--patch-with-stat_main} |   2 +-\n ...-root_-c_--patch-with-stat_--summary_main} |   2 +-\n ...root_-p_master => diff.log_--root_-p_main} |   2 +-\n ...log_--root_master => diff.log_--root_main} |   2 +-\n ...ter => diff.log_-GF_-p_--pickaxe-all_main} |   2 +-\n ...log_-GF_-p_master => diff.log_-GF_-p_main} |   2 +-\n ...{diff.log_-SF_master => diff.log_-GF_main} |   2 +-\n ...aster => diff.log_-IA_-IB_-I1_-I2_-p_main} |   2 +-\n ...log_-SF_-p_master => diff.log_-SF_-p_main} |   2 +-\n ...{diff.log_-GF_master => diff.log_-SF_main} |   2 +-\n t/t4013/diff.log_-SF_main_--max-count=0       |   2 +\n ...ount=2 => diff.log_-SF_main_--max-count=1} |   2 +-\n t/t4013/diff.log_-SF_main_--max-count=2       |   7 +\n t/t4013/diff.log_-SF_master_--max-count=0     |   2 -\n t/t4013/diff.log_-SF_master_--max-count=1     |   7 -\n ...iff.log_-S_F_master => diff.log_-S_F_main} |   2 +-\n ...cc_-m_-p_master => diff.log_-c_-m_-p_main} |   2 +-\n ...-m_--raw_master => diff.log_-m_--raw_main} |   2 +-\n ..._--stat_master => diff.log_-m_--stat_main} |   2 +-\n ...ter => diff.log_-m_-p_--first-parent_main} |   2 +-\n ...f.log_-m_-p_master => diff.log_-m_-p_main} |   2 +-\n ...ff.log_-p_--diff-merges=first-parent_main} |   2 +-\n ...master => diff.log_-p_--first-parent_main} |   2 +-\n .../{diff.log_-p_master => diff.log_-p_main}  |   2 +-\n t/t4013/{diff.log_master => diff.log_main}    |   2 +-\n ...iff.noellipses-diff-tree_-c_--abbrev_main} |   2 +-\n ...> diff.noellipses-whatchanged_--root_main} |   2 +-\n ...r => diff.noellipses-whatchanged_-SF_main} |   2 +-\n ...aster => diff.noellipses-whatchanged_main} |   2 +-\n ...t_master => diff.show_--first-parent_main} |   2 +-\n ...{diff.show_-c_master => diff.show_-c_main} |   2 +-\n ...{diff.show_-m_master => diff.show_-m_main} |   2 +-\n t/t4013/{diff.show_master => diff.show_main}  |   2 +-\n ..._--patch-with-stat_--summary_main_--_dir_} |   2 +-\n ...> diff.whatchanged_--patch-with-stat_main} |   2 +-\n ...hatchanged_--patch-with-stat_main_--_dir_} |   2 +-\n ...oot_--cc_--patch-with-stat_--summary_main} |   2 +-\n ...d_--root_--patch-with-stat_--summary_main} |   2 +-\n ...whatchanged_--root_--patch-with-stat_main} |   2 +-\n ...-root_-c_--patch-with-stat_--summary_main} |   2 +-\n ...master => diff.whatchanged_--root_-p_main} |   2 +-\n ...ot_master => diff.whatchanged_--root_main} |   2 +-\n ...-p_master => diff.whatchanged_-SF_-p_main} |   2 +-\n ...d_-SF_master => diff.whatchanged_-SF_main} |   2 +-\n ...ged_-p_master => diff.whatchanged_-p_main} |   2 +-\n ...atchanged_master => diff.whatchanged_main} |   2 +-\n 97 files changed, 217 insertions(+), 217 deletions(-)\n rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_--summary_master => diff.diff-tree_--cc_--patch-with-stat_--summary_main} (86%)\n rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_master => diff.diff-tree_--cc_--patch-with-stat_main} (89%)\n rename t/t4013/{diff.diff-tree_--cc_--shortstat_master => diff.diff-tree_--cc_--shortstat_main} (65%)\n rename t/t4013/{diff.diff-tree_-c_--stat_--summary_master => diff.diff-tree_--cc_--stat_--summary_main} (71%)\n rename t/t4013/{diff.diff-tree_-c_--stat_master => diff.diff-tree_--cc_--stat_main} (76%)\n rename t/t4013/{diff.diff-tree_--cc_master => diff.diff-tree_--cc_main} (91%)\n rename t/t4013/{diff.diff-tree_-c_--abbrev_master => diff.diff-tree_-c_--abbrev_main} (83%)\n rename t/t4013/{diff.diff-tree_--cc_--stat_--summary_master => diff.diff-tree_-c_--stat_--summary_main} (70%)\n rename t/t4013/{diff.diff-tree_--cc_--stat_master => diff.diff-tree_-c_--stat_main} (75%)\n rename t/t4013/{diff.diff-tree_-c_master => diff.diff-tree_-c_main} (93%)\n rename t/t4013/{diff.diff-tree_-m_master => diff.diff-tree_-m_main} (96%)\n rename t/t4013/{diff.diff-tree_-p_-m_master => diff.diff-tree_-p_-m_main} (97%)\n create mode 100644 t/t4013/diff.diff-tree_-p_main\n delete mode 100644 t/t4013/diff.diff-tree_-p_master\n create mode 100644 t/t4013/diff.diff-tree_main\n delete mode 100644 t/t4013/diff.diff-tree_master\n create mode 100644 t/t4013/diff.diff_--dirstat_--cc_main~1_main\n delete mode 100644 t/t4013/diff.diff_--dirstat_--cc_master~1_master\n create mode 100644 t/t4013/diff.diff_--dirstat_main~1_main~2\n delete mode 100644 t/t4013/diff.diff_--dirstat_master~1_master~2\n rename t/t4013/{diff.diff_--line-prefix=abc_master_master^_side => diff.diff_--line-prefix=abc_main_main^_side} (87%)\n rename t/t4013/{diff.diff_master_master^_side => diff.diff_main_main^_side} (89%)\n rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master => diff.format-patch_--attach_--stdout_initial..main} (98%)\n rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master^ => diff.format-patch_--attach_--stdout_initial..main^} (97%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_--numbered-files_initial..master => diff.format-patch_--inline_--stdout_--numbered-files_initial..main} (99%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master => diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main} (99%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master => diff.format-patch_--inline_--stdout_initial..main} (98%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^ => diff.format-patch_--inline_--stdout_initial..main^} (97%)\n rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^^ => diff.format-patch_--inline_--stdout_initial..main^^} (95%)\n rename t/t4013/{diff.format-patch_--stdout_--cover-letter_-n_initial..master^ => diff.format-patch_--stdout_--cover-letter_-n_initial..main^} (96%)\n rename t/t4013/{diff.format-patch_--stdout_--no-numbered_initial..master => diff.format-patch_--stdout_--no-numbered_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_--numbered_initial..master => diff.format-patch_--stdout_--numbered_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_initial..master => diff.format-patch_--stdout_initial..main} (97%)\n rename t/t4013/{diff.format-patch_--stdout_initial..master^ => diff.format-patch_--stdout_initial..main^} (96%)\n rename t/t4013/{diff.log_-c_-m_-p_master => diff.log_--cc_-m_-p_main} (99%)\n rename t/t4013/{diff.log_--diff-merges=first-parent_master => diff.log_--diff-merges=first-parent_main} (95%)\n rename t/t4013/{diff.log_--no-diff-merges_-p_--first-parent_master => diff.log_--diff-merges=off_-p_--first-parent_main} (95%)\n rename t/t4013/{diff.log_--first-parent_--diff-merges=off_-p_master => diff.log_--first-parent_--diff-merges=off_-p_main} (95%)\n rename t/t4013/{diff.log_--diff-merges=off_-p_--first-parent_master => diff.log_--no-diff-merges_-p_--first-parent_main} (95%)\n rename t/t4013/{diff.log_--patch-with-stat_--summary_master_--_dir_ => diff.log_--patch-with-stat_--summary_main_--_dir_} (96%)\n rename t/t4013/{diff.log_--patch-with-stat_master => diff.log_--patch-with-stat_main} (98%)\n rename t/t4013/{diff.log_--patch-with-stat_master_--_dir_ => diff.log_--patch-with-stat_main_--_dir_} (96%)\n rename t/t4013/{diff.log_--root_--cc_--patch-with-stat_--summary_master => diff.log_--root_--cc_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_--patch-with-stat_--summary_master => diff.log_--root_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_--patch-with-stat_master => diff.log_--root_--patch-with-stat_main} (98%)\n rename t/t4013/{diff.log_--root_-c_--patch-with-stat_--summary_master => diff.log_--root_-c_--patch-with-stat_--summary_main} (98%)\n rename t/t4013/{diff.log_--root_-p_master => diff.log_--root_-p_main} (98%)\n rename t/t4013/{diff.log_--root_master => diff.log_--root_main} (96%)\n rename t/t4013/{diff.log_-GF_-p_--pickaxe-all_master => diff.log_-GF_-p_--pickaxe-all_main} (90%)\n rename t/t4013/{diff.log_-GF_-p_master => diff.log_-GF_-p_main} (91%)\n rename t/t4013/{diff.log_-SF_master => diff.log_-GF_main} (86%)\n rename t/t4013/{diff.log_-IA_-IB_-I1_-I2_-p_master => diff.log_-IA_-IB_-I1_-I2_-p_main} (97%)\n rename t/t4013/{diff.log_-SF_-p_master => diff.log_-SF_-p_main} (91%)\n rename t/t4013/{diff.log_-GF_master => diff.log_-SF_main} (86%)\n create mode 100644 t/t4013/diff.log_-SF_main_--max-count=0\n rename t/t4013/{diff.log_-SF_master_--max-count=2 => diff.log_-SF_main_--max-count=1} (79%)\n create mode 100644 t/t4013/diff.log_-SF_main_--max-count=2\n delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=0\n delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=1\n rename t/t4013/{diff.log_-S_F_master => diff.log_-S_F_main} (86%)\n rename t/t4013/{diff.log_--cc_-m_-p_master => diff.log_-c_-m_-p_main} (99%)\n rename t/t4013/{diff.log_-m_--raw_master => diff.log_-m_--raw_main} (98%)\n rename t/t4013/{diff.log_-m_--stat_master => diff.log_-m_--stat_main} (98%)\n rename t/t4013/{diff.log_-m_-p_--first-parent_master => diff.log_-m_-p_--first-parent_main} (97%)\n rename t/t4013/{diff.log_-m_-p_master => diff.log_-m_-p_main} (99%)\n rename t/t4013/{diff.log_-p_--diff-merges=first-parent_master => diff.log_-p_--diff-merges=first-parent_main} (97%)\n rename t/t4013/{diff.log_-p_--first-parent_master => diff.log_-p_--first-parent_main} (97%)\n rename t/t4013/{diff.log_-p_master => diff.log_-p_main} (98%)\n rename t/t4013/{diff.log_master => diff.log_main} (97%)\n rename t/t4013/{diff.noellipses-diff-tree_-c_--abbrev_master => diff.noellipses-diff-tree_-c_--abbrev_main} (81%)\n rename t/t4013/{diff.noellipses-whatchanged_--root_master => diff.noellipses-whatchanged_--root_main} (96%)\n rename t/t4013/{diff.noellipses-whatchanged_-SF_master => diff.noellipses-whatchanged_-SF_main} (86%)\n rename t/t4013/{diff.noellipses-whatchanged_master => diff.noellipses-whatchanged_main} (96%)\n rename t/t4013/{diff.show_--first-parent_master => diff.show_--first-parent_main} (92%)\n rename t/t4013/{diff.show_-c_master => diff.show_-c_main} (95%)\n rename t/t4013/{diff.show_-m_master => diff.show_-m_main} (98%)\n rename t/t4013/{diff.show_master => diff.show_main} (96%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ => diff.whatchanged_--patch-with-stat_--summary_main_--_dir_} (94%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_master => diff.whatchanged_--patch-with-stat_main} (97%)\n rename t/t4013/{diff.whatchanged_--patch-with-stat_master_--_dir_ => diff.whatchanged_--patch-with-stat_main_--_dir_} (94%)\n rename t/t4013/{diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master => diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_--summary_master => diff.whatchanged_--root_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_master => diff.whatchanged_--root_--patch-with-stat_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_-c_--patch-with-stat_--summary_master => diff.whatchanged_--root_-c_--patch-with-stat_--summary_main} (97%)\n rename t/t4013/{diff.whatchanged_--root_-p_master => diff.whatchanged_--root_-p_main} (98%)\n rename t/t4013/{diff.whatchanged_--root_master => diff.whatchanged_--root_main} (97%)\n rename t/t4013/{diff.whatchanged_-SF_-p_master => diff.whatchanged_-SF_-p_main} (89%)\n rename t/t4013/{diff.whatchanged_-SF_master => diff.whatchanged_-SF_main} (86%)\n rename t/t4013/{diff.whatchanged_-p_master => diff.whatchanged_-p_main} (98%)\n rename t/t4013/{diff.whatchanged_master => diff.whatchanged_main} (97%)\n\ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex cfeec239e09..55a06eadb31 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -5,7 +5,7 @@\n \n test_description='Various diff formatting options'\n \n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n@@ -70,7 +70,7 @@ test_expect_success setup '\n \tGIT_COMMITTER_DATE=\"2006-06-26 00:04:00 +0000\" &&\n \texport GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&\n \n-\tgit checkout master &&\n+\tgit checkout main &&\n \tgit pull -s ours --no-rebase . side &&\n \n \tGIT_AUTHOR_DATE=\"2006-06-26 00:05:00 +0000\" &&\n@@ -95,15 +95,15 @@ test_expect_success setup '\n \ttest_write_lines B A >dir/sub &&\n \tgit add dir/sub &&\n \tgit commit -m \"Rearranged lines in dir/sub\" &&\n-\tgit checkout master &&\n+\tgit checkout main &&\n \n \tGIT_AUTHOR_DATE=\"2006-06-26 00:06:00 +0000\" &&\n \tGIT_COMMITTER_DATE=\"2006-06-26 00:06:00 +0000\" &&\n \texport GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&\n \tgit checkout -b mode initial &&\n \tgit update-index --chmod=+x file0 &&\n \tgit commit -m \"update mode\" &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \n \tGIT_AUTHOR_DATE=\"2006-06-26 00:06:00 +0000\" &&\n \tGIT_COMMITTER_DATE=\"2006-06-26 00:06:00 +0000\" &&\n@@ -112,12 +112,12 @@ test_expect_success setup '\n \tgit update-index --chmod=+x file2 &&\n \tgit commit -m \"update mode (file2)\" &&\n \tgit notes add -m \"note\" &&\n-\tgit checkout -f master &&\n+\tgit checkout -f main &&\n \n-\t# Same merge as master, but with parents reversed. Hide it in a\n+\t# Same merge as main, but with parents reversed. Hide it in a\n \t# pseudo-ref to avoid impacting tests with --all.\n \tcommit=$(echo reverse |\n-\t\t git commit-tree -p master^2 -p master^1 master^{tree}) &&\n+\t\t git commit-tree -p main^2 -p main^1 main^{tree}) &&\n \tgit update-ref REVERSE $commit &&\n \n \tgit config diff.renames false &&\n@@ -127,15 +127,15 @@ test_expect_success setup '\n \n : <<\\EOF\n ! [initial] Initial\n- * [master] Merge branch 'side'\n+ * [main] Merge branch 'side'\n   ! [rearrange] Rearranged lines in dir/sub\n    ! [side] Side\n ----\n   +  [rearrange] Rearranged lines in dir/sub\n- -   [master] Merge branch 'side'\n+ -   [main] Merge branch 'side'\n  * + [side] Side\n- *   [master^] Third\n- *   [master~2] Second\n+ *   [main^] Third\n+ *   [main~2] Second\n +*++ [initial] Initial\n EOF\n \n@@ -311,64 +311,64 @@ diff-tree initial mode\n diff-tree --stat initial mode\n diff-tree --summary initial mode\n \n-diff-tree master\n-diff-tree -m master\n-diff-tree -p master\n-diff-tree -p -m master\n-diff-tree -c master\n-diff-tree -c --abbrev master\n-:noellipses diff-tree -c --abbrev master\n-diff-tree --cc master\n+diff-tree main\n+diff-tree -m main\n+diff-tree -p main\n+diff-tree -p -m main\n+diff-tree -c main\n+diff-tree -c --abbrev main\n+:noellipses diff-tree -c --abbrev main\n+diff-tree --cc main\n # stat only should show the diffstat with the first parent\n-diff-tree -c --stat master\n-diff-tree --cc --stat master\n-diff-tree -c --stat --summary master\n-diff-tree --cc --stat --summary master\n+diff-tree -c --stat main\n+diff-tree --cc --stat main\n+diff-tree -c --stat --summary main\n+diff-tree --cc --stat --summary main\n # stat summary should show the diffstat and summary with the first parent\n diff-tree -c --stat --summary side\n diff-tree --cc --stat --summary side\n-diff-tree --cc --shortstat master\n+diff-tree --cc --shortstat main\n diff-tree --cc --summary REVERSE\n # improved by Timo's patch\n-diff-tree --cc --patch-with-stat master\n+diff-tree --cc --patch-with-stat main\n # improved by Timo's patch\n-diff-tree --cc --patch-with-stat --summary master\n+diff-tree --cc --patch-with-stat --summary main\n # this is correct\n diff-tree --cc --patch-with-stat --summary side\n \n-log master\n-log -p master\n-log --root master\n-log --root -p master\n-log --patch-with-stat master\n-log --root --patch-with-stat master\n-log --root --patch-with-stat --summary master\n-# improved by Timo's patch\n-log --root -c --patch-with-stat --summary master\n-# improved by Timo's patch\n-log --root --cc --patch-with-stat --summary master\n-log --no-diff-merges -p --first-parent master\n-log --diff-merges=off -p --first-parent master\n-log --first-parent --diff-merges=off -p master\n-log -p --first-parent master\n-log -p --diff-merges=first-parent master\n-log --diff-merges=first-parent master\n-log -m -p --first-parent master\n-log -m -p master\n-log --cc -m -p master\n-log -c -m -p master\n-log -m --raw master\n-log -m --stat master\n-log -SF master\n-log -S F master\n-log -SF -p master\n-log -SF master --max-count=0\n-log -SF master --max-count=1\n-log -SF master --max-count=2\n-log -GF master\n-log -GF -p master\n-log -GF -p --pickaxe-all master\n-log -IA -IB -I1 -I2 -p master\n+log main\n+log -p main\n+log --root main\n+log --root -p main\n+log --patch-with-stat main\n+log --root --patch-with-stat main\n+log --root --patch-with-stat --summary main\n+# improved by Timo's patch\n+log --root -c --patch-with-stat --summary main\n+# improved by Timo's patch\n+log --root --cc --patch-with-stat --summary main\n+log --no-diff-merges -p --first-parent main\n+log --diff-merges=off -p --first-parent main\n+log --first-parent --diff-merges=off -p main\n+log -p --first-parent main\n+log -p --diff-merges=first-parent main\n+log --diff-merges=first-parent main\n+log -m -p --first-parent main\n+log -m -p main\n+log --cc -m -p main\n+log -c -m -p main\n+log -m --raw main\n+log -m --stat main\n+log -SF main\n+log -S F main\n+log -SF -p main\n+log -SF main --max-count=0\n+log -SF main --max-count=1\n+log -SF main --max-count=2\n+log -GF main\n+log -GF -p main\n+log -GF -p --pickaxe-all main\n+log -IA -IB -I1 -I2 -p main\n log --decorate --all\n log --decorate=full --all\n log --decorate --clear-decorations --all\n@@ -377,35 +377,35 @@ log --decorate=full --clear-decorations --all\n rev-list --parents HEAD\n rev-list --children HEAD\n \n-whatchanged master\n-:noellipses whatchanged master\n-whatchanged -p master\n-whatchanged --root master\n-:noellipses whatchanged --root master\n-whatchanged --root -p master\n-whatchanged --patch-with-stat master\n-whatchanged --root --patch-with-stat master\n-whatchanged --root --patch-with-stat --summary master\n-# improved by Timo's patch\n-whatchanged --root -c --patch-with-stat --summary master\n-# improved by Timo's patch\n-whatchanged --root --cc --patch-with-stat --summary master\n-whatchanged -SF master\n-:noellipses whatchanged -SF master\n-whatchanged -SF -p master\n+whatchanged main\n+:noellipses whatchanged main\n+whatchanged -p main\n+whatchanged --root main\n+:noellipses whatchanged --root main\n+whatchanged --root -p main\n+whatchanged --patch-with-stat main\n+whatchanged --root --patch-with-stat main\n+whatchanged --root --patch-with-stat --summary main\n+# improved by Timo's patch\n+whatchanged --root -c --patch-with-stat --summary main\n+# improved by Timo's patch\n+whatchanged --root --cc --patch-with-stat --summary main\n+whatchanged -SF main\n+:noellipses whatchanged -SF main\n+whatchanged -SF -p main\n \n-log --patch-with-stat master -- dir/\n-whatchanged --patch-with-stat master -- dir/\n-log --patch-with-stat --summary master -- dir/\n-whatchanged --patch-with-stat --summary master -- dir/\n+log --patch-with-stat main -- dir/\n+whatchanged --patch-with-stat main -- dir/\n+log --patch-with-stat --summary main -- dir/\n+whatchanged --patch-with-stat --summary main -- dir/\n \n show initial\n show --root initial\n show side\n-show master\n-show -c master\n-show -m master\n-show --first-parent master\n+show main\n+show -c main\n+show -m main\n+show --first-parent main\n show --stat side\n show --stat --summary side\n show --patch-with-stat side\n@@ -414,22 +414,22 @@ show --patch-with-raw side\n show --patch-with-stat --summary side\n \n format-patch --stdout initial..side\n-format-patch --stdout initial..master^\n-format-patch --stdout initial..master\n-format-patch --stdout --no-numbered initial..master\n-format-patch --stdout --numbered initial..master\n+format-patch --stdout initial..main^\n+format-patch --stdout initial..main\n+format-patch --stdout --no-numbered initial..main\n+format-patch --stdout --numbered initial..main\n format-patch --attach --stdout initial..side\n format-patch --attach --stdout --suffix=.diff initial..side\n-format-patch --attach --stdout initial..master^\n-format-patch --attach --stdout initial..master\n+format-patch --attach --stdout initial..main^\n+format-patch --attach --stdout initial..main\n format-patch --inline --stdout initial..side\n-format-patch --inline --stdout initial..master^\n-format-patch --inline --stdout --numbered-files initial..master\n-format-patch --inline --stdout initial..master\n-format-patch --inline --stdout --subject-prefix=TESTCASE initial..master\n+format-patch --inline --stdout initial..main^\n+format-patch --inline --stdout --numbered-files initial..main\n+format-patch --inline --stdout initial..main\n+format-patch --inline --stdout --subject-prefix=TESTCASE initial..main\n config format.subjectprefix DIFFERENT_PREFIX\n-format-patch --inline --stdout initial..master^^\n-format-patch --stdout --cover-letter -n initial..master^\n+format-patch --inline --stdout initial..main^^\n+format-patch --stdout --cover-letter -n initial..main^\n \n diff --abbrev initial..side\n diff -U initial..side\n@@ -448,13 +448,13 @@ diff --name-status dir2 dir\n diff --no-index --name-status dir2 dir\n diff --no-index --name-status -- dir2 dir\n diff --no-index dir dir3\n-diff master master^ side\n+diff main main^ side\n # Can't use spaces...\n-diff --line-prefix=abc master master^ side\n-diff --dirstat master~1 master~2\n+diff --line-prefix=abc main main^ side\n+diff --dirstat main~1 main~2\n diff --dirstat initial rearrange\n diff --dirstat-by-file initial rearrange\n-diff --dirstat --cc master~1 master\n+diff --dirstat --cc main~1 main\n # No-index --abbrev and --no-abbrev\n diff --raw initial\n :noellipses diff --raw initial\n@@ -482,25 +482,25 @@ test_expect_success !WITH_BREAKING_CHANGES 'whatchanged needs --i-still-use-this\n '\n \n test_expect_success 'log -m matches pure log' '\n-\tgit log master >result &&\n+\tgit log main >result &&\n \tprocess_diffs result >expected &&\n \tgit log -m >result &&\n \tprocess_diffs result >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'log --diff-merges=on matches --diff-merges=separate' '\n-\tgit log -p --diff-merges=separate master >result &&\n+\tgit log -p --diff-merges=separate main >result &&\n \tprocess_diffs result >expected &&\n-\tgit log -p --diff-merges=on master >result &&\n+\tgit log -p --diff-merges=on main >result &&\n \tprocess_diffs result >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'log --dd matches --diff-merges=1 -p' '\n-\tgit log --diff-merges=1 -p master >result &&\n+\tgit log --diff-merges=1 -p main >result &&\n \tprocess_diffs result >expected &&\n-\tgit log --dd master >result &&\n+\tgit log --dd main >result &&\n \tprocess_diffs result >actual &&\n \ttest_cmp expected actual\n '\n@@ -511,19 +511,19 @@ test_expect_success 'deny wrong log.diffMerges config' '\n '\n \n test_expect_success 'git config log.diffMerges first-parent' '\n-\tgit log -p --diff-merges=first-parent master >result &&\n+\tgit log -p --diff-merges=first-parent main >result &&\n \tprocess_diffs result >expected &&\n \ttest_config log.diffMerges first-parent &&\n-\tgit log -p --diff-merges=on master >result &&\n+\tgit log -p --diff-merges=on main >result &&\n \tprocess_diffs result >actual &&\n \ttest_cmp expected actual\n '\n \n test_expect_success 'git config log.diffMerges first-parent vs -m' '\n-\tgit log -p --diff-merges=first-parent master >result &&\n+\tgit log -p --diff-merges=first-parent main >result &&\n \tprocess_diffs result >expected &&\n \ttest_config log.diffMerges first-parent &&\n-\tgit log -p -m master >result &&\n+\tgit log -p -m main >result &&\n \tprocess_diffs result >actual &&\n \ttest_cmp expected actual\n '\n@@ -572,7 +572,7 @@ test_expect_success 'diff-tree --stdin with log formatting' '\n \tThird\n \tSecond\n \tEOF\n-\tgit rev-list master | git diff-tree --stdin --format=%s -s >actual &&\n+\tgit rev-list main | git diff-tree --stdin --format=%s -s >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -585,16 +585,16 @@ test_expect_success 'diff-tree --stdin with pathspec' '\n \n \tdir/sub\n \tEOF\n-\tgit rev-list master^ |\n+\tgit rev-list main^ |\n \tgit diff-tree -r --stdin --name-only --format=%s dir >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'show A B ... -- <pathspec>' '\n \t# side touches dir/sub, file0, and file3\n-\t# master^ touches dir/sub, and file1\n-\t# master^^ touches dir/sub, file0, and file2\n-\tgit show --name-only --format=\"<%s>\" side master^ master^^ -- dir >actual &&\n+\t# main^ touches dir/sub, and file1\n+\t# main^^ touches dir/sub, file0, and file2\n+\tgit show --name-only --format=\"<%s>\" side main^ main^^ -- dir >actual &&\n \tcat >expect <<-\\EOF &&\n \t<Side>\n \n@@ -610,7 +610,7 @@ test_expect_success 'show A B ... -- <pathspec>' '\n '\n \n test_expect_success 'diff -I<regex>: setup' '\n-\tgit checkout master &&\n+\tgit checkout main &&\n \ttest_seq 50 >file0 &&\n \tgit commit -m \"Set up -I<regex> test file\" file0 &&\n \ttest_seq 50 | sed -e \"s/13/ten and three/\" -e \"/7\\$/d\" >file0 &&\ndiff --git a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main\nsimilarity index 86%\nrename from t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master\nrename to t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main\nindex 9951e3677d6..af1cf20f4ca 100644\n--- a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc --patch-with-stat --summary master\n+$ git diff-tree --cc --patch-with-stat --summary main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_master b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_main\nsimilarity index 89%\nrename from t/t4013/diff.diff-tree_--cc_--patch-with-stat_master\nrename to t/t4013/diff.diff-tree_--cc_--patch-with-stat_main\nindex db3c0a7b2cc..0ec60420970 100644\n--- a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_master\n+++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc --patch-with-stat master\n+$ git diff-tree --cc --patch-with-stat main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_--cc_--shortstat_master b/t/t4013/diff.diff-tree_--cc_--shortstat_main\nsimilarity index 65%\nrename from t/t4013/diff.diff-tree_--cc_--shortstat_master\nrename to t/t4013/diff.diff-tree_--cc_--shortstat_main\nindex a4ca42df2a4..9a4ef031973 100644\n--- a/t/t4013/diff.diff-tree_--cc_--shortstat_master\n+++ b/t/t4013/diff.diff-tree_--cc_--shortstat_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc --shortstat master\n+$ git diff-tree --cc --shortstat main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  2 files changed, 5 insertions(+)\n $\ndiff --git a/t/t4013/diff.diff-tree_-c_--stat_--summary_master b/t/t4013/diff.diff-tree_--cc_--stat_--summary_main\nsimilarity index 71%\nrename from t/t4013/diff.diff-tree_-c_--stat_--summary_master\nrename to t/t4013/diff.diff-tree_--cc_--stat_--summary_main\nindex 81c3021541b..9db08a4aa96 100644\n--- a/t/t4013/diff.diff-tree_-c_--stat_--summary_master\n+++ b/t/t4013/diff.diff-tree_--cc_--stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -c --stat --summary master\n+$ git diff-tree --cc --stat --summary main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_-c_--stat_master b/t/t4013/diff.diff-tree_--cc_--stat_main\nsimilarity index 76%\nrename from t/t4013/diff.diff-tree_-c_--stat_master\nrename to t/t4013/diff.diff-tree_--cc_--stat_main\nindex 89d59b15480..7ecc67a524e 100644\n--- a/t/t4013/diff.diff-tree_-c_--stat_master\n+++ b/t/t4013/diff.diff-tree_--cc_--stat_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -c --stat master\n+$ git diff-tree --cc --stat main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_--cc_master b/t/t4013/diff.diff-tree_--cc_main\nsimilarity index 91%\nrename from t/t4013/diff.diff-tree_--cc_master\nrename to t/t4013/diff.diff-tree_--cc_main\nindex 5ecb4e14ae4..1a962856ad4 100644\n--- a/t/t4013/diff.diff-tree_--cc_master\n+++ b/t/t4013/diff.diff-tree_--cc_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc master\n+$ git diff-tree --cc main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n diff --cc dir/sub\n index cead32e,7289e35..992913c\ndiff --git a/t/t4013/diff.diff-tree_-c_--abbrev_master b/t/t4013/diff.diff-tree_-c_--abbrev_main\nsimilarity index 83%\nrename from t/t4013/diff.diff-tree_-c_--abbrev_master\nrename to t/t4013/diff.diff-tree_-c_--abbrev_main\nindex b8e4aa25307..039d127cf24 100644\n--- a/t/t4013/diff.diff-tree_-c_--abbrev_master\n+++ b/t/t4013/diff.diff-tree_-c_--abbrev_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -c --abbrev master\n+$ git diff-tree -c --abbrev main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n ::100644 100644 100644 cead32e... 7289e35... 992913c... MM\tdir/sub\n ::100644 100644 100644 b414108... f4615da... 10a8a9f... MM\tfile0\ndiff --git a/t/t4013/diff.diff-tree_--cc_--stat_--summary_master b/t/t4013/diff.diff-tree_-c_--stat_--summary_main\nsimilarity index 70%\nrename from t/t4013/diff.diff-tree_--cc_--stat_--summary_master\nrename to t/t4013/diff.diff-tree_-c_--stat_--summary_main\nindex d019867dd94..05a8d16ba70 100644\n--- a/t/t4013/diff.diff-tree_--cc_--stat_--summary_master\n+++ b/t/t4013/diff.diff-tree_-c_--stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc --stat --summary master\n+$ git diff-tree -c --stat --summary main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_--cc_--stat_master b/t/t4013/diff.diff-tree_-c_--stat_main\nsimilarity index 75%\nrename from t/t4013/diff.diff-tree_--cc_--stat_master\nrename to t/t4013/diff.diff-tree_-c_--stat_main\nindex 40b91796b34..61d9f450dfd 100644\n--- a/t/t4013/diff.diff-tree_--cc_--stat_master\n+++ b/t/t4013/diff.diff-tree_-c_--stat_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree --cc --stat master\n+$ git diff-tree -c --stat main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n  dir/sub | 2 ++\n  file0   | 3 +++\ndiff --git a/t/t4013/diff.diff-tree_-c_master b/t/t4013/diff.diff-tree_-c_main\nsimilarity index 93%\nrename from t/t4013/diff.diff-tree_-c_master\nrename to t/t4013/diff.diff-tree_-c_main\nindex e2d2bb26114..a84e1185cf5 100644\n--- a/t/t4013/diff.diff-tree_-c_master\n+++ b/t/t4013/diff.diff-tree_-c_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -c master\n+$ git diff-tree -c main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n ::100644 100644 100644 cead32e925b1420c84c14cbf7cf755e7e45af8ad 7289e35bff32727c08dda207511bec138fdb9ea5 992913c5aa0a5476d10c49ed0f21fc0c6d1aedf3 MM\tdir/sub\n ::100644 100644 100644 b414108e81e5091fe0974a1858b4d0d22b107f70 f4615da674c09df322d6ba8d6b21ecfb1b1ba510 10a8a9f3657f91a156b9f0184ed79a20adef9f7f MM\tfile0\ndiff --git a/t/t4013/diff.diff-tree_-m_master b/t/t4013/diff.diff-tree_-m_main\nsimilarity index 96%\nrename from t/t4013/diff.diff-tree_-m_master\nrename to t/t4013/diff.diff-tree_-m_main\nindex 6d0a2207fb3..5da1f7f5251 100644\n--- a/t/t4013/diff.diff-tree_-m_master\n+++ b/t/t4013/diff.diff-tree_-m_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -m master\n+$ git diff-tree -m main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n :040000 040000 65f5c9dd60ce3b2b3324b618ac7accf8d912c113 0564e026437809817a64fff393079714b6dd4628 M\tdir\n :100644 100644 b414108e81e5091fe0974a1858b4d0d22b107f70 10a8a9f3657f91a156b9f0184ed79a20adef9f7f M\tfile0\ndiff --git a/t/t4013/diff.diff-tree_-p_-m_master b/t/t4013/diff.diff-tree_-p_-m_main\nsimilarity index 97%\nrename from t/t4013/diff.diff-tree_-p_-m_master\nrename to t/t4013/diff.diff-tree_-p_-m_main\nindex b60bea039d9..29c9fc20b8b 100644\n--- a/t/t4013/diff.diff-tree_-p_-m_master\n+++ b/t/t4013/diff.diff-tree_-p_-m_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -p -m master\n+$ git diff-tree -p -m main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n diff --git a/dir/sub b/dir/sub\n index cead32e..992913c 100644\ndiff --git a/t/t4013/diff.diff-tree_-p_main b/t/t4013/diff.diff-tree_-p_main\nnew file mode 100644\nindex 00000000000..c658062422e\n--- /dev/null\n+++ b/t/t4013/diff.diff-tree_-p_main\n@@ -0,0 +1,2 @@\n+$ git diff-tree -p main\n+$\ndiff --git a/t/t4013/diff.diff-tree_-p_master b/t/t4013/diff.diff-tree_-p_master\ndeleted file mode 100644\nindex b182875fb2f..00000000000\n--- a/t/t4013/diff.diff-tree_-p_master\n+++ /dev/null\n@@ -1,2 +0,0 @@\n-$ git diff-tree -p master\n-$\ndiff --git a/t/t4013/diff.diff-tree_main b/t/t4013/diff.diff-tree_main\nnew file mode 100644\nindex 00000000000..dc5b9fdeb6e\n--- /dev/null\n+++ b/t/t4013/diff.diff-tree_main\n@@ -0,0 +1,2 @@\n+$ git diff-tree main\n+$\ndiff --git a/t/t4013/diff.diff-tree_master b/t/t4013/diff.diff-tree_master\ndeleted file mode 100644\nindex fe9226f8a12..00000000000\n--- a/t/t4013/diff.diff-tree_master\n+++ /dev/null\n@@ -1,2 +0,0 @@\n-$ git diff-tree master\n-$\ndiff --git a/t/t4013/diff.diff_--dirstat_--cc_main~1_main b/t/t4013/diff.diff_--dirstat_--cc_main~1_main\nnew file mode 100644\nindex 00000000000..168a357a02e\n--- /dev/null\n+++ b/t/t4013/diff.diff_--dirstat_--cc_main~1_main\n@@ -0,0 +1,3 @@\n+$ git diff --dirstat --cc main~1 main\n+  40.0% dir/\n+$\ndiff --git a/t/t4013/diff.diff_--dirstat_--cc_master~1_master b/t/t4013/diff.diff_--dirstat_--cc_master~1_master\ndeleted file mode 100644\nindex fba4e34175e..00000000000\n--- a/t/t4013/diff.diff_--dirstat_--cc_master~1_master\n+++ /dev/null\n@@ -1,3 +0,0 @@\n-$ git diff --dirstat --cc master~1 master\n-  40.0% dir/\n-$\ndiff --git a/t/t4013/diff.diff_--dirstat_main~1_main~2 b/t/t4013/diff.diff_--dirstat_main~1_main~2\nnew file mode 100644\nindex 00000000000..68097337089\n--- /dev/null\n+++ b/t/t4013/diff.diff_--dirstat_main~1_main~2\n@@ -0,0 +1,3 @@\n+$ git diff --dirstat main~1 main~2\n+  40.0% dir/\n+$\ndiff --git a/t/t4013/diff.diff_--dirstat_master~1_master~2 b/t/t4013/diff.diff_--dirstat_master~1_master~2\ndeleted file mode 100644\nindex b672e1ca63d..00000000000\n--- a/t/t4013/diff.diff_--dirstat_master~1_master~2\n+++ /dev/null\n@@ -1,3 +0,0 @@\n-$ git diff --dirstat master~1 master~2\n-  40.0% dir/\n-$\ndiff --git a/t/t4013/diff.diff_--line-prefix=abc_master_master^_side b/t/t4013/diff.diff_--line-prefix=abc_main_main^_side\nsimilarity index 87%\nrename from t/t4013/diff.diff_--line-prefix=abc_master_master^_side\nrename to t/t4013/diff.diff_--line-prefix=abc_main_main^_side\nindex 99f91e7f0e3..67a2145a365 100644\n--- a/t/t4013/diff.diff_--line-prefix=abc_master_master^_side\n+++ b/t/t4013/diff.diff_--line-prefix=abc_main_main^_side\n@@ -1,4 +1,4 @@\n-$ git diff --line-prefix=abc master master^ side\n+$ git diff --line-prefix=abc main main^ side\n abcdiff --cc dir/sub\n abcindex cead32e,7289e35..992913c\n abc--- a/dir/sub\ndiff --git a/t/t4013/diff.diff_master_master^_side b/t/t4013/diff.diff_main_main^_side\nsimilarity index 89%\nrename from t/t4013/diff.diff_master_master^_side\nrename to t/t4013/diff.diff_main_main^_side\nindex 50ec9cadd61..ab81ec9e47b 100644\n--- a/t/t4013/diff.diff_master_master^_side\n+++ b/t/t4013/diff.diff_main_main^_side\n@@ -1,4 +1,4 @@\n-$ git diff master master^ side\n+$ git diff main main^ side\n diff --cc dir/sub\n index cead32e,7289e35..992913c\n --- a/dir/sub\ndiff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master b/t/t4013/diff.format-patch_--attach_--stdout_initial..main\nsimilarity index 98%\nrename from t/t4013/diff.format-patch_--attach_--stdout_initial..master\nrename to t/t4013/diff.format-patch_--attach_--stdout_initial..main\nindex 52fedc179e5..9f56380350d 100644\n--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master\n+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --attach --stdout initial..master\n+$ git format-patch --attach --stdout initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main^\nsimilarity index 97%\nrename from t/t4013/diff.format-patch_--attach_--stdout_initial..master^\nrename to t/t4013/diff.format-patch_--attach_--stdout_initial..main^\nindex 1c3cde251b5..80132ea99eb 100644\n--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^\n+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main^\n@@ -1,4 +1,4 @@\n-$ git format-patch --attach --stdout initial..master^\n+$ git format-patch --attach --stdout initial..main^\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main\nsimilarity index 99%\nrename from t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master\nrename to t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main\nindex 02c4db7ec58..8e889090fbe 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --inline --stdout --numbered-files initial..master\n+$ git format-patch --inline --stdout --numbered-files initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main\nsimilarity index 99%\nrename from t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master\nrename to t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main\nindex c7677c5951c..d7d2b12d155 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..master\n+$ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_initial..main\nsimilarity index 98%\nrename from t/t4013/diff.format-patch_--inline_--stdout_initial..master\nrename to t/t4013/diff.format-patch_--inline_--stdout_initial..main\nindex 5b3e34e2c0c..c49c423f82f 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --inline --stdout initial..master\n+$ git format-patch --inline --stdout initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^\nsimilarity index 97%\nrename from t/t4013/diff.format-patch_--inline_--stdout_initial..master^\nrename to t/t4013/diff.format-patch_--inline_--stdout_initial..main^\nindex d13f8a81280..8669dbfe6c9 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^\n@@ -1,4 +1,4 @@\n-$ git format-patch --inline --stdout initial..master^\n+$ git format-patch --inline --stdout initial..main^\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^^\nsimilarity index 95%\nrename from t/t4013/diff.format-patch_--inline_--stdout_initial..master^^\nrename to t/t4013/diff.format-patch_--inline_--stdout_initial..main^^\nindex caec5537de3..b749be58b0a 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^^\n@@ -1,4 +1,4 @@\n-$ git format-patch --inline --stdout initial..master^^\n+$ git format-patch --inline --stdout initial..main^^\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^\nsimilarity index 96%\nrename from t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^\nrename to t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^\nindex 244d964fc67..567f2221982 100644\n--- a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^\n+++ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^\n@@ -1,4 +1,4 @@\n-$ git format-patch --stdout --cover-letter -n initial..master^\n+$ git format-patch --stdout --cover-letter -n initial..main^\n From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001\n From: C O Mitter <committer@example.com>\n Date: Mon, 26 Jun 2006 00:06:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main\nsimilarity index 97%\nrename from t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master\nrename to t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main\nindex bfc287a147d..195b62ea4f5 100644\n--- a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master\n+++ b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --stdout --no-numbered initial..master\n+$ git format-patch --stdout --no-numbered initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--numbered_initial..main\nsimilarity index 97%\nrename from t/t4013/diff.format-patch_--stdout_--numbered_initial..master\nrename to t/t4013/diff.format-patch_--stdout_--numbered_initial..main\nindex 568f6f584e6..0678a38515d 100644\n--- a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master\n+++ b/t/t4013/diff.format-patch_--stdout_--numbered_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --stdout --numbered initial..master\n+$ git format-patch --stdout --numbered initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--stdout_initial..master b/t/t4013/diff.format-patch_--stdout_initial..main\nsimilarity index 97%\nrename from t/t4013/diff.format-patch_--stdout_initial..master\nrename to t/t4013/diff.format-patch_--stdout_initial..main\nindex 5f0352f9f70..b4a6302e7cb 100644\n--- a/t/t4013/diff.format-patch_--stdout_initial..master\n+++ b/t/t4013/diff.format-patch_--stdout_initial..main\n@@ -1,4 +1,4 @@\n-$ git format-patch --stdout initial..master\n+$ git format-patch --stdout initial..main\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.format-patch_--stdout_initial..master^ b/t/t4013/diff.format-patch_--stdout_initial..main^\nsimilarity index 96%\nrename from t/t4013/diff.format-patch_--stdout_initial..master^\nrename to t/t4013/diff.format-patch_--stdout_initial..main^\nindex 2ae454d8073..36b32215826 100644\n--- a/t/t4013/diff.format-patch_--stdout_initial..master^\n+++ b/t/t4013/diff.format-patch_--stdout_initial..main^\n@@ -1,4 +1,4 @@\n-$ git format-patch --stdout initial..master^\n+$ git format-patch --stdout initial..main^\n From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001\n From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\ndiff --git a/t/t4013/diff.log_-c_-m_-p_master b/t/t4013/diff.log_--cc_-m_-p_main\nsimilarity index 99%\nrename from t/t4013/diff.log_-c_-m_-p_master\nrename to t/t4013/diff.log_--cc_-m_-p_main\nindex b660f3d5f28..f32746ea3ed 100644\n--- a/t/t4013/diff.log_-c_-m_-p_master\n+++ b/t/t4013/diff.log_--cc_-m_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -c -m -p master\n+$ git log --cc -m -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--decorate=full_--all b/t/t4013/diff.log_--decorate=full_--all\nindex 6b0b334a5d6..c099399525a 100644\n--- a/t/t4013/diff.log_--decorate=full_--all\n+++ b/t/t4013/diff.log_--decorate=full_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate=full_--clear-decorations_--all b/t/t4013/diff.log_--decorate=full_--clear-decorations_--all\nindex 1c030a6554e..c43684e5361 100644\n--- a/t/t4013/diff.log_--decorate=full_--clear-decorations_--all\n+++ b/t/t4013/diff.log_--decorate=full_--clear-decorations_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate=full_--decorate-all_--all b/t/t4013/diff.log_--decorate=full_--decorate-all_--all\nindex d6e79287846..48dca61681c 100644\n--- a/t/t4013/diff.log_--decorate=full_--decorate-all_--all\n+++ b/t/t4013/diff.log_--decorate=full_--decorate-all_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate_--all b/t/t4013/diff.log_--decorate_--all\nindex c7df1f58141..8bbf891f658 100644\n--- a/t/t4013/diff.log_--decorate_--all\n+++ b/t/t4013/diff.log_--decorate_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate_--clear-decorations_--all b/t/t4013/diff.log_--decorate_--clear-decorations_--all\nindex 88be82cce31..86b1353f514 100644\n--- a/t/t4013/diff.log_--decorate_--clear-decorations_--all\n+++ b/t/t4013/diff.log_--decorate_--clear-decorations_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate_--decorate-all_--all b/t/t4013/diff.log_--decorate_--decorate-all_--all\nindex 5d22618bb60..59fb17bfc54 100644\n--- a/t/t4013/diff.log_--decorate_--decorate-all_--all\n+++ b/t/t4013/diff.log_--decorate_--decorate-all_--all\n@@ -26,7 +26,7 @@ Date:   Mon Jun 26 00:06:00 2006 +0000\n \n     Notes added by 'git notes add'\n \n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--diff-merges=first-parent_master b/t/t4013/diff.log_--diff-merges=first-parent_main\nsimilarity index 95%\nrename from t/t4013/diff.log_--diff-merges=first-parent_master\nrename to t/t4013/diff.log_--diff-merges=first-parent_main\nindex fa63a557dd1..bacee621e54 100644\n--- a/t/t4013/diff.log_--diff-merges=first-parent_master\n+++ b/t/t4013/diff.log_--diff-merges=first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log --diff-merges=first-parent master\n+$ git log --diff-merges=first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master b/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_main\nsimilarity index 95%\nrename from t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master\nrename to t/t4013/diff.log_--diff-merges=off_-p_--first-parent_main\nindex 597002232e5..fe180fda3be 100644\n--- a/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master\n+++ b/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log --no-diff-merges -p --first-parent master\n+$ git log --diff-merges=off -p --first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_master b/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_main\nsimilarity index 95%\nrename from t/t4013/diff.log_--first-parent_--diff-merges=off_-p_master\nrename to t/t4013/diff.log_--first-parent_--diff-merges=off_-p_main\nindex 5d7461a167e..dca62d4e608 100644\n--- a/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_master\n+++ b/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_main\n@@ -1,4 +1,4 @@\n-$ git log --first-parent --diff-merges=off -p master\n+$ git log --first-parent --diff-merges=off -p main\n commit 80e25ffa65bcdbe82ef654b4d06dbbde7945c37f\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_master b/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_main\nsimilarity index 95%\nrename from t/t4013/diff.log_--diff-merges=off_-p_--first-parent_master\nrename to t/t4013/diff.log_--no-diff-merges_-p_--first-parent_main\nindex 194e893c94f..0b541180887 100644\n--- a/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_master\n+++ b/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log --diff-merges=off -p --first-parent master\n+$ git log --no-diff-merges -p --first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_\nsimilarity index 96%\nrename from t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_\nrename to t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_\nindex a18f1472a9a..3ed46cc8672 100644\n--- a/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_\n+++ b/t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_\n@@ -1,4 +1,4 @@\n-$ git log --patch-with-stat --summary master -- dir/\n+$ git log --patch-with-stat --summary main -- dir/\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--patch-with-stat_master b/t/t4013/diff.log_--patch-with-stat_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--patch-with-stat_master\nrename to t/t4013/diff.log_--patch-with-stat_main\nindex ae425c46722..2e12b557cb7 100644\n--- a/t/t4013/diff.log_--patch-with-stat_master\n+++ b/t/t4013/diff.log_--patch-with-stat_main\n@@ -1,4 +1,4 @@\n-$ git log --patch-with-stat master\n+$ git log --patch-with-stat main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--patch-with-stat_master_--_dir_ b/t/t4013/diff.log_--patch-with-stat_main_--_dir_\nsimilarity index 96%\nrename from t/t4013/diff.log_--patch-with-stat_master_--_dir_\nrename to t/t4013/diff.log_--patch-with-stat_main_--_dir_\nindex d5207cadf44..d511ea7f6bf 100644\n--- a/t/t4013/diff.log_--patch-with-stat_master_--_dir_\n+++ b/t/t4013/diff.log_--patch-with-stat_main_--_dir_\n@@ -1,4 +1,4 @@\n-$ git log --patch-with-stat master -- dir/\n+$ git log --patch-with-stat main -- dir/\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master\nrename to t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main\nindex 0fc1e8cd71f..3cfd0e64229 100644\n--- a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git log --root --cc --patch-with-stat --summary master\n+$ git log --root --cc --patch-with-stat --summary main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--patch-with-stat_--summary_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--root_--patch-with-stat_--summary_master\nrename to t/t4013/diff.log_--root_--patch-with-stat_--summary_main\nindex dffc09dde9e..9f4d6dfa44e 100644\n--- a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.log_--root_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git log --root --patch-with-stat --summary master\n+$ git log --root --patch-with-stat --summary main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_--patch-with-stat_master b/t/t4013/diff.log_--root_--patch-with-stat_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--root_--patch-with-stat_master\nrename to t/t4013/diff.log_--root_--patch-with-stat_main\nindex 55aa98012de..0d69ae2e11b 100644\n--- a/t/t4013/diff.log_--root_--patch-with-stat_master\n+++ b/t/t4013/diff.log_--root_--patch-with-stat_main\n@@ -1,4 +1,4 @@\n-$ git log --root --patch-with-stat master\n+$ git log --root --patch-with-stat main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master\nrename to t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main\nindex 019d85f7de6..1b71add9dea 100644\n--- a/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git log --root -c --patch-with-stat --summary master\n+$ git log --root -c --patch-with-stat --summary main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_-p_master b/t/t4013/diff.log_--root_-p_main\nsimilarity index 98%\nrename from t/t4013/diff.log_--root_-p_master\nrename to t/t4013/diff.log_--root_-p_main\nindex b42c334439b..04581296ed5 100644\n--- a/t/t4013/diff.log_--root_-p_master\n+++ b/t/t4013/diff.log_--root_-p_main\n@@ -1,4 +1,4 @@\n-$ git log --root -p master\n+$ git log --root -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_--root_master b/t/t4013/diff.log_--root_main\nsimilarity index 96%\nrename from t/t4013/diff.log_--root_master\nrename to t/t4013/diff.log_--root_main\nindex e8f46159da1..d5e90fd6b48 100644\n--- a/t/t4013/diff.log_--root_master\n+++ b/t/t4013/diff.log_--root_main\n@@ -1,4 +1,4 @@\n-$ git log --root master\n+$ git log --root main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-GF_-p_--pickaxe-all_master b/t/t4013/diff.log_-GF_-p_--pickaxe-all_main\nsimilarity index 90%\nrename from t/t4013/diff.log_-GF_-p_--pickaxe-all_master\nrename to t/t4013/diff.log_-GF_-p_--pickaxe-all_main\nindex d36f88098b0..1f7a497c2d7 100644\n--- a/t/t4013/diff.log_-GF_-p_--pickaxe-all_master\n+++ b/t/t4013/diff.log_-GF_-p_--pickaxe-all_main\n@@ -1,4 +1,4 @@\n-$ git log -GF -p --pickaxe-all master\n+$ git log -GF -p --pickaxe-all main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-GF_-p_master b/t/t4013/diff.log_-GF_-p_main\nsimilarity index 91%\nrename from t/t4013/diff.log_-GF_-p_master\nrename to t/t4013/diff.log_-GF_-p_main\nindex 9d93f2c23a8..c80dda41e9f 100644\n--- a/t/t4013/diff.log_-GF_-p_master\n+++ b/t/t4013/diff.log_-GF_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -GF -p master\n+$ git log -GF -p main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-SF_master b/t/t4013/diff.log_-GF_main\nsimilarity index 86%\nrename from t/t4013/diff.log_-SF_master\nrename to t/t4013/diff.log_-GF_main\nindex c1599f2f520..b94a7f78398 100644\n--- a/t/t4013/diff.log_-SF_master\n+++ b/t/t4013/diff.log_-GF_main\n@@ -1,4 +1,4 @@\n-$ git log -SF master\n+$ git log -GF main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master b/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main\nsimilarity index 97%\nrename from t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master\nrename to t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main\nindex 929f35a05b4..67e26b4e547 100644\n--- a/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master\n+++ b/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -IA -IB -I1 -I2 -p master\n+$ git log -IA -IB -I1 -I2 -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-SF_-p_master b/t/t4013/diff.log_-SF_-p_main\nsimilarity index 91%\nrename from t/t4013/diff.log_-SF_-p_master\nrename to t/t4013/diff.log_-SF_-p_main\nindex 5e324389729..fa82ac14908 100644\n--- a/t/t4013/diff.log_-SF_-p_master\n+++ b/t/t4013/diff.log_-SF_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -SF -p master\n+$ git log -SF -p main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-GF_master b/t/t4013/diff.log_-SF_main\nsimilarity index 86%\nrename from t/t4013/diff.log_-GF_master\nrename to t/t4013/diff.log_-SF_main\nindex 4c6708d2d0d..dbf770db49d 100644\n--- a/t/t4013/diff.log_-GF_master\n+++ b/t/t4013/diff.log_-SF_main\n@@ -1,4 +1,4 @@\n-$ git log -GF master\n+$ git log -SF main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-SF_main_--max-count=0 b/t/t4013/diff.log_-SF_main_--max-count=0\nnew file mode 100644\nindex 00000000000..683b17eb998\n--- /dev/null\n+++ b/t/t4013/diff.log_-SF_main_--max-count=0\n@@ -0,0 +1,2 @@\n+$ git log -SF main --max-count=0\n+$\ndiff --git a/t/t4013/diff.log_-SF_master_--max-count=2 b/t/t4013/diff.log_-SF_main_--max-count=1\nsimilarity index 79%\nrename from t/t4013/diff.log_-SF_master_--max-count=2\nrename to t/t4013/diff.log_-SF_main_--max-count=1\nindex a6c55fd4822..2102426f8cc 100644\n--- a/t/t4013/diff.log_-SF_master_--max-count=2\n+++ b/t/t4013/diff.log_-SF_main_--max-count=1\n@@ -1,4 +1,4 @@\n-$ git log -SF master --max-count=2\n+$ git log -SF main --max-count=1\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_-SF_main_--max-count=2 b/t/t4013/diff.log_-SF_main_--max-count=2\nnew file mode 100644\nindex 00000000000..23e12a4cbbd\n--- /dev/null\n+++ b/t/t4013/diff.log_-SF_main_--max-count=2\n@@ -0,0 +1,7 @@\n+$ git log -SF main --max-count=2\n+commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n+Author: A U Thor <author@example.com>\n+Date:   Mon Jun 26 00:02:00 2006 +0000\n+\n+    Third\n+$\ndiff --git a/t/t4013/diff.log_-SF_master_--max-count=0 b/t/t4013/diff.log_-SF_master_--max-count=0\ndeleted file mode 100644\nindex c1fc6c87317..00000000000\n--- a/t/t4013/diff.log_-SF_master_--max-count=0\n+++ /dev/null\n@@ -1,2 +0,0 @@\n-$ git log -SF master --max-count=0\n-$\ndiff --git a/t/t4013/diff.log_-SF_master_--max-count=1 b/t/t4013/diff.log_-SF_master_--max-count=1\ndeleted file mode 100644\nindex c981a038147..00000000000\n--- a/t/t4013/diff.log_-SF_master_--max-count=1\n+++ /dev/null\n@@ -1,7 +0,0 @@\n-$ git log -SF master --max-count=1\n-commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n-Author: A U Thor <author@example.com>\n-Date:   Mon Jun 26 00:02:00 2006 +0000\n-\n-    Third\n-$\ndiff --git a/t/t4013/diff.log_-S_F_master b/t/t4013/diff.log_-S_F_main\nsimilarity index 86%\nrename from t/t4013/diff.log_-S_F_master\nrename to t/t4013/diff.log_-S_F_main\nindex 978d2b41188..a75a42e1433 100644\n--- a/t/t4013/diff.log_-S_F_master\n+++ b/t/t4013/diff.log_-S_F_main\n@@ -1,4 +1,4 @@\n-$ git log -S F master\n+$ git log -S F main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--cc_-m_-p_master b/t/t4013/diff.log_-c_-m_-p_main\nsimilarity index 99%\nrename from t/t4013/diff.log_--cc_-m_-p_master\nrename to t/t4013/diff.log_-c_-m_-p_main\nindex 7c217cf348c..427f7324568 100644\n--- a/t/t4013/diff.log_--cc_-m_-p_master\n+++ b/t/t4013/diff.log_-c_-m_-p_main\n@@ -1,4 +1,4 @@\n-$ git log --cc -m -p master\n+$ git log -c -m -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-m_--raw_master b/t/t4013/diff.log_-m_--raw_main\nsimilarity index 98%\nrename from t/t4013/diff.log_-m_--raw_master\nrename to t/t4013/diff.log_-m_--raw_main\nindex cd2ecc46283..31d9bc77073 100644\n--- a/t/t4013/diff.log_-m_--raw_master\n+++ b/t/t4013/diff.log_-m_--raw_main\n@@ -1,4 +1,4 @@\n-$ git log -m --raw master\n+$ git log -m --raw main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-m_--stat_master b/t/t4013/diff.log_-m_--stat_main\nsimilarity index 98%\nrename from t/t4013/diff.log_-m_--stat_master\nrename to t/t4013/diff.log_-m_--stat_main\nindex c7db084fd90..4c8909229bf 100644\n--- a/t/t4013/diff.log_-m_--stat_master\n+++ b/t/t4013/diff.log_-m_--stat_main\n@@ -1,4 +1,4 @@\n-$ git log -m --stat master\n+$ git log -m --stat main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-m_-p_--first-parent_master b/t/t4013/diff.log_-m_-p_--first-parent_main\nsimilarity index 97%\nrename from t/t4013/diff.log_-m_-p_--first-parent_master\nrename to t/t4013/diff.log_-m_-p_--first-parent_main\nindex 7a0073f5296..459e10786b9 100644\n--- a/t/t4013/diff.log_-m_-p_--first-parent_master\n+++ b/t/t4013/diff.log_-m_-p_--first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log -m -p --first-parent master\n+$ git log -m -p --first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-m_-p_master b/t/t4013/diff.log_-m_-p_main\nsimilarity index 99%\nrename from t/t4013/diff.log_-m_-p_master\nrename to t/t4013/diff.log_-m_-p_main\nindex 9ca62a01ed2..07453c56983 100644\n--- a/t/t4013/diff.log_-m_-p_master\n+++ b/t/t4013/diff.log_-m_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -m -p master\n+$ git log -m -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-p_--diff-merges=first-parent_master b/t/t4013/diff.log_-p_--diff-merges=first-parent_main\nsimilarity index 97%\nrename from t/t4013/diff.log_-p_--diff-merges=first-parent_master\nrename to t/t4013/diff.log_-p_--diff-merges=first-parent_main\nindex 9538a275112..264a2f373ec 100644\n--- a/t/t4013/diff.log_-p_--diff-merges=first-parent_master\n+++ b/t/t4013/diff.log_-p_--diff-merges=first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log -p --diff-merges=first-parent master\n+$ git log -p --diff-merges=first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-p_--first-parent_master b/t/t4013/diff.log_-p_--first-parent_main\nsimilarity index 97%\nrename from t/t4013/diff.log_-p_--first-parent_master\nrename to t/t4013/diff.log_-p_--first-parent_main\nindex 28840ebea1e..247980817b5 100644\n--- a/t/t4013/diff.log_-p_--first-parent_master\n+++ b/t/t4013/diff.log_-p_--first-parent_main\n@@ -1,4 +1,4 @@\n-$ git log -p --first-parent master\n+$ git log -p --first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_-p_master b/t/t4013/diff.log_-p_main\nsimilarity index 98%\nrename from t/t4013/diff.log_-p_master\nrename to t/t4013/diff.log_-p_main\nindex bf1326dc366..c82b4dbf165 100644\n--- a/t/t4013/diff.log_-p_master\n+++ b/t/t4013/diff.log_-p_main\n@@ -1,4 +1,4 @@\n-$ git log -p master\n+$ git log -p main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.log_master b/t/t4013/diff.log_main\nsimilarity index 97%\nrename from t/t4013/diff.log_master\nrename to t/t4013/diff.log_main\nindex a8f6ce5abd6..50401f73e6e 100644\n--- a/t/t4013/diff.log_master\n+++ b/t/t4013/diff.log_main\n@@ -1,4 +1,4 @@\n-$ git log master\n+$ git log main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master b/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main\nsimilarity index 81%\nrename from t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master\nrename to t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main\nindex bb80f013b37..3aa1f80af35 100644\n--- a/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master\n+++ b/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main\n@@ -1,4 +1,4 @@\n-$ git diff-tree -c --abbrev master\n+$ git diff-tree -c --abbrev main\n 59d314ad6f356dd08601a4cd5e530381da3e3c64\n ::100644 100644 100644 cead32e 7289e35 992913c MM\tdir/sub\n ::100644 100644 100644 b414108 f4615da 10a8a9f MM\tfile0\ndiff --git a/t/t4013/diff.noellipses-whatchanged_--root_master b/t/t4013/diff.noellipses-whatchanged_--root_main\nsimilarity index 96%\nrename from t/t4013/diff.noellipses-whatchanged_--root_master\nrename to t/t4013/diff.noellipses-whatchanged_--root_main\nindex c2cfd4e7292..2bec0558356 100644\n--- a/t/t4013/diff.noellipses-whatchanged_--root_master\n+++ b/t/t4013/diff.noellipses-whatchanged_--root_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root master\n+$ git whatchanged --root main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.noellipses-whatchanged_-SF_master b/t/t4013/diff.noellipses-whatchanged_-SF_main\nsimilarity index 86%\nrename from t/t4013/diff.noellipses-whatchanged_-SF_master\nrename to t/t4013/diff.noellipses-whatchanged_-SF_main\nindex b36ce5886e0..0c1476d19eb 100644\n--- a/t/t4013/diff.noellipses-whatchanged_-SF_master\n+++ b/t/t4013/diff.noellipses-whatchanged_-SF_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged -SF master\n+$ git whatchanged -SF main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.noellipses-whatchanged_master b/t/t4013/diff.noellipses-whatchanged_main\nsimilarity index 96%\nrename from t/t4013/diff.noellipses-whatchanged_master\nrename to t/t4013/diff.noellipses-whatchanged_main\nindex 55e500f2edb..c48d2851aab 100644\n--- a/t/t4013/diff.noellipses-whatchanged_master\n+++ b/t/t4013/diff.noellipses-whatchanged_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged master\n+$ git whatchanged main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.show_--first-parent_master b/t/t4013/diff.show_--first-parent_main\nsimilarity index 92%\nrename from t/t4013/diff.show_--first-parent_master\nrename to t/t4013/diff.show_--first-parent_main\nindex 3dcbe473a0d..480502d65c2 100644\n--- a/t/t4013/diff.show_--first-parent_master\n+++ b/t/t4013/diff.show_--first-parent_main\n@@ -1,4 +1,4 @@\n-$ git show --first-parent master\n+$ git show --first-parent main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.show_-c_master b/t/t4013/diff.show_-c_main\nsimilarity index 95%\nrename from t/t4013/diff.show_-c_master\nrename to t/t4013/diff.show_-c_main\nindex 81aba8da96c..74ef8bc96b2 100644\n--- a/t/t4013/diff.show_-c_master\n+++ b/t/t4013/diff.show_-c_main\n@@ -1,4 +1,4 @@\n-$ git show -c master\n+$ git show -c main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.show_-m_master b/t/t4013/diff.show_-m_main\nsimilarity index 98%\nrename from t/t4013/diff.show_-m_master\nrename to t/t4013/diff.show_-m_main\nindex 4ea2ee453d5..8fd56736d97 100644\n--- a/t/t4013/diff.show_-m_master\n+++ b/t/t4013/diff.show_-m_main\n@@ -1,4 +1,4 @@\n-$ git show -m master\n+$ git show -m main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.show_master b/t/t4013/diff.show_main\nsimilarity index 96%\nrename from t/t4013/diff.show_master\nrename to t/t4013/diff.show_main\nindex fb08ce0e46d..630b52a95ef 100644\n--- a/t/t4013/diff.show_master\n+++ b/t/t4013/diff.show_main\n@@ -1,4 +1,4 @@\n-$ git show master\n+$ git show main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_\nsimilarity index 94%\nrename from t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_\nrename to t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_\nindex c8b6af2f438..ce0754d556e 100644\n--- a/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_\n+++ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_\n@@ -1,4 +1,4 @@\n-$ git whatchanged --patch-with-stat --summary master -- dir/\n+$ git whatchanged --patch-with-stat --summary main -- dir/\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--patch-with-stat_master b/t/t4013/diff.whatchanged_--patch-with-stat_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--patch-with-stat_master\nrename to t/t4013/diff.whatchanged_--patch-with-stat_main\nindex 1ac431ba921..aabccf39a53 100644\n--- a/t/t4013/diff.whatchanged_--patch-with-stat_master\n+++ b/t/t4013/diff.whatchanged_--patch-with-stat_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --patch-with-stat master\n+$ git whatchanged --patch-with-stat main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_ b/t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_\nsimilarity index 94%\nrename from t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_\nrename to t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_\nindex b30c28588f9..c05a0e81496 100644\n--- a/t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_\n+++ b/t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_\n@@ -1,4 +1,4 @@\n-$ git whatchanged --patch-with-stat master -- dir/\n+$ git whatchanged --patch-with-stat main -- dir/\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master\nrename to t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main\nindex 30aae7817b9..1f74b1b5487 100644\n--- a/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root --cc --patch-with-stat --summary master\n+$ git whatchanged --root --cc --patch-with-stat --summary main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master\nrename to t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main\nindex db90e515254..80d98121511 100644\n--- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root --patch-with-stat --summary master\n+$ git whatchanged --root --patch-with-stat --summary main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--root_--patch-with-stat_master\nrename to t/t4013/diff.whatchanged_--root_--patch-with-stat_main\nindex 9a6cc92ce7d..c0b9082a2c8 100644\n--- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master\n+++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root --patch-with-stat master\n+$ git whatchanged --root --patch-with-stat main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master\nrename to t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main\nindex d1d32bd34c3..0002c6912e1 100644\n--- a/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master\n+++ b/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root -c --patch-with-stat --summary master\n+$ git whatchanged --root -c --patch-with-stat --summary main\n commit 59d314ad6f356dd08601a4cd5e530381da3e3c64\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\ndiff --git a/t/t4013/diff.whatchanged_--root_-p_master b/t/t4013/diff.whatchanged_--root_-p_main\nsimilarity index 98%\nrename from t/t4013/diff.whatchanged_--root_-p_master\nrename to t/t4013/diff.whatchanged_--root_-p_main\nindex ebf1f0661e0..39f3e2be746 100644\n--- a/t/t4013/diff.whatchanged_--root_-p_master\n+++ b/t/t4013/diff.whatchanged_--root_-p_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root -p master\n+$ git whatchanged --root -p main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_--root_master b/t/t4013/diff.whatchanged_--root_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_--root_master\nrename to t/t4013/diff.whatchanged_--root_main\nindex a405cb61388..36f4d6697f5 100644\n--- a/t/t4013/diff.whatchanged_--root_master\n+++ b/t/t4013/diff.whatchanged_--root_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged --root master\n+$ git whatchanged --root main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_-SF_-p_master b/t/t4013/diff.whatchanged_-SF_-p_main\nsimilarity index 89%\nrename from t/t4013/diff.whatchanged_-SF_-p_master\nrename to t/t4013/diff.whatchanged_-SF_-p_main\nindex f39da848228..0e2e67c0df8 100644\n--- a/t/t4013/diff.whatchanged_-SF_-p_master\n+++ b/t/t4013/diff.whatchanged_-SF_-p_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged -SF -p master\n+$ git whatchanged -SF -p main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_-SF_master b/t/t4013/diff.whatchanged_-SF_main\nsimilarity index 86%\nrename from t/t4013/diff.whatchanged_-SF_master\nrename to t/t4013/diff.whatchanged_-SF_main\nindex 0499321d0eb..34c6bf6b950 100644\n--- a/t/t4013/diff.whatchanged_-SF_master\n+++ b/t/t4013/diff.whatchanged_-SF_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged -SF master\n+$ git whatchanged -SF main\n commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:02:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_-p_master b/t/t4013/diff.whatchanged_-p_main\nsimilarity index 98%\nrename from t/t4013/diff.whatchanged_-p_master\nrename to t/t4013/diff.whatchanged_-p_main\nindex f18d43209c0..18f3bdeef48 100644\n--- a/t/t4013/diff.whatchanged_-p_master\n+++ b/t/t4013/diff.whatchanged_-p_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged -p master\n+$ git whatchanged -p main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\ndiff --git a/t/t4013/diff.whatchanged_master b/t/t4013/diff.whatchanged_main\nsimilarity index 97%\nrename from t/t4013/diff.whatchanged_master\nrename to t/t4013/diff.whatchanged_main\nindex cd3bcc2c726..d6c83ed8b03 100644\n--- a/t/t4013/diff.whatchanged_master\n+++ b/t/t4013/diff.whatchanged_main\n@@ -1,4 +1,4 @@\n-$ git whatchanged master\n+$ git whatchanged main\n commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:03:00 2006 +0000\n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"526040","messageId":"8e32712a158210c9e8c3462275348ead9660ceb9.1757518141.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1757518141.git.phillip.wood@dunelm.org.uk","subject":"[PATCH v3 3/4] t9902: switch default branch name to main","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-10T15:29:02Z","receivedAt":"2025-09-10T15:29:26Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nRemove the penultimate use of \"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=\nmaster\" in our test suite. We have slowly been removing these ever\nsince we started to switch the default branch name used in tests to\n\"main\".\n\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n t/t9902-completion.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\nindex 6650d33fba6..964e1f15693 100755\n--- a/t/t9902-completion.sh\n+++ b/t/t9902-completion.sh\n@@ -11,9 +11,9 @@ test_description='test bash completion'\n # untraceable with such ancient Bash versions.\n test_untraceable=UnfortunatelyYes\n \n-# Override environment and always use master for the default initial branch\n+# Override environment and always use main for the default initial branch\n # name for these tests, so that rev completion candidates are as expected.\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./lib-bash.sh\n@@ -1453,7 +1453,7 @@ test_expect_success 'git bisect - start subcommand arguments before double-dash\n \t\tHEAD Z\n \t\tfinal Z\n \t\tinitial Z\n-\t\tmaster Z\n+\t\tmain Z\n \t\tEOF\n \t)\n '\n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"526041","messageId":"353328c61890b16cf6b088bf3d231b03176a969b.1757518141.git.phillip.wood@dunelm.org.uk","threadId":"64047","inReplyTo":"cover.1757518141.git.phillip.wood@dunelm.org.uk","subject":"[PATCH v3 4/4] t0613: stop setting default initial branch","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-10T15:29:03Z","receivedAt":"2025-09-10T15:29:27Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"From: Phillip Wood <phillip.wood@dunelm.org.uk>\n\nAs the tests are all run in separate repositories, set the branch\nname to \"master\" when creating the repository for the tests where\nthe result depends on the branch name. In order to make it easier to\nchange the branch name in the future a helper function is used. This\nreduces the number of tests that depend on the default branch name\nbeing \"master\" and removes the last instance of a test file using\n\"GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\".\n\nHelped-by: Junio C Hamano <gitster@pobox.com>\nSigned-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n---\n t/t0613-reftable-write-options.sh | 24 +++++++++++++-----------\n 1 file changed, 13 insertions(+), 11 deletions(-)\n\ndiff --git a/t/t0613-reftable-write-options.sh b/t/t0613-reftable-write-options.sh\nindex d77e601111f..e3347517594 100755\n--- a/t/t0613-reftable-write-options.sh\n+++ b/t/t0613-reftable-write-options.sh\n@@ -11,16 +11,18 @@ export GIT_TEST_REFTABLE_AUTOCOMPACTION\n # Block sizes depend on the hash function, so we force SHA1 here.\n GIT_TEST_DEFAULT_HASH=sha1\n export GIT_TEST_DEFAULT_HASH\n-# Block sizes also depend on the actual refs we write, so we force \"master\" to\n-# be the default initial branch name.\n-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\n-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n . ./test-lib.sh\n \n+# Block sizes depend on the actual refs we write, so, for tests\n+# that check block size, we force the initial branch name to be \"master\".\n+init_repo () {\n+\tgit init --initial-branch master repo\n+}\n+\n test_expect_success 'default write options' '\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tinit_repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n@@ -43,7 +45,7 @@ test_expect_success 'default write options' '\n test_expect_success 'disabled reflog writes no log blocks' '\n \ttest_config_global core.logAllRefUpdates false &&\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tinit_repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n@@ -62,7 +64,7 @@ test_expect_success 'disabled reflog writes no log blocks' '\n \n test_expect_success 'many refs results in multiple blocks' '\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tinit_repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n@@ -115,7 +117,7 @@ test_expect_success 'tiny block size leads to error' '\n test_expect_success 'small block size leads to multiple ref blocks' '\n \ttest_config_global core.logAllRefUpdates false &&\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tinit_repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit A &&\n@@ -172,7 +174,7 @@ test_expect_success 'block size exceeding maximum supported size' '\n \n test_expect_success 'restart interval at every single record' '\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tinit_repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n@@ -212,7 +214,7 @@ test_expect_success 'restart interval exceeding maximum supported interval' '\n test_expect_success 'object index gets written by default with ref index' '\n \ttest_config_global core.logAllRefUpdates false &&\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tinit_repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n@@ -247,7 +249,7 @@ test_expect_success 'object index gets written by default with ref index' '\n test_expect_success 'object index can be disabled' '\n \ttest_config_global core.logAllRefUpdates false &&\n \ttest_when_finished \"rm -rf repo\" &&\n-\tgit init repo &&\n+\tinit_repo &&\n \t(\n \t\tcd repo &&\n \t\ttest_commit initial &&\n-- \n2.49.0.897.gfad3eb7d210\n\n"},{"id":"526083","messageId":"xmqq4itarqfd.fsf@gitster.g","threadId":"64047","inReplyTo":"cover.1757518141.git.phillip.wood@dunelm.org.uk","subject":"Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to \"main\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-09-10T20:41:26Z","receivedAt":"2025-09-10T20:41:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n> Changes since V2:\n> Patch 1: reworded documentation\n> Patch 3: fixed typo in commit message\n> Patch 4: added helper function to initialise repository\n\nEverything I saw in the patch looked good.\n\n> I'm still on the fence about the suggestion to add some advice on how\n> to rename the branch after it is created in order to help users who\n> are following tutorials using \"master\" rather than \"main\". One the\n> one hand I can see that would be helpful, on the other it is pretty\n> annoying to everyone else.\n\nHmph.  I do not see why we want to be quiet and do not want to give\n\"Now we created 'main', which may not match an existing tutorial you\nare trying to follow.  Here is a way to use a different name to let\nyou continue with the tutorial.\" after annoying everybody with\n\"Sorry but we created 'master', which may not match your taste.\nHere is how you arrange it to be different\" for more than a few\nreleases already.\n\nIOW, I do not see annoyance is a valid argument against or for a\ncorresponding message to help the users across behaviour change\nboundary.\n\n> If it turns out that we want to add it we can always do so at a\n> later date.\n\nThanks.  Let's do that too.\n"},{"id":"526568","messageId":"xmqqv7lhigb7.fsf@gitster.g","threadId":"64047","inReplyTo":"xmqq4itarqfd.fsf@gitster.g","subject":"Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to \"main\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-09-17T09:22:52Z","receivedAt":"2025-09-17T09:22:56Z","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> Phillip Wood <phillip.wood123@gmail.com> writes:\n>\n>> Changes since V2:\n>> Patch 1: reworded documentation\n>> Patch 3: fixed typo in commit message\n>> Patch 4: added helper function to initialise repository\n>\n> Everything I saw in the patch looked good.\n>\n>> I'm still on the fence about the suggestion to add some advice on how\n>> to rename the branch after it is created in order to help users who\n>> are following tutorials using \"master\" rather than \"main\". One the\n>> one hand I can see that would be helpful, on the other it is pretty\n>> annoying to everyone else.\n>\n> Hmph.  I do not see why we want to be quiet and do not want to give\n> \"Now we created 'main', which may not match an existing tutorial you\n> are trying to follow.  Here is a way to use a different name to let\n> you continue with the tutorial.\" after annoying everybody with\n> \"Sorry but we created 'master', which may not match your taste.\n> Here is how you arrange it to be different\" for more than a few\n> releases already.\n>\n> IOW, I do not see annoyance is a valid argument against or for a\n> corresponding message to help the users across behaviour change\n> boundary.\n\nI do not want to see a viable topic left for too long without\ngetting completed, so here is my attempt.\n\nEarlier I thought we should use a separate advice.* variable to\nsquelch, but after thinking it again for a while, I think reusing\nthe one we have been using gives exactly what we want, so this just\nchanges the contents of the message after the switchover.  We would\nneed to retire the message after a while.\n\n--- >8 ---\nSubject: [PATCH 5/4] initial branch: give hints after switching the default name\n\nIt is likely that those who came to Git after 3.0 switched the\ndefault initial branch name to 'main' would still try to follow\ntutorials that were written before 3.0 happened and with the\nassumption that the tool would call the initial branch 'master'.\n\nTo help these new users after 3.0 boundary, let's retain one part of\nthe hint we will be giving before the default changes, namely, how\nto rename the branch an unconfigured Git has created just once.\n\nWe do this without telling them how to permanently configure the\ndefault name of the initial branch, and that design choice is very\nmuch deliberate.  The whole point of switching the default name was\nbecause we did not want to force individual users to configure their\ndefault branch name but while the hard wired default was 'master',\nthey _had_ to configure it away from 'master' in order to conform to\nthe recent norm, and a hint that tells them how to do so is useful.\n\nBut once the default is renamed to 'main', that no longer is true.\nA narrower audience who are new users that follow an instruction\nthat assumes the initial branch name is 'master' would only need to\nlearn \"here is how to change the branch name to match the tutorial\nyou are following in the repository you created for practice\", and\n\"here is how you keep creating repositories with the first branch\nwith a name everybody hates\" is unnecessary.\n\nIt also needs to be noted thta the advise token to squelch the\nmessage is the same advice.defaultBranchName as before, which is\nalso very much deliberate.  The users who do have that configured\nare those who _have_ been using Git since before 3.0, and they are\nnot the target audience for the new advice message.  Reusing the\nsame advise token ensures that they do not have to turn the message\noff.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n advice.c         |  2 --\n advice.h         |  4 +---\n refs.c           | 12 ++++++++++--\n t/t0000-basic.sh |  3 ++-\n t/t0001-init.sh  | 14 +++++++-------\n 5 files changed, 20 insertions(+), 15 deletions(-)\n\ndiff --git c/advice.c w/advice.c\nindex 48c49ee414..e5f0ff8449 100644\n--- c/advice.c\n+++ w/advice.c\n@@ -51,9 +51,7 @@ static struct {\n \t[ADVICE_AM_WORK_DIR] \t\t\t\t= { \"amWorkDir\" },\n \t[ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] \t= { \"checkoutAmbiguousRemoteBranchName\" },\n \t[ADVICE_COMMIT_BEFORE_MERGE]\t\t\t= { \"commitBeforeMerge\" },\n-#ifndef WITH_BREAKING_CHANGES\n \t[ADVICE_DEFAULT_BRANCH_NAME]\t\t\t= { \"defaultBranchName\" },\n-#endif /* WITH_BREAKING_CHANGES */\n \t[ADVICE_DETACHED_HEAD]\t\t\t\t= { \"detachedHead\" },\n \t[ADVICE_DIVERGING]\t\t\t\t= { \"diverging\" },\n \t[ADVICE_FETCH_SET_HEAD_WARN]\t\t\t= { \"fetchRemoteHEADWarn\" },\ndiff --git c/advice.h w/advice.h\nindex fc1dc87204..8def280688 100644\n--- c/advice.h\n+++ w/advice.h\n@@ -18,9 +18,7 @@ enum advice_type {\n \tADVICE_AM_WORK_DIR,\n \tADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME,\n \tADVICE_COMMIT_BEFORE_MERGE,\n-#ifndef WITH_BREAKING_CHANGES\n-\tADVICE_DEFAULT_BRANCH_NAME,\n-#endif /* WITH_BREAKING_CHANGES */\n+\tADVICE_DEFAULT_BRANCH_NAME, /* To be retired sometime after Git 3.0 */\n \tADVICE_DETACHED_HEAD,\n \tADVICE_DIVERGING,\n \tADVICE_FETCH_SET_HEAD_WARN,\ndiff --git c/refs.c w/refs.c\nindex 149a8d1cec..5e5a41ec01 100644\n--- c/refs.c\n+++ w/refs.c\n@@ -641,9 +641,17 @@ static const char default_branch_name_advice[] = N_(\n \"\\n\"\n \"\\tgit branch -m <name>\\n\"\n );\n+#else\n+static const char default_branch_name_advice[] = N_(\n+\"Using '%s' as the name for the initial branch since Git 3.0.\\n\"\n+\"If you expected Git to create 'master', you can rename the just-created\\n\"\n+\"branch can be renamed via this command:\\n\"\n+\"\\n\"\n+\"\\tgit branch -m master\\n\"\n+);\n #endif /* WITH_BREAKING_CHANGES */\n \n-char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet)\n+char *repo_default_branch_name(struct repository *r, int quiet)\n {\n \tconst char *config_key = \"init.defaultbranch\";\n \tconst char *config_display_key = \"init.defaultBranch\";\n@@ -660,10 +668,10 @@ char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet)\n \t\tret = xstrdup(\"main\");\n #else\n \t\tret = xstrdup(\"master\");\n+#endif /* WITH_BREAKING_CHANGES */\n \t\tif (!quiet)\n \t\t\tadvise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME,\n \t\t\t\t\t  _(default_branch_name_advice), ret);\n-#endif /* WITH_BREAKING_CHANGES */\n \t}\n \n \tfull_ref = xstrfmt(\"refs/heads/%s\", ret);\ndiff --git c/t/t0000-basic.sh w/t/t0000-basic.sh\nindex 2b63e1c86c..54ed80ebd4 100755\n--- c/t/t0000-basic.sh\n+++ w/t/t0000-basic.sh\n@@ -220,7 +220,8 @@ test_expect_success 'subtest: --verbose option' '\n \ttest_done\n \tEOF\n \tmv t1234-verbose/err t1234-verbose/err+ &&\n-\tgrep -v \"^Initialized empty\" t1234-verbose/err+ >t1234-verbose/err &&\n+\tgrep -v -e \"^Initialized empty\" -e \"^hint:\" t1234-verbose/err+ \\\n+\t\t>t1234-verbose/err &&\n \tcheck_sub_test_lib_test_err t1234-verbose \\\n \t\t<<-\\EOF_OUT 3<<-\\EOF_ERR\n \t> ok 1 - passing test\ndiff --git c/t/t0001-init.sh w/t/t0001-init.sh\nindex df0040b9ac..5fe7b8c674 100755\n--- c/t/t0001-init.sh\n+++ w/t/t0001-init.sh\n@@ -562,9 +562,9 @@ test_expect_success 'init warns about invalid init.defaultObjectFormat' '\n \ttest_when_finished \"rm -rf repo\" &&\n \ttest_config_global init.defaultObjectFormat garbage &&\n \n-\techo \"warning: unknown hash algorithm ${SQ}garbage${SQ}\" >expect &&\n+\texpect=\"warning: unknown hash algorithm ${SQ}garbage${SQ}\" &&\n \tgit init repo 2>err &&\n-\ttest_cmp expect err &&\n+\ttest_grep \"$expect\" err &&\n \n \tgit -C repo rev-parse --show-object-format >actual &&\n \techo $GIT_DEFAULT_HASH >expected &&\n@@ -649,9 +649,9 @@ test_expect_success 'init warns about invalid init.defaultRefFormat' '\n \ttest_when_finished \"rm -rf repo\" &&\n \ttest_config_global init.defaultRefFormat garbage &&\n \n-\techo \"warning: unknown ref storage format ${SQ}garbage${SQ}\" >expect &&\n+\texpect=\"warning: unknown ref storage format ${SQ}garbage${SQ}\" &&\n \tgit init repo 2>err &&\n-\ttest_cmp expect err &&\n+\ttest_grep \"$expect\" err &&\n \n \tgit -C repo rev-parse --show-ref-format >actual &&\n \techo $GIT_DEFAULT_REF_FORMAT >expected &&\n@@ -868,18 +868,18 @@ test_expect_success 'overridden default initial branch name (config)' '\n \tgrep nmb actual\n '\n \n-test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' '\n+test_expect_success 'advice on unconfigured init.defaultBranch' '\n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \\\n \t\tinit unconfigured-default-branch-name 2>err &&\n \ttest_decode_color <err >decoded &&\n \ttest_grep \"<YELLOW>hint: \" decoded\n '\n \n-test_expect_success 'advice on unconfigured init.defaultBranch disabled' '\n+test_expect_success 'advice on unconfigured init.defaultBranch can be disabled' '\n \ttest_when_finished \"rm -rf no-advice\" &&\n \n \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \\\n-\t\tgit -c advice.defaultBranchName=false init no-advice 2>err &&\n+\tgit -c advice.defaultBranchName=false init no-advice 2>err &&\n \ttest_grep ! \"hint: \" err\n '\n \n"},{"id":"526570","messageId":"145305ac-dbfb-4162-a603-b6b60df2bc5e@app.fastmail.com","threadId":"64047","inReplyTo":"xmqqv7lhigb7.fsf@gitster.g","subject":"Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to \"main\"","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2025-09-17T12:02:29Z","receivedAt":"2025-09-17T12:02:54Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Wed, Sep 17, 2025, at 11:22, Junio C Hamano wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n>[snip intro]\n>\n> --- >8 ---\n> Subject: [PATCH 5/4] initial branch: give hints after switching the default name\n>\n>[snip]\n>\n> But once the default is renamed to 'main', that no longer is true.\n> A narrower audience who are new users that follow an instruction\n> that assumes the initial branch name is 'master' would only need to\n> learn \"here is how to change the branch name to match the tutorial\n> you are following in the repository you created for practice\", and\n> \"here is how you keep creating repositories with the first branch\n> with a name everybody hates\" is unnecessary.\n>\n> It also needs to be noted thta the advise token to squelch the\n\ns/thta/\n\nWhich I only mention because\n\n>[snip]\n> diff --git c/refs.c w/refs.c\n> index 149a8d1cec..5e5a41ec01 100644\n> --- c/refs.c\n> +++ w/refs.c\n> @@ -641,9 +641,17 @@ static const char default_branch_name_advice[] =\n> N_(\n>  \"\\n\"\n>  \"\\tgit branch -m <name>\\n\"\n>  );\n> +#else\n> +static const char default_branch_name_advice[] = N_(\n> +\"Using '%s' as the name for the initial branch since Git 3.0.\\n\"\n> +\"If you expected Git to create 'master', you can rename the just-created\\n\"\n> +\"branch can be renamed via this command:\\n\"\n> +\"\\n\"\n> +\"\\tgit branch -m master\\n\"\n> +);\n\nRepetition: “can rename ... can be renamed”\n"},{"id":"526580","messageId":"70fa7537-3b89-4c3b-9dea-5a7ea0174a9d@gmail.com","threadId":"64047","inReplyTo":"xmqqv7lhigb7.fsf@gitster.g","subject":"Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to \"main\"","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-17T14:53:34Z","receivedAt":"2025-09-17T14:53:45Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"\n\nOn 17/09/2025 10:22, Junio C Hamano wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n> We do this without telling them how to permanently configure the\n> default name of the initial branch, and that design choice is very\n> much deliberate.\n\nThat makes sense\n> It also needs to be noted thta the advise token to squelch the\n> message is the same advice.defaultBranchName as before, which is\n> also very much deliberate.  The users who do have that configured\n> are those who _have_ been using Git since before 3.0, and they are\n> not the target audience for the new advice message.  Reusing the\n> same advise token ensures that they do not have to turn the message\n> off.\n\nThat's good\n\nThanks for following up on this. The code changes look good modulo\nthe typo pointed out by Kristoffer. I've left a few thoughts on the\ntest changes below.\n\n> diff --git c/t/t0000-basic.sh w/t/t0000-basic.sh\n> index 2b63e1c86c..54ed80ebd4 100755\n> --- c/t/t0000-basic.sh\n> +++ w/t/t0000-basic.sh\n> @@ -220,7 +220,8 @@ test_expect_success 'subtest: --verbose option' '\n>   \ttest_done\n>   \tEOF\n>   \tmv t1234-verbose/err t1234-verbose/err+ &&\n> -\tgrep -v \"^Initialized empty\" t1234-verbose/err+ >t1234-verbose/err &&\n> +\tgrep -v -e \"^Initialized empty\" -e \"^hint:\" t1234-verbose/err+ \\\n> +\t\t>t1234-verbose/err &&\n>   \tcheck_sub_test_lib_test_err t1234-verbose \\\n>   \t\t<<-\\EOF_OUT 3<<-\\EOF_ERR\n>   \t> ok 1 - passing test\n> diff --git c/t/t0001-init.sh w/t/t0001-init.sh\n> index df0040b9ac..5fe7b8c674 100755\n> --- c/t/t0001-init.sh\n> +++ w/t/t0001-init.sh\n> @@ -562,9 +562,9 @@ test_expect_success 'init warns about invalid init.defaultObjectFormat' '\n>   \ttest_when_finished \"rm -rf repo\" &&\n>   \ttest_config_global init.defaultObjectFormat garbage &&\n>   \n> -\techo \"warning: unknown hash algorithm ${SQ}garbage${SQ}\" >expect &&\n> +\texpect=\"warning: unknown hash algorithm ${SQ}garbage${SQ}\" &&\n>   \tgit init repo 2>err &&\n> -\ttest_cmp expect err &&\n> +\ttest_grep \"$expect\" err &&\n>   \n>   \tgit -C repo rev-parse --show-object-format >actual &&\n>   \techo $GIT_DEFAULT_HASH >expected &&\n> @@ -649,9 +649,9 @@ test_expect_success 'init warns about invalid init.defaultRefFormat' '\n>   \ttest_when_finished \"rm -rf repo\" &&\n>   \ttest_config_global init.defaultRefFormat garbage &&\n>   \n> -\techo \"warning: unknown ref storage format ${SQ}garbage${SQ}\" >expect &&\n> +\texpect=\"warning: unknown ref storage format ${SQ}garbage${SQ}\" &&\n>   \tgit init repo 2>err &&\n> -\ttest_cmp expect err &&\n> +\ttest_grep \"$expect\" err &&\n\nThe test changes up to this point strike me as somewhat unfortunate as\nthese tests are perfectly content with the existing advice. I assume\nthis stems from us not setting GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\nanymore when WITH_BREAKING_CHANGES is enabled. I think we should do\nsomething like\n\ndiff --git b/t/test-lib.sh b/t/test-lib.sh\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -127,13 +127,15 @@ then\n  \texport GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS\n  fi\n  \n+# Explicitly set the default branch name for testing, to avoid the\n+# transitory \"git init\" warning under --verbose.\n  if test -z \"$WITH_BREAKING_CHANGES\"\n  then\n-\t# Explicitly set the default branch name for testing, to avoid the\n-\t# transitory \"git init\" warning under --verbose.\n  \t: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master}\n-\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+else\n+\t: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=main}\n  fi\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n  \n  ################################################################\n  # It appears that people try to run tests without building...\n\nTo address that which will also stop the advice appearing when the\ntests are run with --verbose as well.\n\n>   \tgit -C repo rev-parse --show-ref-format >actual &&\n>   \techo $GIT_DEFAULT_REF_FORMAT >expected &&\n> @@ -868,18 +868,18 @@ test_expect_success 'overridden default initial branch name (config)' '\n>   \tgrep nmb actual\n>   '\n>   \n> -test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' '\n> +test_expect_success 'advice on unconfigured init.defaultBranch' '\n>   \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \\\n>   \t\tinit unconfigured-default-branch-name 2>err &&\n>   \ttest_decode_color <err >decoded &&\n>   \ttest_grep \"<YELLOW>hint: \" decoded\n>   '\n>   \n> -test_expect_success 'advice on unconfigured init.defaultBranch disabled' '\n> +test_expect_success 'advice on unconfigured init.defaultBranch can be disabled' '\n>   \ttest_when_finished \"rm -rf no-advice\" &&\n>   \n>   \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \\\n> -\t\tgit -c advice.defaultBranchName=false init no-advice 2>err &&\n> +\tgit -c advice.defaultBranchName=false init no-advice 2>err &&\n\nThe indentation is changed here but not above. I'd be happy to leave\nthis alone, but if we're going to remove the indentation here shouldn't\nwe do the same above?\n\n\n>   \ttest_grep ! \"hint: \" err\n\nDo we want to check the advice that is printed now that we have two\ndifferent messages?\n\nThanks\n\nPhillip\n\n"},{"id":"526582","messageId":"xmqqcy7pf7gt.fsf@gitster.g","threadId":"64047","inReplyTo":"145305ac-dbfb-4162-a603-b6b60df2bc5e@app.fastmail.com","subject":"Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to \"main\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-09-17T15:02:10Z","receivedAt":"2025-09-17T15:02:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Kristoffer Haugsbakk\" <kristofferhaugsbakk@fastmail.com> writes:\n\n> Which I only mention because\n>> +static const char default_branch_name_advice[] = N_(\n>> +\"Using '%s' as the name for the initial branch since Git 3.0.\\n\"\n>> +\"If you expected Git to create 'master', you can rename the just-created\\n\"\n>> +\"branch can be renamed via this command:\\n\"\n>> +\"\\n\"\n>> +\"\\tgit branch -m master\\n\"\n>> +);\n>\n> Repetition: “can rename ... can be renamed”\n\nYuck.  I started writing my own message and the in the middle of the\nsentence changed my mind and decided to borrow from the existing\nmessage we are giving before 3.0, and made the result incoherent.\n\nI've squashed in the following.\n\nThanks for carefully reading.\n\ndiff --git c/refs.c w/refs.c\nindex dc569d0358..f15366bfce 100644\n--- c/refs.c\n+++ w/refs.c\n@@ -644,7 +644,7 @@ static const char default_branch_name_advice[] = N_(\n #else\n static const char default_branch_name_advice[] = N_(\n \"Using '%s' as the name for the initial branch since Git 3.0.\\n\"\n-\"If you expected Git to create 'master', you can rename the just-created\\n\"\n+\"If you expected Git to create 'master', the just-created\\n\"\n \"branch can be renamed via this command:\\n\"\n \"\\n\"\n \"\\tgit branch -m master\\n\"\n"},{"id":"526584","messageId":"xmqq7bxxf6kk.fsf@gitster.g","threadId":"64047","inReplyTo":"70fa7537-3b89-4c3b-9dea-5a7ea0174a9d@gmail.com","subject":"Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to \"main\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-09-17T15:21:31Z","receivedAt":"2025-09-17T15:21:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n> The test changes up to this point strike me as somewhat unfortunate as\n> these tests are perfectly content with the existing advice. I assume\n> this stems from us not setting GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n> anymore when WITH_BREAKING_CHANGES is enabled. I think we should do\n> something like\n>\n> diff --git b/t/test-lib.sh b/t/test-lib.sh\n> --- a/t/test-lib.sh\n> +++ b/t/test-lib.sh\n> @@ -127,13 +127,15 @@ then\n>  \texport GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS\n>  fi\n>  +# Explicitly set the default branch name for testing, to avoid the\n> +# transitory \"git init\" warning under --verbose.\n>  if test -z \"$WITH_BREAKING_CHANGES\"\n>  then\n> -\t# Explicitly set the default branch name for testing, to avoid the\n> -\t# transitory \"git init\" warning under --verbose.\n>  \t: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master}\n> -\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n> +else\n> +\t: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=main}\n>  fi\n> +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n\nThat does make it more in line in spirit with what your\n\"breaking-changes: switch default branch to main\" does here.\nInstead of assuming that we won't have \"no default set\" hint after\n3.0, we do assume the \"no default set\" hint will be there and\nsquelch for a bit longer.\n\nOK.\n\n> To address that which will also stop the advice appearing when the\n> tests are run with --verbose as well.\n>\n>>   \tgit -C repo rev-parse --show-ref-format >actual &&\n>>   \techo $GIT_DEFAULT_REF_FORMAT >expected &&\n>> @@ -868,18 +868,18 @@ test_expect_success 'overridden default initial branch name (config)' '\n>>   \tgrep nmb actual\n>>   '\n>>   -test_expect_success !WITH_BREAKING_CHANGES 'advice on\n>> unconfigured init.defaultBranch' '\n>> +test_expect_success 'advice on unconfigured init.defaultBranch' '\n>>   \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \\\n>>   \t\tinit unconfigured-default-branch-name 2>err &&\n>>   \ttest_decode_color <err >decoded &&\n>>   \ttest_grep \"<YELLOW>hint: \" decoded\n>>   '\n>>   -test_expect_success 'advice on unconfigured init.defaultBranch\n>> disabled' '\n>> +test_expect_success 'advice on unconfigured init.defaultBranch can be disabled' '\n>>   \ttest_when_finished \"rm -rf no-advice\" &&\n>>     \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \\\n>> -\t\tgit -c advice.defaultBranchName=false init no-advice 2>err &&\n>> +\tgit -c advice.defaultBranchName=false init no-advice 2>err &&\n>\n> The indentation is changed here but not above. I'd be happy to leave\n> this alone, but if we're going to remove the indentation here shouldn't\n> we do the same above?\n\nQUite honestly, I didn't even notice that the line that begins with\n\"init unconfigured...\" was a continuation line.  We definitely\nshould fix it to match.\n\n>>   \ttest_grep ! \"hint: \" err\n>\n> Do we want to check the advice that is printed now that we have two\n> different messages?\n\nI am not sure; isn't this checking that there is no advice, not two\nadvice messages?\n\nAhh, you mean two new tests, one with !WITH_BREAKING_CHANGES and one\nwith WITH_BREAKING_CHANGES, to see default_branch_name_advice[]\nappears in the advice output?  I am not sure if that is needed here.\nWithout [PATCH 5/4] there is no test that checks the exact wording\nof \"... will change to main in Git 3.0\" message, either, and I think\nthat is a sensible thing *not* to have a test that insists on the\nexact phrasing for such things.\n\n\n"},{"id":"526598","messageId":"xmqqsegldpgo.fsf@gitster.g","threadId":"64047","inReplyTo":"xmqq7bxxf6kk.fsf@gitster.g","subject":"Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to \"main\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-09-17T16:16:23Z","receivedAt":"2025-09-17T16:16:26Z","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> That does make it more in line in spirit with what your\n> \"breaking-changes: switch default branch to main\" does here.\n> Instead of assuming that we won't have \"no default set\" hint after\n> 3.0, we do assume the \"no default set\" hint will be there and\n> squelch for a bit longer.\n\nI'll do only this one, and revert the other test changes that are\nnow mostly stylistic clean-ups.\n\nOne thing that may be worth commenting on is this part (which also I\nreverted as irrelevant to get the 3.0 change going).\n\ndiff --git a/t/t0001-init.sh b/t/t0001-init.sh\nindex df0040b9ac..c7f39248e0 100755\n--- a/t/t0001-init.sh\n+++ b/t/t0001-init.sh\n@@ -562,9 +562,9 @@ test_expect_success 'init warns about invalid init.defaultObjectFormat' '\n \ttest_when_finished \"rm -rf repo\" &&\n \ttest_config_global init.defaultObjectFormat garbage &&\n \n-\techo \"warning: unknown hash algorithm ${SQ}garbage${SQ}\" >expect &&\n+\texpect=\"warning: unknown hash algorithm ${SQ}garbage${SQ}\" &&\n \tgit init repo 2>err &&\n-\ttest_cmp expect err &&\n+\ttest_grep \"$expect\" err &&\n \n \tgit -C repo rev-parse --show-object-format >actual &&\n \techo $GIT_DEFAULT_HASH >expected &&\n\nI think in the longer run, a change like this that makes us check\nonly what we care about (i.e., \"do we warn about unknown hash\nalgo?\"), without assuming more than necessary (i.e., \"we shouldn't\nget any other warnings or hints, or this check with test_cmp that\nexpects an exact match will fail), is a good thing.  \n\nPerhaps a #leftoverbit material.\n\nThanks.\n\n"},{"id":"526599","messageId":"xmqqikhhdpd7.fsf_-_@gitster.g","threadId":"64047","inReplyTo":"cover.1757518141.git.phillip.wood@dunelm.org.uk","subject":"[PATCH v2 5/4] initial branch: give hints after switching the default name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-09-17T16:18:28Z","receivedAt":"2025-09-17T16:18:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"It is likely that those who came to Git after 3.0 switched the\ndefault initial branch name to 'main' would still try to follow\ntutorials that were written before 3.0 happened and with the\nassumption that the tool would call the initial branch 'master'.\n\nTo help these new users after 3.0 boundary, let's retain one part of\nthe hint we will be giving before the default changes, namely, how\nto rename the branch an unconfigured Git has created just once.\n\nWe do this without telling them how to permanently configure the\ndefault name of the initial branch, and that design choice is very\nmuch deliberate.  The whole point of switching the default name was\nbecause we did not want to force individual users to configure their\ndefault branch name but while the hard wired default was 'master',\nthey _had_ to configure it away from 'master' in order to conform to\nthe recent norm, and a hint that tells them how to do so is useful.\n\nBut once the default is renamed to 'main', that no longer is true.\nA narrower audience who are new users that follow an instruction\nthat assumes the initial branch name is 'master' would only need to\nlearn \"here is how to change the branch name to match the tutorial\nyou are following in the repository you created for practice\", and\n\"here is how you keep creating repositories with the first branch\nwith a name everybody hates\" is unnecessary.\n\nIt also needs to be noted that the advise token to squelch the\nmessage is the same advice.defaultBranchName as before, which is\nalso very much deliberate.  The users who do have that configured\nare those who _have_ been using Git since before 3.0, and they are\nnot the target audience for the new advice message.  Reusing the\nsame advise token ensures that they do not have to turn the message\noff.\n\nHelped-by: Phillip Wood <phillip.wood@dunelm.org.uk>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n * With simplified tests, thanks to Phillip's help.\n\n advice.c      |  2 --\n advice.h      |  4 +---\n refs.c        | 12 ++++++++++--\n t/test-lib.sh | 10 +++++++---\n 4 files changed, 18 insertions(+), 10 deletions(-)\n\ndiff --git a/advice.c b/advice.c\nindex 48c49ee414..e5f0ff8449 100644\n--- a/advice.c\n+++ b/advice.c\n@@ -51,9 +51,7 @@ static struct {\n \t[ADVICE_AM_WORK_DIR] \t\t\t\t= { \"amWorkDir\" },\n \t[ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] \t= { \"checkoutAmbiguousRemoteBranchName\" },\n \t[ADVICE_COMMIT_BEFORE_MERGE]\t\t\t= { \"commitBeforeMerge\" },\n-#ifndef WITH_BREAKING_CHANGES\n \t[ADVICE_DEFAULT_BRANCH_NAME]\t\t\t= { \"defaultBranchName\" },\n-#endif /* WITH_BREAKING_CHANGES */\n \t[ADVICE_DETACHED_HEAD]\t\t\t\t= { \"detachedHead\" },\n \t[ADVICE_DIVERGING]\t\t\t\t= { \"diverging\" },\n \t[ADVICE_FETCH_SET_HEAD_WARN]\t\t\t= { \"fetchRemoteHEADWarn\" },\ndiff --git a/advice.h b/advice.h\nindex fc1dc87204..8def280688 100644\n--- a/advice.h\n+++ b/advice.h\n@@ -18,9 +18,7 @@ enum advice_type {\n \tADVICE_AM_WORK_DIR,\n \tADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME,\n \tADVICE_COMMIT_BEFORE_MERGE,\n-#ifndef WITH_BREAKING_CHANGES\n-\tADVICE_DEFAULT_BRANCH_NAME,\n-#endif /* WITH_BREAKING_CHANGES */\n+\tADVICE_DEFAULT_BRANCH_NAME, /* To be retired sometime after Git 3.0 */\n \tADVICE_DETACHED_HEAD,\n \tADVICE_DIVERGING,\n \tADVICE_FETCH_SET_HEAD_WARN,\ndiff --git a/refs.c b/refs.c\nindex 149a8d1cec..f15366bfce 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -641,9 +641,17 @@ static const char default_branch_name_advice[] = N_(\n \"\\n\"\n \"\\tgit branch -m <name>\\n\"\n );\n+#else\n+static const char default_branch_name_advice[] = N_(\n+\"Using '%s' as the name for the initial branch since Git 3.0.\\n\"\n+\"If you expected Git to create 'master', the just-created\\n\"\n+\"branch can be renamed via this command:\\n\"\n+\"\\n\"\n+\"\\tgit branch -m master\\n\"\n+);\n #endif /* WITH_BREAKING_CHANGES */\n \n-char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet)\n+char *repo_default_branch_name(struct repository *r, int quiet)\n {\n \tconst char *config_key = \"init.defaultbranch\";\n \tconst char *config_display_key = \"init.defaultBranch\";\n@@ -660,10 +668,10 @@ char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet)\n \t\tret = xstrdup(\"main\");\n #else\n \t\tret = xstrdup(\"master\");\n+#endif /* WITH_BREAKING_CHANGES */\n \t\tif (!quiet)\n \t\t\tadvise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME,\n \t\t\t\t\t  _(default_branch_name_advice), ret);\n-#endif /* WITH_BREAKING_CHANGES */\n \t}\n \n \tfull_ref = xstrfmt(\"refs/heads/%s\", ret);\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex b191954c3c..562f950fb0 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -127,13 +127,17 @@ then\n \texport GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS\n fi\n \n+# Explicitly set the default branch name for testing, to squelch hints\n+# from \"git init\" during the transition period.  Should be removed\n+# after we decide to remove ADVICE_DEFAULT_BRANCH_NAME\n if test -z \"$WITH_BREAKING_CHANGES\"\n then\n-\t# Explicitly set the default branch name for testing, to avoid the\n-\t# transitory \"git init\" warning under --verbose.\n \t: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master}\n-\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+else\n+\t: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=main}\n fi\n+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n+\n \n ################################################################\n # It appears that people try to run tests without building...\n-- \n2.51.0-382-g6e76cf14a4\n\n"},{"id":"526702","messageId":"5629352c-2505-4254-8d47-d63f3430ceff@gmail.com","threadId":"64047","inReplyTo":"xmqqikhhdpd7.fsf_-_@gitster.g","subject":"Re: [PATCH v2 5/4] initial branch: give hints after switching the default name","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-18T15:06:28Z","receivedAt":"2025-09-18T15:06:34Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 17/09/2025 17:18, Junio C Hamano wrote:\n> It is likely that those who came to Git after 3.0 switched the\n> default initial branch name to 'main' would still try to follow\n> tutorials that were written before 3.0 happened and with the\n> assumption that the tool would call the initial branch 'master'.\n> \n> To help these new users after 3.0 boundary, let's retain one part of\n> the hint we will be giving before the default changes, namely, how\n> to rename the branch an unconfigured Git has created just once.\n> \n> We do this without telling them how to permanently configure the\n> default name of the initial branch, and that design choice is very\n> much deliberate.  The whole point of switching the default name was\n> because we did not want to force individual users to configure their\n> default branch name but while the hard wired default was 'master',\n> they _had_ to configure it away from 'master' in order to conform to\n> the recent norm, and a hint that tells them how to do so is useful.\n> \n> But once the default is renamed to 'main', that no longer is true.\n> A narrower audience who are new users that follow an instruction\n> that assumes the initial branch name is 'master' would only need to\n> learn \"here is how to change the branch name to match the tutorial\n> you are following in the repository you created for practice\", and\n> \"here is how you keep creating repositories with the first branch\n> with a name everybody hates\" is unnecessary.\n> \n> It also needs to be noted that the advise token to squelch the\n> message is the same advice.defaultBranchName as before, which is\n> also very much deliberate.  The users who do have that configured\n> are those who _have_ been using Git since before 3.0, and they are\n> not the target audience for the new advice message.  Reusing the\n> same advise token ensures that they do not have to turn the message\n> off.\n> \n> Helped-by: Phillip Wood <phillip.wood@dunelm.org.uk>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>   * With simplified tests, thanks to Phillip's help.\n\nThis looks good. The only thing I wondered about was whether we should\nkeep\n\n-test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' '\n+test_expect_success 'advice on unconfigured init.defaultBranch' '\n  \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \\\n  \t\tinit unconfigured-default-branch-name 2>err &&\n\nin t0001-init.sh from the previous version as we're still printing some\nadvice.\n\nThanks\n\nPhillip\n\n> \n>   advice.c      |  2 --\n>   advice.h      |  4 +---\n>   refs.c        | 12 ++++++++++--\n>   t/test-lib.sh | 10 +++++++---\n>   4 files changed, 18 insertions(+), 10 deletions(-)\n> \n> diff --git a/advice.c b/advice.c\n> index 48c49ee414..e5f0ff8449 100644\n> --- a/advice.c\n> +++ b/advice.c\n> @@ -51,9 +51,7 @@ static struct {\n>   \t[ADVICE_AM_WORK_DIR] \t\t\t\t= { \"amWorkDir\" },\n>   \t[ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] \t= { \"checkoutAmbiguousRemoteBranchName\" },\n>   \t[ADVICE_COMMIT_BEFORE_MERGE]\t\t\t= { \"commitBeforeMerge\" },\n> -#ifndef WITH_BREAKING_CHANGES\n>   \t[ADVICE_DEFAULT_BRANCH_NAME]\t\t\t= { \"defaultBranchName\" },\n> -#endif /* WITH_BREAKING_CHANGES */\n>   \t[ADVICE_DETACHED_HEAD]\t\t\t\t= { \"detachedHead\" },\n>   \t[ADVICE_DIVERGING]\t\t\t\t= { \"diverging\" },\n>   \t[ADVICE_FETCH_SET_HEAD_WARN]\t\t\t= { \"fetchRemoteHEADWarn\" },\n> diff --git a/advice.h b/advice.h\n> index fc1dc87204..8def280688 100644\n> --- a/advice.h\n> +++ b/advice.h\n> @@ -18,9 +18,7 @@ enum advice_type {\n>   \tADVICE_AM_WORK_DIR,\n>   \tADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME,\n>   \tADVICE_COMMIT_BEFORE_MERGE,\n> -#ifndef WITH_BREAKING_CHANGES\n> -\tADVICE_DEFAULT_BRANCH_NAME,\n> -#endif /* WITH_BREAKING_CHANGES */\n> +\tADVICE_DEFAULT_BRANCH_NAME, /* To be retired sometime after Git 3.0 */\n>   \tADVICE_DETACHED_HEAD,\n>   \tADVICE_DIVERGING,\n>   \tADVICE_FETCH_SET_HEAD_WARN,\n> diff --git a/refs.c b/refs.c\n> index 149a8d1cec..f15366bfce 100644\n> --- a/refs.c\n> +++ b/refs.c\n> @@ -641,9 +641,17 @@ static const char default_branch_name_advice[] = N_(\n>   \"\\n\"\n>   \"\\tgit branch -m <name>\\n\"\n>   );\n> +#else\n> +static const char default_branch_name_advice[] = N_(\n> +\"Using '%s' as the name for the initial branch since Git 3.0.\\n\"\n> +\"If you expected Git to create 'master', the just-created\\n\"\n> +\"branch can be renamed via this command:\\n\"\n> +\"\\n\"\n> +\"\\tgit branch -m master\\n\"\n> +);\n>   #endif /* WITH_BREAKING_CHANGES */\n>   \n> -char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet)\n> +char *repo_default_branch_name(struct repository *r, int quiet)\n>   {\n>   \tconst char *config_key = \"init.defaultbranch\";\n>   \tconst char *config_display_key = \"init.defaultBranch\";\n> @@ -660,10 +668,10 @@ char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet)\n>   \t\tret = xstrdup(\"main\");\n>   #else\n>   \t\tret = xstrdup(\"master\");\n> +#endif /* WITH_BREAKING_CHANGES */\n>   \t\tif (!quiet)\n>   \t\t\tadvise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME,\n>   \t\t\t\t\t  _(default_branch_name_advice), ret);\n> -#endif /* WITH_BREAKING_CHANGES */\n>   \t}\n>   \n>   \tfull_ref = xstrfmt(\"refs/heads/%s\", ret);\n> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> index b191954c3c..562f950fb0 100644\n> --- a/t/test-lib.sh\n> +++ b/t/test-lib.sh\n> @@ -127,13 +127,17 @@ then\n>   \texport GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS\n>   fi\n>   \n> +# Explicitly set the default branch name for testing, to squelch hints\n> +# from \"git init\" during the transition period.  Should be removed\n> +# after we decide to remove ADVICE_DEFAULT_BRANCH_NAME\n>   if test -z \"$WITH_BREAKING_CHANGES\"\n>   then\n> -\t# Explicitly set the default branch name for testing, to avoid the\n> -\t# transitory \"git init\" warning under --verbose.\n>   \t: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master}\n> -\texport GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n> +else\n> +\t: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=main}\n>   fi\n> +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n> +\n>   \n>   ################################################################\n>   # It appears that people try to run tests without building...\n\n"},{"id":"526703","messageId":"7701b104-39dd-4f73-a16b-e207a3ef813f@gmail.com","threadId":"64047","inReplyTo":"xmqqsegldpgo.fsf@gitster.g","subject":"Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to \"main\"","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-09-18T15:06:44Z","receivedAt":"2025-09-18T15:06:48Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 17/09/2025 17:16, Junio C Hamano wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n> diff --git a/t/t0001-init.sh b/t/t0001-init.sh\n> index df0040b9ac..c7f39248e0 100755\n> --- a/t/t0001-init.sh\n> +++ b/t/t0001-init.sh\n> @@ -562,9 +562,9 @@ test_expect_success 'init warns about invalid init.defaultObjectFormat' '\n>   \ttest_when_finished \"rm -rf repo\" &&\n>   \ttest_config_global init.defaultObjectFormat garbage &&\n>   \n> -\techo \"warning: unknown hash algorithm ${SQ}garbage${SQ}\" >expect &&\n> +\texpect=\"warning: unknown hash algorithm ${SQ}garbage${SQ}\" &&\n>   \tgit init repo 2>err &&\n> -\ttest_cmp expect err &&\n> +\ttest_grep \"$expect\" err &&\n>   \n>   \tgit -C repo rev-parse --show-object-format >actual &&\n>   \techo $GIT_DEFAULT_HASH >expected &&\n> \n> I think in the longer run, a change like this that makes us check\n> only what we care about (i.e., \"do we warn about unknown hash\n> algo?\"), without assuming more than necessary (i.e., \"we shouldn't\n> get any other warnings or hints, or this check with test_cmp that\n> expects an exact match will fail), is a good thing.\n> \n> Perhaps a #leftoverbit material.\n\nI could go either way on this. If we want to test to be focused on the \nerror message when git encounters an unknown hash algorithm then I agree \nusing test_grep is an improvement over test_cmp. On the other hand it is \na bit weird if we start showing hints about the default branch name when \nthe hash algorithm is invalid and so we cannot initialize the repository \nso maybe detecting that is useful.\n\nThanks\n\nPhillip\n\n"},{"id":"526717","messageId":"xmqq1po38uwq.fsf@gitster.g","threadId":"64047","inReplyTo":"5629352c-2505-4254-8d47-d63f3430ceff@gmail.com","subject":"Re: [PATCH v2 5/4] initial branch: give hints after switching the default name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-09-18T18:42:13Z","receivedAt":"2025-09-18T18:42:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n>>   * With simplified tests, thanks to Phillip's help.\n>\n> This looks good. The only thing I wondered about was whether we should\n> keep\n>\n> -test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' '\n> +test_expect_success 'advice on unconfigured init.defaultBranch' '\n>  \tGIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \\\n>  \t\tinit unconfigured-default-branch-name 2>err &&\n>\n> in t0001-init.sh from the previous version as we're still printing some\n> advice.\n\nI was a bit over-eager to revert the changes to the tests.  I agree\nthat we should make sure that we have the hint message even after\n3.0, so we should drop the prerequisite there.\n\nThanks for spotting.\n\n"}]}