Re: [PATCH v2] difftool: add support for --trust-exit-code
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Oct 26, 2014, 07:31 UTC
- Message-ID
- <544CA339.3000401@kdbg.org>
- In-Reply-To
- <1414287526-80060-1-git-send-email-davvid@gmail.com>
Am 26.10.2014 um 02:38 schrieb David Aguilar:
Show 22 quoted lines
> diff --git a/git-difftool--helper.sh b/git-difftool--helper.sh
> index 7ef36b9..fdbd768 100755
> --- a/git-difftool--helper.sh
> +++ b/git-difftool--helper.sh
> @@ -62,6 +62,8 @@ launch_merge_tool () {
> else
> run_merge_tool "$merge_tool"
> fi
> + status=$?
> + return $status
> }
>
> if ! use_ext_cmd
> @@ -85,5 +87,10 @@ else
> do
> launch_merge_tool "$1" "$2" "$5"
> shift 7
> + if test "$status" != 0 &&
> + test "$GIT_DIFFTOOL_TRUST_EXIT_CODE" = true
> + then
> + exit $status
> + fiIf you insert this new code block before the 'shift 7', you can set status here and do not have to hide it in the helper function.
> done > fi
-- Hannes