projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'jc/ident'
[git.git]
/
git-mv.perl
diff --git
a/git-mv.perl
b/git-mv.perl
index
83dc7e4
..
2ea852c
100755
(executable)
--- a/
git-mv.perl
+++ b/
git-mv.perl
@@
-75,6
+75,15
@@
while(scalar @srcArgs > 0) {
$dst = shift @dstArgs;
$bad = "";
$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";
}
if ($opt_v) {
print "Checking rename of '$src' to '$dst'\n";
}