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 <alban.gruin@gmail.com> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alban Gruin committed
Nov 9, 2018 at 22:19 UTC
5aa24d71d850b6cd08a46daf7a3a3dc9c402f8d0
1 file changed
+5
-5
t/perf/p3400-rebase.sh
+5
-5
@@ -6,9 +6,9 @@ test_description='Tests rebase performance'
6
test_perf_default_repo
7
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 &&
9
+ git checkout -f -B base &&
10
+ git checkout -B to-rebase &&
11
+ git checkout -B upstream &&
12
for i in $(seq 100)
13
do
14
# simulate huge diffs
@@ -35,8 +35,8 @@ test_perf 'rebase on top of a lot of unrelated changes' '
35
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
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' '