summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b48fb5b)
raw | patch | inline | side by side (parent: b48fb5b)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 27 Sep 2006 23:42:53 +0000 (16:42 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 27 Sep 2006 23:42:53 +0000 (16:42 -0700) |
"git grep --fixed-strings -e GIT --and -e VERSION .gitignore"
misbehaved because we did not notice this needs to grab lines
that have the given two fixed strings at the same time.
Signed-off-by: Junio C Hamano <junkio@cox.net>
misbehaved because we did not notice this needs to grab lines
that have the given two fixed strings at the same time.
Signed-off-by: Junio C Hamano <junkio@cox.net>
grep.c | patch | blob | history |
index 2c740bde50635df96a1ac45e4dd0f2179ea69519..c411ddd4d52e2aa68edd979733dd0b15f51d5f32 100644 (file)
--- a/grep.c
+++ b/grep.c
{
struct grep_pat *p;
- if (opt->fixed)
- return;
-
- /* First compile regexps */
for (p = opt->pattern_list; p; p = p->next) {
switch (p->token) {
case GREP_PATTERN: /* atom */
case GREP_PATTERN_HEAD:
case GREP_PATTERN_BODY:
- compile_regexp(p, opt);
+ if (!opt->fixed)
+ compile_regexp(p, opt);
break;
default:
opt->extended = 1;