Re: [PATCH v2 06/15] rev-list: make --count work with --objects
- From
Jeff King <peff@peff.net>
- Date
- Feb 18, 2020, 05:24 UTC
- Message-ID
- <20200218052438.GB1641086@coredump.intra.peff.net>
- In-Reply-To
- <xmqqwo8mm7ii.fsf@gitster-ct.c.googlers.com>
On Sun, Feb 16, 2020 at 03:34:13PM -0800, Junio C Hamano wrote:
Show 14 quoted lines
> Jeff King <peff@peff.net> writes:
>
> >> > + if (revs->count) {
> >> > + revs->count_right++;
> >> > + return;
> >> > + }
> >> > +
> >>
> >> Hmm. This puzzled me at first. Do you think that it could benefit from a
> >> comment?
> >
> > What would it say (i.e., I'm not sure what confused you)?
>
> I think the question reader had was "why *right*?"Ah. The answer is: because it's not SYMMETRIC_LEFT. ;)
The counting code accumulates there by default when there are no side markings, so that's what it will report when there's no left_right or cherry_mark (which we know will be the case here, since we die() otherwise).
-Peff