stop leaking lock structs in some simple cases
[git.git] / t / perf / p3400-rebase.sh
blobce271ca4c1a07f620f25c5f4dd6febe020308c64
1 #!/bin/sh
3 test_description='Tests rebase performance'
4 . ./perf-lib.sh
6 test_perf_default_repo
8 test_expect_success 'setup rebasing on top of a lot of changes' '
9 git checkout -f -b base &&
10 git checkout -b to-rebase &&
11 git checkout -b upstream &&
12 for i in $(seq 100)
14 # simulate huge diffs
15 echo change$i >unrelated-file$i &&
16 seq 1000 >>unrelated-file$i &&
17 git add unrelated-file$i &&
18 test_tick &&
19 git commit -m commit$i unrelated-file$i &&
20 echo change$i >unrelated-file$i &&
21 seq 1000 | tac >>unrelated-file$i &&
22 git add unrelated-file$i &&
23 test_tick &&
24 git commit -m commit$i-reverse unrelated-file$i ||
25 break
26 done &&
27 git checkout to-rebase &&
28 test_commit our-patch interesting-file
31 test_perf 'rebase on top of a lot of unrelated changes' '
32 git rebase --onto upstream HEAD^ &&
33 git rebase --onto base HEAD^
36 test_expect_success 'setup rebasing many changes without split-index' '
37 git config core.splitIndex false &&
38 git checkout -b upstream2 to-rebase &&
39 git checkout -b to-rebase2 upstream
42 test_perf 'rebase a lot of unrelated changes without split-index' '
43 git rebase --onto upstream2 base &&
44 git rebase --onto base upstream2
47 test_expect_success 'setup rebasing many changes with split-index' '
48 git config core.splitIndex true
51 test_perf 'rebase a lot of unrelated changes with split-index' '
52 git rebase --onto upstream2 base &&
53 git rebase --onto base upstream2
56 test_done