summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2025-09-10 16:29:00 +0100
committerJunio C Hamano <gitster@pobox.com>2025-09-10 13:34:58 -0700
commit67d9b39cc711468c381f070e241211895fe97136 (patch)
tree41146a3b2492f0dc1870f2da7b2d07d46183d822 /t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main
parent2462961280690837670d997bde64bd4ebf8ae66d (diff)
breaking-changes: switch default branch to main
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main')
0 files changed, 0 insertions, 0 deletions