From: Johannes Sixt <j.sixt@viscovery.net>
To: Jeff King <peff@peff.net>
Cc: Sebastian Schuberth <sschuberth@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH 3/3] t3503: test cherry picking and reverting root commits
Date: Thu, 12 May 2011 14:20:23 +0200 [thread overview]
Message-ID: <4DCBD087.90302@viscovery.net> (raw)
In-Reply-To: <20110512111007.GC5292@sigill.intra.peff.net>
Am 5/12/2011 13:10, schrieb Jeff King:
> +test_expect_success 'cherry-pick a root commit with an external strategy' '
> +
> + git cherry-pick --strategy=resolve master &&
> + test first = $(cat file1)
What if file1 does not exist? Then cat fails loudly. But this does not
fail the entire command immediately; rather, the test command fails, but
not because of a non-equality, but because of an invalid usage ("syntax
error"). IOW, the test does the right thing, but for the wrong reason.
Yes, an earlier test gave a bad precedent, and the following fixup (to
be squashed in) fixes it, too.
-- Hannes
diff --git a/t/t3503-cherry-pick-root.sh b/t/t3503-cherry-pick-root.sh
index 1f9ed67..3006452 100755
--- a/t/t3503-cherry-pick-root.sh
+++ b/t/t3503-cherry-pick-root.sh
@@ -23,7 +23,7 @@ test_expect_success setup '
test_expect_success 'cherry-pick a root commit' '
git cherry-pick master &&
- test first = $(cat file1)
+ test first = "$(cat file1)"
'
@@ -37,7 +37,7 @@ test_expect_success 'revert a root commit' '
test_expect_success 'cherry-pick a root commit with an external strategy' '
git cherry-pick --strategy=resolve master &&
- test first = $(cat file1)
+ test first = "$(cat file1)"
'
next prev parent reply other threads:[~2011-05-12 12:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-12 10:15 git cherry-pick --strategy=resolve segfaults if picking a root commit Sebastian Schuberth
2011-05-12 10:45 ` Jeff King
2011-05-12 11:08 ` Jeff King
2011-05-12 11:09 ` [PATCH 1/3] cherry-pick: handle root commits with external strategies Jeff King
2011-05-12 14:50 ` Sebastian Schuberth
2011-05-12 11:09 ` [PATCH 2/3] revert: allow reverting a root commit Jeff King
2011-05-12 14:53 ` Sebastian Schuberth
2011-05-12 11:10 ` [PATCH 3/3] t3503: test cherry picking and reverting root commits Jeff King
2011-05-12 12:20 ` Johannes Sixt [this message]
2011-05-12 12:37 ` Jeff King
2011-05-16 10:27 ` git cherry-pick --strategy=resolve segfaults if picking a root commit Jeff King
2011-05-16 15:01 ` Junio C Hamano
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=4DCBD087.90302@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=sschuberth@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).