* [PATCH 0/6] breaking changes: switch default initial branch name to "main"
@ 2025-08-27 15:24 Phillip Wood
2025-08-27 15:24 ` [PATCH 1/6] t0018: switch default branch name to main Phillip Wood
` (8 more replies)
0 siblings, 9 replies; 56+ messages in thread
From: Phillip Wood @ 2025-08-27 15:24 UTC (permalink / raw)
To: git; +Cc: Johannes Schindelin, Wing Huang
From: Phillip Wood <phillip.wood@dunelm.org.uk>
This series switches the default branch name from "master" to "main"
when WITH_BREAKING_CHANGES is enabled. We have been warning that the
default name will change since 675704c74dd (init: provide useful advice
about init.defaultBranch, 2020-12-11) and the major git forges have all
switched their default branch name to "main", so I think it makes sense
to change the default branch name in git to match the wider ecosystem.
The first five patches update tests that currently require a default
branch name different to "main". The sixth patch then changes the
default branch "main" and removes GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
when WITH_BREAKING_CHANGES is enabled. Patch 2 is quite large but
is mechanically generated so it should be possible to review it by
checking that the changes can be reproduced.
This is an alternative to changing the branch name now as suggested in
https://lore.kernel.org<pull.1961.git.1756183921623.gitgitgadget@gmail.com
Base-Commit: f814da676ae46aac5be0a98b99373a76dee6cedb
Published-As: https://github.com/phillipwood/git/releases/tag/pw%2Finitial-branch-is-main%2Fv1
View-Changes-At: https://github.com/phillipwood/git/compare/f814da676...487d1a331
Fetch-It-Via: git fetch https://github.com/phillipwood/git pw/initial-branch-is-main/v1
Phillip Wood (6):
t0018: switch default branch name to main
t4013: switch default branch name to main
t9902: switch default branch name to main
t0613: stop setting default initial branch
t1403: remove dependency on GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
breaking-changes: switch default branch to main
Documentation/BreakingChanges.adoc | 5 +
Documentation/git-init.adoc | 12 +-
advice.c | 2 +
advice.h | 2 +
ci/run-build-and-tests.sh | 1 -
refs.c | 16 +-
t/t0001-init.sh | 9 +-
t/t0018-advice.sh | 8 +-
t/t0613-reftable-write-options.sh | 18 +-
t/t1403-show-ref.sh | 6 +-
t/t4013-diff-various.sh | 228 +++++++++---------
...ree_--cc_--patch-with-stat_--summary_main} | 2 +-
...iff.diff-tree_--cc_--patch-with-stat_main} | 2 +-
...r => diff.diff-tree_--cc_--shortstat_main} | 2 +-
...diff.diff-tree_--cc_--stat_--summary_main} | 2 +-
...master => diff.diff-tree_--cc_--stat_main} | 2 +-
...e_--cc_master => diff.diff-tree_--cc_main} | 2 +-
...master => diff.diff-tree_-c_--abbrev_main} | 2 +-
...> diff.diff-tree_-c_--stat_--summary_main} | 2 +-
...t_master => diff.diff-tree_-c_--stat_main} | 2 +-
...-tree_-c_master => diff.diff-tree_-c_main} | 2 +-
...-tree_-m_master => diff.diff-tree_-m_main} | 2 +-
...-p_-m_master => diff.diff-tree_-p_-m_main} | 2 +-
t/t4013/diff.diff-tree_-p_main | 2 +
t/t4013/diff.diff-tree_-p_master | 2 -
t/t4013/diff.diff-tree_main | 2 +
t/t4013/diff.diff-tree_master | 2 -
t/t4013/diff.diff_--dirstat_--cc_main~1_main | 3 +
.../diff.diff_--dirstat_--cc_master~1_master | 3 -
t/t4013/diff.diff_--dirstat_main~1_main~2 | 3 +
t/t4013/diff.diff_--dirstat_master~1_master~2 | 3 -
...ff.diff_--line-prefix=abc_main_main^_side} | 2 +-
...master^_side => diff.diff_main_main^_side} | 2 +-
...mat-patch_--attach_--stdout_initial..main} | 2 +-
...at-patch_--attach_--stdout_initial..main^} | 2 +-
...e_--stdout_--numbered-files_initial..main} | 2 +-
...t_--subject-prefix=TESTCASE_initial..main} | 2 +-
...mat-patch_--inline_--stdout_initial..main} | 2 +-
...at-patch_--inline_--stdout_initial..main^} | 2 +-
...t-patch_--inline_--stdout_initial..main^^} | 2 +-
...--stdout_--cover-letter_-n_initial..main^} | 2 +-
...atch_--stdout_--no-numbered_initial..main} | 2 +-
...t-patch_--stdout_--numbered_initial..main} | 2 +-
... diff.format-patch_--stdout_initial..main} | 2 +-
...diff.format-patch_--stdout_initial..main^} | 2 +-
..._-m_-p_master => diff.log_--cc_-m_-p_main} | 2 +-
t/t4013/diff.log_--decorate=full_--all | 2 +-
..._--decorate=full_--clear-decorations_--all | 2 +-
...f.log_--decorate=full_--decorate-all_--all | 2 +-
t/t4013/diff.log_--decorate_--all | 2 +-
...f.log_--decorate_--clear-decorations_--all | 2 +-
.../diff.log_--decorate_--decorate-all_--all | 2 +-
... diff.log_--diff-merges=first-parent_main} | 2 +-
..._--diff-merges=off_-p_--first-parent_main} | 2 +-
..._--first-parent_--diff-merges=off_-p_main} | 2 +-
...g_--no-diff-merges_-p_--first-parent_main} | 2 +-
..._--patch-with-stat_--summary_main_--_dir_} | 2 +-
...master => diff.log_--patch-with-stat_main} | 2 +-
...> diff.log_--patch-with-stat_main_--_dir_} | 2 +-
...oot_--cc_--patch-with-stat_--summary_main} | 2 +-
...g_--root_--patch-with-stat_--summary_main} | 2 +-
...=> diff.log_--root_--patch-with-stat_main} | 2 +-
...-root_-c_--patch-with-stat_--summary_main} | 2 +-
...root_-p_master => diff.log_--root_-p_main} | 2 +-
...log_--root_master => diff.log_--root_main} | 2 +-
...ter => diff.log_-GF_-p_--pickaxe-all_main} | 2 +-
...log_-GF_-p_master => diff.log_-GF_-p_main} | 2 +-
...{diff.log_-SF_master => diff.log_-GF_main} | 2 +-
...aster => diff.log_-IA_-IB_-I1_-I2_-p_main} | 2 +-
...log_-SF_-p_master => diff.log_-SF_-p_main} | 2 +-
...{diff.log_-GF_master => diff.log_-SF_main} | 2 +-
t/t4013/diff.log_-SF_main_--max-count=0 | 2 +
...ount=2 => diff.log_-SF_main_--max-count=1} | 2 +-
t/t4013/diff.log_-SF_main_--max-count=2 | 7 +
t/t4013/diff.log_-SF_master_--max-count=0 | 2 -
t/t4013/diff.log_-SF_master_--max-count=1 | 7 -
...iff.log_-S_F_master => diff.log_-S_F_main} | 2 +-
...cc_-m_-p_master => diff.log_-c_-m_-p_main} | 2 +-
...-m_--raw_master => diff.log_-m_--raw_main} | 2 +-
..._--stat_master => diff.log_-m_--stat_main} | 2 +-
...ter => diff.log_-m_-p_--first-parent_main} | 2 +-
...f.log_-m_-p_master => diff.log_-m_-p_main} | 2 +-
...ff.log_-p_--diff-merges=first-parent_main} | 2 +-
...master => diff.log_-p_--first-parent_main} | 2 +-
.../{diff.log_-p_master => diff.log_-p_main} | 2 +-
t/t4013/{diff.log_master => diff.log_main} | 2 +-
...iff.noellipses-diff-tree_-c_--abbrev_main} | 2 +-
...> diff.noellipses-whatchanged_--root_main} | 2 +-
...r => diff.noellipses-whatchanged_-SF_main} | 2 +-
...aster => diff.noellipses-whatchanged_main} | 2 +-
...t_master => diff.show_--first-parent_main} | 2 +-
...{diff.show_-c_master => diff.show_-c_main} | 2 +-
...{diff.show_-m_master => diff.show_-m_main} | 2 +-
t/t4013/{diff.show_master => diff.show_main} | 2 +-
..._--patch-with-stat_--summary_main_--_dir_} | 2 +-
...> diff.whatchanged_--patch-with-stat_main} | 2 +-
...hatchanged_--patch-with-stat_main_--_dir_} | 2 +-
...oot_--cc_--patch-with-stat_--summary_main} | 2 +-
...d_--root_--patch-with-stat_--summary_main} | 2 +-
...whatchanged_--root_--patch-with-stat_main} | 2 +-
...-root_-c_--patch-with-stat_--summary_main} | 2 +-
...master => diff.whatchanged_--root_-p_main} | 2 +-
...ot_master => diff.whatchanged_--root_main} | 2 +-
...-p_master => diff.whatchanged_-SF_-p_main} | 2 +-
...d_-SF_master => diff.whatchanged_-SF_main} | 2 +-
...ged_-p_master => diff.whatchanged_-p_main} | 2 +-
...atchanged_master => diff.whatchanged_main} | 2 +-
t/t9902-completion.sh | 6 +-
t/test-lib.sh | 15 +-
109 files changed, 281 insertions(+), 253 deletions(-)
rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_--summary_master => diff.diff-tree_--cc_--patch-with-stat_--summary_main} (86%)
rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_master => diff.diff-tree_--cc_--patch-with-stat_main} (89%)
rename t/t4013/{diff.diff-tree_--cc_--shortstat_master => diff.diff-tree_--cc_--shortstat_main} (65%)
rename t/t4013/{diff.diff-tree_-c_--stat_--summary_master => diff.diff-tree_--cc_--stat_--summary_main} (71%)
rename t/t4013/{diff.diff-tree_-c_--stat_master => diff.diff-tree_--cc_--stat_main} (76%)
rename t/t4013/{diff.diff-tree_--cc_master => diff.diff-tree_--cc_main} (91%)
rename t/t4013/{diff.diff-tree_-c_--abbrev_master => diff.diff-tree_-c_--abbrev_main} (83%)
rename t/t4013/{diff.diff-tree_--cc_--stat_--summary_master => diff.diff-tree_-c_--stat_--summary_main} (70%)
rename t/t4013/{diff.diff-tree_--cc_--stat_master => diff.diff-tree_-c_--stat_main} (75%)
rename t/t4013/{diff.diff-tree_-c_master => diff.diff-tree_-c_main} (93%)
rename t/t4013/{diff.diff-tree_-m_master => diff.diff-tree_-m_main} (96%)
rename t/t4013/{diff.diff-tree_-p_-m_master => diff.diff-tree_-p_-m_main} (97%)
create mode 100644 t/t4013/diff.diff-tree_-p_main
delete mode 100644 t/t4013/diff.diff-tree_-p_master
create mode 100644 t/t4013/diff.diff-tree_main
delete mode 100644 t/t4013/diff.diff-tree_master
create mode 100644 t/t4013/diff.diff_--dirstat_--cc_main~1_main
delete mode 100644 t/t4013/diff.diff_--dirstat_--cc_master~1_master
create mode 100644 t/t4013/diff.diff_--dirstat_main~1_main~2
delete mode 100644 t/t4013/diff.diff_--dirstat_master~1_master~2
rename t/t4013/{diff.diff_--line-prefix=abc_master_master^_side => diff.diff_--line-prefix=abc_main_main^_side} (87%)
rename t/t4013/{diff.diff_master_master^_side => diff.diff_main_main^_side} (89%)
rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master => diff.format-patch_--attach_--stdout_initial..main} (98%)
rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master^ => diff.format-patch_--attach_--stdout_initial..main^} (97%)
rename t/t4013/{diff.format-patch_--inline_--stdout_--numbered-files_initial..master => diff.format-patch_--inline_--stdout_--numbered-files_initial..main} (99%)
rename t/t4013/{diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master => diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main} (99%)
rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master => diff.format-patch_--inline_--stdout_initial..main} (98%)
rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^ => diff.format-patch_--inline_--stdout_initial..main^} (97%)
rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^^ => diff.format-patch_--inline_--stdout_initial..main^^} (95%)
rename t/t4013/{diff.format-patch_--stdout_--cover-letter_-n_initial..master^ => diff.format-patch_--stdout_--cover-letter_-n_initial..main^} (96%)
rename t/t4013/{diff.format-patch_--stdout_--no-numbered_initial..master => diff.format-patch_--stdout_--no-numbered_initial..main} (97%)
rename t/t4013/{diff.format-patch_--stdout_--numbered_initial..master => diff.format-patch_--stdout_--numbered_initial..main} (97%)
rename t/t4013/{diff.format-patch_--stdout_initial..master => diff.format-patch_--stdout_initial..main} (97%)
rename t/t4013/{diff.format-patch_--stdout_initial..master^ => diff.format-patch_--stdout_initial..main^} (96%)
rename t/t4013/{diff.log_-c_-m_-p_master => diff.log_--cc_-m_-p_main} (99%)
rename t/t4013/{diff.log_--diff-merges=first-parent_master => diff.log_--diff-merges=first-parent_main} (95%)
rename t/t4013/{diff.log_--no-diff-merges_-p_--first-parent_master => diff.log_--diff-merges=off_-p_--first-parent_main} (95%)
rename t/t4013/{diff.log_--first-parent_--diff-merges=off_-p_master => diff.log_--first-parent_--diff-merges=off_-p_main} (95%)
rename t/t4013/{diff.log_--diff-merges=off_-p_--first-parent_master => diff.log_--no-diff-merges_-p_--first-parent_main} (95%)
rename t/t4013/{diff.log_--patch-with-stat_--summary_master_--_dir_ => diff.log_--patch-with-stat_--summary_main_--_dir_} (96%)
rename t/t4013/{diff.log_--patch-with-stat_master => diff.log_--patch-with-stat_main} (98%)
rename t/t4013/{diff.log_--patch-with-stat_master_--_dir_ => diff.log_--patch-with-stat_main_--_dir_} (96%)
rename t/t4013/{diff.log_--root_--cc_--patch-with-stat_--summary_master => diff.log_--root_--cc_--patch-with-stat_--summary_main} (98%)
rename t/t4013/{diff.log_--root_--patch-with-stat_--summary_master => diff.log_--root_--patch-with-stat_--summary_main} (98%)
rename t/t4013/{diff.log_--root_--patch-with-stat_master => diff.log_--root_--patch-with-stat_main} (98%)
rename t/t4013/{diff.log_--root_-c_--patch-with-stat_--summary_master => diff.log_--root_-c_--patch-with-stat_--summary_main} (98%)
rename t/t4013/{diff.log_--root_-p_master => diff.log_--root_-p_main} (98%)
rename t/t4013/{diff.log_--root_master => diff.log_--root_main} (96%)
rename t/t4013/{diff.log_-GF_-p_--pickaxe-all_master => diff.log_-GF_-p_--pickaxe-all_main} (90%)
rename t/t4013/{diff.log_-GF_-p_master => diff.log_-GF_-p_main} (91%)
rename t/t4013/{diff.log_-SF_master => diff.log_-GF_main} (86%)
rename t/t4013/{diff.log_-IA_-IB_-I1_-I2_-p_master => diff.log_-IA_-IB_-I1_-I2_-p_main} (97%)
rename t/t4013/{diff.log_-SF_-p_master => diff.log_-SF_-p_main} (91%)
rename t/t4013/{diff.log_-GF_master => diff.log_-SF_main} (86%)
create mode 100644 t/t4013/diff.log_-SF_main_--max-count=0
rename t/t4013/{diff.log_-SF_master_--max-count=2 => diff.log_-SF_main_--max-count=1} (79%)
create mode 100644 t/t4013/diff.log_-SF_main_--max-count=2
delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=0
delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=1
rename t/t4013/{diff.log_-S_F_master => diff.log_-S_F_main} (86%)
rename t/t4013/{diff.log_--cc_-m_-p_master => diff.log_-c_-m_-p_main} (99%)
rename t/t4013/{diff.log_-m_--raw_master => diff.log_-m_--raw_main} (98%)
rename t/t4013/{diff.log_-m_--stat_master => diff.log_-m_--stat_main} (98%)
rename t/t4013/{diff.log_-m_-p_--first-parent_master => diff.log_-m_-p_--first-parent_main} (97%)
rename t/t4013/{diff.log_-m_-p_master => diff.log_-m_-p_main} (99%)
rename t/t4013/{diff.log_-p_--diff-merges=first-parent_master => diff.log_-p_--diff-merges=first-parent_main} (97%)
rename t/t4013/{diff.log_-p_--first-parent_master => diff.log_-p_--first-parent_main} (97%)
rename t/t4013/{diff.log_-p_master => diff.log_-p_main} (98%)
rename t/t4013/{diff.log_master => diff.log_main} (97%)
rename t/t4013/{diff.noellipses-diff-tree_-c_--abbrev_master => diff.noellipses-diff-tree_-c_--abbrev_main} (81%)
rename t/t4013/{diff.noellipses-whatchanged_--root_master => diff.noellipses-whatchanged_--root_main} (96%)
rename t/t4013/{diff.noellipses-whatchanged_-SF_master => diff.noellipses-whatchanged_-SF_main} (86%)
rename t/t4013/{diff.noellipses-whatchanged_master => diff.noellipses-whatchanged_main} (96%)
rename t/t4013/{diff.show_--first-parent_master => diff.show_--first-parent_main} (92%)
rename t/t4013/{diff.show_-c_master => diff.show_-c_main} (95%)
rename t/t4013/{diff.show_-m_master => diff.show_-m_main} (98%)
rename t/t4013/{diff.show_master => diff.show_main} (96%)
rename t/t4013/{diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ => diff.whatchanged_--patch-with-stat_--summary_main_--_dir_} (94%)
rename t/t4013/{diff.whatchanged_--patch-with-stat_master => diff.whatchanged_--patch-with-stat_main} (97%)
rename t/t4013/{diff.whatchanged_--patch-with-stat_master_--_dir_ => diff.whatchanged_--patch-with-stat_main_--_dir_} (94%)
rename t/t4013/{diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master => diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main} (97%)
rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_--summary_master => diff.whatchanged_--root_--patch-with-stat_--summary_main} (97%)
rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_master => diff.whatchanged_--root_--patch-with-stat_main} (97%)
rename t/t4013/{diff.whatchanged_--root_-c_--patch-with-stat_--summary_master => diff.whatchanged_--root_-c_--patch-with-stat_--summary_main} (97%)
rename t/t4013/{diff.whatchanged_--root_-p_master => diff.whatchanged_--root_-p_main} (98%)
rename t/t4013/{diff.whatchanged_--root_master => diff.whatchanged_--root_main} (97%)
rename t/t4013/{diff.whatchanged_-SF_-p_master => diff.whatchanged_-SF_-p_main} (89%)
rename t/t4013/{diff.whatchanged_-SF_master => diff.whatchanged_-SF_main} (86%)
rename t/t4013/{diff.whatchanged_-p_master => diff.whatchanged_-p_main} (98%)
rename t/t4013/{diff.whatchanged_master => diff.whatchanged_main} (97%)
--
2.49.0.897.gfad3eb7d210
^ permalink raw reply [flat|nested] 56+ messages in thread* [PATCH 1/6] t0018: switch default branch name to main 2025-08-27 15:24 [PATCH 0/6] breaking changes: switch default initial branch name to "main" Phillip Wood @ 2025-08-27 15:24 ` Phillip Wood 2025-08-27 17:21 ` Junio C Hamano 2025-08-27 15:24 ` [PATCH 2/6] t4013: " Phillip Wood ` (7 subsequent siblings) 8 siblings, 1 reply; 56+ messages in thread From: Phillip Wood @ 2025-08-27 15:24 UTC (permalink / raw) To: git; +Cc: Johannes Schindelin, Wing Huang, Phillip Wood From: Phillip Wood <phillip.wood@dunelm.org.uk> These tests use "trunk" as the default branch name but the exact name of the branch is incidental to testing if the advice message includes it. Git 3.0 will change the default branch name to "main" and remove support for GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME so change these test to use "main" instead of "topic". Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- t/t0018-advice.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t0018-advice.sh b/t/t0018-advice.sh index f68e08d0b14..c695ade4be8 100755 --- a/t/t0018-advice.sh +++ b/t/t0018-advice.sh @@ -2,7 +2,7 @@ test_description='Test advise_if_enabled functionality' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=trunk +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -33,7 +33,7 @@ test_expect_success 'advice should not be printed when config variable is set to test_expect_success 'advice should not be printed when --no-advice is used' ' q_to_tab >expect <<-\EOF && - On branch trunk + On branch main No commits yet @@ -55,7 +55,7 @@ test_expect_success 'advice should not be printed when --no-advice is used' ' test_expect_success 'advice should not be printed when GIT_ADVICE is set to false' ' q_to_tab >expect <<-\EOF && - On branch trunk + On branch main No commits yet @@ -77,7 +77,7 @@ test_expect_success 'advice should not be printed when GIT_ADVICE is set to fals test_expect_success 'advice should be printed when GIT_ADVICE is set to true' ' q_to_tab >expect <<-\EOF && - On branch trunk + On branch main No commits yet -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply related [flat|nested] 56+ messages in thread
* Re: [PATCH 1/6] t0018: switch default branch name to main 2025-08-27 15:24 ` [PATCH 1/6] t0018: switch default branch name to main Phillip Wood @ 2025-08-27 17:21 ` Junio C Hamano 2025-08-28 14:00 ` Phillip Wood 0 siblings, 1 reply; 56+ messages in thread From: Junio C Hamano @ 2025-08-27 17:21 UTC (permalink / raw) To: Phillip Wood; +Cc: git, Johannes Schindelin, Wing Huang Phillip Wood <phillip.wood123@gmail.com> writes: > From: Phillip Wood <phillip.wood@dunelm.org.uk> > > These tests use "trunk" as the default branch name but the exact > name of the branch is incidental to testing if the advice message > includes it. ... Would't we be better prepared for a future where advice messages may start including the current branch name, though, if we made sure we are on the branch whose name is known? > ... Git 3.0 will change the default branch name to "main" > and remove support for GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME so change Will it? I would have expected and hoped that this support won't be ripped out. The political atomosphere to decide if a name is "correct" will change over time. When somebody comes up with a reason to burn 'main', just like everybody moved out of 'master' a few years ago, wouldn't we be better off to keep this mechanism? If we truly believe that we have chosen the forever-perfect name that nobody would ever bring up renaming again, we can rip the support out. But I am not that optimistic. > these test to use "main" instead of "topic". You meant "trunk" here. > Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> > --- > t/t0018-advice.sh | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/t/t0018-advice.sh b/t/t0018-advice.sh > index f68e08d0b14..c695ade4be8 100755 > --- a/t/t0018-advice.sh > +++ b/t/t0018-advice.sh > @@ -2,7 +2,7 @@ > > test_description='Test advise_if_enabled functionality' > > -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=trunk > +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main > export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME > > . ./test-lib.sh > @@ -33,7 +33,7 @@ test_expect_success 'advice should not be printed when config variable is set to > > test_expect_success 'advice should not be printed when --no-advice is used' ' > q_to_tab >expect <<-\EOF && > - On branch trunk > + On branch main > > No commits yet > > @@ -55,7 +55,7 @@ test_expect_success 'advice should not be printed when --no-advice is used' ' > > test_expect_success 'advice should not be printed when GIT_ADVICE is set to false' ' > q_to_tab >expect <<-\EOF && > - On branch trunk > + On branch main > > No commits yet > > @@ -77,7 +77,7 @@ test_expect_success 'advice should not be printed when GIT_ADVICE is set to fals > > test_expect_success 'advice should be printed when GIT_ADVICE is set to true' ' > q_to_tab >expect <<-\EOF && > - On branch trunk > + On branch main > > No commits yet ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH 1/6] t0018: switch default branch name to main 2025-08-27 17:21 ` Junio C Hamano @ 2025-08-28 14:00 ` Phillip Wood 2025-08-28 16:49 ` Junio C Hamano 0 siblings, 1 reply; 56+ messages in thread From: Phillip Wood @ 2025-08-28 14:00 UTC (permalink / raw) To: Junio C Hamano; +Cc: git, Johannes Schindelin, Wing Huang Hi Junio On 27/08/2025 18:21, Junio C Hamano wrote: > Phillip Wood <phillip.wood123@gmail.com> writes: > >> From: Phillip Wood <phillip.wood@dunelm.org.uk> >> >> These tests use "trunk" as the default branch name but the exact >> name of the branch is incidental to testing if the advice message >> includes it. ... > > Would't we be better prepared for a future where advice messages may > start including the current branch name, though, if we made sure we > are on the branch whose name is known? The advice message does include the current branch name, that's why the test needs to be updated when we change that name from "trunk" to "main". The sentence above is trying to say that it does not matter what that name is, we just need to check it appears in the advice message. I could see an argument for the tests not depending on git's default branch name if it changed frequently but realistically we're unlikely to change in again in the near future. If we did use a different name in the tests it is just as likely to cause objections and need to be changed as git's default name so I'm not sure it gains us much. >> ... Git 3.0 will change the default branch name to "main" >> and remove support for GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME so change > > Will it? I would have expected and hoped that this support won't be > ripped out. The political atomosphere to decide if a name is > "correct" will change over time. When somebody comes up with a > reason to burn 'main', just like everybody moved out of 'master' a > few years ago, wouldn't we be better off to keep this mechanism? > > If we truly believe that we have chosen the forever-perfect name > that nobody would ever bring up renaming again, we can rip the > support out. But I am not that optimistic. If it's another 20 years until we change the default branch is it really worth supporting this variable until then? I find setting it in tests is mostly pointless boilerplate. When the variable was introduced in 704fed9ea22 (tests: start moving to a different default main branch name, 2020-10-23) it was described as "This `GIT_TEST_*` variable is meant purely for the transitional period while the entire test suite is converted to use `main` as the initial branch name by default." so I was hoping we could remove it. >> these test to use "main" instead of "topic". > > You meant "trunk" here. Will fix Thanks Phillip >> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> >> --- >> t/t0018-advice.sh | 8 ++++---- >> 1 file changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/t/t0018-advice.sh b/t/t0018-advice.sh >> index f68e08d0b14..c695ade4be8 100755 >> --- a/t/t0018-advice.sh >> +++ b/t/t0018-advice.sh >> @@ -2,7 +2,7 @@ >> >> test_description='Test advise_if_enabled functionality' >> >> -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=trunk >> +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main >> export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME >> >> . ./test-lib.sh >> @@ -33,7 +33,7 @@ test_expect_success 'advice should not be printed when config variable is set to >> >> test_expect_success 'advice should not be printed when --no-advice is used' ' >> q_to_tab >expect <<-\EOF && >> - On branch trunk >> + On branch main >> >> No commits yet >> >> @@ -55,7 +55,7 @@ test_expect_success 'advice should not be printed when --no-advice is used' ' >> >> test_expect_success 'advice should not be printed when GIT_ADVICE is set to false' ' >> q_to_tab >expect <<-\EOF && >> - On branch trunk >> + On branch main >> >> No commits yet >> >> @@ -77,7 +77,7 @@ test_expect_success 'advice should not be printed when GIT_ADVICE is set to fals >> >> test_expect_success 'advice should be printed when GIT_ADVICE is set to true' ' >> q_to_tab >expect <<-\EOF && >> - On branch trunk >> + On branch main >> >> No commits yet ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH 1/6] t0018: switch default branch name to main 2025-08-28 14:00 ` Phillip Wood @ 2025-08-28 16:49 ` Junio C Hamano 2025-08-28 21:31 ` brian m. carlson 0 siblings, 1 reply; 56+ messages in thread From: Junio C Hamano @ 2025-08-28 16:49 UTC (permalink / raw) To: Phillip Wood; +Cc: git, Johannes Schindelin, Wing Huang Phillip Wood <phillip.wood123@gmail.com> writes: >>> These tests use "trunk" as the default branch name but the exact >>> name of the branch is incidental to testing if the advice message >>> includes it. ... >> Would't we be better prepared for a future where advice messages may >> start including the current branch name, though, if we made sure we >> are on the branch whose name is known? > > The advice message does include the current branch name, that's why > the test needs to be updated when we change that name from "trunk" to > "main". The sentence above is trying to say that it does not matter > what that name is, we just need to check it appears in the advice > message. That makes 100% sense. > I could see an argument for the tests not depending on git's > default branch name if it changed frequently but realistically we're > unlikely to change in again in the near future. A test that automatically adjusts to the then-current default so that we do not have to worry about what it is is much better than a test that needs constant maintenance every 10 years. A test that uses one fixed name is slightly worse than auto-adjusting one, but is still far better as it is maintenance-free. Hardwiring a name the test uses does have one distinct advantage, i.e., it serves as a documentation that the test vector depends on the branch name, making it clear where the thing that the test expects comes from. > If we did use a different name in the tests it is just as likely > to cause objections and need to be changed as git's default name > so I'm not sure it gains us much. I do not quite understand. Do you mean in 20 years some animal rights activists object that 'trunk' is offensive to elephants and we will be forced to change? As I do not see the difference between 'main' and 'trunk' about how likely either of them get such complaint against, I can live with hardwiring the branch name used in the test 'main', but then 'trunk' would equally work well, so unless there are other things the patch changes, I do not quite see much point in this patch. [Footnote] By the way, I do appreciate the "let's switch the default as promised at the major version boundary", the primary theme of this topic. I think we have done enough prep work to ensure that the result would work without disruption with existing projects by ensuring that (1) existing user repositories can keep working, as this is only about the initial branch name, (2) existing project repositories cloned anew will keep working as before, as we follow what the upstream does. One thing that is missing is probably a way to remotely create a symref (or repoint one). As it would break existing users if an upstream suddenly switches its 'master' to 'main', the second best thing to do is to ensure that they always point at the same commit, and the natural way to do so is to $ git symbolic-ref refs/heads/main refs/heads/master but we cannot do so remotely. I've been doing the third best thing since late November 2021, which is to push to both at the same time, which is ugly but https://git.kernel.org/pub/scm/git/git.git/ and other mirrors may tell you that both are available. All other mirrors do not have CI attached to them, and they have been running with both 'main' and 'master' pointing at the same commit for quite some time, but https://github.com/git/git/ does not have 'main'; I attempted back when I arranged to do the "push to both" back in November 2021, but it caused two CI jobs on 'master' and 'main' run on the identical sources simultanously, wasting resources, every time the topics graduated, so I stopped doing so. Perhaps tweaking the .github/workflows/main.yml file a bit and explicitly excluding either one of these two identical branches would be what it takes, but it would probably be a multi-step process, to (1) tell it to ignore the 'main' branch, (2) start pushing to 'main' in addition to 'master', and then finally (3) flip the CI config to tell it to ignore the 'master' branch instead. ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH 1/6] t0018: switch default branch name to main 2025-08-28 16:49 ` Junio C Hamano @ 2025-08-28 21:31 ` brian m. carlson 0 siblings, 0 replies; 56+ messages in thread From: brian m. carlson @ 2025-08-28 21:31 UTC (permalink / raw) To: Junio C Hamano; +Cc: Phillip Wood, git, Johannes Schindelin, Wing Huang [-- Attachment #1: Type: text/plain, Size: 1072 bytes --] On 2025-08-28 at 16:49:35, Junio C Hamano wrote: > One thing that is missing is probably a way to remotely create a > symref (or repoint one). As it would break existing users if an > upstream suddenly switches its 'master' to 'main', the second best > thing to do is to ensure that they always point at the same commit, > and the natural way to do so is to > > $ git symbolic-ref refs/heads/main refs/heads/master > > but we cannot do so remotely. I've been doing the third best thing > since late November 2021, which is to push to both at the same time, > which is ugly but https://git.kernel.org/pub/scm/git/git.git/ and > other mirrors may tell you that both are available. Yes, this would be a nice feature to have. Oftentimes forges have external functionality that needs to hook in to name changes, so they might not choose to enable such an option, at least at first, but users using things like Gitolite or simply bare repositories over SSH might find this to be very useful. -- brian m. carlson (they/them) Toronto, Ontario, CA [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 262 bytes --] ^ permalink raw reply [flat|nested] 56+ messages in thread
* [PATCH 2/6] t4013: switch default branch name to main 2025-08-27 15:24 [PATCH 0/6] breaking changes: switch default initial branch name to "main" Phillip Wood 2025-08-27 15:24 ` [PATCH 1/6] t0018: switch default branch name to main Phillip Wood @ 2025-08-27 15:24 ` Phillip Wood 2025-08-27 15:24 ` [PATCH 3/6] t9902: " Phillip Wood ` (6 subsequent siblings) 8 siblings, 0 replies; 56+ messages in thread From: Phillip Wood @ 2025-08-27 15:24 UTC (permalink / raw) To: git; +Cc: Johannes Schindelin, Wing Huang, Phillip Wood From: Phillip Wood <phillip.wood@dunelm.org.uk> In preparation for removing TEST_GIT_DEFAULT_INITIAL_BRANCH in Git 3.0 switch the default branch name to main. The changes here are purely mechanical replacing 'master' with 'main' Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- t/t4013-diff-various.sh | 228 +++++++++--------- ...ree_--cc_--patch-with-stat_--summary_main} | 2 +- ...iff.diff-tree_--cc_--patch-with-stat_main} | 2 +- ...r => diff.diff-tree_--cc_--shortstat_main} | 2 +- ...diff.diff-tree_--cc_--stat_--summary_main} | 2 +- ...master => diff.diff-tree_--cc_--stat_main} | 2 +- ...e_--cc_master => diff.diff-tree_--cc_main} | 2 +- ...master => diff.diff-tree_-c_--abbrev_main} | 2 +- ...> diff.diff-tree_-c_--stat_--summary_main} | 2 +- ...t_master => diff.diff-tree_-c_--stat_main} | 2 +- ...-tree_-c_master => diff.diff-tree_-c_main} | 2 +- ...-tree_-m_master => diff.diff-tree_-m_main} | 2 +- ...-p_-m_master => diff.diff-tree_-p_-m_main} | 2 +- t/t4013/diff.diff-tree_-p_main | 2 + t/t4013/diff.diff-tree_-p_master | 2 - t/t4013/diff.diff-tree_main | 2 + t/t4013/diff.diff-tree_master | 2 - t/t4013/diff.diff_--dirstat_--cc_main~1_main | 3 + .../diff.diff_--dirstat_--cc_master~1_master | 3 - t/t4013/diff.diff_--dirstat_main~1_main~2 | 3 + t/t4013/diff.diff_--dirstat_master~1_master~2 | 3 - ...ff.diff_--line-prefix=abc_main_main^_side} | 2 +- ...master^_side => diff.diff_main_main^_side} | 2 +- ...mat-patch_--attach_--stdout_initial..main} | 2 +- ...at-patch_--attach_--stdout_initial..main^} | 2 +- ...e_--stdout_--numbered-files_initial..main} | 2 +- ...t_--subject-prefix=TESTCASE_initial..main} | 2 +- ...mat-patch_--inline_--stdout_initial..main} | 2 +- ...at-patch_--inline_--stdout_initial..main^} | 2 +- ...t-patch_--inline_--stdout_initial..main^^} | 2 +- ...--stdout_--cover-letter_-n_initial..main^} | 2 +- ...atch_--stdout_--no-numbered_initial..main} | 2 +- ...t-patch_--stdout_--numbered_initial..main} | 2 +- ... diff.format-patch_--stdout_initial..main} | 2 +- ...diff.format-patch_--stdout_initial..main^} | 2 +- ..._-m_-p_master => diff.log_--cc_-m_-p_main} | 2 +- t/t4013/diff.log_--decorate=full_--all | 2 +- ..._--decorate=full_--clear-decorations_--all | 2 +- ...f.log_--decorate=full_--decorate-all_--all | 2 +- t/t4013/diff.log_--decorate_--all | 2 +- ...f.log_--decorate_--clear-decorations_--all | 2 +- .../diff.log_--decorate_--decorate-all_--all | 2 +- ... diff.log_--diff-merges=first-parent_main} | 2 +- ..._--diff-merges=off_-p_--first-parent_main} | 2 +- ..._--first-parent_--diff-merges=off_-p_main} | 2 +- ...g_--no-diff-merges_-p_--first-parent_main} | 2 +- ..._--patch-with-stat_--summary_main_--_dir_} | 2 +- ...master => diff.log_--patch-with-stat_main} | 2 +- ...> diff.log_--patch-with-stat_main_--_dir_} | 2 +- ...oot_--cc_--patch-with-stat_--summary_main} | 2 +- ...g_--root_--patch-with-stat_--summary_main} | 2 +- ...=> diff.log_--root_--patch-with-stat_main} | 2 +- ...-root_-c_--patch-with-stat_--summary_main} | 2 +- ...root_-p_master => diff.log_--root_-p_main} | 2 +- ...log_--root_master => diff.log_--root_main} | 2 +- ...ter => diff.log_-GF_-p_--pickaxe-all_main} | 2 +- ...log_-GF_-p_master => diff.log_-GF_-p_main} | 2 +- ...{diff.log_-SF_master => diff.log_-GF_main} | 2 +- ...aster => diff.log_-IA_-IB_-I1_-I2_-p_main} | 2 +- ...log_-SF_-p_master => diff.log_-SF_-p_main} | 2 +- ...{diff.log_-GF_master => diff.log_-SF_main} | 2 +- t/t4013/diff.log_-SF_main_--max-count=0 | 2 + ...ount=2 => diff.log_-SF_main_--max-count=1} | 2 +- t/t4013/diff.log_-SF_main_--max-count=2 | 7 + t/t4013/diff.log_-SF_master_--max-count=0 | 2 - t/t4013/diff.log_-SF_master_--max-count=1 | 7 - ...iff.log_-S_F_master => diff.log_-S_F_main} | 2 +- ...cc_-m_-p_master => diff.log_-c_-m_-p_main} | 2 +- ...-m_--raw_master => diff.log_-m_--raw_main} | 2 +- ..._--stat_master => diff.log_-m_--stat_main} | 2 +- ...ter => diff.log_-m_-p_--first-parent_main} | 2 +- ...f.log_-m_-p_master => diff.log_-m_-p_main} | 2 +- ...ff.log_-p_--diff-merges=first-parent_main} | 2 +- ...master => diff.log_-p_--first-parent_main} | 2 +- .../{diff.log_-p_master => diff.log_-p_main} | 2 +- t/t4013/{diff.log_master => diff.log_main} | 2 +- ...iff.noellipses-diff-tree_-c_--abbrev_main} | 2 +- ...> diff.noellipses-whatchanged_--root_main} | 2 +- ...r => diff.noellipses-whatchanged_-SF_main} | 2 +- ...aster => diff.noellipses-whatchanged_main} | 2 +- ...t_master => diff.show_--first-parent_main} | 2 +- ...{diff.show_-c_master => diff.show_-c_main} | 2 +- ...{diff.show_-m_master => diff.show_-m_main} | 2 +- t/t4013/{diff.show_master => diff.show_main} | 2 +- ..._--patch-with-stat_--summary_main_--_dir_} | 2 +- ...> diff.whatchanged_--patch-with-stat_main} | 2 +- ...hatchanged_--patch-with-stat_main_--_dir_} | 2 +- ...oot_--cc_--patch-with-stat_--summary_main} | 2 +- ...d_--root_--patch-with-stat_--summary_main} | 2 +- ...whatchanged_--root_--patch-with-stat_main} | 2 +- ...-root_-c_--patch-with-stat_--summary_main} | 2 +- ...master => diff.whatchanged_--root_-p_main} | 2 +- ...ot_master => diff.whatchanged_--root_main} | 2 +- ...-p_master => diff.whatchanged_-SF_-p_main} | 2 +- ...d_-SF_master => diff.whatchanged_-SF_main} | 2 +- ...ged_-p_master => diff.whatchanged_-p_main} | 2 +- ...atchanged_master => diff.whatchanged_main} | 2 +- 97 files changed, 217 insertions(+), 217 deletions(-) rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_--summary_master => diff.diff-tree_--cc_--patch-with-stat_--summary_main} (86%) rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_master => diff.diff-tree_--cc_--patch-with-stat_main} (89%) rename t/t4013/{diff.diff-tree_--cc_--shortstat_master => diff.diff-tree_--cc_--shortstat_main} (65%) rename t/t4013/{diff.diff-tree_-c_--stat_--summary_master => diff.diff-tree_--cc_--stat_--summary_main} (71%) rename t/t4013/{diff.diff-tree_-c_--stat_master => diff.diff-tree_--cc_--stat_main} (76%) rename t/t4013/{diff.diff-tree_--cc_master => diff.diff-tree_--cc_main} (91%) rename t/t4013/{diff.diff-tree_-c_--abbrev_master => diff.diff-tree_-c_--abbrev_main} (83%) rename t/t4013/{diff.diff-tree_--cc_--stat_--summary_master => diff.diff-tree_-c_--stat_--summary_main} (70%) rename t/t4013/{diff.diff-tree_--cc_--stat_master => diff.diff-tree_-c_--stat_main} (75%) rename t/t4013/{diff.diff-tree_-c_master => diff.diff-tree_-c_main} (93%) rename t/t4013/{diff.diff-tree_-m_master => diff.diff-tree_-m_main} (96%) rename t/t4013/{diff.diff-tree_-p_-m_master => diff.diff-tree_-p_-m_main} (97%) create mode 100644 t/t4013/diff.diff-tree_-p_main delete mode 100644 t/t4013/diff.diff-tree_-p_master create mode 100644 t/t4013/diff.diff-tree_main delete mode 100644 t/t4013/diff.diff-tree_master create mode 100644 t/t4013/diff.diff_--dirstat_--cc_main~1_main delete mode 100644 t/t4013/diff.diff_--dirstat_--cc_master~1_master create mode 100644 t/t4013/diff.diff_--dirstat_main~1_main~2 delete mode 100644 t/t4013/diff.diff_--dirstat_master~1_master~2 rename t/t4013/{diff.diff_--line-prefix=abc_master_master^_side => diff.diff_--line-prefix=abc_main_main^_side} (87%) rename t/t4013/{diff.diff_master_master^_side => diff.diff_main_main^_side} (89%) rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master => diff.format-patch_--attach_--stdout_initial..main} (98%) rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master^ => diff.format-patch_--attach_--stdout_initial..main^} (97%) rename t/t4013/{diff.format-patch_--inline_--stdout_--numbered-files_initial..master => diff.format-patch_--inline_--stdout_--numbered-files_initial..main} (99%) rename t/t4013/{diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master => diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main} (99%) rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master => diff.format-patch_--inline_--stdout_initial..main} (98%) rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^ => diff.format-patch_--inline_--stdout_initial..main^} (97%) rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^^ => diff.format-patch_--inline_--stdout_initial..main^^} (95%) rename t/t4013/{diff.format-patch_--stdout_--cover-letter_-n_initial..master^ => diff.format-patch_--stdout_--cover-letter_-n_initial..main^} (96%) rename t/t4013/{diff.format-patch_--stdout_--no-numbered_initial..master => diff.format-patch_--stdout_--no-numbered_initial..main} (97%) rename t/t4013/{diff.format-patch_--stdout_--numbered_initial..master => diff.format-patch_--stdout_--numbered_initial..main} (97%) rename t/t4013/{diff.format-patch_--stdout_initial..master => diff.format-patch_--stdout_initial..main} (97%) rename t/t4013/{diff.format-patch_--stdout_initial..master^ => diff.format-patch_--stdout_initial..main^} (96%) rename t/t4013/{diff.log_-c_-m_-p_master => diff.log_--cc_-m_-p_main} (99%) rename t/t4013/{diff.log_--diff-merges=first-parent_master => diff.log_--diff-merges=first-parent_main} (95%) rename t/t4013/{diff.log_--no-diff-merges_-p_--first-parent_master => diff.log_--diff-merges=off_-p_--first-parent_main} (95%) rename t/t4013/{diff.log_--first-parent_--diff-merges=off_-p_master => diff.log_--first-parent_--diff-merges=off_-p_main} (95%) rename t/t4013/{diff.log_--diff-merges=off_-p_--first-parent_master => diff.log_--no-diff-merges_-p_--first-parent_main} (95%) rename t/t4013/{diff.log_--patch-with-stat_--summary_master_--_dir_ => diff.log_--patch-with-stat_--summary_main_--_dir_} (96%) rename t/t4013/{diff.log_--patch-with-stat_master => diff.log_--patch-with-stat_main} (98%) rename t/t4013/{diff.log_--patch-with-stat_master_--_dir_ => diff.log_--patch-with-stat_main_--_dir_} (96%) rename t/t4013/{diff.log_--root_--cc_--patch-with-stat_--summary_master => diff.log_--root_--cc_--patch-with-stat_--summary_main} (98%) rename t/t4013/{diff.log_--root_--patch-with-stat_--summary_master => diff.log_--root_--patch-with-stat_--summary_main} (98%) rename t/t4013/{diff.log_--root_--patch-with-stat_master => diff.log_--root_--patch-with-stat_main} (98%) rename t/t4013/{diff.log_--root_-c_--patch-with-stat_--summary_master => diff.log_--root_-c_--patch-with-stat_--summary_main} (98%) rename t/t4013/{diff.log_--root_-p_master => diff.log_--root_-p_main} (98%) rename t/t4013/{diff.log_--root_master => diff.log_--root_main} (96%) rename t/t4013/{diff.log_-GF_-p_--pickaxe-all_master => diff.log_-GF_-p_--pickaxe-all_main} (90%) rename t/t4013/{diff.log_-GF_-p_master => diff.log_-GF_-p_main} (91%) rename t/t4013/{diff.log_-SF_master => diff.log_-GF_main} (86%) rename t/t4013/{diff.log_-IA_-IB_-I1_-I2_-p_master => diff.log_-IA_-IB_-I1_-I2_-p_main} (97%) rename t/t4013/{diff.log_-SF_-p_master => diff.log_-SF_-p_main} (91%) rename t/t4013/{diff.log_-GF_master => diff.log_-SF_main} (86%) create mode 100644 t/t4013/diff.log_-SF_main_--max-count=0 rename t/t4013/{diff.log_-SF_master_--max-count=2 => diff.log_-SF_main_--max-count=1} (79%) create mode 100644 t/t4013/diff.log_-SF_main_--max-count=2 delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=0 delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=1 rename t/t4013/{diff.log_-S_F_master => diff.log_-S_F_main} (86%) rename t/t4013/{diff.log_--cc_-m_-p_master => diff.log_-c_-m_-p_main} (99%) rename t/t4013/{diff.log_-m_--raw_master => diff.log_-m_--raw_main} (98%) rename t/t4013/{diff.log_-m_--stat_master => diff.log_-m_--stat_main} (98%) rename t/t4013/{diff.log_-m_-p_--first-parent_master => diff.log_-m_-p_--first-parent_main} (97%) rename t/t4013/{diff.log_-m_-p_master => diff.log_-m_-p_main} (99%) rename t/t4013/{diff.log_-p_--diff-merges=first-parent_master => diff.log_-p_--diff-merges=first-parent_main} (97%) rename t/t4013/{diff.log_-p_--first-parent_master => diff.log_-p_--first-parent_main} (97%) rename t/t4013/{diff.log_-p_master => diff.log_-p_main} (98%) rename t/t4013/{diff.log_master => diff.log_main} (97%) rename t/t4013/{diff.noellipses-diff-tree_-c_--abbrev_master => diff.noellipses-diff-tree_-c_--abbrev_main} (81%) rename t/t4013/{diff.noellipses-whatchanged_--root_master => diff.noellipses-whatchanged_--root_main} (96%) rename t/t4013/{diff.noellipses-whatchanged_-SF_master => diff.noellipses-whatchanged_-SF_main} (86%) rename t/t4013/{diff.noellipses-whatchanged_master => diff.noellipses-whatchanged_main} (96%) rename t/t4013/{diff.show_--first-parent_master => diff.show_--first-parent_main} (92%) rename t/t4013/{diff.show_-c_master => diff.show_-c_main} (95%) rename t/t4013/{diff.show_-m_master => diff.show_-m_main} (98%) rename t/t4013/{diff.show_master => diff.show_main} (96%) rename t/t4013/{diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ => diff.whatchanged_--patch-with-stat_--summary_main_--_dir_} (94%) rename t/t4013/{diff.whatchanged_--patch-with-stat_master => diff.whatchanged_--patch-with-stat_main} (97%) rename t/t4013/{diff.whatchanged_--patch-with-stat_master_--_dir_ => diff.whatchanged_--patch-with-stat_main_--_dir_} (94%) rename t/t4013/{diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master => diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main} (97%) rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_--summary_master => diff.whatchanged_--root_--patch-with-stat_--summary_main} (97%) rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_master => diff.whatchanged_--root_--patch-with-stat_main} (97%) rename t/t4013/{diff.whatchanged_--root_-c_--patch-with-stat_--summary_master => diff.whatchanged_--root_-c_--patch-with-stat_--summary_main} (97%) rename t/t4013/{diff.whatchanged_--root_-p_master => diff.whatchanged_--root_-p_main} (98%) rename t/t4013/{diff.whatchanged_--root_master => diff.whatchanged_--root_main} (97%) rename t/t4013/{diff.whatchanged_-SF_-p_master => diff.whatchanged_-SF_-p_main} (89%) rename t/t4013/{diff.whatchanged_-SF_master => diff.whatchanged_-SF_main} (86%) rename t/t4013/{diff.whatchanged_-p_master => diff.whatchanged_-p_main} (98%) rename t/t4013/{diff.whatchanged_master => diff.whatchanged_main} (97%) diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index cfeec239e09..55a06eadb31 100755 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@ -5,7 +5,7 @@ test_description='Various diff formatting options' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -70,7 +70,7 @@ test_expect_success setup ' GIT_COMMITTER_DATE="2006-06-26 00:04:00 +0000" && export GIT_AUTHOR_DATE GIT_COMMITTER_DATE && - git checkout master && + git checkout main && git pull -s ours --no-rebase . side && GIT_AUTHOR_DATE="2006-06-26 00:05:00 +0000" && @@ -95,15 +95,15 @@ test_expect_success setup ' test_write_lines B A >dir/sub && git add dir/sub && git commit -m "Rearranged lines in dir/sub" && - git checkout master && + git checkout main && GIT_AUTHOR_DATE="2006-06-26 00:06:00 +0000" && GIT_COMMITTER_DATE="2006-06-26 00:06:00 +0000" && export GIT_AUTHOR_DATE GIT_COMMITTER_DATE && git checkout -b mode initial && git update-index --chmod=+x file0 && git commit -m "update mode" && - git checkout -f master && + git checkout -f main && GIT_AUTHOR_DATE="2006-06-26 00:06:00 +0000" && GIT_COMMITTER_DATE="2006-06-26 00:06:00 +0000" && @@ -112,12 +112,12 @@ test_expect_success setup ' git update-index --chmod=+x file2 && git commit -m "update mode (file2)" && git notes add -m "note" && - git checkout -f master && + git checkout -f main && - # Same merge as master, but with parents reversed. Hide it in a + # Same merge as main, but with parents reversed. Hide it in a # pseudo-ref to avoid impacting tests with --all. commit=$(echo reverse | - git commit-tree -p master^2 -p master^1 master^{tree}) && + git commit-tree -p main^2 -p main^1 main^{tree}) && git update-ref REVERSE $commit && git config diff.renames false && @@ -127,15 +127,15 @@ test_expect_success setup ' : <<\EOF ! [initial] Initial - * [master] Merge branch 'side' + * [main] Merge branch 'side' ! [rearrange] Rearranged lines in dir/sub ! [side] Side ---- + [rearrange] Rearranged lines in dir/sub - - [master] Merge branch 'side' + - [main] Merge branch 'side' * + [side] Side - * [master^] Third - * [master~2] Second + * [main^] Third + * [main~2] Second +*++ [initial] Initial EOF @@ -311,64 +311,64 @@ diff-tree initial mode diff-tree --stat initial mode diff-tree --summary initial mode -diff-tree master -diff-tree -m master -diff-tree -p master -diff-tree -p -m master -diff-tree -c master -diff-tree -c --abbrev master -:noellipses diff-tree -c --abbrev master -diff-tree --cc master +diff-tree main +diff-tree -m main +diff-tree -p main +diff-tree -p -m main +diff-tree -c main +diff-tree -c --abbrev main +:noellipses diff-tree -c --abbrev main +diff-tree --cc main # stat only should show the diffstat with the first parent -diff-tree -c --stat master -diff-tree --cc --stat master -diff-tree -c --stat --summary master -diff-tree --cc --stat --summary master +diff-tree -c --stat main +diff-tree --cc --stat main +diff-tree -c --stat --summary main +diff-tree --cc --stat --summary main # stat summary should show the diffstat and summary with the first parent diff-tree -c --stat --summary side diff-tree --cc --stat --summary side -diff-tree --cc --shortstat master +diff-tree --cc --shortstat main diff-tree --cc --summary REVERSE # improved by Timo's patch -diff-tree --cc --patch-with-stat master +diff-tree --cc --patch-with-stat main # improved by Timo's patch -diff-tree --cc --patch-with-stat --summary master +diff-tree --cc --patch-with-stat --summary main # this is correct diff-tree --cc --patch-with-stat --summary side -log master -log -p master -log --root master -log --root -p master -log --patch-with-stat master -log --root --patch-with-stat master -log --root --patch-with-stat --summary master -# improved by Timo's patch -log --root -c --patch-with-stat --summary master -# improved by Timo's patch -log --root --cc --patch-with-stat --summary master -log --no-diff-merges -p --first-parent master -log --diff-merges=off -p --first-parent master -log --first-parent --diff-merges=off -p master -log -p --first-parent master -log -p --diff-merges=first-parent master -log --diff-merges=first-parent master -log -m -p --first-parent master -log -m -p master -log --cc -m -p master -log -c -m -p master -log -m --raw master -log -m --stat master -log -SF master -log -S F master -log -SF -p master -log -SF master --max-count=0 -log -SF master --max-count=1 -log -SF master --max-count=2 -log -GF master -log -GF -p master -log -GF -p --pickaxe-all master -log -IA -IB -I1 -I2 -p master +log main +log -p main +log --root main +log --root -p main +log --patch-with-stat main +log --root --patch-with-stat main +log --root --patch-with-stat --summary main +# improved by Timo's patch +log --root -c --patch-with-stat --summary main +# improved by Timo's patch +log --root --cc --patch-with-stat --summary main +log --no-diff-merges -p --first-parent main +log --diff-merges=off -p --first-parent main +log --first-parent --diff-merges=off -p main +log -p --first-parent main +log -p --diff-merges=first-parent main +log --diff-merges=first-parent main +log -m -p --first-parent main +log -m -p main +log --cc -m -p main +log -c -m -p main +log -m --raw main +log -m --stat main +log -SF main +log -S F main +log -SF -p main +log -SF main --max-count=0 +log -SF main --max-count=1 +log -SF main --max-count=2 +log -GF main +log -GF -p main +log -GF -p --pickaxe-all main +log -IA -IB -I1 -I2 -p main log --decorate --all log --decorate=full --all log --decorate --clear-decorations --all @@ -377,35 +377,35 @@ log --decorate=full --clear-decorations --all rev-list --parents HEAD rev-list --children HEAD -whatchanged master -:noellipses whatchanged master -whatchanged -p master -whatchanged --root master -:noellipses whatchanged --root master -whatchanged --root -p master -whatchanged --patch-with-stat master -whatchanged --root --patch-with-stat master -whatchanged --root --patch-with-stat --summary master -# improved by Timo's patch -whatchanged --root -c --patch-with-stat --summary master -# improved by Timo's patch -whatchanged --root --cc --patch-with-stat --summary master -whatchanged -SF master -:noellipses whatchanged -SF master -whatchanged -SF -p master +whatchanged main +:noellipses whatchanged main +whatchanged -p main +whatchanged --root main +:noellipses whatchanged --root main +whatchanged --root -p main +whatchanged --patch-with-stat main +whatchanged --root --patch-with-stat main +whatchanged --root --patch-with-stat --summary main +# improved by Timo's patch +whatchanged --root -c --patch-with-stat --summary main +# improved by Timo's patch +whatchanged --root --cc --patch-with-stat --summary main +whatchanged -SF main +:noellipses whatchanged -SF main +whatchanged -SF -p main -log --patch-with-stat master -- dir/ -whatchanged --patch-with-stat master -- dir/ -log --patch-with-stat --summary master -- dir/ -whatchanged --patch-with-stat --summary master -- dir/ +log --patch-with-stat main -- dir/ +whatchanged --patch-with-stat main -- dir/ +log --patch-with-stat --summary main -- dir/ +whatchanged --patch-with-stat --summary main -- dir/ show initial show --root initial show side -show master -show -c master -show -m master -show --first-parent master +show main +show -c main +show -m main +show --first-parent main show --stat side show --stat --summary side show --patch-with-stat side @@ -414,22 +414,22 @@ show --patch-with-raw side show --patch-with-stat --summary side format-patch --stdout initial..side -format-patch --stdout initial..master^ -format-patch --stdout initial..master -format-patch --stdout --no-numbered initial..master -format-patch --stdout --numbered initial..master +format-patch --stdout initial..main^ +format-patch --stdout initial..main +format-patch --stdout --no-numbered initial..main +format-patch --stdout --numbered initial..main format-patch --attach --stdout initial..side format-patch --attach --stdout --suffix=.diff initial..side -format-patch --attach --stdout initial..master^ -format-patch --attach --stdout initial..master +format-patch --attach --stdout initial..main^ +format-patch --attach --stdout initial..main format-patch --inline --stdout initial..side -format-patch --inline --stdout initial..master^ -format-patch --inline --stdout --numbered-files initial..master -format-patch --inline --stdout initial..master -format-patch --inline --stdout --subject-prefix=TESTCASE initial..master +format-patch --inline --stdout initial..main^ +format-patch --inline --stdout --numbered-files initial..main +format-patch --inline --stdout initial..main +format-patch --inline --stdout --subject-prefix=TESTCASE initial..main config format.subjectprefix DIFFERENT_PREFIX -format-patch --inline --stdout initial..master^^ -format-patch --stdout --cover-letter -n initial..master^ +format-patch --inline --stdout initial..main^^ +format-patch --stdout --cover-letter -n initial..main^ diff --abbrev initial..side diff -U initial..side @@ -448,13 +448,13 @@ diff --name-status dir2 dir diff --no-index --name-status dir2 dir diff --no-index --name-status -- dir2 dir diff --no-index dir dir3 -diff master master^ side +diff main main^ side # Can't use spaces... -diff --line-prefix=abc master master^ side -diff --dirstat master~1 master~2 +diff --line-prefix=abc main main^ side +diff --dirstat main~1 main~2 diff --dirstat initial rearrange diff --dirstat-by-file initial rearrange -diff --dirstat --cc master~1 master +diff --dirstat --cc main~1 main # No-index --abbrev and --no-abbrev diff --raw initial :noellipses diff --raw initial @@ -482,25 +482,25 @@ test_expect_success !WITH_BREAKING_CHANGES 'whatchanged needs --i-still-use-this ' test_expect_success 'log -m matches pure log' ' - git log master >result && + git log main >result && process_diffs result >expected && git log -m >result && process_diffs result >actual && test_cmp expected actual ' test_expect_success 'log --diff-merges=on matches --diff-merges=separate' ' - git log -p --diff-merges=separate master >result && + git log -p --diff-merges=separate main >result && process_diffs result >expected && - git log -p --diff-merges=on master >result && + git log -p --diff-merges=on main >result && process_diffs result >actual && test_cmp expected actual ' test_expect_success 'log --dd matches --diff-merges=1 -p' ' - git log --diff-merges=1 -p master >result && + git log --diff-merges=1 -p main >result && process_diffs result >expected && - git log --dd master >result && + git log --dd main >result && process_diffs result >actual && test_cmp expected actual ' @@ -511,19 +511,19 @@ test_expect_success 'deny wrong log.diffMerges config' ' ' test_expect_success 'git config log.diffMerges first-parent' ' - git log -p --diff-merges=first-parent master >result && + git log -p --diff-merges=first-parent main >result && process_diffs result >expected && test_config log.diffMerges first-parent && - git log -p --diff-merges=on master >result && + git log -p --diff-merges=on main >result && process_diffs result >actual && test_cmp expected actual ' test_expect_success 'git config log.diffMerges first-parent vs -m' ' - git log -p --diff-merges=first-parent master >result && + git log -p --diff-merges=first-parent main >result && process_diffs result >expected && test_config log.diffMerges first-parent && - git log -p -m master >result && + git log -p -m main >result && process_diffs result >actual && test_cmp expected actual ' @@ -572,7 +572,7 @@ test_expect_success 'diff-tree --stdin with log formatting' ' Third Second EOF - git rev-list master | git diff-tree --stdin --format=%s -s >actual && + git rev-list main | git diff-tree --stdin --format=%s -s >actual && test_cmp expect actual ' @@ -585,16 +585,16 @@ test_expect_success 'diff-tree --stdin with pathspec' ' dir/sub EOF - git rev-list master^ | + git rev-list main^ | git diff-tree -r --stdin --name-only --format=%s dir >actual && test_cmp expect actual ' test_expect_success 'show A B ... -- <pathspec>' ' # side touches dir/sub, file0, and file3 - # master^ touches dir/sub, and file1 - # master^^ touches dir/sub, file0, and file2 - git show --name-only --format="<%s>" side master^ master^^ -- dir >actual && + # main^ touches dir/sub, and file1 + # main^^ touches dir/sub, file0, and file2 + git show --name-only --format="<%s>" side main^ main^^ -- dir >actual && cat >expect <<-\EOF && <Side> @@ -610,7 +610,7 @@ test_expect_success 'show A B ... -- <pathspec>' ' ' test_expect_success 'diff -I<regex>: setup' ' - git checkout master && + git checkout main && test_seq 50 >file0 && git commit -m "Set up -I<regex> test file" file0 && test_seq 50 | sed -e "s/13/ten and three/" -e "/7\$/d" >file0 && diff --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 similarity index 86% rename from t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master rename to t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main index 9951e3677d6..af1cf20f4ca 100644 --- a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master +++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc --patch-with-stat --summary master +$ git diff-tree --cc --patch-with-stat --summary main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_master b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_main similarity index 89% rename from t/t4013/diff.diff-tree_--cc_--patch-with-stat_master rename to t/t4013/diff.diff-tree_--cc_--patch-with-stat_main index db3c0a7b2cc..0ec60420970 100644 --- a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_master +++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc --patch-with-stat master +$ git diff-tree --cc --patch-with-stat main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_--cc_--shortstat_master b/t/t4013/diff.diff-tree_--cc_--shortstat_main similarity index 65% rename from t/t4013/diff.diff-tree_--cc_--shortstat_master rename to t/t4013/diff.diff-tree_--cc_--shortstat_main index a4ca42df2a4..9a4ef031973 100644 --- a/t/t4013/diff.diff-tree_--cc_--shortstat_master +++ b/t/t4013/diff.diff-tree_--cc_--shortstat_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc --shortstat master +$ git diff-tree --cc --shortstat main 59d314ad6f356dd08601a4cd5e530381da3e3c64 2 files changed, 5 insertions(+) $ diff --git a/t/t4013/diff.diff-tree_-c_--stat_--summary_master b/t/t4013/diff.diff-tree_--cc_--stat_--summary_main similarity index 71% rename from t/t4013/diff.diff-tree_-c_--stat_--summary_master rename to t/t4013/diff.diff-tree_--cc_--stat_--summary_main index 81c3021541b..9db08a4aa96 100644 --- a/t/t4013/diff.diff-tree_-c_--stat_--summary_master +++ b/t/t4013/diff.diff-tree_--cc_--stat_--summary_main @@ -1,4 +1,4 @@ -$ git diff-tree -c --stat --summary master +$ git diff-tree --cc --stat --summary main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_-c_--stat_master b/t/t4013/diff.diff-tree_--cc_--stat_main similarity index 76% rename from t/t4013/diff.diff-tree_-c_--stat_master rename to t/t4013/diff.diff-tree_--cc_--stat_main index 89d59b15480..7ecc67a524e 100644 --- a/t/t4013/diff.diff-tree_-c_--stat_master +++ b/t/t4013/diff.diff-tree_--cc_--stat_main @@ -1,4 +1,4 @@ -$ git diff-tree -c --stat master +$ git diff-tree --cc --stat main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_--cc_master b/t/t4013/diff.diff-tree_--cc_main similarity index 91% rename from t/t4013/diff.diff-tree_--cc_master rename to t/t4013/diff.diff-tree_--cc_main index 5ecb4e14ae4..1a962856ad4 100644 --- a/t/t4013/diff.diff-tree_--cc_master +++ b/t/t4013/diff.diff-tree_--cc_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc master +$ git diff-tree --cc main 59d314ad6f356dd08601a4cd5e530381da3e3c64 diff --cc dir/sub index cead32e,7289e35..992913c diff --git a/t/t4013/diff.diff-tree_-c_--abbrev_master b/t/t4013/diff.diff-tree_-c_--abbrev_main similarity index 83% rename from t/t4013/diff.diff-tree_-c_--abbrev_master rename to t/t4013/diff.diff-tree_-c_--abbrev_main index b8e4aa25307..039d127cf24 100644 --- a/t/t4013/diff.diff-tree_-c_--abbrev_master +++ b/t/t4013/diff.diff-tree_-c_--abbrev_main @@ -1,4 +1,4 @@ -$ git diff-tree -c --abbrev master +$ git diff-tree -c --abbrev main 59d314ad6f356dd08601a4cd5e530381da3e3c64 ::100644 100644 100644 cead32e... 7289e35... 992913c... MM dir/sub ::100644 100644 100644 b414108... f4615da... 10a8a9f... MM file0 diff --git a/t/t4013/diff.diff-tree_--cc_--stat_--summary_master b/t/t4013/diff.diff-tree_-c_--stat_--summary_main similarity index 70% rename from t/t4013/diff.diff-tree_--cc_--stat_--summary_master rename to t/t4013/diff.diff-tree_-c_--stat_--summary_main index d019867dd94..05a8d16ba70 100644 --- a/t/t4013/diff.diff-tree_--cc_--stat_--summary_master +++ b/t/t4013/diff.diff-tree_-c_--stat_--summary_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc --stat --summary master +$ git diff-tree -c --stat --summary main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_--cc_--stat_master b/t/t4013/diff.diff-tree_-c_--stat_main similarity index 75% rename from t/t4013/diff.diff-tree_--cc_--stat_master rename to t/t4013/diff.diff-tree_-c_--stat_main index 40b91796b34..61d9f450dfd 100644 --- a/t/t4013/diff.diff-tree_--cc_--stat_master +++ b/t/t4013/diff.diff-tree_-c_--stat_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc --stat master +$ git diff-tree -c --stat main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_-c_master b/t/t4013/diff.diff-tree_-c_main similarity index 93% rename from t/t4013/diff.diff-tree_-c_master rename to t/t4013/diff.diff-tree_-c_main index e2d2bb26114..a84e1185cf5 100644 --- a/t/t4013/diff.diff-tree_-c_master +++ b/t/t4013/diff.diff-tree_-c_main @@ -1,4 +1,4 @@ -$ git diff-tree -c master +$ git diff-tree -c main 59d314ad6f356dd08601a4cd5e530381da3e3c64 ::100644 100644 100644 cead32e925b1420c84c14cbf7cf755e7e45af8ad 7289e35bff32727c08dda207511bec138fdb9ea5 992913c5aa0a5476d10c49ed0f21fc0c6d1aedf3 MM dir/sub ::100644 100644 100644 b414108e81e5091fe0974a1858b4d0d22b107f70 f4615da674c09df322d6ba8d6b21ecfb1b1ba510 10a8a9f3657f91a156b9f0184ed79a20adef9f7f MM file0 diff --git a/t/t4013/diff.diff-tree_-m_master b/t/t4013/diff.diff-tree_-m_main similarity index 96% rename from t/t4013/diff.diff-tree_-m_master rename to t/t4013/diff.diff-tree_-m_main index 6d0a2207fb3..5da1f7f5251 100644 --- a/t/t4013/diff.diff-tree_-m_master +++ b/t/t4013/diff.diff-tree_-m_main @@ -1,4 +1,4 @@ -$ git diff-tree -m master +$ git diff-tree -m main 59d314ad6f356dd08601a4cd5e530381da3e3c64 :040000 040000 65f5c9dd60ce3b2b3324b618ac7accf8d912c113 0564e026437809817a64fff393079714b6dd4628 M dir :100644 100644 b414108e81e5091fe0974a1858b4d0d22b107f70 10a8a9f3657f91a156b9f0184ed79a20adef9f7f M file0 diff --git a/t/t4013/diff.diff-tree_-p_-m_master b/t/t4013/diff.diff-tree_-p_-m_main similarity index 97% rename from t/t4013/diff.diff-tree_-p_-m_master rename to t/t4013/diff.diff-tree_-p_-m_main index b60bea039d9..29c9fc20b8b 100644 --- a/t/t4013/diff.diff-tree_-p_-m_master +++ b/t/t4013/diff.diff-tree_-p_-m_main @@ -1,4 +1,4 @@ -$ git diff-tree -p -m master +$ git diff-tree -p -m main 59d314ad6f356dd08601a4cd5e530381da3e3c64 diff --git a/dir/sub b/dir/sub index cead32e..992913c 100644 diff --git a/t/t4013/diff.diff-tree_-p_main b/t/t4013/diff.diff-tree_-p_main new file mode 100644 index 00000000000..c658062422e --- /dev/null +++ b/t/t4013/diff.diff-tree_-p_main @@ -0,0 +1,2 @@ +$ git diff-tree -p main +$ diff --git a/t/t4013/diff.diff-tree_-p_master b/t/t4013/diff.diff-tree_-p_master deleted file mode 100644 index b182875fb2f..00000000000 --- a/t/t4013/diff.diff-tree_-p_master +++ /dev/null @@ -1,2 +0,0 @@ -$ git diff-tree -p master -$ diff --git a/t/t4013/diff.diff-tree_main b/t/t4013/diff.diff-tree_main new file mode 100644 index 00000000000..dc5b9fdeb6e --- /dev/null +++ b/t/t4013/diff.diff-tree_main @@ -0,0 +1,2 @@ +$ git diff-tree main +$ diff --git a/t/t4013/diff.diff-tree_master b/t/t4013/diff.diff-tree_master deleted file mode 100644 index fe9226f8a12..00000000000 --- a/t/t4013/diff.diff-tree_master +++ /dev/null @@ -1,2 +0,0 @@ -$ git diff-tree master -$ diff --git a/t/t4013/diff.diff_--dirstat_--cc_main~1_main b/t/t4013/diff.diff_--dirstat_--cc_main~1_main new file mode 100644 index 00000000000..168a357a02e --- /dev/null +++ b/t/t4013/diff.diff_--dirstat_--cc_main~1_main @@ -0,0 +1,3 @@ +$ git diff --dirstat --cc main~1 main + 40.0% dir/ +$ diff --git a/t/t4013/diff.diff_--dirstat_--cc_master~1_master b/t/t4013/diff.diff_--dirstat_--cc_master~1_master deleted file mode 100644 index fba4e34175e..00000000000 --- a/t/t4013/diff.diff_--dirstat_--cc_master~1_master +++ /dev/null @@ -1,3 +0,0 @@ -$ git diff --dirstat --cc master~1 master - 40.0% dir/ -$ diff --git a/t/t4013/diff.diff_--dirstat_main~1_main~2 b/t/t4013/diff.diff_--dirstat_main~1_main~2 new file mode 100644 index 00000000000..68097337089 --- /dev/null +++ b/t/t4013/diff.diff_--dirstat_main~1_main~2 @@ -0,0 +1,3 @@ +$ git diff --dirstat main~1 main~2 + 40.0% dir/ +$ diff --git a/t/t4013/diff.diff_--dirstat_master~1_master~2 b/t/t4013/diff.diff_--dirstat_master~1_master~2 deleted file mode 100644 index b672e1ca63d..00000000000 --- a/t/t4013/diff.diff_--dirstat_master~1_master~2 +++ /dev/null @@ -1,3 +0,0 @@ -$ git diff --dirstat master~1 master~2 - 40.0% dir/ -$ diff --git a/t/t4013/diff.diff_--line-prefix=abc_master_master^_side b/t/t4013/diff.diff_--line-prefix=abc_main_main^_side similarity index 87% rename from t/t4013/diff.diff_--line-prefix=abc_master_master^_side rename to t/t4013/diff.diff_--line-prefix=abc_main_main^_side index 99f91e7f0e3..67a2145a365 100644 --- a/t/t4013/diff.diff_--line-prefix=abc_master_master^_side +++ b/t/t4013/diff.diff_--line-prefix=abc_main_main^_side @@ -1,4 +1,4 @@ -$ git diff --line-prefix=abc master master^ side +$ git diff --line-prefix=abc main main^ side abcdiff --cc dir/sub abcindex cead32e,7289e35..992913c abc--- a/dir/sub diff --git a/t/t4013/diff.diff_master_master^_side b/t/t4013/diff.diff_main_main^_side similarity index 89% rename from t/t4013/diff.diff_master_master^_side rename to t/t4013/diff.diff_main_main^_side index 50ec9cadd61..ab81ec9e47b 100644 --- a/t/t4013/diff.diff_master_master^_side +++ b/t/t4013/diff.diff_main_main^_side @@ -1,4 +1,4 @@ -$ git diff master master^ side +$ git diff main main^ side diff --cc dir/sub index cead32e,7289e35..992913c --- a/dir/sub diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master b/t/t4013/diff.format-patch_--attach_--stdout_initial..main similarity index 98% rename from t/t4013/diff.format-patch_--attach_--stdout_initial..master rename to t/t4013/diff.format-patch_--attach_--stdout_initial..main index 52fedc179e5..9f56380350d 100644 --- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master +++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --attach --stdout initial..master +$ git format-patch --attach --stdout initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main^ similarity index 97% rename from t/t4013/diff.format-patch_--attach_--stdout_initial..master^ rename to t/t4013/diff.format-patch_--attach_--stdout_initial..main^ index 1c3cde251b5..80132ea99eb 100644 --- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ +++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main^ @@ -1,4 +1,4 @@ -$ git format-patch --attach --stdout initial..master^ +$ git format-patch --attach --stdout initial..main^ From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --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 similarity index 99% rename from t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master rename to t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main index 02c4db7ec58..8e889090fbe 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master +++ b/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --inline --stdout --numbered-files initial..master +$ git format-patch --inline --stdout --numbered-files initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --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 similarity index 99% rename from t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master rename to t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main index c7677c5951c..d7d2b12d155 100644 --- 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 @@ -1,4 +1,4 @@ -$ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..master +$ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_initial..main similarity index 98% rename from t/t4013/diff.format-patch_--inline_--stdout_initial..master rename to t/t4013/diff.format-patch_--inline_--stdout_initial..main index 5b3e34e2c0c..c49c423f82f 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master +++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --inline --stdout initial..master +$ git format-patch --inline --stdout initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^ similarity index 97% rename from t/t4013/diff.format-patch_--inline_--stdout_initial..master^ rename to t/t4013/diff.format-patch_--inline_--stdout_initial..main^ index d13f8a81280..8669dbfe6c9 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ +++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^ @@ -1,4 +1,4 @@ -$ git format-patch --inline --stdout initial..master^ +$ git format-patch --inline --stdout initial..main^ From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^^ similarity index 95% rename from t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ rename to t/t4013/diff.format-patch_--inline_--stdout_initial..main^^ index caec5537de3..b749be58b0a 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ +++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^^ @@ -1,4 +1,4 @@ -$ git format-patch --inline --stdout initial..master^^ +$ git format-patch --inline --stdout initial..main^^ From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --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^ similarity index 96% rename from t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^ rename to t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^ index 244d964fc67..567f2221982 100644 --- a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^ +++ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^ @@ -1,4 +1,4 @@ -$ git format-patch --stdout --cover-letter -n initial..master^ +$ git format-patch --stdout --cover-letter -n initial..main^ From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001 From: C O Mitter <committer@example.com> Date: Mon, 26 Jun 2006 00:06:00 +0000 diff --git a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main similarity index 97% rename from t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master rename to t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main index bfc287a147d..195b62ea4f5 100644 --- a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master +++ b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --stdout --no-numbered initial..master +$ git format-patch --stdout --no-numbered initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--numbered_initial..main similarity index 97% rename from t/t4013/diff.format-patch_--stdout_--numbered_initial..master rename to t/t4013/diff.format-patch_--stdout_--numbered_initial..main index 568f6f584e6..0678a38515d 100644 --- a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master +++ b/t/t4013/diff.format-patch_--stdout_--numbered_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --stdout --numbered initial..master +$ git format-patch --stdout --numbered initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--stdout_initial..master b/t/t4013/diff.format-patch_--stdout_initial..main similarity index 97% rename from t/t4013/diff.format-patch_--stdout_initial..master rename to t/t4013/diff.format-patch_--stdout_initial..main index 5f0352f9f70..b4a6302e7cb 100644 --- a/t/t4013/diff.format-patch_--stdout_initial..master +++ b/t/t4013/diff.format-patch_--stdout_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --stdout initial..master +$ git format-patch --stdout initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--stdout_initial..master^ b/t/t4013/diff.format-patch_--stdout_initial..main^ similarity index 96% rename from t/t4013/diff.format-patch_--stdout_initial..master^ rename to t/t4013/diff.format-patch_--stdout_initial..main^ index 2ae454d8073..36b32215826 100644 --- a/t/t4013/diff.format-patch_--stdout_initial..master^ +++ b/t/t4013/diff.format-patch_--stdout_initial..main^ @@ -1,4 +1,4 @@ -$ git format-patch --stdout initial..master^ +$ git format-patch --stdout initial..main^ From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.log_-c_-m_-p_master b/t/t4013/diff.log_--cc_-m_-p_main similarity index 99% rename from t/t4013/diff.log_-c_-m_-p_master rename to t/t4013/diff.log_--cc_-m_-p_main index b660f3d5f28..f32746ea3ed 100644 --- a/t/t4013/diff.log_-c_-m_-p_master +++ b/t/t4013/diff.log_--cc_-m_-p_main @@ -1,4 +1,4 @@ -$ git log -c -m -p master +$ git log --cc -m -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--decorate=full_--all b/t/t4013/diff.log_--decorate=full_--all index 6b0b334a5d6..c099399525a 100644 --- a/t/t4013/diff.log_--decorate=full_--all +++ b/t/t4013/diff.log_--decorate=full_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--decorate=full_--clear-decorations_--all b/t/t4013/diff.log_--decorate=full_--clear-decorations_--all index 1c030a6554e..c43684e5361 100644 --- a/t/t4013/diff.log_--decorate=full_--clear-decorations_--all +++ b/t/t4013/diff.log_--decorate=full_--clear-decorations_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--decorate=full_--decorate-all_--all b/t/t4013/diff.log_--decorate=full_--decorate-all_--all index d6e79287846..48dca61681c 100644 --- a/t/t4013/diff.log_--decorate=full_--decorate-all_--all +++ b/t/t4013/diff.log_--decorate=full_--decorate-all_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--decorate_--all b/t/t4013/diff.log_--decorate_--all index c7df1f58141..8bbf891f658 100644 --- a/t/t4013/diff.log_--decorate_--all +++ b/t/t4013/diff.log_--decorate_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--decorate_--clear-decorations_--all b/t/t4013/diff.log_--decorate_--clear-decorations_--all index 88be82cce31..86b1353f514 100644 --- a/t/t4013/diff.log_--decorate_--clear-decorations_--all +++ b/t/t4013/diff.log_--decorate_--clear-decorations_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--decorate_--decorate-all_--all b/t/t4013/diff.log_--decorate_--decorate-all_--all index 5d22618bb60..59fb17bfc54 100644 --- a/t/t4013/diff.log_--decorate_--decorate-all_--all +++ b/t/t4013/diff.log_--decorate_--decorate-all_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--diff-merges=first-parent_master b/t/t4013/diff.log_--diff-merges=first-parent_main similarity index 95% rename from t/t4013/diff.log_--diff-merges=first-parent_master rename to t/t4013/diff.log_--diff-merges=first-parent_main index fa63a557dd1..bacee621e54 100644 --- a/t/t4013/diff.log_--diff-merges=first-parent_master +++ b/t/t4013/diff.log_--diff-merges=first-parent_main @@ -1,4 +1,4 @@ -$ git log --diff-merges=first-parent master +$ git log --diff-merges=first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --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 similarity index 95% rename from t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master rename to t/t4013/diff.log_--diff-merges=off_-p_--first-parent_main index 597002232e5..fe180fda3be 100644 --- a/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master +++ b/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_main @@ -1,4 +1,4 @@ -$ git log --no-diff-merges -p --first-parent master +$ git log --diff-merges=off -p --first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --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 similarity index 95% rename from t/t4013/diff.log_--first-parent_--diff-merges=off_-p_master rename to t/t4013/diff.log_--first-parent_--diff-merges=off_-p_main index 5d7461a167e..dca62d4e608 100644 --- a/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_master +++ b/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_main @@ -1,4 +1,4 @@ -$ git log --first-parent --diff-merges=off -p master +$ git log --first-parent --diff-merges=off -p main commit 80e25ffa65bcdbe82ef654b4d06dbbde7945c37f Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --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 similarity index 95% rename from t/t4013/diff.log_--diff-merges=off_-p_--first-parent_master rename to t/t4013/diff.log_--no-diff-merges_-p_--first-parent_main index 194e893c94f..0b541180887 100644 --- a/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_master +++ b/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_main @@ -1,4 +1,4 @@ -$ git log --diff-merges=off -p --first-parent master +$ git log --no-diff-merges -p --first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_ similarity index 96% rename from t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ rename to t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_ index a18f1472a9a..3ed46cc8672 100644 --- a/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ +++ b/t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_ @@ -1,4 +1,4 @@ -$ git log --patch-with-stat --summary master -- dir/ +$ git log --patch-with-stat --summary main -- dir/ commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--patch-with-stat_master b/t/t4013/diff.log_--patch-with-stat_main similarity index 98% rename from t/t4013/diff.log_--patch-with-stat_master rename to t/t4013/diff.log_--patch-with-stat_main index ae425c46722..2e12b557cb7 100644 --- a/t/t4013/diff.log_--patch-with-stat_master +++ b/t/t4013/diff.log_--patch-with-stat_main @@ -1,4 +1,4 @@ -$ git log --patch-with-stat master +$ git log --patch-with-stat main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--patch-with-stat_master_--_dir_ b/t/t4013/diff.log_--patch-with-stat_main_--_dir_ similarity index 96% rename from t/t4013/diff.log_--patch-with-stat_master_--_dir_ rename to t/t4013/diff.log_--patch-with-stat_main_--_dir_ index d5207cadf44..d511ea7f6bf 100644 --- a/t/t4013/diff.log_--patch-with-stat_master_--_dir_ +++ b/t/t4013/diff.log_--patch-with-stat_main_--_dir_ @@ -1,4 +1,4 @@ -$ git log --patch-with-stat master -- dir/ +$ git log --patch-with-stat main -- dir/ commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --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 similarity index 98% rename from t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master rename to t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main index 0fc1e8cd71f..3cfd0e64229 100644 --- a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master +++ b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git log --root --cc --patch-with-stat --summary master +$ git log --root --cc --patch-with-stat --summary main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--patch-with-stat_--summary_main similarity index 98% rename from t/t4013/diff.log_--root_--patch-with-stat_--summary_master rename to t/t4013/diff.log_--root_--patch-with-stat_--summary_main index dffc09dde9e..9f4d6dfa44e 100644 --- a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master +++ b/t/t4013/diff.log_--root_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git log --root --patch-with-stat --summary master +$ git log --root --patch-with-stat --summary main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--root_--patch-with-stat_master b/t/t4013/diff.log_--root_--patch-with-stat_main similarity index 98% rename from t/t4013/diff.log_--root_--patch-with-stat_master rename to t/t4013/diff.log_--root_--patch-with-stat_main index 55aa98012de..0d69ae2e11b 100644 --- a/t/t4013/diff.log_--root_--patch-with-stat_master +++ b/t/t4013/diff.log_--root_--patch-with-stat_main @@ -1,4 +1,4 @@ -$ git log --root --patch-with-stat master +$ git log --root --patch-with-stat main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --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 similarity index 98% rename from t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master rename to t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main index 019d85f7de6..1b71add9dea 100644 --- a/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master +++ b/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git log --root -c --patch-with-stat --summary master +$ git log --root -c --patch-with-stat --summary main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--root_-p_master b/t/t4013/diff.log_--root_-p_main similarity index 98% rename from t/t4013/diff.log_--root_-p_master rename to t/t4013/diff.log_--root_-p_main index b42c334439b..04581296ed5 100644 --- a/t/t4013/diff.log_--root_-p_master +++ b/t/t4013/diff.log_--root_-p_main @@ -1,4 +1,4 @@ -$ git log --root -p master +$ git log --root -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--root_master b/t/t4013/diff.log_--root_main similarity index 96% rename from t/t4013/diff.log_--root_master rename to t/t4013/diff.log_--root_main index e8f46159da1..d5e90fd6b48 100644 --- a/t/t4013/diff.log_--root_master +++ b/t/t4013/diff.log_--root_main @@ -1,4 +1,4 @@ -$ git log --root master +$ git log --root main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-GF_-p_--pickaxe-all_master b/t/t4013/diff.log_-GF_-p_--pickaxe-all_main similarity index 90% rename from t/t4013/diff.log_-GF_-p_--pickaxe-all_master rename to t/t4013/diff.log_-GF_-p_--pickaxe-all_main index d36f88098b0..1f7a497c2d7 100644 --- a/t/t4013/diff.log_-GF_-p_--pickaxe-all_master +++ b/t/t4013/diff.log_-GF_-p_--pickaxe-all_main @@ -1,4 +1,4 @@ -$ git log -GF -p --pickaxe-all master +$ git log -GF -p --pickaxe-all main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-GF_-p_master b/t/t4013/diff.log_-GF_-p_main similarity index 91% rename from t/t4013/diff.log_-GF_-p_master rename to t/t4013/diff.log_-GF_-p_main index 9d93f2c23a8..c80dda41e9f 100644 --- a/t/t4013/diff.log_-GF_-p_master +++ b/t/t4013/diff.log_-GF_-p_main @@ -1,4 +1,4 @@ -$ git log -GF -p master +$ git log -GF -p main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-SF_master b/t/t4013/diff.log_-GF_main similarity index 86% rename from t/t4013/diff.log_-SF_master rename to t/t4013/diff.log_-GF_main index c1599f2f520..b94a7f78398 100644 --- a/t/t4013/diff.log_-SF_master +++ b/t/t4013/diff.log_-GF_main @@ -1,4 +1,4 @@ -$ git log -SF master +$ git log -GF main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master b/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main similarity index 97% rename from t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master rename to t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main index 929f35a05b4..67e26b4e547 100644 --- a/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master +++ b/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main @@ -1,4 +1,4 @@ -$ git log -IA -IB -I1 -I2 -p master +$ git log -IA -IB -I1 -I2 -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-SF_-p_master b/t/t4013/diff.log_-SF_-p_main similarity index 91% rename from t/t4013/diff.log_-SF_-p_master rename to t/t4013/diff.log_-SF_-p_main index 5e324389729..fa82ac14908 100644 --- a/t/t4013/diff.log_-SF_-p_master +++ b/t/t4013/diff.log_-SF_-p_main @@ -1,4 +1,4 @@ -$ git log -SF -p master +$ git log -SF -p main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-GF_master b/t/t4013/diff.log_-SF_main similarity index 86% rename from t/t4013/diff.log_-GF_master rename to t/t4013/diff.log_-SF_main index 4c6708d2d0d..dbf770db49d 100644 --- a/t/t4013/diff.log_-GF_master +++ b/t/t4013/diff.log_-SF_main @@ -1,4 +1,4 @@ -$ git log -GF master +$ git log -SF main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-SF_main_--max-count=0 b/t/t4013/diff.log_-SF_main_--max-count=0 new file mode 100644 index 00000000000..683b17eb998 --- /dev/null +++ b/t/t4013/diff.log_-SF_main_--max-count=0 @@ -0,0 +1,2 @@ +$ git log -SF main --max-count=0 +$ diff --git a/t/t4013/diff.log_-SF_master_--max-count=2 b/t/t4013/diff.log_-SF_main_--max-count=1 similarity index 79% rename from t/t4013/diff.log_-SF_master_--max-count=2 rename to t/t4013/diff.log_-SF_main_--max-count=1 index a6c55fd4822..2102426f8cc 100644 --- a/t/t4013/diff.log_-SF_master_--max-count=2 +++ b/t/t4013/diff.log_-SF_main_--max-count=1 @@ -1,4 +1,4 @@ -$ git log -SF master --max-count=2 +$ git log -SF main --max-count=1 commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-SF_main_--max-count=2 b/t/t4013/diff.log_-SF_main_--max-count=2 new file mode 100644 index 00000000000..23e12a4cbbd --- /dev/null +++ b/t/t4013/diff.log_-SF_main_--max-count=2 @@ -0,0 +1,7 @@ +$ git log -SF main --max-count=2 +commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 +Author: A U Thor <author@example.com> +Date: Mon Jun 26 00:02:00 2006 +0000 + + Third +$ diff --git a/t/t4013/diff.log_-SF_master_--max-count=0 b/t/t4013/diff.log_-SF_master_--max-count=0 deleted file mode 100644 index c1fc6c87317..00000000000 --- a/t/t4013/diff.log_-SF_master_--max-count=0 +++ /dev/null @@ -1,2 +0,0 @@ -$ git log -SF master --max-count=0 -$ diff --git a/t/t4013/diff.log_-SF_master_--max-count=1 b/t/t4013/diff.log_-SF_master_--max-count=1 deleted file mode 100644 index c981a038147..00000000000 --- a/t/t4013/diff.log_-SF_master_--max-count=1 +++ /dev/null @@ -1,7 +0,0 @@ -$ git log -SF master --max-count=1 -commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 -Author: A U Thor <author@example.com> -Date: Mon Jun 26 00:02:00 2006 +0000 - - Third -$ diff --git a/t/t4013/diff.log_-S_F_master b/t/t4013/diff.log_-S_F_main similarity index 86% rename from t/t4013/diff.log_-S_F_master rename to t/t4013/diff.log_-S_F_main index 978d2b41188..a75a42e1433 100644 --- a/t/t4013/diff.log_-S_F_master +++ b/t/t4013/diff.log_-S_F_main @@ -1,4 +1,4 @@ -$ git log -S F master +$ git log -S F main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_--cc_-m_-p_master b/t/t4013/diff.log_-c_-m_-p_main similarity index 99% rename from t/t4013/diff.log_--cc_-m_-p_master rename to t/t4013/diff.log_-c_-m_-p_main index 7c217cf348c..427f7324568 100644 --- a/t/t4013/diff.log_--cc_-m_-p_master +++ b/t/t4013/diff.log_-c_-m_-p_main @@ -1,4 +1,4 @@ -$ git log --cc -m -p master +$ git log -c -m -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-m_--raw_master b/t/t4013/diff.log_-m_--raw_main similarity index 98% rename from t/t4013/diff.log_-m_--raw_master rename to t/t4013/diff.log_-m_--raw_main index cd2ecc46283..31d9bc77073 100644 --- a/t/t4013/diff.log_-m_--raw_master +++ b/t/t4013/diff.log_-m_--raw_main @@ -1,4 +1,4 @@ -$ git log -m --raw master +$ git log -m --raw main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-m_--stat_master b/t/t4013/diff.log_-m_--stat_main similarity index 98% rename from t/t4013/diff.log_-m_--stat_master rename to t/t4013/diff.log_-m_--stat_main index c7db084fd90..4c8909229bf 100644 --- a/t/t4013/diff.log_-m_--stat_master +++ b/t/t4013/diff.log_-m_--stat_main @@ -1,4 +1,4 @@ -$ git log -m --stat master +$ git log -m --stat main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-m_-p_--first-parent_master b/t/t4013/diff.log_-m_-p_--first-parent_main similarity index 97% rename from t/t4013/diff.log_-m_-p_--first-parent_master rename to t/t4013/diff.log_-m_-p_--first-parent_main index 7a0073f5296..459e10786b9 100644 --- a/t/t4013/diff.log_-m_-p_--first-parent_master +++ b/t/t4013/diff.log_-m_-p_--first-parent_main @@ -1,4 +1,4 @@ -$ git log -m -p --first-parent master +$ git log -m -p --first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-m_-p_master b/t/t4013/diff.log_-m_-p_main similarity index 99% rename from t/t4013/diff.log_-m_-p_master rename to t/t4013/diff.log_-m_-p_main index 9ca62a01ed2..07453c56983 100644 --- a/t/t4013/diff.log_-m_-p_master +++ b/t/t4013/diff.log_-m_-p_main @@ -1,4 +1,4 @@ -$ git log -m -p master +$ git log -m -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-p_--diff-merges=first-parent_master b/t/t4013/diff.log_-p_--diff-merges=first-parent_main similarity index 97% rename from t/t4013/diff.log_-p_--diff-merges=first-parent_master rename to t/t4013/diff.log_-p_--diff-merges=first-parent_main index 9538a275112..264a2f373ec 100644 --- a/t/t4013/diff.log_-p_--diff-merges=first-parent_master +++ b/t/t4013/diff.log_-p_--diff-merges=first-parent_main @@ -1,4 +1,4 @@ -$ git log -p --diff-merges=first-parent master +$ git log -p --diff-merges=first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-p_--first-parent_master b/t/t4013/diff.log_-p_--first-parent_main similarity index 97% rename from t/t4013/diff.log_-p_--first-parent_master rename to t/t4013/diff.log_-p_--first-parent_main index 28840ebea1e..247980817b5 100644 --- a/t/t4013/diff.log_-p_--first-parent_master +++ b/t/t4013/diff.log_-p_--first-parent_main @@ -1,4 +1,4 @@ -$ git log -p --first-parent master +$ git log -p --first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-p_master b/t/t4013/diff.log_-p_main similarity index 98% rename from t/t4013/diff.log_-p_master rename to t/t4013/diff.log_-p_main index bf1326dc366..c82b4dbf165 100644 --- a/t/t4013/diff.log_-p_master +++ b/t/t4013/diff.log_-p_main @@ -1,4 +1,4 @@ -$ git log -p master +$ git log -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_master b/t/t4013/diff.log_main similarity index 97% rename from t/t4013/diff.log_master rename to t/t4013/diff.log_main index a8f6ce5abd6..50401f73e6e 100644 --- a/t/t4013/diff.log_master +++ b/t/t4013/diff.log_main @@ -1,4 +1,4 @@ -$ git log master +$ git log main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master b/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main similarity index 81% rename from t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master rename to t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main index bb80f013b37..3aa1f80af35 100644 --- a/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master +++ b/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main @@ -1,4 +1,4 @@ -$ git diff-tree -c --abbrev master +$ git diff-tree -c --abbrev main 59d314ad6f356dd08601a4cd5e530381da3e3c64 ::100644 100644 100644 cead32e 7289e35 992913c MM dir/sub ::100644 100644 100644 b414108 f4615da 10a8a9f MM file0 diff --git a/t/t4013/diff.noellipses-whatchanged_--root_master b/t/t4013/diff.noellipses-whatchanged_--root_main similarity index 96% rename from t/t4013/diff.noellipses-whatchanged_--root_master rename to t/t4013/diff.noellipses-whatchanged_--root_main index c2cfd4e7292..2bec0558356 100644 --- a/t/t4013/diff.noellipses-whatchanged_--root_master +++ b/t/t4013/diff.noellipses-whatchanged_--root_main @@ -1,4 +1,4 @@ -$ git whatchanged --root master +$ git whatchanged --root main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.noellipses-whatchanged_-SF_master b/t/t4013/diff.noellipses-whatchanged_-SF_main similarity index 86% rename from t/t4013/diff.noellipses-whatchanged_-SF_master rename to t/t4013/diff.noellipses-whatchanged_-SF_main index b36ce5886e0..0c1476d19eb 100644 --- a/t/t4013/diff.noellipses-whatchanged_-SF_master +++ b/t/t4013/diff.noellipses-whatchanged_-SF_main @@ -1,4 +1,4 @@ -$ git whatchanged -SF master +$ git whatchanged -SF main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.noellipses-whatchanged_master b/t/t4013/diff.noellipses-whatchanged_main similarity index 96% rename from t/t4013/diff.noellipses-whatchanged_master rename to t/t4013/diff.noellipses-whatchanged_main index 55e500f2edb..c48d2851aab 100644 --- a/t/t4013/diff.noellipses-whatchanged_master +++ b/t/t4013/diff.noellipses-whatchanged_main @@ -1,4 +1,4 @@ -$ git whatchanged master +$ git whatchanged main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.show_--first-parent_master b/t/t4013/diff.show_--first-parent_main similarity index 92% rename from t/t4013/diff.show_--first-parent_master rename to t/t4013/diff.show_--first-parent_main index 3dcbe473a0d..480502d65c2 100644 --- a/t/t4013/diff.show_--first-parent_master +++ b/t/t4013/diff.show_--first-parent_main @@ -1,4 +1,4 @@ -$ git show --first-parent master +$ git show --first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.show_-c_master b/t/t4013/diff.show_-c_main similarity index 95% rename from t/t4013/diff.show_-c_master rename to t/t4013/diff.show_-c_main index 81aba8da96c..74ef8bc96b2 100644 --- a/t/t4013/diff.show_-c_master +++ b/t/t4013/diff.show_-c_main @@ -1,4 +1,4 @@ -$ git show -c master +$ git show -c main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.show_-m_master b/t/t4013/diff.show_-m_main similarity index 98% rename from t/t4013/diff.show_-m_master rename to t/t4013/diff.show_-m_main index 4ea2ee453d5..8fd56736d97 100644 --- a/t/t4013/diff.show_-m_master +++ b/t/t4013/diff.show_-m_main @@ -1,4 +1,4 @@ -$ git show -m master +$ git show -m main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.show_master b/t/t4013/diff.show_main similarity index 96% rename from t/t4013/diff.show_master rename to t/t4013/diff.show_main index fb08ce0e46d..630b52a95ef 100644 --- a/t/t4013/diff.show_master +++ b/t/t4013/diff.show_main @@ -1,4 +1,4 @@ -$ git show master +$ git show main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_ similarity index 94% rename from t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ rename to t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_ index c8b6af2f438..ce0754d556e 100644 --- a/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ +++ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_ @@ -1,4 +1,4 @@ -$ git whatchanged --patch-with-stat --summary master -- dir/ +$ git whatchanged --patch-with-stat --summary main -- dir/ commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_--patch-with-stat_master b/t/t4013/diff.whatchanged_--patch-with-stat_main similarity index 97% rename from t/t4013/diff.whatchanged_--patch-with-stat_master rename to t/t4013/diff.whatchanged_--patch-with-stat_main index 1ac431ba921..aabccf39a53 100644 --- a/t/t4013/diff.whatchanged_--patch-with-stat_master +++ b/t/t4013/diff.whatchanged_--patch-with-stat_main @@ -1,4 +1,4 @@ -$ git whatchanged --patch-with-stat master +$ git whatchanged --patch-with-stat main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_ b/t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_ similarity index 94% rename from t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_ rename to t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_ index b30c28588f9..c05a0e81496 100644 --- a/t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_ +++ b/t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_ @@ -1,4 +1,4 @@ -$ git whatchanged --patch-with-stat master -- dir/ +$ git whatchanged --patch-with-stat main -- dir/ commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --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 similarity index 97% rename from t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master rename to t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main index 30aae7817b9..1f74b1b5487 100644 --- a/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master +++ b/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git whatchanged --root --cc --patch-with-stat --summary master +$ git whatchanged --root --cc --patch-with-stat --summary main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main similarity index 97% rename from t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master rename to t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main index db90e515254..80d98121511 100644 --- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master +++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git whatchanged --root --patch-with-stat --summary master +$ git whatchanged --root --patch-with-stat --summary main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_main similarity index 97% rename from t/t4013/diff.whatchanged_--root_--patch-with-stat_master rename to t/t4013/diff.whatchanged_--root_--patch-with-stat_main index 9a6cc92ce7d..c0b9082a2c8 100644 --- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master +++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_main @@ -1,4 +1,4 @@ -$ git whatchanged --root --patch-with-stat master +$ git whatchanged --root --patch-with-stat main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --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 similarity index 97% rename from t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master rename to t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main index d1d32bd34c3..0002c6912e1 100644 --- a/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master +++ b/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git whatchanged --root -c --patch-with-stat --summary master +$ git whatchanged --root -c --patch-with-stat --summary main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.whatchanged_--root_-p_master b/t/t4013/diff.whatchanged_--root_-p_main similarity index 98% rename from t/t4013/diff.whatchanged_--root_-p_master rename to t/t4013/diff.whatchanged_--root_-p_main index ebf1f0661e0..39f3e2be746 100644 --- a/t/t4013/diff.whatchanged_--root_-p_master +++ b/t/t4013/diff.whatchanged_--root_-p_main @@ -1,4 +1,4 @@ -$ git whatchanged --root -p master +$ git whatchanged --root -p main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_--root_master b/t/t4013/diff.whatchanged_--root_main similarity index 97% rename from t/t4013/diff.whatchanged_--root_master rename to t/t4013/diff.whatchanged_--root_main index a405cb61388..36f4d6697f5 100644 --- a/t/t4013/diff.whatchanged_--root_master +++ b/t/t4013/diff.whatchanged_--root_main @@ -1,4 +1,4 @@ -$ git whatchanged --root master +$ git whatchanged --root main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_-SF_-p_master b/t/t4013/diff.whatchanged_-SF_-p_main similarity index 89% rename from t/t4013/diff.whatchanged_-SF_-p_master rename to t/t4013/diff.whatchanged_-SF_-p_main index f39da848228..0e2e67c0df8 100644 --- a/t/t4013/diff.whatchanged_-SF_-p_master +++ b/t/t4013/diff.whatchanged_-SF_-p_main @@ -1,4 +1,4 @@ -$ git whatchanged -SF -p master +$ git whatchanged -SF -p main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_-SF_master b/t/t4013/diff.whatchanged_-SF_main similarity index 86% rename from t/t4013/diff.whatchanged_-SF_master rename to t/t4013/diff.whatchanged_-SF_main index 0499321d0eb..34c6bf6b950 100644 --- a/t/t4013/diff.whatchanged_-SF_master +++ b/t/t4013/diff.whatchanged_-SF_main @@ -1,4 +1,4 @@ -$ git whatchanged -SF master +$ git whatchanged -SF main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_-p_master b/t/t4013/diff.whatchanged_-p_main similarity index 98% rename from t/t4013/diff.whatchanged_-p_master rename to t/t4013/diff.whatchanged_-p_main index f18d43209c0..18f3bdeef48 100644 --- a/t/t4013/diff.whatchanged_-p_master +++ b/t/t4013/diff.whatchanged_-p_main @@ -1,4 +1,4 @@ -$ git whatchanged -p master +$ git whatchanged -p main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_master b/t/t4013/diff.whatchanged_main similarity index 97% rename from t/t4013/diff.whatchanged_master rename to t/t4013/diff.whatchanged_main index cd3bcc2c726..d6c83ed8b03 100644 --- a/t/t4013/diff.whatchanged_master +++ b/t/t4013/diff.whatchanged_main @@ -1,4 +1,4 @@ -$ git whatchanged master +$ git whatchanged main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply related [flat|nested] 56+ messages in thread
* [PATCH 3/6] t9902: switch default branch name to main 2025-08-27 15:24 [PATCH 0/6] breaking changes: switch default initial branch name to "main" Phillip Wood 2025-08-27 15:24 ` [PATCH 1/6] t0018: switch default branch name to main Phillip Wood 2025-08-27 15:24 ` [PATCH 2/6] t4013: " Phillip Wood @ 2025-08-27 15:24 ` Phillip Wood 2025-08-27 15:24 ` [PATCH 4/6] t0613: stop setting default initial branch Phillip Wood ` (5 subsequent siblings) 8 siblings, 0 replies; 56+ messages in thread From: Phillip Wood @ 2025-08-27 15:24 UTC (permalink / raw) To: git; +Cc: Johannes Schindelin, Wing Huang, Phillip Wood From: Phillip Wood <phillip.wood@dunelm.org.uk> In preparation for removing GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME in Git 3.0 update the bash completion tests that rely on the default branch name being master. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- t/t9902-completion.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 6650d33fba6..964e1f15693 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -11,9 +11,9 @@ test_description='test bash completion' # untraceable with such ancient Bash versions. test_untraceable=UnfortunatelyYes -# Override environment and always use master for the default initial branch +# Override environment and always use main for the default initial branch # name for these tests, so that rev completion candidates are as expected. -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./lib-bash.sh @@ -1453,7 +1453,7 @@ test_expect_success 'git bisect - start subcommand arguments before double-dash HEAD Z final Z initial Z - master Z + main Z EOF ) ' -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply related [flat|nested] 56+ messages in thread
* [PATCH 4/6] t0613: stop setting default initial branch 2025-08-27 15:24 [PATCH 0/6] breaking changes: switch default initial branch name to "main" Phillip Wood ` (2 preceding siblings ...) 2025-08-27 15:24 ` [PATCH 3/6] t9902: " Phillip Wood @ 2025-08-27 15:24 ` Phillip Wood 2025-08-27 17:30 ` Junio C Hamano 2025-08-27 15:24 ` [PATCH 5/6] t1403: remove dependency on GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME Phillip Wood ` (4 subsequent siblings) 8 siblings, 1 reply; 56+ messages in thread From: Phillip Wood @ 2025-08-27 15:24 UTC (permalink / raw) To: git; +Cc: Johannes Schindelin, Wing Huang, Phillip Wood From: Phillip Wood <phillip.wood@dunelm.org.uk> As the tests are all run in separate repositories, set the branch name to "master" when creating the repository for the tests where the result depends on the branch name. This is in preparation for removing GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME in Git 3.0. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- t/t0613-reftable-write-options.sh | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/t/t0613-reftable-write-options.sh b/t/t0613-reftable-write-options.sh index d77e601111f..b547e12d66d 100755 --- a/t/t0613-reftable-write-options.sh +++ b/t/t0613-reftable-write-options.sh @@ -11,16 +11,12 @@ export GIT_TEST_REFTABLE_AUTOCOMPACTION # Block sizes depend on the hash function, so we force SHA1 here. GIT_TEST_DEFAULT_HASH=sha1 export GIT_TEST_DEFAULT_HASH -# Block sizes also depend on the actual refs we write, so we force "master" to -# be the default initial branch name. -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master -export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh test_expect_success 'default write options' ' test_when_finished "rm -rf repo" && - git init repo && + git init --initial-branch master repo && ( cd repo && test_commit initial && @@ -43,7 +39,7 @@ test_expect_success 'default write options' ' test_expect_success 'disabled reflog writes no log blocks' ' test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && + git init --initial-branch master repo && ( cd repo && test_commit initial && @@ -62,7 +58,7 @@ test_expect_success 'disabled reflog writes no log blocks' ' test_expect_success 'many refs results in multiple blocks' ' test_when_finished "rm -rf repo" && - git init repo && + git init --initial-branch master repo && ( cd repo && test_commit initial && @@ -115,7 +111,7 @@ test_expect_success 'tiny block size leads to error' ' test_expect_success 'small block size leads to multiple ref blocks' ' test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && + git init --initial-branch master repo && ( cd repo && test_commit A && @@ -172,7 +168,7 @@ test_expect_success 'block size exceeding maximum supported size' ' test_expect_success 'restart interval at every single record' ' test_when_finished "rm -rf repo" && - git init repo && + git init --initial-branch master repo && ( cd repo && test_commit initial && @@ -212,7 +208,7 @@ test_expect_success 'restart interval exceeding maximum supported interval' ' test_expect_success 'object index gets written by default with ref index' ' test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && + git init --initial-branch master repo && ( cd repo && test_commit initial && @@ -247,7 +243,7 @@ test_expect_success 'object index gets written by default with ref index' ' test_expect_success 'object index can be disabled' ' test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && + git init --initial-branch master repo && ( cd repo && test_commit initial && -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply related [flat|nested] 56+ messages in thread
* Re: [PATCH 4/6] t0613: stop setting default initial branch 2025-08-27 15:24 ` [PATCH 4/6] t0613: stop setting default initial branch Phillip Wood @ 2025-08-27 17:30 ` Junio C Hamano 0 siblings, 0 replies; 56+ messages in thread From: Junio C Hamano @ 2025-08-27 17:30 UTC (permalink / raw) To: Phillip Wood; +Cc: git, Patrick Steinhardt, Johannes Schindelin, Wing Huang Phillip Wood <phillip.wood123@gmail.com> writes: > From: Phillip Wood <phillip.wood@dunelm.org.uk> > > As the tests are all run in separate repositories, set the branch > name to "master" when creating the repository for the tests where > the result depends on the branch name. This is in preparation for > removing GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME in Git 3.0. I do not agree with the statement that Git 3.0 should remove support for GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME facility in its test suite, so it is somewhat moot for me to review almost all the patches in this series, but this caught my attention. As this one needs to fix the initial branch name to a fixed string, no matter the hardcoded initial branch name of the time is (even after we rename again from 'main' to something else), I do think this change is VERY MUCH a good thing to do. > Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> > --- > t/t0613-reftable-write-options.sh | 18 +++++++----------- > 1 file changed, 7 insertions(+), 11 deletions(-) > > diff --git a/t/t0613-reftable-write-options.sh b/t/t0613-reftable-write-options.sh > index d77e601111f..b547e12d66d 100755 > --- a/t/t0613-reftable-write-options.sh > +++ b/t/t0613-reftable-write-options.sh > @@ -11,16 +11,12 @@ export GIT_TEST_REFTABLE_AUTOCOMPACTION > # Block sizes depend on the hash function, so we force SHA1 here. > GIT_TEST_DEFAULT_HASH=sha1 > export GIT_TEST_DEFAULT_HASH > -# Block sizes also depend on the actual refs we write, so we force "master" to > -# be the default initial branch name. We may however need to keep this comment somewhere in this file, to warn against future developers that all "git init" invocations must use 'master' (by the way, would any 6-byte name do? I dunno) as the initial branch name. > -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master > -export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME > > . ./test-lib.sh > > test_expect_success 'default write options' ' > test_when_finished "rm -rf repo" && > - git init repo && > + git init --initial-branch master repo && And being explict like this is a good idea. I am curious how the CC: list was formulated, though, as neither name comes up in "git shortlog t/t0613-reftable-write-options.sh". I've added Patrick for comment (primarily to pick his brain for the 6-byte thing). Thanks. ^ permalink raw reply [flat|nested] 56+ messages in thread
* [PATCH 5/6] t1403: remove dependency on GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 2025-08-27 15:24 [PATCH 0/6] breaking changes: switch default initial branch name to "main" Phillip Wood ` (3 preceding siblings ...) 2025-08-27 15:24 ` [PATCH 4/6] t0613: stop setting default initial branch Phillip Wood @ 2025-08-27 15:24 ` Phillip Wood 2025-08-27 15:24 ` [PATCH 6/6] breaking-changes: switch default branch to main Phillip Wood ` (3 subsequent siblings) 8 siblings, 0 replies; 56+ messages in thread From: Phillip Wood @ 2025-08-27 15:24 UTC (permalink / raw) To: git; +Cc: Johannes Schindelin, Wing Huang, Phillip Wood From: Phillip Wood <phillip.wood@dunelm.org.uk> Some of the tests use GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME when checking if a ref exists. However, as that variable is always set to "main" at the start of the test file, we can hard code the name in the tests in preparation for removing GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME in Git 3.0. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- t/t1403-show-ref.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t1403-show-ref.sh b/t/t1403-show-ref.sh index 9da3650e91b..7b83daeaa32 100755 --- a/t/t1403-show-ref.sh +++ b/t/t1403-show-ref.sh @@ -229,15 +229,15 @@ test_expect_success 'show-ref sub-modes are mutually exclusive' ' ' test_expect_success '--exists with existing reference' ' - git show-ref --exists refs/heads/$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME + git show-ref --exists refs/heads/main ' test_expect_success '--exists with missing reference' ' test_expect_code 2 git show-ref --exists refs/heads/does-not-exist ' test_expect_success '--exists does not use DWIM' ' - test_expect_code 2 git show-ref --exists $GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 2>err && + test_expect_code 2 git show-ref --exists main 2>err && grep "reference does not exist" err ' @@ -254,7 +254,7 @@ test_expect_success '--exists with bad reference name' ' test_expect_success '--exists with arbitrary symref' ' test_when_finished "git symbolic-ref -d refs/symref" && - git symbolic-ref refs/symref refs/heads/$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME && + git symbolic-ref refs/symref refs/heads/main && git show-ref --exists refs/symref ' -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply related [flat|nested] 56+ messages in thread
* [PATCH 6/6] breaking-changes: switch default branch to main 2025-08-27 15:24 [PATCH 0/6] breaking changes: switch default initial branch name to "main" Phillip Wood ` (4 preceding siblings ...) 2025-08-27 15:24 ` [PATCH 5/6] t1403: remove dependency on GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME Phillip Wood @ 2025-08-27 15:24 ` Phillip Wood 2025-08-27 18:41 ` Junio C Hamano 2025-09-02 11:36 ` Patrick Steinhardt 2025-08-28 13:12 ` [PATCH 0/6] breaking changes: switch default initial branch name to "main" Johannes Schindelin ` (2 subsequent siblings) 8 siblings, 2 replies; 56+ messages in thread From: Phillip Wood @ 2025-08-27 15:24 UTC (permalink / raw) To: git; +Cc: Johannes Schindelin, Wing Huang, Phillip Wood From: Phillip Wood <phillip.wood@dunelm.org.uk> Since 1296cbe4b46 (init: document `init.defaultBranch` better, 2020-12-11) "git-init.adoc" has advertized that the default name of the initial branch may change in the future. The name "main" is chosen to match the default used by the big git forge web sites. The advice printed when init.defaultBranch is not set is updated to say that the default will change to "main" in Git 3.0. Building with WITH_BREAKING_CHANGES enabled removes the advice, changes the default branch name is "main" and removes support for GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME. The code in guess_remote_head() that looks for "refs/heads/master" is left unchanged as that is only called when the remote server does not support the symref capability in the v0 protocol or the symref extension to the ls-refs list in the v2 protocol. Such an old server is more likely to be using "master" as the default branch name. With the exception of the "git-init.adoc" the documentation is left unchanged. I had hoped to parameterize the name of the default branch by using an asciidoc attribute. Unfortunately attribute expansion is inhibited by backticks and we use backticks to mark up ref names so that idea does not work. As the changes to git-init.adoc show inserting ifdef's around each instance of the branch name "master" is cumbersome and makes the documentation sources harder to read. Apart from "git-init.adoc" there are some other files where "master" is used as the name of the initial branch rather than as an example of a branch name such as "user-manual.adoc" and "gitcore-tutorial.adoc". The name appears a lot in those so updating it with ifdef's is not really practical. We can update that document in the 3.0 release cycle. The other documentation where master is used as an example branch name can be gradually converted over time. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- Documentation/BreakingChanges.adoc | 5 +++++ Documentation/git-init.adoc | 12 +++++++++--- advice.c | 2 ++ advice.h | 2 ++ ci/run-build-and-tests.sh | 1 - refs.c | 16 +++++++++++++--- t/t0001-init.sh | 9 +++++---- t/test-lib.sh | 15 +++++++++++---- 8 files changed, 47 insertions(+), 15 deletions(-) diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc index f8d2eba061c..93922299321 100644 --- a/Documentation/BreakingChanges.adoc +++ b/Documentation/BreakingChanges.adoc @@ -165,6 +165,11 @@ A prerequisite for this change is that the ecosystem is ready to support the "reftable" format. Most importantly, alternative implementations of Git like JGit, libgit2 and Gitoxide need to support it. +* The default branch name will be `main`. We have been warning that the default + name will change since 675704c74dd (init: provide useful advice about + init.defaultBranch, 2020-12-11). The new name matches the default branch name + used by many of the big git forges. + === Removals * Support for grafting commits has long been superseded by git-replace(1). diff --git a/Documentation/git-init.adoc b/Documentation/git-init.adoc index a0dffba665f..39d4db6bccb 100644 --- a/Documentation/git-init.adoc +++ b/Documentation/git-init.adoc @@ -77,9 +77,15 @@ If this is a reinitialization, the repository will be moved to the specified pat `-b <branch-name>`:: `--initial-branch=<branch-name>`:: Use _<branch-name>_ for the initial branch in the newly created -repository. If not specified, fall back to the default name (currently -`master`, but this is subject to change in the future; the name can be -customized via the `init.defaultBranch` configuration variable). +repository. If not specified, fall back to the default name +ifndef::with-breaking-changes[] +(currently `master`, but this will change to `main` when Git 3.0 is released). +endif::with-breaking-changes[] +ifdef::with-breaking-changes[] +(`main`). +endif::with-breaking-changes[] +The default name can be customized via the `init.defaultBranch` configuration +variable. `--shared[=(false|true|umask|group|all|world|everybody|<perm>)]`:: diff --git a/advice.c b/advice.c index e5f0ff84491..48c49ee4145 100644 --- a/advice.c +++ b/advice.c @@ -51,7 +51,9 @@ static struct { [ADVICE_AM_WORK_DIR] = { "amWorkDir" }, [ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] = { "checkoutAmbiguousRemoteBranchName" }, [ADVICE_COMMIT_BEFORE_MERGE] = { "commitBeforeMerge" }, +#ifndef WITH_BREAKING_CHANGES [ADVICE_DEFAULT_BRANCH_NAME] = { "defaultBranchName" }, +#endif /* WITH_BREAKING_CHANGES */ [ADVICE_DETACHED_HEAD] = { "detachedHead" }, [ADVICE_DIVERGING] = { "diverging" }, [ADVICE_FETCH_SET_HEAD_WARN] = { "fetchRemoteHEADWarn" }, diff --git a/advice.h b/advice.h index 727dcecf4a3..fc1dc872049 100644 --- a/advice.h +++ b/advice.h @@ -18,7 +18,9 @@ enum advice_type { ADVICE_AM_WORK_DIR, ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME, ADVICE_COMMIT_BEFORE_MERGE, +#ifndef WITH_BREAKING_CHANGES ADVICE_DEFAULT_BRANCH_NAME, +#endif /* WITH_BREAKING_CHANGES */ ADVICE_DETACHED_HEAD, ADVICE_DIVERGING, ADVICE_FETCH_SET_HEAD_WARN, diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index 01823fd0f14..a21834043f3 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh @@ -9,7 +9,6 @@ run_tests=t case "$jobname" in linux-breaking-changes) - export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export WITH_BREAKING_CHANGES=YesPlease ;; linux-TEST-vars) diff --git a/refs.c b/refs.c index 4ff55cf24f6..e73f63ff6b8 100644 --- a/refs.c +++ b/refs.c @@ -627,10 +627,12 @@ void expand_ref_prefix(struct strvec *prefixes, const char *prefix) strvec_pushf(prefixes, *p, len, prefix); } +#ifndef WITH_BREAKING_CHANGES static const char default_branch_name_advice[] = N_( "Using '%s' as the name for the initial branch. This default branch name\n" -"is subject to change. To configure the initial branch name to use in all\n" -"of your new repositories, which will suppress this warning, call:\n" +"will change to \"main\" in Git 3.0. To configure the initial branch name\n" +"to use in all of your new repositories, which will suppress this warning,\n" +"call:\n" "\n" "\tgit config --global init.defaultBranch <name>\n" "\n" @@ -639,24 +641,32 @@ static const char default_branch_name_advice[] = N_( "\n" "\tgit branch -m <name>\n" ); +#endif /* WITH_BREAKING_CHANGES */ char *repo_default_branch_name(struct repository *r, int quiet) { const char *config_key = "init.defaultbranch"; const char *config_display_key = "init.defaultBranch"; char *ret = NULL, *full_ref; +#ifndef WITH_BREAKING_CHANGES const char *env = getenv("GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME"); if (env && *env) ret = xstrdup(env); - else if (repo_config_get_string(r, config_key, &ret) < 0) +#endif /* WITH_BREAKING_CHANGES */ + if (!ret && repo_config_get_string(r, config_key, &ret) < 0) die(_("could not retrieve `%s`"), config_display_key); if (!ret) { +#ifdef WITH_BREAKING_CHANGES + ret = xstrdup("main"); + (void) quiet; /* Silence -Wunused-parameter */ +#else ret = xstrdup("master"); if (!quiet) advise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME, _(default_branch_name_advice), ret); +#endif /* WITH_BREAKING_CHANGES */ } full_ref = xstrfmt("refs/heads/%s", ret); diff --git a/t/t0001-init.sh b/t/t0001-init.sh index f593c536874..7223a98773d 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -868,7 +868,7 @@ test_expect_success 'overridden default initial branch name (config)' ' grep nmb actual ' -test_expect_success 'advice on unconfigured init.defaultBranch' ' +test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' ' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \ init unconfigured-default-branch-name 2>err && test_decode_color <err >decoded && @@ -883,16 +883,17 @@ test_expect_success 'advice on unconfigured init.defaultBranch disabled' ' test_grep ! "hint: " err ' -test_expect_success 'overridden default main branch name (env)' ' +test_expect_success !WITH_BREAKING_CHANGES 'overridden default main branch name (env)' ' test_config_global init.defaultBranch nmb && GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=env git init main-branch-env && git -C main-branch-env symbolic-ref HEAD >actual && grep env actual ' test_expect_success 'invalid default branch name' ' - test_must_fail env GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME="with space" \ - git init initial-branch-invalid 2>err && + test_must_fail env GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \ + git -c init.defaultBranch="with space" \ + init initial-branch-invalid 2>err && test_grep "invalid branch name" err ' diff --git a/t/test-lib.sh b/t/test-lib.sh index 621cd31ae1d..ec6b8ebcabb 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -127,10 +127,17 @@ then export GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS fi -# Explicitly set the default branch name for testing, to avoid the -# transitory "git init" warning under --verbose. -: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master} -export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +if test -z "$WITH_BREAKING_CHANGES" +then + # Explicitly set the default branch name for testing, to avoid the + # transitory "git init" warning under --verbose. + : ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master} + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +else + # Unset the default branch name that is set in many test scripts + # before sourcing this file. + unset GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +fi ################################################################ # It appears that people try to run tests without building... -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply related [flat|nested] 56+ messages in thread
* Re: [PATCH 6/6] breaking-changes: switch default branch to main 2025-08-27 15:24 ` [PATCH 6/6] breaking-changes: switch default branch to main Phillip Wood @ 2025-08-27 18:41 ` Junio C Hamano 2025-09-02 11:36 ` Patrick Steinhardt 1 sibling, 0 replies; 56+ messages in thread From: Junio C Hamano @ 2025-08-27 18:41 UTC (permalink / raw) To: Phillip Wood; +Cc: git, Johannes Schindelin, Wing Huang Phillip Wood <phillip.wood123@gmail.com> writes: > diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc > index f8d2eba061c..93922299321 100644 > --- a/Documentation/BreakingChanges.adoc > +++ b/Documentation/BreakingChanges.adoc > @@ -165,6 +165,11 @@ A prerequisite for this change is that the ecosystem is ready to support the > "reftable" format. Most importantly, alternative implementations of Git like > JGit, libgit2 and Gitoxide need to support it. > > +* The default branch name will be `main`. We have been warning that the default > + name will change since 675704c74dd (init: provide useful advice about > + init.defaultBranch, 2020-12-11). The new name matches the default branch name > + used by many of the big git forges. > + Good. > diff --git a/Documentation/git-init.adoc b/Documentation/git-init.adoc > index a0dffba665f..39d4db6bccb 100644 > --- a/Documentation/git-init.adoc > +++ b/Documentation/git-init.adoc > @@ -77,9 +77,15 @@ If this is a reinitialization, the repository will be moved to the specified pat > `-b <branch-name>`:: > `--initial-branch=<branch-name>`:: > Use _<branch-name>_ for the initial branch in the newly created > -repository. If not specified, fall back to the default name (currently > -`master`, but this is subject to change in the future; the name can be > -customized via the `init.defaultBranch` configuration variable). > +repository. If not specified, fall back to the default name > +ifndef::with-breaking-changes[] > +(currently `master`, but this will change to `main` when Git 3.0 is released). > +endif::with-breaking-changes[] > +ifdef::with-breaking-changes[] > +(`main`). > +endif::with-breaking-changes[] Good. We might have to change it back to "(currently `main`)" again but I do not see the need to prepare for such a re-rename. As we do not have the "currently", we can say ... to the default name `main`. without parentheses. > +The default name can be customized via the `init.defaultBranch` configuration > +variable. > diff --git a/advice.c b/advice.c > index e5f0ff84491..48c49ee4145 100644 > --- a/advice.c > +++ b/advice.c > @@ -51,7 +51,9 @@ static struct { > [ADVICE_AM_WORK_DIR] = { "amWorkDir" }, > [ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] = { "checkoutAmbiguousRemoteBranchName" }, > [ADVICE_COMMIT_BEFORE_MERGE] = { "commitBeforeMerge" }, > +#ifndef WITH_BREAKING_CHANGES > [ADVICE_DEFAULT_BRANCH_NAME] = { "defaultBranchName" }, > +#endif /* WITH_BREAKING_CHANGES */ > [ADVICE_DETACHED_HEAD] = { "detachedHead" }, > [ADVICE_DIVERGING] = { "diverging" }, > [ADVICE_FETCH_SET_HEAD_WARN] = { "fetchRemoteHEADWarn" }, > diff --git a/advice.h b/advice.h > index 727dcecf4a3..fc1dc872049 100644 > --- a/advice.h > +++ b/advice.h > @@ -18,7 +18,9 @@ enum advice_type { > ADVICE_AM_WORK_DIR, > ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME, > ADVICE_COMMIT_BEFORE_MERGE, > +#ifndef WITH_BREAKING_CHANGES > ADVICE_DEFAULT_BRANCH_NAME, > +#endif /* WITH_BREAKING_CHANGES */ > ADVICE_DETACHED_HEAD, > ADVICE_DIVERGING, > ADVICE_FETCH_SET_HEAD_WARN, Good. > diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh > index 01823fd0f14..a21834043f3 100755 > --- a/ci/run-build-and-tests.sh > +++ b/ci/run-build-and-tests.sh > @@ -9,7 +9,6 @@ run_tests=t > > case "$jobname" in > linux-breaking-changes) > - export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main Questionable. > diff --git a/refs.c b/refs.c > index 4ff55cf24f6..e73f63ff6b8 100644 > --- a/refs.c > +++ b/refs.c > @@ -627,10 +627,12 @@ void expand_ref_prefix(struct strvec *prefixes, const char *prefix) > strvec_pushf(prefixes, *p, len, prefix); > } > > +#ifndef WITH_BREAKING_CHANGES > static const char default_branch_name_advice[] = N_( > "Using '%s' as the name for the initial branch. This default branch name\n" > -"is subject to change. To configure the initial branch name to use in all\n" > -"of your new repositories, which will suppress this warning, call:\n" > +"will change to \"main\" in Git 3.0. To configure the initial branch name\n" > +"to use in all of your new repositories, which will suppress this warning,\n" > +"call:\n" > "\n" > "\tgit config --global init.defaultBranch <name>\n" > "\n" > @@ -639,24 +641,32 @@ static const char default_branch_name_advice[] = N_( > "\n" > "\tgit branch -m <name>\n" > ); > +#endif /* WITH_BREAKING_CHANGES */ Good. > char *repo_default_branch_name(struct repository *r, int quiet) > { > const char *config_key = "init.defaultbranch"; > const char *config_display_key = "init.defaultBranch"; > char *ret = NULL, *full_ref; > +#ifndef WITH_BREAKING_CHANGES > const char *env = getenv("GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME"); > > if (env && *env) > ret = xstrdup(env); > - else if (repo_config_get_string(r, config_key, &ret) < 0) > +#endif /* WITH_BREAKING_CHANGES */ Questionable. > + if (!ret && repo_config_get_string(r, config_key, &ret) < 0) > die(_("could not retrieve `%s`"), config_display_key); > > if (!ret) { > +#ifdef WITH_BREAKING_CHANGES > + ret = xstrdup("main"); > + (void) quiet; /* Silence -Wunused-parameter */ > +#else > ret = xstrdup("master"); > if (!quiet) > advise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME, > _(default_branch_name_advice), ret); > +#endif /* WITH_BREAKING_CHANGES */ Very good. Thanks. ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH 6/6] breaking-changes: switch default branch to main 2025-08-27 15:24 ` [PATCH 6/6] breaking-changes: switch default branch to main Phillip Wood 2025-08-27 18:41 ` Junio C Hamano @ 2025-09-02 11:36 ` Patrick Steinhardt 2025-09-02 15:13 ` Phillip Wood 1 sibling, 1 reply; 56+ messages in thread From: Patrick Steinhardt @ 2025-09-02 11:36 UTC (permalink / raw) To: Phillip Wood; +Cc: git, Johannes Schindelin, Wing Huang, Phillip Wood On Wed, Aug 27, 2025 at 04:24:50PM +0100, Phillip Wood wrote: > From: Phillip Wood <phillip.wood@dunelm.org.uk> > > Since 1296cbe4b46 (init: document `init.defaultBranch` better, > 2020-12-11) "git-init.adoc" has advertized that the default name s/advertized/advertised/ > of the initial branch may change in the future. The name "main" > is chosen to match the default used by the big git forge web sites. s/git/Git/ > The advice printed when init.defaultBranch is not set is > updated to say that the default will change to "main" in Git > 3.0. Building with WITH_BREAKING_CHANGES enabled removes the advice, > changes the default branch name is "main" and removes support for s/is/to/ > GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME. The code in guess_remote_head() As Junio already mentioned, I don't really think it's necessary to drop `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME`, making much of this commit series obsolete. > that looks for "refs/heads/master" is left unchanged as that is only > called when the remote server does not support the symref capability > in the v0 protocol or the symref extension to the ls-refs list in the > v2 protocol. Such an old server is more likely to be using "master" > as the default branch name. Hm, that's probably fair. > With the exception of the "git-init.adoc" the documentation is left > unchanged. I had hoped to parameterize the name of the default branch > by using an asciidoc attribute. Unfortunately attribute expansion > is inhibited by backticks and we use backticks to mark up ref names > so that idea does not work. As the changes to git-init.adoc show > inserting ifdef's around each instance of the branch name "master" > is cumbersome and makes the documentation sources harder to read. > > Apart from "git-init.adoc" there are some other files where "master" is > used as the name of the initial branch rather than as an example of a > branch name such as "user-manual.adoc" and "gitcore-tutorial.adoc". The > name appears a lot in those so updating it with ifdef's is not really > practical. We can update that document in the 3.0 release cycle. The > other documentation where master is used as an example branch name > can be gradually converted over time. Agreed. > diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc > index f8d2eba061c..93922299321 100644 > --- a/Documentation/BreakingChanges.adoc > +++ b/Documentation/BreakingChanges.adoc > @@ -165,6 +165,11 @@ A prerequisite for this change is that the ecosystem is ready to support the > "reftable" format. Most importantly, alternative implementations of Git like > JGit, libgit2 and Gitoxide need to support it. > > +* The default branch name will be `main`. We have been warning that the default Let's explicitly mention here that this is only going to be the case for _new_ repositories. It's obvious to us, but for others it might not be that existing repositories will not see any change in behaviour due to this. > + name will change since 675704c74dd (init: provide useful advice about > + init.defaultBranch, 2020-12-11). The new name matches the default branch name > + used by many of the big git forges. s/git/Git/ > diff --git a/Documentation/git-init.adoc b/Documentation/git-init.adoc > index a0dffba665f..39d4db6bccb 100644 > --- a/Documentation/git-init.adoc > +++ b/Documentation/git-init.adoc > @@ -77,9 +77,15 @@ If this is a reinitialization, the repository will be moved to the specified pat > `-b <branch-name>`:: > `--initial-branch=<branch-name>`:: > Use _<branch-name>_ for the initial branch in the newly created > -repository. If not specified, fall back to the default name (currently > -`master`, but this is subject to change in the future; the name can be > -customized via the `init.defaultBranch` configuration variable). > +repository. If not specified, fall back to the default name > +ifndef::with-breaking-changes[] > +(currently `master`, but this will change to `main` when Git 3.0 is released). > +endif::with-breaking-changes[] > +ifdef::with-breaking-changes[] > +(`main`). > +endif::with-breaking-changes[] > +The default name can be customized via the `init.defaultBranch` configuration > +variable. > > `--shared[=(false|true|umask|group|all|world|everybody|<perm>)]`:: > This is ugly indeed, but we cannot do anything about that *shrug* > diff --git a/advice.c b/advice.c > index e5f0ff84491..48c49ee4145 100644 > --- a/advice.c > +++ b/advice.c > @@ -51,7 +51,9 @@ static struct { > [ADVICE_AM_WORK_DIR] = { "amWorkDir" }, > [ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] = { "checkoutAmbiguousRemoteBranchName" }, > [ADVICE_COMMIT_BEFORE_MERGE] = { "commitBeforeMerge" }, > +#ifndef WITH_BREAKING_CHANGES > [ADVICE_DEFAULT_BRANCH_NAME] = { "defaultBranchName" }, > +#endif /* WITH_BREAKING_CHANGES */ > [ADVICE_DETACHED_HEAD] = { "detachedHead" }, > [ADVICE_DIVERGING] = { "diverging" }, > [ADVICE_FETCH_SET_HEAD_WARN] = { "fetchRemoteHEADWarn" }, > diff --git a/advice.h b/advice.h > index 727dcecf4a3..fc1dc872049 100644 > --- a/advice.h > +++ b/advice.h > @@ -18,7 +18,9 @@ enum advice_type { > ADVICE_AM_WORK_DIR, > ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME, > ADVICE_COMMIT_BEFORE_MERGE, > +#ifndef WITH_BREAKING_CHANGES > ADVICE_DEFAULT_BRANCH_NAME, > +#endif /* WITH_BREAKING_CHANGES */ > ADVICE_DETACHED_HEAD, > ADVICE_DIVERGING, > ADVICE_FETCH_SET_HEAD_WARN, Okay. I don't really think it's necessary to conditionally compile this, but it doesn't hurt much, either. > diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh > index 01823fd0f14..a21834043f3 100755 > --- a/ci/run-build-and-tests.sh > +++ b/ci/run-build-and-tests.sh > @@ -9,7 +9,6 @@ run_tests=t > > case "$jobname" in > linux-breaking-changes) > - export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main > export WITH_BREAKING_CHANGES=YesPlease > ;; > linux-TEST-vars) Nice. > diff --git a/refs.c b/refs.c > index 4ff55cf24f6..e73f63ff6b8 100644 > --- a/refs.c > +++ b/refs.c > @@ -627,10 +627,12 @@ void expand_ref_prefix(struct strvec *prefixes, const char *prefix) > strvec_pushf(prefixes, *p, len, prefix); > } > > +#ifndef WITH_BREAKING_CHANGES > static const char default_branch_name_advice[] = N_( > "Using '%s' as the name for the initial branch. This default branch name\n" > -"is subject to change. To configure the initial branch name to use in all\n" > -"of your new repositories, which will suppress this warning, call:\n" > +"will change to \"main\" in Git 3.0. To configure the initial branch name\n" > +"to use in all of your new repositories, which will suppress this warning,\n" > +"call:\n" > "\n" > "\tgit config --global init.defaultBranch <name>\n" > "\n" > @@ -639,24 +641,32 @@ static const char default_branch_name_advice[] = N_( > "\n" > "\tgit branch -m <name>\n" > ); > +#endif /* WITH_BREAKING_CHANGES */ > > char *repo_default_branch_name(struct repository *r, int quiet) > { > const char *config_key = "init.defaultbranch"; > const char *config_display_key = "init.defaultBranch"; > char *ret = NULL, *full_ref; > +#ifndef WITH_BREAKING_CHANGES > const char *env = getenv("GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME"); > > if (env && *env) > ret = xstrdup(env); > - else if (repo_config_get_string(r, config_key, &ret) < 0) > +#endif /* WITH_BREAKING_CHANGES */ > + if (!ret && repo_config_get_string(r, config_key, &ret) < 0) > die(_("could not retrieve `%s`"), config_display_key); > > if (!ret) { > +#ifdef WITH_BREAKING_CHANGES > + ret = xstrdup("main"); > + (void) quiet; /* Silence -Wunused-parameter */ We have the `MAYBE_UNUSED` attribute that you can apply to `int quiet` to avoid this cast. > diff --git a/t/t0001-init.sh b/t/t0001-init.sh > index f593c536874..7223a98773d 100755 > --- a/t/t0001-init.sh > +++ b/t/t0001-init.sh > @@ -868,7 +868,7 @@ test_expect_success 'overridden default initial branch name (config)' ' > grep nmb actual > ' > > -test_expect_success 'advice on unconfigured init.defaultBranch' ' > +test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' ' > GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \ > init unconfigured-default-branch-name 2>err && > test_decode_color <err >decoded && > @@ -883,16 +883,17 @@ test_expect_success 'advice on unconfigured init.defaultBranch disabled' ' > test_grep ! "hint: " err > ' > > -test_expect_success 'overridden default main branch name (env)' ' > +test_expect_success !WITH_BREAKING_CHANGES 'overridden default main branch name (env)' ' > test_config_global init.defaultBranch nmb && > GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=env git init main-branch-env && > git -C main-branch-env symbolic-ref HEAD >actual && > grep env actual > ' > > test_expect_success 'invalid default branch name' ' > - test_must_fail env GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME="with space" \ > - git init initial-branch-invalid 2>err && > + test_must_fail env GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \ > + git -c init.defaultBranch="with space" \ > + init initial-branch-invalid 2>err && > test_grep "invalid branch name" err > ' > Should we also add a test conditional on `WITH_BREAKING_CHANGES` to verify that the new branch name is `main` as expected? Thanks for working on this change, I'm very much supportive of this. It feels like the ecosystem has already been moving into that direction, so it's time that Git catches up with that change. Patrick ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH 6/6] breaking-changes: switch default branch to main 2025-09-02 11:36 ` Patrick Steinhardt @ 2025-09-02 15:13 ` Phillip Wood 2025-09-03 4:44 ` Patrick Steinhardt 0 siblings, 1 reply; 56+ messages in thread From: Phillip Wood @ 2025-09-02 15:13 UTC (permalink / raw) To: Patrick Steinhardt, Phillip Wood; +Cc: git, Johannes Schindelin, Wing Huang Hi Patrick On 02/09/2025 12:36, Patrick Steinhardt wrote: > On Wed, Aug 27, 2025 at 04:24:50PM +0100, Phillip Wood wrote: >> From: Phillip Wood <phillip.wood@dunelm.org.uk> >> >> The advice printed when init.defaultBranch is not set is >> updated to say that the default will change to "main" in Git >> 3.0. Building with WITH_BREAKING_CHANGES enabled removes the advice, >> changes the default branch name is "main" and removes support for > > s/is/to/ > >> GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME. The code in guess_remote_head() > > As Junio already mentioned, I don't really think it's necessary to drop > `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME`, making much of this commit > series obsolete. I'm happy to drop those patches if there is a consensus that GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME is still useful after we've switched the branch name. I'm still not quite sure what it is useful for though. Removing it makes it clear that the tests are relying on the builtin default branch name that users see rather than some special name used only for tests. >> that looks for "refs/heads/master" is left unchanged as that is only >> called when the remote server does not support the symref capability >> in the v0 protocol or the symref extension to the ls-refs list in the >> v2 protocol. Such an old server is more likely to be using "master" >> as the default branch name. > > Hm, that's probably fair. That's more or less a direct quote from Peff's mail <20250826111234.GA1925107@coredump.intra.peff.net> >> diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc >> index f8d2eba061c..93922299321 100644 >> --- a/Documentation/BreakingChanges.adoc >> +++ b/Documentation/BreakingChanges.adoc >> @@ -165,6 +165,11 @@ A prerequisite for this change is that the ecosystem is ready to support the >> "reftable" format. Most importantly, alternative implementations of Git like >> JGit, libgit2 and Gitoxide need to support it. >> >> +* The default branch name will be `main`. We have been warning that the default > > Let's explicitly mention here that this is only going to be the case for > _new_ repositories. It's obvious to us, but for others it might not be > that existing repositories will not see any change in behaviour due to > this. Sure >> diff --git a/advice.h b/advice.h >> index 727dcecf4a3..fc1dc872049 100644 >> --- a/advice.h >> +++ b/advice.h >> @@ -18,7 +18,9 @@ enum advice_type { >> ADVICE_AM_WORK_DIR, >> ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME, >> ADVICE_COMMIT_BEFORE_MERGE, >> +#ifndef WITH_BREAKING_CHANGES >> ADVICE_DEFAULT_BRANCH_NAME, >> +#endif /* WITH_BREAKING_CHANGES */ >> ADVICE_DETACHED_HEAD, >> ADVICE_DIVERGING, >> ADVICE_FETCH_SET_HEAD_WARN, > > Okay. I don't really think it's necessary to conditionally compile this, > but it doesn't hurt much, either. My thought was that by making it conditional, it makes it harder to forget to remove this after Git 3.0 >> diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh >> index 01823fd0f14..a21834043f3 100755 >> --- a/ci/run-build-and-tests.sh >> +++ b/ci/run-build-and-tests.sh >> @@ -9,7 +9,6 @@ run_tests=t >> >> case "$jobname" in >> linux-breaking-changes) >> - export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main >> export WITH_BREAKING_CHANGES=YesPlease >> ;; >> linux-TEST-vars) > > Nice. Only if we remove GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME though? Part of the reason for removing it was to make it clear that the tests are using "main" when WITH_BREAKING_CHANGES is enabled. >> diff --git a/refs.c b/refs.c >> index 4ff55cf24f6..e73f63ff6b8 100644 >> --- a/refs.c >> +++ b/refs.c >> [...]>> +#ifdef WITH_BREAKING_CHANGES >> + ret = xstrdup("main"); >> + (void) quiet; /* Silence -Wunused-parameter */ > > We have the `MAYBE_UNUSED` attribute that you can apply to `int > quiet` to avoid this cast. Thanks, I didn't know we had that >> diff --git a/t/t0001-init.sh b/t/t0001-init.sh >> index f593c536874..7223a98773d 100755 >> --- a/t/t0001-init.sh >> +++ b/t/t0001-init.sh >> [...] > Should we also add a test conditional on `WITH_BREAKING_CHANGES` to > verify that the new branch name is `main` as expected? If we remove GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME then all of the tests that rely on the branch name "main" are testing that. If we keep that variable then we should probably add a test that unsets GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME and ensures the default branch name is "main" > Thanks for working on this change, I'm very much supportive of this. It > feels like the ecosystem has already been moving into that direction, so > it's time that Git catches up with that change. Thanks for your comments, I'll try and re-roll later this week. Phillip ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH 6/6] breaking-changes: switch default branch to main 2025-09-02 15:13 ` Phillip Wood @ 2025-09-03 4:44 ` Patrick Steinhardt 2025-09-03 9:54 ` Phillip Wood 0 siblings, 1 reply; 56+ messages in thread From: Patrick Steinhardt @ 2025-09-03 4:44 UTC (permalink / raw) To: phillip.wood; +Cc: git, Johannes Schindelin, Wing Huang On Tue, Sep 02, 2025 at 04:13:27PM +0100, Phillip Wood wrote: > On 02/09/2025 12:36, Patrick Steinhardt wrote: > > On Wed, Aug 27, 2025 at 04:24:50PM +0100, Phillip Wood wrote: > > > From: Phillip Wood <phillip.wood@dunelm.org.uk> > > > > > > The advice printed when init.defaultBranch is not set is > > > updated to say that the default will change to "main" in Git > > > 3.0. Building with WITH_BREAKING_CHANGES enabled removes the advice, > > > changes the default branch name is "main" and removes support for > > > > s/is/to/ > > > > > GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME. The code in guess_remote_head() > > > > As Junio already mentioned, I don't really think it's necessary to drop > > `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME`, making much of this commit > > series obsolete. > > I'm happy to drop those patches if there is a consensus that > GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME is still useful after we've switched > the branch name. I'm still not quite sure what it is useful for though. > Removing it makes it clear that the tests are relying on the builtin default > branch name that users see rather than some special name used only for > tests. We may eventually want to remove the whole infra. But I just don't think it's necessary as part of the Git 3.0 deprecation and that we can rather do it as a follow-up once Git 3.0 is out of the door. IIRC, the initial idea behind this variable was to adapt tests to not even care what the default initial branch name is in the first place. Tests should be agnostic of that name and use e.g. git-symbolic-ref(1) to figure out what HEAD points to. So maybe we should follow through with that idea and start refactoring tests into this direction so that they never set or read the variable in the first place. Could very well be that I misremember though. Patrick ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH 6/6] breaking-changes: switch default branch to main 2025-09-03 4:44 ` Patrick Steinhardt @ 2025-09-03 9:54 ` Phillip Wood 2025-09-03 11:51 ` Patrick Steinhardt 2025-09-03 18:40 ` Junio C Hamano 0 siblings, 2 replies; 56+ messages in thread From: Phillip Wood @ 2025-09-03 9:54 UTC (permalink / raw) To: Patrick Steinhardt, phillip.wood; +Cc: git, Johannes Schindelin, Wing Huang On 03/09/2025 05:44, Patrick Steinhardt wrote: > On Tue, Sep 02, 2025 at 04:13:27PM +0100, Phillip Wood wrote: >> >> I'm happy to drop those patches if there is a consensus that >> GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME is still useful after we've switched >> the branch name. I'm still not quite sure what it is useful for though. >> Removing it makes it clear that the tests are relying on the builtin default >> branch name that users see rather than some special name used only for >> tests. > > We may eventually want to remove the whole infra. But I just don't think > it's necessary as part of the Git 3.0 deprecation and that we can rather > do it as a follow-up once Git 3.0 is out of the door. > > IIRC, the initial idea behind this variable was to adapt tests to not > even care what the default initial branch name is in the first place. When the variable was introduced in 704fed9ea22 (tests: start moving to a different default main branch name, 2020-10-23) it was described as "This `GIT_TEST_*` variable is meant purely for the transitional period while the entire test suite is converted to use `main` as the initial branch name by default." The way it has been used is to allow tests to continue to hard code a fixed name for the default initial branch. > Tests should be agnostic of that name and use e.g. git-symbolic-ref(1) > to figure out what HEAD points to. So maybe we should follow through > with that idea and start refactoring tests into this direction so that > they never set or read the variable in the first place. That might be a good direction for the future. The test suite could set TEST_DEFAULT_BRANCH to the default name and tests could use that rather setting GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME and hard coding the expected name or running 'git symbolic-ref'. I'll drop the removal of GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME but I'd like to keep the patches that switch the tests from using "master" to "main". We've converted nearly all of the tests already so it seems a shame to leave a handful unconverted. Thanks Phillip ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH 6/6] breaking-changes: switch default branch to main 2025-09-03 9:54 ` Phillip Wood @ 2025-09-03 11:51 ` Patrick Steinhardt 2025-09-03 18:40 ` Junio C Hamano 1 sibling, 0 replies; 56+ messages in thread From: Patrick Steinhardt @ 2025-09-03 11:51 UTC (permalink / raw) To: phillip.wood; +Cc: git, Johannes Schindelin, Wing Huang On Wed, Sep 03, 2025 at 10:54:06AM +0100, Phillip Wood wrote: > On 03/09/2025 05:44, Patrick Steinhardt wrote: > > Tests should be agnostic of that name and use e.g. git-symbolic-ref(1) > > to figure out what HEAD points to. So maybe we should follow through > > with that idea and start refactoring tests into this direction so that > > they never set or read the variable in the first place. > > That might be a good direction for the future. The test suite could set > TEST_DEFAULT_BRANCH to the default name and tests could use that rather > setting GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME and hard coding the expected > name or running 'git symbolic-ref'. > > I'll drop the removal of GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME but I'd like > to keep the patches that switch the tests from using "master" to "main". > We've converted nearly all of the tests already so it seems a shame to leave > a handful unconverted. Fair enough. Patrick ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH 6/6] breaking-changes: switch default branch to main 2025-09-03 9:54 ` Phillip Wood 2025-09-03 11:51 ` Patrick Steinhardt @ 2025-09-03 18:40 ` Junio C Hamano 2025-09-04 7:09 ` Patrick Steinhardt 2025-09-04 13:27 ` Phillip Wood 1 sibling, 2 replies; 56+ messages in thread From: Junio C Hamano @ 2025-09-03 18:40 UTC (permalink / raw) To: Phillip Wood Cc: Patrick Steinhardt, phillip.wood, git, Johannes Schindelin, Wing Huang Phillip Wood <phillip.wood123@gmail.com> writes: > When the variable was introduced in 704fed9ea22 (tests: start moving > to a different default main branch name, 2020-10-23) it was described > as "This `GIT_TEST_*` variable is meant purely for the transitional > period while the entire test suite is converted to use `main` as the > initial branch name by default." The way it has been used is to allow > tests to continue to hard code a fixed name for the default initial > branch. Yes, but ripping it out would mean that you make it much harder to transition out of 'main' and move to the next correct name when the need comes, wouldn't it? > ... like to keep the patches that switch the tests from using > "master" to "main". I have no problem with that. I am still unsure about that "reftable cares about the name being 'master'" thing. If that can live with any 6 byte name, we may want to fix it to something different from 'master', for the sake of removing 'master'. Perhaps 'banana' or something? ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH 6/6] breaking-changes: switch default branch to main 2025-09-03 18:40 ` Junio C Hamano @ 2025-09-04 7:09 ` Patrick Steinhardt 2025-09-04 13:30 ` Phillip Wood 2025-09-04 13:27 ` Phillip Wood 1 sibling, 1 reply; 56+ messages in thread From: Patrick Steinhardt @ 2025-09-04 7:09 UTC (permalink / raw) To: Junio C Hamano Cc: Phillip Wood, phillip.wood, git, Johannes Schindelin, Wing Huang On Wed, Sep 03, 2025 at 11:40:05AM -0700, Junio C Hamano wrote: > Phillip Wood <phillip.wood123@gmail.com> writes: > > > When the variable was introduced in 704fed9ea22 (tests: start moving > > to a different default main branch name, 2020-10-23) it was described > > as "This `GIT_TEST_*` variable is meant purely for the transitional > > period while the entire test suite is converted to use `main` as the > > initial branch name by default." The way it has been used is to allow > > tests to continue to hard code a fixed name for the default initial > > branch. > > Yes, but ripping it out would mean that you make it much harder to > transition out of 'main' and move to the next correct name when the > need comes, wouldn't it? I guess it depends. If we transition our tests towards becoming mostly agnostic of the default branch name then we can strip out the whole infra but still remain agile. > > ... like to keep the patches that switch the tests from using > > "master" to "main". > > I have no problem with that. I am still unsure about that "reftable > cares about the name being 'master'" thing. If that can live with > any 6 byte name, we may want to fix it to something different from > 'master', for the sake of removing 'master'. Perhaps 'banana' or > something? Huh, did I miss anything? I scanned the thread for reftables but couldn't find any discussion around it relying on a 6 byte name. Could you maybe provide a pointer to what you are referring to? Thanks! Patrick ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH 6/6] breaking-changes: switch default branch to main 2025-09-04 7:09 ` Patrick Steinhardt @ 2025-09-04 13:30 ` Phillip Wood 2025-09-05 6:07 ` Patrick Steinhardt 0 siblings, 1 reply; 56+ messages in thread From: Phillip Wood @ 2025-09-04 13:30 UTC (permalink / raw) To: Patrick Steinhardt, Junio C Hamano Cc: phillip.wood, git, Johannes Schindelin, Wing Huang On 04/09/2025 08:09, Patrick Steinhardt wrote: > On Wed, Sep 03, 2025 at 11:40:05AM -0700, Junio C Hamano wrote: >> >> I have no problem with that. I am still unsure about that "reftable >> cares about the name being 'master'" thing. If that can live with >> any 6 byte name, we may want to fix it to something different from >> 'master', for the sake of removing 'master'. Perhaps 'banana' or >> something? > > Huh, did I miss anything? I scanned the thread for reftables but > couldn't find any discussion around it relying on a 6 byte name. Could > you maybe provide a pointer to what you are referring to? c.f. <xmqqwm6ozn7d.fsf@gitster.g>. In t0613 some of the tests check various sizes of things in the reftable and those depend on the length of the branch name Thanks Phillip ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH 6/6] breaking-changes: switch default branch to main 2025-09-04 13:30 ` Phillip Wood @ 2025-09-05 6:07 ` Patrick Steinhardt 0 siblings, 0 replies; 56+ messages in thread From: Patrick Steinhardt @ 2025-09-05 6:07 UTC (permalink / raw) To: phillip.wood; +Cc: Junio C Hamano, git, Johannes Schindelin, Wing Huang On Thu, Sep 04, 2025 at 02:30:58PM +0100, Phillip Wood wrote: > On 04/09/2025 08:09, Patrick Steinhardt wrote: > > On Wed, Sep 03, 2025 at 11:40:05AM -0700, Junio C Hamano wrote: > > > > > > I have no problem with that. I am still unsure about that "reftable > > > cares about the name being 'master'" thing. If that can live with > > > any 6 byte name, we may want to fix it to something different from > > > 'master', for the sake of removing 'master'. Perhaps 'banana' or > > > something? > > > > Huh, did I miss anything? I scanned the thread for reftables but > > couldn't find any discussion around it relying on a 6 byte name. Could > > you maybe provide a pointer to what you are referring to? > > c.f. <xmqqwm6ozn7d.fsf@gitster.g>. In t0613 some of the tests check various > sizes of things in the reftable and those depend on the length of the branch > name Ah, makes sense. Thanks for the pointer. Patrick ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH 6/6] breaking-changes: switch default branch to main 2025-09-03 18:40 ` Junio C Hamano 2025-09-04 7:09 ` Patrick Steinhardt @ 2025-09-04 13:27 ` Phillip Wood 1 sibling, 0 replies; 56+ messages in thread From: Phillip Wood @ 2025-09-04 13:27 UTC (permalink / raw) To: Junio C Hamano Cc: Patrick Steinhardt, phillip.wood, git, Johannes Schindelin, Wing Huang On 03/09/2025 19:40, Junio C Hamano wrote: > Phillip Wood <phillip.wood123@gmail.com> writes: >> ... like to keep the patches that switch the tests from using >> "master" to "main". > > I have no problem with that. I am still unsure about that "reftable > cares about the name being 'master'" thing. If that can live with > any 6 byte name, we may want to fix it to something different from > 'master', for the sake of removing 'master'. Perhaps 'banana' or > something? In the end I left it as "master" as the series was really about changing the default branch name rather than eliminating "master" from the test suite. There are a bunch of other tests that also use "git init -b master" which we may want to change in the future, though to me updating the documentation to stop using "master" as an example branch name would be a higher priority. Thanks Phillip ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH 0/6] breaking changes: switch default initial branch name to "main" 2025-08-27 15:24 [PATCH 0/6] breaking changes: switch default initial branch name to "main" Phillip Wood ` (5 preceding siblings ...) 2025-08-27 15:24 ` [PATCH 6/6] breaking-changes: switch default branch to main Phillip Wood @ 2025-08-28 13:12 ` Johannes Schindelin 2025-09-04 13:21 ` [PATCH v2 0/4] " Phillip Wood 2025-09-10 15:28 ` [PATCH v3 " Phillip Wood 8 siblings, 0 replies; 56+ messages in thread From: Johannes Schindelin @ 2025-08-28 13:12 UTC (permalink / raw) To: Phillip Wood; +Cc: git, Wing Huang Hi Phillip, On Wed, 27 Aug 2025, Phillip Wood wrote: > From: Phillip Wood <phillip.wood@dunelm.org.uk> > > This series switches the default branch name from "master" to "main" > when WITH_BREAKING_CHANGES is enabled. We have been warning that the > default name will change since 675704c74dd (init: provide useful advice > about init.defaultBranch, 2020-12-11) and the major git forges have all > switched their default branch name to "main", so I think it makes sense > to change the default branch name in git to match the wider ecosystem. > > The first five patches update tests that currently require a default > branch name different to "main". The sixth patch then changes the > default branch "main" and removes GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME > when WITH_BREAKING_CHANGES is enabled. Patch 2 is quite large but > is mechanically generated so it should be possible to review it by > checking that the changes can be reproduced. > > This is an alternative to changing the branch name now as suggested in > https://lore.kernel.org<pull.1961.git.1756183921623.gitgitgadget@gmail.com This link is slightly broken; The unbroken version is https://lore.kernel.org/git/pull.1961.git.1756183921623.gitgitgadget@gmail.com/ Thank you for picking this effort up! I am impressed by your courage in face of the way this `master -> main` initiative was received and the amount of leadership that was put behind it. The changes all look good to me, and while I have my doubts that Git will follow the laudable leadership demonstrated by the big Git forges in trying to be a bit more mindful, I will remain eagerly interested in any progress that can possibly be made here. Ciao, Johannes > > Base-Commit: f814da676ae46aac5be0a98b99373a76dee6cedb > Published-As: https://github.com/phillipwood/git/releases/tag/pw%2Finitial-branch-is-main%2Fv1 > View-Changes-At: https://github.com/phillipwood/git/compare/f814da676...487d1a331 > Fetch-It-Via: git fetch https://github.com/phillipwood/git pw/initial-branch-is-main/v1 > > > Phillip Wood (6): > t0018: switch default branch name to main > t4013: switch default branch name to main > t9902: switch default branch name to main > t0613: stop setting default initial branch > t1403: remove dependency on GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME > breaking-changes: switch default branch to main > > Documentation/BreakingChanges.adoc | 5 + > Documentation/git-init.adoc | 12 +- > advice.c | 2 + > advice.h | 2 + > ci/run-build-and-tests.sh | 1 - > refs.c | 16 +- > t/t0001-init.sh | 9 +- > t/t0018-advice.sh | 8 +- > t/t0613-reftable-write-options.sh | 18 +- > t/t1403-show-ref.sh | 6 +- > t/t4013-diff-various.sh | 228 +++++++++--------- > ...ree_--cc_--patch-with-stat_--summary_main} | 2 +- > ...iff.diff-tree_--cc_--patch-with-stat_main} | 2 +- > ...r => diff.diff-tree_--cc_--shortstat_main} | 2 +- > ...diff.diff-tree_--cc_--stat_--summary_main} | 2 +- > ...master => diff.diff-tree_--cc_--stat_main} | 2 +- > ...e_--cc_master => diff.diff-tree_--cc_main} | 2 +- > ...master => diff.diff-tree_-c_--abbrev_main} | 2 +- > ...> diff.diff-tree_-c_--stat_--summary_main} | 2 +- > ...t_master => diff.diff-tree_-c_--stat_main} | 2 +- > ...-tree_-c_master => diff.diff-tree_-c_main} | 2 +- > ...-tree_-m_master => diff.diff-tree_-m_main} | 2 +- > ...-p_-m_master => diff.diff-tree_-p_-m_main} | 2 +- > t/t4013/diff.diff-tree_-p_main | 2 + > t/t4013/diff.diff-tree_-p_master | 2 - > t/t4013/diff.diff-tree_main | 2 + > t/t4013/diff.diff-tree_master | 2 - > t/t4013/diff.diff_--dirstat_--cc_main~1_main | 3 + > .../diff.diff_--dirstat_--cc_master~1_master | 3 - > t/t4013/diff.diff_--dirstat_main~1_main~2 | 3 + > t/t4013/diff.diff_--dirstat_master~1_master~2 | 3 - > ...ff.diff_--line-prefix=abc_main_main^_side} | 2 +- > ...master^_side => diff.diff_main_main^_side} | 2 +- > ...mat-patch_--attach_--stdout_initial..main} | 2 +- > ...at-patch_--attach_--stdout_initial..main^} | 2 +- > ...e_--stdout_--numbered-files_initial..main} | 2 +- > ...t_--subject-prefix=TESTCASE_initial..main} | 2 +- > ...mat-patch_--inline_--stdout_initial..main} | 2 +- > ...at-patch_--inline_--stdout_initial..main^} | 2 +- > ...t-patch_--inline_--stdout_initial..main^^} | 2 +- > ...--stdout_--cover-letter_-n_initial..main^} | 2 +- > ...atch_--stdout_--no-numbered_initial..main} | 2 +- > ...t-patch_--stdout_--numbered_initial..main} | 2 +- > ... diff.format-patch_--stdout_initial..main} | 2 +- > ...diff.format-patch_--stdout_initial..main^} | 2 +- > ..._-m_-p_master => diff.log_--cc_-m_-p_main} | 2 +- > t/t4013/diff.log_--decorate=full_--all | 2 +- > ..._--decorate=full_--clear-decorations_--all | 2 +- > ...f.log_--decorate=full_--decorate-all_--all | 2 +- > t/t4013/diff.log_--decorate_--all | 2 +- > ...f.log_--decorate_--clear-decorations_--all | 2 +- > .../diff.log_--decorate_--decorate-all_--all | 2 +- > ... diff.log_--diff-merges=first-parent_main} | 2 +- > ..._--diff-merges=off_-p_--first-parent_main} | 2 +- > ..._--first-parent_--diff-merges=off_-p_main} | 2 +- > ...g_--no-diff-merges_-p_--first-parent_main} | 2 +- > ..._--patch-with-stat_--summary_main_--_dir_} | 2 +- > ...master => diff.log_--patch-with-stat_main} | 2 +- > ...> diff.log_--patch-with-stat_main_--_dir_} | 2 +- > ...oot_--cc_--patch-with-stat_--summary_main} | 2 +- > ...g_--root_--patch-with-stat_--summary_main} | 2 +- > ...=> diff.log_--root_--patch-with-stat_main} | 2 +- > ...-root_-c_--patch-with-stat_--summary_main} | 2 +- > ...root_-p_master => diff.log_--root_-p_main} | 2 +- > ...log_--root_master => diff.log_--root_main} | 2 +- > ...ter => diff.log_-GF_-p_--pickaxe-all_main} | 2 +- > ...log_-GF_-p_master => diff.log_-GF_-p_main} | 2 +- > ...{diff.log_-SF_master => diff.log_-GF_main} | 2 +- > ...aster => diff.log_-IA_-IB_-I1_-I2_-p_main} | 2 +- > ...log_-SF_-p_master => diff.log_-SF_-p_main} | 2 +- > ...{diff.log_-GF_master => diff.log_-SF_main} | 2 +- > t/t4013/diff.log_-SF_main_--max-count=0 | 2 + > ...ount=2 => diff.log_-SF_main_--max-count=1} | 2 +- > t/t4013/diff.log_-SF_main_--max-count=2 | 7 + > t/t4013/diff.log_-SF_master_--max-count=0 | 2 - > t/t4013/diff.log_-SF_master_--max-count=1 | 7 - > ...iff.log_-S_F_master => diff.log_-S_F_main} | 2 +- > ...cc_-m_-p_master => diff.log_-c_-m_-p_main} | 2 +- > ...-m_--raw_master => diff.log_-m_--raw_main} | 2 +- > ..._--stat_master => diff.log_-m_--stat_main} | 2 +- > ...ter => diff.log_-m_-p_--first-parent_main} | 2 +- > ...f.log_-m_-p_master => diff.log_-m_-p_main} | 2 +- > ...ff.log_-p_--diff-merges=first-parent_main} | 2 +- > ...master => diff.log_-p_--first-parent_main} | 2 +- > .../{diff.log_-p_master => diff.log_-p_main} | 2 +- > t/t4013/{diff.log_master => diff.log_main} | 2 +- > ...iff.noellipses-diff-tree_-c_--abbrev_main} | 2 +- > ...> diff.noellipses-whatchanged_--root_main} | 2 +- > ...r => diff.noellipses-whatchanged_-SF_main} | 2 +- > ...aster => diff.noellipses-whatchanged_main} | 2 +- > ...t_master => diff.show_--first-parent_main} | 2 +- > ...{diff.show_-c_master => diff.show_-c_main} | 2 +- > ...{diff.show_-m_master => diff.show_-m_main} | 2 +- > t/t4013/{diff.show_master => diff.show_main} | 2 +- > ..._--patch-with-stat_--summary_main_--_dir_} | 2 +- > ...> diff.whatchanged_--patch-with-stat_main} | 2 +- > ...hatchanged_--patch-with-stat_main_--_dir_} | 2 +- > ...oot_--cc_--patch-with-stat_--summary_main} | 2 +- > ...d_--root_--patch-with-stat_--summary_main} | 2 +- > ...whatchanged_--root_--patch-with-stat_main} | 2 +- > ...-root_-c_--patch-with-stat_--summary_main} | 2 +- > ...master => diff.whatchanged_--root_-p_main} | 2 +- > ...ot_master => diff.whatchanged_--root_main} | 2 +- > ...-p_master => diff.whatchanged_-SF_-p_main} | 2 +- > ...d_-SF_master => diff.whatchanged_-SF_main} | 2 +- > ...ged_-p_master => diff.whatchanged_-p_main} | 2 +- > ...atchanged_master => diff.whatchanged_main} | 2 +- > t/t9902-completion.sh | 6 +- > t/test-lib.sh | 15 +- > 109 files changed, 281 insertions(+), 253 deletions(-) > rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_--summary_master => diff.diff-tree_--cc_--patch-with-stat_--summary_main} (86%) > rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_master => diff.diff-tree_--cc_--patch-with-stat_main} (89%) > rename t/t4013/{diff.diff-tree_--cc_--shortstat_master => diff.diff-tree_--cc_--shortstat_main} (65%) > rename t/t4013/{diff.diff-tree_-c_--stat_--summary_master => diff.diff-tree_--cc_--stat_--summary_main} (71%) > rename t/t4013/{diff.diff-tree_-c_--stat_master => diff.diff-tree_--cc_--stat_main} (76%) > rename t/t4013/{diff.diff-tree_--cc_master => diff.diff-tree_--cc_main} (91%) > rename t/t4013/{diff.diff-tree_-c_--abbrev_master => diff.diff-tree_-c_--abbrev_main} (83%) > rename t/t4013/{diff.diff-tree_--cc_--stat_--summary_master => diff.diff-tree_-c_--stat_--summary_main} (70%) > rename t/t4013/{diff.diff-tree_--cc_--stat_master => diff.diff-tree_-c_--stat_main} (75%) > rename t/t4013/{diff.diff-tree_-c_master => diff.diff-tree_-c_main} (93%) > rename t/t4013/{diff.diff-tree_-m_master => diff.diff-tree_-m_main} (96%) > rename t/t4013/{diff.diff-tree_-p_-m_master => diff.diff-tree_-p_-m_main} (97%) > create mode 100644 t/t4013/diff.diff-tree_-p_main > delete mode 100644 t/t4013/diff.diff-tree_-p_master > create mode 100644 t/t4013/diff.diff-tree_main > delete mode 100644 t/t4013/diff.diff-tree_master > create mode 100644 t/t4013/diff.diff_--dirstat_--cc_main~1_main > delete mode 100644 t/t4013/diff.diff_--dirstat_--cc_master~1_master > create mode 100644 t/t4013/diff.diff_--dirstat_main~1_main~2 > delete mode 100644 t/t4013/diff.diff_--dirstat_master~1_master~2 > rename t/t4013/{diff.diff_--line-prefix=abc_master_master^_side => diff.diff_--line-prefix=abc_main_main^_side} (87%) > rename t/t4013/{diff.diff_master_master^_side => diff.diff_main_main^_side} (89%) > rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master => diff.format-patch_--attach_--stdout_initial..main} (98%) > rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master^ => diff.format-patch_--attach_--stdout_initial..main^} (97%) > rename t/t4013/{diff.format-patch_--inline_--stdout_--numbered-files_initial..master => diff.format-patch_--inline_--stdout_--numbered-files_initial..main} (99%) > rename t/t4013/{diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master => diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main} (99%) > rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master => diff.format-patch_--inline_--stdout_initial..main} (98%) > rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^ => diff.format-patch_--inline_--stdout_initial..main^} (97%) > rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^^ => diff.format-patch_--inline_--stdout_initial..main^^} (95%) > rename t/t4013/{diff.format-patch_--stdout_--cover-letter_-n_initial..master^ => diff.format-patch_--stdout_--cover-letter_-n_initial..main^} (96%) > rename t/t4013/{diff.format-patch_--stdout_--no-numbered_initial..master => diff.format-patch_--stdout_--no-numbered_initial..main} (97%) > rename t/t4013/{diff.format-patch_--stdout_--numbered_initial..master => diff.format-patch_--stdout_--numbered_initial..main} (97%) > rename t/t4013/{diff.format-patch_--stdout_initial..master => diff.format-patch_--stdout_initial..main} (97%) > rename t/t4013/{diff.format-patch_--stdout_initial..master^ => diff.format-patch_--stdout_initial..main^} (96%) > rename t/t4013/{diff.log_-c_-m_-p_master => diff.log_--cc_-m_-p_main} (99%) > rename t/t4013/{diff.log_--diff-merges=first-parent_master => diff.log_--diff-merges=first-parent_main} (95%) > rename t/t4013/{diff.log_--no-diff-merges_-p_--first-parent_master => diff.log_--diff-merges=off_-p_--first-parent_main} (95%) > rename t/t4013/{diff.log_--first-parent_--diff-merges=off_-p_master => diff.log_--first-parent_--diff-merges=off_-p_main} (95%) > rename t/t4013/{diff.log_--diff-merges=off_-p_--first-parent_master => diff.log_--no-diff-merges_-p_--first-parent_main} (95%) > rename t/t4013/{diff.log_--patch-with-stat_--summary_master_--_dir_ => diff.log_--patch-with-stat_--summary_main_--_dir_} (96%) > rename t/t4013/{diff.log_--patch-with-stat_master => diff.log_--patch-with-stat_main} (98%) > rename t/t4013/{diff.log_--patch-with-stat_master_--_dir_ => diff.log_--patch-with-stat_main_--_dir_} (96%) > rename t/t4013/{diff.log_--root_--cc_--patch-with-stat_--summary_master => diff.log_--root_--cc_--patch-with-stat_--summary_main} (98%) > rename t/t4013/{diff.log_--root_--patch-with-stat_--summary_master => diff.log_--root_--patch-with-stat_--summary_main} (98%) > rename t/t4013/{diff.log_--root_--patch-with-stat_master => diff.log_--root_--patch-with-stat_main} (98%) > rename t/t4013/{diff.log_--root_-c_--patch-with-stat_--summary_master => diff.log_--root_-c_--patch-with-stat_--summary_main} (98%) > rename t/t4013/{diff.log_--root_-p_master => diff.log_--root_-p_main} (98%) > rename t/t4013/{diff.log_--root_master => diff.log_--root_main} (96%) > rename t/t4013/{diff.log_-GF_-p_--pickaxe-all_master => diff.log_-GF_-p_--pickaxe-all_main} (90%) > rename t/t4013/{diff.log_-GF_-p_master => diff.log_-GF_-p_main} (91%) > rename t/t4013/{diff.log_-SF_master => diff.log_-GF_main} (86%) > rename t/t4013/{diff.log_-IA_-IB_-I1_-I2_-p_master => diff.log_-IA_-IB_-I1_-I2_-p_main} (97%) > rename t/t4013/{diff.log_-SF_-p_master => diff.log_-SF_-p_main} (91%) > rename t/t4013/{diff.log_-GF_master => diff.log_-SF_main} (86%) > create mode 100644 t/t4013/diff.log_-SF_main_--max-count=0 > rename t/t4013/{diff.log_-SF_master_--max-count=2 => diff.log_-SF_main_--max-count=1} (79%) > create mode 100644 t/t4013/diff.log_-SF_main_--max-count=2 > delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=0 > delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=1 > rename t/t4013/{diff.log_-S_F_master => diff.log_-S_F_main} (86%) > rename t/t4013/{diff.log_--cc_-m_-p_master => diff.log_-c_-m_-p_main} (99%) > rename t/t4013/{diff.log_-m_--raw_master => diff.log_-m_--raw_main} (98%) > rename t/t4013/{diff.log_-m_--stat_master => diff.log_-m_--stat_main} (98%) > rename t/t4013/{diff.log_-m_-p_--first-parent_master => diff.log_-m_-p_--first-parent_main} (97%) > rename t/t4013/{diff.log_-m_-p_master => diff.log_-m_-p_main} (99%) > rename t/t4013/{diff.log_-p_--diff-merges=first-parent_master => diff.log_-p_--diff-merges=first-parent_main} (97%) > rename t/t4013/{diff.log_-p_--first-parent_master => diff.log_-p_--first-parent_main} (97%) > rename t/t4013/{diff.log_-p_master => diff.log_-p_main} (98%) > rename t/t4013/{diff.log_master => diff.log_main} (97%) > rename t/t4013/{diff.noellipses-diff-tree_-c_--abbrev_master => diff.noellipses-diff-tree_-c_--abbrev_main} (81%) > rename t/t4013/{diff.noellipses-whatchanged_--root_master => diff.noellipses-whatchanged_--root_main} (96%) > rename t/t4013/{diff.noellipses-whatchanged_-SF_master => diff.noellipses-whatchanged_-SF_main} (86%) > rename t/t4013/{diff.noellipses-whatchanged_master => diff.noellipses-whatchanged_main} (96%) > rename t/t4013/{diff.show_--first-parent_master => diff.show_--first-parent_main} (92%) > rename t/t4013/{diff.show_-c_master => diff.show_-c_main} (95%) > rename t/t4013/{diff.show_-m_master => diff.show_-m_main} (98%) > rename t/t4013/{diff.show_master => diff.show_main} (96%) > rename t/t4013/{diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ => diff.whatchanged_--patch-with-stat_--summary_main_--_dir_} (94%) > rename t/t4013/{diff.whatchanged_--patch-with-stat_master => diff.whatchanged_--patch-with-stat_main} (97%) > rename t/t4013/{diff.whatchanged_--patch-with-stat_master_--_dir_ => diff.whatchanged_--patch-with-stat_main_--_dir_} (94%) > rename t/t4013/{diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master => diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main} (97%) > rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_--summary_master => diff.whatchanged_--root_--patch-with-stat_--summary_main} (97%) > rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_master => diff.whatchanged_--root_--patch-with-stat_main} (97%) > rename t/t4013/{diff.whatchanged_--root_-c_--patch-with-stat_--summary_master => diff.whatchanged_--root_-c_--patch-with-stat_--summary_main} (97%) > rename t/t4013/{diff.whatchanged_--root_-p_master => diff.whatchanged_--root_-p_main} (98%) > rename t/t4013/{diff.whatchanged_--root_master => diff.whatchanged_--root_main} (97%) > rename t/t4013/{diff.whatchanged_-SF_-p_master => diff.whatchanged_-SF_-p_main} (89%) > rename t/t4013/{diff.whatchanged_-SF_master => diff.whatchanged_-SF_main} (86%) > rename t/t4013/{diff.whatchanged_-p_master => diff.whatchanged_-p_main} (98%) > rename t/t4013/{diff.whatchanged_master => diff.whatchanged_main} (97%) > > -- > 2.49.0.897.gfad3eb7d210 > > > ^ permalink raw reply [flat|nested] 56+ messages in thread
* [PATCH v2 0/4] breaking changes: switch default initial branch name to "main" 2025-08-27 15:24 [PATCH 0/6] breaking changes: switch default initial branch name to "main" Phillip Wood ` (6 preceding siblings ...) 2025-08-28 13:12 ` [PATCH 0/6] breaking changes: switch default initial branch name to "main" Johannes Schindelin @ 2025-09-04 13:21 ` Phillip Wood 2025-09-04 13:21 ` [PATCH v2 1/4] breaking-changes: switch default branch to main Phillip Wood ` (4 more replies) 2025-09-10 15:28 ` [PATCH v3 " Phillip Wood 8 siblings, 5 replies; 56+ messages in thread From: Phillip Wood @ 2025-09-04 13:21 UTC (permalink / raw) To: git; +Cc: Johannes Schindelin, Wing Huang, Junio C Hamano, Patrick Steinhardt From: Phillip Wood <phillip.wood@dunelm.org.uk> This series switches the default branch name from "master" to "main" when WITH_BREAKING_CHANGES is enabled. We have been warning that the default name will change since 675704c74dd (init: provide useful advice about init.defaultBranch, 2020-12-11) and the major git forges have all switched their default branch name to "main", so I think it makes sense to change the default branch name in git to match the wider ecosystem. The first patch switches the default initial branch name to "main" and the other three patches remove the last remaining instances of GIT_TEST_DEFAULT_BRANCH_NAME=master from the test suite. Patch 2 is quite large but is mechanically generated so it should be possible to review it by checking that the changes can be reproduced. As this series changes the default branch name it focuses on updating tests that rely on the default branch name being "master", there are still a number of tests that create a branch called "master". Thanks to everyone who commented on V1, I have dropped the removal of GIT_TEST_DEFAULT_BRANCH_NAME and the test changes related to that but have kept the patches that remove GIT_TEST_DEFAULT_BRANCH_NAME=master. The patches have been re-ordered so that the change to the default initial branch name comes first. That patch now includes a test for the default initial branch name and includes the changes to the commit message and documentation suggested by Patrick and Junio. The commit messages for the other patches have been reworded now that GIT_TEST_DEFAULT_BRANCH_NAME is not being removed but the code changes are the same. This is an alternative to changing the branch name now as suggested in https://lore.kernel.org<pull.1961.git.1756183921623.gitgitgadget@gmail.com Base-Commit: f814da676ae46aac5be0a98b99373a76dee6cedb Published-As: https://github.com/phillipwood/git/releases/tag/pw%2Finitial-branch-is-main%2Fv2 View-Changes-At: https://github.com/phillipwood/git/compare/f814da676...c4d89c376 Fetch-It-Via: git fetch https://github.com/phillipwood/git pw/initial-branch-is-main/v2 Phillip Wood (4): breaking-changes: switch default branch to main t4013: switch default branch name to main t9902: switch default branch name to main t0613: stop setting default initial branch Documentation/BreakingChanges.adoc | 5 + Documentation/git-init.adoc | 12 +- advice.c | 2 + advice.h | 2 + ci/run-build-and-tests.sh | 1 - refs.c | 15 +- t/t0001-init.sh | 18 +- t/t0613-reftable-write-options.sh | 20 +- t/t4013-diff-various.sh | 228 +++++++++--------- ...ree_--cc_--patch-with-stat_--summary_main} | 2 +- ...iff.diff-tree_--cc_--patch-with-stat_main} | 2 +- ...r => diff.diff-tree_--cc_--shortstat_main} | 2 +- ...diff.diff-tree_--cc_--stat_--summary_main} | 2 +- ...master => diff.diff-tree_--cc_--stat_main} | 2 +- ...e_--cc_master => diff.diff-tree_--cc_main} | 2 +- ...master => diff.diff-tree_-c_--abbrev_main} | 2 +- ...> diff.diff-tree_-c_--stat_--summary_main} | 2 +- ...t_master => diff.diff-tree_-c_--stat_main} | 2 +- ...-tree_-c_master => diff.diff-tree_-c_main} | 2 +- ...-tree_-m_master => diff.diff-tree_-m_main} | 2 +- ...-p_-m_master => diff.diff-tree_-p_-m_main} | 2 +- t/t4013/diff.diff-tree_-p_main | 2 + t/t4013/diff.diff-tree_-p_master | 2 - t/t4013/diff.diff-tree_main | 2 + t/t4013/diff.diff-tree_master | 2 - t/t4013/diff.diff_--dirstat_--cc_main~1_main | 3 + .../diff.diff_--dirstat_--cc_master~1_master | 3 - t/t4013/diff.diff_--dirstat_main~1_main~2 | 3 + t/t4013/diff.diff_--dirstat_master~1_master~2 | 3 - ...ff.diff_--line-prefix=abc_main_main^_side} | 2 +- ...master^_side => diff.diff_main_main^_side} | 2 +- ...mat-patch_--attach_--stdout_initial..main} | 2 +- ...at-patch_--attach_--stdout_initial..main^} | 2 +- ...e_--stdout_--numbered-files_initial..main} | 2 +- ...t_--subject-prefix=TESTCASE_initial..main} | 2 +- ...mat-patch_--inline_--stdout_initial..main} | 2 +- ...at-patch_--inline_--stdout_initial..main^} | 2 +- ...t-patch_--inline_--stdout_initial..main^^} | 2 +- ...--stdout_--cover-letter_-n_initial..main^} | 2 +- ...atch_--stdout_--no-numbered_initial..main} | 2 +- ...t-patch_--stdout_--numbered_initial..main} | 2 +- ... diff.format-patch_--stdout_initial..main} | 2 +- ...diff.format-patch_--stdout_initial..main^} | 2 +- ..._-m_-p_master => diff.log_--cc_-m_-p_main} | 2 +- t/t4013/diff.log_--decorate=full_--all | 2 +- ..._--decorate=full_--clear-decorations_--all | 2 +- ...f.log_--decorate=full_--decorate-all_--all | 2 +- t/t4013/diff.log_--decorate_--all | 2 +- ...f.log_--decorate_--clear-decorations_--all | 2 +- .../diff.log_--decorate_--decorate-all_--all | 2 +- ... diff.log_--diff-merges=first-parent_main} | 2 +- ..._--diff-merges=off_-p_--first-parent_main} | 2 +- ..._--first-parent_--diff-merges=off_-p_main} | 2 +- ...g_--no-diff-merges_-p_--first-parent_main} | 2 +- ..._--patch-with-stat_--summary_main_--_dir_} | 2 +- ...master => diff.log_--patch-with-stat_main} | 2 +- ...> diff.log_--patch-with-stat_main_--_dir_} | 2 +- ...oot_--cc_--patch-with-stat_--summary_main} | 2 +- ...g_--root_--patch-with-stat_--summary_main} | 2 +- ...=> diff.log_--root_--patch-with-stat_main} | 2 +- ...-root_-c_--patch-with-stat_--summary_main} | 2 +- ...root_-p_master => diff.log_--root_-p_main} | 2 +- ...log_--root_master => diff.log_--root_main} | 2 +- ...ter => diff.log_-GF_-p_--pickaxe-all_main} | 2 +- ...log_-GF_-p_master => diff.log_-GF_-p_main} | 2 +- ...{diff.log_-SF_master => diff.log_-GF_main} | 2 +- ...aster => diff.log_-IA_-IB_-I1_-I2_-p_main} | 2 +- ...log_-SF_-p_master => diff.log_-SF_-p_main} | 2 +- ...{diff.log_-GF_master => diff.log_-SF_main} | 2 +- t/t4013/diff.log_-SF_main_--max-count=0 | 2 + ...ount=2 => diff.log_-SF_main_--max-count=1} | 2 +- t/t4013/diff.log_-SF_main_--max-count=2 | 7 + t/t4013/diff.log_-SF_master_--max-count=0 | 2 - t/t4013/diff.log_-SF_master_--max-count=1 | 7 - ...iff.log_-S_F_master => diff.log_-S_F_main} | 2 +- ...cc_-m_-p_master => diff.log_-c_-m_-p_main} | 2 +- ...-m_--raw_master => diff.log_-m_--raw_main} | 2 +- ..._--stat_master => diff.log_-m_--stat_main} | 2 +- ...ter => diff.log_-m_-p_--first-parent_main} | 2 +- ...f.log_-m_-p_master => diff.log_-m_-p_main} | 2 +- ...ff.log_-p_--diff-merges=first-parent_main} | 2 +- ...master => diff.log_-p_--first-parent_main} | 2 +- .../{diff.log_-p_master => diff.log_-p_main} | 2 +- t/t4013/{diff.log_master => diff.log_main} | 2 +- ...iff.noellipses-diff-tree_-c_--abbrev_main} | 2 +- ...> diff.noellipses-whatchanged_--root_main} | 2 +- ...r => diff.noellipses-whatchanged_-SF_main} | 2 +- ...aster => diff.noellipses-whatchanged_main} | 2 +- ...t_master => diff.show_--first-parent_main} | 2 +- ...{diff.show_-c_master => diff.show_-c_main} | 2 +- ...{diff.show_-m_master => diff.show_-m_main} | 2 +- t/t4013/{diff.show_master => diff.show_main} | 2 +- ..._--patch-with-stat_--summary_main_--_dir_} | 2 +- ...> diff.whatchanged_--patch-with-stat_main} | 2 +- ...hatchanged_--patch-with-stat_main_--_dir_} | 2 +- ...oot_--cc_--patch-with-stat_--summary_main} | 2 +- ...d_--root_--patch-with-stat_--summary_main} | 2 +- ...whatchanged_--root_--patch-with-stat_main} | 2 +- ...-root_-c_--patch-with-stat_--summary_main} | 2 +- ...master => diff.whatchanged_--root_-p_main} | 2 +- ...ot_master => diff.whatchanged_--root_main} | 2 +- ...-p_master => diff.whatchanged_-SF_-p_main} | 2 +- ...d_-SF_master => diff.whatchanged_-SF_main} | 2 +- ...ged_-p_master => diff.whatchanged_-p_main} | 2 +- ...atchanged_master => diff.whatchanged_main} | 2 +- t/t9902-completion.sh | 6 +- t/test-lib.sh | 11 +- 107 files changed, 282 insertions(+), 244 deletions(-) rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_--summary_master => diff.diff-tree_--cc_--patch-with-stat_--summary_main} (86%) rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_master => diff.diff-tree_--cc_--patch-with-stat_main} (89%) rename t/t4013/{diff.diff-tree_--cc_--shortstat_master => diff.diff-tree_--cc_--shortstat_main} (65%) rename t/t4013/{diff.diff-tree_-c_--stat_--summary_master => diff.diff-tree_--cc_--stat_--summary_main} (71%) rename t/t4013/{diff.diff-tree_-c_--stat_master => diff.diff-tree_--cc_--stat_main} (76%) rename t/t4013/{diff.diff-tree_--cc_master => diff.diff-tree_--cc_main} (91%) rename t/t4013/{diff.diff-tree_-c_--abbrev_master => diff.diff-tree_-c_--abbrev_main} (83%) rename t/t4013/{diff.diff-tree_--cc_--stat_--summary_master => diff.diff-tree_-c_--stat_--summary_main} (70%) rename t/t4013/{diff.diff-tree_--cc_--stat_master => diff.diff-tree_-c_--stat_main} (75%) rename t/t4013/{diff.diff-tree_-c_master => diff.diff-tree_-c_main} (93%) rename t/t4013/{diff.diff-tree_-m_master => diff.diff-tree_-m_main} (96%) rename t/t4013/{diff.diff-tree_-p_-m_master => diff.diff-tree_-p_-m_main} (97%) create mode 100644 t/t4013/diff.diff-tree_-p_main delete mode 100644 t/t4013/diff.diff-tree_-p_master create mode 100644 t/t4013/diff.diff-tree_main delete mode 100644 t/t4013/diff.diff-tree_master create mode 100644 t/t4013/diff.diff_--dirstat_--cc_main~1_main delete mode 100644 t/t4013/diff.diff_--dirstat_--cc_master~1_master create mode 100644 t/t4013/diff.diff_--dirstat_main~1_main~2 delete mode 100644 t/t4013/diff.diff_--dirstat_master~1_master~2 rename t/t4013/{diff.diff_--line-prefix=abc_master_master^_side => diff.diff_--line-prefix=abc_main_main^_side} (87%) rename t/t4013/{diff.diff_master_master^_side => diff.diff_main_main^_side} (89%) rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master => diff.format-patch_--attach_--stdout_initial..main} (98%) rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master^ => diff.format-patch_--attach_--stdout_initial..main^} (97%) rename t/t4013/{diff.format-patch_--inline_--stdout_--numbered-files_initial..master => diff.format-patch_--inline_--stdout_--numbered-files_initial..main} (99%) rename t/t4013/{diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master => diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main} (99%) rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master => diff.format-patch_--inline_--stdout_initial..main} (98%) rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^ => diff.format-patch_--inline_--stdout_initial..main^} (97%) rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^^ => diff.format-patch_--inline_--stdout_initial..main^^} (95%) rename t/t4013/{diff.format-patch_--stdout_--cover-letter_-n_initial..master^ => diff.format-patch_--stdout_--cover-letter_-n_initial..main^} (96%) rename t/t4013/{diff.format-patch_--stdout_--no-numbered_initial..master => diff.format-patch_--stdout_--no-numbered_initial..main} (97%) rename t/t4013/{diff.format-patch_--stdout_--numbered_initial..master => diff.format-patch_--stdout_--numbered_initial..main} (97%) rename t/t4013/{diff.format-patch_--stdout_initial..master => diff.format-patch_--stdout_initial..main} (97%) rename t/t4013/{diff.format-patch_--stdout_initial..master^ => diff.format-patch_--stdout_initial..main^} (96%) rename t/t4013/{diff.log_-c_-m_-p_master => diff.log_--cc_-m_-p_main} (99%) rename t/t4013/{diff.log_--diff-merges=first-parent_master => diff.log_--diff-merges=first-parent_main} (95%) rename t/t4013/{diff.log_--no-diff-merges_-p_--first-parent_master => diff.log_--diff-merges=off_-p_--first-parent_main} (95%) rename t/t4013/{diff.log_--first-parent_--diff-merges=off_-p_master => diff.log_--first-parent_--diff-merges=off_-p_main} (95%) rename t/t4013/{diff.log_--diff-merges=off_-p_--first-parent_master => diff.log_--no-diff-merges_-p_--first-parent_main} (95%) rename t/t4013/{diff.log_--patch-with-stat_--summary_master_--_dir_ => diff.log_--patch-with-stat_--summary_main_--_dir_} (96%) rename t/t4013/{diff.log_--patch-with-stat_master => diff.log_--patch-with-stat_main} (98%) rename t/t4013/{diff.log_--patch-with-stat_master_--_dir_ => diff.log_--patch-with-stat_main_--_dir_} (96%) rename t/t4013/{diff.log_--root_--cc_--patch-with-stat_--summary_master => diff.log_--root_--cc_--patch-with-stat_--summary_main} (98%) rename t/t4013/{diff.log_--root_--patch-with-stat_--summary_master => diff.log_--root_--patch-with-stat_--summary_main} (98%) rename t/t4013/{diff.log_--root_--patch-with-stat_master => diff.log_--root_--patch-with-stat_main} (98%) rename t/t4013/{diff.log_--root_-c_--patch-with-stat_--summary_master => diff.log_--root_-c_--patch-with-stat_--summary_main} (98%) rename t/t4013/{diff.log_--root_-p_master => diff.log_--root_-p_main} (98%) rename t/t4013/{diff.log_--root_master => diff.log_--root_main} (96%) rename t/t4013/{diff.log_-GF_-p_--pickaxe-all_master => diff.log_-GF_-p_--pickaxe-all_main} (90%) rename t/t4013/{diff.log_-GF_-p_master => diff.log_-GF_-p_main} (91%) rename t/t4013/{diff.log_-SF_master => diff.log_-GF_main} (86%) rename t/t4013/{diff.log_-IA_-IB_-I1_-I2_-p_master => diff.log_-IA_-IB_-I1_-I2_-p_main} (97%) rename t/t4013/{diff.log_-SF_-p_master => diff.log_-SF_-p_main} (91%) rename t/t4013/{diff.log_-GF_master => diff.log_-SF_main} (86%) create mode 100644 t/t4013/diff.log_-SF_main_--max-count=0 rename t/t4013/{diff.log_-SF_master_--max-count=2 => diff.log_-SF_main_--max-count=1} (79%) create mode 100644 t/t4013/diff.log_-SF_main_--max-count=2 delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=0 delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=1 rename t/t4013/{diff.log_-S_F_master => diff.log_-S_F_main} (86%) rename t/t4013/{diff.log_--cc_-m_-p_master => diff.log_-c_-m_-p_main} (99%) rename t/t4013/{diff.log_-m_--raw_master => diff.log_-m_--raw_main} (98%) rename t/t4013/{diff.log_-m_--stat_master => diff.log_-m_--stat_main} (98%) rename t/t4013/{diff.log_-m_-p_--first-parent_master => diff.log_-m_-p_--first-parent_main} (97%) rename t/t4013/{diff.log_-m_-p_master => diff.log_-m_-p_main} (99%) rename t/t4013/{diff.log_-p_--diff-merges=first-parent_master => diff.log_-p_--diff-merges=first-parent_main} (97%) rename t/t4013/{diff.log_-p_--first-parent_master => diff.log_-p_--first-parent_main} (97%) rename t/t4013/{diff.log_-p_master => diff.log_-p_main} (98%) rename t/t4013/{diff.log_master => diff.log_main} (97%) rename t/t4013/{diff.noellipses-diff-tree_-c_--abbrev_master => diff.noellipses-diff-tree_-c_--abbrev_main} (81%) rename t/t4013/{diff.noellipses-whatchanged_--root_master => diff.noellipses-whatchanged_--root_main} (96%) rename t/t4013/{diff.noellipses-whatchanged_-SF_master => diff.noellipses-whatchanged_-SF_main} (86%) rename t/t4013/{diff.noellipses-whatchanged_master => diff.noellipses-whatchanged_main} (96%) rename t/t4013/{diff.show_--first-parent_master => diff.show_--first-parent_main} (92%) rename t/t4013/{diff.show_-c_master => diff.show_-c_main} (95%) rename t/t4013/{diff.show_-m_master => diff.show_-m_main} (98%) rename t/t4013/{diff.show_master => diff.show_main} (96%) rename t/t4013/{diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ => diff.whatchanged_--patch-with-stat_--summary_main_--_dir_} (94%) rename t/t4013/{diff.whatchanged_--patch-with-stat_master => diff.whatchanged_--patch-with-stat_main} (97%) rename t/t4013/{diff.whatchanged_--patch-with-stat_master_--_dir_ => diff.whatchanged_--patch-with-stat_main_--_dir_} (94%) rename t/t4013/{diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master => diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main} (97%) rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_--summary_master => diff.whatchanged_--root_--patch-with-stat_--summary_main} (97%) rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_master => diff.whatchanged_--root_--patch-with-stat_main} (97%) rename t/t4013/{diff.whatchanged_--root_-c_--patch-with-stat_--summary_master => diff.whatchanged_--root_-c_--patch-with-stat_--summary_main} (97%) rename t/t4013/{diff.whatchanged_--root_-p_master => diff.whatchanged_--root_-p_main} (98%) rename t/t4013/{diff.whatchanged_--root_master => diff.whatchanged_--root_main} (97%) rename t/t4013/{diff.whatchanged_-SF_-p_master => diff.whatchanged_-SF_-p_main} (89%) rename t/t4013/{diff.whatchanged_-SF_master => diff.whatchanged_-SF_main} (86%) rename t/t4013/{diff.whatchanged_-p_master => diff.whatchanged_-p_main} (98%) rename t/t4013/{diff.whatchanged_master => diff.whatchanged_main} (97%) Range-diff against v1: 1: 7c20f7693f4 < -: ----------- t0018: switch default branch name to main 6: 487d1a33130 ! 1: 6986375dc37 breaking-changes: switch default branch to main @@ Commit message breaking-changes: switch default branch to main Since 1296cbe4b46 (init: document `init.defaultBranch` better, - 2020-12-11) "git-init.adoc" has advertized that the default name + 2020-12-11) "git-init.adoc" has advertised that the default name of the initial branch may change in the future. The name "main" - is chosen to match the default used by the big git forge web sites. + is chosen to match the default used by the big Git forge web sites. - The advice printed when init.defaultBranch is not set is - updated to say that the default will change to "main" in Git - 3.0. Building with WITH_BREAKING_CHANGES enabled removes the advice, - changes the default branch name is "main" and removes support for - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME. The code in guess_remote_head() + The advice printed when init.defaultBranch is not set is updated + to say that the default will change to "main" in Git 3.0. Building + with WITH_BREAKING_CHANGES enabled removes the advice and changes + the default branch name to "main". The code in guess_remote_head() that looks for "refs/heads/master" is left unchanged as that is only called when the remote server does not support the symref capability in the v0 protocol or the symref extension to the ls-refs list in the @@ Documentation/BreakingChanges.adoc: A prerequisite for this change is that the e "reftable" format. Most importantly, alternative implementations of Git like JGit, libgit2 and Gitoxide need to support it. -+* The default branch name will be `main`. We have been warning that the default -+ name will change since 675704c74dd (init: provide useful advice about -+ init.defaultBranch, 2020-12-11). The new name matches the default branch name -+ used by many of the big git forges. ++* In new repositories the default branch name will be `main`. We have been ++ warning that the default name will change since 675704c74dd (init: provide ++ useful advice about init.defaultBranch, 2020-12-11). The new name matches ++ the default branch name used by many of the big Git forges. + === Removals @@ Documentation/git-init.adoc: If this is a reinitialization, the repository will +(currently `master`, but this will change to `main` when Git 3.0 is released). +endif::with-breaking-changes[] +ifdef::with-breaking-changes[] -+(`main`). ++`main`. +endif::with-breaking-changes[] +The default name can be customized via the `init.defaultBranch` configuration +variable. @@ refs.c: static const char default_branch_name_advice[] = N_( ); +#endif /* WITH_BREAKING_CHANGES */ - char *repo_default_branch_name(struct repository *r, int quiet) +-char *repo_default_branch_name(struct repository *r, int quiet) ++char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet) { const char *config_key = "init.defaultbranch"; const char *config_display_key = "init.defaultBranch"; - char *ret = NULL, *full_ref; -+#ifndef WITH_BREAKING_CHANGES - const char *env = getenv("GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME"); +@@ refs.c: char *repo_default_branch_name(struct repository *r, int quiet) if (env && *env) ret = xstrdup(env); - else if (repo_config_get_string(r, config_key, &ret) < 0) -+#endif /* WITH_BREAKING_CHANGES */ + if (!ret && repo_config_get_string(r, config_key, &ret) < 0) die(_("could not retrieve `%s`"), config_display_key); if (!ret) { +#ifdef WITH_BREAKING_CHANGES + ret = xstrdup("main"); -+ (void) quiet; /* Silence -Wunused-parameter */ +#else ret = xstrdup("master"); if (!quiet) @@ t/t0001-init.sh: test_expect_success 'advice on unconfigured init.defaultBranch test_grep ! "hint: " err ' --test_expect_success 'overridden default main branch name (env)' ' -+test_expect_success !WITH_BREAKING_CHANGES 'overridden default main branch name (env)' ' ++test_expect_success 'default branch name' ' ++ if test_have_prereq WITH_BREAKING_CHANGES ++ then ++ expect=main ++ else ++ expect=master ++ fi && ++ echo "refs/heads/$expect" >expect && ++ ( ++ sane_unset GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME && ++ git init default-initial-branch-name ++ ) && ++ git -C default-initial-branch-name symbolic-ref HEAD >actual && ++ test_cmp expect actual ++' ++ + test_expect_success 'overridden default main branch name (env)' ' test_config_global init.defaultBranch nmb && GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=env git init main-branch-env && - git -C main-branch-env symbolic-ref HEAD >actual && - grep env actual - ' - - test_expect_success 'invalid default branch name' ' -- test_must_fail env GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME="with space" \ -- git init initial-branch-invalid 2>err && -+ test_must_fail env GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \ -+ git -c init.defaultBranch="with space" \ -+ init initial-branch-invalid 2>err && - test_grep "invalid branch name" err - ' - ## t/test-lib.sh ## @@ t/test-lib.sh: then @@ t/test-lib.sh: then + # transitory "git init" warning under --verbose. + : ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master} + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME -+else -+ # Unset the default branch name that is set in many test scripts -+ # before sourcing this file. -+ unset GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +fi ################################################################ 2: c445cf9c65e ! 2: 2a112a1b983 t4013: switch default branch name to main @@ Metadata ## Commit message ## t4013: switch default branch name to main - In preparation for removing TEST_GIT_DEFAULT_INITIAL_BRANCH in Git 3.0 - switch the default branch name to main. - - The changes here are purely mechanical replacing 'master' with 'main' + Remove one of the last remaining uses of + "TEST_GIT_DEFAULT_INITIAL_BRANCH= main" in the test suite. We have + been steadily be converting tests from using "master" as the default + branch name since the introduction of TEST_GIT_DEFAULT_INITIAL_BRANCH + in 704fed9ea22 (tests: start moving to a different default main branch + name, 2020-10-23) The changes here are purely mechanical replacing + "master" with "main" Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> 3: d8a382a79eb ! 3: f1bf01e1322 t9902: switch default branch name to main @@ Metadata ## Commit message ## t9902: switch default branch name to main - In preparation for removing GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME in - Git 3.0 update the bash completion tests that rely on the default - branch name being master. + Remove the penultimate use of "GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= + main" in our test suite. We have slowly been removing these ever since + we started to switch the default branch name used in tests to "main". Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> 4: bbf79dd64fe ! 4: c4d89c3761b t0613: stop setting default initial branch @@ Metadata ## Commit message ## t0613: stop setting default initial branch - As the tests are all run in separate repositories, set the branch - name to "master" when creating the repository for the tests where - the result depends on the branch name. This is in preparation for - removing GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME in Git 3.0. + As the tests are all run in separate repositories, set the branch name + to "master" when creating the repository for the tests where the result + depends on the branch name. This reduceds the number of tests that + depend on the default branch name being "master" and removes the last + instance of a test file using "GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= + master". Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> @@ t/t0613-reftable-write-options.sh: export GIT_TEST_REFTABLE_AUTOCOMPACTION test_expect_success 'default write options' ' test_when_finished "rm -rf repo" && - git init repo && ++ # Block sizes also depend on the actual refs we write, so we force ++ # "master" to be the default initial branch name. + git init --initial-branch master repo && ( cd repo && 5: a46c0dd25a6 < -: ----------- t1403: remove dependency on GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply [flat|nested] 56+ messages in thread
* [PATCH v2 1/4] breaking-changes: switch default branch to main 2025-09-04 13:21 ` [PATCH v2 0/4] " Phillip Wood @ 2025-09-04 13:21 ` Phillip Wood 2025-09-04 17:40 ` Junio C Hamano 2025-09-04 13:21 ` [PATCH v2 2/4] t4013: switch default branch name " Phillip Wood ` (3 subsequent siblings) 4 siblings, 1 reply; 56+ messages in thread From: Phillip Wood @ 2025-09-04 13:21 UTC (permalink / raw) To: git Cc: Johannes Schindelin, Wing Huang, Junio C Hamano, Patrick Steinhardt, Phillip Wood From: Phillip Wood <phillip.wood@dunelm.org.uk> Since 1296cbe4b46 (init: document `init.defaultBranch` better, 2020-12-11) "git-init.adoc" has advertised that the default name of the initial branch may change in the future. The name "main" is chosen to match the default used by the big Git forge web sites. The advice printed when init.defaultBranch is not set is updated to say that the default will change to "main" in Git 3.0. Building with WITH_BREAKING_CHANGES enabled removes the advice and changes the default branch name to "main". The code in guess_remote_head() that looks for "refs/heads/master" is left unchanged as that is only called when the remote server does not support the symref capability in the v0 protocol or the symref extension to the ls-refs list in the v2 protocol. Such an old server is more likely to be using "master" as the default branch name. With the exception of the "git-init.adoc" the documentation is left unchanged. I had hoped to parameterize the name of the default branch by using an asciidoc attribute. Unfortunately attribute expansion is inhibited by backticks and we use backticks to mark up ref names so that idea does not work. As the changes to git-init.adoc show inserting ifdef's around each instance of the branch name "master" is cumbersome and makes the documentation sources harder to read. Apart from "git-init.adoc" there are some other files where "master" is used as the name of the initial branch rather than as an example of a branch name such as "user-manual.adoc" and "gitcore-tutorial.adoc". The name appears a lot in those so updating it with ifdef's is not really practical. We can update that document in the 3.0 release cycle. The other documentation where master is used as an example branch name can be gradually converted over time. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- Documentation/BreakingChanges.adoc | 5 +++++ Documentation/git-init.adoc | 12 +++++++++--- advice.c | 2 ++ advice.h | 2 ++ ci/run-build-and-tests.sh | 1 - refs.c | 15 +++++++++++---- t/t0001-init.sh | 18 +++++++++++++++++- t/test-lib.sh | 11 +++++++---- 8 files changed, 53 insertions(+), 13 deletions(-) diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc index f8d2eba061c..eb92e6f6a7d 100644 --- a/Documentation/BreakingChanges.adoc +++ b/Documentation/BreakingChanges.adoc @@ -165,6 +165,11 @@ A prerequisite for this change is that the ecosystem is ready to support the "reftable" format. Most importantly, alternative implementations of Git like JGit, libgit2 and Gitoxide need to support it. +* In new repositories the default branch name will be `main`. We have been + warning that the default name will change since 675704c74dd (init: provide + useful advice about init.defaultBranch, 2020-12-11). The new name matches + the default branch name used by many of the big Git forges. + === Removals * Support for grafting commits has long been superseded by git-replace(1). diff --git a/Documentation/git-init.adoc b/Documentation/git-init.adoc index a0dffba665f..bab99b9b477 100644 --- a/Documentation/git-init.adoc +++ b/Documentation/git-init.adoc @@ -77,9 +77,15 @@ If this is a reinitialization, the repository will be moved to the specified pat `-b <branch-name>`:: `--initial-branch=<branch-name>`:: Use _<branch-name>_ for the initial branch in the newly created -repository. If not specified, fall back to the default name (currently -`master`, but this is subject to change in the future; the name can be -customized via the `init.defaultBranch` configuration variable). +repository. If not specified, fall back to the default name +ifndef::with-breaking-changes[] +(currently `master`, but this will change to `main` when Git 3.0 is released). +endif::with-breaking-changes[] +ifdef::with-breaking-changes[] +`main`. +endif::with-breaking-changes[] +The default name can be customized via the `init.defaultBranch` configuration +variable. `--shared[=(false|true|umask|group|all|world|everybody|<perm>)]`:: diff --git a/advice.c b/advice.c index e5f0ff84491..48c49ee4145 100644 --- a/advice.c +++ b/advice.c @@ -51,7 +51,9 @@ static struct { [ADVICE_AM_WORK_DIR] = { "amWorkDir" }, [ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] = { "checkoutAmbiguousRemoteBranchName" }, [ADVICE_COMMIT_BEFORE_MERGE] = { "commitBeforeMerge" }, +#ifndef WITH_BREAKING_CHANGES [ADVICE_DEFAULT_BRANCH_NAME] = { "defaultBranchName" }, +#endif /* WITH_BREAKING_CHANGES */ [ADVICE_DETACHED_HEAD] = { "detachedHead" }, [ADVICE_DIVERGING] = { "diverging" }, [ADVICE_FETCH_SET_HEAD_WARN] = { "fetchRemoteHEADWarn" }, diff --git a/advice.h b/advice.h index 727dcecf4a3..fc1dc872049 100644 --- a/advice.h +++ b/advice.h @@ -18,7 +18,9 @@ enum advice_type { ADVICE_AM_WORK_DIR, ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME, ADVICE_COMMIT_BEFORE_MERGE, +#ifndef WITH_BREAKING_CHANGES ADVICE_DEFAULT_BRANCH_NAME, +#endif /* WITH_BREAKING_CHANGES */ ADVICE_DETACHED_HEAD, ADVICE_DIVERGING, ADVICE_FETCH_SET_HEAD_WARN, diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index 01823fd0f14..a21834043f3 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh @@ -9,7 +9,6 @@ run_tests=t case "$jobname" in linux-breaking-changes) - export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export WITH_BREAKING_CHANGES=YesPlease ;; linux-TEST-vars) diff --git a/refs.c b/refs.c index 4ff55cf24f6..149a8d1cec1 100644 --- a/refs.c +++ b/refs.c @@ -627,10 +627,12 @@ void expand_ref_prefix(struct strvec *prefixes, const char *prefix) strvec_pushf(prefixes, *p, len, prefix); } +#ifndef WITH_BREAKING_CHANGES static const char default_branch_name_advice[] = N_( "Using '%s' as the name for the initial branch. This default branch name\n" -"is subject to change. To configure the initial branch name to use in all\n" -"of your new repositories, which will suppress this warning, call:\n" +"will change to \"main\" in Git 3.0. To configure the initial branch name\n" +"to use in all of your new repositories, which will suppress this warning,\n" +"call:\n" "\n" "\tgit config --global init.defaultBranch <name>\n" "\n" @@ -639,8 +641,9 @@ static const char default_branch_name_advice[] = N_( "\n" "\tgit branch -m <name>\n" ); +#endif /* WITH_BREAKING_CHANGES */ -char *repo_default_branch_name(struct repository *r, int quiet) +char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet) { const char *config_key = "init.defaultbranch"; const char *config_display_key = "init.defaultBranch"; @@ -649,14 +652,18 @@ char *repo_default_branch_name(struct repository *r, int quiet) if (env && *env) ret = xstrdup(env); - else if (repo_config_get_string(r, config_key, &ret) < 0) + if (!ret && repo_config_get_string(r, config_key, &ret) < 0) die(_("could not retrieve `%s`"), config_display_key); if (!ret) { +#ifdef WITH_BREAKING_CHANGES + ret = xstrdup("main"); +#else ret = xstrdup("master"); if (!quiet) advise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME, _(default_branch_name_advice), ret); +#endif /* WITH_BREAKING_CHANGES */ } full_ref = xstrfmt("refs/heads/%s", ret); diff --git a/t/t0001-init.sh b/t/t0001-init.sh index f593c536874..df0040b9ace 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -868,7 +868,7 @@ test_expect_success 'overridden default initial branch name (config)' ' grep nmb actual ' -test_expect_success 'advice on unconfigured init.defaultBranch' ' +test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' ' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \ init unconfigured-default-branch-name 2>err && test_decode_color <err >decoded && @@ -883,6 +883,22 @@ test_expect_success 'advice on unconfigured init.defaultBranch disabled' ' test_grep ! "hint: " err ' +test_expect_success 'default branch name' ' + if test_have_prereq WITH_BREAKING_CHANGES + then + expect=main + else + expect=master + fi && + echo "refs/heads/$expect" >expect && + ( + sane_unset GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME && + git init default-initial-branch-name + ) && + git -C default-initial-branch-name symbolic-ref HEAD >actual && + test_cmp expect actual +' + test_expect_success 'overridden default main branch name (env)' ' test_config_global init.defaultBranch nmb && GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=env git init main-branch-env && diff --git a/t/test-lib.sh b/t/test-lib.sh index 621cd31ae1d..b191954c3c4 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -127,10 +127,13 @@ then export GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS fi -# Explicitly set the default branch name for testing, to avoid the -# transitory "git init" warning under --verbose. -: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master} -export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +if test -z "$WITH_BREAKING_CHANGES" +then + # Explicitly set the default branch name for testing, to avoid the + # transitory "git init" warning under --verbose. + : ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master} + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +fi ################################################################ # It appears that people try to run tests without building... -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply related [flat|nested] 56+ messages in thread
* Re: [PATCH v2 1/4] breaking-changes: switch default branch to main 2025-09-04 13:21 ` [PATCH v2 1/4] breaking-changes: switch default branch to main Phillip Wood @ 2025-09-04 17:40 ` Junio C Hamano 2025-09-05 10:06 ` Phillip Wood 0 siblings, 1 reply; 56+ messages in thread From: Junio C Hamano @ 2025-09-04 17:40 UTC (permalink / raw) To: Phillip Wood; +Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt Phillip Wood <phillip.wood123@gmail.com> writes: > diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc > index f8d2eba061c..eb92e6f6a7d 100644 > --- a/Documentation/BreakingChanges.adoc > +++ b/Documentation/BreakingChanges.adoc > @@ -165,6 +165,11 @@ A prerequisite for this change is that the ecosystem is ready to support the > "reftable" format. Most importantly, alternative implementations of Git like > JGit, libgit2 and Gitoxide need to support it. > > +* In new repositories the default branch name will be `main`. We have been > + warning that the default name will change since 675704c74dd (init: provide > + useful advice about init.defaultBranch, 2020-12-11). The new name matches > + the default branch name used by many of the big Git forges. As I am not a native, this is a mere question and not a suggestion, but my reading hiccups when I see the lack of comma after "In new repositories". "used by many of" -> "used for new repositories by many of"? > diff --git a/Documentation/git-init.adoc b/Documentation/git-init.adoc > index a0dffba665f..bab99b9b477 100644 > --- a/Documentation/git-init.adoc > +++ b/Documentation/git-init.adoc > @@ -77,9 +77,15 @@ If this is a reinitialization, the repository will be moved to the specified pat > `-b <branch-name>`:: > `--initial-branch=<branch-name>`:: > Use _<branch-name>_ for the initial branch in the newly created > -repository. If not specified, fall back to the default name (currently > -`master`, but this is subject to change in the future; the name can be > -customized via the `init.defaultBranch` configuration variable). > +repository. If not specified, fall back to the default name > +ifndef::with-breaking-changes[] > +(currently `master`, but this will change to `main` when Git 3.0 is released). > +endif::with-breaking-changes[] > +ifdef::with-breaking-changes[] > +`main`. > +endif::with-breaking-changes[] > +The default name can be customized via the `init.defaultBranch` configuration > +variable. Good. Both the text for post-3.0 period and the rephrasing of the original for pre-3.0 period look good. > diff --git a/advice.c b/advice.c > index e5f0ff84491..48c49ee4145 100644 > --- a/advice.c > +++ b/advice.c > @@ -51,7 +51,9 @@ static struct { > [ADVICE_AM_WORK_DIR] = { "amWorkDir" }, > [ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] = { "checkoutAmbiguousRemoteBranchName" }, > [ADVICE_COMMIT_BEFORE_MERGE] = { "commitBeforeMerge" }, > +#ifndef WITH_BREAKING_CHANGES > [ADVICE_DEFAULT_BRANCH_NAME] = { "defaultBranchName" }, > +#endif /* WITH_BREAKING_CHANGES */ > [ADVICE_DETACHED_HEAD] = { "detachedHead" }, > [ADVICE_DIVERGING] = { "diverging" }, > [ADVICE_FETCH_SET_HEAD_WARN] = { "fetchRemoteHEADWarn" }, Would there be folks who type "git init" to get a 'main' branch, while trying to follow a recipe written in pre-3.0 days that assumes the initial branch is called differently, and get confused after seeing many commands written in the recipe for them to follow , like "git checkout -b next master" fail? Do they need a different advice message to help them, i.e.e.g, $ git init Initialized empty Git repository in /a/b/c/.git/ hint: Since Git 3.0, an initial branch is 'main' these days. hint: If you need its name to be different (e.g. 'frotz'), hint: you can immediately rename it with "git branch -m frotz". hint: Disable this message with "got config set advice.foo false" or something? I dunno. In any case, that will have to be a new and different advice message, and defaultBranchName should not be reused for that purpose, so the change in the the above hunk is fine. I am wondering if we need a new entry protected by the same #ifdef on the #else side. > diff --git a/advice.h b/advice.h > index 727dcecf4a3..fc1dc872049 100644 > --- a/advice.h > +++ b/advice.h > @@ -18,7 +18,9 @@ enum advice_type { > ADVICE_AM_WORK_DIR, > ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME, > ADVICE_COMMIT_BEFORE_MERGE, > +#ifndef WITH_BREAKING_CHANGES > ADVICE_DEFAULT_BRANCH_NAME, > +#endif /* WITH_BREAKING_CHANGES */ > ADVICE_DETACHED_HEAD, > ADVICE_DIVERGING, > ADVICE_FETCH_SET_HEAD_WARN, Ditto. > diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh > index 01823fd0f14..a21834043f3 100755 > --- a/ci/run-build-and-tests.sh > +++ b/ci/run-build-and-tests.sh > @@ -9,7 +9,6 @@ run_tests=t > > case "$jobname" in > linux-breaking-changes) > - export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main > export WITH_BREAKING_CHANGES=YesPlease > ;; OK. > linux-TEST-vars) We have been very careful to make sure that none of our tests implicitly rely on that the initial branch name will still be 'master' with the above. Now we should make sure that none of our tests implicitly assume that the initial branch name will forever be called 'main'. In the post-context, linux-TEST-vars arm has something that forces the initial branch name to be 'master', and we probably should keep it for a while to serve that purpose. > diff --git a/refs.c b/refs.c > index 4ff55cf24f6..149a8d1cec1 100644 > --- a/refs.c > +++ b/refs.c > @@ -627,10 +627,12 @@ void expand_ref_prefix(struct strvec *prefixes, const char *prefix) > strvec_pushf(prefixes, *p, len, prefix); > } > > +#ifndef WITH_BREAKING_CHANGES > static const char default_branch_name_advice[] = N_( > "Using '%s' as the name for the initial branch. This default branch name\n" > -"is subject to change. To configure the initial branch name to use in all\n" > -"of your new repositories, which will suppress this warning, call:\n" > +"will change to \"main\" in Git 3.0. To configure the initial branch name\n" > +"to use in all of your new repositories, which will suppress this warning,\n" > +"call:\n" > "\n" > "\tgit config --global init.defaultBranch <name>\n" > "\n" > @@ -639,8 +641,9 @@ static const char default_branch_name_advice[] = N_( > "\n" > "\tgit branch -m <name>\n" > ); > +#endif /* WITH_BREAKING_CHANGES */ > > -char *repo_default_branch_name(struct repository *r, int quiet) > +char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet) > { And if we were to introduce a new advice to help people who still expected the traditional name, this MAYBE_UNUSED would not become necessary ... > const char *config_key = "init.defaultbranch"; > const char *config_display_key = "init.defaultBranch"; > @@ -649,14 +652,18 @@ char *repo_default_branch_name(struct repository *r, int quiet) > > if (env && *env) > ret = xstrdup(env); > - else if (repo_config_get_string(r, config_key, &ret) < 0) > + if (!ret && repo_config_get_string(r, config_key, &ret) < 0) > die(_("could not retrieve `%s`"), config_display_key); > > if (!ret) { > +#ifdef WITH_BREAKING_CHANGES > + ret = xstrdup("main"); ... as we will have the same if (!quiet) advice sequence here, protected with a different ADVICE_ thing. > +#else > ret = xstrdup("master"); > if (!quiet) > advise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME, > _(default_branch_name_advice), ret); > +#endif /* WITH_BREAKING_CHANGES */ > } > > full_ref = xstrfmt("refs/heads/%s", ret); Thanks. ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH v2 1/4] breaking-changes: switch default branch to main 2025-09-04 17:40 ` Junio C Hamano @ 2025-09-05 10:06 ` Phillip Wood 2025-09-05 15:04 ` Junio C Hamano 0 siblings, 1 reply; 56+ messages in thread From: Phillip Wood @ 2025-09-05 10:06 UTC (permalink / raw) To: Junio C Hamano; +Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt On 04/09/2025 18:40, Junio C Hamano wrote: > Phillip Wood <phillip.wood123@gmail.com> writes: > >> diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc >> index f8d2eba061c..eb92e6f6a7d 100644 >> --- a/Documentation/BreakingChanges.adoc >> +++ b/Documentation/BreakingChanges.adoc >> @@ -165,6 +165,11 @@ A prerequisite for this change is that the ecosystem is ready to support the >> "reftable" format. Most importantly, alternative implementations of Git like >> JGit, libgit2 and Gitoxide need to support it. >> >> +* In new repositories the default branch name will be `main`. We have been >> + warning that the default name will change since 675704c74dd (init: provide >> + useful advice about init.defaultBranch, 2020-12-11). The new name matches >> + the default branch name used by many of the big Git forges. > > As I am not a native, this is a mere question and not a suggestion, > but my reading hiccups when I see the lack of comma after "In new > repositories". I agree a comma would be good here > "used by many of" -> "used for new repositories by many of"? Sounds good >> diff --git a/advice.c b/advice.c >> index e5f0ff84491..48c49ee4145 100644 >> --- a/advice.c >> +++ b/advice.c >> @@ -51,7 +51,9 @@ static struct { >> [ADVICE_AM_WORK_DIR] = { "amWorkDir" }, >> [ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] = { "checkoutAmbiguousRemoteBranchName" }, >> [ADVICE_COMMIT_BEFORE_MERGE] = { "commitBeforeMerge" }, >> +#ifndef WITH_BREAKING_CHANGES >> [ADVICE_DEFAULT_BRANCH_NAME] = { "defaultBranchName" }, >> +#endif /* WITH_BREAKING_CHANGES */ >> [ADVICE_DETACHED_HEAD] = { "detachedHead" }, >> [ADVICE_DIVERGING] = { "diverging" }, >> [ADVICE_FETCH_SET_HEAD_WARN] = { "fetchRemoteHEADWarn" }, > > Would there be folks who type "git init" to get a 'main' branch, > while trying to follow a recipe written in pre-3.0 days that assumes > the initial branch is called differently, and get confused after > seeing many commands written in the recipe for them to follow , like > "git checkout -b next master" fail? Do they need a different advice > message to help them, i.e.e.g, > > $ git init > Initialized empty Git repository in /a/b/c/.git/ > hint: Since Git 3.0, an initial branch is 'main' these days. > hint: If you need its name to be different (e.g. 'frotz'), > hint: you can immediately rename it with "git branch -m frotz". > hint: Disable this message with "got config set advice.foo false" > > or something? I dunno. In any case, that will have to be a new and > different advice message, and defaultBranchName should not be reused > for that purpose, so the change in the the above hunk is fine. I am > wondering if we need a new entry protected by the same #ifdef on the > #else side. Personally I find the current advice pretty annoying and would be glad to see it go away. Are there really that many people who want to customize the initial branch name that it is worth adding some new advice post Git 3.0? Although I find it annoying, I do think the current advice serves a useful purpose as it informs people the default that they are used to is changing and that they can override it. Given how long we've been warning people I'm not sure we need to say anything once the default has changed. >> diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh >> index 01823fd0f14..a21834043f3 100755 >> --- a/ci/run-build-and-tests.sh >> +++ b/ci/run-build-and-tests.sh >> @@ -9,7 +9,6 @@ run_tests=t >> >> case "$jobname" in >> linux-breaking-changes) >> - export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main >> export WITH_BREAKING_CHANGES=YesPlease >> ;; > > OK. > >> linux-TEST-vars) > > We have been very careful to make sure that none of our tests > implicitly rely on that the initial branch name will still be > 'master' with the above. Now we should make sure that none of our > tests implicitly assume that the initial branch name will forever be > called 'main'. In the post-context, linux-TEST-vars arm has > something that forces the initial branch name to be 'master', and we > probably should keep it for a while to serve that purpose. That sounds sensible. I'll wait a few days to see if there are any other comments and then re-roll the the documentation tweaks you suggested above. Thanks Phillip >> diff --git a/refs.c b/refs.c >> index 4ff55cf24f6..149a8d1cec1 100644 >> --- a/refs.c >> +++ b/refs.c >> @@ -627,10 +627,12 @@ void expand_ref_prefix(struct strvec *prefixes, const char *prefix) >> strvec_pushf(prefixes, *p, len, prefix); >> } >> >> +#ifndef WITH_BREAKING_CHANGES >> static const char default_branch_name_advice[] = N_( >> "Using '%s' as the name for the initial branch. This default branch name\n" >> -"is subject to change. To configure the initial branch name to use in all\n" >> -"of your new repositories, which will suppress this warning, call:\n" >> +"will change to \"main\" in Git 3.0. To configure the initial branch name\n" >> +"to use in all of your new repositories, which will suppress this warning,\n" >> +"call:\n" >> "\n" >> "\tgit config --global init.defaultBranch <name>\n" >> "\n" >> @@ -639,8 +641,9 @@ static const char default_branch_name_advice[] = N_( >> "\n" >> "\tgit branch -m <name>\n" >> ); >> +#endif /* WITH_BREAKING_CHANGES */ >> >> -char *repo_default_branch_name(struct repository *r, int quiet) >> +char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet) >> { > > And if we were to introduce a new advice to help people who still > expected the traditional name, this MAYBE_UNUSED would not become > necessary ... > >> const char *config_key = "init.defaultbranch"; >> const char *config_display_key = "init.defaultBranch"; >> @@ -649,14 +652,18 @@ char *repo_default_branch_name(struct repository *r, int quiet) >> >> if (env && *env) >> ret = xstrdup(env); >> - else if (repo_config_get_string(r, config_key, &ret) < 0) >> + if (!ret && repo_config_get_string(r, config_key, &ret) < 0) >> die(_("could not retrieve `%s`"), config_display_key); >> >> if (!ret) { >> +#ifdef WITH_BREAKING_CHANGES >> + ret = xstrdup("main"); > > ... as we will have the same if (!quiet) advice sequence here, > protected with a different ADVICE_ thing. > >> +#else >> ret = xstrdup("master"); >> if (!quiet) >> advise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME, >> _(default_branch_name_advice), ret); >> +#endif /* WITH_BREAKING_CHANGES */ >> } >> >> full_ref = xstrfmt("refs/heads/%s", ret); > > Thanks. ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH v2 1/4] breaking-changes: switch default branch to main 2025-09-05 10:06 ` Phillip Wood @ 2025-09-05 15:04 ` Junio C Hamano 0 siblings, 0 replies; 56+ messages in thread From: Junio C Hamano @ 2025-09-05 15:04 UTC (permalink / raw) To: Phillip Wood; +Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt Phillip Wood <phillip.wood123@gmail.com> writes: >> Would there be folks who type "git init" to get a 'main' branch, >> while trying to follow a recipe written in pre-3.0 days that assumes >> the initial branch is called differently, and get confused after >> seeing many commands written in the recipe for them to follow , like >> "git checkout -b next master" fail? Do they need a different advice >> message to help them, i.e.e.g, >> $ git init >> Initialized empty Git repository in /a/b/c/.git/ >> hint: Since Git 3.0, an initial branch is 'main' these days. >> hint: If you need its name to be different (e.g. 'frotz'), >> hint: you can immediately rename it with "git branch -m frotz". >> hint: Disable this message with "got config set advice.foo false" >> or something? I dunno. In any case, that will have to be a new and >> different advice message, and defaultBranchName should not be reused >> for that purpose, so the change in the the above hunk is fine. I am >> wondering if we need a new entry protected by the same #ifdef on the >> #else side. > > Personally I find the current advice pretty annoying and would be glad > to see it go away. Are there really that many people who want to > customize the initial branch name that it is worth adding some new > advice post Git 3.0? Given that the tutorial materials that were written when we gave the init.defaultBranchName mechanism _all_ assumed that by default the initial branch that gets created is called 'master', the current advice messages were primarily not about usability but personal preference. The message targets those who dislike 'master' so much that they are willing to replace all 'master' they read in the tutorial material as 'main' if they are following an existing tutorial material. And the instruction is primarily about how to switch to a new default permanently with the configuration. But the one that I pointed out as missing in your proposal is quite different. It is meant for those who need help about usability, not personal preference. Even if they strongly prefer 'main' over 'master', in order to follow along an existing tutorial material, they will find it less error prone if the initial branch used in their practice repository were 'master'. That is why the instruction is only about recovering only _this_ repository they just have created (Notice that I did not tell them how to use the configuration mechanism to permanently live in the past in the above "... or something?" example? It is very deliberate---"the world has moved, so should they, except for this single instance" is the message they need to hear). > Although I find it annoying, I do think the > current advice serves a useful purpose as it informs people the > default that they are used to is changing and that they can override > it. Given how long we've been warning people I'm not sure we need to > say anything once the default has changed. You need to remember that there always are new users who use Git seriously for the first time _after_ switchover happens. Because it is more about usability than preference, I see at least the same degree of need, if not more, to help these people who still need to use the old name to follow along the tutorial material than those who have been helped by the existing "Sorry you got 'master', but you may prefer a different name, and you can do so by doing these things" message, ^ permalink raw reply [flat|nested] 56+ messages in thread
* [PATCH v2 2/4] t4013: switch default branch name to main 2025-09-04 13:21 ` [PATCH v2 0/4] " Phillip Wood 2025-09-04 13:21 ` [PATCH v2 1/4] breaking-changes: switch default branch to main Phillip Wood @ 2025-09-04 13:21 ` Phillip Wood 2025-09-04 13:21 ` [PATCH v2 3/4] t9902: " Phillip Wood ` (2 subsequent siblings) 4 siblings, 0 replies; 56+ messages in thread From: Phillip Wood @ 2025-09-04 13:21 UTC (permalink / raw) To: git Cc: Johannes Schindelin, Wing Huang, Junio C Hamano, Patrick Steinhardt, Phillip Wood From: Phillip Wood <phillip.wood@dunelm.org.uk> Remove one of the last remaining uses of "TEST_GIT_DEFAULT_INITIAL_BRANCH= main" in the test suite. We have been steadily be converting tests from using "master" as the default branch name since the introduction of TEST_GIT_DEFAULT_INITIAL_BRANCH in 704fed9ea22 (tests: start moving to a different default main branch name, 2020-10-23) The changes here are purely mechanical replacing "master" with "main" Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- t/t4013-diff-various.sh | 228 +++++++++--------- ...ree_--cc_--patch-with-stat_--summary_main} | 2 +- ...iff.diff-tree_--cc_--patch-with-stat_main} | 2 +- ...r => diff.diff-tree_--cc_--shortstat_main} | 2 +- ...diff.diff-tree_--cc_--stat_--summary_main} | 2 +- ...master => diff.diff-tree_--cc_--stat_main} | 2 +- ...e_--cc_master => diff.diff-tree_--cc_main} | 2 +- ...master => diff.diff-tree_-c_--abbrev_main} | 2 +- ...> diff.diff-tree_-c_--stat_--summary_main} | 2 +- ...t_master => diff.diff-tree_-c_--stat_main} | 2 +- ...-tree_-c_master => diff.diff-tree_-c_main} | 2 +- ...-tree_-m_master => diff.diff-tree_-m_main} | 2 +- ...-p_-m_master => diff.diff-tree_-p_-m_main} | 2 +- t/t4013/diff.diff-tree_-p_main | 2 + t/t4013/diff.diff-tree_-p_master | 2 - t/t4013/diff.diff-tree_main | 2 + t/t4013/diff.diff-tree_master | 2 - t/t4013/diff.diff_--dirstat_--cc_main~1_main | 3 + .../diff.diff_--dirstat_--cc_master~1_master | 3 - t/t4013/diff.diff_--dirstat_main~1_main~2 | 3 + t/t4013/diff.diff_--dirstat_master~1_master~2 | 3 - ...ff.diff_--line-prefix=abc_main_main^_side} | 2 +- ...master^_side => diff.diff_main_main^_side} | 2 +- ...mat-patch_--attach_--stdout_initial..main} | 2 +- ...at-patch_--attach_--stdout_initial..main^} | 2 +- ...e_--stdout_--numbered-files_initial..main} | 2 +- ...t_--subject-prefix=TESTCASE_initial..main} | 2 +- ...mat-patch_--inline_--stdout_initial..main} | 2 +- ...at-patch_--inline_--stdout_initial..main^} | 2 +- ...t-patch_--inline_--stdout_initial..main^^} | 2 +- ...--stdout_--cover-letter_-n_initial..main^} | 2 +- ...atch_--stdout_--no-numbered_initial..main} | 2 +- ...t-patch_--stdout_--numbered_initial..main} | 2 +- ... diff.format-patch_--stdout_initial..main} | 2 +- ...diff.format-patch_--stdout_initial..main^} | 2 +- ..._-m_-p_master => diff.log_--cc_-m_-p_main} | 2 +- t/t4013/diff.log_--decorate=full_--all | 2 +- ..._--decorate=full_--clear-decorations_--all | 2 +- ...f.log_--decorate=full_--decorate-all_--all | 2 +- t/t4013/diff.log_--decorate_--all | 2 +- ...f.log_--decorate_--clear-decorations_--all | 2 +- .../diff.log_--decorate_--decorate-all_--all | 2 +- ... diff.log_--diff-merges=first-parent_main} | 2 +- ..._--diff-merges=off_-p_--first-parent_main} | 2 +- ..._--first-parent_--diff-merges=off_-p_main} | 2 +- ...g_--no-diff-merges_-p_--first-parent_main} | 2 +- ..._--patch-with-stat_--summary_main_--_dir_} | 2 +- ...master => diff.log_--patch-with-stat_main} | 2 +- ...> diff.log_--patch-with-stat_main_--_dir_} | 2 +- ...oot_--cc_--patch-with-stat_--summary_main} | 2 +- ...g_--root_--patch-with-stat_--summary_main} | 2 +- ...=> diff.log_--root_--patch-with-stat_main} | 2 +- ...-root_-c_--patch-with-stat_--summary_main} | 2 +- ...root_-p_master => diff.log_--root_-p_main} | 2 +- ...log_--root_master => diff.log_--root_main} | 2 +- ...ter => diff.log_-GF_-p_--pickaxe-all_main} | 2 +- ...log_-GF_-p_master => diff.log_-GF_-p_main} | 2 +- ...{diff.log_-SF_master => diff.log_-GF_main} | 2 +- ...aster => diff.log_-IA_-IB_-I1_-I2_-p_main} | 2 +- ...log_-SF_-p_master => diff.log_-SF_-p_main} | 2 +- ...{diff.log_-GF_master => diff.log_-SF_main} | 2 +- t/t4013/diff.log_-SF_main_--max-count=0 | 2 + ...ount=2 => diff.log_-SF_main_--max-count=1} | 2 +- t/t4013/diff.log_-SF_main_--max-count=2 | 7 + t/t4013/diff.log_-SF_master_--max-count=0 | 2 - t/t4013/diff.log_-SF_master_--max-count=1 | 7 - ...iff.log_-S_F_master => diff.log_-S_F_main} | 2 +- ...cc_-m_-p_master => diff.log_-c_-m_-p_main} | 2 +- ...-m_--raw_master => diff.log_-m_--raw_main} | 2 +- ..._--stat_master => diff.log_-m_--stat_main} | 2 +- ...ter => diff.log_-m_-p_--first-parent_main} | 2 +- ...f.log_-m_-p_master => diff.log_-m_-p_main} | 2 +- ...ff.log_-p_--diff-merges=first-parent_main} | 2 +- ...master => diff.log_-p_--first-parent_main} | 2 +- .../{diff.log_-p_master => diff.log_-p_main} | 2 +- t/t4013/{diff.log_master => diff.log_main} | 2 +- ...iff.noellipses-diff-tree_-c_--abbrev_main} | 2 +- ...> diff.noellipses-whatchanged_--root_main} | 2 +- ...r => diff.noellipses-whatchanged_-SF_main} | 2 +- ...aster => diff.noellipses-whatchanged_main} | 2 +- ...t_master => diff.show_--first-parent_main} | 2 +- ...{diff.show_-c_master => diff.show_-c_main} | 2 +- ...{diff.show_-m_master => diff.show_-m_main} | 2 +- t/t4013/{diff.show_master => diff.show_main} | 2 +- ..._--patch-with-stat_--summary_main_--_dir_} | 2 +- ...> diff.whatchanged_--patch-with-stat_main} | 2 +- ...hatchanged_--patch-with-stat_main_--_dir_} | 2 +- ...oot_--cc_--patch-with-stat_--summary_main} | 2 +- ...d_--root_--patch-with-stat_--summary_main} | 2 +- ...whatchanged_--root_--patch-with-stat_main} | 2 +- ...-root_-c_--patch-with-stat_--summary_main} | 2 +- ...master => diff.whatchanged_--root_-p_main} | 2 +- ...ot_master => diff.whatchanged_--root_main} | 2 +- ...-p_master => diff.whatchanged_-SF_-p_main} | 2 +- ...d_-SF_master => diff.whatchanged_-SF_main} | 2 +- ...ged_-p_master => diff.whatchanged_-p_main} | 2 +- ...atchanged_master => diff.whatchanged_main} | 2 +- 97 files changed, 217 insertions(+), 217 deletions(-) rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_--summary_master => diff.diff-tree_--cc_--patch-with-stat_--summary_main} (86%) rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_master => diff.diff-tree_--cc_--patch-with-stat_main} (89%) rename t/t4013/{diff.diff-tree_--cc_--shortstat_master => diff.diff-tree_--cc_--shortstat_main} (65%) rename t/t4013/{diff.diff-tree_-c_--stat_--summary_master => diff.diff-tree_--cc_--stat_--summary_main} (71%) rename t/t4013/{diff.diff-tree_-c_--stat_master => diff.diff-tree_--cc_--stat_main} (76%) rename t/t4013/{diff.diff-tree_--cc_master => diff.diff-tree_--cc_main} (91%) rename t/t4013/{diff.diff-tree_-c_--abbrev_master => diff.diff-tree_-c_--abbrev_main} (83%) rename t/t4013/{diff.diff-tree_--cc_--stat_--summary_master => diff.diff-tree_-c_--stat_--summary_main} (70%) rename t/t4013/{diff.diff-tree_--cc_--stat_master => diff.diff-tree_-c_--stat_main} (75%) rename t/t4013/{diff.diff-tree_-c_master => diff.diff-tree_-c_main} (93%) rename t/t4013/{diff.diff-tree_-m_master => diff.diff-tree_-m_main} (96%) rename t/t4013/{diff.diff-tree_-p_-m_master => diff.diff-tree_-p_-m_main} (97%) create mode 100644 t/t4013/diff.diff-tree_-p_main delete mode 100644 t/t4013/diff.diff-tree_-p_master create mode 100644 t/t4013/diff.diff-tree_main delete mode 100644 t/t4013/diff.diff-tree_master create mode 100644 t/t4013/diff.diff_--dirstat_--cc_main~1_main delete mode 100644 t/t4013/diff.diff_--dirstat_--cc_master~1_master create mode 100644 t/t4013/diff.diff_--dirstat_main~1_main~2 delete mode 100644 t/t4013/diff.diff_--dirstat_master~1_master~2 rename t/t4013/{diff.diff_--line-prefix=abc_master_master^_side => diff.diff_--line-prefix=abc_main_main^_side} (87%) rename t/t4013/{diff.diff_master_master^_side => diff.diff_main_main^_side} (89%) rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master => diff.format-patch_--attach_--stdout_initial..main} (98%) rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master^ => diff.format-patch_--attach_--stdout_initial..main^} (97%) rename t/t4013/{diff.format-patch_--inline_--stdout_--numbered-files_initial..master => diff.format-patch_--inline_--stdout_--numbered-files_initial..main} (99%) rename t/t4013/{diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master => diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main} (99%) rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master => diff.format-patch_--inline_--stdout_initial..main} (98%) rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^ => diff.format-patch_--inline_--stdout_initial..main^} (97%) rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^^ => diff.format-patch_--inline_--stdout_initial..main^^} (95%) rename t/t4013/{diff.format-patch_--stdout_--cover-letter_-n_initial..master^ => diff.format-patch_--stdout_--cover-letter_-n_initial..main^} (96%) rename t/t4013/{diff.format-patch_--stdout_--no-numbered_initial..master => diff.format-patch_--stdout_--no-numbered_initial..main} (97%) rename t/t4013/{diff.format-patch_--stdout_--numbered_initial..master => diff.format-patch_--stdout_--numbered_initial..main} (97%) rename t/t4013/{diff.format-patch_--stdout_initial..master => diff.format-patch_--stdout_initial..main} (97%) rename t/t4013/{diff.format-patch_--stdout_initial..master^ => diff.format-patch_--stdout_initial..main^} (96%) rename t/t4013/{diff.log_-c_-m_-p_master => diff.log_--cc_-m_-p_main} (99%) rename t/t4013/{diff.log_--diff-merges=first-parent_master => diff.log_--diff-merges=first-parent_main} (95%) rename t/t4013/{diff.log_--no-diff-merges_-p_--first-parent_master => diff.log_--diff-merges=off_-p_--first-parent_main} (95%) rename t/t4013/{diff.log_--first-parent_--diff-merges=off_-p_master => diff.log_--first-parent_--diff-merges=off_-p_main} (95%) rename t/t4013/{diff.log_--diff-merges=off_-p_--first-parent_master => diff.log_--no-diff-merges_-p_--first-parent_main} (95%) rename t/t4013/{diff.log_--patch-with-stat_--summary_master_--_dir_ => diff.log_--patch-with-stat_--summary_main_--_dir_} (96%) rename t/t4013/{diff.log_--patch-with-stat_master => diff.log_--patch-with-stat_main} (98%) rename t/t4013/{diff.log_--patch-with-stat_master_--_dir_ => diff.log_--patch-with-stat_main_--_dir_} (96%) rename t/t4013/{diff.log_--root_--cc_--patch-with-stat_--summary_master => diff.log_--root_--cc_--patch-with-stat_--summary_main} (98%) rename t/t4013/{diff.log_--root_--patch-with-stat_--summary_master => diff.log_--root_--patch-with-stat_--summary_main} (98%) rename t/t4013/{diff.log_--root_--patch-with-stat_master => diff.log_--root_--patch-with-stat_main} (98%) rename t/t4013/{diff.log_--root_-c_--patch-with-stat_--summary_master => diff.log_--root_-c_--patch-with-stat_--summary_main} (98%) rename t/t4013/{diff.log_--root_-p_master => diff.log_--root_-p_main} (98%) rename t/t4013/{diff.log_--root_master => diff.log_--root_main} (96%) rename t/t4013/{diff.log_-GF_-p_--pickaxe-all_master => diff.log_-GF_-p_--pickaxe-all_main} (90%) rename t/t4013/{diff.log_-GF_-p_master => diff.log_-GF_-p_main} (91%) rename t/t4013/{diff.log_-SF_master => diff.log_-GF_main} (86%) rename t/t4013/{diff.log_-IA_-IB_-I1_-I2_-p_master => diff.log_-IA_-IB_-I1_-I2_-p_main} (97%) rename t/t4013/{diff.log_-SF_-p_master => diff.log_-SF_-p_main} (91%) rename t/t4013/{diff.log_-GF_master => diff.log_-SF_main} (86%) create mode 100644 t/t4013/diff.log_-SF_main_--max-count=0 rename t/t4013/{diff.log_-SF_master_--max-count=2 => diff.log_-SF_main_--max-count=1} (79%) create mode 100644 t/t4013/diff.log_-SF_main_--max-count=2 delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=0 delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=1 rename t/t4013/{diff.log_-S_F_master => diff.log_-S_F_main} (86%) rename t/t4013/{diff.log_--cc_-m_-p_master => diff.log_-c_-m_-p_main} (99%) rename t/t4013/{diff.log_-m_--raw_master => diff.log_-m_--raw_main} (98%) rename t/t4013/{diff.log_-m_--stat_master => diff.log_-m_--stat_main} (98%) rename t/t4013/{diff.log_-m_-p_--first-parent_master => diff.log_-m_-p_--first-parent_main} (97%) rename t/t4013/{diff.log_-m_-p_master => diff.log_-m_-p_main} (99%) rename t/t4013/{diff.log_-p_--diff-merges=first-parent_master => diff.log_-p_--diff-merges=first-parent_main} (97%) rename t/t4013/{diff.log_-p_--first-parent_master => diff.log_-p_--first-parent_main} (97%) rename t/t4013/{diff.log_-p_master => diff.log_-p_main} (98%) rename t/t4013/{diff.log_master => diff.log_main} (97%) rename t/t4013/{diff.noellipses-diff-tree_-c_--abbrev_master => diff.noellipses-diff-tree_-c_--abbrev_main} (81%) rename t/t4013/{diff.noellipses-whatchanged_--root_master => diff.noellipses-whatchanged_--root_main} (96%) rename t/t4013/{diff.noellipses-whatchanged_-SF_master => diff.noellipses-whatchanged_-SF_main} (86%) rename t/t4013/{diff.noellipses-whatchanged_master => diff.noellipses-whatchanged_main} (96%) rename t/t4013/{diff.show_--first-parent_master => diff.show_--first-parent_main} (92%) rename t/t4013/{diff.show_-c_master => diff.show_-c_main} (95%) rename t/t4013/{diff.show_-m_master => diff.show_-m_main} (98%) rename t/t4013/{diff.show_master => diff.show_main} (96%) rename t/t4013/{diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ => diff.whatchanged_--patch-with-stat_--summary_main_--_dir_} (94%) rename t/t4013/{diff.whatchanged_--patch-with-stat_master => diff.whatchanged_--patch-with-stat_main} (97%) rename t/t4013/{diff.whatchanged_--patch-with-stat_master_--_dir_ => diff.whatchanged_--patch-with-stat_main_--_dir_} (94%) rename t/t4013/{diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master => diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main} (97%) rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_--summary_master => diff.whatchanged_--root_--patch-with-stat_--summary_main} (97%) rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_master => diff.whatchanged_--root_--patch-with-stat_main} (97%) rename t/t4013/{diff.whatchanged_--root_-c_--patch-with-stat_--summary_master => diff.whatchanged_--root_-c_--patch-with-stat_--summary_main} (97%) rename t/t4013/{diff.whatchanged_--root_-p_master => diff.whatchanged_--root_-p_main} (98%) rename t/t4013/{diff.whatchanged_--root_master => diff.whatchanged_--root_main} (97%) rename t/t4013/{diff.whatchanged_-SF_-p_master => diff.whatchanged_-SF_-p_main} (89%) rename t/t4013/{diff.whatchanged_-SF_master => diff.whatchanged_-SF_main} (86%) rename t/t4013/{diff.whatchanged_-p_master => diff.whatchanged_-p_main} (98%) rename t/t4013/{diff.whatchanged_master => diff.whatchanged_main} (97%) diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index cfeec239e09..55a06eadb31 100755 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@ -5,7 +5,7 @@ test_description='Various diff formatting options' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -70,7 +70,7 @@ test_expect_success setup ' GIT_COMMITTER_DATE="2006-06-26 00:04:00 +0000" && export GIT_AUTHOR_DATE GIT_COMMITTER_DATE && - git checkout master && + git checkout main && git pull -s ours --no-rebase . side && GIT_AUTHOR_DATE="2006-06-26 00:05:00 +0000" && @@ -95,15 +95,15 @@ test_expect_success setup ' test_write_lines B A >dir/sub && git add dir/sub && git commit -m "Rearranged lines in dir/sub" && - git checkout master && + git checkout main && GIT_AUTHOR_DATE="2006-06-26 00:06:00 +0000" && GIT_COMMITTER_DATE="2006-06-26 00:06:00 +0000" && export GIT_AUTHOR_DATE GIT_COMMITTER_DATE && git checkout -b mode initial && git update-index --chmod=+x file0 && git commit -m "update mode" && - git checkout -f master && + git checkout -f main && GIT_AUTHOR_DATE="2006-06-26 00:06:00 +0000" && GIT_COMMITTER_DATE="2006-06-26 00:06:00 +0000" && @@ -112,12 +112,12 @@ test_expect_success setup ' git update-index --chmod=+x file2 && git commit -m "update mode (file2)" && git notes add -m "note" && - git checkout -f master && + git checkout -f main && - # Same merge as master, but with parents reversed. Hide it in a + # Same merge as main, but with parents reversed. Hide it in a # pseudo-ref to avoid impacting tests with --all. commit=$(echo reverse | - git commit-tree -p master^2 -p master^1 master^{tree}) && + git commit-tree -p main^2 -p main^1 main^{tree}) && git update-ref REVERSE $commit && git config diff.renames false && @@ -127,15 +127,15 @@ test_expect_success setup ' : <<\EOF ! [initial] Initial - * [master] Merge branch 'side' + * [main] Merge branch 'side' ! [rearrange] Rearranged lines in dir/sub ! [side] Side ---- + [rearrange] Rearranged lines in dir/sub - - [master] Merge branch 'side' + - [main] Merge branch 'side' * + [side] Side - * [master^] Third - * [master~2] Second + * [main^] Third + * [main~2] Second +*++ [initial] Initial EOF @@ -311,64 +311,64 @@ diff-tree initial mode diff-tree --stat initial mode diff-tree --summary initial mode -diff-tree master -diff-tree -m master -diff-tree -p master -diff-tree -p -m master -diff-tree -c master -diff-tree -c --abbrev master -:noellipses diff-tree -c --abbrev master -diff-tree --cc master +diff-tree main +diff-tree -m main +diff-tree -p main +diff-tree -p -m main +diff-tree -c main +diff-tree -c --abbrev main +:noellipses diff-tree -c --abbrev main +diff-tree --cc main # stat only should show the diffstat with the first parent -diff-tree -c --stat master -diff-tree --cc --stat master -diff-tree -c --stat --summary master -diff-tree --cc --stat --summary master +diff-tree -c --stat main +diff-tree --cc --stat main +diff-tree -c --stat --summary main +diff-tree --cc --stat --summary main # stat summary should show the diffstat and summary with the first parent diff-tree -c --stat --summary side diff-tree --cc --stat --summary side -diff-tree --cc --shortstat master +diff-tree --cc --shortstat main diff-tree --cc --summary REVERSE # improved by Timo's patch -diff-tree --cc --patch-with-stat master +diff-tree --cc --patch-with-stat main # improved by Timo's patch -diff-tree --cc --patch-with-stat --summary master +diff-tree --cc --patch-with-stat --summary main # this is correct diff-tree --cc --patch-with-stat --summary side -log master -log -p master -log --root master -log --root -p master -log --patch-with-stat master -log --root --patch-with-stat master -log --root --patch-with-stat --summary master -# improved by Timo's patch -log --root -c --patch-with-stat --summary master -# improved by Timo's patch -log --root --cc --patch-with-stat --summary master -log --no-diff-merges -p --first-parent master -log --diff-merges=off -p --first-parent master -log --first-parent --diff-merges=off -p master -log -p --first-parent master -log -p --diff-merges=first-parent master -log --diff-merges=first-parent master -log -m -p --first-parent master -log -m -p master -log --cc -m -p master -log -c -m -p master -log -m --raw master -log -m --stat master -log -SF master -log -S F master -log -SF -p master -log -SF master --max-count=0 -log -SF master --max-count=1 -log -SF master --max-count=2 -log -GF master -log -GF -p master -log -GF -p --pickaxe-all master -log -IA -IB -I1 -I2 -p master +log main +log -p main +log --root main +log --root -p main +log --patch-with-stat main +log --root --patch-with-stat main +log --root --patch-with-stat --summary main +# improved by Timo's patch +log --root -c --patch-with-stat --summary main +# improved by Timo's patch +log --root --cc --patch-with-stat --summary main +log --no-diff-merges -p --first-parent main +log --diff-merges=off -p --first-parent main +log --first-parent --diff-merges=off -p main +log -p --first-parent main +log -p --diff-merges=first-parent main +log --diff-merges=first-parent main +log -m -p --first-parent main +log -m -p main +log --cc -m -p main +log -c -m -p main +log -m --raw main +log -m --stat main +log -SF main +log -S F main +log -SF -p main +log -SF main --max-count=0 +log -SF main --max-count=1 +log -SF main --max-count=2 +log -GF main +log -GF -p main +log -GF -p --pickaxe-all main +log -IA -IB -I1 -I2 -p main log --decorate --all log --decorate=full --all log --decorate --clear-decorations --all @@ -377,35 +377,35 @@ log --decorate=full --clear-decorations --all rev-list --parents HEAD rev-list --children HEAD -whatchanged master -:noellipses whatchanged master -whatchanged -p master -whatchanged --root master -:noellipses whatchanged --root master -whatchanged --root -p master -whatchanged --patch-with-stat master -whatchanged --root --patch-with-stat master -whatchanged --root --patch-with-stat --summary master -# improved by Timo's patch -whatchanged --root -c --patch-with-stat --summary master -# improved by Timo's patch -whatchanged --root --cc --patch-with-stat --summary master -whatchanged -SF master -:noellipses whatchanged -SF master -whatchanged -SF -p master +whatchanged main +:noellipses whatchanged main +whatchanged -p main +whatchanged --root main +:noellipses whatchanged --root main +whatchanged --root -p main +whatchanged --patch-with-stat main +whatchanged --root --patch-with-stat main +whatchanged --root --patch-with-stat --summary main +# improved by Timo's patch +whatchanged --root -c --patch-with-stat --summary main +# improved by Timo's patch +whatchanged --root --cc --patch-with-stat --summary main +whatchanged -SF main +:noellipses whatchanged -SF main +whatchanged -SF -p main -log --patch-with-stat master -- dir/ -whatchanged --patch-with-stat master -- dir/ -log --patch-with-stat --summary master -- dir/ -whatchanged --patch-with-stat --summary master -- dir/ +log --patch-with-stat main -- dir/ +whatchanged --patch-with-stat main -- dir/ +log --patch-with-stat --summary main -- dir/ +whatchanged --patch-with-stat --summary main -- dir/ show initial show --root initial show side -show master -show -c master -show -m master -show --first-parent master +show main +show -c main +show -m main +show --first-parent main show --stat side show --stat --summary side show --patch-with-stat side @@ -414,22 +414,22 @@ show --patch-with-raw side show --patch-with-stat --summary side format-patch --stdout initial..side -format-patch --stdout initial..master^ -format-patch --stdout initial..master -format-patch --stdout --no-numbered initial..master -format-patch --stdout --numbered initial..master +format-patch --stdout initial..main^ +format-patch --stdout initial..main +format-patch --stdout --no-numbered initial..main +format-patch --stdout --numbered initial..main format-patch --attach --stdout initial..side format-patch --attach --stdout --suffix=.diff initial..side -format-patch --attach --stdout initial..master^ -format-patch --attach --stdout initial..master +format-patch --attach --stdout initial..main^ +format-patch --attach --stdout initial..main format-patch --inline --stdout initial..side -format-patch --inline --stdout initial..master^ -format-patch --inline --stdout --numbered-files initial..master -format-patch --inline --stdout initial..master -format-patch --inline --stdout --subject-prefix=TESTCASE initial..master +format-patch --inline --stdout initial..main^ +format-patch --inline --stdout --numbered-files initial..main +format-patch --inline --stdout initial..main +format-patch --inline --stdout --subject-prefix=TESTCASE initial..main config format.subjectprefix DIFFERENT_PREFIX -format-patch --inline --stdout initial..master^^ -format-patch --stdout --cover-letter -n initial..master^ +format-patch --inline --stdout initial..main^^ +format-patch --stdout --cover-letter -n initial..main^ diff --abbrev initial..side diff -U initial..side @@ -448,13 +448,13 @@ diff --name-status dir2 dir diff --no-index --name-status dir2 dir diff --no-index --name-status -- dir2 dir diff --no-index dir dir3 -diff master master^ side +diff main main^ side # Can't use spaces... -diff --line-prefix=abc master master^ side -diff --dirstat master~1 master~2 +diff --line-prefix=abc main main^ side +diff --dirstat main~1 main~2 diff --dirstat initial rearrange diff --dirstat-by-file initial rearrange -diff --dirstat --cc master~1 master +diff --dirstat --cc main~1 main # No-index --abbrev and --no-abbrev diff --raw initial :noellipses diff --raw initial @@ -482,25 +482,25 @@ test_expect_success !WITH_BREAKING_CHANGES 'whatchanged needs --i-still-use-this ' test_expect_success 'log -m matches pure log' ' - git log master >result && + git log main >result && process_diffs result >expected && git log -m >result && process_diffs result >actual && test_cmp expected actual ' test_expect_success 'log --diff-merges=on matches --diff-merges=separate' ' - git log -p --diff-merges=separate master >result && + git log -p --diff-merges=separate main >result && process_diffs result >expected && - git log -p --diff-merges=on master >result && + git log -p --diff-merges=on main >result && process_diffs result >actual && test_cmp expected actual ' test_expect_success 'log --dd matches --diff-merges=1 -p' ' - git log --diff-merges=1 -p master >result && + git log --diff-merges=1 -p main >result && process_diffs result >expected && - git log --dd master >result && + git log --dd main >result && process_diffs result >actual && test_cmp expected actual ' @@ -511,19 +511,19 @@ test_expect_success 'deny wrong log.diffMerges config' ' ' test_expect_success 'git config log.diffMerges first-parent' ' - git log -p --diff-merges=first-parent master >result && + git log -p --diff-merges=first-parent main >result && process_diffs result >expected && test_config log.diffMerges first-parent && - git log -p --diff-merges=on master >result && + git log -p --diff-merges=on main >result && process_diffs result >actual && test_cmp expected actual ' test_expect_success 'git config log.diffMerges first-parent vs -m' ' - git log -p --diff-merges=first-parent master >result && + git log -p --diff-merges=first-parent main >result && process_diffs result >expected && test_config log.diffMerges first-parent && - git log -p -m master >result && + git log -p -m main >result && process_diffs result >actual && test_cmp expected actual ' @@ -572,7 +572,7 @@ test_expect_success 'diff-tree --stdin with log formatting' ' Third Second EOF - git rev-list master | git diff-tree --stdin --format=%s -s >actual && + git rev-list main | git diff-tree --stdin --format=%s -s >actual && test_cmp expect actual ' @@ -585,16 +585,16 @@ test_expect_success 'diff-tree --stdin with pathspec' ' dir/sub EOF - git rev-list master^ | + git rev-list main^ | git diff-tree -r --stdin --name-only --format=%s dir >actual && test_cmp expect actual ' test_expect_success 'show A B ... -- <pathspec>' ' # side touches dir/sub, file0, and file3 - # master^ touches dir/sub, and file1 - # master^^ touches dir/sub, file0, and file2 - git show --name-only --format="<%s>" side master^ master^^ -- dir >actual && + # main^ touches dir/sub, and file1 + # main^^ touches dir/sub, file0, and file2 + git show --name-only --format="<%s>" side main^ main^^ -- dir >actual && cat >expect <<-\EOF && <Side> @@ -610,7 +610,7 @@ test_expect_success 'show A B ... -- <pathspec>' ' ' test_expect_success 'diff -I<regex>: setup' ' - git checkout master && + git checkout main && test_seq 50 >file0 && git commit -m "Set up -I<regex> test file" file0 && test_seq 50 | sed -e "s/13/ten and three/" -e "/7\$/d" >file0 && diff --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 similarity index 86% rename from t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master rename to t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main index 9951e3677d6..af1cf20f4ca 100644 --- a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master +++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc --patch-with-stat --summary master +$ git diff-tree --cc --patch-with-stat --summary main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_master b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_main similarity index 89% rename from t/t4013/diff.diff-tree_--cc_--patch-with-stat_master rename to t/t4013/diff.diff-tree_--cc_--patch-with-stat_main index db3c0a7b2cc..0ec60420970 100644 --- a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_master +++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc --patch-with-stat master +$ git diff-tree --cc --patch-with-stat main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_--cc_--shortstat_master b/t/t4013/diff.diff-tree_--cc_--shortstat_main similarity index 65% rename from t/t4013/diff.diff-tree_--cc_--shortstat_master rename to t/t4013/diff.diff-tree_--cc_--shortstat_main index a4ca42df2a4..9a4ef031973 100644 --- a/t/t4013/diff.diff-tree_--cc_--shortstat_master +++ b/t/t4013/diff.diff-tree_--cc_--shortstat_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc --shortstat master +$ git diff-tree --cc --shortstat main 59d314ad6f356dd08601a4cd5e530381da3e3c64 2 files changed, 5 insertions(+) $ diff --git a/t/t4013/diff.diff-tree_-c_--stat_--summary_master b/t/t4013/diff.diff-tree_--cc_--stat_--summary_main similarity index 71% rename from t/t4013/diff.diff-tree_-c_--stat_--summary_master rename to t/t4013/diff.diff-tree_--cc_--stat_--summary_main index 81c3021541b..9db08a4aa96 100644 --- a/t/t4013/diff.diff-tree_-c_--stat_--summary_master +++ b/t/t4013/diff.diff-tree_--cc_--stat_--summary_main @@ -1,4 +1,4 @@ -$ git diff-tree -c --stat --summary master +$ git diff-tree --cc --stat --summary main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_-c_--stat_master b/t/t4013/diff.diff-tree_--cc_--stat_main similarity index 76% rename from t/t4013/diff.diff-tree_-c_--stat_master rename to t/t4013/diff.diff-tree_--cc_--stat_main index 89d59b15480..7ecc67a524e 100644 --- a/t/t4013/diff.diff-tree_-c_--stat_master +++ b/t/t4013/diff.diff-tree_--cc_--stat_main @@ -1,4 +1,4 @@ -$ git diff-tree -c --stat master +$ git diff-tree --cc --stat main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_--cc_master b/t/t4013/diff.diff-tree_--cc_main similarity index 91% rename from t/t4013/diff.diff-tree_--cc_master rename to t/t4013/diff.diff-tree_--cc_main index 5ecb4e14ae4..1a962856ad4 100644 --- a/t/t4013/diff.diff-tree_--cc_master +++ b/t/t4013/diff.diff-tree_--cc_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc master +$ git diff-tree --cc main 59d314ad6f356dd08601a4cd5e530381da3e3c64 diff --cc dir/sub index cead32e,7289e35..992913c diff --git a/t/t4013/diff.diff-tree_-c_--abbrev_master b/t/t4013/diff.diff-tree_-c_--abbrev_main similarity index 83% rename from t/t4013/diff.diff-tree_-c_--abbrev_master rename to t/t4013/diff.diff-tree_-c_--abbrev_main index b8e4aa25307..039d127cf24 100644 --- a/t/t4013/diff.diff-tree_-c_--abbrev_master +++ b/t/t4013/diff.diff-tree_-c_--abbrev_main @@ -1,4 +1,4 @@ -$ git diff-tree -c --abbrev master +$ git diff-tree -c --abbrev main 59d314ad6f356dd08601a4cd5e530381da3e3c64 ::100644 100644 100644 cead32e... 7289e35... 992913c... MM dir/sub ::100644 100644 100644 b414108... f4615da... 10a8a9f... MM file0 diff --git a/t/t4013/diff.diff-tree_--cc_--stat_--summary_master b/t/t4013/diff.diff-tree_-c_--stat_--summary_main similarity index 70% rename from t/t4013/diff.diff-tree_--cc_--stat_--summary_master rename to t/t4013/diff.diff-tree_-c_--stat_--summary_main index d019867dd94..05a8d16ba70 100644 --- a/t/t4013/diff.diff-tree_--cc_--stat_--summary_master +++ b/t/t4013/diff.diff-tree_-c_--stat_--summary_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc --stat --summary master +$ git diff-tree -c --stat --summary main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_--cc_--stat_master b/t/t4013/diff.diff-tree_-c_--stat_main similarity index 75% rename from t/t4013/diff.diff-tree_--cc_--stat_master rename to t/t4013/diff.diff-tree_-c_--stat_main index 40b91796b34..61d9f450dfd 100644 --- a/t/t4013/diff.diff-tree_--cc_--stat_master +++ b/t/t4013/diff.diff-tree_-c_--stat_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc --stat master +$ git diff-tree -c --stat main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_-c_master b/t/t4013/diff.diff-tree_-c_main similarity index 93% rename from t/t4013/diff.diff-tree_-c_master rename to t/t4013/diff.diff-tree_-c_main index e2d2bb26114..a84e1185cf5 100644 --- a/t/t4013/diff.diff-tree_-c_master +++ b/t/t4013/diff.diff-tree_-c_main @@ -1,4 +1,4 @@ -$ git diff-tree -c master +$ git diff-tree -c main 59d314ad6f356dd08601a4cd5e530381da3e3c64 ::100644 100644 100644 cead32e925b1420c84c14cbf7cf755e7e45af8ad 7289e35bff32727c08dda207511bec138fdb9ea5 992913c5aa0a5476d10c49ed0f21fc0c6d1aedf3 MM dir/sub ::100644 100644 100644 b414108e81e5091fe0974a1858b4d0d22b107f70 f4615da674c09df322d6ba8d6b21ecfb1b1ba510 10a8a9f3657f91a156b9f0184ed79a20adef9f7f MM file0 diff --git a/t/t4013/diff.diff-tree_-m_master b/t/t4013/diff.diff-tree_-m_main similarity index 96% rename from t/t4013/diff.diff-tree_-m_master rename to t/t4013/diff.diff-tree_-m_main index 6d0a2207fb3..5da1f7f5251 100644 --- a/t/t4013/diff.diff-tree_-m_master +++ b/t/t4013/diff.diff-tree_-m_main @@ -1,4 +1,4 @@ -$ git diff-tree -m master +$ git diff-tree -m main 59d314ad6f356dd08601a4cd5e530381da3e3c64 :040000 040000 65f5c9dd60ce3b2b3324b618ac7accf8d912c113 0564e026437809817a64fff393079714b6dd4628 M dir :100644 100644 b414108e81e5091fe0974a1858b4d0d22b107f70 10a8a9f3657f91a156b9f0184ed79a20adef9f7f M file0 diff --git a/t/t4013/diff.diff-tree_-p_-m_master b/t/t4013/diff.diff-tree_-p_-m_main similarity index 97% rename from t/t4013/diff.diff-tree_-p_-m_master rename to t/t4013/diff.diff-tree_-p_-m_main index b60bea039d9..29c9fc20b8b 100644 --- a/t/t4013/diff.diff-tree_-p_-m_master +++ b/t/t4013/diff.diff-tree_-p_-m_main @@ -1,4 +1,4 @@ -$ git diff-tree -p -m master +$ git diff-tree -p -m main 59d314ad6f356dd08601a4cd5e530381da3e3c64 diff --git a/dir/sub b/dir/sub index cead32e..992913c 100644 diff --git a/t/t4013/diff.diff-tree_-p_main b/t/t4013/diff.diff-tree_-p_main new file mode 100644 index 00000000000..c658062422e --- /dev/null +++ b/t/t4013/diff.diff-tree_-p_main @@ -0,0 +1,2 @@ +$ git diff-tree -p main +$ diff --git a/t/t4013/diff.diff-tree_-p_master b/t/t4013/diff.diff-tree_-p_master deleted file mode 100644 index b182875fb2f..00000000000 --- a/t/t4013/diff.diff-tree_-p_master +++ /dev/null @@ -1,2 +0,0 @@ -$ git diff-tree -p master -$ diff --git a/t/t4013/diff.diff-tree_main b/t/t4013/diff.diff-tree_main new file mode 100644 index 00000000000..dc5b9fdeb6e --- /dev/null +++ b/t/t4013/diff.diff-tree_main @@ -0,0 +1,2 @@ +$ git diff-tree main +$ diff --git a/t/t4013/diff.diff-tree_master b/t/t4013/diff.diff-tree_master deleted file mode 100644 index fe9226f8a12..00000000000 --- a/t/t4013/diff.diff-tree_master +++ /dev/null @@ -1,2 +0,0 @@ -$ git diff-tree master -$ diff --git a/t/t4013/diff.diff_--dirstat_--cc_main~1_main b/t/t4013/diff.diff_--dirstat_--cc_main~1_main new file mode 100644 index 00000000000..168a357a02e --- /dev/null +++ b/t/t4013/diff.diff_--dirstat_--cc_main~1_main @@ -0,0 +1,3 @@ +$ git diff --dirstat --cc main~1 main + 40.0% dir/ +$ diff --git a/t/t4013/diff.diff_--dirstat_--cc_master~1_master b/t/t4013/diff.diff_--dirstat_--cc_master~1_master deleted file mode 100644 index fba4e34175e..00000000000 --- a/t/t4013/diff.diff_--dirstat_--cc_master~1_master +++ /dev/null @@ -1,3 +0,0 @@ -$ git diff --dirstat --cc master~1 master - 40.0% dir/ -$ diff --git a/t/t4013/diff.diff_--dirstat_main~1_main~2 b/t/t4013/diff.diff_--dirstat_main~1_main~2 new file mode 100644 index 00000000000..68097337089 --- /dev/null +++ b/t/t4013/diff.diff_--dirstat_main~1_main~2 @@ -0,0 +1,3 @@ +$ git diff --dirstat main~1 main~2 + 40.0% dir/ +$ diff --git a/t/t4013/diff.diff_--dirstat_master~1_master~2 b/t/t4013/diff.diff_--dirstat_master~1_master~2 deleted file mode 100644 index b672e1ca63d..00000000000 --- a/t/t4013/diff.diff_--dirstat_master~1_master~2 +++ /dev/null @@ -1,3 +0,0 @@ -$ git diff --dirstat master~1 master~2 - 40.0% dir/ -$ diff --git a/t/t4013/diff.diff_--line-prefix=abc_master_master^_side b/t/t4013/diff.diff_--line-prefix=abc_main_main^_side similarity index 87% rename from t/t4013/diff.diff_--line-prefix=abc_master_master^_side rename to t/t4013/diff.diff_--line-prefix=abc_main_main^_side index 99f91e7f0e3..67a2145a365 100644 --- a/t/t4013/diff.diff_--line-prefix=abc_master_master^_side +++ b/t/t4013/diff.diff_--line-prefix=abc_main_main^_side @@ -1,4 +1,4 @@ -$ git diff --line-prefix=abc master master^ side +$ git diff --line-prefix=abc main main^ side abcdiff --cc dir/sub abcindex cead32e,7289e35..992913c abc--- a/dir/sub diff --git a/t/t4013/diff.diff_master_master^_side b/t/t4013/diff.diff_main_main^_side similarity index 89% rename from t/t4013/diff.diff_master_master^_side rename to t/t4013/diff.diff_main_main^_side index 50ec9cadd61..ab81ec9e47b 100644 --- a/t/t4013/diff.diff_master_master^_side +++ b/t/t4013/diff.diff_main_main^_side @@ -1,4 +1,4 @@ -$ git diff master master^ side +$ git diff main main^ side diff --cc dir/sub index cead32e,7289e35..992913c --- a/dir/sub diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master b/t/t4013/diff.format-patch_--attach_--stdout_initial..main similarity index 98% rename from t/t4013/diff.format-patch_--attach_--stdout_initial..master rename to t/t4013/diff.format-patch_--attach_--stdout_initial..main index 52fedc179e5..9f56380350d 100644 --- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master +++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --attach --stdout initial..master +$ git format-patch --attach --stdout initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main^ similarity index 97% rename from t/t4013/diff.format-patch_--attach_--stdout_initial..master^ rename to t/t4013/diff.format-patch_--attach_--stdout_initial..main^ index 1c3cde251b5..80132ea99eb 100644 --- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ +++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main^ @@ -1,4 +1,4 @@ -$ git format-patch --attach --stdout initial..master^ +$ git format-patch --attach --stdout initial..main^ From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --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 similarity index 99% rename from t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master rename to t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main index 02c4db7ec58..8e889090fbe 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master +++ b/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --inline --stdout --numbered-files initial..master +$ git format-patch --inline --stdout --numbered-files initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --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 similarity index 99% rename from t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master rename to t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main index c7677c5951c..d7d2b12d155 100644 --- 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 @@ -1,4 +1,4 @@ -$ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..master +$ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_initial..main similarity index 98% rename from t/t4013/diff.format-patch_--inline_--stdout_initial..master rename to t/t4013/diff.format-patch_--inline_--stdout_initial..main index 5b3e34e2c0c..c49c423f82f 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master +++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --inline --stdout initial..master +$ git format-patch --inline --stdout initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^ similarity index 97% rename from t/t4013/diff.format-patch_--inline_--stdout_initial..master^ rename to t/t4013/diff.format-patch_--inline_--stdout_initial..main^ index d13f8a81280..8669dbfe6c9 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ +++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^ @@ -1,4 +1,4 @@ -$ git format-patch --inline --stdout initial..master^ +$ git format-patch --inline --stdout initial..main^ From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^^ similarity index 95% rename from t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ rename to t/t4013/diff.format-patch_--inline_--stdout_initial..main^^ index caec5537de3..b749be58b0a 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ +++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^^ @@ -1,4 +1,4 @@ -$ git format-patch --inline --stdout initial..master^^ +$ git format-patch --inline --stdout initial..main^^ From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --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^ similarity index 96% rename from t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^ rename to t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^ index 244d964fc67..567f2221982 100644 --- a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^ +++ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^ @@ -1,4 +1,4 @@ -$ git format-patch --stdout --cover-letter -n initial..master^ +$ git format-patch --stdout --cover-letter -n initial..main^ From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001 From: C O Mitter <committer@example.com> Date: Mon, 26 Jun 2006 00:06:00 +0000 diff --git a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main similarity index 97% rename from t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master rename to t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main index bfc287a147d..195b62ea4f5 100644 --- a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master +++ b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --stdout --no-numbered initial..master +$ git format-patch --stdout --no-numbered initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--numbered_initial..main similarity index 97% rename from t/t4013/diff.format-patch_--stdout_--numbered_initial..master rename to t/t4013/diff.format-patch_--stdout_--numbered_initial..main index 568f6f584e6..0678a38515d 100644 --- a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master +++ b/t/t4013/diff.format-patch_--stdout_--numbered_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --stdout --numbered initial..master +$ git format-patch --stdout --numbered initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--stdout_initial..master b/t/t4013/diff.format-patch_--stdout_initial..main similarity index 97% rename from t/t4013/diff.format-patch_--stdout_initial..master rename to t/t4013/diff.format-patch_--stdout_initial..main index 5f0352f9f70..b4a6302e7cb 100644 --- a/t/t4013/diff.format-patch_--stdout_initial..master +++ b/t/t4013/diff.format-patch_--stdout_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --stdout initial..master +$ git format-patch --stdout initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--stdout_initial..master^ b/t/t4013/diff.format-patch_--stdout_initial..main^ similarity index 96% rename from t/t4013/diff.format-patch_--stdout_initial..master^ rename to t/t4013/diff.format-patch_--stdout_initial..main^ index 2ae454d8073..36b32215826 100644 --- a/t/t4013/diff.format-patch_--stdout_initial..master^ +++ b/t/t4013/diff.format-patch_--stdout_initial..main^ @@ -1,4 +1,4 @@ -$ git format-patch --stdout initial..master^ +$ git format-patch --stdout initial..main^ From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.log_-c_-m_-p_master b/t/t4013/diff.log_--cc_-m_-p_main similarity index 99% rename from t/t4013/diff.log_-c_-m_-p_master rename to t/t4013/diff.log_--cc_-m_-p_main index b660f3d5f28..f32746ea3ed 100644 --- a/t/t4013/diff.log_-c_-m_-p_master +++ b/t/t4013/diff.log_--cc_-m_-p_main @@ -1,4 +1,4 @@ -$ git log -c -m -p master +$ git log --cc -m -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--decorate=full_--all b/t/t4013/diff.log_--decorate=full_--all index 6b0b334a5d6..c099399525a 100644 --- a/t/t4013/diff.log_--decorate=full_--all +++ b/t/t4013/diff.log_--decorate=full_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--decorate=full_--clear-decorations_--all b/t/t4013/diff.log_--decorate=full_--clear-decorations_--all index 1c030a6554e..c43684e5361 100644 --- a/t/t4013/diff.log_--decorate=full_--clear-decorations_--all +++ b/t/t4013/diff.log_--decorate=full_--clear-decorations_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--decorate=full_--decorate-all_--all b/t/t4013/diff.log_--decorate=full_--decorate-all_--all index d6e79287846..48dca61681c 100644 --- a/t/t4013/diff.log_--decorate=full_--decorate-all_--all +++ b/t/t4013/diff.log_--decorate=full_--decorate-all_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--decorate_--all b/t/t4013/diff.log_--decorate_--all index c7df1f58141..8bbf891f658 100644 --- a/t/t4013/diff.log_--decorate_--all +++ b/t/t4013/diff.log_--decorate_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--decorate_--clear-decorations_--all b/t/t4013/diff.log_--decorate_--clear-decorations_--all index 88be82cce31..86b1353f514 100644 --- a/t/t4013/diff.log_--decorate_--clear-decorations_--all +++ b/t/t4013/diff.log_--decorate_--clear-decorations_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--decorate_--decorate-all_--all b/t/t4013/diff.log_--decorate_--decorate-all_--all index 5d22618bb60..59fb17bfc54 100644 --- a/t/t4013/diff.log_--decorate_--decorate-all_--all +++ b/t/t4013/diff.log_--decorate_--decorate-all_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--diff-merges=first-parent_master b/t/t4013/diff.log_--diff-merges=first-parent_main similarity index 95% rename from t/t4013/diff.log_--diff-merges=first-parent_master rename to t/t4013/diff.log_--diff-merges=first-parent_main index fa63a557dd1..bacee621e54 100644 --- a/t/t4013/diff.log_--diff-merges=first-parent_master +++ b/t/t4013/diff.log_--diff-merges=first-parent_main @@ -1,4 +1,4 @@ -$ git log --diff-merges=first-parent master +$ git log --diff-merges=first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --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 similarity index 95% rename from t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master rename to t/t4013/diff.log_--diff-merges=off_-p_--first-parent_main index 597002232e5..fe180fda3be 100644 --- a/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master +++ b/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_main @@ -1,4 +1,4 @@ -$ git log --no-diff-merges -p --first-parent master +$ git log --diff-merges=off -p --first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --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 similarity index 95% rename from t/t4013/diff.log_--first-parent_--diff-merges=off_-p_master rename to t/t4013/diff.log_--first-parent_--diff-merges=off_-p_main index 5d7461a167e..dca62d4e608 100644 --- a/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_master +++ b/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_main @@ -1,4 +1,4 @@ -$ git log --first-parent --diff-merges=off -p master +$ git log --first-parent --diff-merges=off -p main commit 80e25ffa65bcdbe82ef654b4d06dbbde7945c37f Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --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 similarity index 95% rename from t/t4013/diff.log_--diff-merges=off_-p_--first-parent_master rename to t/t4013/diff.log_--no-diff-merges_-p_--first-parent_main index 194e893c94f..0b541180887 100644 --- a/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_master +++ b/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_main @@ -1,4 +1,4 @@ -$ git log --diff-merges=off -p --first-parent master +$ git log --no-diff-merges -p --first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_ similarity index 96% rename from t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ rename to t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_ index a18f1472a9a..3ed46cc8672 100644 --- a/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ +++ b/t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_ @@ -1,4 +1,4 @@ -$ git log --patch-with-stat --summary master -- dir/ +$ git log --patch-with-stat --summary main -- dir/ commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--patch-with-stat_master b/t/t4013/diff.log_--patch-with-stat_main similarity index 98% rename from t/t4013/diff.log_--patch-with-stat_master rename to t/t4013/diff.log_--patch-with-stat_main index ae425c46722..2e12b557cb7 100644 --- a/t/t4013/diff.log_--patch-with-stat_master +++ b/t/t4013/diff.log_--patch-with-stat_main @@ -1,4 +1,4 @@ -$ git log --patch-with-stat master +$ git log --patch-with-stat main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--patch-with-stat_master_--_dir_ b/t/t4013/diff.log_--patch-with-stat_main_--_dir_ similarity index 96% rename from t/t4013/diff.log_--patch-with-stat_master_--_dir_ rename to t/t4013/diff.log_--patch-with-stat_main_--_dir_ index d5207cadf44..d511ea7f6bf 100644 --- a/t/t4013/diff.log_--patch-with-stat_master_--_dir_ +++ b/t/t4013/diff.log_--patch-with-stat_main_--_dir_ @@ -1,4 +1,4 @@ -$ git log --patch-with-stat master -- dir/ +$ git log --patch-with-stat main -- dir/ commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --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 similarity index 98% rename from t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master rename to t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main index 0fc1e8cd71f..3cfd0e64229 100644 --- a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master +++ b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git log --root --cc --patch-with-stat --summary master +$ git log --root --cc --patch-with-stat --summary main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--patch-with-stat_--summary_main similarity index 98% rename from t/t4013/diff.log_--root_--patch-with-stat_--summary_master rename to t/t4013/diff.log_--root_--patch-with-stat_--summary_main index dffc09dde9e..9f4d6dfa44e 100644 --- a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master +++ b/t/t4013/diff.log_--root_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git log --root --patch-with-stat --summary master +$ git log --root --patch-with-stat --summary main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--root_--patch-with-stat_master b/t/t4013/diff.log_--root_--patch-with-stat_main similarity index 98% rename from t/t4013/diff.log_--root_--patch-with-stat_master rename to t/t4013/diff.log_--root_--patch-with-stat_main index 55aa98012de..0d69ae2e11b 100644 --- a/t/t4013/diff.log_--root_--patch-with-stat_master +++ b/t/t4013/diff.log_--root_--patch-with-stat_main @@ -1,4 +1,4 @@ -$ git log --root --patch-with-stat master +$ git log --root --patch-with-stat main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --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 similarity index 98% rename from t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master rename to t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main index 019d85f7de6..1b71add9dea 100644 --- a/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master +++ b/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git log --root -c --patch-with-stat --summary master +$ git log --root -c --patch-with-stat --summary main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--root_-p_master b/t/t4013/diff.log_--root_-p_main similarity index 98% rename from t/t4013/diff.log_--root_-p_master rename to t/t4013/diff.log_--root_-p_main index b42c334439b..04581296ed5 100644 --- a/t/t4013/diff.log_--root_-p_master +++ b/t/t4013/diff.log_--root_-p_main @@ -1,4 +1,4 @@ -$ git log --root -p master +$ git log --root -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--root_master b/t/t4013/diff.log_--root_main similarity index 96% rename from t/t4013/diff.log_--root_master rename to t/t4013/diff.log_--root_main index e8f46159da1..d5e90fd6b48 100644 --- a/t/t4013/diff.log_--root_master +++ b/t/t4013/diff.log_--root_main @@ -1,4 +1,4 @@ -$ git log --root master +$ git log --root main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-GF_-p_--pickaxe-all_master b/t/t4013/diff.log_-GF_-p_--pickaxe-all_main similarity index 90% rename from t/t4013/diff.log_-GF_-p_--pickaxe-all_master rename to t/t4013/diff.log_-GF_-p_--pickaxe-all_main index d36f88098b0..1f7a497c2d7 100644 --- a/t/t4013/diff.log_-GF_-p_--pickaxe-all_master +++ b/t/t4013/diff.log_-GF_-p_--pickaxe-all_main @@ -1,4 +1,4 @@ -$ git log -GF -p --pickaxe-all master +$ git log -GF -p --pickaxe-all main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-GF_-p_master b/t/t4013/diff.log_-GF_-p_main similarity index 91% rename from t/t4013/diff.log_-GF_-p_master rename to t/t4013/diff.log_-GF_-p_main index 9d93f2c23a8..c80dda41e9f 100644 --- a/t/t4013/diff.log_-GF_-p_master +++ b/t/t4013/diff.log_-GF_-p_main @@ -1,4 +1,4 @@ -$ git log -GF -p master +$ git log -GF -p main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-SF_master b/t/t4013/diff.log_-GF_main similarity index 86% rename from t/t4013/diff.log_-SF_master rename to t/t4013/diff.log_-GF_main index c1599f2f520..b94a7f78398 100644 --- a/t/t4013/diff.log_-SF_master +++ b/t/t4013/diff.log_-GF_main @@ -1,4 +1,4 @@ -$ git log -SF master +$ git log -GF main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master b/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main similarity index 97% rename from t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master rename to t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main index 929f35a05b4..67e26b4e547 100644 --- a/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master +++ b/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main @@ -1,4 +1,4 @@ -$ git log -IA -IB -I1 -I2 -p master +$ git log -IA -IB -I1 -I2 -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-SF_-p_master b/t/t4013/diff.log_-SF_-p_main similarity index 91% rename from t/t4013/diff.log_-SF_-p_master rename to t/t4013/diff.log_-SF_-p_main index 5e324389729..fa82ac14908 100644 --- a/t/t4013/diff.log_-SF_-p_master +++ b/t/t4013/diff.log_-SF_-p_main @@ -1,4 +1,4 @@ -$ git log -SF -p master +$ git log -SF -p main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-GF_master b/t/t4013/diff.log_-SF_main similarity index 86% rename from t/t4013/diff.log_-GF_master rename to t/t4013/diff.log_-SF_main index 4c6708d2d0d..dbf770db49d 100644 --- a/t/t4013/diff.log_-GF_master +++ b/t/t4013/diff.log_-SF_main @@ -1,4 +1,4 @@ -$ git log -GF master +$ git log -SF main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-SF_main_--max-count=0 b/t/t4013/diff.log_-SF_main_--max-count=0 new file mode 100644 index 00000000000..683b17eb998 --- /dev/null +++ b/t/t4013/diff.log_-SF_main_--max-count=0 @@ -0,0 +1,2 @@ +$ git log -SF main --max-count=0 +$ diff --git a/t/t4013/diff.log_-SF_master_--max-count=2 b/t/t4013/diff.log_-SF_main_--max-count=1 similarity index 79% rename from t/t4013/diff.log_-SF_master_--max-count=2 rename to t/t4013/diff.log_-SF_main_--max-count=1 index a6c55fd4822..2102426f8cc 100644 --- a/t/t4013/diff.log_-SF_master_--max-count=2 +++ b/t/t4013/diff.log_-SF_main_--max-count=1 @@ -1,4 +1,4 @@ -$ git log -SF master --max-count=2 +$ git log -SF main --max-count=1 commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-SF_main_--max-count=2 b/t/t4013/diff.log_-SF_main_--max-count=2 new file mode 100644 index 00000000000..23e12a4cbbd --- /dev/null +++ b/t/t4013/diff.log_-SF_main_--max-count=2 @@ -0,0 +1,7 @@ +$ git log -SF main --max-count=2 +commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 +Author: A U Thor <author@example.com> +Date: Mon Jun 26 00:02:00 2006 +0000 + + Third +$ diff --git a/t/t4013/diff.log_-SF_master_--max-count=0 b/t/t4013/diff.log_-SF_master_--max-count=0 deleted file mode 100644 index c1fc6c87317..00000000000 --- a/t/t4013/diff.log_-SF_master_--max-count=0 +++ /dev/null @@ -1,2 +0,0 @@ -$ git log -SF master --max-count=0 -$ diff --git a/t/t4013/diff.log_-SF_master_--max-count=1 b/t/t4013/diff.log_-SF_master_--max-count=1 deleted file mode 100644 index c981a038147..00000000000 --- a/t/t4013/diff.log_-SF_master_--max-count=1 +++ /dev/null @@ -1,7 +0,0 @@ -$ git log -SF master --max-count=1 -commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 -Author: A U Thor <author@example.com> -Date: Mon Jun 26 00:02:00 2006 +0000 - - Third -$ diff --git a/t/t4013/diff.log_-S_F_master b/t/t4013/diff.log_-S_F_main similarity index 86% rename from t/t4013/diff.log_-S_F_master rename to t/t4013/diff.log_-S_F_main index 978d2b41188..a75a42e1433 100644 --- a/t/t4013/diff.log_-S_F_master +++ b/t/t4013/diff.log_-S_F_main @@ -1,4 +1,4 @@ -$ git log -S F master +$ git log -S F main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_--cc_-m_-p_master b/t/t4013/diff.log_-c_-m_-p_main similarity index 99% rename from t/t4013/diff.log_--cc_-m_-p_master rename to t/t4013/diff.log_-c_-m_-p_main index 7c217cf348c..427f7324568 100644 --- a/t/t4013/diff.log_--cc_-m_-p_master +++ b/t/t4013/diff.log_-c_-m_-p_main @@ -1,4 +1,4 @@ -$ git log --cc -m -p master +$ git log -c -m -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-m_--raw_master b/t/t4013/diff.log_-m_--raw_main similarity index 98% rename from t/t4013/diff.log_-m_--raw_master rename to t/t4013/diff.log_-m_--raw_main index cd2ecc46283..31d9bc77073 100644 --- a/t/t4013/diff.log_-m_--raw_master +++ b/t/t4013/diff.log_-m_--raw_main @@ -1,4 +1,4 @@ -$ git log -m --raw master +$ git log -m --raw main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-m_--stat_master b/t/t4013/diff.log_-m_--stat_main similarity index 98% rename from t/t4013/diff.log_-m_--stat_master rename to t/t4013/diff.log_-m_--stat_main index c7db084fd90..4c8909229bf 100644 --- a/t/t4013/diff.log_-m_--stat_master +++ b/t/t4013/diff.log_-m_--stat_main @@ -1,4 +1,4 @@ -$ git log -m --stat master +$ git log -m --stat main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-m_-p_--first-parent_master b/t/t4013/diff.log_-m_-p_--first-parent_main similarity index 97% rename from t/t4013/diff.log_-m_-p_--first-parent_master rename to t/t4013/diff.log_-m_-p_--first-parent_main index 7a0073f5296..459e10786b9 100644 --- a/t/t4013/diff.log_-m_-p_--first-parent_master +++ b/t/t4013/diff.log_-m_-p_--first-parent_main @@ -1,4 +1,4 @@ -$ git log -m -p --first-parent master +$ git log -m -p --first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-m_-p_master b/t/t4013/diff.log_-m_-p_main similarity index 99% rename from t/t4013/diff.log_-m_-p_master rename to t/t4013/diff.log_-m_-p_main index 9ca62a01ed2..07453c56983 100644 --- a/t/t4013/diff.log_-m_-p_master +++ b/t/t4013/diff.log_-m_-p_main @@ -1,4 +1,4 @@ -$ git log -m -p master +$ git log -m -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-p_--diff-merges=first-parent_master b/t/t4013/diff.log_-p_--diff-merges=first-parent_main similarity index 97% rename from t/t4013/diff.log_-p_--diff-merges=first-parent_master rename to t/t4013/diff.log_-p_--diff-merges=first-parent_main index 9538a275112..264a2f373ec 100644 --- a/t/t4013/diff.log_-p_--diff-merges=first-parent_master +++ b/t/t4013/diff.log_-p_--diff-merges=first-parent_main @@ -1,4 +1,4 @@ -$ git log -p --diff-merges=first-parent master +$ git log -p --diff-merges=first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-p_--first-parent_master b/t/t4013/diff.log_-p_--first-parent_main similarity index 97% rename from t/t4013/diff.log_-p_--first-parent_master rename to t/t4013/diff.log_-p_--first-parent_main index 28840ebea1e..247980817b5 100644 --- a/t/t4013/diff.log_-p_--first-parent_master +++ b/t/t4013/diff.log_-p_--first-parent_main @@ -1,4 +1,4 @@ -$ git log -p --first-parent master +$ git log -p --first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-p_master b/t/t4013/diff.log_-p_main similarity index 98% rename from t/t4013/diff.log_-p_master rename to t/t4013/diff.log_-p_main index bf1326dc366..c82b4dbf165 100644 --- a/t/t4013/diff.log_-p_master +++ b/t/t4013/diff.log_-p_main @@ -1,4 +1,4 @@ -$ git log -p master +$ git log -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_master b/t/t4013/diff.log_main similarity index 97% rename from t/t4013/diff.log_master rename to t/t4013/diff.log_main index a8f6ce5abd6..50401f73e6e 100644 --- a/t/t4013/diff.log_master +++ b/t/t4013/diff.log_main @@ -1,4 +1,4 @@ -$ git log master +$ git log main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master b/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main similarity index 81% rename from t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master rename to t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main index bb80f013b37..3aa1f80af35 100644 --- a/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master +++ b/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main @@ -1,4 +1,4 @@ -$ git diff-tree -c --abbrev master +$ git diff-tree -c --abbrev main 59d314ad6f356dd08601a4cd5e530381da3e3c64 ::100644 100644 100644 cead32e 7289e35 992913c MM dir/sub ::100644 100644 100644 b414108 f4615da 10a8a9f MM file0 diff --git a/t/t4013/diff.noellipses-whatchanged_--root_master b/t/t4013/diff.noellipses-whatchanged_--root_main similarity index 96% rename from t/t4013/diff.noellipses-whatchanged_--root_master rename to t/t4013/diff.noellipses-whatchanged_--root_main index c2cfd4e7292..2bec0558356 100644 --- a/t/t4013/diff.noellipses-whatchanged_--root_master +++ b/t/t4013/diff.noellipses-whatchanged_--root_main @@ -1,4 +1,4 @@ -$ git whatchanged --root master +$ git whatchanged --root main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.noellipses-whatchanged_-SF_master b/t/t4013/diff.noellipses-whatchanged_-SF_main similarity index 86% rename from t/t4013/diff.noellipses-whatchanged_-SF_master rename to t/t4013/diff.noellipses-whatchanged_-SF_main index b36ce5886e0..0c1476d19eb 100644 --- a/t/t4013/diff.noellipses-whatchanged_-SF_master +++ b/t/t4013/diff.noellipses-whatchanged_-SF_main @@ -1,4 +1,4 @@ -$ git whatchanged -SF master +$ git whatchanged -SF main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.noellipses-whatchanged_master b/t/t4013/diff.noellipses-whatchanged_main similarity index 96% rename from t/t4013/diff.noellipses-whatchanged_master rename to t/t4013/diff.noellipses-whatchanged_main index 55e500f2edb..c48d2851aab 100644 --- a/t/t4013/diff.noellipses-whatchanged_master +++ b/t/t4013/diff.noellipses-whatchanged_main @@ -1,4 +1,4 @@ -$ git whatchanged master +$ git whatchanged main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.show_--first-parent_master b/t/t4013/diff.show_--first-parent_main similarity index 92% rename from t/t4013/diff.show_--first-parent_master rename to t/t4013/diff.show_--first-parent_main index 3dcbe473a0d..480502d65c2 100644 --- a/t/t4013/diff.show_--first-parent_master +++ b/t/t4013/diff.show_--first-parent_main @@ -1,4 +1,4 @@ -$ git show --first-parent master +$ git show --first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.show_-c_master b/t/t4013/diff.show_-c_main similarity index 95% rename from t/t4013/diff.show_-c_master rename to t/t4013/diff.show_-c_main index 81aba8da96c..74ef8bc96b2 100644 --- a/t/t4013/diff.show_-c_master +++ b/t/t4013/diff.show_-c_main @@ -1,4 +1,4 @@ -$ git show -c master +$ git show -c main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.show_-m_master b/t/t4013/diff.show_-m_main similarity index 98% rename from t/t4013/diff.show_-m_master rename to t/t4013/diff.show_-m_main index 4ea2ee453d5..8fd56736d97 100644 --- a/t/t4013/diff.show_-m_master +++ b/t/t4013/diff.show_-m_main @@ -1,4 +1,4 @@ -$ git show -m master +$ git show -m main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.show_master b/t/t4013/diff.show_main similarity index 96% rename from t/t4013/diff.show_master rename to t/t4013/diff.show_main index fb08ce0e46d..630b52a95ef 100644 --- a/t/t4013/diff.show_master +++ b/t/t4013/diff.show_main @@ -1,4 +1,4 @@ -$ git show master +$ git show main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_ similarity index 94% rename from t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ rename to t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_ index c8b6af2f438..ce0754d556e 100644 --- a/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ +++ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_ @@ -1,4 +1,4 @@ -$ git whatchanged --patch-with-stat --summary master -- dir/ +$ git whatchanged --patch-with-stat --summary main -- dir/ commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_--patch-with-stat_master b/t/t4013/diff.whatchanged_--patch-with-stat_main similarity index 97% rename from t/t4013/diff.whatchanged_--patch-with-stat_master rename to t/t4013/diff.whatchanged_--patch-with-stat_main index 1ac431ba921..aabccf39a53 100644 --- a/t/t4013/diff.whatchanged_--patch-with-stat_master +++ b/t/t4013/diff.whatchanged_--patch-with-stat_main @@ -1,4 +1,4 @@ -$ git whatchanged --patch-with-stat master +$ git whatchanged --patch-with-stat main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_ b/t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_ similarity index 94% rename from t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_ rename to t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_ index b30c28588f9..c05a0e81496 100644 --- a/t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_ +++ b/t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_ @@ -1,4 +1,4 @@ -$ git whatchanged --patch-with-stat master -- dir/ +$ git whatchanged --patch-with-stat main -- dir/ commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --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 similarity index 97% rename from t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master rename to t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main index 30aae7817b9..1f74b1b5487 100644 --- a/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master +++ b/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git whatchanged --root --cc --patch-with-stat --summary master +$ git whatchanged --root --cc --patch-with-stat --summary main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main similarity index 97% rename from t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master rename to t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main index db90e515254..80d98121511 100644 --- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master +++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git whatchanged --root --patch-with-stat --summary master +$ git whatchanged --root --patch-with-stat --summary main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_main similarity index 97% rename from t/t4013/diff.whatchanged_--root_--patch-with-stat_master rename to t/t4013/diff.whatchanged_--root_--patch-with-stat_main index 9a6cc92ce7d..c0b9082a2c8 100644 --- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master +++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_main @@ -1,4 +1,4 @@ -$ git whatchanged --root --patch-with-stat master +$ git whatchanged --root --patch-with-stat main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --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 similarity index 97% rename from t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master rename to t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main index d1d32bd34c3..0002c6912e1 100644 --- a/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master +++ b/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git whatchanged --root -c --patch-with-stat --summary master +$ git whatchanged --root -c --patch-with-stat --summary main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.whatchanged_--root_-p_master b/t/t4013/diff.whatchanged_--root_-p_main similarity index 98% rename from t/t4013/diff.whatchanged_--root_-p_master rename to t/t4013/diff.whatchanged_--root_-p_main index ebf1f0661e0..39f3e2be746 100644 --- a/t/t4013/diff.whatchanged_--root_-p_master +++ b/t/t4013/diff.whatchanged_--root_-p_main @@ -1,4 +1,4 @@ -$ git whatchanged --root -p master +$ git whatchanged --root -p main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_--root_master b/t/t4013/diff.whatchanged_--root_main similarity index 97% rename from t/t4013/diff.whatchanged_--root_master rename to t/t4013/diff.whatchanged_--root_main index a405cb61388..36f4d6697f5 100644 --- a/t/t4013/diff.whatchanged_--root_master +++ b/t/t4013/diff.whatchanged_--root_main @@ -1,4 +1,4 @@ -$ git whatchanged --root master +$ git whatchanged --root main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_-SF_-p_master b/t/t4013/diff.whatchanged_-SF_-p_main similarity index 89% rename from t/t4013/diff.whatchanged_-SF_-p_master rename to t/t4013/diff.whatchanged_-SF_-p_main index f39da848228..0e2e67c0df8 100644 --- a/t/t4013/diff.whatchanged_-SF_-p_master +++ b/t/t4013/diff.whatchanged_-SF_-p_main @@ -1,4 +1,4 @@ -$ git whatchanged -SF -p master +$ git whatchanged -SF -p main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_-SF_master b/t/t4013/diff.whatchanged_-SF_main similarity index 86% rename from t/t4013/diff.whatchanged_-SF_master rename to t/t4013/diff.whatchanged_-SF_main index 0499321d0eb..34c6bf6b950 100644 --- a/t/t4013/diff.whatchanged_-SF_master +++ b/t/t4013/diff.whatchanged_-SF_main @@ -1,4 +1,4 @@ -$ git whatchanged -SF master +$ git whatchanged -SF main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_-p_master b/t/t4013/diff.whatchanged_-p_main similarity index 98% rename from t/t4013/diff.whatchanged_-p_master rename to t/t4013/diff.whatchanged_-p_main index f18d43209c0..18f3bdeef48 100644 --- a/t/t4013/diff.whatchanged_-p_master +++ b/t/t4013/diff.whatchanged_-p_main @@ -1,4 +1,4 @@ -$ git whatchanged -p master +$ git whatchanged -p main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_master b/t/t4013/diff.whatchanged_main similarity index 97% rename from t/t4013/diff.whatchanged_master rename to t/t4013/diff.whatchanged_main index cd3bcc2c726..d6c83ed8b03 100644 --- a/t/t4013/diff.whatchanged_master +++ b/t/t4013/diff.whatchanged_main @@ -1,4 +1,4 @@ -$ git whatchanged master +$ git whatchanged main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply related [flat|nested] 56+ messages in thread
* [PATCH v2 3/4] t9902: switch default branch name to main 2025-09-04 13:21 ` [PATCH v2 0/4] " Phillip Wood 2025-09-04 13:21 ` [PATCH v2 1/4] breaking-changes: switch default branch to main Phillip Wood 2025-09-04 13:21 ` [PATCH v2 2/4] t4013: switch default branch name " Phillip Wood @ 2025-09-04 13:21 ` Phillip Wood 2025-09-04 18:27 ` Junio C Hamano 2025-09-05 12:14 ` Patrick Steinhardt 2025-09-04 13:21 ` [PATCH v2 4/4] t0613: stop setting default initial branch Phillip Wood 2025-09-04 17:03 ` [PATCH v2 0/4] breaking changes: switch default initial branch name to "main" Junio C Hamano 4 siblings, 2 replies; 56+ messages in thread From: Phillip Wood @ 2025-09-04 13:21 UTC (permalink / raw) To: git Cc: Johannes Schindelin, Wing Huang, Junio C Hamano, Patrick Steinhardt, Phillip Wood From: Phillip Wood <phillip.wood@dunelm.org.uk> Remove the penultimate use of "GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= main" in our test suite. We have slowly been removing these ever since we started to switch the default branch name used in tests to "main". Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- t/t9902-completion.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 6650d33fba6..964e1f15693 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -11,9 +11,9 @@ test_description='test bash completion' # untraceable with such ancient Bash versions. test_untraceable=UnfortunatelyYes -# Override environment and always use master for the default initial branch +# Override environment and always use main for the default initial branch # name for these tests, so that rev completion candidates are as expected. -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./lib-bash.sh @@ -1453,7 +1453,7 @@ test_expect_success 'git bisect - start subcommand arguments before double-dash HEAD Z final Z initial Z - master Z + main Z EOF ) ' -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply related [flat|nested] 56+ messages in thread
* Re: [PATCH v2 3/4] t9902: switch default branch name to main 2025-09-04 13:21 ` [PATCH v2 3/4] t9902: " Phillip Wood @ 2025-09-04 18:27 ` Junio C Hamano 2025-09-05 10:07 ` Phillip Wood 2025-09-05 12:14 ` Patrick Steinhardt 1 sibling, 1 reply; 56+ messages in thread From: Junio C Hamano @ 2025-09-04 18:27 UTC (permalink / raw) To: Phillip Wood; +Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt Phillip Wood <phillip.wood123@gmail.com> writes: > From: Phillip Wood <phillip.wood@dunelm.org.uk> > > Remove the penultimate use of "GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= > main" in our test suite. We have slowly been removing these ever since s|main|master|, probably? > we started to switch the default branch name used in tests to "main". > > Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> > --- > t/t9902-completion.sh | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh > index 6650d33fba6..964e1f15693 100755 > --- a/t/t9902-completion.sh > +++ b/t/t9902-completion.sh > @@ -11,9 +11,9 @@ test_description='test bash completion' > # untraceable with such ancient Bash versions. > test_untraceable=UnfortunatelyYes > > -# Override environment and always use master for the default initial branch > +# Override environment and always use main for the default initial branch > # name for these tests, so that rev completion candidates are as expected. > -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master > +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main > export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME > > . ./lib-bash.sh > @@ -1453,7 +1453,7 @@ test_expect_success 'git bisect - start subcommand arguments before double-dash > HEAD Z > final Z > initial Z > - master Z > + main Z > EOF > ) > ' ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH v2 3/4] t9902: switch default branch name to main 2025-09-04 18:27 ` Junio C Hamano @ 2025-09-05 10:07 ` Phillip Wood 0 siblings, 0 replies; 56+ messages in thread From: Phillip Wood @ 2025-09-05 10:07 UTC (permalink / raw) To: Junio C Hamano; +Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt On 04/09/2025 19:27, Junio C Hamano wrote: > Phillip Wood <phillip.wood123@gmail.com> writes: > >> From: Phillip Wood <phillip.wood@dunelm.org.uk> >> >> Remove the penultimate use of "GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= >> main" in our test suite. We have slowly been removing these ever since > > s|main|master|, probably? Oops, yes Thanks Phillip >> we started to switch the default branch name used in tests to "main". >> >> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> >> --- >> t/t9902-completion.sh | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh >> index 6650d33fba6..964e1f15693 100755 >> --- a/t/t9902-completion.sh >> +++ b/t/t9902-completion.sh >> @@ -11,9 +11,9 @@ test_description='test bash completion' >> # untraceable with such ancient Bash versions. >> test_untraceable=UnfortunatelyYes >> >> -# Override environment and always use master for the default initial branch >> +# Override environment and always use main for the default initial branch >> # name for these tests, so that rev completion candidates are as expected. >> -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master >> +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main >> export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME >> >> . ./lib-bash.sh >> @@ -1453,7 +1453,7 @@ test_expect_success 'git bisect - start subcommand arguments before double-dash >> HEAD Z >> final Z >> initial Z >> - master Z >> + main Z >> EOF >> ) >> ' ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH v2 3/4] t9902: switch default branch name to main 2025-09-04 13:21 ` [PATCH v2 3/4] t9902: " Phillip Wood 2025-09-04 18:27 ` Junio C Hamano @ 2025-09-05 12:14 ` Patrick Steinhardt 2025-09-09 9:12 ` Phillip Wood 1 sibling, 1 reply; 56+ messages in thread From: Patrick Steinhardt @ 2025-09-05 12:14 UTC (permalink / raw) To: Phillip Wood Cc: git, Johannes Schindelin, Wing Huang, Junio C Hamano, Phillip Wood On Thu, Sep 04, 2025 at 02:21:31PM +0100, Phillip Wood wrote: > diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh > index 6650d33fba6..964e1f15693 100755 > --- a/t/t9902-completion.sh > +++ b/t/t9902-completion.sh > @@ -11,9 +11,9 @@ test_description='test bash completion' > # untraceable with such ancient Bash versions. > test_untraceable=UnfortunatelyYes > > -# Override environment and always use master for the default initial branch > +# Override environment and always use main for the default initial branch > # name for these tests, so that rev completion candidates are as expected. > -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master > +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main > export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME > > . ./lib-bash.sh > @@ -1453,7 +1453,7 @@ test_expect_success 'git bisect - start subcommand arguments before double-dash > HEAD Z > final Z > initial Z > - master Z > + main Z > EOF > ) > ' Hm. Wouldn't it be preferable to do something like the below patch instead? We would potentially also have to sort the output, but like this we don't care about the initial branch name at all. Patrick diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 6650d33fba..321005a06a 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -11,11 +11,6 @@ test_description='test bash completion' # untraceable with such ancient Bash versions. test_untraceable=UnfortunatelyYes -# Override environment and always use master for the default initial branch -# name for these tests, so that rev completion candidates are as expected. -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master -export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME - . ./lib-bash.sh complete () @@ -1449,11 +1444,11 @@ test_expect_success 'setup for git-bisect tests requiring a repo' ' test_expect_success 'git bisect - start subcommand arguments before double-dash are completed as revs' ' ( cd git-bisect && - test_completion "git bisect start " <<-\EOF + test_completion "git bisect start " <<-EOF HEAD Z final Z initial Z - master Z + $(git branch --show-current) Z EOF ) ' ^ permalink raw reply related [flat|nested] 56+ messages in thread
* Re: [PATCH v2 3/4] t9902: switch default branch name to main 2025-09-05 12:14 ` Patrick Steinhardt @ 2025-09-09 9:12 ` Phillip Wood 0 siblings, 0 replies; 56+ messages in thread From: Phillip Wood @ 2025-09-09 9:12 UTC (permalink / raw) To: Patrick Steinhardt, Phillip Wood Cc: git, Johannes Schindelin, Wing Huang, Junio C Hamano On 05/09/2025 13:14, Patrick Steinhardt wrote: > On Thu, Sep 04, 2025 at 02:21:31PM +0100, Phillip Wood wrote: >> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh >> index 6650d33fba6..964e1f15693 100755 >> --- a/t/t9902-completion.sh >> +++ b/t/t9902-completion.sh >> @@ -11,9 +11,9 @@ test_description='test bash completion' >> # untraceable with such ancient Bash versions. >> test_untraceable=UnfortunatelyYes >> >> -# Override environment and always use master for the default initial branch >> +# Override environment and always use main for the default initial branch >> # name for these tests, so that rev completion candidates are as expected. >> -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master >> +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main >> export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME >> >> . ./lib-bash.sh >> @@ -1453,7 +1453,7 @@ test_expect_success 'git bisect - start subcommand arguments before double-dash >> HEAD Z >> final Z >> initial Z >> - master Z >> + main Z >> EOF >> ) >> ' > > Hm. Wouldn't it be preferable to do something like the below patch > instead? We would potentially also have to sort the output, but like > this we don't care about the initial branch name at all. If we're going to do that then I'd strongly prefer that we have the test suite set something like TEST_DEFAULT_BRANCH and use that instead of forking "git branch" or "git symbolic-ref" everywhere. It keeps the tests cleaner and avoids slowing the test suite down by adding a bunch of new processes. As this patch series is focused on removing GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main rather than making tests independent of the default branch name I'd prefer to leave this patch as is. Thanks Phillip > Patrick > > diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh > index 6650d33fba..321005a06a 100755 > --- a/t/t9902-completion.sh > +++ b/t/t9902-completion.sh > @@ -11,11 +11,6 @@ test_description='test bash completion' > # untraceable with such ancient Bash versions. > test_untraceable=UnfortunatelyYes > > -# Override environment and always use master for the default initial branch > -# name for these tests, so that rev completion candidates are as expected. > -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master > -export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME > - > . ./lib-bash.sh > > complete () > @@ -1449,11 +1444,11 @@ test_expect_success 'setup for git-bisect tests requiring a repo' ' > test_expect_success 'git bisect - start subcommand arguments before double-dash are completed as revs' ' > ( > cd git-bisect && > - test_completion "git bisect start " <<-\EOF > + test_completion "git bisect start " <<-EOF > HEAD Z > final Z > initial Z > - master Z > + $(git branch --show-current) Z > EOF > ) > ' > ^ permalink raw reply [flat|nested] 56+ messages in thread
* [PATCH v2 4/4] t0613: stop setting default initial branch 2025-09-04 13:21 ` [PATCH v2 0/4] " Phillip Wood ` (2 preceding siblings ...) 2025-09-04 13:21 ` [PATCH v2 3/4] t9902: " Phillip Wood @ 2025-09-04 13:21 ` Phillip Wood 2025-09-04 18:35 ` Junio C Hamano 2025-09-04 17:03 ` [PATCH v2 0/4] breaking changes: switch default initial branch name to "main" Junio C Hamano 4 siblings, 1 reply; 56+ messages in thread From: Phillip Wood @ 2025-09-04 13:21 UTC (permalink / raw) To: git Cc: Johannes Schindelin, Wing Huang, Junio C Hamano, Patrick Steinhardt, Phillip Wood From: Phillip Wood <phillip.wood@dunelm.org.uk> As the tests are all run in separate repositories, set the branch name to "master" when creating the repository for the tests where the result depends on the branch name. This reduceds the number of tests that depend on the default branch name being "master" and removes the last instance of a test file using "GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= master". Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- t/t0613-reftable-write-options.sh | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/t/t0613-reftable-write-options.sh b/t/t0613-reftable-write-options.sh index d77e601111f..6d00432219f 100755 --- a/t/t0613-reftable-write-options.sh +++ b/t/t0613-reftable-write-options.sh @@ -11,16 +11,14 @@ export GIT_TEST_REFTABLE_AUTOCOMPACTION # Block sizes depend on the hash function, so we force SHA1 here. GIT_TEST_DEFAULT_HASH=sha1 export GIT_TEST_DEFAULT_HASH -# Block sizes also depend on the actual refs we write, so we force "master" to -# be the default initial branch name. -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master -export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh test_expect_success 'default write options' ' test_when_finished "rm -rf repo" && - git init repo && + # Block sizes also depend on the actual refs we write, so we force + # "master" to be the default initial branch name. + git init --initial-branch master repo && ( cd repo && test_commit initial && @@ -43,7 +41,7 @@ test_expect_success 'default write options' ' test_expect_success 'disabled reflog writes no log blocks' ' test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && + git init --initial-branch master repo && ( cd repo && test_commit initial && @@ -62,7 +60,7 @@ test_expect_success 'disabled reflog writes no log blocks' ' test_expect_success 'many refs results in multiple blocks' ' test_when_finished "rm -rf repo" && - git init repo && + git init --initial-branch master repo && ( cd repo && test_commit initial && @@ -115,7 +113,7 @@ test_expect_success 'tiny block size leads to error' ' test_expect_success 'small block size leads to multiple ref blocks' ' test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && + git init --initial-branch master repo && ( cd repo && test_commit A && @@ -172,7 +170,7 @@ test_expect_success 'block size exceeding maximum supported size' ' test_expect_success 'restart interval at every single record' ' test_when_finished "rm -rf repo" && - git init repo && + git init --initial-branch master repo && ( cd repo && test_commit initial && @@ -212,7 +210,7 @@ test_expect_success 'restart interval exceeding maximum supported interval' ' test_expect_success 'object index gets written by default with ref index' ' test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && + git init --initial-branch master repo && ( cd repo && test_commit initial && @@ -247,7 +245,7 @@ test_expect_success 'object index gets written by default with ref index' ' test_expect_success 'object index can be disabled' ' test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && + git init --initial-branch master repo && ( cd repo && test_commit initial && -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply related [flat|nested] 56+ messages in thread
* Re: [PATCH v2 4/4] t0613: stop setting default initial branch 2025-09-04 13:21 ` [PATCH v2 4/4] t0613: stop setting default initial branch Phillip Wood @ 2025-09-04 18:35 ` Junio C Hamano 2025-09-05 10:09 ` Phillip Wood 0 siblings, 1 reply; 56+ messages in thread From: Junio C Hamano @ 2025-09-04 18:35 UTC (permalink / raw) To: Phillip Wood; +Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt Phillip Wood <phillip.wood123@gmail.com> writes: > From: Phillip Wood <phillip.wood@dunelm.org.uk> > > As the tests are all run in separate repositories, set the branch name > to "master" when creating the repository for the tests where the result > depends on the branch name. This reduceds the number of tests that > depend on the default branch name being "master" and removes the last > instance of a test file using "GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= > master". > > Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> > --- > t/t0613-reftable-write-options.sh | 20 +++++++++----------- > 1 file changed, 9 insertions(+), 11 deletions(-) > > diff --git a/t/t0613-reftable-write-options.sh b/t/t0613-reftable-write-options.sh > index d77e601111f..6d00432219f 100755 > --- a/t/t0613-reftable-write-options.sh > +++ b/t/t0613-reftable-write-options.sh > @@ -11,16 +11,14 @@ export GIT_TEST_REFTABLE_AUTOCOMPACTION > # Block sizes depend on the hash function, so we force SHA1 here. > GIT_TEST_DEFAULT_HASH=sha1 > export GIT_TEST_DEFAULT_HASH > -# Block sizes also depend on the actual refs we write, so we force "master" to > -# be the default initial branch name. > -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master > -export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME > > . ./test-lib.sh > > test_expect_success 'default write options' ' > test_when_finished "rm -rf repo" && > - git init repo && > + # Block sizes also depend on the actual refs we write, so we force > + # "master" to be the default initial branch name. A new developer who would want to add a new test later may or may not pay attention to this first test piece that would look an equal among many others. I suspect that keeping the comment before these test sequences begin would have been better. Or perhaps append "all the following test use the --initial-branch option for the same reason" after it? > + git init --initial-branch master repo && > + git init --initial-branch master repo && > + git init --initial-branch master repo && > + git init --initial-branch master repo && > + git init --initial-branch master repo && > + git init --initial-branch master repo && > + git init --initial-branch master repo && Having to change this many "git init" invocations feels awkward, especially when we envision what needs to be done if somebody needs to update this file later. I wonder if a new helper function upfront +init_repo () { + git init --initial-branch master repo +} + with many changes like this to the rest of file - git init repo && + init_repo && may be easier to maintain over time? I dunno. ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH v2 4/4] t0613: stop setting default initial branch 2025-09-04 18:35 ` Junio C Hamano @ 2025-09-05 10:09 ` Phillip Wood 0 siblings, 0 replies; 56+ messages in thread From: Phillip Wood @ 2025-09-05 10:09 UTC (permalink / raw) To: Junio C Hamano; +Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt On 04/09/2025 19:35, Junio C Hamano wrote: > > Having to change this many "git init" invocations feels awkward, > especially when we envision what needs to be done if somebody needs > to update this file later. I wonder if a new helper function > upfront > > +init_repo () { > + git init --initial-branch master repo > +} > + > > with many changes like this to the rest of file > > - git init repo && > + init_repo && > > may be easier to maintain over time? I dunno. Good idea, that would give us a convenient place to move the comment to as well Thanks Phillip ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH v2 0/4] breaking changes: switch default initial branch name to "main" 2025-09-04 13:21 ` [PATCH v2 0/4] " Phillip Wood ` (3 preceding siblings ...) 2025-09-04 13:21 ` [PATCH v2 4/4] t0613: stop setting default initial branch Phillip Wood @ 2025-09-04 17:03 ` Junio C Hamano 2025-09-04 18:47 ` Phillip Wood 4 siblings, 1 reply; 56+ messages in thread From: Junio C Hamano @ 2025-09-04 17:03 UTC (permalink / raw) To: Phillip Wood; +Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt Phillip Wood <phillip.wood123@gmail.com> writes: > The patches have been re-ordered so that the change to the default > initial branch name comes first. We have been running for quite some time the "breaking-changes" CI job with 'main' as the default initial branch name, long before this series materialized. Thanks to it, we know that such a flip should not break any of our tests, so this patch being the first in the series makes perfect sense. > That patch now includes a test > for the default initial branch name and includes the changes to the > commit message and documentation suggested by Patrick and Junio. The > commit messages for the other patches have been reworded now that > GIT_TEST_DEFAULT_BRANCH_NAME is not being removed but the code changes > are the same. > > This is an alternative to changing the branch name now as suggested in > https://lore.kernel.org<pull.1961.git.1756183921623.gitgitgadget@gmail.com No reason to repost, but for those who are reading from the sidelines, the URL would work better with "org<pull" -> "org/git/pull". Thanks. ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH v2 0/4] breaking changes: switch default initial branch name to "main" 2025-09-04 17:03 ` [PATCH v2 0/4] breaking changes: switch default initial branch name to "main" Junio C Hamano @ 2025-09-04 18:47 ` Phillip Wood 0 siblings, 0 replies; 56+ messages in thread From: Phillip Wood @ 2025-09-04 18:47 UTC (permalink / raw) To: Junio C Hamano; +Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt On 04/09/2025 18:03, Junio C Hamano wrote: > Phillip Wood <phillip.wood123@gmail.com> writes: > >> This is an alternative to changing the branch name now as suggested in >> https://lore.kernel.org<pull.1961.git.1756183921623.gitgitgadget@gmail.com > > No reason to repost, but for those who are reading from the > sidelines, the URL would work better with "org<pull" -> > "org/git/pull". Thanks for correcting that. dscho pointed it out last time and I'd forgotten to change it. Thanks Phillip ^ permalink raw reply [flat|nested] 56+ messages in thread
* [PATCH v3 0/4] breaking changes: switch default initial branch name to "main" 2025-08-27 15:24 [PATCH 0/6] breaking changes: switch default initial branch name to "main" Phillip Wood ` (7 preceding siblings ...) 2025-09-04 13:21 ` [PATCH v2 0/4] " Phillip Wood @ 2025-09-10 15:28 ` Phillip Wood 2025-09-10 15:29 ` [PATCH v3 1/4] breaking-changes: switch default branch to main Phillip Wood ` (5 more replies) 8 siblings, 6 replies; 56+ messages in thread From: Phillip Wood @ 2025-09-10 15:28 UTC (permalink / raw) To: git; +Cc: Johannes Schindelin, Wing Huang, Junio C Hamano, Patrick Steinhardt From: Phillip Wood <phillip.wood@dunelm.org.uk> This series switches the default branch name from "master" to "main" when WITH_BREAKING_CHANGES is enabled. We have been warning that the default name will change since 675704c74dd (init: provide useful advice about init.defaultBranch, 2020-12-11) and the major git forges have all switched their default branch name to "main", so I think it makes sense to change the default branch name in git to match the wider ecosystem. The first patch switches the default initial branch name to "main" and the other three patches remove the last remaining instances of GIT_TEST_DEFAULT_BRANCH_NAME=master from the test suite. Patch 2 is quite large but is mechanically generated so it should be possible to review it by checking that the changes can be reproduced. As this series changes the default branch name it focuses on updating tests that rely on the default branch name being "master", there are still a number of tests that create a branch called "master". Changes since V2: Patch 1: reworded documentation Patch 3: fixed typo in commit message Patch 4: added helper function to initialise repository I'm still on the fence about the suggestion to add some advice on how to rename the branch after it is created in order to help users who are following tutorials using "master" rather than "main". One the one hand I can see that would be helpful, on the other it is pretty annoying to everyone else. If it turns out that we want to add it we can always do so at a later date. V2 Cover letter: Thanks to everyone who commented on V1, I have dropped the removal of GIT_TEST_DEFAULT_BRANCH_NAME and the test changes related to that but have kept the patches that remove GIT_TEST_DEFAULT_BRANCH_NAME=master. The patches have been re-ordered so that the change to the default initial branch name comes first. That patch now includes a test for the default initial branch name and includes the changes to the commit message and documentation suggested by Patrick and Junio. The commit messages for the other patches have been reworded now that GIT_TEST_DEFAULT_BRANCH_NAME is not being removed but the code changes are the same. This is an alternative to changing the branch name now as suggested in https://lore.kernel.org/git/pull.1961.git.1756183921623.gitgitgadget@gmail.com Base-Commit: f814da676ae46aac5be0a98b99373a76dee6cedb Published-As: https://github.com/phillipwood/git/releases/tag/pw%2Finitial-branch-is-main%2Fv3 View-Changes-At: https://github.com/phillipwood/git/compare/f814da676...353328c61 Fetch-It-Via: git fetch https://github.com/phillipwood/git pw/initial-branch-is-main/v3 Phillip Wood (4): breaking-changes: switch default branch to main t4013: switch default branch name to main t9902: switch default branch name to main t0613: stop setting default initial branch Documentation/BreakingChanges.adoc | 6 + Documentation/git-init.adoc | 12 +- advice.c | 2 + advice.h | 2 + ci/run-build-and-tests.sh | 1 - refs.c | 15 +- t/t0001-init.sh | 18 +- t/t0613-reftable-write-options.sh | 24 +- t/t4013-diff-various.sh | 228 +++++++++--------- ...ree_--cc_--patch-with-stat_--summary_main} | 2 +- ...iff.diff-tree_--cc_--patch-with-stat_main} | 2 +- ...r => diff.diff-tree_--cc_--shortstat_main} | 2 +- ...diff.diff-tree_--cc_--stat_--summary_main} | 2 +- ...master => diff.diff-tree_--cc_--stat_main} | 2 +- ...e_--cc_master => diff.diff-tree_--cc_main} | 2 +- ...master => diff.diff-tree_-c_--abbrev_main} | 2 +- ...> diff.diff-tree_-c_--stat_--summary_main} | 2 +- ...t_master => diff.diff-tree_-c_--stat_main} | 2 +- ...-tree_-c_master => diff.diff-tree_-c_main} | 2 +- ...-tree_-m_master => diff.diff-tree_-m_main} | 2 +- ...-p_-m_master => diff.diff-tree_-p_-m_main} | 2 +- t/t4013/diff.diff-tree_-p_main | 2 + t/t4013/diff.diff-tree_-p_master | 2 - t/t4013/diff.diff-tree_main | 2 + t/t4013/diff.diff-tree_master | 2 - t/t4013/diff.diff_--dirstat_--cc_main~1_main | 3 + .../diff.diff_--dirstat_--cc_master~1_master | 3 - t/t4013/diff.diff_--dirstat_main~1_main~2 | 3 + t/t4013/diff.diff_--dirstat_master~1_master~2 | 3 - ...ff.diff_--line-prefix=abc_main_main^_side} | 2 +- ...master^_side => diff.diff_main_main^_side} | 2 +- ...mat-patch_--attach_--stdout_initial..main} | 2 +- ...at-patch_--attach_--stdout_initial..main^} | 2 +- ...e_--stdout_--numbered-files_initial..main} | 2 +- ...t_--subject-prefix=TESTCASE_initial..main} | 2 +- ...mat-patch_--inline_--stdout_initial..main} | 2 +- ...at-patch_--inline_--stdout_initial..main^} | 2 +- ...t-patch_--inline_--stdout_initial..main^^} | 2 +- ...--stdout_--cover-letter_-n_initial..main^} | 2 +- ...atch_--stdout_--no-numbered_initial..main} | 2 +- ...t-patch_--stdout_--numbered_initial..main} | 2 +- ... diff.format-patch_--stdout_initial..main} | 2 +- ...diff.format-patch_--stdout_initial..main^} | 2 +- ..._-m_-p_master => diff.log_--cc_-m_-p_main} | 2 +- t/t4013/diff.log_--decorate=full_--all | 2 +- ..._--decorate=full_--clear-decorations_--all | 2 +- ...f.log_--decorate=full_--decorate-all_--all | 2 +- t/t4013/diff.log_--decorate_--all | 2 +- ...f.log_--decorate_--clear-decorations_--all | 2 +- .../diff.log_--decorate_--decorate-all_--all | 2 +- ... diff.log_--diff-merges=first-parent_main} | 2 +- ..._--diff-merges=off_-p_--first-parent_main} | 2 +- ..._--first-parent_--diff-merges=off_-p_main} | 2 +- ...g_--no-diff-merges_-p_--first-parent_main} | 2 +- ..._--patch-with-stat_--summary_main_--_dir_} | 2 +- ...master => diff.log_--patch-with-stat_main} | 2 +- ...> diff.log_--patch-with-stat_main_--_dir_} | 2 +- ...oot_--cc_--patch-with-stat_--summary_main} | 2 +- ...g_--root_--patch-with-stat_--summary_main} | 2 +- ...=> diff.log_--root_--patch-with-stat_main} | 2 +- ...-root_-c_--patch-with-stat_--summary_main} | 2 +- ...root_-p_master => diff.log_--root_-p_main} | 2 +- ...log_--root_master => diff.log_--root_main} | 2 +- ...ter => diff.log_-GF_-p_--pickaxe-all_main} | 2 +- ...log_-GF_-p_master => diff.log_-GF_-p_main} | 2 +- ...{diff.log_-SF_master => diff.log_-GF_main} | 2 +- ...aster => diff.log_-IA_-IB_-I1_-I2_-p_main} | 2 +- ...log_-SF_-p_master => diff.log_-SF_-p_main} | 2 +- ...{diff.log_-GF_master => diff.log_-SF_main} | 2 +- t/t4013/diff.log_-SF_main_--max-count=0 | 2 + ...ount=2 => diff.log_-SF_main_--max-count=1} | 2 +- t/t4013/diff.log_-SF_main_--max-count=2 | 7 + t/t4013/diff.log_-SF_master_--max-count=0 | 2 - t/t4013/diff.log_-SF_master_--max-count=1 | 7 - ...iff.log_-S_F_master => diff.log_-S_F_main} | 2 +- ...cc_-m_-p_master => diff.log_-c_-m_-p_main} | 2 +- ...-m_--raw_master => diff.log_-m_--raw_main} | 2 +- ..._--stat_master => diff.log_-m_--stat_main} | 2 +- ...ter => diff.log_-m_-p_--first-parent_main} | 2 +- ...f.log_-m_-p_master => diff.log_-m_-p_main} | 2 +- ...ff.log_-p_--diff-merges=first-parent_main} | 2 +- ...master => diff.log_-p_--first-parent_main} | 2 +- .../{diff.log_-p_master => diff.log_-p_main} | 2 +- t/t4013/{diff.log_master => diff.log_main} | 2 +- ...iff.noellipses-diff-tree_-c_--abbrev_main} | 2 +- ...> diff.noellipses-whatchanged_--root_main} | 2 +- ...r => diff.noellipses-whatchanged_-SF_main} | 2 +- ...aster => diff.noellipses-whatchanged_main} | 2 +- ...t_master => diff.show_--first-parent_main} | 2 +- ...{diff.show_-c_master => diff.show_-c_main} | 2 +- ...{diff.show_-m_master => diff.show_-m_main} | 2 +- t/t4013/{diff.show_master => diff.show_main} | 2 +- ..._--patch-with-stat_--summary_main_--_dir_} | 2 +- ...> diff.whatchanged_--patch-with-stat_main} | 2 +- ...hatchanged_--patch-with-stat_main_--_dir_} | 2 +- ...oot_--cc_--patch-with-stat_--summary_main} | 2 +- ...d_--root_--patch-with-stat_--summary_main} | 2 +- ...whatchanged_--root_--patch-with-stat_main} | 2 +- ...-root_-c_--patch-with-stat_--summary_main} | 2 +- ...master => diff.whatchanged_--root_-p_main} | 2 +- ...ot_master => diff.whatchanged_--root_main} | 2 +- ...-p_master => diff.whatchanged_-SF_-p_main} | 2 +- ...d_-SF_master => diff.whatchanged_-SF_main} | 2 +- ...ged_-p_master => diff.whatchanged_-p_main} | 2 +- ...atchanged_master => diff.whatchanged_main} | 2 +- t/t9902-completion.sh | 6 +- t/test-lib.sh | 11 +- 107 files changed, 287 insertions(+), 244 deletions(-) rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_--summary_master => diff.diff-tree_--cc_--patch-with-stat_--summary_main} (86%) rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_master => diff.diff-tree_--cc_--patch-with-stat_main} (89%) rename t/t4013/{diff.diff-tree_--cc_--shortstat_master => diff.diff-tree_--cc_--shortstat_main} (65%) rename t/t4013/{diff.diff-tree_-c_--stat_--summary_master => diff.diff-tree_--cc_--stat_--summary_main} (71%) rename t/t4013/{diff.diff-tree_-c_--stat_master => diff.diff-tree_--cc_--stat_main} (76%) rename t/t4013/{diff.diff-tree_--cc_master => diff.diff-tree_--cc_main} (91%) rename t/t4013/{diff.diff-tree_-c_--abbrev_master => diff.diff-tree_-c_--abbrev_main} (83%) rename t/t4013/{diff.diff-tree_--cc_--stat_--summary_master => diff.diff-tree_-c_--stat_--summary_main} (70%) rename t/t4013/{diff.diff-tree_--cc_--stat_master => diff.diff-tree_-c_--stat_main} (75%) rename t/t4013/{diff.diff-tree_-c_master => diff.diff-tree_-c_main} (93%) rename t/t4013/{diff.diff-tree_-m_master => diff.diff-tree_-m_main} (96%) rename t/t4013/{diff.diff-tree_-p_-m_master => diff.diff-tree_-p_-m_main} (97%) create mode 100644 t/t4013/diff.diff-tree_-p_main delete mode 100644 t/t4013/diff.diff-tree_-p_master create mode 100644 t/t4013/diff.diff-tree_main delete mode 100644 t/t4013/diff.diff-tree_master create mode 100644 t/t4013/diff.diff_--dirstat_--cc_main~1_main delete mode 100644 t/t4013/diff.diff_--dirstat_--cc_master~1_master create mode 100644 t/t4013/diff.diff_--dirstat_main~1_main~2 delete mode 100644 t/t4013/diff.diff_--dirstat_master~1_master~2 rename t/t4013/{diff.diff_--line-prefix=abc_master_master^_side => diff.diff_--line-prefix=abc_main_main^_side} (87%) rename t/t4013/{diff.diff_master_master^_side => diff.diff_main_main^_side} (89%) rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master => diff.format-patch_--attach_--stdout_initial..main} (98%) rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master^ => diff.format-patch_--attach_--stdout_initial..main^} (97%) rename t/t4013/{diff.format-patch_--inline_--stdout_--numbered-files_initial..master => diff.format-patch_--inline_--stdout_--numbered-files_initial..main} (99%) rename t/t4013/{diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master => diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main} (99%) rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master => diff.format-patch_--inline_--stdout_initial..main} (98%) rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^ => diff.format-patch_--inline_--stdout_initial..main^} (97%) rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^^ => diff.format-patch_--inline_--stdout_initial..main^^} (95%) rename t/t4013/{diff.format-patch_--stdout_--cover-letter_-n_initial..master^ => diff.format-patch_--stdout_--cover-letter_-n_initial..main^} (96%) rename t/t4013/{diff.format-patch_--stdout_--no-numbered_initial..master => diff.format-patch_--stdout_--no-numbered_initial..main} (97%) rename t/t4013/{diff.format-patch_--stdout_--numbered_initial..master => diff.format-patch_--stdout_--numbered_initial..main} (97%) rename t/t4013/{diff.format-patch_--stdout_initial..master => diff.format-patch_--stdout_initial..main} (97%) rename t/t4013/{diff.format-patch_--stdout_initial..master^ => diff.format-patch_--stdout_initial..main^} (96%) rename t/t4013/{diff.log_-c_-m_-p_master => diff.log_--cc_-m_-p_main} (99%) rename t/t4013/{diff.log_--diff-merges=first-parent_master => diff.log_--diff-merges=first-parent_main} (95%) rename t/t4013/{diff.log_--no-diff-merges_-p_--first-parent_master => diff.log_--diff-merges=off_-p_--first-parent_main} (95%) rename t/t4013/{diff.log_--first-parent_--diff-merges=off_-p_master => diff.log_--first-parent_--diff-merges=off_-p_main} (95%) rename t/t4013/{diff.log_--diff-merges=off_-p_--first-parent_master => diff.log_--no-diff-merges_-p_--first-parent_main} (95%) rename t/t4013/{diff.log_--patch-with-stat_--summary_master_--_dir_ => diff.log_--patch-with-stat_--summary_main_--_dir_} (96%) rename t/t4013/{diff.log_--patch-with-stat_master => diff.log_--patch-with-stat_main} (98%) rename t/t4013/{diff.log_--patch-with-stat_master_--_dir_ => diff.log_--patch-with-stat_main_--_dir_} (96%) rename t/t4013/{diff.log_--root_--cc_--patch-with-stat_--summary_master => diff.log_--root_--cc_--patch-with-stat_--summary_main} (98%) rename t/t4013/{diff.log_--root_--patch-with-stat_--summary_master => diff.log_--root_--patch-with-stat_--summary_main} (98%) rename t/t4013/{diff.log_--root_--patch-with-stat_master => diff.log_--root_--patch-with-stat_main} (98%) rename t/t4013/{diff.log_--root_-c_--patch-with-stat_--summary_master => diff.log_--root_-c_--patch-with-stat_--summary_main} (98%) rename t/t4013/{diff.log_--root_-p_master => diff.log_--root_-p_main} (98%) rename t/t4013/{diff.log_--root_master => diff.log_--root_main} (96%) rename t/t4013/{diff.log_-GF_-p_--pickaxe-all_master => diff.log_-GF_-p_--pickaxe-all_main} (90%) rename t/t4013/{diff.log_-GF_-p_master => diff.log_-GF_-p_main} (91%) rename t/t4013/{diff.log_-SF_master => diff.log_-GF_main} (86%) rename t/t4013/{diff.log_-IA_-IB_-I1_-I2_-p_master => diff.log_-IA_-IB_-I1_-I2_-p_main} (97%) rename t/t4013/{diff.log_-SF_-p_master => diff.log_-SF_-p_main} (91%) rename t/t4013/{diff.log_-GF_master => diff.log_-SF_main} (86%) create mode 100644 t/t4013/diff.log_-SF_main_--max-count=0 rename t/t4013/{diff.log_-SF_master_--max-count=2 => diff.log_-SF_main_--max-count=1} (79%) create mode 100644 t/t4013/diff.log_-SF_main_--max-count=2 delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=0 delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=1 rename t/t4013/{diff.log_-S_F_master => diff.log_-S_F_main} (86%) rename t/t4013/{diff.log_--cc_-m_-p_master => diff.log_-c_-m_-p_main} (99%) rename t/t4013/{diff.log_-m_--raw_master => diff.log_-m_--raw_main} (98%) rename t/t4013/{diff.log_-m_--stat_master => diff.log_-m_--stat_main} (98%) rename t/t4013/{diff.log_-m_-p_--first-parent_master => diff.log_-m_-p_--first-parent_main} (97%) rename t/t4013/{diff.log_-m_-p_master => diff.log_-m_-p_main} (99%) rename t/t4013/{diff.log_-p_--diff-merges=first-parent_master => diff.log_-p_--diff-merges=first-parent_main} (97%) rename t/t4013/{diff.log_-p_--first-parent_master => diff.log_-p_--first-parent_main} (97%) rename t/t4013/{diff.log_-p_master => diff.log_-p_main} (98%) rename t/t4013/{diff.log_master => diff.log_main} (97%) rename t/t4013/{diff.noellipses-diff-tree_-c_--abbrev_master => diff.noellipses-diff-tree_-c_--abbrev_main} (81%) rename t/t4013/{diff.noellipses-whatchanged_--root_master => diff.noellipses-whatchanged_--root_main} (96%) rename t/t4013/{diff.noellipses-whatchanged_-SF_master => diff.noellipses-whatchanged_-SF_main} (86%) rename t/t4013/{diff.noellipses-whatchanged_master => diff.noellipses-whatchanged_main} (96%) rename t/t4013/{diff.show_--first-parent_master => diff.show_--first-parent_main} (92%) rename t/t4013/{diff.show_-c_master => diff.show_-c_main} (95%) rename t/t4013/{diff.show_-m_master => diff.show_-m_main} (98%) rename t/t4013/{diff.show_master => diff.show_main} (96%) rename t/t4013/{diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ => diff.whatchanged_--patch-with-stat_--summary_main_--_dir_} (94%) rename t/t4013/{diff.whatchanged_--patch-with-stat_master => diff.whatchanged_--patch-with-stat_main} (97%) rename t/t4013/{diff.whatchanged_--patch-with-stat_master_--_dir_ => diff.whatchanged_--patch-with-stat_main_--_dir_} (94%) rename t/t4013/{diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master => diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main} (97%) rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_--summary_master => diff.whatchanged_--root_--patch-with-stat_--summary_main} (97%) rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_master => diff.whatchanged_--root_--patch-with-stat_main} (97%) rename t/t4013/{diff.whatchanged_--root_-c_--patch-with-stat_--summary_master => diff.whatchanged_--root_-c_--patch-with-stat_--summary_main} (97%) rename t/t4013/{diff.whatchanged_--root_-p_master => diff.whatchanged_--root_-p_main} (98%) rename t/t4013/{diff.whatchanged_--root_master => diff.whatchanged_--root_main} (97%) rename t/t4013/{diff.whatchanged_-SF_-p_master => diff.whatchanged_-SF_-p_main} (89%) rename t/t4013/{diff.whatchanged_-SF_master => diff.whatchanged_-SF_main} (86%) rename t/t4013/{diff.whatchanged_-p_master => diff.whatchanged_-p_main} (98%) rename t/t4013/{diff.whatchanged_master => diff.whatchanged_main} (97%) Range-diff against v2: 1: 6986375dc37 ! 1: 441bc5f9bcb breaking-changes: switch default branch to main @@ Documentation/BreakingChanges.adoc: A prerequisite for this change is that the e "reftable" format. Most importantly, alternative implementations of Git like JGit, libgit2 and Gitoxide need to support it. -+* In new repositories the default branch name will be `main`. We have been -+ warning that the default name will change since 675704c74dd (init: provide -+ useful advice about init.defaultBranch, 2020-12-11). The new name matches -+ the default branch name used by many of the big Git forges. ++* In new repositories, the default branch name will be `main`. We have been ++ warning that the default name will change since 675704c74dd (init: ++ provide useful advice about init.defaultBranch, 2020-12-11). The new name ++ matches the default branch name used in new repositories by many of the ++ big Git forges. + === Removals 2: 2a112a1b983 = 2: f1a778e76c3 t4013: switch default branch name to main 3: f1bf01e1322 ! 3: 8e32712a158 t9902: switch default branch name to main @@ Commit message t9902: switch default branch name to main Remove the penultimate use of "GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= - main" in our test suite. We have slowly been removing these ever since - we started to switch the default branch name used in tests to "main". + master" in our test suite. We have slowly been removing these ever + since we started to switch the default branch name used in tests to + "main". Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> 4: c4d89c3761b ! 4: 353328c6189 t0613: stop setting default initial branch @@ Metadata ## Commit message ## t0613: stop setting default initial branch - As the tests are all run in separate repositories, set the branch name - to "master" when creating the repository for the tests where the result - depends on the branch name. This reduceds the number of tests that - depend on the default branch name being "master" and removes the last - instance of a test file using "GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= - master". + As the tests are all run in separate repositories, set the branch + name to "master" when creating the repository for the tests where + the result depends on the branch name. In order to make it easier to + change the branch name in the future a helper function is used. This + reduces the number of tests that depend on the default branch name + being "master" and removes the last instance of a test file using + "GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master". + Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> ## t/t0613-reftable-write-options.sh ## @@ t/t0613-reftable-write-options.sh: export GIT_TEST_REFTABLE_AUTOCOMPACTION . ./test-lib.sh ++# Block sizes depend on the actual refs we write, so, for tests ++# that check block size, we force the initial branch name to be "master". ++init_repo () { ++ git init --initial-branch master repo ++} ++ test_expect_success 'default write options' ' test_when_finished "rm -rf repo" && - git init repo && -+ # Block sizes also depend on the actual refs we write, so we force -+ # "master" to be the default initial branch name. -+ git init --initial-branch master repo && ++ init_repo && ( cd repo && test_commit initial && @@ t/t0613-reftable-write-options.sh: test_expect_success 'default write options' ' test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && -+ git init --initial-branch master repo && ++ init_repo && ( cd repo && test_commit initial && @@ t/t0613-reftable-write-options.sh: test_expect_success 'disabled reflog writes n test_expect_success 'many refs results in multiple blocks' ' test_when_finished "rm -rf repo" && - git init repo && -+ git init --initial-branch master repo && ++ init_repo && ( cd repo && test_commit initial && @@ t/t0613-reftable-write-options.sh: test_expect_success 'tiny block size leads to test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && -+ git init --initial-branch master repo && ++ init_repo && ( cd repo && test_commit A && @@ t/t0613-reftable-write-options.sh: test_expect_success 'block size exceeding max test_expect_success 'restart interval at every single record' ' test_when_finished "rm -rf repo" && - git init repo && -+ git init --initial-branch master repo && ++ init_repo && ( cd repo && test_commit initial && @@ t/t0613-reftable-write-options.sh: test_expect_success 'restart interval exceedi test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && -+ git init --initial-branch master repo && ++ init_repo && ( cd repo && test_commit initial && @@ t/t0613-reftable-write-options.sh: test_expect_success 'object index gets writte test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && -+ git init --initial-branch master repo && ++ init_repo && ( cd repo && test_commit initial && -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply [flat|nested] 56+ messages in thread
* [PATCH v3 1/4] breaking-changes: switch default branch to main 2025-09-10 15:28 ` [PATCH v3 " Phillip Wood @ 2025-09-10 15:29 ` Phillip Wood 2025-09-10 15:29 ` [PATCH v3 2/4] t4013: switch default branch name " Phillip Wood ` (4 subsequent siblings) 5 siblings, 0 replies; 56+ messages in thread From: Phillip Wood @ 2025-09-10 15:29 UTC (permalink / raw) To: git Cc: Johannes Schindelin, Wing Huang, Junio C Hamano, Patrick Steinhardt, Phillip Wood From: Phillip Wood <phillip.wood@dunelm.org.uk> Since 1296cbe4b46 (init: document `init.defaultBranch` better, 2020-12-11) "git-init.adoc" has advertised that the default name of the initial branch may change in the future. The name "main" is chosen to match the default used by the big Git forge web sites. The advice printed when init.defaultBranch is not set is updated to say that the default will change to "main" in Git 3.0. Building with WITH_BREAKING_CHANGES enabled removes the advice and changes the default branch name to "main". The code in guess_remote_head() that looks for "refs/heads/master" is left unchanged as that is only called when the remote server does not support the symref capability in the v0 protocol or the symref extension to the ls-refs list in the v2 protocol. Such an old server is more likely to be using "master" as the default branch name. With the exception of the "git-init.adoc" the documentation is left unchanged. I had hoped to parameterize the name of the default branch by using an asciidoc attribute. Unfortunately attribute expansion is inhibited by backticks and we use backticks to mark up ref names so that idea does not work. As the changes to git-init.adoc show inserting ifdef's around each instance of the branch name "master" is cumbersome and makes the documentation sources harder to read. Apart from "git-init.adoc" there are some other files where "master" is used as the name of the initial branch rather than as an example of a branch name such as "user-manual.adoc" and "gitcore-tutorial.adoc". The name appears a lot in those so updating it with ifdef's is not really practical. We can update that document in the 3.0 release cycle. The other documentation where master is used as an example branch name can be gradually converted over time. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- Documentation/BreakingChanges.adoc | 6 ++++++ Documentation/git-init.adoc | 12 +++++++++--- advice.c | 2 ++ advice.h | 2 ++ ci/run-build-and-tests.sh | 1 - refs.c | 15 +++++++++++---- t/t0001-init.sh | 18 +++++++++++++++++- t/test-lib.sh | 11 +++++++---- 8 files changed, 54 insertions(+), 13 deletions(-) diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc index f8d2eba061c..f4e11c88655 100644 --- a/Documentation/BreakingChanges.adoc +++ b/Documentation/BreakingChanges.adoc @@ -165,6 +165,12 @@ A prerequisite for this change is that the ecosystem is ready to support the "reftable" format. Most importantly, alternative implementations of Git like JGit, libgit2 and Gitoxide need to support it. +* In new repositories, the default branch name will be `main`. We have been + warning that the default name will change since 675704c74dd (init: + provide useful advice about init.defaultBranch, 2020-12-11). The new name + matches the default branch name used in new repositories by many of the + big Git forges. + === Removals * Support for grafting commits has long been superseded by git-replace(1). diff --git a/Documentation/git-init.adoc b/Documentation/git-init.adoc index a0dffba665f..bab99b9b477 100644 --- a/Documentation/git-init.adoc +++ b/Documentation/git-init.adoc @@ -77,9 +77,15 @@ If this is a reinitialization, the repository will be moved to the specified pat `-b <branch-name>`:: `--initial-branch=<branch-name>`:: Use _<branch-name>_ for the initial branch in the newly created -repository. If not specified, fall back to the default name (currently -`master`, but this is subject to change in the future; the name can be -customized via the `init.defaultBranch` configuration variable). +repository. If not specified, fall back to the default name +ifndef::with-breaking-changes[] +(currently `master`, but this will change to `main` when Git 3.0 is released). +endif::with-breaking-changes[] +ifdef::with-breaking-changes[] +`main`. +endif::with-breaking-changes[] +The default name can be customized via the `init.defaultBranch` configuration +variable. `--shared[=(false|true|umask|group|all|world|everybody|<perm>)]`:: diff --git a/advice.c b/advice.c index e5f0ff84491..48c49ee4145 100644 --- a/advice.c +++ b/advice.c @@ -51,7 +51,9 @@ static struct { [ADVICE_AM_WORK_DIR] = { "amWorkDir" }, [ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] = { "checkoutAmbiguousRemoteBranchName" }, [ADVICE_COMMIT_BEFORE_MERGE] = { "commitBeforeMerge" }, +#ifndef WITH_BREAKING_CHANGES [ADVICE_DEFAULT_BRANCH_NAME] = { "defaultBranchName" }, +#endif /* WITH_BREAKING_CHANGES */ [ADVICE_DETACHED_HEAD] = { "detachedHead" }, [ADVICE_DIVERGING] = { "diverging" }, [ADVICE_FETCH_SET_HEAD_WARN] = { "fetchRemoteHEADWarn" }, diff --git a/advice.h b/advice.h index 727dcecf4a3..fc1dc872049 100644 --- a/advice.h +++ b/advice.h @@ -18,7 +18,9 @@ enum advice_type { ADVICE_AM_WORK_DIR, ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME, ADVICE_COMMIT_BEFORE_MERGE, +#ifndef WITH_BREAKING_CHANGES ADVICE_DEFAULT_BRANCH_NAME, +#endif /* WITH_BREAKING_CHANGES */ ADVICE_DETACHED_HEAD, ADVICE_DIVERGING, ADVICE_FETCH_SET_HEAD_WARN, diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index 01823fd0f14..a21834043f3 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh @@ -9,7 +9,6 @@ run_tests=t case "$jobname" in linux-breaking-changes) - export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export WITH_BREAKING_CHANGES=YesPlease ;; linux-TEST-vars) diff --git a/refs.c b/refs.c index 4ff55cf24f6..149a8d1cec1 100644 --- a/refs.c +++ b/refs.c @@ -627,10 +627,12 @@ void expand_ref_prefix(struct strvec *prefixes, const char *prefix) strvec_pushf(prefixes, *p, len, prefix); } +#ifndef WITH_BREAKING_CHANGES static const char default_branch_name_advice[] = N_( "Using '%s' as the name for the initial branch. This default branch name\n" -"is subject to change. To configure the initial branch name to use in all\n" -"of your new repositories, which will suppress this warning, call:\n" +"will change to \"main\" in Git 3.0. To configure the initial branch name\n" +"to use in all of your new repositories, which will suppress this warning,\n" +"call:\n" "\n" "\tgit config --global init.defaultBranch <name>\n" "\n" @@ -639,8 +641,9 @@ static const char default_branch_name_advice[] = N_( "\n" "\tgit branch -m <name>\n" ); +#endif /* WITH_BREAKING_CHANGES */ -char *repo_default_branch_name(struct repository *r, int quiet) +char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet) { const char *config_key = "init.defaultbranch"; const char *config_display_key = "init.defaultBranch"; @@ -649,14 +652,18 @@ char *repo_default_branch_name(struct repository *r, int quiet) if (env && *env) ret = xstrdup(env); - else if (repo_config_get_string(r, config_key, &ret) < 0) + if (!ret && repo_config_get_string(r, config_key, &ret) < 0) die(_("could not retrieve `%s`"), config_display_key); if (!ret) { +#ifdef WITH_BREAKING_CHANGES + ret = xstrdup("main"); +#else ret = xstrdup("master"); if (!quiet) advise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME, _(default_branch_name_advice), ret); +#endif /* WITH_BREAKING_CHANGES */ } full_ref = xstrfmt("refs/heads/%s", ret); diff --git a/t/t0001-init.sh b/t/t0001-init.sh index f593c536874..df0040b9ace 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -868,7 +868,7 @@ test_expect_success 'overridden default initial branch name (config)' ' grep nmb actual ' -test_expect_success 'advice on unconfigured init.defaultBranch' ' +test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' ' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \ init unconfigured-default-branch-name 2>err && test_decode_color <err >decoded && @@ -883,6 +883,22 @@ test_expect_success 'advice on unconfigured init.defaultBranch disabled' ' test_grep ! "hint: " err ' +test_expect_success 'default branch name' ' + if test_have_prereq WITH_BREAKING_CHANGES + then + expect=main + else + expect=master + fi && + echo "refs/heads/$expect" >expect && + ( + sane_unset GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME && + git init default-initial-branch-name + ) && + git -C default-initial-branch-name symbolic-ref HEAD >actual && + test_cmp expect actual +' + test_expect_success 'overridden default main branch name (env)' ' test_config_global init.defaultBranch nmb && GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=env git init main-branch-env && diff --git a/t/test-lib.sh b/t/test-lib.sh index 621cd31ae1d..b191954c3c4 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -127,10 +127,13 @@ then export GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS fi -# Explicitly set the default branch name for testing, to avoid the -# transitory "git init" warning under --verbose. -: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master} -export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +if test -z "$WITH_BREAKING_CHANGES" +then + # Explicitly set the default branch name for testing, to avoid the + # transitory "git init" warning under --verbose. + : ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master} + export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +fi ################################################################ # It appears that people try to run tests without building... -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply related [flat|nested] 56+ messages in thread
* [PATCH v3 2/4] t4013: switch default branch name to main 2025-09-10 15:28 ` [PATCH v3 " Phillip Wood 2025-09-10 15:29 ` [PATCH v3 1/4] breaking-changes: switch default branch to main Phillip Wood @ 2025-09-10 15:29 ` Phillip Wood 2025-09-10 15:29 ` [PATCH v3 3/4] t9902: " Phillip Wood ` (3 subsequent siblings) 5 siblings, 0 replies; 56+ messages in thread From: Phillip Wood @ 2025-09-10 15:29 UTC (permalink / raw) To: git Cc: Johannes Schindelin, Wing Huang, Junio C Hamano, Patrick Steinhardt, Phillip Wood From: Phillip Wood <phillip.wood@dunelm.org.uk> Remove one of the last remaining uses of "TEST_GIT_DEFAULT_INITIAL_BRANCH= main" in the test suite. We have been steadily be converting tests from using "master" as the default branch name since the introduction of TEST_GIT_DEFAULT_INITIAL_BRANCH in 704fed9ea22 (tests: start moving to a different default main branch name, 2020-10-23) The changes here are purely mechanical replacing "master" with "main" Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- t/t4013-diff-various.sh | 228 +++++++++--------- ...ree_--cc_--patch-with-stat_--summary_main} | 2 +- ...iff.diff-tree_--cc_--patch-with-stat_main} | 2 +- ...r => diff.diff-tree_--cc_--shortstat_main} | 2 +- ...diff.diff-tree_--cc_--stat_--summary_main} | 2 +- ...master => diff.diff-tree_--cc_--stat_main} | 2 +- ...e_--cc_master => diff.diff-tree_--cc_main} | 2 +- ...master => diff.diff-tree_-c_--abbrev_main} | 2 +- ...> diff.diff-tree_-c_--stat_--summary_main} | 2 +- ...t_master => diff.diff-tree_-c_--stat_main} | 2 +- ...-tree_-c_master => diff.diff-tree_-c_main} | 2 +- ...-tree_-m_master => diff.diff-tree_-m_main} | 2 +- ...-p_-m_master => diff.diff-tree_-p_-m_main} | 2 +- t/t4013/diff.diff-tree_-p_main | 2 + t/t4013/diff.diff-tree_-p_master | 2 - t/t4013/diff.diff-tree_main | 2 + t/t4013/diff.diff-tree_master | 2 - t/t4013/diff.diff_--dirstat_--cc_main~1_main | 3 + .../diff.diff_--dirstat_--cc_master~1_master | 3 - t/t4013/diff.diff_--dirstat_main~1_main~2 | 3 + t/t4013/diff.diff_--dirstat_master~1_master~2 | 3 - ...ff.diff_--line-prefix=abc_main_main^_side} | 2 +- ...master^_side => diff.diff_main_main^_side} | 2 +- ...mat-patch_--attach_--stdout_initial..main} | 2 +- ...at-patch_--attach_--stdout_initial..main^} | 2 +- ...e_--stdout_--numbered-files_initial..main} | 2 +- ...t_--subject-prefix=TESTCASE_initial..main} | 2 +- ...mat-patch_--inline_--stdout_initial..main} | 2 +- ...at-patch_--inline_--stdout_initial..main^} | 2 +- ...t-patch_--inline_--stdout_initial..main^^} | 2 +- ...--stdout_--cover-letter_-n_initial..main^} | 2 +- ...atch_--stdout_--no-numbered_initial..main} | 2 +- ...t-patch_--stdout_--numbered_initial..main} | 2 +- ... diff.format-patch_--stdout_initial..main} | 2 +- ...diff.format-patch_--stdout_initial..main^} | 2 +- ..._-m_-p_master => diff.log_--cc_-m_-p_main} | 2 +- t/t4013/diff.log_--decorate=full_--all | 2 +- ..._--decorate=full_--clear-decorations_--all | 2 +- ...f.log_--decorate=full_--decorate-all_--all | 2 +- t/t4013/diff.log_--decorate_--all | 2 +- ...f.log_--decorate_--clear-decorations_--all | 2 +- .../diff.log_--decorate_--decorate-all_--all | 2 +- ... diff.log_--diff-merges=first-parent_main} | 2 +- ..._--diff-merges=off_-p_--first-parent_main} | 2 +- ..._--first-parent_--diff-merges=off_-p_main} | 2 +- ...g_--no-diff-merges_-p_--first-parent_main} | 2 +- ..._--patch-with-stat_--summary_main_--_dir_} | 2 +- ...master => diff.log_--patch-with-stat_main} | 2 +- ...> diff.log_--patch-with-stat_main_--_dir_} | 2 +- ...oot_--cc_--patch-with-stat_--summary_main} | 2 +- ...g_--root_--patch-with-stat_--summary_main} | 2 +- ...=> diff.log_--root_--patch-with-stat_main} | 2 +- ...-root_-c_--patch-with-stat_--summary_main} | 2 +- ...root_-p_master => diff.log_--root_-p_main} | 2 +- ...log_--root_master => diff.log_--root_main} | 2 +- ...ter => diff.log_-GF_-p_--pickaxe-all_main} | 2 +- ...log_-GF_-p_master => diff.log_-GF_-p_main} | 2 +- ...{diff.log_-SF_master => diff.log_-GF_main} | 2 +- ...aster => diff.log_-IA_-IB_-I1_-I2_-p_main} | 2 +- ...log_-SF_-p_master => diff.log_-SF_-p_main} | 2 +- ...{diff.log_-GF_master => diff.log_-SF_main} | 2 +- t/t4013/diff.log_-SF_main_--max-count=0 | 2 + ...ount=2 => diff.log_-SF_main_--max-count=1} | 2 +- t/t4013/diff.log_-SF_main_--max-count=2 | 7 + t/t4013/diff.log_-SF_master_--max-count=0 | 2 - t/t4013/diff.log_-SF_master_--max-count=1 | 7 - ...iff.log_-S_F_master => diff.log_-S_F_main} | 2 +- ...cc_-m_-p_master => diff.log_-c_-m_-p_main} | 2 +- ...-m_--raw_master => diff.log_-m_--raw_main} | 2 +- ..._--stat_master => diff.log_-m_--stat_main} | 2 +- ...ter => diff.log_-m_-p_--first-parent_main} | 2 +- ...f.log_-m_-p_master => diff.log_-m_-p_main} | 2 +- ...ff.log_-p_--diff-merges=first-parent_main} | 2 +- ...master => diff.log_-p_--first-parent_main} | 2 +- .../{diff.log_-p_master => diff.log_-p_main} | 2 +- t/t4013/{diff.log_master => diff.log_main} | 2 +- ...iff.noellipses-diff-tree_-c_--abbrev_main} | 2 +- ...> diff.noellipses-whatchanged_--root_main} | 2 +- ...r => diff.noellipses-whatchanged_-SF_main} | 2 +- ...aster => diff.noellipses-whatchanged_main} | 2 +- ...t_master => diff.show_--first-parent_main} | 2 +- ...{diff.show_-c_master => diff.show_-c_main} | 2 +- ...{diff.show_-m_master => diff.show_-m_main} | 2 +- t/t4013/{diff.show_master => diff.show_main} | 2 +- ..._--patch-with-stat_--summary_main_--_dir_} | 2 +- ...> diff.whatchanged_--patch-with-stat_main} | 2 +- ...hatchanged_--patch-with-stat_main_--_dir_} | 2 +- ...oot_--cc_--patch-with-stat_--summary_main} | 2 +- ...d_--root_--patch-with-stat_--summary_main} | 2 +- ...whatchanged_--root_--patch-with-stat_main} | 2 +- ...-root_-c_--patch-with-stat_--summary_main} | 2 +- ...master => diff.whatchanged_--root_-p_main} | 2 +- ...ot_master => diff.whatchanged_--root_main} | 2 +- ...-p_master => diff.whatchanged_-SF_-p_main} | 2 +- ...d_-SF_master => diff.whatchanged_-SF_main} | 2 +- ...ged_-p_master => diff.whatchanged_-p_main} | 2 +- ...atchanged_master => diff.whatchanged_main} | 2 +- 97 files changed, 217 insertions(+), 217 deletions(-) rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_--summary_master => diff.diff-tree_--cc_--patch-with-stat_--summary_main} (86%) rename t/t4013/{diff.diff-tree_--cc_--patch-with-stat_master => diff.diff-tree_--cc_--patch-with-stat_main} (89%) rename t/t4013/{diff.diff-tree_--cc_--shortstat_master => diff.diff-tree_--cc_--shortstat_main} (65%) rename t/t4013/{diff.diff-tree_-c_--stat_--summary_master => diff.diff-tree_--cc_--stat_--summary_main} (71%) rename t/t4013/{diff.diff-tree_-c_--stat_master => diff.diff-tree_--cc_--stat_main} (76%) rename t/t4013/{diff.diff-tree_--cc_master => diff.diff-tree_--cc_main} (91%) rename t/t4013/{diff.diff-tree_-c_--abbrev_master => diff.diff-tree_-c_--abbrev_main} (83%) rename t/t4013/{diff.diff-tree_--cc_--stat_--summary_master => diff.diff-tree_-c_--stat_--summary_main} (70%) rename t/t4013/{diff.diff-tree_--cc_--stat_master => diff.diff-tree_-c_--stat_main} (75%) rename t/t4013/{diff.diff-tree_-c_master => diff.diff-tree_-c_main} (93%) rename t/t4013/{diff.diff-tree_-m_master => diff.diff-tree_-m_main} (96%) rename t/t4013/{diff.diff-tree_-p_-m_master => diff.diff-tree_-p_-m_main} (97%) create mode 100644 t/t4013/diff.diff-tree_-p_main delete mode 100644 t/t4013/diff.diff-tree_-p_master create mode 100644 t/t4013/diff.diff-tree_main delete mode 100644 t/t4013/diff.diff-tree_master create mode 100644 t/t4013/diff.diff_--dirstat_--cc_main~1_main delete mode 100644 t/t4013/diff.diff_--dirstat_--cc_master~1_master create mode 100644 t/t4013/diff.diff_--dirstat_main~1_main~2 delete mode 100644 t/t4013/diff.diff_--dirstat_master~1_master~2 rename t/t4013/{diff.diff_--line-prefix=abc_master_master^_side => diff.diff_--line-prefix=abc_main_main^_side} (87%) rename t/t4013/{diff.diff_master_master^_side => diff.diff_main_main^_side} (89%) rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master => diff.format-patch_--attach_--stdout_initial..main} (98%) rename t/t4013/{diff.format-patch_--attach_--stdout_initial..master^ => diff.format-patch_--attach_--stdout_initial..main^} (97%) rename t/t4013/{diff.format-patch_--inline_--stdout_--numbered-files_initial..master => diff.format-patch_--inline_--stdout_--numbered-files_initial..main} (99%) rename t/t4013/{diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master => diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main} (99%) rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master => diff.format-patch_--inline_--stdout_initial..main} (98%) rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^ => diff.format-patch_--inline_--stdout_initial..main^} (97%) rename t/t4013/{diff.format-patch_--inline_--stdout_initial..master^^ => diff.format-patch_--inline_--stdout_initial..main^^} (95%) rename t/t4013/{diff.format-patch_--stdout_--cover-letter_-n_initial..master^ => diff.format-patch_--stdout_--cover-letter_-n_initial..main^} (96%) rename t/t4013/{diff.format-patch_--stdout_--no-numbered_initial..master => diff.format-patch_--stdout_--no-numbered_initial..main} (97%) rename t/t4013/{diff.format-patch_--stdout_--numbered_initial..master => diff.format-patch_--stdout_--numbered_initial..main} (97%) rename t/t4013/{diff.format-patch_--stdout_initial..master => diff.format-patch_--stdout_initial..main} (97%) rename t/t4013/{diff.format-patch_--stdout_initial..master^ => diff.format-patch_--stdout_initial..main^} (96%) rename t/t4013/{diff.log_-c_-m_-p_master => diff.log_--cc_-m_-p_main} (99%) rename t/t4013/{diff.log_--diff-merges=first-parent_master => diff.log_--diff-merges=first-parent_main} (95%) rename t/t4013/{diff.log_--no-diff-merges_-p_--first-parent_master => diff.log_--diff-merges=off_-p_--first-parent_main} (95%) rename t/t4013/{diff.log_--first-parent_--diff-merges=off_-p_master => diff.log_--first-parent_--diff-merges=off_-p_main} (95%) rename t/t4013/{diff.log_--diff-merges=off_-p_--first-parent_master => diff.log_--no-diff-merges_-p_--first-parent_main} (95%) rename t/t4013/{diff.log_--patch-with-stat_--summary_master_--_dir_ => diff.log_--patch-with-stat_--summary_main_--_dir_} (96%) rename t/t4013/{diff.log_--patch-with-stat_master => diff.log_--patch-with-stat_main} (98%) rename t/t4013/{diff.log_--patch-with-stat_master_--_dir_ => diff.log_--patch-with-stat_main_--_dir_} (96%) rename t/t4013/{diff.log_--root_--cc_--patch-with-stat_--summary_master => diff.log_--root_--cc_--patch-with-stat_--summary_main} (98%) rename t/t4013/{diff.log_--root_--patch-with-stat_--summary_master => diff.log_--root_--patch-with-stat_--summary_main} (98%) rename t/t4013/{diff.log_--root_--patch-with-stat_master => diff.log_--root_--patch-with-stat_main} (98%) rename t/t4013/{diff.log_--root_-c_--patch-with-stat_--summary_master => diff.log_--root_-c_--patch-with-stat_--summary_main} (98%) rename t/t4013/{diff.log_--root_-p_master => diff.log_--root_-p_main} (98%) rename t/t4013/{diff.log_--root_master => diff.log_--root_main} (96%) rename t/t4013/{diff.log_-GF_-p_--pickaxe-all_master => diff.log_-GF_-p_--pickaxe-all_main} (90%) rename t/t4013/{diff.log_-GF_-p_master => diff.log_-GF_-p_main} (91%) rename t/t4013/{diff.log_-SF_master => diff.log_-GF_main} (86%) rename t/t4013/{diff.log_-IA_-IB_-I1_-I2_-p_master => diff.log_-IA_-IB_-I1_-I2_-p_main} (97%) rename t/t4013/{diff.log_-SF_-p_master => diff.log_-SF_-p_main} (91%) rename t/t4013/{diff.log_-GF_master => diff.log_-SF_main} (86%) create mode 100644 t/t4013/diff.log_-SF_main_--max-count=0 rename t/t4013/{diff.log_-SF_master_--max-count=2 => diff.log_-SF_main_--max-count=1} (79%) create mode 100644 t/t4013/diff.log_-SF_main_--max-count=2 delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=0 delete mode 100644 t/t4013/diff.log_-SF_master_--max-count=1 rename t/t4013/{diff.log_-S_F_master => diff.log_-S_F_main} (86%) rename t/t4013/{diff.log_--cc_-m_-p_master => diff.log_-c_-m_-p_main} (99%) rename t/t4013/{diff.log_-m_--raw_master => diff.log_-m_--raw_main} (98%) rename t/t4013/{diff.log_-m_--stat_master => diff.log_-m_--stat_main} (98%) rename t/t4013/{diff.log_-m_-p_--first-parent_master => diff.log_-m_-p_--first-parent_main} (97%) rename t/t4013/{diff.log_-m_-p_master => diff.log_-m_-p_main} (99%) rename t/t4013/{diff.log_-p_--diff-merges=first-parent_master => diff.log_-p_--diff-merges=first-parent_main} (97%) rename t/t4013/{diff.log_-p_--first-parent_master => diff.log_-p_--first-parent_main} (97%) rename t/t4013/{diff.log_-p_master => diff.log_-p_main} (98%) rename t/t4013/{diff.log_master => diff.log_main} (97%) rename t/t4013/{diff.noellipses-diff-tree_-c_--abbrev_master => diff.noellipses-diff-tree_-c_--abbrev_main} (81%) rename t/t4013/{diff.noellipses-whatchanged_--root_master => diff.noellipses-whatchanged_--root_main} (96%) rename t/t4013/{diff.noellipses-whatchanged_-SF_master => diff.noellipses-whatchanged_-SF_main} (86%) rename t/t4013/{diff.noellipses-whatchanged_master => diff.noellipses-whatchanged_main} (96%) rename t/t4013/{diff.show_--first-parent_master => diff.show_--first-parent_main} (92%) rename t/t4013/{diff.show_-c_master => diff.show_-c_main} (95%) rename t/t4013/{diff.show_-m_master => diff.show_-m_main} (98%) rename t/t4013/{diff.show_master => diff.show_main} (96%) rename t/t4013/{diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ => diff.whatchanged_--patch-with-stat_--summary_main_--_dir_} (94%) rename t/t4013/{diff.whatchanged_--patch-with-stat_master => diff.whatchanged_--patch-with-stat_main} (97%) rename t/t4013/{diff.whatchanged_--patch-with-stat_master_--_dir_ => diff.whatchanged_--patch-with-stat_main_--_dir_} (94%) rename t/t4013/{diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master => diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main} (97%) rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_--summary_master => diff.whatchanged_--root_--patch-with-stat_--summary_main} (97%) rename t/t4013/{diff.whatchanged_--root_--patch-with-stat_master => diff.whatchanged_--root_--patch-with-stat_main} (97%) rename t/t4013/{diff.whatchanged_--root_-c_--patch-with-stat_--summary_master => diff.whatchanged_--root_-c_--patch-with-stat_--summary_main} (97%) rename t/t4013/{diff.whatchanged_--root_-p_master => diff.whatchanged_--root_-p_main} (98%) rename t/t4013/{diff.whatchanged_--root_master => diff.whatchanged_--root_main} (97%) rename t/t4013/{diff.whatchanged_-SF_-p_master => diff.whatchanged_-SF_-p_main} (89%) rename t/t4013/{diff.whatchanged_-SF_master => diff.whatchanged_-SF_main} (86%) rename t/t4013/{diff.whatchanged_-p_master => diff.whatchanged_-p_main} (98%) rename t/t4013/{diff.whatchanged_master => diff.whatchanged_main} (97%) diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index cfeec239e09..55a06eadb31 100755 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@ -5,7 +5,7 @@ test_description='Various diff formatting options' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -70,7 +70,7 @@ test_expect_success setup ' GIT_COMMITTER_DATE="2006-06-26 00:04:00 +0000" && export GIT_AUTHOR_DATE GIT_COMMITTER_DATE && - git checkout master && + git checkout main && git pull -s ours --no-rebase . side && GIT_AUTHOR_DATE="2006-06-26 00:05:00 +0000" && @@ -95,15 +95,15 @@ test_expect_success setup ' test_write_lines B A >dir/sub && git add dir/sub && git commit -m "Rearranged lines in dir/sub" && - git checkout master && + git checkout main && GIT_AUTHOR_DATE="2006-06-26 00:06:00 +0000" && GIT_COMMITTER_DATE="2006-06-26 00:06:00 +0000" && export GIT_AUTHOR_DATE GIT_COMMITTER_DATE && git checkout -b mode initial && git update-index --chmod=+x file0 && git commit -m "update mode" && - git checkout -f master && + git checkout -f main && GIT_AUTHOR_DATE="2006-06-26 00:06:00 +0000" && GIT_COMMITTER_DATE="2006-06-26 00:06:00 +0000" && @@ -112,12 +112,12 @@ test_expect_success setup ' git update-index --chmod=+x file2 && git commit -m "update mode (file2)" && git notes add -m "note" && - git checkout -f master && + git checkout -f main && - # Same merge as master, but with parents reversed. Hide it in a + # Same merge as main, but with parents reversed. Hide it in a # pseudo-ref to avoid impacting tests with --all. commit=$(echo reverse | - git commit-tree -p master^2 -p master^1 master^{tree}) && + git commit-tree -p main^2 -p main^1 main^{tree}) && git update-ref REVERSE $commit && git config diff.renames false && @@ -127,15 +127,15 @@ test_expect_success setup ' : <<\EOF ! [initial] Initial - * [master] Merge branch 'side' + * [main] Merge branch 'side' ! [rearrange] Rearranged lines in dir/sub ! [side] Side ---- + [rearrange] Rearranged lines in dir/sub - - [master] Merge branch 'side' + - [main] Merge branch 'side' * + [side] Side - * [master^] Third - * [master~2] Second + * [main^] Third + * [main~2] Second +*++ [initial] Initial EOF @@ -311,64 +311,64 @@ diff-tree initial mode diff-tree --stat initial mode diff-tree --summary initial mode -diff-tree master -diff-tree -m master -diff-tree -p master -diff-tree -p -m master -diff-tree -c master -diff-tree -c --abbrev master -:noellipses diff-tree -c --abbrev master -diff-tree --cc master +diff-tree main +diff-tree -m main +diff-tree -p main +diff-tree -p -m main +diff-tree -c main +diff-tree -c --abbrev main +:noellipses diff-tree -c --abbrev main +diff-tree --cc main # stat only should show the diffstat with the first parent -diff-tree -c --stat master -diff-tree --cc --stat master -diff-tree -c --stat --summary master -diff-tree --cc --stat --summary master +diff-tree -c --stat main +diff-tree --cc --stat main +diff-tree -c --stat --summary main +diff-tree --cc --stat --summary main # stat summary should show the diffstat and summary with the first parent diff-tree -c --stat --summary side diff-tree --cc --stat --summary side -diff-tree --cc --shortstat master +diff-tree --cc --shortstat main diff-tree --cc --summary REVERSE # improved by Timo's patch -diff-tree --cc --patch-with-stat master +diff-tree --cc --patch-with-stat main # improved by Timo's patch -diff-tree --cc --patch-with-stat --summary master +diff-tree --cc --patch-with-stat --summary main # this is correct diff-tree --cc --patch-with-stat --summary side -log master -log -p master -log --root master -log --root -p master -log --patch-with-stat master -log --root --patch-with-stat master -log --root --patch-with-stat --summary master -# improved by Timo's patch -log --root -c --patch-with-stat --summary master -# improved by Timo's patch -log --root --cc --patch-with-stat --summary master -log --no-diff-merges -p --first-parent master -log --diff-merges=off -p --first-parent master -log --first-parent --diff-merges=off -p master -log -p --first-parent master -log -p --diff-merges=first-parent master -log --diff-merges=first-parent master -log -m -p --first-parent master -log -m -p master -log --cc -m -p master -log -c -m -p master -log -m --raw master -log -m --stat master -log -SF master -log -S F master -log -SF -p master -log -SF master --max-count=0 -log -SF master --max-count=1 -log -SF master --max-count=2 -log -GF master -log -GF -p master -log -GF -p --pickaxe-all master -log -IA -IB -I1 -I2 -p master +log main +log -p main +log --root main +log --root -p main +log --patch-with-stat main +log --root --patch-with-stat main +log --root --patch-with-stat --summary main +# improved by Timo's patch +log --root -c --patch-with-stat --summary main +# improved by Timo's patch +log --root --cc --patch-with-stat --summary main +log --no-diff-merges -p --first-parent main +log --diff-merges=off -p --first-parent main +log --first-parent --diff-merges=off -p main +log -p --first-parent main +log -p --diff-merges=first-parent main +log --diff-merges=first-parent main +log -m -p --first-parent main +log -m -p main +log --cc -m -p main +log -c -m -p main +log -m --raw main +log -m --stat main +log -SF main +log -S F main +log -SF -p main +log -SF main --max-count=0 +log -SF main --max-count=1 +log -SF main --max-count=2 +log -GF main +log -GF -p main +log -GF -p --pickaxe-all main +log -IA -IB -I1 -I2 -p main log --decorate --all log --decorate=full --all log --decorate --clear-decorations --all @@ -377,35 +377,35 @@ log --decorate=full --clear-decorations --all rev-list --parents HEAD rev-list --children HEAD -whatchanged master -:noellipses whatchanged master -whatchanged -p master -whatchanged --root master -:noellipses whatchanged --root master -whatchanged --root -p master -whatchanged --patch-with-stat master -whatchanged --root --patch-with-stat master -whatchanged --root --patch-with-stat --summary master -# improved by Timo's patch -whatchanged --root -c --patch-with-stat --summary master -# improved by Timo's patch -whatchanged --root --cc --patch-with-stat --summary master -whatchanged -SF master -:noellipses whatchanged -SF master -whatchanged -SF -p master +whatchanged main +:noellipses whatchanged main +whatchanged -p main +whatchanged --root main +:noellipses whatchanged --root main +whatchanged --root -p main +whatchanged --patch-with-stat main +whatchanged --root --patch-with-stat main +whatchanged --root --patch-with-stat --summary main +# improved by Timo's patch +whatchanged --root -c --patch-with-stat --summary main +# improved by Timo's patch +whatchanged --root --cc --patch-with-stat --summary main +whatchanged -SF main +:noellipses whatchanged -SF main +whatchanged -SF -p main -log --patch-with-stat master -- dir/ -whatchanged --patch-with-stat master -- dir/ -log --patch-with-stat --summary master -- dir/ -whatchanged --patch-with-stat --summary master -- dir/ +log --patch-with-stat main -- dir/ +whatchanged --patch-with-stat main -- dir/ +log --patch-with-stat --summary main -- dir/ +whatchanged --patch-with-stat --summary main -- dir/ show initial show --root initial show side -show master -show -c master -show -m master -show --first-parent master +show main +show -c main +show -m main +show --first-parent main show --stat side show --stat --summary side show --patch-with-stat side @@ -414,22 +414,22 @@ show --patch-with-raw side show --patch-with-stat --summary side format-patch --stdout initial..side -format-patch --stdout initial..master^ -format-patch --stdout initial..master -format-patch --stdout --no-numbered initial..master -format-patch --stdout --numbered initial..master +format-patch --stdout initial..main^ +format-patch --stdout initial..main +format-patch --stdout --no-numbered initial..main +format-patch --stdout --numbered initial..main format-patch --attach --stdout initial..side format-patch --attach --stdout --suffix=.diff initial..side -format-patch --attach --stdout initial..master^ -format-patch --attach --stdout initial..master +format-patch --attach --stdout initial..main^ +format-patch --attach --stdout initial..main format-patch --inline --stdout initial..side -format-patch --inline --stdout initial..master^ -format-patch --inline --stdout --numbered-files initial..master -format-patch --inline --stdout initial..master -format-patch --inline --stdout --subject-prefix=TESTCASE initial..master +format-patch --inline --stdout initial..main^ +format-patch --inline --stdout --numbered-files initial..main +format-patch --inline --stdout initial..main +format-patch --inline --stdout --subject-prefix=TESTCASE initial..main config format.subjectprefix DIFFERENT_PREFIX -format-patch --inline --stdout initial..master^^ -format-patch --stdout --cover-letter -n initial..master^ +format-patch --inline --stdout initial..main^^ +format-patch --stdout --cover-letter -n initial..main^ diff --abbrev initial..side diff -U initial..side @@ -448,13 +448,13 @@ diff --name-status dir2 dir diff --no-index --name-status dir2 dir diff --no-index --name-status -- dir2 dir diff --no-index dir dir3 -diff master master^ side +diff main main^ side # Can't use spaces... -diff --line-prefix=abc master master^ side -diff --dirstat master~1 master~2 +diff --line-prefix=abc main main^ side +diff --dirstat main~1 main~2 diff --dirstat initial rearrange diff --dirstat-by-file initial rearrange -diff --dirstat --cc master~1 master +diff --dirstat --cc main~1 main # No-index --abbrev and --no-abbrev diff --raw initial :noellipses diff --raw initial @@ -482,25 +482,25 @@ test_expect_success !WITH_BREAKING_CHANGES 'whatchanged needs --i-still-use-this ' test_expect_success 'log -m matches pure log' ' - git log master >result && + git log main >result && process_diffs result >expected && git log -m >result && process_diffs result >actual && test_cmp expected actual ' test_expect_success 'log --diff-merges=on matches --diff-merges=separate' ' - git log -p --diff-merges=separate master >result && + git log -p --diff-merges=separate main >result && process_diffs result >expected && - git log -p --diff-merges=on master >result && + git log -p --diff-merges=on main >result && process_diffs result >actual && test_cmp expected actual ' test_expect_success 'log --dd matches --diff-merges=1 -p' ' - git log --diff-merges=1 -p master >result && + git log --diff-merges=1 -p main >result && process_diffs result >expected && - git log --dd master >result && + git log --dd main >result && process_diffs result >actual && test_cmp expected actual ' @@ -511,19 +511,19 @@ test_expect_success 'deny wrong log.diffMerges config' ' ' test_expect_success 'git config log.diffMerges first-parent' ' - git log -p --diff-merges=first-parent master >result && + git log -p --diff-merges=first-parent main >result && process_diffs result >expected && test_config log.diffMerges first-parent && - git log -p --diff-merges=on master >result && + git log -p --diff-merges=on main >result && process_diffs result >actual && test_cmp expected actual ' test_expect_success 'git config log.diffMerges first-parent vs -m' ' - git log -p --diff-merges=first-parent master >result && + git log -p --diff-merges=first-parent main >result && process_diffs result >expected && test_config log.diffMerges first-parent && - git log -p -m master >result && + git log -p -m main >result && process_diffs result >actual && test_cmp expected actual ' @@ -572,7 +572,7 @@ test_expect_success 'diff-tree --stdin with log formatting' ' Third Second EOF - git rev-list master | git diff-tree --stdin --format=%s -s >actual && + git rev-list main | git diff-tree --stdin --format=%s -s >actual && test_cmp expect actual ' @@ -585,16 +585,16 @@ test_expect_success 'diff-tree --stdin with pathspec' ' dir/sub EOF - git rev-list master^ | + git rev-list main^ | git diff-tree -r --stdin --name-only --format=%s dir >actual && test_cmp expect actual ' test_expect_success 'show A B ... -- <pathspec>' ' # side touches dir/sub, file0, and file3 - # master^ touches dir/sub, and file1 - # master^^ touches dir/sub, file0, and file2 - git show --name-only --format="<%s>" side master^ master^^ -- dir >actual && + # main^ touches dir/sub, and file1 + # main^^ touches dir/sub, file0, and file2 + git show --name-only --format="<%s>" side main^ main^^ -- dir >actual && cat >expect <<-\EOF && <Side> @@ -610,7 +610,7 @@ test_expect_success 'show A B ... -- <pathspec>' ' ' test_expect_success 'diff -I<regex>: setup' ' - git checkout master && + git checkout main && test_seq 50 >file0 && git commit -m "Set up -I<regex> test file" file0 && test_seq 50 | sed -e "s/13/ten and three/" -e "/7\$/d" >file0 && diff --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 similarity index 86% rename from t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master rename to t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main index 9951e3677d6..af1cf20f4ca 100644 --- a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master +++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc --patch-with-stat --summary master +$ git diff-tree --cc --patch-with-stat --summary main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_master b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_main similarity index 89% rename from t/t4013/diff.diff-tree_--cc_--patch-with-stat_master rename to t/t4013/diff.diff-tree_--cc_--patch-with-stat_main index db3c0a7b2cc..0ec60420970 100644 --- a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_master +++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc --patch-with-stat master +$ git diff-tree --cc --patch-with-stat main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_--cc_--shortstat_master b/t/t4013/diff.diff-tree_--cc_--shortstat_main similarity index 65% rename from t/t4013/diff.diff-tree_--cc_--shortstat_master rename to t/t4013/diff.diff-tree_--cc_--shortstat_main index a4ca42df2a4..9a4ef031973 100644 --- a/t/t4013/diff.diff-tree_--cc_--shortstat_master +++ b/t/t4013/diff.diff-tree_--cc_--shortstat_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc --shortstat master +$ git diff-tree --cc --shortstat main 59d314ad6f356dd08601a4cd5e530381da3e3c64 2 files changed, 5 insertions(+) $ diff --git a/t/t4013/diff.diff-tree_-c_--stat_--summary_master b/t/t4013/diff.diff-tree_--cc_--stat_--summary_main similarity index 71% rename from t/t4013/diff.diff-tree_-c_--stat_--summary_master rename to t/t4013/diff.diff-tree_--cc_--stat_--summary_main index 81c3021541b..9db08a4aa96 100644 --- a/t/t4013/diff.diff-tree_-c_--stat_--summary_master +++ b/t/t4013/diff.diff-tree_--cc_--stat_--summary_main @@ -1,4 +1,4 @@ -$ git diff-tree -c --stat --summary master +$ git diff-tree --cc --stat --summary main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_-c_--stat_master b/t/t4013/diff.diff-tree_--cc_--stat_main similarity index 76% rename from t/t4013/diff.diff-tree_-c_--stat_master rename to t/t4013/diff.diff-tree_--cc_--stat_main index 89d59b15480..7ecc67a524e 100644 --- a/t/t4013/diff.diff-tree_-c_--stat_master +++ b/t/t4013/diff.diff-tree_--cc_--stat_main @@ -1,4 +1,4 @@ -$ git diff-tree -c --stat master +$ git diff-tree --cc --stat main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_--cc_master b/t/t4013/diff.diff-tree_--cc_main similarity index 91% rename from t/t4013/diff.diff-tree_--cc_master rename to t/t4013/diff.diff-tree_--cc_main index 5ecb4e14ae4..1a962856ad4 100644 --- a/t/t4013/diff.diff-tree_--cc_master +++ b/t/t4013/diff.diff-tree_--cc_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc master +$ git diff-tree --cc main 59d314ad6f356dd08601a4cd5e530381da3e3c64 diff --cc dir/sub index cead32e,7289e35..992913c diff --git a/t/t4013/diff.diff-tree_-c_--abbrev_master b/t/t4013/diff.diff-tree_-c_--abbrev_main similarity index 83% rename from t/t4013/diff.diff-tree_-c_--abbrev_master rename to t/t4013/diff.diff-tree_-c_--abbrev_main index b8e4aa25307..039d127cf24 100644 --- a/t/t4013/diff.diff-tree_-c_--abbrev_master +++ b/t/t4013/diff.diff-tree_-c_--abbrev_main @@ -1,4 +1,4 @@ -$ git diff-tree -c --abbrev master +$ git diff-tree -c --abbrev main 59d314ad6f356dd08601a4cd5e530381da3e3c64 ::100644 100644 100644 cead32e... 7289e35... 992913c... MM dir/sub ::100644 100644 100644 b414108... f4615da... 10a8a9f... MM file0 diff --git a/t/t4013/diff.diff-tree_--cc_--stat_--summary_master b/t/t4013/diff.diff-tree_-c_--stat_--summary_main similarity index 70% rename from t/t4013/diff.diff-tree_--cc_--stat_--summary_master rename to t/t4013/diff.diff-tree_-c_--stat_--summary_main index d019867dd94..05a8d16ba70 100644 --- a/t/t4013/diff.diff-tree_--cc_--stat_--summary_master +++ b/t/t4013/diff.diff-tree_-c_--stat_--summary_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc --stat --summary master +$ git diff-tree -c --stat --summary main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_--cc_--stat_master b/t/t4013/diff.diff-tree_-c_--stat_main similarity index 75% rename from t/t4013/diff.diff-tree_--cc_--stat_master rename to t/t4013/diff.diff-tree_-c_--stat_main index 40b91796b34..61d9f450dfd 100644 --- a/t/t4013/diff.diff-tree_--cc_--stat_master +++ b/t/t4013/diff.diff-tree_-c_--stat_main @@ -1,4 +1,4 @@ -$ git diff-tree --cc --stat master +$ git diff-tree -c --stat main 59d314ad6f356dd08601a4cd5e530381da3e3c64 dir/sub | 2 ++ file0 | 3 +++ diff --git a/t/t4013/diff.diff-tree_-c_master b/t/t4013/diff.diff-tree_-c_main similarity index 93% rename from t/t4013/diff.diff-tree_-c_master rename to t/t4013/diff.diff-tree_-c_main index e2d2bb26114..a84e1185cf5 100644 --- a/t/t4013/diff.diff-tree_-c_master +++ b/t/t4013/diff.diff-tree_-c_main @@ -1,4 +1,4 @@ -$ git diff-tree -c master +$ git diff-tree -c main 59d314ad6f356dd08601a4cd5e530381da3e3c64 ::100644 100644 100644 cead32e925b1420c84c14cbf7cf755e7e45af8ad 7289e35bff32727c08dda207511bec138fdb9ea5 992913c5aa0a5476d10c49ed0f21fc0c6d1aedf3 MM dir/sub ::100644 100644 100644 b414108e81e5091fe0974a1858b4d0d22b107f70 f4615da674c09df322d6ba8d6b21ecfb1b1ba510 10a8a9f3657f91a156b9f0184ed79a20adef9f7f MM file0 diff --git a/t/t4013/diff.diff-tree_-m_master b/t/t4013/diff.diff-tree_-m_main similarity index 96% rename from t/t4013/diff.diff-tree_-m_master rename to t/t4013/diff.diff-tree_-m_main index 6d0a2207fb3..5da1f7f5251 100644 --- a/t/t4013/diff.diff-tree_-m_master +++ b/t/t4013/diff.diff-tree_-m_main @@ -1,4 +1,4 @@ -$ git diff-tree -m master +$ git diff-tree -m main 59d314ad6f356dd08601a4cd5e530381da3e3c64 :040000 040000 65f5c9dd60ce3b2b3324b618ac7accf8d912c113 0564e026437809817a64fff393079714b6dd4628 M dir :100644 100644 b414108e81e5091fe0974a1858b4d0d22b107f70 10a8a9f3657f91a156b9f0184ed79a20adef9f7f M file0 diff --git a/t/t4013/diff.diff-tree_-p_-m_master b/t/t4013/diff.diff-tree_-p_-m_main similarity index 97% rename from t/t4013/diff.diff-tree_-p_-m_master rename to t/t4013/diff.diff-tree_-p_-m_main index b60bea039d9..29c9fc20b8b 100644 --- a/t/t4013/diff.diff-tree_-p_-m_master +++ b/t/t4013/diff.diff-tree_-p_-m_main @@ -1,4 +1,4 @@ -$ git diff-tree -p -m master +$ git diff-tree -p -m main 59d314ad6f356dd08601a4cd5e530381da3e3c64 diff --git a/dir/sub b/dir/sub index cead32e..992913c 100644 diff --git a/t/t4013/diff.diff-tree_-p_main b/t/t4013/diff.diff-tree_-p_main new file mode 100644 index 00000000000..c658062422e --- /dev/null +++ b/t/t4013/diff.diff-tree_-p_main @@ -0,0 +1,2 @@ +$ git diff-tree -p main +$ diff --git a/t/t4013/diff.diff-tree_-p_master b/t/t4013/diff.diff-tree_-p_master deleted file mode 100644 index b182875fb2f..00000000000 --- a/t/t4013/diff.diff-tree_-p_master +++ /dev/null @@ -1,2 +0,0 @@ -$ git diff-tree -p master -$ diff --git a/t/t4013/diff.diff-tree_main b/t/t4013/diff.diff-tree_main new file mode 100644 index 00000000000..dc5b9fdeb6e --- /dev/null +++ b/t/t4013/diff.diff-tree_main @@ -0,0 +1,2 @@ +$ git diff-tree main +$ diff --git a/t/t4013/diff.diff-tree_master b/t/t4013/diff.diff-tree_master deleted file mode 100644 index fe9226f8a12..00000000000 --- a/t/t4013/diff.diff-tree_master +++ /dev/null @@ -1,2 +0,0 @@ -$ git diff-tree master -$ diff --git a/t/t4013/diff.diff_--dirstat_--cc_main~1_main b/t/t4013/diff.diff_--dirstat_--cc_main~1_main new file mode 100644 index 00000000000..168a357a02e --- /dev/null +++ b/t/t4013/diff.diff_--dirstat_--cc_main~1_main @@ -0,0 +1,3 @@ +$ git diff --dirstat --cc main~1 main + 40.0% dir/ +$ diff --git a/t/t4013/diff.diff_--dirstat_--cc_master~1_master b/t/t4013/diff.diff_--dirstat_--cc_master~1_master deleted file mode 100644 index fba4e34175e..00000000000 --- a/t/t4013/diff.diff_--dirstat_--cc_master~1_master +++ /dev/null @@ -1,3 +0,0 @@ -$ git diff --dirstat --cc master~1 master - 40.0% dir/ -$ diff --git a/t/t4013/diff.diff_--dirstat_main~1_main~2 b/t/t4013/diff.diff_--dirstat_main~1_main~2 new file mode 100644 index 00000000000..68097337089 --- /dev/null +++ b/t/t4013/diff.diff_--dirstat_main~1_main~2 @@ -0,0 +1,3 @@ +$ git diff --dirstat main~1 main~2 + 40.0% dir/ +$ diff --git a/t/t4013/diff.diff_--dirstat_master~1_master~2 b/t/t4013/diff.diff_--dirstat_master~1_master~2 deleted file mode 100644 index b672e1ca63d..00000000000 --- a/t/t4013/diff.diff_--dirstat_master~1_master~2 +++ /dev/null @@ -1,3 +0,0 @@ -$ git diff --dirstat master~1 master~2 - 40.0% dir/ -$ diff --git a/t/t4013/diff.diff_--line-prefix=abc_master_master^_side b/t/t4013/diff.diff_--line-prefix=abc_main_main^_side similarity index 87% rename from t/t4013/diff.diff_--line-prefix=abc_master_master^_side rename to t/t4013/diff.diff_--line-prefix=abc_main_main^_side index 99f91e7f0e3..67a2145a365 100644 --- a/t/t4013/diff.diff_--line-prefix=abc_master_master^_side +++ b/t/t4013/diff.diff_--line-prefix=abc_main_main^_side @@ -1,4 +1,4 @@ -$ git diff --line-prefix=abc master master^ side +$ git diff --line-prefix=abc main main^ side abcdiff --cc dir/sub abcindex cead32e,7289e35..992913c abc--- a/dir/sub diff --git a/t/t4013/diff.diff_master_master^_side b/t/t4013/diff.diff_main_main^_side similarity index 89% rename from t/t4013/diff.diff_master_master^_side rename to t/t4013/diff.diff_main_main^_side index 50ec9cadd61..ab81ec9e47b 100644 --- a/t/t4013/diff.diff_master_master^_side +++ b/t/t4013/diff.diff_main_main^_side @@ -1,4 +1,4 @@ -$ git diff master master^ side +$ git diff main main^ side diff --cc dir/sub index cead32e,7289e35..992913c --- a/dir/sub diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master b/t/t4013/diff.format-patch_--attach_--stdout_initial..main similarity index 98% rename from t/t4013/diff.format-patch_--attach_--stdout_initial..master rename to t/t4013/diff.format-patch_--attach_--stdout_initial..main index 52fedc179e5..9f56380350d 100644 --- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master +++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --attach --stdout initial..master +$ git format-patch --attach --stdout initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main^ similarity index 97% rename from t/t4013/diff.format-patch_--attach_--stdout_initial..master^ rename to t/t4013/diff.format-patch_--attach_--stdout_initial..main^ index 1c3cde251b5..80132ea99eb 100644 --- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ +++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..main^ @@ -1,4 +1,4 @@ -$ git format-patch --attach --stdout initial..master^ +$ git format-patch --attach --stdout initial..main^ From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --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 similarity index 99% rename from t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master rename to t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main index 02c4db7ec58..8e889090fbe 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master +++ b/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --inline --stdout --numbered-files initial..master +$ git format-patch --inline --stdout --numbered-files initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --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 similarity index 99% rename from t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master rename to t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..main index c7677c5951c..d7d2b12d155 100644 --- 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 @@ -1,4 +1,4 @@ -$ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..master +$ git format-patch --inline --stdout --subject-prefix=TESTCASE initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_initial..main similarity index 98% rename from t/t4013/diff.format-patch_--inline_--stdout_initial..master rename to t/t4013/diff.format-patch_--inline_--stdout_initial..main index 5b3e34e2c0c..c49c423f82f 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master +++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --inline --stdout initial..master +$ git format-patch --inline --stdout initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^ similarity index 97% rename from t/t4013/diff.format-patch_--inline_--stdout_initial..master^ rename to t/t4013/diff.format-patch_--inline_--stdout_initial..main^ index d13f8a81280..8669dbfe6c9 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ +++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^ @@ -1,4 +1,4 @@ -$ git format-patch --inline --stdout initial..master^ +$ git format-patch --inline --stdout initial..main^ From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^^ similarity index 95% rename from t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ rename to t/t4013/diff.format-patch_--inline_--stdout_initial..main^^ index caec5537de3..b749be58b0a 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ +++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..main^^ @@ -1,4 +1,4 @@ -$ git format-patch --inline --stdout initial..master^^ +$ git format-patch --inline --stdout initial..main^^ From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --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^ similarity index 96% rename from t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^ rename to t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^ index 244d964fc67..567f2221982 100644 --- a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^ +++ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..main^ @@ -1,4 +1,4 @@ -$ git format-patch --stdout --cover-letter -n initial..master^ +$ git format-patch --stdout --cover-letter -n initial..main^ From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001 From: C O Mitter <committer@example.com> Date: Mon, 26 Jun 2006 00:06:00 +0000 diff --git a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main similarity index 97% rename from t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master rename to t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main index bfc287a147d..195b62ea4f5 100644 --- a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master +++ b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --stdout --no-numbered initial..master +$ git format-patch --stdout --no-numbered initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--numbered_initial..main similarity index 97% rename from t/t4013/diff.format-patch_--stdout_--numbered_initial..master rename to t/t4013/diff.format-patch_--stdout_--numbered_initial..main index 568f6f584e6..0678a38515d 100644 --- a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master +++ b/t/t4013/diff.format-patch_--stdout_--numbered_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --stdout --numbered initial..master +$ git format-patch --stdout --numbered initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--stdout_initial..master b/t/t4013/diff.format-patch_--stdout_initial..main similarity index 97% rename from t/t4013/diff.format-patch_--stdout_initial..master rename to t/t4013/diff.format-patch_--stdout_initial..main index 5f0352f9f70..b4a6302e7cb 100644 --- a/t/t4013/diff.format-patch_--stdout_initial..master +++ b/t/t4013/diff.format-patch_--stdout_initial..main @@ -1,4 +1,4 @@ -$ git format-patch --stdout initial..master +$ git format-patch --stdout initial..main From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.format-patch_--stdout_initial..master^ b/t/t4013/diff.format-patch_--stdout_initial..main^ similarity index 96% rename from t/t4013/diff.format-patch_--stdout_initial..master^ rename to t/t4013/diff.format-patch_--stdout_initial..main^ index 2ae454d8073..36b32215826 100644 --- a/t/t4013/diff.format-patch_--stdout_initial..master^ +++ b/t/t4013/diff.format-patch_--stdout_initial..main^ @@ -1,4 +1,4 @@ -$ git format-patch --stdout initial..master^ +$ git format-patch --stdout initial..main^ From 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 Mon Sep 17 00:00:00 2001 From: A U Thor <author@example.com> Date: Mon, 26 Jun 2006 00:01:00 +0000 diff --git a/t/t4013/diff.log_-c_-m_-p_master b/t/t4013/diff.log_--cc_-m_-p_main similarity index 99% rename from t/t4013/diff.log_-c_-m_-p_master rename to t/t4013/diff.log_--cc_-m_-p_main index b660f3d5f28..f32746ea3ed 100644 --- a/t/t4013/diff.log_-c_-m_-p_master +++ b/t/t4013/diff.log_--cc_-m_-p_main @@ -1,4 +1,4 @@ -$ git log -c -m -p master +$ git log --cc -m -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--decorate=full_--all b/t/t4013/diff.log_--decorate=full_--all index 6b0b334a5d6..c099399525a 100644 --- a/t/t4013/diff.log_--decorate=full_--all +++ b/t/t4013/diff.log_--decorate=full_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--decorate=full_--clear-decorations_--all b/t/t4013/diff.log_--decorate=full_--clear-decorations_--all index 1c030a6554e..c43684e5361 100644 --- a/t/t4013/diff.log_--decorate=full_--clear-decorations_--all +++ b/t/t4013/diff.log_--decorate=full_--clear-decorations_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--decorate=full_--decorate-all_--all b/t/t4013/diff.log_--decorate=full_--decorate-all_--all index d6e79287846..48dca61681c 100644 --- a/t/t4013/diff.log_--decorate=full_--decorate-all_--all +++ b/t/t4013/diff.log_--decorate=full_--decorate-all_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> refs/heads/main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--decorate_--all b/t/t4013/diff.log_--decorate_--all index c7df1f58141..8bbf891f658 100644 --- a/t/t4013/diff.log_--decorate_--all +++ b/t/t4013/diff.log_--decorate_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--decorate_--clear-decorations_--all b/t/t4013/diff.log_--decorate_--clear-decorations_--all index 88be82cce31..86b1353f514 100644 --- a/t/t4013/diff.log_--decorate_--clear-decorations_--all +++ b/t/t4013/diff.log_--decorate_--clear-decorations_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--decorate_--decorate-all_--all b/t/t4013/diff.log_--decorate_--decorate-all_--all index 5d22618bb60..59fb17bfc54 100644 --- a/t/t4013/diff.log_--decorate_--decorate-all_--all +++ b/t/t4013/diff.log_--decorate_--decorate-all_--all @@ -26,7 +26,7 @@ Date: Mon Jun 26 00:06:00 2006 +0000 Notes added by 'git notes add' -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> master) +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD -> main) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:04:00 2006 +0000 diff --git a/t/t4013/diff.log_--diff-merges=first-parent_master b/t/t4013/diff.log_--diff-merges=first-parent_main similarity index 95% rename from t/t4013/diff.log_--diff-merges=first-parent_master rename to t/t4013/diff.log_--diff-merges=first-parent_main index fa63a557dd1..bacee621e54 100644 --- a/t/t4013/diff.log_--diff-merges=first-parent_master +++ b/t/t4013/diff.log_--diff-merges=first-parent_main @@ -1,4 +1,4 @@ -$ git log --diff-merges=first-parent master +$ git log --diff-merges=first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --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 similarity index 95% rename from t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master rename to t/t4013/diff.log_--diff-merges=off_-p_--first-parent_main index 597002232e5..fe180fda3be 100644 --- a/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_master +++ b/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_main @@ -1,4 +1,4 @@ -$ git log --no-diff-merges -p --first-parent master +$ git log --diff-merges=off -p --first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --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 similarity index 95% rename from t/t4013/diff.log_--first-parent_--diff-merges=off_-p_master rename to t/t4013/diff.log_--first-parent_--diff-merges=off_-p_main index 5d7461a167e..dca62d4e608 100644 --- a/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_master +++ b/t/t4013/diff.log_--first-parent_--diff-merges=off_-p_main @@ -1,4 +1,4 @@ -$ git log --first-parent --diff-merges=off -p master +$ git log --first-parent --diff-merges=off -p main commit 80e25ffa65bcdbe82ef654b4d06dbbde7945c37f Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --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 similarity index 95% rename from t/t4013/diff.log_--diff-merges=off_-p_--first-parent_master rename to t/t4013/diff.log_--no-diff-merges_-p_--first-parent_main index 194e893c94f..0b541180887 100644 --- a/t/t4013/diff.log_--diff-merges=off_-p_--first-parent_master +++ b/t/t4013/diff.log_--no-diff-merges_-p_--first-parent_main @@ -1,4 +1,4 @@ -$ git log --diff-merges=off -p --first-parent master +$ git log --no-diff-merges -p --first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_ similarity index 96% rename from t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ rename to t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_ index a18f1472a9a..3ed46cc8672 100644 --- a/t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ +++ b/t/t4013/diff.log_--patch-with-stat_--summary_main_--_dir_ @@ -1,4 +1,4 @@ -$ git log --patch-with-stat --summary master -- dir/ +$ git log --patch-with-stat --summary main -- dir/ commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--patch-with-stat_master b/t/t4013/diff.log_--patch-with-stat_main similarity index 98% rename from t/t4013/diff.log_--patch-with-stat_master rename to t/t4013/diff.log_--patch-with-stat_main index ae425c46722..2e12b557cb7 100644 --- a/t/t4013/diff.log_--patch-with-stat_master +++ b/t/t4013/diff.log_--patch-with-stat_main @@ -1,4 +1,4 @@ -$ git log --patch-with-stat master +$ git log --patch-with-stat main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--patch-with-stat_master_--_dir_ b/t/t4013/diff.log_--patch-with-stat_main_--_dir_ similarity index 96% rename from t/t4013/diff.log_--patch-with-stat_master_--_dir_ rename to t/t4013/diff.log_--patch-with-stat_main_--_dir_ index d5207cadf44..d511ea7f6bf 100644 --- a/t/t4013/diff.log_--patch-with-stat_master_--_dir_ +++ b/t/t4013/diff.log_--patch-with-stat_main_--_dir_ @@ -1,4 +1,4 @@ -$ git log --patch-with-stat master -- dir/ +$ git log --patch-with-stat main -- dir/ commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --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 similarity index 98% rename from t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master rename to t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main index 0fc1e8cd71f..3cfd0e64229 100644 --- a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master +++ b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git log --root --cc --patch-with-stat --summary master +$ git log --root --cc --patch-with-stat --summary main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--patch-with-stat_--summary_main similarity index 98% rename from t/t4013/diff.log_--root_--patch-with-stat_--summary_master rename to t/t4013/diff.log_--root_--patch-with-stat_--summary_main index dffc09dde9e..9f4d6dfa44e 100644 --- a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master +++ b/t/t4013/diff.log_--root_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git log --root --patch-with-stat --summary master +$ git log --root --patch-with-stat --summary main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--root_--patch-with-stat_master b/t/t4013/diff.log_--root_--patch-with-stat_main similarity index 98% rename from t/t4013/diff.log_--root_--patch-with-stat_master rename to t/t4013/diff.log_--root_--patch-with-stat_main index 55aa98012de..0d69ae2e11b 100644 --- a/t/t4013/diff.log_--root_--patch-with-stat_master +++ b/t/t4013/diff.log_--root_--patch-with-stat_main @@ -1,4 +1,4 @@ -$ git log --root --patch-with-stat master +$ git log --root --patch-with-stat main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --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 similarity index 98% rename from t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master rename to t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main index 019d85f7de6..1b71add9dea 100644 --- a/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master +++ b/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git log --root -c --patch-with-stat --summary master +$ git log --root -c --patch-with-stat --summary main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--root_-p_master b/t/t4013/diff.log_--root_-p_main similarity index 98% rename from t/t4013/diff.log_--root_-p_master rename to t/t4013/diff.log_--root_-p_main index b42c334439b..04581296ed5 100644 --- a/t/t4013/diff.log_--root_-p_master +++ b/t/t4013/diff.log_--root_-p_main @@ -1,4 +1,4 @@ -$ git log --root -p master +$ git log --root -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_--root_master b/t/t4013/diff.log_--root_main similarity index 96% rename from t/t4013/diff.log_--root_master rename to t/t4013/diff.log_--root_main index e8f46159da1..d5e90fd6b48 100644 --- a/t/t4013/diff.log_--root_master +++ b/t/t4013/diff.log_--root_main @@ -1,4 +1,4 @@ -$ git log --root master +$ git log --root main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-GF_-p_--pickaxe-all_master b/t/t4013/diff.log_-GF_-p_--pickaxe-all_main similarity index 90% rename from t/t4013/diff.log_-GF_-p_--pickaxe-all_master rename to t/t4013/diff.log_-GF_-p_--pickaxe-all_main index d36f88098b0..1f7a497c2d7 100644 --- a/t/t4013/diff.log_-GF_-p_--pickaxe-all_master +++ b/t/t4013/diff.log_-GF_-p_--pickaxe-all_main @@ -1,4 +1,4 @@ -$ git log -GF -p --pickaxe-all master +$ git log -GF -p --pickaxe-all main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-GF_-p_master b/t/t4013/diff.log_-GF_-p_main similarity index 91% rename from t/t4013/diff.log_-GF_-p_master rename to t/t4013/diff.log_-GF_-p_main index 9d93f2c23a8..c80dda41e9f 100644 --- a/t/t4013/diff.log_-GF_-p_master +++ b/t/t4013/diff.log_-GF_-p_main @@ -1,4 +1,4 @@ -$ git log -GF -p master +$ git log -GF -p main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-SF_master b/t/t4013/diff.log_-GF_main similarity index 86% rename from t/t4013/diff.log_-SF_master rename to t/t4013/diff.log_-GF_main index c1599f2f520..b94a7f78398 100644 --- a/t/t4013/diff.log_-SF_master +++ b/t/t4013/diff.log_-GF_main @@ -1,4 +1,4 @@ -$ git log -SF master +$ git log -GF main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master b/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main similarity index 97% rename from t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master rename to t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main index 929f35a05b4..67e26b4e547 100644 --- a/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_master +++ b/t/t4013/diff.log_-IA_-IB_-I1_-I2_-p_main @@ -1,4 +1,4 @@ -$ git log -IA -IB -I1 -I2 -p master +$ git log -IA -IB -I1 -I2 -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-SF_-p_master b/t/t4013/diff.log_-SF_-p_main similarity index 91% rename from t/t4013/diff.log_-SF_-p_master rename to t/t4013/diff.log_-SF_-p_main index 5e324389729..fa82ac14908 100644 --- a/t/t4013/diff.log_-SF_-p_master +++ b/t/t4013/diff.log_-SF_-p_main @@ -1,4 +1,4 @@ -$ git log -SF -p master +$ git log -SF -p main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-GF_master b/t/t4013/diff.log_-SF_main similarity index 86% rename from t/t4013/diff.log_-GF_master rename to t/t4013/diff.log_-SF_main index 4c6708d2d0d..dbf770db49d 100644 --- a/t/t4013/diff.log_-GF_master +++ b/t/t4013/diff.log_-SF_main @@ -1,4 +1,4 @@ -$ git log -GF master +$ git log -SF main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-SF_main_--max-count=0 b/t/t4013/diff.log_-SF_main_--max-count=0 new file mode 100644 index 00000000000..683b17eb998 --- /dev/null +++ b/t/t4013/diff.log_-SF_main_--max-count=0 @@ -0,0 +1,2 @@ +$ git log -SF main --max-count=0 +$ diff --git a/t/t4013/diff.log_-SF_master_--max-count=2 b/t/t4013/diff.log_-SF_main_--max-count=1 similarity index 79% rename from t/t4013/diff.log_-SF_master_--max-count=2 rename to t/t4013/diff.log_-SF_main_--max-count=1 index a6c55fd4822..2102426f8cc 100644 --- a/t/t4013/diff.log_-SF_master_--max-count=2 +++ b/t/t4013/diff.log_-SF_main_--max-count=1 @@ -1,4 +1,4 @@ -$ git log -SF master --max-count=2 +$ git log -SF main --max-count=1 commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_-SF_main_--max-count=2 b/t/t4013/diff.log_-SF_main_--max-count=2 new file mode 100644 index 00000000000..23e12a4cbbd --- /dev/null +++ b/t/t4013/diff.log_-SF_main_--max-count=2 @@ -0,0 +1,7 @@ +$ git log -SF main --max-count=2 +commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 +Author: A U Thor <author@example.com> +Date: Mon Jun 26 00:02:00 2006 +0000 + + Third +$ diff --git a/t/t4013/diff.log_-SF_master_--max-count=0 b/t/t4013/diff.log_-SF_master_--max-count=0 deleted file mode 100644 index c1fc6c87317..00000000000 --- a/t/t4013/diff.log_-SF_master_--max-count=0 +++ /dev/null @@ -1,2 +0,0 @@ -$ git log -SF master --max-count=0 -$ diff --git a/t/t4013/diff.log_-SF_master_--max-count=1 b/t/t4013/diff.log_-SF_master_--max-count=1 deleted file mode 100644 index c981a038147..00000000000 --- a/t/t4013/diff.log_-SF_master_--max-count=1 +++ /dev/null @@ -1,7 +0,0 @@ -$ git log -SF master --max-count=1 -commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 -Author: A U Thor <author@example.com> -Date: Mon Jun 26 00:02:00 2006 +0000 - - Third -$ diff --git a/t/t4013/diff.log_-S_F_master b/t/t4013/diff.log_-S_F_main similarity index 86% rename from t/t4013/diff.log_-S_F_master rename to t/t4013/diff.log_-S_F_main index 978d2b41188..a75a42e1433 100644 --- a/t/t4013/diff.log_-S_F_master +++ b/t/t4013/diff.log_-S_F_main @@ -1,4 +1,4 @@ -$ git log -S F master +$ git log -S F main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.log_--cc_-m_-p_master b/t/t4013/diff.log_-c_-m_-p_main similarity index 99% rename from t/t4013/diff.log_--cc_-m_-p_master rename to t/t4013/diff.log_-c_-m_-p_main index 7c217cf348c..427f7324568 100644 --- a/t/t4013/diff.log_--cc_-m_-p_master +++ b/t/t4013/diff.log_-c_-m_-p_main @@ -1,4 +1,4 @@ -$ git log --cc -m -p master +$ git log -c -m -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-m_--raw_master b/t/t4013/diff.log_-m_--raw_main similarity index 98% rename from t/t4013/diff.log_-m_--raw_master rename to t/t4013/diff.log_-m_--raw_main index cd2ecc46283..31d9bc77073 100644 --- a/t/t4013/diff.log_-m_--raw_master +++ b/t/t4013/diff.log_-m_--raw_main @@ -1,4 +1,4 @@ -$ git log -m --raw master +$ git log -m --raw main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-m_--stat_master b/t/t4013/diff.log_-m_--stat_main similarity index 98% rename from t/t4013/diff.log_-m_--stat_master rename to t/t4013/diff.log_-m_--stat_main index c7db084fd90..4c8909229bf 100644 --- a/t/t4013/diff.log_-m_--stat_master +++ b/t/t4013/diff.log_-m_--stat_main @@ -1,4 +1,4 @@ -$ git log -m --stat master +$ git log -m --stat main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-m_-p_--first-parent_master b/t/t4013/diff.log_-m_-p_--first-parent_main similarity index 97% rename from t/t4013/diff.log_-m_-p_--first-parent_master rename to t/t4013/diff.log_-m_-p_--first-parent_main index 7a0073f5296..459e10786b9 100644 --- a/t/t4013/diff.log_-m_-p_--first-parent_master +++ b/t/t4013/diff.log_-m_-p_--first-parent_main @@ -1,4 +1,4 @@ -$ git log -m -p --first-parent master +$ git log -m -p --first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-m_-p_master b/t/t4013/diff.log_-m_-p_main similarity index 99% rename from t/t4013/diff.log_-m_-p_master rename to t/t4013/diff.log_-m_-p_main index 9ca62a01ed2..07453c56983 100644 --- a/t/t4013/diff.log_-m_-p_master +++ b/t/t4013/diff.log_-m_-p_main @@ -1,4 +1,4 @@ -$ git log -m -p master +$ git log -m -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-p_--diff-merges=first-parent_master b/t/t4013/diff.log_-p_--diff-merges=first-parent_main similarity index 97% rename from t/t4013/diff.log_-p_--diff-merges=first-parent_master rename to t/t4013/diff.log_-p_--diff-merges=first-parent_main index 9538a275112..264a2f373ec 100644 --- a/t/t4013/diff.log_-p_--diff-merges=first-parent_master +++ b/t/t4013/diff.log_-p_--diff-merges=first-parent_main @@ -1,4 +1,4 @@ -$ git log -p --diff-merges=first-parent master +$ git log -p --diff-merges=first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-p_--first-parent_master b/t/t4013/diff.log_-p_--first-parent_main similarity index 97% rename from t/t4013/diff.log_-p_--first-parent_master rename to t/t4013/diff.log_-p_--first-parent_main index 28840ebea1e..247980817b5 100644 --- a/t/t4013/diff.log_-p_--first-parent_master +++ b/t/t4013/diff.log_-p_--first-parent_main @@ -1,4 +1,4 @@ -$ git log -p --first-parent master +$ git log -p --first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_-p_master b/t/t4013/diff.log_-p_main similarity index 98% rename from t/t4013/diff.log_-p_master rename to t/t4013/diff.log_-p_main index bf1326dc366..c82b4dbf165 100644 --- a/t/t4013/diff.log_-p_master +++ b/t/t4013/diff.log_-p_main @@ -1,4 +1,4 @@ -$ git log -p master +$ git log -p main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.log_master b/t/t4013/diff.log_main similarity index 97% rename from t/t4013/diff.log_master rename to t/t4013/diff.log_main index a8f6ce5abd6..50401f73e6e 100644 --- a/t/t4013/diff.log_master +++ b/t/t4013/diff.log_main @@ -1,4 +1,4 @@ -$ git log master +$ git log main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master b/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main similarity index 81% rename from t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master rename to t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main index bb80f013b37..3aa1f80af35 100644 --- a/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_master +++ b/t/t4013/diff.noellipses-diff-tree_-c_--abbrev_main @@ -1,4 +1,4 @@ -$ git diff-tree -c --abbrev master +$ git diff-tree -c --abbrev main 59d314ad6f356dd08601a4cd5e530381da3e3c64 ::100644 100644 100644 cead32e 7289e35 992913c MM dir/sub ::100644 100644 100644 b414108 f4615da 10a8a9f MM file0 diff --git a/t/t4013/diff.noellipses-whatchanged_--root_master b/t/t4013/diff.noellipses-whatchanged_--root_main similarity index 96% rename from t/t4013/diff.noellipses-whatchanged_--root_master rename to t/t4013/diff.noellipses-whatchanged_--root_main index c2cfd4e7292..2bec0558356 100644 --- a/t/t4013/diff.noellipses-whatchanged_--root_master +++ b/t/t4013/diff.noellipses-whatchanged_--root_main @@ -1,4 +1,4 @@ -$ git whatchanged --root master +$ git whatchanged --root main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.noellipses-whatchanged_-SF_master b/t/t4013/diff.noellipses-whatchanged_-SF_main similarity index 86% rename from t/t4013/diff.noellipses-whatchanged_-SF_master rename to t/t4013/diff.noellipses-whatchanged_-SF_main index b36ce5886e0..0c1476d19eb 100644 --- a/t/t4013/diff.noellipses-whatchanged_-SF_master +++ b/t/t4013/diff.noellipses-whatchanged_-SF_main @@ -1,4 +1,4 @@ -$ git whatchanged -SF master +$ git whatchanged -SF main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.noellipses-whatchanged_master b/t/t4013/diff.noellipses-whatchanged_main similarity index 96% rename from t/t4013/diff.noellipses-whatchanged_master rename to t/t4013/diff.noellipses-whatchanged_main index 55e500f2edb..c48d2851aab 100644 --- a/t/t4013/diff.noellipses-whatchanged_master +++ b/t/t4013/diff.noellipses-whatchanged_main @@ -1,4 +1,4 @@ -$ git whatchanged master +$ git whatchanged main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.show_--first-parent_master b/t/t4013/diff.show_--first-parent_main similarity index 92% rename from t/t4013/diff.show_--first-parent_master rename to t/t4013/diff.show_--first-parent_main index 3dcbe473a0d..480502d65c2 100644 --- a/t/t4013/diff.show_--first-parent_master +++ b/t/t4013/diff.show_--first-parent_main @@ -1,4 +1,4 @@ -$ git show --first-parent master +$ git show --first-parent main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.show_-c_master b/t/t4013/diff.show_-c_main similarity index 95% rename from t/t4013/diff.show_-c_master rename to t/t4013/diff.show_-c_main index 81aba8da96c..74ef8bc96b2 100644 --- a/t/t4013/diff.show_-c_master +++ b/t/t4013/diff.show_-c_main @@ -1,4 +1,4 @@ -$ git show -c master +$ git show -c main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.show_-m_master b/t/t4013/diff.show_-m_main similarity index 98% rename from t/t4013/diff.show_-m_master rename to t/t4013/diff.show_-m_main index 4ea2ee453d5..8fd56736d97 100644 --- a/t/t4013/diff.show_-m_master +++ b/t/t4013/diff.show_-m_main @@ -1,4 +1,4 @@ -$ git show -m master +$ git show -m main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0) Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.show_master b/t/t4013/diff.show_main similarity index 96% rename from t/t4013/diff.show_master rename to t/t4013/diff.show_main index fb08ce0e46d..630b52a95ef 100644 --- a/t/t4013/diff.show_master +++ b/t/t4013/diff.show_main @@ -1,4 +1,4 @@ -$ git show master +$ git show main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_ similarity index 94% rename from t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ rename to t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_ index c8b6af2f438..ce0754d556e 100644 --- a/t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ +++ b/t/t4013/diff.whatchanged_--patch-with-stat_--summary_main_--_dir_ @@ -1,4 +1,4 @@ -$ git whatchanged --patch-with-stat --summary master -- dir/ +$ git whatchanged --patch-with-stat --summary main -- dir/ commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_--patch-with-stat_master b/t/t4013/diff.whatchanged_--patch-with-stat_main similarity index 97% rename from t/t4013/diff.whatchanged_--patch-with-stat_master rename to t/t4013/diff.whatchanged_--patch-with-stat_main index 1ac431ba921..aabccf39a53 100644 --- a/t/t4013/diff.whatchanged_--patch-with-stat_master +++ b/t/t4013/diff.whatchanged_--patch-with-stat_main @@ -1,4 +1,4 @@ -$ git whatchanged --patch-with-stat master +$ git whatchanged --patch-with-stat main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_ b/t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_ similarity index 94% rename from t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_ rename to t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_ index b30c28588f9..c05a0e81496 100644 --- a/t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_ +++ b/t/t4013/diff.whatchanged_--patch-with-stat_main_--_dir_ @@ -1,4 +1,4 @@ -$ git whatchanged --patch-with-stat master -- dir/ +$ git whatchanged --patch-with-stat main -- dir/ commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --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 similarity index 97% rename from t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master rename to t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main index 30aae7817b9..1f74b1b5487 100644 --- a/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master +++ b/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git whatchanged --root --cc --patch-with-stat --summary master +$ git whatchanged --root --cc --patch-with-stat --summary main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main similarity index 97% rename from t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master rename to t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main index db90e515254..80d98121511 100644 --- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master +++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git whatchanged --root --patch-with-stat --summary master +$ git whatchanged --root --patch-with-stat --summary main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_main similarity index 97% rename from t/t4013/diff.whatchanged_--root_--patch-with-stat_master rename to t/t4013/diff.whatchanged_--root_--patch-with-stat_main index 9a6cc92ce7d..c0b9082a2c8 100644 --- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master +++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_main @@ -1,4 +1,4 @@ -$ git whatchanged --root --patch-with-stat master +$ git whatchanged --root --patch-with-stat main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --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 similarity index 97% rename from t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master rename to t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main index d1d32bd34c3..0002c6912e1 100644 --- a/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master +++ b/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_main @@ -1,4 +1,4 @@ -$ git whatchanged --root -c --patch-with-stat --summary master +$ git whatchanged --root -c --patch-with-stat --summary main commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 Merge: 9a6d494 c7a2ab9 Author: A U Thor <author@example.com> diff --git a/t/t4013/diff.whatchanged_--root_-p_master b/t/t4013/diff.whatchanged_--root_-p_main similarity index 98% rename from t/t4013/diff.whatchanged_--root_-p_master rename to t/t4013/diff.whatchanged_--root_-p_main index ebf1f0661e0..39f3e2be746 100644 --- a/t/t4013/diff.whatchanged_--root_-p_master +++ b/t/t4013/diff.whatchanged_--root_-p_main @@ -1,4 +1,4 @@ -$ git whatchanged --root -p master +$ git whatchanged --root -p main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_--root_master b/t/t4013/diff.whatchanged_--root_main similarity index 97% rename from t/t4013/diff.whatchanged_--root_master rename to t/t4013/diff.whatchanged_--root_main index a405cb61388..36f4d6697f5 100644 --- a/t/t4013/diff.whatchanged_--root_master +++ b/t/t4013/diff.whatchanged_--root_main @@ -1,4 +1,4 @@ -$ git whatchanged --root master +$ git whatchanged --root main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_-SF_-p_master b/t/t4013/diff.whatchanged_-SF_-p_main similarity index 89% rename from t/t4013/diff.whatchanged_-SF_-p_master rename to t/t4013/diff.whatchanged_-SF_-p_main index f39da848228..0e2e67c0df8 100644 --- a/t/t4013/diff.whatchanged_-SF_-p_master +++ b/t/t4013/diff.whatchanged_-SF_-p_main @@ -1,4 +1,4 @@ -$ git whatchanged -SF -p master +$ git whatchanged -SF -p main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_-SF_master b/t/t4013/diff.whatchanged_-SF_main similarity index 86% rename from t/t4013/diff.whatchanged_-SF_master rename to t/t4013/diff.whatchanged_-SF_main index 0499321d0eb..34c6bf6b950 100644 --- a/t/t4013/diff.whatchanged_-SF_master +++ b/t/t4013/diff.whatchanged_-SF_main @@ -1,4 +1,4 @@ -$ git whatchanged -SF master +$ git whatchanged -SF main commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_-p_master b/t/t4013/diff.whatchanged_-p_main similarity index 98% rename from t/t4013/diff.whatchanged_-p_master rename to t/t4013/diff.whatchanged_-p_main index f18d43209c0..18f3bdeef48 100644 --- a/t/t4013/diff.whatchanged_-p_master +++ b/t/t4013/diff.whatchanged_-p_main @@ -1,4 +1,4 @@ -$ git whatchanged -p master +$ git whatchanged -p main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 diff --git a/t/t4013/diff.whatchanged_master b/t/t4013/diff.whatchanged_main similarity index 97% rename from t/t4013/diff.whatchanged_master rename to t/t4013/diff.whatchanged_main index cd3bcc2c726..d6c83ed8b03 100644 --- a/t/t4013/diff.whatchanged_master +++ b/t/t4013/diff.whatchanged_main @@ -1,4 +1,4 @@ -$ git whatchanged master +$ git whatchanged main commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a Author: A U Thor <author@example.com> Date: Mon Jun 26 00:03:00 2006 +0000 -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply related [flat|nested] 56+ messages in thread
* [PATCH v3 3/4] t9902: switch default branch name to main 2025-09-10 15:28 ` [PATCH v3 " Phillip Wood 2025-09-10 15:29 ` [PATCH v3 1/4] breaking-changes: switch default branch to main Phillip Wood 2025-09-10 15:29 ` [PATCH v3 2/4] t4013: switch default branch name " Phillip Wood @ 2025-09-10 15:29 ` Phillip Wood 2025-09-10 15:29 ` [PATCH v3 4/4] t0613: stop setting default initial branch Phillip Wood ` (2 subsequent siblings) 5 siblings, 0 replies; 56+ messages in thread From: Phillip Wood @ 2025-09-10 15:29 UTC (permalink / raw) To: git Cc: Johannes Schindelin, Wing Huang, Junio C Hamano, Patrick Steinhardt, Phillip Wood From: Phillip Wood <phillip.wood@dunelm.org.uk> Remove the penultimate use of "GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= master" in our test suite. We have slowly been removing these ever since we started to switch the default branch name used in tests to "main". Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- t/t9902-completion.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 6650d33fba6..964e1f15693 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -11,9 +11,9 @@ test_description='test bash completion' # untraceable with such ancient Bash versions. test_untraceable=UnfortunatelyYes -# Override environment and always use master for the default initial branch +# Override environment and always use main for the default initial branch # name for these tests, so that rev completion candidates are as expected. -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./lib-bash.sh @@ -1453,7 +1453,7 @@ test_expect_success 'git bisect - start subcommand arguments before double-dash HEAD Z final Z initial Z - master Z + main Z EOF ) ' -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply related [flat|nested] 56+ messages in thread
* [PATCH v3 4/4] t0613: stop setting default initial branch 2025-09-10 15:28 ` [PATCH v3 " Phillip Wood ` (2 preceding siblings ...) 2025-09-10 15:29 ` [PATCH v3 3/4] t9902: " Phillip Wood @ 2025-09-10 15:29 ` Phillip Wood 2025-09-10 20:41 ` [PATCH v3 0/4] breaking changes: switch default initial branch name to "main" Junio C Hamano 2025-09-17 16:18 ` [PATCH v2 5/4] initial branch: give hints after switching the default name Junio C Hamano 5 siblings, 0 replies; 56+ messages in thread From: Phillip Wood @ 2025-09-10 15:29 UTC (permalink / raw) To: git Cc: Johannes Schindelin, Wing Huang, Junio C Hamano, Patrick Steinhardt, Phillip Wood From: Phillip Wood <phillip.wood@dunelm.org.uk> As the tests are all run in separate repositories, set the branch name to "master" when creating the repository for the tests where the result depends on the branch name. In order to make it easier to change the branch name in the future a helper function is used. This reduces the number of tests that depend on the default branch name being "master" and removes the last instance of a test file using "GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master". Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- t/t0613-reftable-write-options.sh | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/t/t0613-reftable-write-options.sh b/t/t0613-reftable-write-options.sh index d77e601111f..e3347517594 100755 --- a/t/t0613-reftable-write-options.sh +++ b/t/t0613-reftable-write-options.sh @@ -11,16 +11,18 @@ export GIT_TEST_REFTABLE_AUTOCOMPACTION # Block sizes depend on the hash function, so we force SHA1 here. GIT_TEST_DEFAULT_HASH=sha1 export GIT_TEST_DEFAULT_HASH -# Block sizes also depend on the actual refs we write, so we force "master" to -# be the default initial branch name. -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master -export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh +# Block sizes depend on the actual refs we write, so, for tests +# that check block size, we force the initial branch name to be "master". +init_repo () { + git init --initial-branch master repo +} + test_expect_success 'default write options' ' test_when_finished "rm -rf repo" && - git init repo && + init_repo && ( cd repo && test_commit initial && @@ -43,7 +45,7 @@ test_expect_success 'default write options' ' test_expect_success 'disabled reflog writes no log blocks' ' test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && + init_repo && ( cd repo && test_commit initial && @@ -62,7 +64,7 @@ test_expect_success 'disabled reflog writes no log blocks' ' test_expect_success 'many refs results in multiple blocks' ' test_when_finished "rm -rf repo" && - git init repo && + init_repo && ( cd repo && test_commit initial && @@ -115,7 +117,7 @@ test_expect_success 'tiny block size leads to error' ' test_expect_success 'small block size leads to multiple ref blocks' ' test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && + init_repo && ( cd repo && test_commit A && @@ -172,7 +174,7 @@ test_expect_success 'block size exceeding maximum supported size' ' test_expect_success 'restart interval at every single record' ' test_when_finished "rm -rf repo" && - git init repo && + init_repo && ( cd repo && test_commit initial && @@ -212,7 +214,7 @@ test_expect_success 'restart interval exceeding maximum supported interval' ' test_expect_success 'object index gets written by default with ref index' ' test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && + init_repo && ( cd repo && test_commit initial && @@ -247,7 +249,7 @@ test_expect_success 'object index gets written by default with ref index' ' test_expect_success 'object index can be disabled' ' test_config_global core.logAllRefUpdates false && test_when_finished "rm -rf repo" && - git init repo && + init_repo && ( cd repo && test_commit initial && -- 2.49.0.897.gfad3eb7d210 ^ permalink raw reply related [flat|nested] 56+ messages in thread
* Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to "main" 2025-09-10 15:28 ` [PATCH v3 " Phillip Wood ` (3 preceding siblings ...) 2025-09-10 15:29 ` [PATCH v3 4/4] t0613: stop setting default initial branch Phillip Wood @ 2025-09-10 20:41 ` Junio C Hamano 2025-09-17 9:22 ` Junio C Hamano 2025-09-17 16:18 ` [PATCH v2 5/4] initial branch: give hints after switching the default name Junio C Hamano 5 siblings, 1 reply; 56+ messages in thread From: Junio C Hamano @ 2025-09-10 20:41 UTC (permalink / raw) To: Phillip Wood; +Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt Phillip Wood <phillip.wood123@gmail.com> writes: > Changes since V2: > Patch 1: reworded documentation > Patch 3: fixed typo in commit message > Patch 4: added helper function to initialise repository Everything I saw in the patch looked good. > I'm still on the fence about the suggestion to add some advice on how > to rename the branch after it is created in order to help users who > are following tutorials using "master" rather than "main". One the > one hand I can see that would be helpful, on the other it is pretty > annoying to everyone else. Hmph. I do not see why we want to be quiet and do not want to give "Now we created 'main', which may not match an existing tutorial you are trying to follow. Here is a way to use a different name to let you continue with the tutorial." after annoying everybody with "Sorry but we created 'master', which may not match your taste. Here is how you arrange it to be different" for more than a few releases already. IOW, I do not see annoyance is a valid argument against or for a corresponding message to help the users across behaviour change boundary. > If it turns out that we want to add it we can always do so at a > later date. Thanks. Let's do that too. ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to "main" 2025-09-10 20:41 ` [PATCH v3 0/4] breaking changes: switch default initial branch name to "main" Junio C Hamano @ 2025-09-17 9:22 ` Junio C Hamano 2025-09-17 12:02 ` Kristoffer Haugsbakk 2025-09-17 14:53 ` Phillip Wood 0 siblings, 2 replies; 56+ messages in thread From: Junio C Hamano @ 2025-09-17 9:22 UTC (permalink / raw) To: Phillip Wood; +Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt Junio C Hamano <gitster@pobox.com> writes: > Phillip Wood <phillip.wood123@gmail.com> writes: > >> Changes since V2: >> Patch 1: reworded documentation >> Patch 3: fixed typo in commit message >> Patch 4: added helper function to initialise repository > > Everything I saw in the patch looked good. > >> I'm still on the fence about the suggestion to add some advice on how >> to rename the branch after it is created in order to help users who >> are following tutorials using "master" rather than "main". One the >> one hand I can see that would be helpful, on the other it is pretty >> annoying to everyone else. > > Hmph. I do not see why we want to be quiet and do not want to give > "Now we created 'main', which may not match an existing tutorial you > are trying to follow. Here is a way to use a different name to let > you continue with the tutorial." after annoying everybody with > "Sorry but we created 'master', which may not match your taste. > Here is how you arrange it to be different" for more than a few > releases already. > > IOW, I do not see annoyance is a valid argument against or for a > corresponding message to help the users across behaviour change > boundary. I do not want to see a viable topic left for too long without getting completed, so here is my attempt. Earlier I thought we should use a separate advice.* variable to squelch, but after thinking it again for a while, I think reusing the one we have been using gives exactly what we want, so this just changes the contents of the message after the switchover. We would need to retire the message after a while. --- >8 --- Subject: [PATCH 5/4] initial branch: give hints after switching the default name It is likely that those who came to Git after 3.0 switched the default initial branch name to 'main' would still try to follow tutorials that were written before 3.0 happened and with the assumption that the tool would call the initial branch 'master'. To help these new users after 3.0 boundary, let's retain one part of the hint we will be giving before the default changes, namely, how to rename the branch an unconfigured Git has created just once. We do this without telling them how to permanently configure the default name of the initial branch, and that design choice is very much deliberate. The whole point of switching the default name was because we did not want to force individual users to configure their default branch name but while the hard wired default was 'master', they _had_ to configure it away from 'master' in order to conform to the recent norm, and a hint that tells them how to do so is useful. But once the default is renamed to 'main', that no longer is true. A narrower audience who are new users that follow an instruction that assumes the initial branch name is 'master' would only need to learn "here is how to change the branch name to match the tutorial you are following in the repository you created for practice", and "here is how you keep creating repositories with the first branch with a name everybody hates" is unnecessary. It also needs to be noted thta the advise token to squelch the message is the same advice.defaultBranchName as before, which is also very much deliberate. The users who do have that configured are those who _have_ been using Git since before 3.0, and they are not the target audience for the new advice message. Reusing the same advise token ensures that they do not have to turn the message off. Signed-off-by: Junio C Hamano <gitster@pobox.com> --- advice.c | 2 -- advice.h | 4 +--- refs.c | 12 ++++++++++-- t/t0000-basic.sh | 3 ++- t/t0001-init.sh | 14 +++++++------- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git c/advice.c w/advice.c index 48c49ee414..e5f0ff8449 100644 --- c/advice.c +++ w/advice.c @@ -51,9 +51,7 @@ static struct { [ADVICE_AM_WORK_DIR] = { "amWorkDir" }, [ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] = { "checkoutAmbiguousRemoteBranchName" }, [ADVICE_COMMIT_BEFORE_MERGE] = { "commitBeforeMerge" }, -#ifndef WITH_BREAKING_CHANGES [ADVICE_DEFAULT_BRANCH_NAME] = { "defaultBranchName" }, -#endif /* WITH_BREAKING_CHANGES */ [ADVICE_DETACHED_HEAD] = { "detachedHead" }, [ADVICE_DIVERGING] = { "diverging" }, [ADVICE_FETCH_SET_HEAD_WARN] = { "fetchRemoteHEADWarn" }, diff --git c/advice.h w/advice.h index fc1dc87204..8def280688 100644 --- c/advice.h +++ w/advice.h @@ -18,9 +18,7 @@ enum advice_type { ADVICE_AM_WORK_DIR, ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME, ADVICE_COMMIT_BEFORE_MERGE, -#ifndef WITH_BREAKING_CHANGES - ADVICE_DEFAULT_BRANCH_NAME, -#endif /* WITH_BREAKING_CHANGES */ + ADVICE_DEFAULT_BRANCH_NAME, /* To be retired sometime after Git 3.0 */ ADVICE_DETACHED_HEAD, ADVICE_DIVERGING, ADVICE_FETCH_SET_HEAD_WARN, diff --git c/refs.c w/refs.c index 149a8d1cec..5e5a41ec01 100644 --- c/refs.c +++ w/refs.c @@ -641,9 +641,17 @@ static const char default_branch_name_advice[] = N_( "\n" "\tgit branch -m <name>\n" ); +#else +static const char default_branch_name_advice[] = N_( +"Using '%s' as the name for the initial branch since Git 3.0.\n" +"If you expected Git to create 'master', you can rename the just-created\n" +"branch can be renamed via this command:\n" +"\n" +"\tgit branch -m master\n" +); #endif /* WITH_BREAKING_CHANGES */ -char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet) +char *repo_default_branch_name(struct repository *r, int quiet) { const char *config_key = "init.defaultbranch"; const char *config_display_key = "init.defaultBranch"; @@ -660,10 +668,10 @@ char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet) ret = xstrdup("main"); #else ret = xstrdup("master"); +#endif /* WITH_BREAKING_CHANGES */ if (!quiet) advise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME, _(default_branch_name_advice), ret); -#endif /* WITH_BREAKING_CHANGES */ } full_ref = xstrfmt("refs/heads/%s", ret); diff --git c/t/t0000-basic.sh w/t/t0000-basic.sh index 2b63e1c86c..54ed80ebd4 100755 --- c/t/t0000-basic.sh +++ w/t/t0000-basic.sh @@ -220,7 +220,8 @@ test_expect_success 'subtest: --verbose option' ' test_done EOF mv t1234-verbose/err t1234-verbose/err+ && - grep -v "^Initialized empty" t1234-verbose/err+ >t1234-verbose/err && + grep -v -e "^Initialized empty" -e "^hint:" t1234-verbose/err+ \ + >t1234-verbose/err && check_sub_test_lib_test_err t1234-verbose \ <<-\EOF_OUT 3<<-\EOF_ERR > ok 1 - passing test diff --git c/t/t0001-init.sh w/t/t0001-init.sh index df0040b9ac..5fe7b8c674 100755 --- c/t/t0001-init.sh +++ w/t/t0001-init.sh @@ -562,9 +562,9 @@ test_expect_success 'init warns about invalid init.defaultObjectFormat' ' test_when_finished "rm -rf repo" && test_config_global init.defaultObjectFormat garbage && - echo "warning: unknown hash algorithm ${SQ}garbage${SQ}" >expect && + expect="warning: unknown hash algorithm ${SQ}garbage${SQ}" && git init repo 2>err && - test_cmp expect err && + test_grep "$expect" err && git -C repo rev-parse --show-object-format >actual && echo $GIT_DEFAULT_HASH >expected && @@ -649,9 +649,9 @@ test_expect_success 'init warns about invalid init.defaultRefFormat' ' test_when_finished "rm -rf repo" && test_config_global init.defaultRefFormat garbage && - echo "warning: unknown ref storage format ${SQ}garbage${SQ}" >expect && + expect="warning: unknown ref storage format ${SQ}garbage${SQ}" && git init repo 2>err && - test_cmp expect err && + test_grep "$expect" err && git -C repo rev-parse --show-ref-format >actual && echo $GIT_DEFAULT_REF_FORMAT >expected && @@ -868,18 +868,18 @@ test_expect_success 'overridden default initial branch name (config)' ' grep nmb actual ' -test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' ' +test_expect_success 'advice on unconfigured init.defaultBranch' ' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \ init unconfigured-default-branch-name 2>err && test_decode_color <err >decoded && test_grep "<YELLOW>hint: " decoded ' -test_expect_success 'advice on unconfigured init.defaultBranch disabled' ' +test_expect_success 'advice on unconfigured init.defaultBranch can be disabled' ' test_when_finished "rm -rf no-advice" && GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \ - git -c advice.defaultBranchName=false init no-advice 2>err && + git -c advice.defaultBranchName=false init no-advice 2>err && test_grep ! "hint: " err ' ^ permalink raw reply related [flat|nested] 56+ messages in thread
* Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to "main" 2025-09-17 9:22 ` Junio C Hamano @ 2025-09-17 12:02 ` Kristoffer Haugsbakk 2025-09-17 15:02 ` Junio C Hamano 2025-09-17 14:53 ` Phillip Wood 1 sibling, 1 reply; 56+ messages in thread From: Kristoffer Haugsbakk @ 2025-09-17 12:02 UTC (permalink / raw) To: Junio C Hamano, Phillip Wood Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt On Wed, Sep 17, 2025, at 11:22, Junio C Hamano wrote: > Junio C Hamano <gitster@pobox.com> writes: >[snip intro] > > --- >8 --- > Subject: [PATCH 5/4] initial branch: give hints after switching the default name > >[snip] > > But once the default is renamed to 'main', that no longer is true. > A narrower audience who are new users that follow an instruction > that assumes the initial branch name is 'master' would only need to > learn "here is how to change the branch name to match the tutorial > you are following in the repository you created for practice", and > "here is how you keep creating repositories with the first branch > with a name everybody hates" is unnecessary. > > It also needs to be noted thta the advise token to squelch the s/thta/ Which I only mention because >[snip] > diff --git c/refs.c w/refs.c > index 149a8d1cec..5e5a41ec01 100644 > --- c/refs.c > +++ w/refs.c > @@ -641,9 +641,17 @@ static const char default_branch_name_advice[] = > N_( > "\n" > "\tgit branch -m <name>\n" > ); > +#else > +static const char default_branch_name_advice[] = N_( > +"Using '%s' as the name for the initial branch since Git 3.0.\n" > +"If you expected Git to create 'master', you can rename the just-created\n" > +"branch can be renamed via this command:\n" > +"\n" > +"\tgit branch -m master\n" > +); Repetition: “can rename ... can be renamed” ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to "main" 2025-09-17 12:02 ` Kristoffer Haugsbakk @ 2025-09-17 15:02 ` Junio C Hamano 0 siblings, 0 replies; 56+ messages in thread From: Junio C Hamano @ 2025-09-17 15:02 UTC (permalink / raw) To: Kristoffer Haugsbakk Cc: Phillip Wood, git, Johannes Schindelin, Wing Huang, Patrick Steinhardt "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes: > Which I only mention because >> +static const char default_branch_name_advice[] = N_( >> +"Using '%s' as the name for the initial branch since Git 3.0.\n" >> +"If you expected Git to create 'master', you can rename the just-created\n" >> +"branch can be renamed via this command:\n" >> +"\n" >> +"\tgit branch -m master\n" >> +); > > Repetition: “can rename ... can be renamed” Yuck. I started writing my own message and the in the middle of the sentence changed my mind and decided to borrow from the existing message we are giving before 3.0, and made the result incoherent. I've squashed in the following. Thanks for carefully reading. diff --git c/refs.c w/refs.c index dc569d0358..f15366bfce 100644 --- c/refs.c +++ w/refs.c @@ -644,7 +644,7 @@ static const char default_branch_name_advice[] = N_( #else static const char default_branch_name_advice[] = N_( "Using '%s' as the name for the initial branch since Git 3.0.\n" -"If you expected Git to create 'master', you can rename the just-created\n" +"If you expected Git to create 'master', the just-created\n" "branch can be renamed via this command:\n" "\n" "\tgit branch -m master\n" ^ permalink raw reply related [flat|nested] 56+ messages in thread
* Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to "main" 2025-09-17 9:22 ` Junio C Hamano 2025-09-17 12:02 ` Kristoffer Haugsbakk @ 2025-09-17 14:53 ` Phillip Wood 2025-09-17 15:21 ` Junio C Hamano 1 sibling, 1 reply; 56+ messages in thread From: Phillip Wood @ 2025-09-17 14:53 UTC (permalink / raw) To: Junio C Hamano Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt, Kristoffer Haugsbakk On 17/09/2025 10:22, Junio C Hamano wrote: > Junio C Hamano <gitster@pobox.com> writes: > > We do this without telling them how to permanently configure the > default name of the initial branch, and that design choice is very > much deliberate. That makes sense > It also needs to be noted thta the advise token to squelch the > message is the same advice.defaultBranchName as before, which is > also very much deliberate. The users who do have that configured > are those who _have_ been using Git since before 3.0, and they are > not the target audience for the new advice message. Reusing the > same advise token ensures that they do not have to turn the message > off. That's good Thanks for following up on this. The code changes look good modulo the typo pointed out by Kristoffer. I've left a few thoughts on the test changes below. > diff --git c/t/t0000-basic.sh w/t/t0000-basic.sh > index 2b63e1c86c..54ed80ebd4 100755 > --- c/t/t0000-basic.sh > +++ w/t/t0000-basic.sh > @@ -220,7 +220,8 @@ test_expect_success 'subtest: --verbose option' ' > test_done > EOF > mv t1234-verbose/err t1234-verbose/err+ && > - grep -v "^Initialized empty" t1234-verbose/err+ >t1234-verbose/err && > + grep -v -e "^Initialized empty" -e "^hint:" t1234-verbose/err+ \ > + >t1234-verbose/err && > check_sub_test_lib_test_err t1234-verbose \ > <<-\EOF_OUT 3<<-\EOF_ERR > > ok 1 - passing test > diff --git c/t/t0001-init.sh w/t/t0001-init.sh > index df0040b9ac..5fe7b8c674 100755 > --- c/t/t0001-init.sh > +++ w/t/t0001-init.sh > @@ -562,9 +562,9 @@ test_expect_success 'init warns about invalid init.defaultObjectFormat' ' > test_when_finished "rm -rf repo" && > test_config_global init.defaultObjectFormat garbage && > > - echo "warning: unknown hash algorithm ${SQ}garbage${SQ}" >expect && > + expect="warning: unknown hash algorithm ${SQ}garbage${SQ}" && > git init repo 2>err && > - test_cmp expect err && > + test_grep "$expect" err && > > git -C repo rev-parse --show-object-format >actual && > echo $GIT_DEFAULT_HASH >expected && > @@ -649,9 +649,9 @@ test_expect_success 'init warns about invalid init.defaultRefFormat' ' > test_when_finished "rm -rf repo" && > test_config_global init.defaultRefFormat garbage && > > - echo "warning: unknown ref storage format ${SQ}garbage${SQ}" >expect && > + expect="warning: unknown ref storage format ${SQ}garbage${SQ}" && > git init repo 2>err && > - test_cmp expect err && > + test_grep "$expect" err && The test changes up to this point strike me as somewhat unfortunate as these tests are perfectly content with the existing advice. I assume this stems from us not setting GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME anymore when WITH_BREAKING_CHANGES is enabled. I think we should do something like diff --git b/t/test-lib.sh b/t/test-lib.sh --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -127,13 +127,15 @@ then export GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS fi +# Explicitly set the default branch name for testing, to avoid the +# transitory "git init" warning under --verbose. if test -z "$WITH_BREAKING_CHANGES" then - # Explicitly set the default branch name for testing, to avoid the - # transitory "git init" warning under --verbose. : ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master} - export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +else + : ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=main} fi +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME ################################################################ # It appears that people try to run tests without building... To address that which will also stop the advice appearing when the tests are run with --verbose as well. > git -C repo rev-parse --show-ref-format >actual && > echo $GIT_DEFAULT_REF_FORMAT >expected && > @@ -868,18 +868,18 @@ test_expect_success 'overridden default initial branch name (config)' ' > grep nmb actual > ' > > -test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' ' > +test_expect_success 'advice on unconfigured init.defaultBranch' ' > GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \ > init unconfigured-default-branch-name 2>err && > test_decode_color <err >decoded && > test_grep "<YELLOW>hint: " decoded > ' > > -test_expect_success 'advice on unconfigured init.defaultBranch disabled' ' > +test_expect_success 'advice on unconfigured init.defaultBranch can be disabled' ' > test_when_finished "rm -rf no-advice" && > > GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \ > - git -c advice.defaultBranchName=false init no-advice 2>err && > + git -c advice.defaultBranchName=false init no-advice 2>err && The indentation is changed here but not above. I'd be happy to leave this alone, but if we're going to remove the indentation here shouldn't we do the same above? > test_grep ! "hint: " err Do we want to check the advice that is printed now that we have two different messages? Thanks Phillip ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to "main" 2025-09-17 14:53 ` Phillip Wood @ 2025-09-17 15:21 ` Junio C Hamano 2025-09-17 16:16 ` Junio C Hamano 0 siblings, 1 reply; 56+ messages in thread From: Junio C Hamano @ 2025-09-17 15:21 UTC (permalink / raw) To: Phillip Wood Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt, Kristoffer Haugsbakk Phillip Wood <phillip.wood123@gmail.com> writes: > The test changes up to this point strike me as somewhat unfortunate as > these tests are perfectly content with the existing advice. I assume > this stems from us not setting GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME > anymore when WITH_BREAKING_CHANGES is enabled. I think we should do > something like > > diff --git b/t/test-lib.sh b/t/test-lib.sh > --- a/t/test-lib.sh > +++ b/t/test-lib.sh > @@ -127,13 +127,15 @@ then > export GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS > fi > +# Explicitly set the default branch name for testing, to avoid the > +# transitory "git init" warning under --verbose. > if test -z "$WITH_BREAKING_CHANGES" > then > - # Explicitly set the default branch name for testing, to avoid the > - # transitory "git init" warning under --verbose. > : ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master} > - export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME > +else > + : ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=main} > fi > +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME That does make it more in line in spirit with what your "breaking-changes: switch default branch to main" does here. Instead of assuming that we won't have "no default set" hint after 3.0, we do assume the "no default set" hint will be there and squelch for a bit longer. OK. > To address that which will also stop the advice appearing when the > tests are run with --verbose as well. > >> git -C repo rev-parse --show-ref-format >actual && >> echo $GIT_DEFAULT_REF_FORMAT >expected && >> @@ -868,18 +868,18 @@ test_expect_success 'overridden default initial branch name (config)' ' >> grep nmb actual >> ' >> -test_expect_success !WITH_BREAKING_CHANGES 'advice on >> unconfigured init.defaultBranch' ' >> +test_expect_success 'advice on unconfigured init.defaultBranch' ' >> GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \ >> init unconfigured-default-branch-name 2>err && >> test_decode_color <err >decoded && >> test_grep "<YELLOW>hint: " decoded >> ' >> -test_expect_success 'advice on unconfigured init.defaultBranch >> disabled' ' >> +test_expect_success 'advice on unconfigured init.defaultBranch can be disabled' ' >> test_when_finished "rm -rf no-advice" && >> GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \ >> - git -c advice.defaultBranchName=false init no-advice 2>err && >> + git -c advice.defaultBranchName=false init no-advice 2>err && > > The indentation is changed here but not above. I'd be happy to leave > this alone, but if we're going to remove the indentation here shouldn't > we do the same above? QUite honestly, I didn't even notice that the line that begins with "init unconfigured..." was a continuation line. We definitely should fix it to match. >> test_grep ! "hint: " err > > Do we want to check the advice that is printed now that we have two > different messages? I am not sure; isn't this checking that there is no advice, not two advice messages? Ahh, you mean two new tests, one with !WITH_BREAKING_CHANGES and one with WITH_BREAKING_CHANGES, to see default_branch_name_advice[] appears in the advice output? I am not sure if that is needed here. Without [PATCH 5/4] there is no test that checks the exact wording of "... will change to main in Git 3.0" message, either, and I think that is a sensible thing *not* to have a test that insists on the exact phrasing for such things. ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to "main" 2025-09-17 15:21 ` Junio C Hamano @ 2025-09-17 16:16 ` Junio C Hamano 2025-09-18 15:06 ` Phillip Wood 0 siblings, 1 reply; 56+ messages in thread From: Junio C Hamano @ 2025-09-17 16:16 UTC (permalink / raw) To: Phillip Wood Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt, Kristoffer Haugsbakk Junio C Hamano <gitster@pobox.com> writes: > That does make it more in line in spirit with what your > "breaking-changes: switch default branch to main" does here. > Instead of assuming that we won't have "no default set" hint after > 3.0, we do assume the "no default set" hint will be there and > squelch for a bit longer. I'll do only this one, and revert the other test changes that are now mostly stylistic clean-ups. One thing that may be worth commenting on is this part (which also I reverted as irrelevant to get the 3.0 change going). diff --git a/t/t0001-init.sh b/t/t0001-init.sh index df0040b9ac..c7f39248e0 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -562,9 +562,9 @@ test_expect_success 'init warns about invalid init.defaultObjectFormat' ' test_when_finished "rm -rf repo" && test_config_global init.defaultObjectFormat garbage && - echo "warning: unknown hash algorithm ${SQ}garbage${SQ}" >expect && + expect="warning: unknown hash algorithm ${SQ}garbage${SQ}" && git init repo 2>err && - test_cmp expect err && + test_grep "$expect" err && git -C repo rev-parse --show-object-format >actual && echo $GIT_DEFAULT_HASH >expected && I think in the longer run, a change like this that makes us check only what we care about (i.e., "do we warn about unknown hash algo?"), without assuming more than necessary (i.e., "we shouldn't get any other warnings or hints, or this check with test_cmp that expects an exact match will fail), is a good thing. Perhaps a #leftoverbit material. Thanks. ^ permalink raw reply related [flat|nested] 56+ messages in thread
* Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to "main" 2025-09-17 16:16 ` Junio C Hamano @ 2025-09-18 15:06 ` Phillip Wood 0 siblings, 0 replies; 56+ messages in thread From: Phillip Wood @ 2025-09-18 15:06 UTC (permalink / raw) To: Junio C Hamano Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt, Kristoffer Haugsbakk On 17/09/2025 17:16, Junio C Hamano wrote: > Junio C Hamano <gitster@pobox.com> writes: > > diff --git a/t/t0001-init.sh b/t/t0001-init.sh > index df0040b9ac..c7f39248e0 100755 > --- a/t/t0001-init.sh > +++ b/t/t0001-init.sh > @@ -562,9 +562,9 @@ test_expect_success 'init warns about invalid init.defaultObjectFormat' ' > test_when_finished "rm -rf repo" && > test_config_global init.defaultObjectFormat garbage && > > - echo "warning: unknown hash algorithm ${SQ}garbage${SQ}" >expect && > + expect="warning: unknown hash algorithm ${SQ}garbage${SQ}" && > git init repo 2>err && > - test_cmp expect err && > + test_grep "$expect" err && > > git -C repo rev-parse --show-object-format >actual && > echo $GIT_DEFAULT_HASH >expected && > > I think in the longer run, a change like this that makes us check > only what we care about (i.e., "do we warn about unknown hash > algo?"), without assuming more than necessary (i.e., "we shouldn't > get any other warnings or hints, or this check with test_cmp that > expects an exact match will fail), is a good thing. > > Perhaps a #leftoverbit material. I could go either way on this. If we want to test to be focused on the error message when git encounters an unknown hash algorithm then I agree using test_grep is an improvement over test_cmp. On the other hand it is a bit weird if we start showing hints about the default branch name when the hash algorithm is invalid and so we cannot initialize the repository so maybe detecting that is useful. Thanks Phillip ^ permalink raw reply [flat|nested] 56+ messages in thread
* [PATCH v2 5/4] initial branch: give hints after switching the default name 2025-09-10 15:28 ` [PATCH v3 " Phillip Wood ` (4 preceding siblings ...) 2025-09-10 20:41 ` [PATCH v3 0/4] breaking changes: switch default initial branch name to "main" Junio C Hamano @ 2025-09-17 16:18 ` Junio C Hamano 2025-09-18 15:06 ` Phillip Wood 5 siblings, 1 reply; 56+ messages in thread From: Junio C Hamano @ 2025-09-17 16:18 UTC (permalink / raw) To: git; +Cc: Phillip Wood, Johannes Schindelin, Wing Huang, Patrick Steinhardt It is likely that those who came to Git after 3.0 switched the default initial branch name to 'main' would still try to follow tutorials that were written before 3.0 happened and with the assumption that the tool would call the initial branch 'master'. To help these new users after 3.0 boundary, let's retain one part of the hint we will be giving before the default changes, namely, how to rename the branch an unconfigured Git has created just once. We do this without telling them how to permanently configure the default name of the initial branch, and that design choice is very much deliberate. The whole point of switching the default name was because we did not want to force individual users to configure their default branch name but while the hard wired default was 'master', they _had_ to configure it away from 'master' in order to conform to the recent norm, and a hint that tells them how to do so is useful. But once the default is renamed to 'main', that no longer is true. A narrower audience who are new users that follow an instruction that assumes the initial branch name is 'master' would only need to learn "here is how to change the branch name to match the tutorial you are following in the repository you created for practice", and "here is how you keep creating repositories with the first branch with a name everybody hates" is unnecessary. It also needs to be noted that the advise token to squelch the message is the same advice.defaultBranchName as before, which is also very much deliberate. The users who do have that configured are those who _have_ been using Git since before 3.0, and they are not the target audience for the new advice message. Reusing the same advise token ensures that they do not have to turn the message off. Helped-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com> --- * With simplified tests, thanks to Phillip's help. advice.c | 2 -- advice.h | 4 +--- refs.c | 12 ++++++++++-- t/test-lib.sh | 10 +++++++--- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/advice.c b/advice.c index 48c49ee414..e5f0ff8449 100644 --- a/advice.c +++ b/advice.c @@ -51,9 +51,7 @@ static struct { [ADVICE_AM_WORK_DIR] = { "amWorkDir" }, [ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] = { "checkoutAmbiguousRemoteBranchName" }, [ADVICE_COMMIT_BEFORE_MERGE] = { "commitBeforeMerge" }, -#ifndef WITH_BREAKING_CHANGES [ADVICE_DEFAULT_BRANCH_NAME] = { "defaultBranchName" }, -#endif /* WITH_BREAKING_CHANGES */ [ADVICE_DETACHED_HEAD] = { "detachedHead" }, [ADVICE_DIVERGING] = { "diverging" }, [ADVICE_FETCH_SET_HEAD_WARN] = { "fetchRemoteHEADWarn" }, diff --git a/advice.h b/advice.h index fc1dc87204..8def280688 100644 --- a/advice.h +++ b/advice.h @@ -18,9 +18,7 @@ enum advice_type { ADVICE_AM_WORK_DIR, ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME, ADVICE_COMMIT_BEFORE_MERGE, -#ifndef WITH_BREAKING_CHANGES - ADVICE_DEFAULT_BRANCH_NAME, -#endif /* WITH_BREAKING_CHANGES */ + ADVICE_DEFAULT_BRANCH_NAME, /* To be retired sometime after Git 3.0 */ ADVICE_DETACHED_HEAD, ADVICE_DIVERGING, ADVICE_FETCH_SET_HEAD_WARN, diff --git a/refs.c b/refs.c index 149a8d1cec..f15366bfce 100644 --- a/refs.c +++ b/refs.c @@ -641,9 +641,17 @@ static const char default_branch_name_advice[] = N_( "\n" "\tgit branch -m <name>\n" ); +#else +static const char default_branch_name_advice[] = N_( +"Using '%s' as the name for the initial branch since Git 3.0.\n" +"If you expected Git to create 'master', the just-created\n" +"branch can be renamed via this command:\n" +"\n" +"\tgit branch -m master\n" +); #endif /* WITH_BREAKING_CHANGES */ -char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet) +char *repo_default_branch_name(struct repository *r, int quiet) { const char *config_key = "init.defaultbranch"; const char *config_display_key = "init.defaultBranch"; @@ -660,10 +668,10 @@ char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet) ret = xstrdup("main"); #else ret = xstrdup("master"); +#endif /* WITH_BREAKING_CHANGES */ if (!quiet) advise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME, _(default_branch_name_advice), ret); -#endif /* WITH_BREAKING_CHANGES */ } full_ref = xstrfmt("refs/heads/%s", ret); diff --git a/t/test-lib.sh b/t/test-lib.sh index b191954c3c..562f950fb0 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -127,13 +127,17 @@ then export GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS fi +# Explicitly set the default branch name for testing, to squelch hints +# from "git init" during the transition period. Should be removed +# after we decide to remove ADVICE_DEFAULT_BRANCH_NAME if test -z "$WITH_BREAKING_CHANGES" then - # Explicitly set the default branch name for testing, to avoid the - # transitory "git init" warning under --verbose. : ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master} - export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +else + : ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=main} fi +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME + ################################################################ # It appears that people try to run tests without building... -- 2.51.0-382-g6e76cf14a4 ^ permalink raw reply related [flat|nested] 56+ messages in thread
* Re: [PATCH v2 5/4] initial branch: give hints after switching the default name 2025-09-17 16:18 ` [PATCH v2 5/4] initial branch: give hints after switching the default name Junio C Hamano @ 2025-09-18 15:06 ` Phillip Wood 2025-09-18 18:42 ` Junio C Hamano 0 siblings, 1 reply; 56+ messages in thread From: Phillip Wood @ 2025-09-18 15:06 UTC (permalink / raw) To: Junio C Hamano, git; +Cc: Johannes Schindelin, Wing Huang, Patrick Steinhardt On 17/09/2025 17:18, Junio C Hamano wrote: > It is likely that those who came to Git after 3.0 switched the > default initial branch name to 'main' would still try to follow > tutorials that were written before 3.0 happened and with the > assumption that the tool would call the initial branch 'master'. > > To help these new users after 3.0 boundary, let's retain one part of > the hint we will be giving before the default changes, namely, how > to rename the branch an unconfigured Git has created just once. > > We do this without telling them how to permanently configure the > default name of the initial branch, and that design choice is very > much deliberate. The whole point of switching the default name was > because we did not want to force individual users to configure their > default branch name but while the hard wired default was 'master', > they _had_ to configure it away from 'master' in order to conform to > the recent norm, and a hint that tells them how to do so is useful. > > But once the default is renamed to 'main', that no longer is true. > A narrower audience who are new users that follow an instruction > that assumes the initial branch name is 'master' would only need to > learn "here is how to change the branch name to match the tutorial > you are following in the repository you created for practice", and > "here is how you keep creating repositories with the first branch > with a name everybody hates" is unnecessary. > > It also needs to be noted that the advise token to squelch the > message is the same advice.defaultBranchName as before, which is > also very much deliberate. The users who do have that configured > are those who _have_ been using Git since before 3.0, and they are > not the target audience for the new advice message. Reusing the > same advise token ensures that they do not have to turn the message > off. > > Helped-by: Phillip Wood <phillip.wood@dunelm.org.uk> > Signed-off-by: Junio C Hamano <gitster@pobox.com> > --- > * With simplified tests, thanks to Phillip's help. This looks good. The only thing I wondered about was whether we should keep -test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' ' +test_expect_success 'advice on unconfigured init.defaultBranch' ' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \ init unconfigured-default-branch-name 2>err && in t0001-init.sh from the previous version as we're still printing some advice. Thanks Phillip > > advice.c | 2 -- > advice.h | 4 +--- > refs.c | 12 ++++++++++-- > t/test-lib.sh | 10 +++++++--- > 4 files changed, 18 insertions(+), 10 deletions(-) > > diff --git a/advice.c b/advice.c > index 48c49ee414..e5f0ff8449 100644 > --- a/advice.c > +++ b/advice.c > @@ -51,9 +51,7 @@ static struct { > [ADVICE_AM_WORK_DIR] = { "amWorkDir" }, > [ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] = { "checkoutAmbiguousRemoteBranchName" }, > [ADVICE_COMMIT_BEFORE_MERGE] = { "commitBeforeMerge" }, > -#ifndef WITH_BREAKING_CHANGES > [ADVICE_DEFAULT_BRANCH_NAME] = { "defaultBranchName" }, > -#endif /* WITH_BREAKING_CHANGES */ > [ADVICE_DETACHED_HEAD] = { "detachedHead" }, > [ADVICE_DIVERGING] = { "diverging" }, > [ADVICE_FETCH_SET_HEAD_WARN] = { "fetchRemoteHEADWarn" }, > diff --git a/advice.h b/advice.h > index fc1dc87204..8def280688 100644 > --- a/advice.h > +++ b/advice.h > @@ -18,9 +18,7 @@ enum advice_type { > ADVICE_AM_WORK_DIR, > ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME, > ADVICE_COMMIT_BEFORE_MERGE, > -#ifndef WITH_BREAKING_CHANGES > - ADVICE_DEFAULT_BRANCH_NAME, > -#endif /* WITH_BREAKING_CHANGES */ > + ADVICE_DEFAULT_BRANCH_NAME, /* To be retired sometime after Git 3.0 */ > ADVICE_DETACHED_HEAD, > ADVICE_DIVERGING, > ADVICE_FETCH_SET_HEAD_WARN, > diff --git a/refs.c b/refs.c > index 149a8d1cec..f15366bfce 100644 > --- a/refs.c > +++ b/refs.c > @@ -641,9 +641,17 @@ static const char default_branch_name_advice[] = N_( > "\n" > "\tgit branch -m <name>\n" > ); > +#else > +static const char default_branch_name_advice[] = N_( > +"Using '%s' as the name for the initial branch since Git 3.0.\n" > +"If you expected Git to create 'master', the just-created\n" > +"branch can be renamed via this command:\n" > +"\n" > +"\tgit branch -m master\n" > +); > #endif /* WITH_BREAKING_CHANGES */ > > -char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet) > +char *repo_default_branch_name(struct repository *r, int quiet) > { > const char *config_key = "init.defaultbranch"; > const char *config_display_key = "init.defaultBranch"; > @@ -660,10 +668,10 @@ char *repo_default_branch_name(struct repository *r, MAYBE_UNUSED int quiet) > ret = xstrdup("main"); > #else > ret = xstrdup("master"); > +#endif /* WITH_BREAKING_CHANGES */ > if (!quiet) > advise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME, > _(default_branch_name_advice), ret); > -#endif /* WITH_BREAKING_CHANGES */ > } > > full_ref = xstrfmt("refs/heads/%s", ret); > diff --git a/t/test-lib.sh b/t/test-lib.sh > index b191954c3c..562f950fb0 100644 > --- a/t/test-lib.sh > +++ b/t/test-lib.sh > @@ -127,13 +127,17 @@ then > export GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS > fi > > +# Explicitly set the default branch name for testing, to squelch hints > +# from "git init" during the transition period. Should be removed > +# after we decide to remove ADVICE_DEFAULT_BRANCH_NAME > if test -z "$WITH_BREAKING_CHANGES" > then > - # Explicitly set the default branch name for testing, to avoid the > - # transitory "git init" warning under --verbose. > : ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master} > - export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME > +else > + : ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=main} > fi > +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME > + > > ################################################################ > # It appears that people try to run tests without building... ^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PATCH v2 5/4] initial branch: give hints after switching the default name 2025-09-18 15:06 ` Phillip Wood @ 2025-09-18 18:42 ` Junio C Hamano 0 siblings, 0 replies; 56+ messages in thread From: Junio C Hamano @ 2025-09-18 18:42 UTC (permalink / raw) To: Phillip Wood; +Cc: git, Johannes Schindelin, Wing Huang, Patrick Steinhardt Phillip Wood <phillip.wood123@gmail.com> writes: >> * With simplified tests, thanks to Phillip's help. > > This looks good. The only thing I wondered about was whether we should > keep > > -test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' ' > +test_expect_success 'advice on unconfigured init.defaultBranch' ' > GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \ > init unconfigured-default-branch-name 2>err && > > in t0001-init.sh from the previous version as we're still printing some > advice. I was a bit over-eager to revert the changes to the tests. I agree that we should make sure that we have the hint message even after 3.0, so we should drop the prerequisite there. Thanks for spotting. ^ permalink raw reply [flat|nested] 56+ messages in thread
end of thread, other threads:[~2025-09-18 18:42 UTC | newest] Thread overview: 56+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-08-27 15:24 [PATCH 0/6] breaking changes: switch default initial branch name to "main" Phillip Wood 2025-08-27 15:24 ` [PATCH 1/6] t0018: switch default branch name to main Phillip Wood 2025-08-27 17:21 ` Junio C Hamano 2025-08-28 14:00 ` Phillip Wood 2025-08-28 16:49 ` Junio C Hamano 2025-08-28 21:31 ` brian m. carlson 2025-08-27 15:24 ` [PATCH 2/6] t4013: " Phillip Wood 2025-08-27 15:24 ` [PATCH 3/6] t9902: " Phillip Wood 2025-08-27 15:24 ` [PATCH 4/6] t0613: stop setting default initial branch Phillip Wood 2025-08-27 17:30 ` Junio C Hamano 2025-08-27 15:24 ` [PATCH 5/6] t1403: remove dependency on GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME Phillip Wood 2025-08-27 15:24 ` [PATCH 6/6] breaking-changes: switch default branch to main Phillip Wood 2025-08-27 18:41 ` Junio C Hamano 2025-09-02 11:36 ` Patrick Steinhardt 2025-09-02 15:13 ` Phillip Wood 2025-09-03 4:44 ` Patrick Steinhardt 2025-09-03 9:54 ` Phillip Wood 2025-09-03 11:51 ` Patrick Steinhardt 2025-09-03 18:40 ` Junio C Hamano 2025-09-04 7:09 ` Patrick Steinhardt 2025-09-04 13:30 ` Phillip Wood 2025-09-05 6:07 ` Patrick Steinhardt 2025-09-04 13:27 ` Phillip Wood 2025-08-28 13:12 ` [PATCH 0/6] breaking changes: switch default initial branch name to "main" Johannes Schindelin 2025-09-04 13:21 ` [PATCH v2 0/4] " Phillip Wood 2025-09-04 13:21 ` [PATCH v2 1/4] breaking-changes: switch default branch to main Phillip Wood 2025-09-04 17:40 ` Junio C Hamano 2025-09-05 10:06 ` Phillip Wood 2025-09-05 15:04 ` Junio C Hamano 2025-09-04 13:21 ` [PATCH v2 2/4] t4013: switch default branch name " Phillip Wood 2025-09-04 13:21 ` [PATCH v2 3/4] t9902: " Phillip Wood 2025-09-04 18:27 ` Junio C Hamano 2025-09-05 10:07 ` Phillip Wood 2025-09-05 12:14 ` Patrick Steinhardt 2025-09-09 9:12 ` Phillip Wood 2025-09-04 13:21 ` [PATCH v2 4/4] t0613: stop setting default initial branch Phillip Wood 2025-09-04 18:35 ` Junio C Hamano 2025-09-05 10:09 ` Phillip Wood 2025-09-04 17:03 ` [PATCH v2 0/4] breaking changes: switch default initial branch name to "main" Junio C Hamano 2025-09-04 18:47 ` Phillip Wood 2025-09-10 15:28 ` [PATCH v3 " Phillip Wood 2025-09-10 15:29 ` [PATCH v3 1/4] breaking-changes: switch default branch to main Phillip Wood 2025-09-10 15:29 ` [PATCH v3 2/4] t4013: switch default branch name " Phillip Wood 2025-09-10 15:29 ` [PATCH v3 3/4] t9902: " Phillip Wood 2025-09-10 15:29 ` [PATCH v3 4/4] t0613: stop setting default initial branch Phillip Wood 2025-09-10 20:41 ` [PATCH v3 0/4] breaking changes: switch default initial branch name to "main" Junio C Hamano 2025-09-17 9:22 ` Junio C Hamano 2025-09-17 12:02 ` Kristoffer Haugsbakk 2025-09-17 15:02 ` Junio C Hamano 2025-09-17 14:53 ` Phillip Wood 2025-09-17 15:21 ` Junio C Hamano 2025-09-17 16:16 ` Junio C Hamano 2025-09-18 15:06 ` Phillip Wood 2025-09-17 16:18 ` [PATCH v2 5/4] initial branch: give hints after switching the default name Junio C Hamano 2025-09-18 15:06 ` Phillip Wood 2025-09-18 18:42 ` Junio C Hamano
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).