ls-tree: further cleanup to parallel ls-files.
[gitweb.git] / git-mv.perl
index 8d294d6529f158f65d318fc1c41fd27476639e8b..53046bafd66ebc4c3a7ef5c65a6363ef5201dcdd 100755 (executable)
@@ -108,7 +108,7 @@ ()
        }
     }
     
-    if (($bad eq "") && ($dst =~ /^$src\//)) {
+    if (($bad eq "") && ($dst =~ /^$safesrc\//)) {
        $bad = "can not move directory '$src' into itself";
     }
 
@@ -151,6 +151,11 @@ ()
     if (!$opt_n) {
        if (!rename($src,$dst)) {
            $bad = "renaming '$src' failed: $!";
+           if ($opt_k) {
+               print "Warning: skipped: $bad\n";
+               $bad = "";
+               next;
+           }
            last;
        }
     }