]> git.madduck.net Git - code/myrepos.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

* Avoid creating parent directory for a checkout that will ultimately be
authorJoey Hess <joey@bluebird.kitenet.net>
Sat, 3 Nov 2007 17:59:06 +0000 (13:59 -0400)
committerJoey Hess <joey@bluebird.kitenet.net>
Sat, 3 Nov 2007 17:59:06 +0000 (13:59 -0400)
  skipped.

debian/changelog
mr

index 63d81bb40dd5031a2e0273e168e885079173ac61..09aef687944d0378988510531c6e66b330097ef2 100644 (file)
@@ -1,3 +1,10 @@
+mr (0.12) UNRELEASED; urgency=low
+
+  * Avoid creating parent directory for a checkout that will ultimately be
+    skipped.
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 03 Nov 2007 13:58:39 -0400
+
 mr (0.11) unstable; urgency=low
 
   * Avoid using commands like git-config and instead use "git config".
diff --git a/mr b/mr
index 62c6be83af2c6dd015fb8cf7aa5104b999af732f..be7d2833db3de545d4e34143acc29ecf82ad66ee 100755 (executable)
--- a/mr
+++ b/mr
@@ -388,11 +388,6 @@ sub action { #{{{
                }
 
                $dir=~s/^(.*)\/[^\/]+\/?$/$1/;
-
-               if (! -d $dir) {
-                       print "mr $action: creating parent directory $dir\n" if $verbose;
-                       system("mkdir", "-p", $dir);
-               }
        }
        elsif ($action =~ /update/) {
                if (! -d $dir) {
@@ -401,7 +396,6 @@ sub action { #{{{
        }
 
        $ENV{MR_REPO}=$dir;
-
        my $skiptest=findcommand("skip", $dir, $topdir, $subdir);
        my $command=findcommand($action, $dir, $topdir, $subdir);
 
@@ -425,7 +419,12 @@ sub action { #{{{
                        return SKIPPED;
                }
        }
-       
+
+       if ($action eq 'checkout' && ! -d $dir) {
+               print "mr $action: creating parent directory $dir\n" if $verbose;
+               system("mkdir", "-p", $dir);
+       }
+
        if (! $no_chdir && ! chdir($dir)) {
                print STDERR "mr $action: failed to chdir to $dir: $!\n";
                return FAILED;