@matheusbsbs / matheus-bagliano / commits / b67a43bb8f
Fork 0

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 <gitster@pobox.com>

Junio C Hamano committed Nov 5, 2007 at 17:16 UTC b67a43bb8f4a8ffb64f26b7351c3b0b90239696a
1 file changed +1 -1
builtin-grep.c
+1 -1
@@ -343,7 +343,7 @@ static int external_grep(struct grep_opt *opt, const char **paths, int cached)
343 memcpy(name + 2, ce->name, len + 1);
344 }
345 argv[argc++] = name;
346 - if (argc < MAXARGS && !ce_stage(ce))
346 + if (argc < MAXARGS)
347 continue;
348 status = flush_grep(opt, argc, nr, argv, &kept);
349 if (0 < status)