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

Re: [PATCH] branch: let --delete-merged find squash merged branches

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Oct 9, 2026, 13:34 UTC
Message-ID
<da5d6d28-b64b-4cfa-9998-93c69720b3c6@gmail.com>
In-Reply-To
<CALnO6CB2qPtv6Cr4LL1x=ZPmD_zLw1GzLUKgXE-NcTWObbiLkA@mail.gmail.com>
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
Previous: D. Ben Knoble
Message 23 of 23 in “branch: let --delete-merged find squash merged branches”
  1. branch: let --delete-merged find squash merged branchesHarald Nordgren via GitGitGadget, Sep 29, 2026
  2. Kristoffer HaugsbakkSep 29, 2026
  3. Harald NordgrenSep 29, 2026
  4. Kristoffer HaugsbakkSep 29, 2026
  5. D. Ben KnobleSep 29, 2026
  6. Kristoffer HaugsbakkSep 29, 2026
  7. D. Ben KnobleSep 29, 2026
  8. Harald NordgrenSep 29, 2026
  9. Harald NordgrenSep 29, 2026
  10. D. Ben KnobleSep 29, 2026
  11. Harald NordgrenSep 29, 2026
  12. Phillip WoodOct 4, 2026
  13. Harald NordgrenOct 4, 2026
  14. Phillip WoodOct 8, 2026
  15. Harald NordgrenOct 8, 2026
  16. Kristoffer HaugsbakkOct 9, 2026
  17. Harald NordgrenOct 9, 2026
  18. Harald NordgrenOct 9, 2026
  19. Phillip WoodOct 9, 2026
  20. Phillip WoodOct 9, 2026
  21. Harald NordgrenOct 9, 2026
  22. D. Ben KnobleOct 8, 2026
  23. Phillip WoodOct 9, 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.