From: Phillip Wood Date: Thu, 08 Oct 2026 15:25:39 GMT Subject: Re: [PATCH] branch: let --delete-merged find squash merged branches Message-ID: <61ae371a-225c-4400-b878-8547547d1269@gmail.com> In-Reply-To: Hi Harald On 04/10/2026 23:28, Harald Nordgren wrote: > ... >> If you know your repository only has squash merges that were not rebased >> it would be a lot more efficient to just look at the trees and >> merge-bases, especially in a blobless clone. Having an option to turn >> off the patch-id based detection would probably be useful in that case. > > Maybe yes, but for users I imagine they want the interface to be as > simple as possible. Agreed, they also don't want to wait to find squashed merges they know they do not have. > I'm iterating on the code on my side (sharing logic between branches, > etc) and it became fast on my local Git repo. If there are no > performance concerns then would we still want the option to turn it > off? Even an efficient implementation is going to be a lot slower when it is trying to find branches that have been squashed, so I think we probably do want a way to turn it off. That's especially true in partial clones where we'll have to download a bunch of blobs to do the squash detection. So long as it isn't diabolically slow enabling it by default is probably fine. Thanks Phillip