summaryrefslogtreecommitdiff
path: root/mergetools/meld
AgeCommit message (Collapse)AuthorFilesLines
2017-06-18mergetools/meld: improve compatibiilty with Meld on macOS XLibravatar David Aguilar1-1/+1
The macOS X fork of Meld[1] requires a "=" in the "--output" argument, as it uses a wrapper[2] script that munges the "--output" argument before calling into the common "meld" script. The macOS X wrapper script[2] accepts "--output=<filename>" only, despite the fact that the underlying meld code accepts both "--output <filename" and "--output=<filename>"[3]. All versions of meld which accept "--output" accept it in the "--output=<filename>" form, so use "--output=<file>" for maximum compatibility. [1] https://github.com/yousseb/meld [2] https://github.com/yousseb/meld/blob/master/osx/Meld [3] https://github.com/yousseb/meld/issues/42 Reported-by: Matthew Groth <mgroth49@gmail.com> Helped-by: Samuel Lijin <sxlijin@gmail.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-11-29mergetool: honor mergetool.$tool.trustExitCode for built-in toolsLibravatar David Aguilar1-2/+1
Built-in merge tools contain a hard-coded assumption about whether or not a tool's exit code can be trusted to determine the success or failure of a merge. Tools whose exit codes are not trusted contain calls to check_unchanged() in their merge_cmd() functions. A problem with this is that the trustExitCode configuration is not honored for built-in tools. Teach built-in tools to honor the trustExitCode configuration. Extend run_merge_cmd() so that it is responsible for calling check_unchanged() when a tool's exit code cannot be trusted. Remove check_unchanged() calls from scriptlets since they are no longer responsible for calling it. When no configuration is present, exit_code_trustable() is checked to see whether the exit code should be trusted. The default implementation returns false. Tools whose exit codes can be trusted override exit_code_trustable() to true. Reported-by: Dun Peal <dunpealer@gmail.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-16mergetools/meld: make usage of `--output` configurable and more robustLibravatar David Aguilar1-2/+7
Older versions of meld listed --output in `meld --help`. Newer versions only mention `meld [OPTIONS...]`. Improve the checks to catch these newer versions. Add a `mergetool.meld.hasOutput` configuration to allow overriding the heuristic. Reported-by: Andrey Novoseltsev <novoselt@gmail.com> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-10mergetools/meld: Use --help output to detect --output supportLibravatar Jonathan Nieder1-1/+1
In v1.7.7-rc0~3^2 (2011-08-19), git mergetool's "meld" support learned to use the --output option when calling versions of meld that are detected to support it (1.5.0 and newer, hopefully). Alas, it misdetects old versions (before 1.1.5, 2006-06-11) of meld as supporting the option, so on systems with such meld, instead of getting a nice merge helper, the operator gets a dialog box with the text "Wrong number of arguments (Got 5)". (Version 1.1.5 is when meld switched to using optparse. One consequence of that change was that errors in usage are detected and signalled through the exit status even when --help was passed.) Luckily there is a simpler check that is more reliable: the usage string printed by "meld --help" reliably reflects whether --output is supported in a given version. Use it. Reported-by: Jeff Epler <jepler@unpythonic.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-19mergetools/meld: Use '--output' when availableLibravatar David Aguilar1-1/+24
meld 1.5.0 and newer allow the output file to be specified when merging multiple files. Check whether the meld command supports '--output' and use it when available. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-19mergetool--lib: Refactor tools into separate filesLibravatar David Aguilar1-0/+9
Individual merge tools are now defined in a mergetools/$tool file which is sourced at runtime. The individual files are installed into $(git --exec-path)/mergetools/. New tools can be added by creating a new file instead of editing the git-mergetool--lib.sh scriptlet. http://thread.gmane.org/gmane.comp.version-control.git/134906/focus=135006 Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>