From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Kacper Kornet <draenog@pld-linux.org>, git@vger.kernel.org
Subject: Re: [PATCH 1/3] Make test "using invalid commit with -C" more strict
Date: Sat, 24 Aug 2013 23:38:17 -0700 [thread overview]
Message-ID: <xmqqfvtyl1gm.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20130824200128.GB2960@elie.Belkin> (Jonathan Nieder's message of "Sat, 24 Aug 2013 13:01:28 -0700")
Jonathan Nieder <jrnieder@gmail.com> writes:
> Kacper Kornet wrote:
>
>> In the test 'using invalid commit with -C' git-commit would have failed
>> even if the -C option had been given the correct commit, as there was
>> nothing to commit.
>
> Good catch.
>
> [...]
>> --- a/t/t7501-commit.sh
>> +++ b/t/t7501-commit.sh
>> @@ -53,7 +53,10 @@ test_expect_success PERL 'can use paths with --interactive' '
>> '
>>
>> test_expect_success 'using invalid commit with -C' '
>> - test_must_fail git commit -C bogus
>> + echo bong >file &&
>> + git add file &&
>> + test_must_fail git commit -C bogus &&
>> + git reset
>
> I guess to be pedantic this should say
>
> echo bong >file &&
> git add file &&
> test_when_finished "git reset --hard" &&
> test_must_fail git commit -C bogus
>
> to avoid interfering with later tests even when this one fails and
> the && prevents the 'git reset' from being executed.
Makes sense.
Also it would be much simpler to say "git commit --allow-empty".
next prev parent reply other threads:[~2013-08-25 6:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-24 4:01 [PATCH 0/3] Fixes for tests run without perl Kacper Kornet
2013-08-24 4:01 ` [PATCH 1/3] Make test "using invalid commit with -C" more strict Kacper Kornet
2013-08-24 20:01 ` Jonathan Nieder
2013-08-25 6:38 ` Junio C Hamano [this message]
2013-08-25 6:40 ` Jonathan Nieder
2013-08-24 4:01 ` [PATCH 2/3] t/t3701-add-interactive.sh: Add PERL prerequisite Kacper Kornet
2013-08-24 20:13 ` Jonathan Nieder
2013-08-24 4:01 ` [PATCH 3/3] t/t7106-reset-unborn-branch.sh: " Kacper Kornet
2013-08-24 20:34 ` Jonathan Nieder
2013-08-25 6:50 ` Junio C Hamano
2013-08-25 7:09 ` Jonathan Nieder
2013-08-24 19:58 ` [PATCH 0/3] Fixes for tests run without perl Jonathan Nieder
-- strict thread matches above, loose matches on Subject: below --
2013-08-24 3:30 Kacper Kornet
2013-08-24 3:30 ` [PATCH 1/3] Make test "using invalid commit with -C" more strict Kacper Kornet
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=xmqqfvtyl1gm.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=draenog@pld-linux.org \
--cc=git@vger.kernel.org \
--cc=jrnieder@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.