Re: [PATCH v3 0/3] branch: let --delete-merged find squash merged branches
- From
D. Ben Knoble <ben.knoble@gmail.com>
- Date
- Oct 22, 2026, 12:59 UTC
- Message-ID
- <CALnO6CCpjhGoc+MOikVqtfRr2CJV-ayuLGZhEmwLXHEGML7yAw@mail.gmail.com>
- In-Reply-To
- <pull.2425.v3.git.git.1792585717.gitgitgadget@gmail.com>
On Wed, Oct 21, 2026 at 8:28 AM Harald Nordgren via GitGitGadget <gitgitgadget@gmail.com> wrote:
Show 15 quoted lines
> > Branches merged on GitHub with "Squash and merge" or "Rebase and merge" are > never deleted by git branch --delete-merged, because their tips are not > reachable from the upstream. This treats such a branch as merged when some > upstream commit contains all of its changes, and names that commit in the > output: > > Deleted branch topic (was 1a2b3c4, landed as 9f8e7d6). > > > This series finds the first upstream commit since the fork point that has > the branch's version of every file the branch changed, comparing only object > ids. With --squashed, a file that upstream also changed counts when merging > the branch's version into upstream's leaves it unchanged. Timed on my clone > with 65 branches, this takes 0.5s.
> Harald Nordgren (3): > branch: move the deleteMerged opt-out check into a helper > branch: let --delete-merged find rebase merged branches > branch: add --squashed to find squash merged branches
I hope you'll have a moment to consider my reply in <https://lore.kernel.org/git/CALnO6CAsCvJRywkw0WpO1nEhL+yU2-r_4Z2AHdJch1m=NK8=TA@mail.gmail.com/T/#m5244d4a2781578b3058c4cef272a2014291ab85e> wrt the CLI. Perhaps a modifier in --delete-merged's value would be better than another --option that modifies how it behaves?