Re: [PATCH 1/1] range-diff: internally force `diff.noprefix=false`
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 2, 2019, 20:06 UTC
- Message-ID
- <xmqq4l0qewu5.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <1f84f92846bc14d21aa7339c8baa0f9bb710b17d.1570039511.git.gitgitgadget@gmail.com>
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Johannes Schindelin <johannes.schindelin@gmx.de> > > When parsing the diffs, `range-diff` expects to see the prefixes `a/` > and `b/` in the diff headers.
If so, passing src/dst prefix as command line option is a much better solution, I think. diff.noprefix may not stay to be (or it may already not to be) the only thing how the prefix gets chosen.
Show 19 quoted lines
> - argv_array_pushl(&cp.args, "log", "--no-color", "-p", "--no-merges", > + argv_array_pushl(&cp.args, "-c", "diff.noprefix=false", > + "log", "--no-color", "-p", "--no-merges", > "--reverse", "--date-order", "--decorate=no", > /* > * Choose indicators that are not used anywhere > diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh > index 0120f769f1..64b66f2094 100755 > --- a/t/t3206-range-diff.sh > +++ b/t/t3206-range-diff.sh > @@ -461,4 +461,8 @@ test_expect_success 'format-patch --range-diff as commentary' ' > grep "> 1: .* new message" 0001-* > ' > > +test_expect_success 'range-diff overrides diff.noprefix internally' ' > + git -c diff.noprefix=true range-diff HEAD^... > +' > + > test_done