Only switch on the line number toggle when highlighting is activated
[git/mingw/4msysgit.git] / t / perf / p4211-line-log.sh
blob3d074b0e413a0cb5b3df58296385cfdfbefbcaf7
1 #!/bin/sh
3 test_description='Tests log -L performance'
4 . ./perf-lib.sh
6 test_perf_default_repo
8 # Pick a file to log pseudo-randomly. The sort key is the blob hash,
9 # so it is stable.
10 test_expect_success 'select a file' '
11 git ls-tree HEAD | grep ^100644 |
12 sort -k 3 | head -1 | cut -f 2 >filelist
15 file=$(cat filelist)
16 export file
18 test_perf 'git rev-list --topo-order (baseline)' '
19 git rev-list --topo-order HEAD >/dev/null
22 test_perf 'git log --follow (baseline for -M)' '
23 git log --oneline --follow -- "$file" >/dev/null
26 test_perf 'git log -L' '
27 git log -L 1:"$file" >/dev/null
30 test_perf 'git log -M -L' '
31 git log -M -L 1:"$file" >/dev/null
34 test_done