]> git.ipfire.org Git - thirdparty/git.git/blame - t/perf/p0001-rev-list.sh
Merge branch 'wb/fsmonitor-bitmap-fix'
[thirdparty/git.git] / t / perf / p0001-rev-list.sh
CommitLineData
342e9ef2
TR
1#!/bin/sh
2
3test_description="Tests history walking performance"
4
5. ./perf-lib.sh
6
7test_perf_default_repo
8
9test_perf 'rev-list --all' '
10 git rev-list --all >/dev/null
11'
12
13test_perf 'rev-list --all --objects' '
14 git rev-list --all --objects >/dev/null
15'
16
8320b1db
JK
17test_perf 'rev-list --parents' '
18 git rev-list --parents HEAD >/dev/null
19'
20
21test_expect_success 'create dummy file' '
22 echo unlikely-to-already-be-there >dummy &&
23 git add dummy &&
24 git commit -m dummy
25'
26
27test_perf 'rev-list -- dummy' '
28 git rev-list HEAD -- dummy
29'
30
31test_perf 'rev-list --parents -- dummy' '
32 git rev-list --parents HEAD -- dummy
33'
34
ea97002f 35test_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
40test_perf 'rev-list $commit --not --all' '
41 git rev-list $commit --not --all >/dev/null
42'
43
44test_perf 'rev-list --objects $commit --not --all' '
45 git rev-list --objects $commit --not --all >/dev/null
46'
47
342e9ef2 48test_done