Skip to content

Commit

Permalink
grep with unmerged index
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Nov 6, 2007
1 parent 62c666a commit b67a43b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-grep.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ static int external_grep(struct grep_opt *opt, const char **paths, int cached)
memcpy(name + 2, ce->name, len + 1);
}
argv[argc++] = name;
if (argc < MAXARGS && !ce_stage(ce))
if (argc < MAXARGS)
continue;
status = flush_grep(opt, argc, nr, argv, &kept);
if (0 < status)
Expand Down

0 comments on commit b67a43b

Please sign in to comment.