Skip to content

Commit 18d89fe

Browse files
avargitster
authored andcommitted
docs: add and use include template for config/* includes
In b6a8d09 (gc docs: include the "gc.*" section from "config" in "gc", 2019-04-07) the "git gc" documentation was made to include the config/gc.txt in its "CONFIGURATION" section. We do that in several other places, but "git gc" was the only one with a blurb above the include to orient the reader. We don't want readers to carefully scrutinize "git-config(1)" and "git-gc(1)" looking for discrepancies, instead we should tell them that the latter includes a part of the former. This change formalizes that wording in two new templates to be included, one for the "git gc" case where the entire section is included from "git-config(1)", and another for when the inclusion of "git-config(1)" follows discussion unique to that documentation. In order to use that re-arrange the order of those being discussed in the "git-merge(1)" documentation. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Reviewed-by: Matheus Tavares <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 23b219f commit 18d89fe

File tree

9 files changed

+21
-3
lines changed

9 files changed

+21
-3
lines changed

Documentation/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ HOWTO_TXT += $(wildcard howto/*.txt)
5151

5252
DOC_DEP_TXT += $(wildcard *.txt)
5353
DOC_DEP_TXT += $(wildcard config/*.txt)
54+
DOC_DEP_TXT += $(wildcard includes/*.txt)
5455

5556
ifdef MAN_FILTER
5657
MAN_TXT = $(filter $(MAN_FILTER),$(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT))

Documentation/git-fsck.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ care about this output and want to speed it up further.
107107
CONFIGURATION
108108
-------------
109109

110+
include::includes/cmd-config-section-all.txt[]
111+
110112
include::config/fsck.txt[]
111113

112114
DISCUSSION

Documentation/git-gc.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ users and their repositories.
110110
CONFIGURATION
111111
-------------
112112

113-
The below documentation is the same as what's found in
114-
linkgit:git-config[1]:
113+
include::includes/cmd-config-section-all.txt[]
115114

116115
include::config/gc.txt[]
117116

Documentation/git-imap-send.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ CONFIGURATION
5454
To use the tool, `imap.folder` and either `imap.tunnel` or `imap.host` must be set
5555
to appropriate values.
5656

57+
include::includes/cmd-config-section-rest.txt[]
58+
5759
include::config/imap.txt[]
5860

5961
EXAMPLES

Documentation/git-merge.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,13 +386,16 @@ include::merge-strategies.txt[]
386386

387387
CONFIGURATION
388388
-------------
389-
include::config/merge.txt[]
390389

391390
branch.<name>.mergeOptions::
392391
Sets default options for merging into branch <name>. The syntax and
393392
supported options are the same as those of 'git merge', but option
394393
values containing whitespace characters are currently not supported.
395394

395+
include::includes/cmd-config-section-rest.txt[]
396+
397+
include::config/merge.txt[]
398+
396399
SEE ALSO
397400
--------
398401
linkgit:git-fmt-merge-msg[1], linkgit:git-pull[1],

Documentation/git-mergetool.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ success of the resolution after the custom tool has exited.
102102
CONFIGURATION
103103
-------------
104104
:git-mergetool: 1
105+
106+
include::includes/cmd-config-section-all.txt[]
107+
105108
include::config/mergetool.txt[]
106109

107110
TEMPORARY FILES

Documentation/git-rebase.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,6 +1252,8 @@ merge cmake
12521252
CONFIGURATION
12531253
-------------
12541254

1255+
include::includes/cmd-config-section-all.txt[]
1256+
12551257
include::config/rebase.txt[]
12561258
include::config/sequencer.txt[]
12571259

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Everything below this line in this section is selectively included
2+
from the linkgit:git-config[1] documentation. The content is the same
3+
as what's found there:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Everything above this line in this section isn't included from the
2+
linkgit:git-config[1] documentation. The content that follows is the
3+
same as what's found there:

0 commit comments

Comments
 (0)