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

3 messages from 2017-10-02 to 2017-10-03. Participants: Tsvi Mostovicz, Thomas Gummerer, Kevin Daudt.
Thread: https://gitlist.dev/t/46881

## Tsvi Mostovicz, 2017-10-02 10:38

Subject: git add -p stops working when setting color.ui = always
Message-ID: <CAB2yay8LLeNbqR4kkTwF1U+oarVDRxgkV4uGXuYcO8mAQmhWQQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAB2yay8LLeNbqR4kkTwF1U%2BoarVDRxgkV4uGXuYcO8mAQmhWQQ%40mail.gmail.com

```
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, 2017-10-02 18:54

Subject: Re: git add -p stops working when setting color.ui = always
Message-ID: <20171002185415.GB30301@hank>
URL: https://gitlist.dev/e/20171002185415.GB30301%40hank
In-Reply-To: <CAB2yay8LLeNbqR4kkTwF1U+oarVDRxgkV4uGXuYcO8mAQmhWQQ@mail.gmail.com>

```
Hi,

On 10/02, Tsvi Mostovicz wrote:
> 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.

> git version 2.14.2.666.gea220ee40
> 
> Thanks,
> 
> 
> Tsvi Mostovicz
> ttmost@gmail.com
> www.linkedin.com/in/tsvim

```

## Kevin Daudt, 2017-10-03 19:36

Subject: Re: git add -p stops working when setting color.ui = always
Message-ID: <20171003193651.GB1667@alpha.vpn.ikke.info>
URL: https://gitlist.dev/e/20171003193651.GB1667%40alpha.vpn.ikke.info
In-Reply-To: <CAB2yay8LLeNbqR4kkTwF1U+oarVDRxgkV4uGXuYcO8mAQmhWQQ@mail.gmail.com>

```
On Mon, Oct 02, 2017 at 01:38:17PM +0300, Tsvi Mostovicz wrote:
> 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/

```
