summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-07-13 23:14:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-07-13 23:14:54 (GMT)
commiteac97b438c6734304c155604f4c36ac63f29ca6f (patch)
treef6c3d37a2a519535c5bdb7329d44662cac072f80 /revision.c
parent80145b1e412719c960036c8c62a9e35dd23a5b2d (diff)
parent1ceababc4c1817f86094dab1771e23da1ddaf443 (diff)
downloadgit-eac97b438c6734304c155604f4c36ac63f29ca6f.zip
git-eac97b438c6734304c155604f4c36ac63f29ca6f.tar.gz
git-eac97b438c6734304c155604f4c36ac63f29ca6f.tar.bz2
Merge branch 'ab/grep-lose-opt-regflags'
Code cleanup. * ab/grep-lose-opt-regflags: grep: remove redundant REG_NEWLINE when compiling fixed regex grep: remove regflags from the public grep_opt API grep: remove redundant and verbose re-assignments to 0 grep: remove redundant "fixed" field re-assignment to 0 grep: adjust a redundant grep pattern type assignment grep: remove redundant double assignment to 0
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/revision.c b/revision.c
index 9ff120b..6603af9 100644
--- a/revision.c
+++ b/revision.c
@@ -1362,7 +1362,6 @@ void init_revisions(struct rev_info *revs, const char *prefix)
init_grep_defaults();
grep_init(&revs->grep_filter, prefix);
revs->grep_filter.status_only = 1;
- revs->grep_filter.regflags = REG_NEWLINE;
diff_setup(&revs->diffopt);
if (prefix && !revs->diffopt.prefix) {
@@ -2022,7 +2021,6 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
revs->grep_filter.pattern_type_option = GREP_PATTERN_TYPE_ERE;
} else if (!strcmp(arg, "--regexp-ignore-case") || !strcmp(arg, "-i")) {
revs->grep_filter.ignore_case = 1;
- revs->grep_filter.regflags |= REG_ICASE;
DIFF_OPT_SET(&revs->diffopt, PICKAXE_IGNORE_CASE);
} else if (!strcmp(arg, "--fixed-strings") || !strcmp(arg, "-F")) {
revs->grep_filter.pattern_type_option = GREP_PATTERN_TYPE_FIXED;