checkout-index: fix checking out specific path.
authorJunio C Hamano <junkio@cox.net>
Wed, 14 Dec 2005 05:39:56 +0000 (21:39 -0800)
committerJunio C Hamano <junkio@cox.net>
Wed, 14 Dec 2005 05:39:56 +0000 (21:39 -0800)
3bd348aeea24709cd9be4b9d741f79b6014cd7e3 commit broke checking
out specific paths.

Signed-off-by: Junio C Hamano <junkio@cox.net>
checkout-index.c

index 1e1c9727e0e8568e3e2768ceae8831e993f22b72..53dd8cba6f0c56125545acd46f1091366949f89b 100644 (file)
@@ -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;