Re: [PATCH v3 2/2] difftool: add support for --trust-exit-code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 27, 2014 at 11:45:14AM -0700, Junio C Hamano wrote:
> David Aguilar <davvid@xxxxxxxxx> writes:
> 
> > +write_script .git/fail-right-file <<\EOF
> > +echo "$2"
> > +exit 1
> > +EOF
> 
> This should be inside the next one, no?
> 
> > +test_expect_success PERL 'difftool stops on error with --trust-exit-code' '
> > +	>for-diff &&
> > +	git add for-diff &&
> > +	echo file>expect &&
> > +	test_must_fail git difftool -y --trust-exit-code \
> > +		--extcmd .git/fail-right-file branch >actual &&
> > +	test_cmp expect actual &&
> > +	git reset -- for-diff &&
> > +	rm -f for-diff .git/fail-right-file
> > +'
> 
> In other words, this squashed in.


Yes, please.  And drop patch 1/2, of course.
Thanks for the clarification.


> 
>  t/t7800-difftool.sh | 17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
> index 4b2f611..69bde7a 100755
> --- a/t/t7800-difftool.sh
> +++ b/t/t7800-difftool.sh
> @@ -104,20 +104,19 @@ test_expect_success PERL 'difftool ignores exit code with --no-trust-exit-code'
>  	git difftool -y --no-trust-exit-code -t error branch
>  '
>  
> -write_script .git/fail-right-file <<\EOF
> -echo "$2"
> -exit 1
> -EOF
> -
>  test_expect_success PERL 'difftool stops on error with --trust-exit-code' '
> +	test_when_finished "rm -f for-diff .git/fail-right-file" &&
> +	test_when_finished "git reset -- for-diff" &&
> +	write_script .git/fail-right-file <<-\EOF &&
> +	echo "$2"
> +	exit 1
> +	EOF
>  	>for-diff &&
>  	git add for-diff &&
> -	echo file>expect &&
> +	echo file >expect &&
>  	test_must_fail git difftool -y --trust-exit-code \
>  		--extcmd .git/fail-right-file branch >actual &&
> -	test_cmp expect actual &&
> -	git reset -- for-diff &&
> -	rm -f for-diff .git/fail-right-file
> +	test_cmp expect actual
>  '
>  
>  test_expect_success PERL 'difftool honors --gui' '

-- 
David
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]