git-mv: quote $src in regexp properly.
[git.git] / git-mv.perl
index 65b1dcf..53046ba 100755 (executable)
@@ -108,7 +108,7 @@ while(scalar @srcArgs > 0) {
        }
     }
     
-    if (($bad eq "") && ($dst =~ /^$src\//)) {
+    if (($bad eq "") && ($dst =~ /^$safesrc\//)) {
        $bad = "can not move directory '$src' into itself";
     }