Re: Updated to v2.14.2 on macOS; git add --patch broken
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 3, 2017, 07:10 UTC
- Message-ID
- <xmqqinfwiu5n.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20171003061515.72l35fpvcf63vsf6@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> I'd prefer not to revert. I think setting any of the color config to > "always" in an on-disk file is basically a broken config. It was > exacerbated by 4c7f1819b, but it was already broken for scripts that > call "git log" or "git diff", or even just something as simple as piping > those programs on the command line.
I actually disagree with that reasoning.
We've promised that plumbing commands were safe to use in scripts, and 4c7f1819 ("make color.ui default to 'auto'", 2013-06-10) got it closer to breaking it (but not quite), and 136c8c8b finally broke it. Setting ui.color=always and shooting themselves in the foot by seeing ANSI escapes in "git log >file" output is totally user's choice. Breaking scripts that carefully chose to use plumbing, believing our earlier promise, and blaming user's ui.color=always does not sound quite like the same thing, at least to me.