git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 1/9] docs: add and use include template for config/* includes

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 31, 2022, 08:41 UTC
Message-ID
<patch-v3-1.9-da21c19978c-20220831T083759Z-avarab@gmail.com>
In-Reply-To
<cover-v3-0.9-00000000000-20220831T083759Z-avarab@gmail.com>

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>
---
 Documentation/Makefile                             | 1 +
 Documentation/git-fsck.txt                         | 2 ++
 Documentation/git-gc.txt                           | 3 +--
 Documentation/git-imap-send.txt                    | 2 ++
 Documentation/git-merge.txt                        | 5 ++++-
 Documentation/git-mergetool.txt                    | 3 +++
 Documentation/git-rebase.txt                       | 2 ++
 Documentation/includes/cmd-config-section-all.txt  | 3 +++
 Documentation/includes/cmd-config-section-rest.txt | 3 +++
 9 files changed, 21 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/includes/cmd-config-section-all.txt
 create mode 100644 Documentation/includes/cmd-config-section-rest.txt
diff --git a/Documentation/Makefile b/Documentation/Makefile
index bd6b6fcb930..849af6da307 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -62,6 +62,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))
diff --git a/Documentation/git-fsck.txt b/Documentation/git-fsck.txt
index 5088783dccb..29318ea957e 100644
--- a/Documentation/git-fsck.txt
+++ b/Documentation/git-fsck.txt
@@ -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
diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index 0af7540a0c8..a65c9aa62d6 100644
--- a/Documentation/git-gc.txt
+++ b/Documentation/git-gc.txt
@@ -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[]
 
diff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt
index 63cf498ce9f..f7b18515141 100644
--- a/Documentation/git-imap-send.txt
+++ b/Documentation/git-imap-send.txt
@@ -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
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index fee1dc2df28..2d6a1391c89 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -383,13 +383,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],
diff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt
index f784027bc13..c44e205629b 100644
--- a/Documentation/git-mergetool.txt
+++ b/Documentation/git-mergetool.txt
@@ -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
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 1877942180e..9cb8931c7ac 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -1259,6 +1259,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
index 00000000000..296a239f2ab
--- /dev/null
+++ b/Documentation/includes/cmd-config-section-all.txt
@@ -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
index 00000000000..b1e7682c1dc
--- /dev/null
+++ b/Documentation/includes/cmd-config-section-rest.txt
@@ -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:
-- 
2.37.3.1406.g184357183a6
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 35 of 56 in “doc: unify config info on some cmds”
  1. 0/3 doc: unify config info on some cmdsMatheus Tavares, Jul 14, 2022
  2. 1/3 doc: grep: unify configuration variables definitionsMatheus Tavares, Jul 14, 2022
  3. Junio C HamanoJul 14, 2022
  4. 2/3 doc: apply: unify configuration variables definitionsMatheus Tavares, Jul 14, 2022
  5. Junio C HamanoJul 14, 2022
  6. 3/3 doc: notes: unify configuration variables definitionsMatheus Tavares, Jul 14, 2022
  7. Junio C HamanoJul 14, 2022
  8. Ævar Arnfjörð BjarmasonJul 14, 2022
  9. Matheus TavaresJul 15, 2022
  10. Ævar Arnfjörð BjarmasonJul 16, 2022
  11. Matheus TavaresJul 17, 2022
  12. 0/9 docs: de-duplicate sections, add more CONFIGURATION sectionsÆvar Arnfjörð Bjarmason, Jul 29, 2022
  13. 1/9 docs: add and use include template for config/* includesÆvar Arnfjörð Bjarmason, Jul 29, 2022
  14. Matheus TavaresJul 30, 2022
  15. 2/9 grep docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Jul 29, 2022
  16. Matheus TavaresJul 30, 2022
  17. 3/9 send-email docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Jul 29, 2022
  18. Matheus TavaresJul 30, 2022
  19. 5/9 notes docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Jul 29, 2022
  20. Matheus TavaresJul 30, 2022
  21. 6/9 difftool docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Jul 29, 2022
  22. Matheus TavaresJul 30, 2022
  23. 4/9 apply docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Jul 29, 2022
  24. Matheus TavaresJul 30, 2022
  25. 7/9 log docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Jul 29, 2022
  26. Matheus TavaresJul 30, 2022
  27. 8/9 docs: add CONFIGURATION sections that map to a built-inÆvar Arnfjörð Bjarmason, Jul 29, 2022
  28. Junio C HamanoJul 29, 2022
  29. 9/9 docs: add CONFIGURATION sections that fuzzy map to built-insÆvar Arnfjörð Bjarmason, Jul 29, 2022
  30. Junio C HamanoJul 29, 2022
  31. Matheus TavaresJul 30, 2022
  32. Junio C HamanoJul 30, 2022
  33. Matheus TavaresJul 30, 2022
  34. 0/9 docs: de-duplicate sections, add more CONFIGURATION sectionsÆvar Arnfjörð Bjarmason, Aug 31, 2022
  35. 1/9 docs: add and use include template for config/* includesÆvar Arnfjörð Bjarmason, Aug 31, 2022
  36. 2/9 grep docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Aug 31, 2022
  37. 4/9 apply docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Aug 31, 2022
  38. 3/9 send-email docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Aug 31, 2022
  39. 5/9 notes docs: de-duplicate and combine configuration sectionsÆvar Arnfjörð Bjarmason, Aug 31, 2022
  40. 6/9 difftool docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Aug 31, 2022
  41. 7/9 log docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Aug 31, 2022
  42. 8/9 docs: add CONFIGURATION sections that map to a built-inÆvar Arnfjörð Bjarmason, Aug 31, 2022
  43. 9/9 docs: add CONFIGURATION sections that fuzzy map to built-insÆvar Arnfjörð Bjarmason, Aug 31, 2022
  44. Matheus TavaresSep 3, 2022
  45. 0/9 docs: de-duplicate sections, add more CONFIGURATION sectionsÆvar Arnfjörð Bjarmason, Sep 7, 2022
  46. 1/9 docs: add and use include template for config/* includesÆvar Arnfjörð Bjarmason, Sep 7, 2022
  47. 2/9 grep docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Sep 7, 2022
  48. 3/9 send-email docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Sep 7, 2022
  49. 4/9 apply docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Sep 7, 2022
  50. 5/9 notes docs: de-duplicate and combine configuration sectionsÆvar Arnfjörð Bjarmason, Sep 7, 2022
  51. 6/9 difftool docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Sep 7, 2022
  52. 7/9 log docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Sep 7, 2022
  53. 8/9 docs: add CONFIGURATION sections that map to a built-inÆvar Arnfjörð Bjarmason, Sep 7, 2022
  54. 9/9 docs: add CONFIGURATION sections that fuzzy map to built-insÆvar Arnfjörð Bjarmason, Sep 7, 2022
  55. Matheus TavaresSep 7, 2022
  56. Junio C HamanoSep 7, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.