grep docs: de-duplicate configuration sections

Include the "config/grep.txt" file in "git-grep.txt", instead of repeating an almost identical description of the "grep" configuration variables in two places. There is no loss of information here that isn't shown in the addition to "grep.txt". This change was made by copying the contents of "git-grep.txt"'s version over the "grep.txt" version. Aside from the change "grep.txt" being made here the two were identical. This documentation started being copy/pasted around in b22520a37c8 (grep: allow -E and -n to be turned on by default via configuration, 2011-03-30). After that in e.g. 6453f7b3486 (grep: add grep.fullName config variable, 2014-03-17) they started drifting apart, with only grep.fullName being described in the command documentation. In 434e6e753fe (config.txt: move grep.* to a separate file, 2018-10-27) we gained the include, but didn't do this next step, let's do it now. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Sep 7, 2022 at 10:26 UTC a2811dd7c46a5671735fefb39924569880bb24db
2 files changed +7 -29
Documentation/config/grep.txt
+5 -2
@@ -17,8 +17,11 @@ grep.extendedRegexp::
17 other than 'default'.
18
19 grep.threads::
20 - Number of grep worker threads to use.
21 - See `grep.threads` in linkgit:git-grep[1] for more information.
20 + Number of grep worker threads to use. If unset (or set to 0), Git will
21 + use as many threads as the number of logical cores available.
22 +
23 +grep.fullName::
24 + If set to true, enable `--full-name` option by default.
25
26 grep.fallbackToNoIndex::
27 If set to true, fall back to git grep --no-index if git grep
Documentation/git-grep.txt
+2 -27
@@ -343,34 +343,9 @@ performance in this case, it might be desirable to use `--threads=1`.
343 CONFIGURATION
344 -------------
345
346 -grep.lineNumber::
347 - If set to true, enable `-n` option by default.
348 -
349 -grep.column::
350 - If set to true, enable the `--column` option by default.
351 -
352 -grep.patternType::
353 - Set the default matching behavior. Using a value of 'basic', 'extended',
354 - 'fixed', or 'perl' will enable the `--basic-regexp`, `--extended-regexp`,
355 - `--fixed-strings`, or `--perl-regexp` option accordingly, while the
356 - value 'default' will return to the default matching behavior.
357 -
358 -grep.extendedRegexp::
359 - If set to true, enable `--extended-regexp` option by default. This
360 - option is ignored when the `grep.patternType` option is set to a value
361 - other than 'default'.
362 -
363 -grep.threads::
364 - Number of grep worker threads to use. If unset (or set to 0), Git will
365 - use as many threads as the number of logical cores available.
366 -
367 -grep.fullName::
368 - If set to true, enable `--full-name` option by default.
369 -
370 -grep.fallbackToNoIndex::
371 - If set to true, fall back to git grep --no-index if git grep
372 - is executed outside of a git repository. Defaults to false.
346 +include::includes/cmd-config-section-all.txt[]
347
348 +include::config/grep.txt[]
349
350 GIT
351 ---