Skip to content

Commit b67a43b

Browse files
committed
grep with unmerged index
We called flush_grep() every time we saw an unmerged entry in the index. If we happen to find an unmerged entry before we saw more than two paths, we incorrectly declared that the user had too many non-paths options in front. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 62c666a commit b67a43b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin-grep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ static int external_grep(struct grep_opt *opt, const char **paths, int cached)
343343
memcpy(name + 2, ce->name, len + 1);
344344
}
345345
argv[argc++] = name;
346-
if (argc < MAXARGS && !ce_stage(ce))
346+
if (argc < MAXARGS)
347347
continue;
348348
status = flush_grep(opt, argc, nr, argv, &kept);
349349
if (0 < status)

0 commit comments

Comments
 (0)