Thread (26 messages) flat view 26 messages, 2 authors, 2016-06-25
STALE3735d

Revision v1 of 3 in this series.

Revisions (3)
  1. v7 [diff vs current]
  2. v1 current
  3. v2 [diff vs current]

[PATCH 01/11] grep: break down an "if" stmt in preparation for next changes

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-23 16:30:05
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
---
 grep.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/grep.c b/grep.c
index 7b2b96a..609f218 100644
--- 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;
-- 
2.8.2.526.g02eed6d
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help