]> git.ipfire.org Git - thirdparty/git.git/commit - grep.h
grep: add a grep.patternType configuration setting
authorJ Smith <dark.panda@gmail.com>
Fri, 3 Aug 2012 14:53:50 +0000 (10:53 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 3 Aug 2012 16:58:02 +0000 (09:58 -0700)
commit84befcd0a4a074e2ae191c32be09d2e82d5db114
treec33fa66c5a950c3fc572a87167a1b0d4b1cc9036
parent0e4c8822e98e27c3c63125570c8bcbf0a8fd34da
grep: add a grep.patternType configuration setting

The grep.extendedRegexp configuration setting enables the -E flag on grep
by default but there are no equivalents for the -G, -F and -P flags.

Rather than adding an additional setting for grep.fooRegexp for current
and future pattern matching options, add a grep.patternType setting that
can accept appropriate values for modifying the default grep pattern
matching behavior. The current values are "basic", "extended", "fixed",
"perl" and "default" for setting -G, -E, -F, -P and the default behavior
respectively.

When grep.patternType is set to a value other than "default", the
grep.extendedRegexp setting is ignored. The value of "default" restores
the current default behavior, including the grep.extendedRegexp
behavior.

Signed-off-by: J Smith <dark.panda@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt
Documentation/git-grep.txt
builtin/grep.c
grep.h
t/t7810-grep.sh