Skip to content

Commit d30c5cc

Browse files
jnavilagitster
authored andcommitted
doc: convert git-mergetool options to new synopsis style
- Use _<placeholder>_ instead of <placeholder> in the description - Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. Signed-off-by: Jean-Noël Avila <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1654396 commit d30c5cc

File tree

2 files changed

+35
-35
lines changed

2 files changed

+35
-35
lines changed

Documentation/config/mergetool.adoc

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
mergetool.<tool>.path::
1+
`mergetool.<tool>.path`::
22
Override the path for the given tool. This is useful in case
3-
your tool is not in the PATH.
3+
your tool is not in the `$PATH`.
44

5-
mergetool.<tool>.cmd::
5+
`mergetool.<tool>.cmd`::
66
Specify the command to invoke the specified merge tool. The
77
specified command is evaluated in shell with the following
8-
variables available: 'BASE' is the name of a temporary file
8+
variables available: `BASE` is the name of a temporary file
99
containing the common base of the files to be merged, if available;
10-
'LOCAL' is the name of a temporary file containing the contents of
11-
the file on the current branch; 'REMOTE' is the name of a temporary
10+
`LOCAL` is the name of a temporary file containing the contents of
11+
the file on the current branch; `REMOTE` is the name of a temporary
1212
file containing the contents of the file from the branch being
13-
merged; 'MERGED' contains the name of the file to which the merge
13+
merged; `MERGED` contains the name of the file to which the merge
1414
tool should write the results of a successful merge.
1515

16-
mergetool.<tool>.hideResolved::
16+
`mergetool.<tool>.hideResolved`::
1717
Allows the user to override the global `mergetool.hideResolved` value
1818
for a specific tool. See `mergetool.hideResolved` for the full
1919
description.
2020

21-
mergetool.<tool>.trustExitCode::
21+
`mergetool.<tool>.trustExitCode`::
2222
For a custom merge command, specify whether the exit code of
2323
the merge command can be used to determine whether the merge was
2424
successful. If this is not set to true then the merge target file
2525
timestamp is checked, and the merge is assumed to have been successful
2626
if the file has been updated; otherwise, the user is prompted to
2727
indicate the success of the merge.
2828

29-
mergetool.meld.hasOutput::
29+
`mergetool.meld.hasOutput`::
3030
Older versions of `meld` do not support the `--output` option.
3131
Git will attempt to detect whether `meld` supports `--output`
3232
by inspecting the output of `meld --help`. Configuring
@@ -35,7 +35,7 @@ mergetool.meld.hasOutput::
3535
to `true` tells Git to unconditionally use the `--output` option,
3636
and `false` avoids using `--output`.
3737

38-
mergetool.meld.useAutoMerge::
38+
`mergetool.meld.useAutoMerge`::
3939
When the `--auto-merge` is given, meld will merge all non-conflicting
4040
parts automatically, highlight the conflicting parts, and wait for
4141
user decision. Setting `mergetool.meld.useAutoMerge` to `true` tells
@@ -45,55 +45,55 @@ mergetool.meld.useAutoMerge::
4545
value of `false` avoids using `--auto-merge` altogether, and is the
4646
default value.
4747

