summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: feffadd)
raw | patch | inline | side by side (parent: feffadd)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 19 Feb 2006 07:42:03 +0000 (23:42 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 1 Mar 2006 20:12:53 +0000 (12:12 -0800) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
(cherry picked from 9a0e6731c632c841cd2de9dec0b9091b2f10c6fd commit)
(cherry picked from 9a0e6731c632c841cd2de9dec0b9091b2f10c6fd commit)
git-mv.perl | patch | blob | history |
diff --git a/git-mv.perl b/git-mv.perl
index 83dc7e45cf205c7575512182bf29516914773209..2ea852c9185743d5b84523698cbffaaffb238543 100755 (executable)
--- a/git-mv.perl
+++ b/git-mv.perl
$dst = shift @dstArgs;
$bad = "";
+ for ($src, $dst) {
+ # Be nicer to end-users by doing ".//a/./b/.//./c" ==> "a/b/c"
+ s|^\./||;
+ s|/\./|/| while (m|/\./|);
+ s|//+|/|g;
+ # Also "a/b/../c" ==> "a/c"
+ 1 while (s,(^|/)[^/]+/\.\./,$1,);
+ }
+
if ($opt_v) {
print "Checking rename of '$src' to '$dst'\n";
}