Skip to content

Commit 2a9dfdf

Browse files
avargitster
authored andcommitted
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 <[email protected]> Reviewed-by: Matheus Tavares <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5bd277e commit 2a9dfdf

File tree

3 files changed

+29
-41
lines changed

3 files changed

+29
-41
lines changed

Documentation/config/diff.txt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -178,21 +178,6 @@ diff.<driver>.cachetextconv::
178178
Set this option to true to make the diff driver cache the text
179179
conversion outputs. See linkgit:gitattributes[5] for details.
180180

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-
196181
include::../mergetools-diff.txt[]
197182

198183
diff.indentHeuristic::

Documentation/config/difftool.txt

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
415

516
difftool.<tool>.cmd::
617
Specify the command to invoke the specified diff tool.
@@ -9,6 +20,17 @@ difftool.<tool>.cmd::
920
file containing the contents of the diff pre-image and 'REMOTE'
1021
is set to the name of the temporary file containing the contents
1122
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.
1234

1335
difftool.prompt::
1436
Prompt before each invocation of the diff tool.

Documentation/git-difftool.txt

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -113,33 +113,14 @@ instead. `--no-symlinks` is the default on Windows.
113113

114114
See linkgit:git-diff[1] for the full list of supported options.
115115

116-
CONFIG VARIABLES
117-
----------------
116+
CONFIGURATION
117+
-------------
118118
'git difftool' falls back to 'git mergetool' config variables when the
119119
difftool equivalents have not been defined.
120120

121-
diff.tool::
122-
The default diff tool to use.
121+
include::includes/cmd-config-section-rest.txt[]
123122

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[]
143124

144125
SEE ALSO
145126
--------

0 commit comments

Comments
 (0)