Re: git-mv is broken in master

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]