git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
JWJosef Weidendorfer <josef.weidendorfer@gmx.de>
Date
Nov 27, 2005, 21:11 UTC
Message-ID
<200511272211.33293.Josef.Weidendorfer@gmx.de>

-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
Message 1 of 1 in “git-mv: follow -k request even on failing renames”
  1. git-mv: follow -k request even on failing renamesJosef Weidendorfer, Nov 27, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.