Re: Updated to v2.14.2 on macOS; git add --patch broken

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

 



On Tue, Oct 03, 2017 at 05:34:40PM +0900, Junio C Hamano wrote:

> Jeff King <peff@xxxxxxxx> writes:
> 
> > I agree it's not quite the same thing, and I agree the problem was made
> > much worse by 4c7f1819b.  But I still think color.ui=always is
> > inherently a foot-gun, and in either case it is the user that sets it
> > that is harmed (and they are the ones who have the power to fix it).
> 
> Yeah, but it is inherently a foot-gun only for those who write
> scripts around porcelain commands, which are expected to honor
> color.ui=always.  If you write a script using the plumbing commands
> because you did not want to get broken by color.ui=always, and then
> your script gets broken because plumbing commands you relied on
> suddenly start paying attention to color.ui---is that the user's
> fault who used color.ui?

Note that I'm arguing that it's a foot-gun even without scripts in the
picture at all. Forget about plumbing versus porcelain. If you set
color.ui to "always", you're going to get unexpected and confusing
results from time to time.

> The end-users have the power to work the breakage around by not
> using "always".  The script writers have the power to work the
> breakage around with "--no-color".  But these are workarounds that
> shouldn't have been needed in the first place, no?

To be clear, I don't think script writers should work around it at all.
It is either the fault of the user for having a broken config, or Git
for allowing such a broken config (and after having studied the
documentation, I think Git really is not helping here; nobody should
ever use "always", but the documentation introduces it as the most
obvious option to choose).

-Peff



[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