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>
Josef Weidendorfer committed
Nov 27, 2005 at 22:11 UTC
26169747b811b8ecd5693adfce4f5c7e322d2487
1 file changed
+5
git-mv.perl
+5
@@ -151,6 +151,11 @@ while(scalar @srcs > 0) {
151
if (!$opt_n) {
152
if (!rename($src,$dst)) {
153
$bad = "renaming '$src' failed: $!";
154
+ if ($opt_k) {
155
+ print "Warning: skipped: $bad\n";
156
+ $bad = "";
157
+ next;
158
+ }
159
last;
160
}
161
}