summaryrefslogtreecommitdiff
path: root/t/t4033-diff-patience.sh
AgeCommit message (Collapse)Author
2016-07-11diff: fix a double off-by-one with --ignore-space-at-eolJohannes Schindelin
When comparing two lines, ignoring any whitespace at the end, we first try to match as many bytes as possible and break out of the loop only upon mismatch, to let the remainder be handled by the code shared with the other whitespace-ignoring code paths. When comparing the bytes, however, we incremented the counters always, even if the bytes did not match. And because we fall through to the space-at-eol handling at that point, it is as if that mismatch never happened. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-11diff: demonstrate a bug with --patience and --ignore-space-at-eolJohannes Schindelin
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>
2011-07-07t4033-diff-patience: factor out testsTay Ray Chuan
Group the test cases into two functions, test_diff_(frobnitz|unique). This in preparation for the histogram diff algorithm, which would also re-use these test cases. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-07Introduce the diff option '--patience'Johannes Schindelin
This commit teaches Git to produce diff output using the patience diff algorithm with the diff option '--patience'. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>