]>
Commit | Line | Data |
---|---|---|
342e9ef2 TR |
1 | #!/bin/sh |
2 | ||
3 | test_description="Tests history walking performance" | |
4 | ||
5 | . ./perf-lib.sh | |
6 | ||
7 | test_perf_default_repo | |
8 | ||
9 | test_perf 'rev-list --all' ' | |
10 | git rev-list --all >/dev/null | |
11 | ' | |
12 | ||
13 | test_perf 'rev-list --all --objects' ' | |
14 | git rev-list --all --objects >/dev/null | |
15 | ' | |
16 | ||
8320b1db JK |
17 | test_perf 'rev-list --parents' ' |
18 | git rev-list --parents HEAD >/dev/null | |
19 | ' | |
20 | ||
21 | test_expect_success 'create dummy file' ' | |
22 | echo unlikely-to-already-be-there >dummy && | |
23 | git add dummy && | |
24 | git commit -m dummy | |
25 | ' | |
26 | ||
27 | test_perf 'rev-list -- dummy' ' | |
28 | git rev-list HEAD -- dummy | |
29 | ' | |
30 | ||
31 | test_perf 'rev-list --parents -- dummy' ' | |
32 | git rev-list --parents HEAD -- dummy | |
33 | ' | |
34 | ||
ea97002f | 35 | test_expect_success 'create new unreferenced commit' ' |
67f28251 JT |
36 | commit=$(git commit-tree HEAD^{tree} -p HEAD) && |
37 | test_export commit | |
ea97002f JK |
38 | ' |
39 | ||
40 | test_perf 'rev-list $commit --not --all' ' | |
41 | git rev-list $commit --not --all >/dev/null | |
42 | ' | |
43 | ||
44 | test_perf 'rev-list --objects $commit --not --all' ' | |
45 | git rev-list --objects $commit --not --all >/dev/null | |
46 | ' | |
47 | ||
342e9ef2 | 48 | test_done |