]> git.ipfire.org Git - thirdparty/git.git/commitdiff
docs: add and use include template for config/* includes
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 7 Sep 2022 08:26:57 +0000 (10:26 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 7 Sep 2022 16:46:05 +0000 (09:46 -0700)
In b6a8d09f6d8 (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 <avarab@gmail.com>
Reviewed-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/Makefile
Documentation/git-fsck.txt
Documentation/git-gc.txt
Documentation/git-imap-send.txt
Documentation/git-merge.txt
Documentation/git-mergetool.txt
Documentation/git-rebase.txt
Documentation/includes/cmd-config-section-all.txt [new file with mode: 0644]
Documentation/includes/cmd-config-section-rest.txt [new file with mode: 0644]

index 4f801f4e4c9470c42ae7933a68970a4984bc54b5..85b2088b888f942dd278d00a2a5ab234e8b58743 100644 (file)
@@ -51,6 +51,7 @@ HOWTO_TXT += $(wildcard howto/*.txt)
 
 DOC_DEP_TXT += $(wildcard *.txt)
 DOC_DEP_TXT += $(wildcard config/*.txt)
+DOC_DEP_TXT += $(wildcard includes/*.txt)
 
 ifdef MAN_FILTER
 MAN_TXT = $(filter $(MAN_FILTER),$(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT))
index 5088783dccb923bac475d4d0a8419d57b27ecfb0..29318ea957ef8fda0aee500d795c6f04fce0cae2 100644 (file)
@@ -107,6 +107,8 @@ care about this output and want to speed it up further.
 CONFIGURATION
 -------------
 
+include::includes/cmd-config-section-all.txt[]
+
 include::config/fsck.txt[]
 
 DISCUSSION
index 0af7540a0c8b1b7b0df703b7b089dcc74e3c3267..a65c9aa62d64112dfd03335af82a680e54d00c58 100644 (file)
@@ -110,8 +110,7 @@ users and their repositories.
 CONFIGURATION
 -------------
 
-The below documentation is the same as what's found in
-linkgit:git-config[1]:
+include::includes/cmd-config-section-all.txt[]
 
 include::config/gc.txt[]
 
index 63cf498ce9f276878ea8a7bd79362a423210d030..f7b185151415b54b08fb21f54062842baf64e636 100644 (file)
@@ -54,6 +54,8 @@ CONFIGURATION
 To use the tool, `imap.folder` and either `imap.tunnel` or `imap.host` must be set
 to appropriate values.
 
+include::includes/cmd-config-section-rest.txt[]
+
 include::config/imap.txt[]
 
 EXAMPLES
index 3125473cc1d19140cf54f5286106b86823a9b91f..6e5db8ef4c5fe017d035ab1a19c64d2d4f187744 100644 (file)
@@ -386,13 +386,16 @@ include::merge-strategies.txt[]
 
 CONFIGURATION
 -------------
-include::config/merge.txt[]
 
 branch.<name>.mergeOptions::
        Sets default options for merging into branch <name>. The syntax and
        supported options are the same as those of 'git merge', but option
        values containing whitespace characters are currently not supported.
 
+include::includes/cmd-config-section-rest.txt[]
+
+include::config/merge.txt[]
+
 SEE ALSO
 --------
 linkgit:git-fmt-merge-msg[1], linkgit:git-pull[1],
index f784027bc13724712f902b115abd98bc1c04b43f..c44e205629bf521fbb97c2b49493fcc9b9450932 100644 (file)
@@ -102,6 +102,9 @@ success of the resolution after the custom tool has exited.
 CONFIGURATION
 -------------
 :git-mergetool: 1
+
+include::includes/cmd-config-section-all.txt[]
+
 include::config/mergetool.txt[]
 
 TEMPORARY FILES
index a872ab0fbd1a9a615dd8d370bb5cdd74f7bab918..d9b6af8a571e0d83510a94f217b21c670660055c 100644 (file)
@@ -1252,6 +1252,8 @@ merge cmake
 CONFIGURATION
 -------------
 
+include::includes/cmd-config-section-all.txt[]
+
 include::config/rebase.txt[]
 include::config/sequencer.txt[]
 
diff --git a/Documentation/includes/cmd-config-section-all.txt b/Documentation/includes/cmd-config-section-all.txt
new file mode 100644 (file)
index 0000000..296a239
--- /dev/null
@@ -0,0 +1,3 @@
+Everything below this line in this section is selectively included
+from the linkgit:git-config[1] documentation. The content is the same
+as what's found there:
diff --git a/Documentation/includes/cmd-config-section-rest.txt b/Documentation/includes/cmd-config-section-rest.txt
new file mode 100644 (file)
index 0000000..b1e7682
--- /dev/null
@@ -0,0 +1,3 @@
+Everything above this line in this section isn't included from the
+linkgit:git-config[1] documentation. The content that follows is the
+same as what's found there: