git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: js/init-defaultbranch-advice, was Re: What's cooking in git.git (Dec 2020, #01; Tue, 8)

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 10, 2020, 04:54 UTC
Message-ID
<nycvar.QRO.7.76.6.2012100540220.25979@tvgsbejvaqbjf.bet>
In-Reply-To
<xmqqft4e1w2j.fsf@gitster.c.googlers.com>
Hi Junio,
On Wed, 9 Dec 2020, Junio C Hamano wrote:
Show 22 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > On Tue, 8 Dec 2020, Junio C Hamano wrote:
> >
> >> * js/init-defaultbranch-advice (2020-11-24) 4 commits
> >>  - init: provide useful advice about init.defaultBranch
> >>  - get_default_branch_name(): prepare for showing some advice
> >>  - branch -m: allow renaming a yet-unborn branch
> >>  - init: document `init.defaultBranch` better
> >>
> >>  Our users are going to be trained to prepare for future change of
> >>  init.defaultBranch configuration variable.
> >>
> >>  Expecting a reroll.
> >>  cf. <xmqq8saqjx2n.fsf@gitster.c.googlers.com>
> >>  I think a new advice.defaultBranchName is a bad idea.
> >
> > Unfortunately, this objection is news to me. Why would it be anything but
> > a legitimate interest to say "yeah, whatever, Git, just use the default
> > branch name, I'm fine with it"?
>
> Message sent on Nov 24 is a news to you now?

I did not understand your message as a strong objection back then, and I am still somewhat puzzled by the reaction.

> Anyway, I do not think those users who said "I'm fine with it" would be
> fine when the switchover happens outside their control.

As of September 29th, Git for Windows' installer asks users to specify their preferences:

	Adjusting the name of the initial branch in new repositories
	What would you like Git to name the initial branch after
	"git init"?
	[ ] Let Git decide
	    Let Git use its default branch name (currently: "master")
	    for the initial branch in newly created repositories.
	    The Git project intends to change this default to a more
	    inclusive name in the near future.
	[ ] Override the default branch name for new repositories
	    NEW! Many teams already renamed their default branches;
	    common choices are "main", "trunk" and "development".
	    Specify the name "git init" should use for the initial
	    branch:
	    __________________________

Obviously, I have no idea how many users chose the first option because we do not collect any usage data in the Git for Windows project. However, anecdotal data suggests that most users go with the first one, not caring one iota and simply going with what Git decides for them.

Show 7 quoted lines
> If they are truly fine, we could invent init.defaultBranch=:random
> that chooses a random branch name and point HEAD at it, and make
> that the default.  Those who are fine do not really care what name
> the initial branch gets would be fine with that as well, but you
> would agree that it is an absurd alternative, no?  I find it equally
> absurd to say "switch to a new name any time without telling me, I
> am fine with it".

I guess that most users trust us to make sane decisions, and a random name would not constitute such a thing.

But since you seem to care that much, I will re-roll this patch, and move the advice.defaultBranchName patch into the Windows-specific patches, to allow for silencing that warning when users chose the "Let Git decide" option above.

Ciao, Dscho

Previous: Junio C HamanoNext: Junio C Hamano
Message 26 of 30 in “What's cooking in git.git (Dec 2020, #01; Tue, 8)”
  1. Junio C HamanoDec 9, 2020
  2. Taylor BlauDec 9, 2020
  3. Jonathan TanDec 10, 2020
  4. Elijah NewrenDec 9, 2020
  5. Junio C HamanoDec 9, 2020
  6. Taylor BlauDec 9, 2020
  7. Junio C HamanoDec 10, 2020
  8. Jonathan TanDec 10, 2020
  9. fc/pull-merge-rebase, was Re: What's cooking in git.git (Dec 2020, #01; Tue, 8)Johannes Schindelin, Dec 9, 2020
  10. Junio C HamanoDec 9, 2020
  11. Felipe ContrerasDec 10, 2020
  12. Johannes SchindelinDec 10, 2020
  13. Johannes SchindelinDec 10, 2020
  14. Felipe ContrerasDec 10, 2020
  15. Theodore Y. Ts'oDec 10, 2020
  16. Junio C HamanoDec 10, 2020
  17. Felipe ContrerasDec 11, 2020
  18. Junio C HamanoDec 11, 2020
  19. Theodore Y. Ts'oDec 11, 2020
  20. Felipe ContrerasDec 12, 2020
  21. Felipe ContrerasDec 11, 2020
  22. Felipe ContrerasDec 10, 2020
  23. Junio C HamanoDec 11, 2020
  24. js/init-defaultbranch-advice, was Re: What's cooking in git.git (Dec 2020, #01; Tue, 8)Johannes Schindelin, Dec 9, 2020
  25. Junio C HamanoDec 9, 2020
  26. Johannes SchindelinDec 10, 2020
  27. Junio C HamanoDec 10, 2020
  28. Felipe ContrerasDec 11, 2020
  29. bc/rev-parse-path-format, was Re: What's cooking in git.git (Dec 2020, #01; Tue, 8)Johannes Schindelin, Dec 10, 2020
  30. Junio C HamanoDec 10, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.