File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -1754,6 +1754,15 @@ mergetool.<tool>.trustExitCode::
17541754 if the file has been updated, otherwise the user is prompted to
17551755 indicate the success of the merge.
17561756
1757+ mergetool.meld.hasOutput::
1758+ Older versions of `meld` do not support the `--output` option.
1759+ Git will attempt to detect whether `meld` supports `--output`
1760+ by inspecting the output of `meld --help`. Configuring
1761+ `mergetool.meld.hasOutput` will make Git skip these checks and
1762+ use the configured value instead. Setting `mergetool.meld.hasOutput`
1763+ to `true` tells Git to unconditionally use the `--output` option,
1764+ and `false` avoids using `--output`.
1765+
17571766mergetool.keepBackup::
17581767 After performing a merge, the original file with conflict markers
17591768 can be saved as a file with a `.orig` extension. If this variable
Original file line number Diff line number Diff line change @@ -18,13 +18,18 @@ merge_cmd () {
1818 check_unchanged
1919}
2020
21- # Check whether 'meld --output <file>' is supported
21+ # Check whether we should use 'meld --output <file>'
2222check_meld_for_output_version () {
2323 meld_path="$(git config mergetool.meld.path)"
2424 meld_path="${meld_path:-meld}"
2525
26- if "$meld_path" --help 2>&1 | grep -e --output >/dev/null
26+ if meld_has_output_option=$(git config --bool mergetool.meld.hasOutput)
2727 then
28+ : use configured value
29+ elif "$meld_path" --help 2>&1 |
30+ grep -e '--output=' -e '\[OPTION\.\.\.\]' >/dev/null
31+ then
32+ : old ones mention --output and new ones just say OPTION...
2833 meld_has_output_option=true
2934 else
3035 meld_has_output_option=false
You can’t perform that action at this time.
0 commit comments