Re: [RFC PATCHv2 15/17] checkout: recurse into submodules if asked to
- From
Stefan Beller <sbeller@google.com>
- Date
- Dec 5, 2016, 19:30 UTC
- Message-ID
- <CAGZ79kbEtR7_6ZvBsjkc=8q+nnq9FoPv9HNWdRyuR2CQGqQ2oA@mail.gmail.com>
- In-Reply-To
- <20161205192527.GA68588@google.com>
On Mon, Dec 5, 2016 at 11:25 AM, Brandon Williams <bmwill@google.com> wrote:
Show 8 quoted lines
> On 12/02, Stefan Beller wrote: >> >> test_expect_success '"checkout <submodule>" honors diff.ignoreSubmodules' ' >> @@ -63,6 +70,260 @@ test_expect_success '"checkout <submodule>" honors submodule.*.ignore from .git/ >> ! test -s actual >> ' > > Should you use test_must_fail and not '!'?
We use test_must_fail for git and '!' for non git thigns (test, grep etc), as the test suite is about testing git.
The test_must_fail expects the command to be run to * not reurn 0 (success) * not segfault * not return some other arbitrary return codes indicating abnormal failure (125 IIRC)
So in a way test_must_fail translates to: "I want to run this git command and it should fail gracefully because at this state, it is the best git can do"
The '!' however is just inverting the boolean expression. We assume test, grep, et al. to be flawless here. ;)
Stefan