checkout-index: fix checking out specific path.
3bd348aeea24709cd9be4b9d741f79b6014cd7e3 commit broke checking
out specific paths.
Signed-off-by: Junio C Hamano <junkio@cox.net>
diff --git a/checkout-index.c b/checkout-index.c
index 1e1c972..53dd8cb 100644
--- a/checkout-index.c
+++ b/checkout-index.c
@@ -58,7 +58,7 @@
while (pos < active_nr) {
struct cache_entry *ce = active_cache[pos];
- if (ce_namelen(ce) != namelen &&
+ if (ce_namelen(ce) != namelen ||
memcmp(ce->name, name, namelen))
break;
has_same_name = 1;