threads / discuss / 46881

git add -p stops working when setting color.ui = always

Subject: git add -p stops working when setting color.ui = always

## tl;dr

3 messages between Oct 2, 2017 and Oct 3, 2017.

replies: 2people: 3as markdown or json

Tsvi Mostovicz· Oct 2, 2017, 10:38 UTC · lore
Hi,

When setting "color.ui = always" in the last few versions (not sure exactly when this started, but definitely exists in 2.14.1 and 2.14.2), git add -p stops working as expected. Instead of prompting the user, it skips through the prompts and doesn't allow selecting a hunk.

Don't know why I had color.ui = always set in my .gitconfig.
git version 2.14.2.666.gea220ee40
Thanks,

Tsvi Mostovicz ttmost@gmail.com www.linkedin.com/in/tsvim

Thomas Gummerer· Oct 2, 2017, 18:54 UTC · re: Tsvi Mostovicz · lore

Re: git add -p stops working when setting color.ui = always

Hi,
On 10/02, Tsvi Mostovicz wrote:
Show 7 quoted lines
> Hi,
> 
> When setting "color.ui = always" in the last few versions (not sure
> exactly when this started, but definitely exists in 2.14.1 and
> 2.14.2), git add -p stops working as expected. Instead of prompting
> the user, it skips through the prompts and doesn't allow selecting a
> hunk.

This is a known change in behaviour (for more information see the thread at https://public-inbox.org/git/86D0A377-8AFD-460D-A90E-6327C6934DFC@gmail.com/).

> 
> Don't know why I had color.ui = always set in my .gitconfig.

Can you set color.ui = auto instead? That should give you colored output on the terminal, while not breaking git add -p.

Show 8 quoted lines
> git version 2.14.2.666.gea220ee40
> 
> Thanks,
> 
> 
> Tsvi Mostovicz
> ttmost@gmail.com
> www.linkedin.com/in/tsvim
Kevin Daudt· Oct 3, 2017, 19:36 UTC · re: Tsvi Mostovicz · lore

Re: git add -p stops working when setting color.ui = always

On Mon, Oct 02, 2017 at 01:38:17PM +0300, Tsvi Mostovicz wrote:
Show 14 quoted lines
> Hi,
> 
> When setting "color.ui = always" in the last few versions (not sure
> exactly when this started, but definitely exists in 2.14.1 and
> 2.14.2), git add -p stops working as expected. Instead of prompting
> the user, it skips through the prompts and doesn't allow selecting a
> hunk.
> 
> Don't know why I had color.ui = always set in my .gitconfig.
> 
> git version 2.14.2.666.gea220ee40
> 
> Thanks,
> 
Hello Tsvi,

This is being discussed just now[0]. Setting the value to auto should fix it (setting it to always does not make much sense in your config file).

Kevin.
[0}:https://public-inbox.org/git/20171003093157.gq7za2fwcqsouire@sigill.intra.peff.net/T/

← back to recent threads