Subject: Re: [PATCH v2 4/4] init: provide useful advice about init.defaultBranch

From: Junio C Hamano <[email-masked]>
Date: Wed, 09 Dec 2020 14:15:25 -0800

Johannes Schindelin <[email-masked]> writes:

> On Tue, 24 Nov 2020, Junio C Hamano wrote:
>
>> 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.

The "setting init.defaultBranch is the only way to squelch" approach
means the ~/.gitconfig will have the settings soon after the user
starts using Git and /etc/gitconfig will not allow administrators to
force their will over what the user decides to use.  Distros adding
patches to strip configurability by setting init.defaultBranch in
user's ~/.gitconfig?  Is that the kind of possibilities worth
discussing?

So, no, your counter-argument above is nothing but a red-herring.

If you want a counter-argument, please explain why "I am fine to see
the default flipped to whatever the tool picks and having no control
over when the flipping happens" can be a sensible choice for users
with what kind of workflows.  The only folks I can think of who
would be fine with that are (1) those who do not create the second
branch in the repository and will stay on the primary branch
forever, and (2) those who immediately rename the branch to what
they want after "git init".  For other folks, such a choice is a
disaster waiting to happen, and it just feels irresponsible to offer
such a choice, at least to me.

Thanks.