DORMANTno replies

[PATCH] git-mv: follow -k request even on failing renames

From: Josef Weidendorfer <hidden>
Date: 2016-06-15 22:42:13
Subsystem: the rest · Maintainer: Linus Torvalds

-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 <redacted>

---

 git-mv.perl |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

applies-to: 6ff4820f59a60e776e7a853cbe0fdbb908f3d8af
190f908c52de643bcb05a11d8537551bd1df067f
diff --git a/git-mv.perl b/git-mv.perl
index 8d294d6..65b1dcf 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;
 	}
     }
---
0.99.9.GIT
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help