Re: [PATCH v2 4/4] init: provide useful advice about init.defaultBranch
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 9, 2020, 14:47 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2012091513540.25979@tvgsbejvaqbjf.bet>
- In-Reply-To
- <xmqq8saqjx2n.fsf@gitster.c.googlers.com>
Hi Junio,
On Tue, 24 Nov 2020, Junio C Hamano wrote:
Show 19 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > >> To configure the initial branch name to use in all of your new > >> repositories and squelch this message, run: > >> > >> may be better---it makes it clear that the offered two choices are > >> (1) do nothing and see this message every time, or (2) commit to a > >> name and not see this message again. > > > > Well, I think I finally understand what you are saying: there is a > > legitimate need for a way to go with Git's preference but still suppress > > that message. > > I am not saying it is a legitimate need. I just wanted to make it > clear that we deliberately chose not to grant that wish in the > message. An advice flag in this context means that the users can > choose to let their distro and sysadm to flip the default silently, > which is much worse than having to see the message every time they > start a new repository with "git init".
The distribution already can add patches, so this objection is a red herring. The sysadm can pick a different value for `init.defaultBranch` and dictate to the user silently what initial branch name to use, so that is also a red herring.
I still think that there is a legitimate need for this config option to turn the advice off, without having to override Git's default branch name.
In particular in this context, I would think that most users will want to just go with whatever is Git's default.
Ciao, Dscho