Re: [PATCH 3/3] init: provide useful advice about init.defaultBranch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

>> +static const char default_branch_name_advice[] = N_(
>> +"Using '%s' as the name for the initial branch. This name is subject\n"
>> +"to change. To configure the name to use as the initial branch name in\n"
>> +"new repositories, or to silence this warning, run:\n"
>
> s/new repositories/all of your new repositories/ as that is the
> whole point of using --global option below.
>
>> +"\n"
>> +"\tgit config --global init.defaultBranch <name>\n"
>> +);
>> +

The above may give a valuable lesson to those who want to use one
branch name across new repositories, but it does not tell those who
wanted 'trunk' (to match the project, perhaps github.com/cli/cli,
with which they intend to interact) how to recover from having
already created the 'master' branch.  We may want to add some text
to suggest "branch -M" after giving the advice for the permanent
option.

Also, it is unclear to those who do not have a good <name> in mind
(or, those who do not care to choose a <name> for themselves), what
<name> they should give to take the "or to silence this warning"
part of the advice.  It probably is a good idea to rephrase and say
either:

    ... To configure ... in all your new repositories and squelch
    this message, run:

	git config --global init.defaultBranch <name>

or

    ... To configure ... in all your new repositories, run:

	git config --global init.defaultBranch <name>

    Note that this message won't appear after doing so.

I am offhand not sure which one is better.

Thanks.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux