mirror of
https://github.com/git/git.git
synced 2024-11-24 18:33:43 +08:00
91028f7659
We documented that with grep.patternType set to default, the "git grep" command returns to "the default matching behavior" in84befcd0
(grep: add a grep.patternType configuration setting, 2012-08-03). The grep.extendedRegexp configuration variable was the only way to configure the behavior before that, afterb22520a3
(grep: allow -E and -n to be turned on by default via configuration, 2011-03-30) introduced it. It is understandable that we referred to the behavior that honors the older configuration variable as "the default matching" behavior. It is fairly clear in its log message: 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. But when the paragraph is read in isolation by a new person who is not aware of that backstory (which is the synonym for "most users"), the "default matching behavior" can be read as "how 'git grep' behaves without any configuration variables or options", which is "match the pattern as BRE". Clarify what the passage means by elaborating what the phrase "default matching behavior" wanted to mean. Helped-by: Johannes Altmanninger <aclopte@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
26 lines
935 B
Plaintext
26 lines
935 B
Plaintext
grep.lineNumber::
|
|
If set to true, enable `-n` option by default.
|
|
|
|
grep.column::
|
|
If set to true, enable the `--column` option by default.
|
|
|
|
grep.patternType::
|
|
Set the default matching behavior. Using a value of 'basic', 'extended',
|
|
'fixed', or 'perl' will enable the `--basic-regexp`, `--extended-regexp`,
|
|
`--fixed-strings`, or `--perl-regexp` option accordingly, while the
|
|
value 'default' will use the `grep.extendedRegexp` option to choose
|
|
between 'basic' and 'extended'.
|
|
|
|
grep.extendedRegexp::
|
|
If set to true, enable `--extended-regexp` option by default. This
|
|
option is ignored when the `grep.patternType` option is set to a value
|
|
other than 'default'.
|
|
|
|
grep.threads::
|
|
Number of grep worker threads to use.
|
|
See `grep.threads` in linkgit:git-grep[1] for more information.
|
|
|
|
grep.fallbackToNoIndex::
|
|
If set to true, fall back to git grep --no-index if git grep
|
|
is executed outside of a git repository. Defaults to false.
|