]>
Commit | Line | Data |
---|---|---|
d55a30bb JK |
1 | #!/bin/sh |
2 | ||
3 | test_description='performance tests of prune' | |
4 | . ./perf-lib.sh | |
5 | ||
6 | test_perf_default_repo | |
7 | ||
8 | test_expect_success 'remove reachable loose objects' ' | |
9 | git repack -ad | |
10 | ' | |
11 | ||
12 | test_expect_success 'remove unreachable loose objects' ' | |
13 | git prune | |
14 | ' | |
15 | ||
16 | test_expect_success 'confirm there are no loose objects' ' | |
17 | git count-objects | grep ^0 | |
18 | ' | |
19 | ||
20 | test_perf 'prune with no objects' ' | |
21 | git prune | |
22 | ' | |
23 | ||
fde67d68 JK |
24 | test_expect_success 'repack with bitmaps' ' |
25 | git repack -adb | |
26 | ' | |
27 | ||
28 | # We have to create the object in each trial run, since otherwise | |
29 | # runs after the first see no object and just skip the traversal entirely! | |
30 | test_perf 'prune with bitmaps' ' | |
31 | echo "probably not present in repo" | git hash-object -w --stdin && | |
32 | git prune | |
33 | ' | |
34 | ||
d55a30bb | 35 | test_done |