summaryrefslogtreecommitdiff
path: root/t/t4033-diff-patience.sh
Commit message (Collapse)AuthorAgeFilesLines
* leak tests: mark some diff tests as passing with SANITIZE=leakÆvar Arnfjörð Bjarmason2021-11-011-0/+1
| | | | | | | | | | Mark some tests that match "*diff*" as passing when git is compiled with SANITIZE=leak. They'll now be listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI target). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* diff: fix a double off-by-one with --ignore-space-at-eoljs/ignore-space-at-eolJohannes Schindelin2016-07-111-1/+1
| | | | | | | | | | | | | | | 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>
* diff: demonstrate a bug with --patience and --ignore-space-at-eolJohannes Schindelin2016-07-111-0/+8
| | | | | | | | | | 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>
* t4033-diff-patience: factor out testsTay Ray Chuan2011-07-071-159/+3
| | | | | | | | | 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>
* Introduce the diff option '--patience'Johannes Schindelin2009-01-071-0/+168
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>