9d9cf23031
Add a per-tool override flag so that users may enable the flag for one tool and disable it for another by setting `mergetool.<tool>.hideResolved` to `false`. In addition, the author or maintainer of a mergetool may optionally override the default `hideResolved` value for that mergetool. If the `mergetools/<tool>` shell script contains a `hide_resolved_enabled` function it will be called when the mergetool is invoked and the return value will be used as the default for the `hideResolved` flag. hide_resolved_enabled () { return 1 } Disabling may be desirable if the mergetool wants or needs access to the original, unmodified 'LOCAL' and 'REMOTE' versions of the conflicted file. For example: - A tool may use a custom conflict resolution algorithm and prefer to ignore the results of Git's conflict resolution. - A tool may want to visually compare/constrast the version of the file from before the merge (saved to 'LOCAL', 'REMOTE', and 'BASE') with Git's conflict resolution results (saved to 'MERGED'). Helped-by: Johannes Sixt <j6t@kdbg.org> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Seth House <seth@eseth.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
79 lines
3.6 KiB
Plaintext
79 lines
3.6 KiB
Plaintext
mergetool.<tool>.path::
|
|
Override the path for the given tool. This is useful in case
|
|
your tool is not in the PATH.
|
|
|
|
mergetool.<tool>.cmd::
|
|
Specify the command to invoke the specified merge tool. The
|
|
specified command is evaluated in shell with the following
|
|
variables available: 'BASE' is the name of a temporary file
|
|
containing the common base of the files to be merged, if available;
|
|
'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
|
|
file containing the contents of the file from the branch being
|
|
merged; 'MERGED' contains the name of the file to which the merge
|
|
tool should write the results of a successful merge.
|
|
|
|
mergetool.<tool>.hideResolved::
|
|
Allows the user to override the global `mergetool.hideResolved` value
|
|
for a specific tool. See `mergetool.hideResolved` for the full
|
|
description.
|
|
|
|
mergetool.<tool>.trustExitCode::
|
|
For a custom merge command, specify whether the exit code of
|
|
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
|
|
timestamp is checked and the merge assumed to have been successful
|
|
if the file has been updated, otherwise the user is prompted to
|
|
indicate the success of the merge.
|
|
|
|
mergetool.meld.hasOutput::
|
|
Older versions of `meld` do not support the `--output` option.
|
|
Git will attempt to detect whether `meld` supports `--output`
|
|
by inspecting the output of `meld --help`. Configuring
|
|
`mergetool.meld.hasOutput` will make Git skip these checks and
|
|
use the configured value instead. Setting `mergetool.meld.hasOutput`
|
|
to `true` tells Git to unconditionally use the `--output` option,
|
|
and `false` avoids using `--output`.
|
|
|
|
mergetool.meld.useAutoMerge::
|
|
When the `--auto-merge` is given, meld will merge all non-conflicting
|
|
parts automatically, highlight the conflicting parts and wait for
|
|
user decision. Setting `mergetool.meld.useAutoMerge` to `true` tells
|
|
Git to unconditionally use the `--auto-merge` option with `meld`.
|
|
Setting this value to `auto` makes git detect whether `--auto-merge`
|
|
is supported and will only use `--auto-merge` when available. A
|
|
value of `false` avoids using `--auto-merge` altogether, and is the
|
|
default value.
|
|
|
|
mergetool.hideResolved::
|
|
During a merge Git will automatically resolve as many conflicts as
|
|
possible and write the 'MERGED' file containing conflict markers around
|
|
any conflicts that it cannot resolve; 'LOCAL' and 'REMOTE' normally
|
|
represent the versions of the file from before Git's conflict
|
|
resolution. This flag causes 'LOCAL' and 'REMOTE' to be overwriten so
|
|
that only the unresolved conflicts are presented to the merge tool. Can
|
|
be configured per-tool via the `mergetool.<tool>.hideResolved`
|
|
configuration variable. Defaults to `true`.
|
|
|
|
mergetool.keepBackup::
|
|
After performing a merge, the original file with conflict markers
|
|
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
|
|
`true` (i.e. keep the backup files).
|
|
|
|
mergetool.keepTemporaries::
|
|
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
|
|
variable is set to `true`, then these temporary files will be
|
|
preserved, otherwise they will be removed after the tool has
|
|
exited. Defaults to `false`.
|
|
|
|
mergetool.writeToTemp::
|
|
Git writes temporary 'BASE', 'LOCAL', and 'REMOTE' versions of
|
|
conflicting files in the worktree by default. Git will attempt
|
|
to use a temporary directory for these files when set `true`.
|
|
Defaults to `false`.
|
|
|
|
mergetool.prompt::
|
|
Prompt before each invocation of the merge resolution program.
|