From: Kristofer Karlsson Date: Fri, 07 Aug 2026 11:47:54 GMT Subject: Re: [PATCH v7 07/10] commit-reach: introduce struct paint_state with per-side counters Message-ID: In-Reply-To: On Fri, 7 Aug 2026 at 05:02, Elijah Newren 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