Re: [PATCH v7 07/10] commit-reach: introduce struct paint_state with per-side counters

Kristofer Karlsson <[email protected]>
Newsgroups org.kernel.vger.git
Message-ID <CAL71e4MULMmbMyrE2iKgNXD36vpjnxCYXTcNw75ibu_nwxqAPQ@mail.gmail.com>
On Fri, 7 Aug 2026 at 05:02, Elijah Newren <[email protected]> wrote:
>
> became -> become

Good catch, will fix.

> So: pop, clear, check the counters, and _then_ decrement the counters.
> This means the zero-counter-check still include the just-popped
> commit.  If the decrement were before the check, we'd actually just
> barely miss the merge-base most the time, so this order is important.

Yes, I should perhaps add a code comment for this to ensure it
does not get corrupted in the future. Something like this:

    /* must check exit conditions before decrementing counters
       for the dequeued commit -- the counters may otherwise be
       be temporarily zero until the commit has been processed
       and its parent nodes have been enqueued.
     */

Or is it overkill?

Thanks,
Kristofer
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.