Re: git-mv is broken in master

From: David Rientjes <rientjes@google.com>
Date: 2006-08-16 07:02:38
On Tue, 15 Aug 2006, Fredrik Kuivinen wrote:
> 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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Aug 16 07:04:07 2006

This archive was generated by hypermail 2.1.8 : 2006-08-16 07:05:12 EST