git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] commit-reach: early exit paint_down_to_common for single merge-base

From
Patrick Steinhardt <ps@pks.im>
Date
May 11, 2026, 12:04 UTC
Message-ID
<agHFxwc_L64hTL7i@pks.im>
In-Reply-To
<pull.2109.v3.git.1778498532730.gitgitgadget@gmail.com>
On Mon, May 11, 2026 at 11:22:12AM +0000, Kristofer Karlsson via GitGitGadget wrote:
Show 15 quoted lines
>     Changes since v2 (thanks Patrick for the suggestion):
>     
>      * Replaced the boolean find_all and ignore_missing_commits parameters
>        in paint_down_to_common() with a single enum merge_base_flags
>        mb_flags, reducing the function from 8 to 7 parameters. The enum is
>        defined in commit-reach.h with MERGE_BASE_FIND_ALL and
>        MERGE_BASE_IGNORE_MISSING_COMMITS.
>     
>      * Named the enum merge_base_flags rather than
>        paint_down_to_common_flags since the flags express caller intent and
>        are threaded through multiple layers including the public
>        repo_get_merge_bases_many_dirty() API.
>     
>      * Used mb_flags as the parameter name to avoid shadowing the existing
>        local int flags (commit object flags) inside paint_down_to_common().

Thanks for making these changes. I think it would make sense to split this up into two commits though, where the first commit only introduces the new enum (without the new flag) and the second commit then adds the new flag and the performance optimization.

That'd help quite a bit with the review as it splits up the changes into a refactoring-only change without any intended semantic change, and another commit that then does result in a user-visible change.

Patrick
Previous: Kristofer Karlsson via GitGitGadgetNext: Kristofer Karlsson via GitGitGadget
Message 6 of 11 in “commit-reach: early exit paint_down_to_common for single merge-base”
  1. commit-reach: early exit paint_down_to_common for single merge-baseKristofer Karlsson via GitGitGadget, May 8, 2026
  2. Junio C HamanoMay 11, 2026
  3. commit-reach: early exit paint_down_to_common for single merge-baseKristofer Karlsson via GitGitGadget, May 11, 2026
  4. Patrick SteinhardtMay 11, 2026
  5. commit-reach: early exit paint_down_to_common for single merge-baseKristofer Karlsson via GitGitGadget, May 11, 2026
  6. Patrick SteinhardtMay 11, 2026
  7. 0/2 [RFC] commit-reach: skip STALE drain when only one merge-base neededKristofer Karlsson via GitGitGadget, May 11, 2026
  8. 1/2 commit-reach: introduce merge_base_flags enumKristofer Karlsson via GitGitGadget, May 11, 2026
  9. 2/2 commit-reach: early exit paint_down_to_common for single merge-baseKristofer Karlsson via GitGitGadget, May 11, 2026
  10. Junio C HamanoMay 12, 2026
  11. Kristofer KarlssonMay 12, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.