Skip to content

Commit 5aa24d7

Browse files
agrngitster
authored andcommitted
p3400: replace calls to git checkout -b' by git checkout -B'
p3400 makes a copy of the current repository to test git-rebase performance, and creates new branches in the copy with `git checkout -b'. If the original repository has branches with the same name as the script is trying to create, this operation will fail. This replaces these calls by `git checkout -B' to force the creation and update of these branches. Signed-off-by: Alban Gruin <[email protected]> Acked-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8858448 commit 5aa24d7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

t/perf/p3400-rebase.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ test_description='Tests rebase performance'
66
test_perf_default_repo
77

88
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 &&
9+
git checkout -f -B base &&
10+
git checkout -B to-rebase &&
11+
git checkout -B upstream &&
1212
for i in $(seq 100)
1313
do
1414
# simulate huge diffs
@@ -35,8 +35,8 @@ test_perf 'rebase on top of a lot of unrelated changes' '
3535

3636
test_expect_success 'setup rebasing many changes without split-index' '
3737
git config core.splitIndex false &&
38-
git checkout -b upstream2 to-rebase &&
39-
git checkout -b to-rebase2 upstream
38+
git checkout -B upstream2 to-rebase &&
39+
git checkout -B to-rebase2 upstream
4040
'
4141

4242
test_perf 'rebase a lot of unrelated changes without split-index' '

0 commit comments

Comments
 (0)