docs: add CONFIGURATION sections that map to a built-in

Add a CONFIGURATION section to the documentation of various built-ins, for those cases where the relevant config/NAME.txt describes configuration that is only used by the relevant built-in documented in git-NAME.txt. Subsequent commits will handle more complex cases. 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:27 UTC 16f6b0d1aa598d665ada827cf89bda2112853680
13 files changed +88
Documentation/git-add.txt
+7
@@ -431,6 +431,13 @@ they will make the patch impossible to apply:
431 * deleting context or removal lines
432 * modifying the contents of context or removal lines
433
434 +CONFIGURATION
435 +-------------
436 +
437 +include::includes/cmd-config-section-all.txt[]
438 +
439 +include::config/add.txt[]
440 +
441 SEE ALSO
442 --------
443 linkgit:git-status[1]
Documentation/git-am.txt
+7
@@ -261,6 +261,13 @@ This command can run `applypatch-msg`, `pre-applypatch`,
261 and `post-applypatch` hooks. See linkgit:githooks[5] for more
262 information.
263
264 +CONFIGURATION
265 +-------------
266 +
267 +include::includes/cmd-config-section-all.txt[]
268 +
269 +include::config/am.txt[]
270 +
271 SEE ALSO
272 --------
273 linkgit:git-apply[1].
Documentation/git-clean.txt
+7
@@ -133,6 +133,13 @@ help::
133
134 Show brief usage of interactive git-clean.
135
136 +CONFIGURATION
137 +-------------
138 +
139 +include::includes/cmd-config-section-all.txt[]
140 +
141 +include::config/clean.txt[]
142 +
143 SEE ALSO
144 --------
145 linkgit:gitignore[5]
Documentation/git-clone.txt
+7
@@ -363,6 +363,13 @@ $ cd my-linux
363 $ git clone --bare -l /home/proj/.git /pub/scm/proj.git
364 ------------
365
366 +CONFIGURATION
367 +-------------
368 +
369 +include::includes/cmd-config-section-all.txt[]
370 +
371 +include::config/clone.txt[]
372 +
373
374 GIT
375 ---
Documentation/git-commit-graph.txt
+7
@@ -142,6 +142,13 @@ $ git show-ref -s | git commit-graph write --stdin-commits
142 $ git rev-parse HEAD | git commit-graph write --stdin-commits --append
143 ------------------------------------------------
144
145 +CONFIGURATION
146 +-------------
147 +
148 +include::includes/cmd-config-section-all.txt[]
149 +
150 +include::config/commitgraph.txt[]
151 +
152
153 GIT
154 ---
Documentation/git-commit.txt
+4
@@ -557,6 +557,10 @@ The editor used to edit the commit log message will be chosen from the
557 `VISUAL` environment variable, or the `EDITOR` environment variable (in that
558 order). See linkgit:git-var[1] for details.
559
560 +include::includes/cmd-config-section-rest.txt[]
561 +
562 +include::config/commit.txt[]
563 +
564 HOOKS
565 -----
566 This command can run `commit-msg`, `prepare-commit-msg`, `pre-commit`,
Documentation/git-fast-import.txt
+7
@@ -1564,6 +1564,13 @@ operator can use this facility to peek at the objects and refs from an
1564 import in progress, at the cost of some added running time and worse
1565 compression.
1566
1567 +CONFIGURATION
1568 +-------------
1569 +
1570 +include::includes/cmd-config-section-all.txt[]
1571 +
1572 +include::config/fastimport.txt[]
1573 +
1574 SEE ALSO
1575 --------
1576 linkgit:git-fast-export[1]
Documentation/git-mailinfo.txt
+7
@@ -115,6 +115,13 @@ If no such configuration option has been set, `warn` will be used.
115 <patch>::
116 The patch extracted from e-mail.
117
118 +CONFIGURATION
119 +-------------
120 +
121 +include::includes/cmd-config-section-all.txt[]
122 +
123 +include::config/mailinfo.txt[]
124 +
125 GIT
126 ---
127 Part of the linkgit:git[1] suite
Documentation/git-maintenance.txt
+7
@@ -397,6 +397,13 @@ If you want to customize the background tasks, please rename the tasks
397 so future calls to `git maintenance (start|stop)` do not overwrite your
398 custom tasks.
399
400 +CONFIGURATION
401 +-------------
402 +
403 +include::includes/cmd-config-section-all.txt[]
404 +
405 +include::config/maintenance.txt[]
406 +
407
408 GIT
409 ---
Documentation/git-push.txt
+7
@@ -692,6 +692,13 @@ a `git gc` command on the origin repository.
692
693 include::transfer-data-leaks.txt[]
694
695 +CONFIGURATION
696 +-------------
697 +
698 +include::includes/cmd-config-section-all.txt[]
699 +
700 +include::config/push.txt[]
701 +
702 GIT
703 ---
704 Part of the linkgit:git[1] suite
Documentation/git-revert.txt
+7
@@ -145,6 +145,13 @@ EXAMPLES
145 changes. The revert only modifies the working tree and the
146 index.
147
148 +CONFIGURATION
149 +-------------
150 +
151 +include::includes/cmd-config-section-all.txt[]
152 +
153 +include::config/revert.txt[]
154 +
155 SEE ALSO
156 --------
157 linkgit:git-cherry-pick[1]
Documentation/git-show-branch.txt
+7
@@ -199,6 +199,13 @@ shows 10 reflog entries going back from the tip as of 1 hour ago.
199 Without `--list`, the output also shows how these tips are
200 topologically related with each other.
201
202 +CONFIGURATION
203 +-------------
204 +
205 +include::includes/cmd-config-section-all.txt[]
206 +
207 +include::config/showbranch.txt[]
208 +
209 GIT
210 ---
211 Part of the linkgit:git[1] suite
Documentation/git-stash.txt
+7
@@ -382,6 +382,13 @@ grep commit | cut -d\ -f3 |
382 xargs git log --merges --no-walk --grep=WIP
383 ----------------------------------------------------------------
384
385 +CONFIGURATION
386 +-------------
387 +
388 +include::includes/cmd-config-section-all.txt[]
389 +
390 +include::config/stash.txt[]
391 +
392
393 SEE ALSO
394 --------