From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jan Krrrger <jk@jk.gs>, git@vger.kernel.org
Subject: Re: [PATCH] Introduce receive.denyDeletes
Date: Fri, 31 Oct 2008 07:30:22 -0700 [thread overview]
Message-ID: <20081031143022.GQ14786@spearce.org> (raw)
In-Reply-To: <7v63n99omx.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
> "Jan Krüger" <jk@jk.gs> writes:
>
> > Can I then delete the branch afterwards without lots of juggling (in
> > case the test fails due to a random other reason that the branch
> > accidentally getting deleted by receive-pack)? I'd expect I'd have to
> > save the exit code to a temporary variable and that's just as ugly.
If you want to delete the branch after the test is done, do it
outside of the test_expect_success's 3rd argument. Then it will
run the branch deletion whether or not the test was successful.
> Although I agree that your attempt to allow the test continue even when
> this test fails is a very good practice, I personally do not find the
> alternative you mention ugly at all. I actually find that "return 1"
> uglier because it feels like it knows too much about how
> test_expect_success is implemented.
Yea, I also found the "return 1" to be horribly difficult to read, and
knowing far too much about the test suite.
--
Shawn.
next prev parent reply other threads:[~2008-10-31 14:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-30 18:11 [PATCH] Introduce receive.denyDeletes Jan Krüger
2008-10-30 18:32 ` Shawn O. Pearce
2008-10-30 18:45 ` Jan Krüger
2008-10-31 8:04 ` Junio C Hamano
2008-10-31 14:30 ` Shawn O. Pearce [this message]
2008-11-01 14:42 ` [PATCH v2] " Jan Krüger
2008-11-01 18:07 ` Shawn O. Pearce
2008-10-31 22:45 ` [PATCH] " Johannes Schindelin
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=20081031143022.GQ14786@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jk@jk.gs \
/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).