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
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user