You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since 1296cbe (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. When git
is built with breaking changes enabled the default branch name
is "main" and the advice is not shown. In addition support for
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME is removed and the remote code
will try "main" before "master" when guessing the default remote
branch name.
With the expection 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 <[email protected]>
0 commit comments