diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2018-11-23 11:16:54 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-10 10:38:08 -0800 |
commit | 2034b473e1316d206c39be67dcb3f71fa93c06f5 (patch) | |
tree | 2d19cd1cbc10d7ebd3c5b834d006faecca5eef2f /t/t7519-status-fsmonitor.sh | |
parent | diff --color-moved-ws: demonstrate false positives (diff) | |
download | tgif-2034b473e1316d206c39be67dcb3f71fa93c06f5.tar.xz |
diff --color-moved-ws: fix false positives
'diff --color-moved-ws=allow-indentation-change' can color lines as
moved when they are in fact different. For example in commit
1a07e59c3e ("Update messages in preparation for i18n", 2018-07-21) the
lines
- die (_("must end with a color"));
+ die(_("must end with a color"));
are colored as moved even though they are different.
This is because if there is a fuzzy match for the first line of
a potential moved block the line is marked as moved before the
potential match is checked to see if it actually matches. The fix is
to delay marking the line as moved until after we have checked that
there really is at least one matching potential moved block.
Note that the test modified in the last commit still fails because
adding an unmoved line between two moved blocks that are already
separated by unmoved lines changes the color of the block following the
addition. This should not be the case and will be fixed in the next
commit.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7519-status-fsmonitor.sh')
0 files changed, 0 insertions, 0 deletions