mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
difftool: add support for --trust-exit-code
Teach difftool to exit when a diff tool returns a non-zero exit code when either --trust-exit-code is specified or difftool.trustExitCode is true. Forward exit codes from invoked diff tools to the caller when --trust-exit-code is used. Suggested-by: Adri Farr <14farresa@gmail.com> Helped-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
25098690a0
commit
2b52123fcf
@@ -85,6 +85,12 @@ else
|
||||
while test $# -gt 6
|
||||
do
|
||||
launch_merge_tool "$1" "$2" "$5"
|
||||
status=$?
|
||||
if test "$status" != 0 &&
|
||||
test "$GIT_DIFFTOOL_TRUST_EXIT_CODE" = true
|
||||
then
|
||||
exit $status
|
||||
fi
|
||||
shift 7
|
||||
done
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user