Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
grep with unmerged index
author
Junio C Hamano
<gitster@pobox.com>
Tue, 6 Nov 2007 01:16:47 +0000
(17:16 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 6 Nov 2007 02:57:58 +0000
(18:57 -0800)
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>
builtin-grep.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
62c666a
)
diff --git
a/builtin-grep.c
b/builtin-grep.c
index c7b45c4d58dd718204e815363a77747d2d5aebb3..185876b0a6dc191bb5adc22cd5c2f012cd70e479 100644
(file)
--- a/
builtin-grep.c
+++ b/
builtin-grep.c
@@
-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)