diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2016-06-25 07:22:27 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-27 07:31:35 -0700 |
commit | 60452a30f5971c54ecdcd1bd389c1cabbbc844f5 (patch) | |
tree | 8534126e40343a9db961b486e67077e3ad9f6602 /grep.c | |
parent | ff4ea6004fb48146330d663d64a71e7774f059f9 (diff) | |
download | git-60452a30f5971c54ecdcd1bd389c1cabbbc844f5.tar.gz |
grep: break down an "if" stmt in preparation for next changes
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'grep.c')
-rw-r--r-- | grep.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -403,7 +403,9 @@ static void compile_regexp(struct grep_pat *p, struct grep_opt *opt) p->word_regexp = opt->word_regexp; p->ignore_case = opt->ignore_case; - if (opt->fixed || is_fixed(p->pattern, p->patternlen)) + if (opt->fixed) + p->fixed = 1; + else if (is_fixed(p->pattern, p->patternlen)) p->fixed = 1; else p->fixed = 0; |