diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2010-02-03 19:16:30 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-02-03 12:03:40 -0800 |
commit | 79286102ce1620c5b0e73dc4559450eb24918e08 (patch) | |
tree | 5f3473de19fda87e859f20caf64e79f5792890a8 /grep.c | |
parent | 4b7acc186f33037178f4d137b2e6099c67492bde (diff) | |
download | git-79286102ce1620c5b0e73dc4559450eb24918e08.tar.gz |
grep: simplify assignment of ->fixed
After 885d211e, the value of the ->fixed pattern option only depends on
the grep option of the same name. Regex flags don't matter any more,
because fixed mode and regex mode are strictly separated. Thus we can
simply copy the value from struct grep_opt to struct grep_pat, as we do
already for ->word_regexp and ->ignore_case.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'grep.c')
-rw-r--r-- | grep.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -57,11 +57,8 @@ static void compile_regexp(struct grep_pat *p, struct grep_opt *opt) p->word_regexp = opt->word_regexp; p->ignore_case = opt->ignore_case; + p->fixed = opt->fixed; - if (opt->fixed) - p->fixed = 1; - if (opt->regflags & REG_ICASE) - p->fixed = 0; if (p->fixed) return; |