mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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 <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
1654396782
commit
d30c5cc459
@@ -1,24 +1,24 @@
|
|||||||
mergetool.<tool>.path::
|
`mergetool.<tool>.path`::
|
||||||
Override the path for the given tool. This is useful in case
|
Override the path for the given tool. This is useful in case
|
||||||
your tool is not in the PATH.
|
your tool is not in the `$PATH`.
|
||||||
|
|
||||||
mergetool.<tool>.cmd::
|
`mergetool.<tool>.cmd`::
|
||||||
Specify the command to invoke the specified merge tool. The
|
Specify the command to invoke the specified merge tool. The
|
||||||
specified command is evaluated in shell with the following
|
specified command is evaluated in shell with the following
|
||||||
variables available: 'BASE' is the name of a temporary file
|
variables available: `BASE` is the name of a temporary file
|
||||||
containing the common base of the files to be merged, if available;
|
containing the common base of the files to be merged, if available;
|
||||||
'LOCAL' is the name of a temporary file containing the contents of
|
`LOCAL` is the name of a temporary file containing the contents of
|
||||||
the file on the current branch; 'REMOTE' is the name of a temporary
|
the file on the current branch; `REMOTE` is the name of a temporary
|
||||||
file containing the contents of the file from the branch being
|
file containing the contents of the file from the branch being
|
||||||
merged; 'MERGED' contains the name of the file to which the merge
|
merged; `MERGED` contains the name of the file to which the merge
|
||||||
tool should write the results of a successful merge.
|
tool should write the results of a successful merge.
|
||||||
|
|
||||||
mergetool.<tool>.hideResolved::
|
`mergetool.<tool>.hideResolved`::
|
||||||
Allows the user to override the global `mergetool.hideResolved` value
|
Allows the user to override the global `mergetool.hideResolved` value
|
||||||
for a specific tool. See `mergetool.hideResolved` for the full
|
for a specific tool. See `mergetool.hideResolved` for the full
|
||||||
description.
|
description.
|
||||||
|
|
||||||
mergetool.<tool>.trustExitCode::
|
`mergetool.<tool>.trustExitCode`::
|
||||||
For a custom merge command, specify whether the exit code of
|
For a custom merge command, specify whether the exit code of
|
||||||
the merge command can be used to determine whether the merge was
|
the merge command can be used to determine whether the merge was
|
||||||
successful. If this is not set to true then the merge target file
|
successful. If this is not set to true then the merge target file
|
||||||
@@ -26,7 +26,7 @@ mergetool.<tool>.trustExitCode::
|
|||||||
if the file has been updated; otherwise, the user is prompted to
|
if the file has been updated; otherwise, the user is prompted to
|
||||||
indicate the success of the merge.
|
indicate the success of the merge.
|
||||||
|
|
||||||
mergetool.meld.hasOutput::
|
`mergetool.meld.hasOutput`::
|
||||||
Older versions of `meld` do not support the `--output` option.
|
Older versions of `meld` do not support the `--output` option.
|
||||||
Git will attempt to detect whether `meld` supports `--output`
|
Git will attempt to detect whether `meld` supports `--output`
|
||||||
by inspecting the output of `meld --help`. Configuring
|
by inspecting the output of `meld --help`. Configuring
|
||||||
@@ -35,7 +35,7 @@ mergetool.meld.hasOutput::
|
|||||||
to `true` tells Git to unconditionally use the `--output` option,
|
to `true` tells Git to unconditionally use the `--output` option,
|
||||||
and `false` avoids using `--output`.
|
and `false` avoids using `--output`.
|
||||||
|
|
||||||
mergetool.meld.useAutoMerge::
|
`mergetool.meld.useAutoMerge`::
|
||||||
When the `--auto-merge` is given, meld will merge all non-conflicting
|
When the `--auto-merge` is given, meld will merge all non-conflicting
|
||||||
parts automatically, highlight the conflicting parts, and wait for
|
parts automatically, highlight the conflicting parts, and wait for
|
||||||
user decision. Setting `mergetool.meld.useAutoMerge` to `true` tells
|
user decision. Setting `mergetool.meld.useAutoMerge` to `true` tells
|
||||||
@@ -45,15 +45,15 @@ mergetool.meld.useAutoMerge::
|
|||||||
value of `false` avoids using `--auto-merge` altogether, and is the
|
value of `false` avoids using `--auto-merge` altogether, and is the
|
||||||
default value.
|
default value.
|
||||||
|
|
||||||
mergetool.<vimdiff variant>.layout::
|
`mergetool.<variant>.layout`::
|
||||||
Configure the split window layout for vimdiff's `<variant>`, which is any of `vimdiff`,
|
Configure the split window layout for vimdiff's _<variant>_, which is any of `vimdiff`,
|
||||||
`nvimdiff`, `gvimdiff`.
|
`nvimdiff`, `gvimdiff`.
|
||||||
Upon launching `git mergetool` with `--tool=<variant>` (or without `--tool`
|
Upon launching `git mergetool` with `--tool=<variant>` (or without `--tool`
|
||||||
if `merge.tool` is configured as `<variant>`), Git will consult
|
if `merge.tool` is configured as _<variant>_), Git will consult
|
||||||
`mergetool.<variant>.layout` to determine the tool's layout. If the
|
`mergetool.<variant>.layout` to determine the tool's layout. If the
|
||||||
variant-specific configuration is not available, `vimdiff`'s is used as
|
variant-specific configuration is not available, `vimdiff` ' s is used as
|
||||||
fallback. If that too is not available, a default layout with 4 windows
|
fallback. If that too is not available, a default layout with 4 windows
|
||||||
will be used. To configure the layout, see the `BACKEND SPECIFIC HINTS`
|
will be used. To configure the layout, see the 'BACKEND SPECIFIC HINTS'
|
||||||
ifdef::git-mergetool[]
|
ifdef::git-mergetool[]
|
||||||
section.
|
section.
|
||||||
endif::[]
|
endif::[]
|
||||||
@@ -61,39 +61,39 @@ ifndef::git-mergetool[]
|
|||||||
section in linkgit:git-mergetool[1].
|
section in linkgit:git-mergetool[1].
|
||||||
endif::[]
|
endif::[]
|
||||||
|
|
||||||
mergetool.hideResolved::
|
`mergetool.hideResolved`::
|
||||||
During a merge, Git will automatically resolve as many conflicts as
|
During a merge, Git will automatically resolve as many conflicts as
|
||||||
possible and write the 'MERGED' file containing conflict markers around
|
possible and write the `$MERGED` file containing conflict markers around
|
||||||
any conflicts that it cannot resolve; 'LOCAL' and 'REMOTE' normally
|
any conflicts that it cannot resolve; `$LOCAL` and `$REMOTE` normally
|
||||||
represent the versions of the file from before Git's conflict
|
are the versions of the file from before Git`s conflict
|
||||||
resolution. This flag causes 'LOCAL' and 'REMOTE' to be overwritten so
|
resolution. This flag causes `$LOCAL` and `$REMOTE` to be overwritten so
|
||||||
that only the unresolved conflicts are presented to the merge tool. Can
|
that only the unresolved conflicts are presented to the merge tool. Can
|
||||||
be configured per-tool via the `mergetool.<tool>.hideResolved`
|
be configured per-tool via the `mergetool.<tool>.hideResolved`
|
||||||
configuration variable. Defaults to `false`.
|
configuration variable. Defaults to `false`.
|
||||||
|
|
||||||
mergetool.keepBackup::
|
`mergetool.keepBackup`::
|
||||||
After performing a merge, the original file with conflict markers
|
After performing a merge, the original file with conflict markers
|
||||||
can be saved as a file with a `.orig` extension. If this variable
|
can be saved as a file with a `.orig` extension. If this variable
|
||||||
is set to `false` then this file is not preserved. Defaults to
|
is set to `false` then this file is not preserved. Defaults to
|
||||||
`true` (i.e. keep the backup files).
|
`true` (i.e. keep the backup files).
|
||||||
|
|
||||||
mergetool.keepTemporaries::
|
`mergetool.keepTemporaries`::
|
||||||
When invoking a custom merge tool, Git uses a set of temporary
|
When invoking a custom merge tool, Git uses a set of temporary
|
||||||
files to pass to the tool. If the tool returns an error and this
|
files to pass to the tool. If the tool returns an error and this
|
||||||
variable is set to `true`, then these temporary files will be
|
variable is set to `true`, then these temporary files will be
|
||||||
preserved; otherwise, they will be removed after the tool has
|
preserved; otherwise, they will be removed after the tool has
|
||||||
exited. Defaults to `false`.
|
exited. Defaults to `false`.
|
||||||
|
|
||||||
mergetool.writeToTemp::
|
`mergetool.writeToTemp`::
|
||||||
Git writes temporary 'BASE', 'LOCAL', and 'REMOTE' versions of
|
Git writes temporary `BASE`, `LOCAL`, and `REMOTE` versions of
|
||||||
conflicting files in the worktree by default. Git will attempt
|
conflicting files in the worktree by default. Git will attempt
|
||||||
to use a temporary directory for these files when set `true`.
|
to use a temporary directory for these files when set `true`.
|
||||||
Defaults to `false`.
|
Defaults to `false`.
|
||||||
|
|
||||||
mergetool.prompt::
|
`mergetool.prompt`::
|
||||||
Prompt before each invocation of the merge resolution program.
|
Prompt before each invocation of the merge resolution program.
|
||||||
|
|
||||||
mergetool.guiDefault::
|
`mergetool.guiDefault`::
|
||||||
Set `true` to use the `merge.guitool` by default (equivalent to
|
Set `true` to use the `merge.guitool` by default (equivalent to
|
||||||
specifying the `--gui` argument), or `auto` to select `merge.guitool`
|
specifying the `--gui` argument), or `auto` to select `merge.guitool`
|
||||||
or `merge.tool` depending on the presence of a `DISPLAY` environment
|
or `merge.tool` depending on the presence of a `DISPLAY` environment
|
||||||
|
|||||||
@@ -183,13 +183,13 @@ latter will be used as fallback if the variant-specific one is not set).
|
|||||||
In addition, for backwards compatibility with previous Git versions, you can
|
In addition, for backwards compatibility with previous Git versions, you can
|
||||||
also append `1`, `2` or `3` to either `vimdiff` or any of the variants (ex:
|
also append `1`, `2` or `3` to either `vimdiff` or any of the variants (ex:
|
||||||
`vimdiff3`, `nvimdiff1`, etc...) to use a predefined layout.
|
`vimdiff3`, `nvimdiff1`, etc...) to use a predefined layout.
|
||||||
In other words, using `--tool=[g,n,]vimdiffx` is the same as using
|
In other words, using `--tool=[g|n]vimdiff<x>` is the same as using
|
||||||
`--tool=[g,n,]vimdiff` and setting configuration variable
|
`--tool=[g|n]vimdiff` and setting configuration variable
|
||||||
`mergetool.[g,n,]vimdiff.layout` to...
|
`mergetool.[g|n]vimdiff.layout` to...
|
||||||
|
|
||||||
* `x=1`: `"@LOCAL, REMOTE"`
|
* `<x>=1`: `"@LOCAL, REMOTE"`
|
||||||
* `x=2`: `"LOCAL, MERGED, REMOTE"`
|
* `<x>=2`: `"LOCAL, MERGED, REMOTE"`
|
||||||
* `x=3`: `"MERGED"`
|
* `<x>=3`: `"MERGED"`
|
||||||
|
|
||||||
Example: using `--tool=gvimdiff2` will open `gvim` with three columns (LOCAL,
|
Example: using `--tool=gvimdiff2` will open `gvim` with three columns (`LOCAL`,
|
||||||
MERGED and REMOTE).
|
`MERGED` and `REMOTE`).
|
||||||
|
|||||||
Reference in New Issue
Block a user