unexpected behaviour for "git diff --word-diff"

From: <hidden>
Date: 2016-06-15 23:01:03

Hi,

I get an unexpected behaviour for "git diff --word-diff" if 2 adjacent lines
start and end with the same letter. I tried versions 1.7.9 and 1.9.0.

Attached is a script with 7 examples. For each example, a file with 2 lines is
compared to a file with the same lines, only 1 or 2 letters appended in each
line. Each example is executed 4 times: with and without --word-diff-regex=.,
and with and without -R. The script prints the result of the diff of the 2
files. Just below it also prints the result of a counterexample: the same 2
lines with 2 lines (1 was sometimes not enough) of "xxx" between them.

Only for tests 5c,d and 6c,d the result matches the result for the
counterexample.

Kind regards,
Thomas

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help