Re: Git 2.8.1 - bug in patience diff algorithm when used with --ignore-space-at-eol?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Naja,

On Fri, 8 Jul 2016, Naja Melan wrote:

> When diffing with --patience and --ignore-space-at-eol, a change that
> adds or removes just one character a the end of a line isn't picked up.

Confirmed with the current 'master'. I am on it, building on top of this
diff:

-- snipsnap --
diff --git a/t/t4033-diff-patience.sh b/t/t4033-diff-patience.sh
index 3c9932e..6da435b 100755
--- a/t/t4033-diff-patience.sh
+++ b/t/t4033-diff-patience.sh
@@ -5,6 +5,13 @@ test_description='patience diff algorithm'
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff-alternative.sh
 
+test_expect_failure '--ignore-space-at-eol with a single appended character' '
+	printf "a\nb\nc\n" >pre &&
+	printf "a\nbX\nc\n" >post &&
+	git diff --no-index --patience --ignore-space-at-eol pre post >diff &&
+	grep "^+.*X" diff
+'
+
 test_diff_frobnitz "patience"
 
 test_diff_unique "patience"
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]