summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f6bc189)
raw | patch | inline | side by side (parent: f6bc189)
author | Josef Weidendorfer <Josef.Weidendorfer@gmx.de> | |
Sun, 27 Nov 2005 21:06:42 +0000 (22:06 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 27 Nov 2005 22:40:29 +0000 (14:40 -0800) |
This gives a better error message when trying to move a directory
into some subdirectory of itself; ie. no real bug fix: renaming
already failed before, but with a strange "invalid argument".
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
into some subdirectory of itself; ie. no real bug fix: renaming
already failed before, but with a strange "invalid argument".
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-mv.perl | patch | blob | history |
diff --git a/git-mv.perl b/git-mv.perl
index ac19876fecbd2758e2782ae3f3423a727a036bd3..8d294d6529f158f65d318fc1c41fd27476639e8b 100755 (executable)
--- a/git-mv.perl
+++ b/git-mv.perl
}
}
- if (($bad eq "") && ($src eq $dstDir)) {
+ if (($bad eq "") && ($dst =~ /^$src\//)) {
$bad = "can not move directory '$src' into itself";
}