Skip to content

Commit f9d931d

Browse files
committed
doc: convert git-difftool manual page to synopsis style
* convert commands to synopsis style * use _<placeholder>_ for arguments * fix conditional text to sentence limits Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
1 parent 270e10a commit f9d931d

File tree

3 files changed

+56
-56
lines changed

3 files changed

+56
-56
lines changed

Documentation/config/difftool.adoc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
diff.tool::
1+
`diff.tool`::
22
Controls which diff tool is used by linkgit:git-difftool[1].
33
This variable overrides the value configured in `merge.tool`.
44
The list below shows the valid built-in values.
55
Any other value is treated as a custom diff tool and requires
6-
that a corresponding difftool.<tool>.cmd variable is defined.
6+
that a corresponding `difftool.<tool>.cmd` variable is defined.
77

8-
diff.guitool::
8+
`diff.guitool`::
99
Controls which diff tool is used by linkgit:git-difftool[1] when
10-
the -g/--gui flag is specified. This variable overrides the value
10+
the `-g`/`--gui` flag is specified. This variable overrides the value
1111
configured in `merge.guitool`. The list below shows the valid
1212
built-in values. Any other value is treated as a custom diff tool
13-
and requires that a corresponding difftool.<guitool>.cmd variable
13+
and requires that a corresponding `difftool.<guitool>.cmd` variable
1414
is defined.
1515

1616
include::{build_dir}/mergetools-diff.adoc[]
1717

18-
difftool.<tool>.cmd::
18+
`difftool.<tool>.cmd`::
1919
Specify the command to invoke the specified diff tool.
2020
The specified command is evaluated in shell with the following
21-
variables available: 'LOCAL' is set to the name of the temporary
22-
file containing the contents of the diff pre-image and 'REMOTE'
21+
variables available: `LOCAL` is set to the name of the temporary
22+
file containing the contents of the diff pre-image and `REMOTE`
2323
is set to the name of the temporary file containing the contents
2424
of the diff post-image.
2525
+
2626
See the `--tool=<tool>` option in linkgit:git-difftool[1] for more details.
2727

28-
difftool.<tool>.path::
28+
`difftool.<tool>.path`::
2929
Override the path for the given tool. This is useful in case
3030
your tool is not in the PATH.
3131

32-
difftool.trustExitCode::
32+
`difftool.trustExitCode`::
3333
Exit difftool if the invoked diff tool returns a non-zero exit status.
3434
+
3535
See the `--trust-exit-code` option in linkgit:git-difftool[1] for more details.
3636

37-
difftool.prompt::
37+
`difftool.prompt`::
3838
Prompt before each invocation of the diff tool.
3939

40-
difftool.guiDefault::
40+
`difftool.guiDefault`::
4141
Set `true` to use the `diff.guitool` by default (equivalent to specifying
4242
the `--gui` argument), or `auto` to select `diff.guitool` or `diff.tool`
4343
depending on the presence of a `DISPLAY` environment variable value. The

Documentation/config/mergetool.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@
5252
if `merge.tool` is configured as _<variant>_), Git will consult
5353
`mergetool.<variant>.layout` to determine the tool's layout. If the
5454
variant-specific configuration is not available, `vimdiff` ' s is used as
55-
fallback. If that too is not available, a default layout with 4 windows
56-
will be used. To configure the layout, see the 'BACKEND SPECIFIC HINTS'
55+
fallback. If that too is not available, a default layout with 4 windows
56+
will be used.
5757
ifdef::git-mergetool[]
58-
section.
58+
To configure the layout, see the 'BACKEND SPECIFIC HINTS' section.
5959
endif::[]
6060
ifndef::git-mergetool[]
61-
section in linkgit:git-mergetool[1].
61+
To configure the layout, see the 'BACKEND SPECIFIC HINTS' section in linkgit:git-mergetool[1].
6262
endif::[]
6363

6464
`mergetool.hideResolved`::

Documentation/git-difftool.adoc

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,64 +7,64 @@ git-difftool - Show changes using common diff tools
77

88
SYNOPSIS
99
--------
10-
[verse]
11-
'git difftool' [<options>] [<commit> [<commit>]] [--] [<path>...]
10+
[synopsis]
11+
git difftool [<options>] [<commit> [<commit>]] [--] [<path>...]
1212

1313
DESCRIPTION
1414
-----------
15-
'git difftool' is a Git command that allows you to compare and edit files
16-
between revisions using common diff tools. 'git difftool' is a frontend
17-
to 'git diff' and accepts the same options and arguments. See
15+
`git difftool` is a Git command that allows you to compare and edit files
16+
between revisions using common diff tools. `git difftool` is a frontend
17+
to `git diff` and accepts the same options and arguments. See
1818
linkgit:git-diff[1].
1919

2020
OPTIONS
2121
-------
22-
-d::
23-
--dir-diff::
22+
`-d`::
23+
`--dir-diff`::
2424
Copy the modified files to a temporary location and perform
2525
a directory diff on them. This mode never prompts before
2626
launching the diff tool.
2727

28-
-y::
29-
--no-prompt::
28+
`-y`::
29+
`--no-prompt`::
3030
Do not prompt before launching a diff tool.
3131

32-
--prompt::
32+
`--prompt`::
3333
Prompt before each invocation of the diff tool.
3434
This is the default behaviour; the option is provided to
3535
override any configuration settings.
3636

