]> git.ipfire.org Git - thirdparty/git.git/commit
range-diff: internally force `diff.noprefix=true`
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 2 Oct 2019 21:10:47 +0000 (14:10 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 3 Oct 2019 02:10:33 +0000 (11:10 +0900)
commit937b76ed4970214837314e26265b78793e6653ed
treeedf45e2942d3d851e1690b0d8caded186b4efa39
parent5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9
range-diff: internally force `diff.noprefix=true`

When parsing the diffs, `range-diff` expects to see the prefixes `a/`
and `b/` in the diff headers.

These prefixes can be forced off via the config setting
`diff.noprefix=true`. As `range-diff` is not prepared for that
situation, this will cause a segmentation fault.

Let's avoid that by passing the `--no-prefix` option to the `git log`
process that generates the diffs that `range-diff` wants to parse.
And of course expect the output to have no prefixes, then.

Reported-by: Michal Suchánek <msuchanek@suse.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
range-diff.c
t/t3206-range-diff.sh