diff: demonstrate a bug with --patience and --ignore-space-at-eol
When a single character is added to a line, the combination of these two options results in an empty diff. This bug was noticed and reported by Naja Melan. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jul 9, 2016 at 09:23 UTC
a5229cc95103fab9449bf198a8a119482a8f0845
1 file changed
+8
t/t4033-diff-patience.sh
+8
@@ -5,6 +5,14 @@ test_description='patience diff algorithm'
5
. ./test-lib.sh
6
. "$TEST_DIRECTORY"/lib-diff-alternative.sh
7
8
+test_expect_failure '--ignore-space-at-eol with a single appended character' '
9
+ printf "a\nb\nc\n" >pre &&
10
+ printf "a\nbX\nc\n" >post &&
11
+ test_must_fail git diff --no-index \
12
+ --patience --ignore-space-at-eol pre post >diff &&
13
+ grep "^+.*X" diff
14
+'
15
+
16
test_diff_frobnitz "patience"
17
18
test_diff_unique "patience"