aboutsummaryrefslogtreecommitdiff
path: root/git-mv.perl
diff options
context:
space:
mode:
authorJosef Weidendorfer <Josef.Weidendorfer@gmx.de>2005-11-27 22:11:33 +0100
committerJunio C Hamano <junkio@cox.net>2005-11-27 14:40:29 -0800
commit26169747b811b8ecd5693adfce4f5c7e322d2487 (patch)
tree70268c3e2beb244d5b0ee52ffbf468fd7fdd933d /git-mv.perl
parentb933e818e951c290e8355ae544567bba949f392e (diff)
downloadgit-26169747b811b8ecd5693adfce4f5c7e322d2487.tar.gz
git-26169747b811b8ecd5693adfce4f5c7e322d2487.tar.xz
git-mv: follow -k request even on failing renames
-k requests to keep running on an error condition. Previously, git-mv stopped on failing renames even with -k. There are some error conditions which are not checked in the first phase of git-mv, eg. 'permission denied'. Still, option -k should work. Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-mv.perl')
-rwxr-xr-xgit-mv.perl5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-mv.perl b/git-mv.perl
index 8d294d652..65b1dcfdf 100755
--- a/git-mv.perl
+++ b/git-mv.perl
@@ -151,6 +151,11 @@ while(scalar @srcs > 0) {
if (!$opt_n) {
if (!rename($src,$dst)) {
$bad = "renaming '$src' failed: $!";
+ if ($opt_k) {
+ print "Warning: skipped: $bad\n";
+ $bad = "";
+ next;
+ }
last;
}
}