summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-08-04 21:39:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-08-04 21:39:18 (GMT)
commitb422d99658d1fde0a288c48225a9ae5789c7a270 (patch)
tree6aeb3e2b14f1bbcca050161902a72c30ec355c13 /revision.c
parent1e9a4856fb263ad8227456f9ec6b78804afe7cee (diff)
parent8465541e8ce8eaf16e66ab847086779768c18f2d (diff)
downloadgit-b422d99658d1fde0a288c48225a9ae5789c7a270.zip
git-b422d99658d1fde0a288c48225a9ae5789c7a270.tar.gz
git-b422d99658d1fde0a288c48225a9ae5789c7a270.tar.bz2
Merge branch 'jc/grep-commandline-vs-configuration'
"git -c grep.patternType=extended log --basic-regexp" misbehaved because the internal API to access the grep machinery was not designed well. * jc/grep-commandline-vs-configuration: grep: further simplify setting the pattern type
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/revision.c b/revision.c
index edba5b7..15873bf 100644
--- a/revision.c
+++ b/revision.c
@@ -1973,16 +1973,16 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
} else if (!strcmp(arg, "--grep-debug")) {
revs->grep_filter.debug = 1;
} else if (!strcmp(arg, "--basic-regexp")) {
- grep_set_pattern_type_option(GREP_PATTERN_TYPE_BRE, &revs->grep_filter);
+ revs->grep_filter.pattern_type_option = GREP_PATTERN_TYPE_BRE;
} else if (!strcmp(arg, "--extended-regexp") || !strcmp(arg, "-E")) {
- grep_set_pattern_type_option(GREP_PATTERN_TYPE_ERE, &revs->grep_filter);
+ revs->grep_filter.pattern_type_option = GREP_PATTERN_TYPE_ERE;
} else if (!strcmp(arg, "--regexp-ignore-case") || !strcmp(arg, "-i")) {
revs->grep_filter.regflags |= REG_ICASE;
DIFF_OPT_SET(&revs->diffopt, PICKAXE_IGNORE_CASE);
} else if (!strcmp(arg, "--fixed-strings") || !strcmp(arg, "-F")) {
- grep_set_pattern_type_option(GREP_PATTERN_TYPE_FIXED, &revs->grep_filter);
+ revs->grep_filter.pattern_type_option = GREP_PATTERN_TYPE_FIXED;
} else if (!strcmp(arg, "--perl-regexp")) {
- grep_set_pattern_type_option(GREP_PATTERN_TYPE_PCRE, &revs->grep_filter);
+ revs->grep_filter.pattern_type_option = GREP_PATTERN_TYPE_PCRE;
} else if (!strcmp(arg, "--all-match")) {
revs->grep_filter.all_match = 1;
} else if (!strcmp(arg, "--invert-grep")) {