From: Jonathan Nieder <jrnieder@gmail.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: "Ryan Biesemeyer" <ryan@yaauie.com>,
git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Jeff King" <peff@peff.net>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH] merge: make merge state available to prepare-commit-msg hook
Date: Wed, 8 Jan 2014 14:01:19 -0800 [thread overview]
Message-ID: <20140108220119.GN3881@google.com> (raw)
In-Reply-To: <vpqtxdenoug.fsf@anie.imag.fr>
Matthieu Moy wrote:
> Jonathan's answer is an option. Another one is
[...]
> So if the cleanup goes wrong, one can notice.
test_when_finished also makes the test fail if the cleanup failed.
Another common strategy is
test_expect_success 'my exciting test' '
# this test will rely on these files being absent
rm -f a b c etc &&
... rest of the test goes here ...
'
which can be a handy way for an especially picky test to protect
itself (for example with 'git clean -fdx') regardless of the state
other test assertions create for it.
This particular example (merge --abort) seems like a good use for
test_when_finished because it is about a specific test having made a
mess and needing to clean up after itself to restore sanity.
Hoping that clarifies,
Jonathan
next prev parent reply other threads:[~2014-01-08 22:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 19:00 [PATCH] merge: make merge state available to prepare-commit-msg hook Ryan Biesemeyer
2014-01-08 19:02 ` Ryan Biesemeyer
2014-01-08 20:06 ` Matthieu Moy
2014-01-08 20:21 ` Ryan Biesemeyer
2014-01-08 20:29 ` Jonathan Nieder
2014-01-08 21:30 ` Matthieu Moy
2014-01-08 22:01 ` Jonathan Nieder [this message]
2014-01-09 13:25 ` Matthieu Moy
2014-01-08 19:03 ` Ryan Biesemeyer
2014-01-09 0:45 ` [PATCH v2 0/4] " Ryan Biesemeyer
2014-01-09 0:45 ` [PATCH v2 1/4] t7505: add missing && Ryan Biesemeyer
2014-01-09 0:45 ` [PATCH v2 2/4] t7505: ensure cleanup after hook blocks merge Ryan Biesemeyer
2014-01-09 13:00 ` Matthieu Moy
2014-01-10 23:40 ` Junio C Hamano
2014-01-09 0:45 ` [PATCH v2 3/4] merge: make prepare_to_commit responsible for write_merge_state Ryan Biesemeyer
2014-01-11 0:11 ` Junio C Hamano
2014-01-11 0:20 ` Junio C Hamano
2014-01-09 0:45 ` [PATCH v2 4/4] merge: drop unused arg from abort_commit method signature Ryan Biesemeyer
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=20140108220119.GN3881@google.com \
--to=jrnieder@gmail.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
--cc=ryan@yaauie.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.