]> git.ipfire.org Git - thirdparty/git.git/commit - git-add--interactive.perl
add--interactive: detect bogus diffFilter output
authorJeff King <peff@peff.net>
Sat, 3 Mar 2018 05:58:49 +0000 (00:58 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Mar 2018 20:49:45 +0000 (12:49 -0800)
commit42f7d45428e260acf535ba0d55ecc91ee81e21da
treec2f3d0af9f1037c0f97bcaaa1c178caaeea43ffa
parentaf3570ed6ca97605d62ebe1836fc893014ae844b
add--interactive: detect bogus diffFilter output

It's important that the diff-filter only filter the
individual lines, and that there remain a one-to-one mapping
between the input and output lines. Otherwise, things like
hunk-splitting will behave quite unexpectedly (e.g., you
think you are splitting at one point, but it has a different
effect in the text patch we apply).

We can't detect all problematic cases, but we can at least
catch the obvious case where we don't even have the correct
number of lines.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-add--interactive.perl
t/t3701-add-interactive.sh