48-
mergetool.<vimdiff variant>.layout::
49-
Configure the split window layout for vimdiff's `<variant>`, which is any of `vimdiff`,
48+
`mergetool.<variant>.layout`::
49+
Configure the split window layout for vimdiff's _<variant>_, which is any of `vimdiff`,
5050
`nvimdiff`, `gvimdiff`.
5151
Upon launching `git mergetool` with `--tool=<variant>` (or without `--tool`
52-
if `merge.tool` is configured as `<variant>`), Git will consult
52+
if `merge.tool` is configured as _<variant>_), Git will consult
5353
`mergetool.<variant>.layout` to determine the tool's layout. If the
54-
variant-specific configuration is not available, `vimdiff`'s is used as
54+
variant-specific configuration is not available, `vimdiff` ' s is used as
5555
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`
56+
will be used. To configure the layout, see the 'BACKEND SPECIFIC HINTS'
5757
ifdef::git-mergetool[]
5858
section.
5959
endif::[]
6060
ifndef::git-mergetool[]
6161
section in linkgit:git-mergetool[1].
6262
endif::[]
6363

64-
mergetool.hideResolved::
64+
`mergetool.hideResolved`::
6565
During a merge, Git will automatically resolve as many conflicts as
66-
possible and write the 'MERGED' file containing conflict markers around
67-
any conflicts that it cannot resolve; 'LOCAL' and 'REMOTE' normally
68-
represent the versions of the file from before Git's conflict
69-
resolution. This flag causes 'LOCAL' and 'REMOTE' to be overwritten so
66+
possible and write the `$MERGED` file containing conflict markers around
67+
any conflicts that it cannot resolve; `$LOCAL` and `$REMOTE` normally
68+
are the versions of the file from before Git`s conflict
69+
resolution. This flag causes `$LOCAL` and `$REMOTE` to be overwritten so
7070
that only the unresolved conflicts are presented to the merge tool. Can
7171
be configured per-tool via the `mergetool.<tool>.hideResolved`
7272
configuration variable. Defaults to `false`.
7373

74-
mergetool.keepBackup::
74+
`mergetool.keepBackup`::
7575
After performing a merge, the original file with conflict markers
7676
can be saved as a file with a `.orig` extension. If this variable
7777
is set to `false` then this file is not preserved. Defaults to
7878
`true` (i.e. keep the backup files).
7979

80-
mergetool.keepTemporaries::
80+
`mergetool.keepTemporaries`::
8181
When invoking a custom merge tool, Git uses a set of temporary
8282
files to pass to the tool. If the tool returns an error and this
8383
variable is set to `true`, then these temporary files will be
8484
preserved; otherwise, they will be removed after the tool has
8585
exited. Defaults to `false`.
8686

87-
mergetool.writeToTemp::
88-
Git writes temporary 'BASE', 'LOCAL', and 'REMOTE' versions of
87+
`mergetool.writeToTemp`::
88+
Git writes temporary `BASE`, `LOCAL`, and `REMOTE` versions of
8989
conflicting files in the worktree by default. Git will attempt
9090
to use a temporary directory for these files when set `true`.
9191
Defaults to `false`.
9292

93-
mergetool.prompt::
93+
`mergetool.prompt`::
9494
Prompt before each invocation of the merge resolution program.
9595

96-
mergetool.guiDefault::
96+
`mergetool.guiDefault`::
9797
Set `true` to use the `merge.guitool` by default (equivalent to
9898
specifying the `--gui` argument), or `auto` to select `merge.guitool`
9999
or `merge.tool` depending on the presence of a `DISPLAY` environment

Documentation/mergetools/vimdiff.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,13 @@ latter will be used as fallback if the variant-specific one is not set).
183183
In addition, for backwards compatibility with previous Git versions, you can
184184
also append `1`, `2` or `3` to either `vimdiff` or any of the variants (ex:
185185
`vimdiff3`, `nvimdiff1`, etc...) to use a predefined layout.
186-
In other words, using `--tool=[g,n,]vimdiffx` is the same as using
187-
`--tool=[g,n,]vimdiff` and setting configuration variable
188-
`mergetool.[g,n,]vimdiff.layout` to...
186+
In other words, using `--tool=[g|n]vimdiff<x>` is the same as using
187+
`--tool=[g|n]vimdiff` and setting configuration variable
188+
`mergetool.[g|n]vimdiff.layout` to...
189189
190-
* `x=1`: `"@LOCAL, REMOTE"`
191-
* `x=2`: `"LOCAL, MERGED, REMOTE"`
192-
* `x=3`: `"MERGED"`
190+
* `<x>=1`: `"@LOCAL, REMOTE"`
191+
* `<x>=2`: `"LOCAL, MERGED, REMOTE"`
192+
* `<x>=3`: `"MERGED"`
193193
194-
Example: using `--tool=gvimdiff2` will open `gvim` with three columns (LOCAL,
195-
MERGED and REMOTE).
194+
Example: using `--tool=gvimdiff2` will open `gvim` with three columns (`LOCAL`,
195+
`MERGED` and `REMOTE`).

0 commit comments

Comments
 (0)