git/mergetools
David Aguilar 7c10605d2c mergetool: honor mergetool.$tool.trustExitCode for built-in tools
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>
2016-11-29 10:54:03 -08:00
..
araxis mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
bc mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
bc3 mergetool: rename bc3 to bc 2014-10-21 11:25:30 -07:00
codecompare mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
deltawalker mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
diffmerge mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
diffuse mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
ecmerge mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
emerge mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
examdiff mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
gvimdiff mergetools: simplify how we handle "vim" and "defaults" 2013-01-28 19:00:38 -08:00
gvimdiff2 mergetools: simplify how we handle "vim" and "defaults" 2013-01-28 19:00:38 -08:00
gvimdiff3 mergetools: add vimdiff3 mode 2014-04-22 12:49:07 -07:00
kdiff3 mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
kompare mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
meld mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
opendiff mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
p4merge mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
tkdiff mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
tortoisemerge mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
vimdiff mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
vimdiff2 mergetools: simplify how we handle "vim" and "defaults" 2013-01-28 19:00:38 -08:00
vimdiff3 mergetools: add vimdiff3 mode 2014-04-22 12:49:07 -07:00
winmerge mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
xxdiff mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00