Re: [PATCH/RFC 1/6] commit-reach: decouple ahead_behind from nonstale_queue
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Jun 22, 2026, 18:00 UTC
- Message-ID
- <001e8da6-3232-4cfa-ba6b-35d3489e4779@gmail.com>
- In-Reply-To
- <5492acda0ad05eab67198880a5262e84a3f22ba6.1781951820.git.gitgitgadget@gmail.com>
On 6/20/2026 6:36 AM, Kristofer Karlsson via GitGitGadget wrote:
Show 9 quoted lines
> From: Kristofer Karlsson <krka@spotify.com> > > Move ahead_behind() off the shared nonstale_queue abstraction to use > a plain prio_queue with a local max_nonstale pointer. The nonstale > tracking is inlined into insert_no_dup(). > > This prepares for replacing nonstale_queue with a paint_queue struct > that tracks per-side commit counts, which ahead_behind() does not > need. No behavior change.
This change is only needed if we are intending to delete the nonstale queue struct, which is currently happening in your patch 2. But we are essentially recreating its logic in a more disjointed way here, leaving this code in a worse state.
I'd rather see patch 2 create a _new_ data structure instead of _replacing_ one that already works for multiple callers. (It does drop to only one caller, but that seems cleaner to me right now.)
Thanks, -Stolee