]> git.ipfire.org Git - thirdparty/git.git/commit - revision.c
log: make --regexp-ignore-case work with --perl-regexp
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 20 May 2017 21:42:08 +0000 (21:42 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sat, 20 May 2017 23:25:37 +0000 (08:25 +0900)
commit9e3cbc59d5ec9d1b53c0c2e8c81fa2f3adca5696
treeda402ea83fce460e781ceb7589cfcbd42b50535e
parent9df46763ef1ee46f2dc1de768b1403552779d011
log: make --regexp-ignore-case work with --perl-regexp

Make the --regexp-ignore-case option work with --perl-regexp. This
never worked, and there was no test for this. Fix the bug and add a
test.

When PCRE support was added in commit 63e7e9d8b6 ("git-grep: Learn
PCRE", 2011-05-09) compile_pcre_regexp() would only check
opt->ignore_case, but when the --perl-regexp option was added in
commit 727b6fc3ed ("log --grep: accept --basic-regexp and
--perl-regexp", 2012-10-03) the code didn't set the opt->ignore_case.

Change the test suite to test for -i and --invert-regexp with
basic/extended/perl patterns in addition to fixed, which was the only
patternType that was tested for before in combination with those
options.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c
t/t4202-log.sh