Git development
 help / color / mirror / Atom feed
* [PATCH] git-mv: follow -k request even on failing renames
@ 2005-11-27 21:11 Josef Weidendorfer
  0 siblings, 0 replies; only message in thread
From: Josef Weidendorfer @ 2005-11-27 21:11 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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

---

 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2005-11-27 21:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-27 21:11 [PATCH] git-mv: follow -k request even on failing renames Josef Weidendorfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox