Re: git-mv is broken in master
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