diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-07-14 01:14:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-14 01:14:54 +0200 |
commit | eac97b438c6734304c155604f4c36ac63f29ca6f (patch) | |
tree | f6c3d37a2a519535c5bdb7329d44662cac072f80 /revision.c | |
parent | Sync with v2.13.3 (diff) | |
parent | grep: remove redundant REG_NEWLINE when compiling fixed regex (diff) | |
download | git-eac97b438c6734304c155604f4c36ac63f29ca6f.tar.xz git-eac97b438c6734304c155604f4c36ac63f29ca6f.zip |
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.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/revision.c b/revision.c index 9ff120b305..6603af9444 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; |