OSDN Git Service

git p4 test: cleanup_git should make a new $git
authorPete Wyckoff <pw@padd.com>
Wed, 27 Jun 2012 12:01:01 +0000 (08:01 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Jun 2012 04:06:35 +0000 (21:06 -0700)
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>
t/lib-git-p4.sh
t/t9800-git-p4-basic.sh
t/t9806-git-p4-options.sh

index 309db31..31d75ae 100644 (file)
@@ -99,5 +99,6 @@ kill_p4d() {
 }
 
 cleanup_git() {
-       rm -rf "$git"
+       rm -rf "$git" &&
+       mkdir "$git"
 }
index 60c1f57..234f727 100755 (executable)
@@ -270,6 +270,7 @@ test_expect_success 'wildcard files submit back to p4, delete' '
 '
 
 test_expect_success 'clone bare' '
+       rm -rf "$git" &&
        git p4 clone --dest="$git" --bare //depot &&
        test_when_finished cleanup_git &&
        (
index a37c6cb..fa40cc8 100755 (executable)
@@ -149,7 +149,6 @@ test_expect_success 'clone --use-client-spec' '
        cleanup_git &&
 
        # same thing again, this time with variable instead of option
-       mkdir "$git" &&
        (
                cd "$git" &&
                git init &&