aboutsummaryrefslogtreecommitdiff
path: root/t/t4024-diff-optimize-common.sh
Commit message (Collapse)AuthorAge
* add test_cmp function for test scriptsJeff King2008-03-13
| | | | | | | | | | | | | | | | | | | Many scripts compare actual and expected output using "diff -u". This is nicer than "cmp" because the output shows how the two differ. However, not all versions of diff understand -u, leading to unnecessary test failure. This adds a test_cmp function to the test scripts and switches all "diff -u" invocations to use it. The function uses the contents of "$GIT_TEST_CMP" to compare its arguments; the default is "diff -u". On systems with a less-capable diff, you can do: GIT_TEST_CMP=cmp make test Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t4024: fix test script to use simpler sed patternJunio C Hamano2007-12-20
| | | | | | | | | The earlier test stripped away expected number of 'z' but the output would have been very hard to read once somebody broke the common tail optimization. Instead, count the number of 'z' and show it, to help diagnosing the problem better in the future. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Re-re-re-fix common tail optimizationJunio C Hamano2007-12-16
We need to be extra careful recovering the removed common section, so that we do not break context nor the changed incomplete line (i.e. the last line that does not end with LF). Signed-off-by: Junio C Hamano <gitster@pobox.com>