Re: [PATCH v2 0/2] branch: let --delete-merged find squash merged branches
- From
Harald Nordgren <haraldnordgren@gmail.com>
- Date
- Oct 18, 2026, 15:09 UTC
- Message-ID
- <CAHwyqnXNyM+qaxggQOiW+jE5U6B=jOOcv=KGz-2XS7jnB2j-uw@mail.gmail.com>
- In-Reply-To
- <xmqq4ieqamn0.fsf@gitster.g>
Show 12 quoted lines
> At least the one-to-one part of the operation should learn from what > Dscho did in range-diff, especially the part that does take > similarity of the log messages and authorship information, instead > of paying attention only to patch IDs. I am not convinced that > one-to-one rebase implemented as a subset of squash merge would > perform sufficiently well, either. From the user interface angle, > it also is not clear to me if a single --delete-merged that enables > all variants by default with individual knob to optionally disable > one variant (squash) would be a good extensible one, when we may > need to deal with the third (and other) kinds of ways to integrate > your work without preserving the commit identity, like selective > cherry-picks.
I tried a range-diff solution locally, pairing commits with range-diff for rebases (and moving the squash search behind an opt-in flag). As far as I can tell range-diff pairs commits on the diff alone, and the log message and author only show up in its output, so it didn't help with matching here.
On speed it went the other way. On my clone with 65 branches, v2 takes about 0.5s and finds 14 branches to delete. The range-diff version takes about 10s, finds the same.
Harald