Re: [PATCH 00/28] Use main as default branch name
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 19, 2020, 09:22 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2011191012430.56@tvgsbejvaqbjf.bet>
- In-Reply-To
- <xmqq1rgq4qn3.fsf@gitster.c.googlers.com>
Hi Junio,
On Wed, 18 Nov 2020, Junio C Hamano wrote:
Show 10 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > > So yes, I totally agree that triggering an interactive prompt by the empty > > value is not really a good idea (nor a particularly intuitive behavior). > > Puzzled. > > Nobody talked about going interactive so far and I didn't suggest > it---even though I think it is a cute idea to give a "what branch > name do you want to use?" prompt, I do not think it is practical.
The interactive prompt was what I understood your "a notation that asks for the basename behaviour" comment. The "ask" was what tripped me up, I always interpret that as interactive. But now that I re-read it, I understand that you had not thought that far yet.
Show 11 quoted lines
> I thought it was obvious, but the key to coming up with a name > dynamically instead of using a fixed string is to derive from a cue > the end user gives, not directly use what the end user gives. I do > not think anybody in the discussion meant by "the <basename> thing" > to literally use $(basename $(cwd)) output, but use it to derive a > token that check-ref-format likes. As you may have already known > when you wrote them, "My Documents" or the root directory case are > red herring---it would be trivial to derive "MyDocuments" or > "my-documents" for the former, and for the latter, it is totally OK > for the deriving rule to come up with any of "unnamed", "initial", > etc.
The more magic you introduce, the less intuitive the whole thing gets, and the more disruptive the change.
> Most of the thing you said in the message I am responding to did not > make much sense to me. Perhaps you can retry after reading the > message you are responding to again?
Could you be a bit more specific?
Was it the "I already use the empty string to force a fall-back, it cannot also mean something else" that did not make sense?
Or my comment that special-casing values that start with a colon would look saner to me?
Or the comment about the basename in a root directory?
Or referencing the SFC statement that we want to minimize disruption?
Or my stated preference to go with `main` in order to fulfill that promise of minimizing the disruption to users?
Or my current plan to introduce an `advise()` call when running `git init` that tells users that the fall-back for `init.defaultBranch` will change soon and that users are encouraged to configure it if they care about keeping the current fall-back?
Or that all of this needs to be done with care?
The message you refer to might not have been the best example of clear communication, but it hardly deserved _that_ response.
Ciao, Dscho