From: Junio C Hamano <gitster@pobox•com>
To: David Aguilar <davvid@gmail•com>
Cc: git@vger•kernel.org, Adri Farr <14farresa@gmail•com>,
Johannes Sixt <j6t@kdbg•org>,
Sitaram Chamarty <sitaramc@gmail•com>
Subject: Re: [PATCH v3 2/2] difftool: add support for --trust-exit-code
Date: Mon, 27 Oct 2014 11:45:14 -0700 [thread overview]
Message-ID: <xmqq38a9tkqt.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1414372542-3485-2-git-send-email-davvid@gmail.com> (David Aguilar's message of "Sun, 26 Oct 2014 18:15:42 -0700")
David Aguilar <davvid@gmail•com> 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.
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' '
next prev parent reply other threads:[~2014-10-27 18:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-26 8:09 difftool--helper: exit when reading a prompt answer fails Johannes Sixt
2014-10-27 0:41 ` David Aguilar
2014-10-27 1:10 ` David Aguilar
2014-10-27 12:54 ` Michael J Gruber
2014-10-27 17:38 ` Junio C Hamano
2014-10-27 1:15 ` [PATCH v3 1/2] t7800-difftool: use "test_must_fail grep" instead of "! grep" David Aguilar
2014-10-27 1:15 ` [PATCH v3 2/2] difftool: add support for --trust-exit-code David Aguilar
2014-10-27 18:45 ` Junio C Hamano [this message]
2014-10-28 9:34 ` David Aguilar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq38a9tkqt.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=14farresa@gmail$(echo .)com \
--cc=davvid@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=j6t@kdbg$(echo .)org \
--cc=sitaramc@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox