From: Josef Weidendorfer Date: Sun, 27 Nov 2005 21:11:33 +0000 (+0100) Subject: git-mv: follow -k request even on failing renames X-Git-Tag: v0.99.9l^2~48 X-Git-Url: https://git.octo.it/?p=git.git;a=commitdiff_plain;h=26169747b811b8ecd5693adfce4f5c7e322d2487 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 Signed-off-by: Junio C Hamano --- diff --git a/git-mv.perl b/git-mv.perl index 8d294d65..65b1dcfd 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; } }