From: David Rientjes Date: Tue, 15 Aug 2006 21:02:38 GMT Subject: Re: git-mv is broken in master Message-ID: In-Reply-To: <20060815205150.GA467@c165.ib.student.liu.se> 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 --- 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