Re: [PATCH/RFC 0/2] test_when_finished and returning early

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 08, 2011 at 03:13:41AM +0200, Jonathan Nieder wrote:

> Jonathan Nieder wrote:
> 
> > The use of "return" was surprising.  It seems this style has been
> > intended to work ever since v0.99.5~24^2~4 (Trapping exit in tests,
> > using return for errors, 2005-08-10).
> >
> > It interacts poorly with test_when_finished but since these tests do
> > not use that function, they should be safe.  test_when_finished could
> > use some fixes to avoid future surprises but that's another story.
> 
> The above was about some code that looks like this:
> 
> |	for i in 1 2 3 4 5 6 7 8 9 10 11
> | 	do
> |		git checkout -b root$i five || return
> 
> The fixes alluded to might go something like this.  Thoughts?
> 
> Jonathan Nieder (2):
>   test: simplify return value of test_run_
>   test: cope better with use of return for errors

Both look sane to me. Thanks for a nicely written set of commit messages
explaining the rather subtle issue.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]