grep: fix erroneously copy/pasted variable in check/assert pattern
[gitweb.git] / revision.c
index c96265d89dea5f1df6094621e68a164239e4f9f6..dea4d841b5024a10f2a485de065f3621bdb3185b 100644 (file)
@@ -1996,7 +1996,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
                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;
-       } else if (!strcmp(arg, "--perl-regexp")) {
+       } else if (!strcmp(arg, "--perl-regexp") || !strcmp(arg, "-P")) {
                revs->grep_filter.pattern_type_option = GREP_PATTERN_TYPE_PCRE;
        } else if (!strcmp(arg, "--all-match")) {
                revs->grep_filter.all_match = 1;