Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
grep: break down an "if" stmt in preparation for next changes
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sat, 25 Jun 2016 05:22:27 +0000
(07:22 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 27 Jun 2016 14:31:35 +0000
(07:31 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
ff4ea60
)
diff --git
a/grep.c
b/grep.c
index 7b2b96a4376efe51e41f9311c6fa5250a2dcd13d..f430d7e75622314e5bb3aabca3d384ed214be694 100644
(file)
--- a/
grep.c
+++ b/
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;