difftool docs: de-duplicate configuration sections

Include the "config/difftool.txt" file in "git-difftool.txt", and move the relevant part of git-difftool(1) configuration from "config/diff.txt" to config/difftool.txt". Doing this is slightly odd, as we usually discuss configuration in alphabetical order, but by doing it we're able to include the full set of configuration used by git-difftool(1) (and only that configuration) in its own 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>

Ævar Arnfjörð Bjarmason committed Sep 7, 2022 at 10:27 UTC 2a9dfdf260db304763e4db159921565feeedef40
3 files changed +29 -41
Documentation/config/diff.txt
-15
@@ -178,21 +178,6 @@ diff.<driver>.cachetextconv::
178 Set this option to true to make the diff driver cache the text
179 conversion outputs. See linkgit:gitattributes[5] for details.
180
181 -diff.tool::
182 - Controls which diff tool is used by linkgit:git-difftool[1].
183 - This variable overrides the value configured in `merge.tool`.
184 - The list below shows the valid built-in values.
185 - Any other value is treated as a custom diff tool and requires
186 - that a corresponding difftool.<tool>.cmd variable is defined.
187 -
188 -diff.guitool::
189 - Controls which diff tool is used by linkgit:git-difftool[1] when
190 - the -g/--gui flag is specified. This variable overrides the value
191 - configured in `merge.guitool`. The list below shows the valid
192 - built-in values. Any other value is treated as a custom diff tool
193 - and requires that a corresponding difftool.<guitool>.cmd variable
194 - is defined.
195 -
181 include::../mergetools-diff.txt[]
182
183 diff.indentHeuristic::
Documentation/config/difftool.txt
+25 -3
@@ -1,6 +1,17 @@
1 -difftool.<tool>.path::
2 - Override the path for the given tool. This is useful in case
3 - your tool is not in the PATH.
1 +diff.tool::
2 + Controls which diff tool is used by linkgit:git-difftool[1].
3 + This variable overrides the value configured in `merge.tool`.
4 + The list below shows the valid built-in values.
5 + Any other value is treated as a custom diff tool and requires
6 + that a corresponding difftool.<tool>.cmd variable is defined.
7 +
8 +diff.guitool::
9 + Controls which diff tool is used by linkgit:git-difftool[1] when
10 + the -g/--gui flag is specified. This variable overrides the value
11 + configured in `merge.guitool`. The list below shows the valid
12 + built-in values. Any other value is treated as a custom diff tool
13 + and requires that a corresponding difftool.<guitool>.cmd variable
14 + is defined.
15
16 difftool.<tool>.cmd::
17 Specify the command to invoke the specified diff tool.
@@ -9,6 +20,17 @@ difftool.<tool>.cmd::
20 file containing the contents of the diff pre-image and 'REMOTE'
21 is set to the name of the temporary file containing the contents
22 of the diff post-image.
23 ++
24 +See the `--tool=<tool>` option in linkgit:git-difftool[1] for more details.
25 +
26 +difftool.<tool>.path::
27 + Override the path for the given tool. This is useful in case
28 + your tool is not in the PATH.
29 +
30 +difftool.trustExitCode::
31 + Exit difftool if the invoked diff tool returns a non-zero exit status.
32 ++
33 +See the `--trust-exit-code` option in linkgit:git-difftool[1] for more details.
34
35 difftool.prompt::
36 Prompt before each invocation of the diff tool.
Documentation/git-difftool.txt
+4 -23
@@ -113,33 +113,14 @@ instead. `--no-symlinks` is the default on Windows.
113
114 See linkgit:git-diff[1] for the full list of supported options.
115
116 -CONFIG VARIABLES
117 -----------------
116 +CONFIGURATION
117 +-------------
118 'git difftool' falls back to 'git mergetool' config variables when the
119 difftool equivalents have not been defined.
120
121 -diff.tool::
122 - The default diff tool to use.
121 +include::includes/cmd-config-section-rest.txt[]
122
124 -diff.guitool::
125 - The default diff tool to use when `--gui` is specified.
126 -
127 -difftool.<tool>.path::
128 - Override the path for the given tool. This is useful in case
129 - your tool is not in the PATH.
130 -
131 -difftool.<tool>.cmd::
132 - Specify the command to invoke the specified diff tool.
133 -+
134 -See the `--tool=<tool>` option above for more details.
135 -
136 -difftool.prompt::
137 - Prompt before each invocation of the diff tool.
138 -
139 -difftool.trustExitCode::
140 - Exit difftool if the invoked diff tool returns a non-zero exit status.
141 -+
142 -See the `--trust-exit-code` option above for more details.
123 +include::config/difftool.txt[]
124
125 SEE ALSO
126 --------