1#!/bin/sh
23
test_description='Tests log -L performance'
4. ./perf-lib.sh
56
test_perf_default_repo
78
# Pick a file to log pseudo-randomly. The sort key is the blob hash,
9# so it is stable.
10test_expect_success 'select a file' '
11git ls-tree HEAD | grep ^100644 |
12sort -k 3 | head -1 | cut -f 2 >filelist
13'
1415
file=$(cat filelist)
16export file
1718
test_perf 'git rev-list --topo-order (baseline)' '
19git rev-list --topo-order HEAD >/dev/null
20'
2122
test_perf 'git log --follow (baseline for -M)' '
23git log --oneline --follow -- "$file" >/dev/null
24'
2526
test_perf 'git log -L (renames off)' '
27git log --no-renames -L 1:"$file" >/dev/null
28'
2930
test_perf 'git log -L (renames on)' '
31git log -M -L 1:"$file" >/dev/null
32'
3334
test_perf 'git log --oneline --raw --parents' '
35git log --oneline --raw --parents >/dev/null
36'
3738
test_done