summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 085c1e2)
raw | patch | inline | side by side (parent: 085c1e2)
author | Josef Weidendorfer <Josef.Weidendorfer@gmx.de> | |
Tue, 1 Nov 2005 22:46:27 +0000 (23:46 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 1 Nov 2005 22:45:49 +0000 (14:45 -0800) |
Needed because generating a target paths will add another slash.
This fixes e.g. "git-mv file dir/", which removed "file" from
version control by renaming it to "dir//file", as
git-update-index does not accept such paths.
Thanks goes to Ben Lau for noting this bug.
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This fixes e.g. "git-mv file dir/", which removed "file" from
version control by renaming it to "dir//file", as
git-update-index does not accept such paths.
Thanks goes to Ben Lau for noting this bug.
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 17e35b0ac088f83bbcd6d104c77925cd69ded2bb..a21d87eea88d4b1e9a40e4e7f7b836374f566c70 100755 (executable)
--- a/git-mv.perl
+++ b/git-mv.perl
my $argCount = scalar @ARGV;
if (-d $ARGV[$argCount-1]) {
$dstDir = $ARGV[$argCount-1];
+ # remove any trailing slash
+ $dstDir =~ s/\/$//;
@srcArgs = @ARGV[0..$argCount-2];
foreach $src (@srcArgs) {