aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--checkout-index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/checkout-index.c b/checkout-index.c
index 1e1c9727e..53dd8cba6 100644
--- a/checkout-index.c
+++ b/checkout-index.c
@@ -58,7 +58,7 @@ static int checkout_file(const char *name)
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;