Re: Question about the revision walking API
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 6, 2015, 18:30 UTC
- Message-ID
- <xmqqpparpxrr.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CAP8UFD0mZ4tSF-ZkZh8Z=GdkW4LNQAWuKJYyhyiA4RTGPLX_+g@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
> I am not sure what you describe above would work, but something like > what is done in bisect.c should work, see check_ancestors() and > bisect_next_all(). It might not be the most efficient solution though, > so I am interested if you find something more efficient.
I do not think what bisect does is a correct solution for general case; I didn't check too carefully when I applied your patch long time ago, but I recall that you only clear flag bits from commits that are still in the pending queue in that codepath. That may be sufficient if the subsequent traversal goes only outside the area previous traversal walked, but the approach is inappropriate for general cases, no?