Re: [PATCH 2/4] commit: introduce a config key to allow as-is commit with i-t-a entries
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 7, 2012, 01:13 UTC
- Message-ID
- <7vmx8v4f9f.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CACsJy8C5=JKHsjyaSFsxxyScb1CCQZmh4gXSAgsyJ8DFkjfQ0g@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
Show 12 quoted lines
> 2012/2/7 Junio C Hamano <gitster@pobox.com>: > >> I suspect that some among 1 million Git users would want the "please >> remind me", so a solution with configuration variable without command line >> override is not ideal (command line without any configurability is fine as >> long as we have a good default). > > Which is why I prefer adding a new configuration variable (and > optionally a command line option) instead of deprecating current > behavior, because (being lazy) I never be able to find "some among 1 > million" so I'm fine with assuming there are some among 1 million that > favors safety over convenience.
If there is one thing I want to absolutely avoid, it is to split the userbase into many pieces by giving sticky configuration variables, so the above argument is not a good starting point.
Show 8 quoted lines
>> The third one is a bit funny, as it is a way to bring back safety when the >> .... And having to add a funny >> option just for the sake of completeness is often an indication that there >> is something fundamentally wrong in the system that the option tries to >> express an interface into it. > > Well, that --honor-intent-to-add could be renamed as > --no-ignore-intent-to-add.
I wasn't talking about the name at all. What is _funny_ is the semantics.
A "by default unsafe" configuration introduces a need for an option to be extra careful only when matters, but "an option" to be extra careful by definition is easy to forget, so it is no longer a safety at all, iow, people who want "by default unsafe" will get "always unsafe". And it probably is perfectly fine because to them, forgetting to add 'add -N' entries is not a mistake at all, but always is a deliberate act.
Another thing I am somewhat worried about is if there are existing scripts that create commits and relies on the current "we cannot commit because the final contents is not known yet". I didn't check but for example how well does "git stash" work when the default is flipped to "just ignore"?