From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/3] t/t5400-send-pack.sh: add test_when_finished commands
Date: Tue, 18 Jan 2011 15:10:57 -0800 [thread overview]
Message-ID: <7vfwspkdtq.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1295386896-21828-2-git-send-email-avarab@gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Tue\, 18 Jan 2011 22\:41\:35 +0100")
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
> index 656ab1a..0357610 100755
> --- a/t/t5400-send-pack.sh
> +++ b/t/t5400-send-pack.sh
> @@ -90,7 +90,8 @@ test_expect_success 'refuse deleting push with denyDeletes' '
> git config receive.denyDeletes true &&
> git branch extra master
> ) &&
> - test_must_fail git send-pack ./victim :extra master
> + test_must_fail git send-pack ./victim :extra master &&
> + test_when_finished "(cd victim && git config --unset receive.denyDeletes)"
> '
I agree that you are trying to do a good thing, but does this
implementation work in practice? If somebody breaks send-pack in such a
way that this push succeeds, doesn't the &&-chain will prevent your
"when-finished" hook to be registered to begin with? IOW, wouldn't you
want to have when-finished as _early_ as possible, before any test that
might fail to help us identify a new breakage?
The same comment applies to other two hunks in the patch.
next prev parent reply other threads:[~2011-01-18 23:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-18 21:41 [PATCH 1/3] t/t5400-send-pack.sh: use the canonical test_expect_success syntax Ævar Arnfjörð Bjarmason
2011-01-18 21:41 ` [PATCH 2/3] t/t5400-send-pack.sh: add test_when_finished commands Ævar Arnfjörð Bjarmason
2011-01-18 23:10 ` Junio C Hamano [this message]
2011-01-18 21:41 ` [PATCH 3/3] t/t5400-send-pack.sh: re-indent subshell invocation Ævar Arnfjörð Bjarmason
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=7vfwspkdtq.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
/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).