Re: [PATCH 06/18] t5613: clarify "too deep" recursion tests
- From
Jeff King <peff@peff.net>
- Date
- Oct 4, 2016, 13:48 UTC
- Message-ID
- <20161004134853.x3zq33ywyyzgbwsy@sigill.intra.peff.net>
- In-Reply-To
- <CA+P7+xok5PoNKO+8R6zF9SXYfDq6BboDTDz9WZYEczs0pFK+pw@mail.gmail.com>
On Mon, Oct 03, 2016 at 10:57:48PM -0700, Jacob Keller wrote:
Show 17 quoted lines
> > diff --git a/t/t5613-info-alternate.sh b/t/t5613-info-alternate.sh > > index 7bc1c3c..b393613 100755 > > --- a/t/t5613-info-alternate.sh > > +++ b/t/t5613-info-alternate.sh > > @@ -39,6 +39,18 @@ test_expect_success 'preparing third repository' ' > > ) > > ' > > > > +# Note: These tests depend on the hard-coded value of 5 as "too deep". We start > > +# the depth at 0 and count links, not repositories, so in a chain like: > > +# > > +# A -> B -> C -> D -> E -> F -> G -> H > > +# 0 1 2 3 4 5 6 > > +# > > Ok so we count links, but wouldn't we have 5 links when we hit F, and > not G? Or am I missing something here?
This is what I was trying to get at with the "start the depth at 0". We disallow a depth greater than 5, but because we start at 0-counting, it's really six links. I guess saying "5 as too deep" is really the misleading part. It should be "5 as the maximum depth".
-Peff