Mark win32's pthread_exit() as NORETURN
[gitweb.git] / builtin / grep.c
index 4229cae390ddddcc74f3506dc892ed02b45d7eae..3ba35ecf935f9462d8bb4340837f57e0e7219d05 100644 (file)
@@ -375,7 +375,7 @@ static int grep_cache(struct grep_opt *opt, const struct pathspec *pathspec, int
 
        for (nr = 0; nr < active_nr; nr++) {
                const struct cache_entry *ce = active_cache[nr];
-               if (!S_ISREG(ce->ce_mode))
+               if (!S_ISREG(ce->ce_mode) || ce_intent_to_add(ce))
                        continue;
                if (!ce_path_match(ce, pathspec, NULL))
                        continue;