Re: [PATCH 09/37] t6020: Modernize style a bit
- From
Elijah Newren <newren@gmail.com>
- Date
- Sep 20, 2010, 16:03 UTC
- Message-ID
- <AANLkTin3wXKUJoRtdk4e1KT5Gwo1H1+9H07LU313Ubo1@mail.gmail.com>
- In-Reply-To
- <4C972839.9050303@viscovery.net>
On Mon, Sep 20, 2010 at 3:24 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 9 quoted lines
> Am 9/20/2010 10:28, schrieb Elijah Newren: >> -test_expect_code 1 'Merge with d/f conflicts' 'git merge "merge msg" B master' >> +test_expect_success 'Merge with d/f conflicts' ' >> + test_must_fail git merge master >> +' > > The old version requested a particular kind of failure. Are you saying > that with modern 'git merge' all non-zero exit codes mean the same kind of > failure?
No, I'm saying that I don't think the test meant to try to distinguish between exit codes. I think the test only used test_expect_code because that's all that existed in 2005 (test_must_fail postdates this test by over 2 years). There's really only one exit code from git merge[1], so there's really not much point in trying to distinguish between kinds of failure.
[1] Okay, technically you can get code 128 if you hit a die(), but we don't in general try to differentiate between failure due to hitting die() and failure for other reasons when using test_must fail, so I didn't think it was worth checking here either.