git-mv: quote $src in regexp properly.
authorJunio C Hamano <junkio@cox.net>
Mon, 28 Nov 2005 10:54:05 +0000 (02:54 -0800)
committerJunio C Hamano <junkio@cox.net>
Mon, 28 Nov 2005 10:54:05 +0000 (02:54 -0800)
Noticed and fixed by Matthias Urlichs and Josef Weidendorfer.

Signed-off-by: Junio C Hamano <junkio@cox.net>
git-mv.perl
index 65b1dcfdf2314e2eb8b7bfd1124210ad73269b10..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";
     }