Skip to content

Commit

Permalink
git-mv: follow -k request even on failing renames
Browse files Browse the repository at this point in the history
-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>
  • Loading branch information
Josef Weidendorfer authored and Junio C Hamano committed Nov 27, 2005
1 parent b933e81 commit 2616974
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions git-mv.perl
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ ()
if (!$opt_n) {
if (!rename($src,$dst)) {
$bad = "renaming '$src' failed: $!";
if ($opt_k) {
print "Warning: skipped: $bad\n";
$bad = "";
next;
}
last;
}
}
Expand Down

0 comments on commit 2616974

Please sign in to comment.