1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-13 00:16:38 +02:00

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>
This commit is contained in:
Junio C Hamano 2007-11-05 17:16:47 -08:00
parent 62c666a703
commit b67a43bb8f

View File

@ -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)