Skip to content

Commit de950c5

Browse files
chriscoolgitster
authored andcommitted
p3400: add perf tests for rebasing many changes
Rebasing onto many changes is interesting, but it's also interesting to see what happens when rebasing many changes. And while at it, let's also look at the impact of using a split index. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent f9d7abe commit de950c5

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

t/perf/p3400-rebase.sh

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test_description='Tests rebase performance'
55

66
test_perf_default_repo
77

8-
test_expect_success 'setup' '
8+
test_expect_success 'setup rebasing on top of a lot of changes' '
99
git checkout -f -b base &&
1010
git checkout -b to-rebase &&
1111
git checkout -b upstream &&
@@ -33,4 +33,24 @@ test_perf 'rebase on top of a lot of unrelated changes' '
3333
git rebase --onto base HEAD^
3434
'
3535

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
40+
'
41+
42+
test_perf 'rebase a lot of unrelated changes without split-index' '
43+
git rebase --onto upstream2 base &&
44+
git rebase --onto base upstream2
45+
'
46+
47+
test_expect_success 'setup rebasing many changes with split-index' '
48+
git config core.splitIndex true
49+
'
50+
51+
test_perf 'rebase a lot of unrelated changes with split-index' '
52+
git rebase --onto upstream2 base &&
53+
git rebase --onto base upstream2
54+
'
55+
3656
test_done

0 commit comments

Comments
 (0)