Skip to content

Commit 23a2666

Browse files
Pete Wyckoffgitster
authored andcommitted
git p4 test: cleanup_git should make a new $git
For convenience, leave one in place at the end of each test so that it is not necessary to build a new one. This makes it consistent with $cli. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent f69b3a9 commit 23a2666

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

t/lib-git-p4.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,6 @@ kill_p4d() {
9999
}
100100

101101
cleanup_git() {
102-
rm -rf "$git"
102+
rm -rf "$git" &&
103+
mkdir "$git"
103104
}

t/t9800-git-p4-basic.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ test_expect_success 'wildcard files submit back to p4, delete' '
270270
'
271271

272272
test_expect_success 'clone bare' '
273+
rm -rf "$git" &&
273274
git p4 clone --dest="$git" --bare //depot &&
274275
test_when_finished cleanup_git &&
275276
(

t/t9806-git-p4-options.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ test_expect_success 'clone --use-client-spec' '
149149
cleanup_git &&
150150
151151
# same thing again, this time with variable instead of option
152-
mkdir "$git" &&
153152
(
154153
cd "$git" &&
155154
git init &&

0 commit comments

Comments
 (0)