difftool: honor --trust-exit-code for builtin tools

run_merge_tool() was not setting $status, which prevented the
exit code for builtin tools from being forwarded to the caller.

Capture the exit status and add a test to guarantee the behavior.

Reported-by: Adria Farres <14farresa@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
David Aguilar
2014-11-14 13:33:55 -08:00
committed by Junio C Hamano
parent 2b52123fcf
commit 99474b6340
2 changed files with 6 additions and 0 deletions

View File

@@ -221,6 +221,7 @@ run_merge_tool () {
else
run_diff_cmd "$1"
fi
status=$?
return $status
}