3 test_description
='Tests diff --color-moved performance'
8 # The endpoints of the diff can be customized by setting TEST_REV_A
9 # and TEST_REV_B in the environment when running this test.
11 rev="${TEST_REV_A:-v2.28.0}"
12 if ! rev_a
="$(git rev-parse --quiet --verify "$rev")"
14 skip_all
="skipping because '$rev' was not found. \
15 Use TEST_REV_A and TEST_REV_B to set the revs to use"
18 rev="${TEST_REV_B:-v2.29.0}"
19 if ! rev_b
="$(git rev-parse --quiet --verify "$rev")"
21 skip_all
="skipping because '$rev' was not found. \
22 Use TEST_REV_A and TEST_REV_B to set the revs to use"
27 test_export GIT_PAGER_IN_USE rev_a rev_b
29 test_perf
'diff --no-color-moved --no-color-moved-ws large change' '
30 git diff --no-color-moved --no-color-moved-ws $rev_a $rev_b
33 test_perf
'diff --color-moved --no-color-moved-ws large change' '
34 git diff --color-moved=zebra --no-color-moved-ws $rev_a $rev_b
37 test_perf
'diff --color-moved-ws=allow-indentation-change large change' '
38 git diff --color-moved=zebra --color-moved-ws=allow-indentation-change \
42 test_perf
'log --no-color-moved --no-color-moved-ws' '
43 git log --no-color-moved --no-color-moved-ws --no-merges --patch \
47 test_perf
'log --color-moved --no-color-moved-ws' '
48 git log --color-moved=zebra --no-color-moved-ws --no-merges --patch \
52 test_perf
'log --color-moved-ws=allow-indentation-change' '
53 git log --color-moved=zebra --color-moved-ws=allow-indentation-change \
54 --no-merges --patch -n1000 $rev_b