Re: [PATCHv2 2/7] revision.h: introduce blob/tree walking in order of the commits
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 1, 2017, 22:33 UTC
- Message-ID
- <alpine.DEB.2.21.1.1711012333060.6482@virtualbox>
- In-Reply-To
- <20171101213911.aokzrnchr6s2r2uq@sigill.intra.peff.net>
Hi,
On Wed, 1 Nov 2017, Jeff King wrote:
Show 33 quoted lines
> On Wed, Nov 01, 2017 at 10:36:02PM +0100, Johannes Schindelin wrote: > > > On Wed, 1 Nov 2017, Junio C Hamano wrote: > > > > > On Wed, Nov 1, 2017 at 9:26 PM, Johannes Schindelin > > > <Johannes.Schindelin@gmx.de> wrote: > > > > > > > > ... > > > > ( > > > > for x in four three > > > > do > > > > git rm $x && > > > > git commit -m "remote $x" || > > > > exit > > > > done > > > > ) && > > > > test 0 -eq $? && > > > > ... > > > > > > > > Ugly? Yes. Correct? Also yes. > > > > > > I think returning non-zero with "return" is how other tests avoid an > > > extra level of subshell. > > > Ugly? Yes. Correct? Questionable but it seems to work for those who > > > wrote them ;-) > > > > Given that the test_expect_* functions evaluate the code, it makes me > > wonder whether those `return` statements really return appropriately, or > > one call level too low. > > The test_expect functions eval the actual snippets inside a dummy > function. This is intentional exactly to allow them to call "return" at > will.
Tricksy. And a bit unintuitive for script kings such as myself, but okay.
Ciao, Dscho