Re: [bug] git add -p breaks, if color.ui is set to "always"
- Date: Fri, 6 Oct 2017 17:42:39 +0200
- From: Kevin Daudt <me@xxxxxxxxx>
- Subject: Re: [bug] git add -p breaks, if color.ui is set to "always"
On Fri, Oct 06, 2017 at 02:47:30PM +0200, Alexander Gehrke wrote:
> After an update to version 2.14.2 from 2.14.1 "git add --patch" stopped working
> for me, just producing the same output as "git diff", but not prompting to stage
> I found that unsetting the config key color.ui, which was set to "always" fixed
> the problem.
> From the manpage, color.ui should not have that effect and "always" should be a
> legal value.
> Alexander Gehrke
There have been a few mailing-list posts about this already. While
git add -p should probably not have broken by this, setting ui.color to
always itself does not make a lot of sense either.
You are telling git to always output color, even when the target is
something that does not know what to do with the color codes. Setting it
to 'auto' would make more sense.
The thread I posted to discusses some changes that might get introduced
to improve the situation though.