37-
--rotate-to=<file>::
38-
Start showing the diff for the given path,
37+
`--rotate-to=<file>`::
38+
Start showing the diff for _<file>_,
3939
the paths before it will move to the end and output.
4040

41-
--skip-to=<file>::
42-
Start showing the diff for the given path, skipping all
41+
`--skip-to=<file>`::
42+
Start showing the diff for _<file>_, skipping all
4343
the paths before it.
4444

45-
-t <tool>::
46-
--tool=<tool>::
47-
Use the diff tool specified by <tool>. Valid values include
45+
`-t <tool>`::
46+
`--tool=<tool>`::
47+
Use the diff tool specified by _<tool>_. Valid values include
4848
emerge, kompare, meld, and vimdiff. Run `git difftool --tool-help`
49-
for the list of valid <tool> settings.
49+
for the list of valid _<tool>_ settings.
5050
+
51-
If a diff tool is not specified, 'git difftool'
51+
If a diff tool is not specified, `git difftool`
5252
will use the configuration variable `diff.tool`. If the
53-
configuration variable `diff.tool` is not set, 'git difftool'
53+
configuration variable `diff.tool` is not set, `git difftool`
5454
will pick a suitable default.
5555
+
5656
You can explicitly provide a full path to the tool by setting the
5757
configuration variable `difftool.<tool>.path`. For example, you
5858
can configure the absolute path to kdiff3 by setting
59-
`difftool.kdiff3.path`. Otherwise, 'git difftool' assumes the
59+
`difftool.kdiff3.path`. Otherwise, `git difftool` assumes the
6060
tool is available in PATH.
6161
+
6262
Instead of running one of the known diff tools,
63-
'git difftool' can be customized to run an alternative program
63+
`git difftool` can be customized to run an alternative program
6464
by specifying the command line to invoke in a configuration
6565
variable `difftool.<tool>.cmd`.
6666
+
67-
When 'git difftool' is invoked with this tool (either through the
67+
When `git difftool` is invoked with this tool (either through the
6868
`-t` or `--tool` option or the `diff.tool` configuration variable)
6969
the configured command line will be invoked with the following
7070
variables available: `$LOCAL` is set to the name of the temporary
@@ -74,30 +74,30 @@ of the diff post-image. `$MERGED` is the name of the file which is
7474
being compared. `$BASE` is provided for compatibility
7575
with custom merge tool commands and has the same value as `$MERGED`.
7676

77-
--tool-help::
77+
`--tool-help`::
7878
Print a list of diff tools that may be used with `--tool`.
7979

80-
--symlinks::
81-
--no-symlinks::
82-
'git difftool''s default behavior is to create symlinks to the
80+
`--symlinks`::
81+
`--no-symlinks`::
82+
`git difftool`'s default behavior is to create symlinks to the
8383
working tree when run in `--dir-diff` mode and the right-hand
8484
side of the comparison yields the same content as the file in
8585
the working tree.
8686
+
87-
Specifying `--no-symlinks` instructs 'git difftool' to create copies
87+
Specifying `--no-symlinks` instructs `git difftool` to create copies
8888
instead. `--no-symlinks` is the default on Windows.
8989
90-
-x <command>::
91-
--extcmd=<command>::
90+
`-x <command>`::
91+
`--extcmd=<command>`::
9292
Specify a custom command for viewing diffs.
93-
'git-difftool' ignores the configured defaults and runs
93+
`git-difftool` ignores the configured defaults and runs
9494
`<command> $LOCAL $REMOTE` when this option is specified.
9595
Additionally, `$BASE` is set in the environment.
9696
97-
-g::
98-
--gui::
99-
--no-gui::
100-
When 'git-difftool' is invoked with the `-g` or `--gui` option
97+
`-g`::
98+
`--gui`::
99+
`--no-gui`::
100+
When `git-difftool` is invoked with the `-g` or `--gui` option
101101
the default diff tool will be read from the configured
102102
`diff.guitool` variable instead of `diff.tool`. This may be
103103
selected automatically using the configuration variable
@@ -106,20 +106,20 @@ instead. `--no-symlinks` is the default on Windows.
106106
fallback in the order of `merge.guitool`, `diff.tool`,
107107
`merge.tool` until a tool is found.
108108
109-
--trust-exit-code::
110-
--no-trust-exit-code::
109+
`--trust-exit-code`::
110+
`--no-trust-exit-code`::
111111
Errors reported by the diff tool are ignored by default.
112-
Use `--trust-exit-code` to make 'git-difftool' exit when an
112+
Use `--trust-exit-code` to make `git-difftool` exit when an
113113
invoked diff tool returns a non-zero exit code.
114114
+
115-
'git-difftool' will forward the exit code of the invoked tool when
115+
`git-difftool` will forward the exit code of the invoked tool when
116116
`--trust-exit-code` is used.
117117
118118
See linkgit:git-diff[1] for the full list of supported options.
119119
120120
CONFIGURATION
121121
-------------
122-
'git difftool' falls back to 'git mergetool' config variables when the
122+
`git difftool` falls back to `git mergetool` config variables when the
123123
difftool equivalents have not been defined.
124124
125125
include::includes/cmd-config-section-rest.adoc[]

0 commit comments

Comments
 (0)