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

Re: git-mv is broken in master

From
DRDavid Rientjes <rientjes@google.com>
Date
Aug 15, 2006, 21:02 UTC
Message-ID
<Pine.LNX.4.63.0608151401510.3965@chino.corp.google.com>
In-Reply-To
<20060815205150.GA467@c165.ib.student.liu.se>
On Tue, 15 Aug 2006, Fredrik Kuivinen wrote:
Show 5 quoted lines
> With the current master I get the following:
> 
>     $ git-mv README README-renamed
>     fatal: can not move directory into itself, source=README, destination=README-renamed
> 
Please try the following patch.
		David
Signed-off-by: David Rientjes <rientjes@google.com>
---
 builtin-mv.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/builtin-mv.c b/builtin-mv.c
index a731f8d..1d11bbb 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -203,8 +203,7 @@ int cmd_mv(int argc, const char **argv, 
 			}
 		}
 
-		if (!bad &&
-		    !strncmp(destination[i], source[i], strlen(source[i])))
+		if (!bad && !strcmp(destination[i], source[i]))
 			bad = "can not move directory into itself";
 
 		if (!bad && cache_name_pos(source[i], strlen(source[i])) < 0)
-- 
1.4.2.g460c-dirty
Previous: Fredrik KuivinenNext: Johannes Schindelin
Message 2 of 7 in “git-mv is broken in master”
  1. Fredrik KuivinenAug 15, 2006
  2. David RientjesAug 15, 2006
  3. git-mv: succeed even if source is a prefix of destinationJohannes Schindelin, Aug 16, 2006
  4. Fredrik KuivinenAug 16, 2006
  5. Johannes SchindelinAug 16, 2006
  6. Johannes SchindelinAug 16, 2006
  7. Fredrik KuivinenAug 16, 2006

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.