git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [bug] git add -p breaks, if color.ui is set to "always"

From
Kevin Daudt <me@ikke.info>
Date
Oct 6, 2017, 15:42 UTC
Message-ID
<20171006154239.GA9299@alpha.vpn.ikke.info>
In-Reply-To
<20171006124730.onetucvpt3btlali@wheatley.informatik.uni-wuerzburg.de>
On Fri, Oct 06, 2017 at 02:47:30PM +0200, Alexander Gehrke wrote:
Show 12 quoted lines
> 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
> anything.
> 
> 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.
> 
> Regards
> Alexander Gehrke
Hello Alexander,

There have been a few mailing-list posts[0] 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.

Kevin.
[0}:https://public-inbox.org/git/20171003093157.gq7za2fwcqsouire@sigill.intra.peff.net/T/
Previous: Alexander Gehrke
Message 2 of 2 in “[bug] git add -p breaks, if color.ui is set to "always"”
  1. Alexander GehrkeOct 6, 2017
  2. Kevin DaudtOct 6, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.