Re: [PATCH v4 0/8] commit-reach: terminate merge-base walk when one side is exhausted
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Jun 28, 2026, 15:16 UTC
- Message-ID
- <48bfdb11-2624-4aa6-8fbd-d3f894c33bcc@gmail.com>
- In-Reply-To
- <pull.2149.v4.git.1782649547.gitgitgadget@gmail.com>
On 6/28/26 8:25 AM, Kristofer Karlsson via GitGitGadget wrote:
Show 10 quoted lines
> commit-reach: terminate merge-base walk when one paint side is exhausted > > Optimize paint_down_to_common() for merge-base queries that hit large > one-sided histories. > > When the walk from one side reaches a commit with a very low generation > number that the other side never paints, the walk is forced to drain most of > the graph. A common trigger is a repository import that grafts a separate > history with its own root, but any merge that introduces a low-generation > commit never painted by the other side has the same effect.
Show 13 quoted lines
> Changes since v3: > > * Fixed BUG assertion that was accidentally made unconditional in v3: > restored the min_generation guard so it only fires when generation-based > ordering is active. > > * Moved generation cutoff and single-result termination conditions into the > documentation in patch 1/8, since they describe existing behavior. > > * Renamed paint_state counter fields for clarity: p1_count -> > parent1_count, p2_count -> parent2_count, pending_merge_bases -> > mb_candidate_count. Changed counter types from int to size_t. (Suggested > by Rene Scharfe.)
I reviewed the v3 discussion, the range-diff, and reread patch 8. I think that this version is good to go.
Thanks for your hard work! -Stolee