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>
This commit is contained in:
parent
ff4ea6004f
commit
60452a30f5
4
grep.c
4
grep.c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user