diff options
author | David Aguilar <davvid@gmail.com> | 2016-11-29 01:38:07 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-11-29 10:54:03 -0800 |
commit | 7c10605d2ccf499af6136e993cf248892be39168 (patch) | |
tree | fd2c42ea696c365423d767225278d8cd8c49b516 /mergetools/xxdiff | |
parent | Git 2.10.2 (diff) | |
download | tgif-7c10605d2ccf499af6136e993cf248892be39168.tar.xz |
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>
Diffstat (limited to 'mergetools/xxdiff')
-rw-r--r-- | mergetools/xxdiff | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/mergetools/xxdiff b/mergetools/xxdiff index 05b443394b..e284811ff2 100644 --- a/mergetools/xxdiff +++ b/mergetools/xxdiff @@ -6,7 +6,6 @@ diff_cmd () { } merge_cmd () { - touch "$BACKUP" if $base_present then "$merge_tool_path" -X --show-merged-pane \ @@ -21,5 +20,4 @@ merge_cmd () { -R 'Accel.SearchForward: "Ctrl-G"' \ --merged-file "$MERGED" "$LOCAL" "$REMOTE" fi - check_unchanged } |