Re: [PATCH] branch: let --delete-merged find squash merged branches
Hi Ben
On 08/10/2026 18:51, D. Ben Knoble wrote:
Show 22 quoted lines
> On Sun, Oct 4, 2026 at 5:54 AM Phillip Wood <phillip.wood123@gmail.com> wrote:
>>
>> If we have
>>
>> (topic) D - C - B - A
>> \
>> (main) M - Q - P - O -
>> \ /
>> - - S - -
>>
>> where M is a squashed merge of topic I think we have
>>
>> M^2^{tree} == topic^{tree}
>> Merge-base(M^1, M^2) == Merge-base(topic, topic@{upstream})
>> $(git rev-list --count --right-only M^1...M^2) == 1
> > Perhaps we are thinking of 2 different things? In practice when I see
> a merge created using GitHub's squash and merge option (and, I think,
> also when using `merge --squash`), there is no second parent. You
> could instead just get
> > (main) S - Q - P - O
> > where S is A+B+C+D applied to Q (i.e., closer to a cherry-pick with
> --no-commit).Oh, you're right, I'd misremembered how "merge --squash" worked.
> And we know that S is not necessarily tree-same to topic's D, so…?
I agree we need to use patch ids rather than trees in that case.
Thanks
Phillip