summaryrefslogtreecommitdiff
path: root/checkout-index.c
diff options
context:
space:
mode:
Diffstat (limited to 'checkout-index.c')
-rw-r--r--checkout-index.c2
1 files changed, 1 insertions, 1 deletions
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 @@ 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;