# Bug: git add --patch does not honor "diff.noprefix"

2 messages from 2018-12-06 to 2018-12-09. Participants: Christian Weiske, Junio C Hamano.
Thread: https://gitlist.dev/t/49955

## Christian Weiske, 2018-12-06 10:34

Subject: Bug: git add --patch does not honor "diff.noprefix"
Message-ID: <c165fc5f-c452-fb2e-8ac3-d2afb12948bc@cweiske.de>
URL: https://gitlist.dev/e/c165fc5f-c452-fb2e-8ac3-d2afb12948bc%40cweiske.de

```
Hi,


When running "git add -p" on git version 2.19.2 and "diff.noprefix" set
to true, it still shows the "a/" and "b/" prefixes.

This issue has been reported in 2016 already[1], but is still there in
2.19.2.


[1]
https://public-inbox.org/git/E1D7329A-A54B-4D09-A72A-62ECA8005752@gmail.com/T/

-- 
Regards/Mit freundlichen Grüßen
Christian Weiske

-=≡ Geeking around in the name of science since 1982 ≡=-

```

## Junio C Hamano, 2018-12-09 01:30

Subject: Re: Bug: git add --patch does not honor "diff.noprefix"
Message-ID: <xmqqsgz75vwd.fsf@gitster-ct.c.googlers.com>
URL: https://gitlist.dev/e/xmqqsgz75vwd.fsf%40gitster-ct.c.googlers.com
In-Reply-To: <c165fc5f-c452-fb2e-8ac3-d2afb12948bc@cweiske.de>

```
Christian Weiske <cweiske@cweiske.de> writes:

> When running "git add -p" on git version 2.19.2 and "diff.noprefix" set
> to true, it still shows the "a/" and "b/" prefixes.
>
> This issue has been reported in 2016 already[1], but is still there in
> 2.19.2.

It is very likely because it is a non-issue.  

The reason why prefixes are customizable is to match the convention
used to show your patch to others, but the patch to be immediately
consumed within an "add -i/-p" session is viewed only by the user,
so it is much much lower priority to change the code.  I guess the
reason why no such change was made is because nobody felt it worth
the trouble to change the code to use a non-standard prefix when
producing the patch to be shown, and then also change the code to
accept a non-standard prefix when using the chosen patch to be
applied.

```
