Harald Nordgren's patch addresses branches merged on GitHub with 'Squash and merge' or 'Rebase and merge'. Their tips are not reachable from the upstream, so 'git branch --delete-merged' never removes them. The patch treats a branch as merged when some upstream commit since the fork point contains all of its changes. The output names that commit, for example 'Deleted branch topic (was 1a2b3c4, landed as 9f8e7d6)'.

The review concerns how to detect that. Phillip Wood said he had misremembered how 'merge --squash' works, and agreed with D. Ben Knoble that patch IDs are needed rather than trees in that case. Wood also noted that for a patch-based workflow like the one on this list, the individual commits must be looked for upstream, not the combined changes of the branch.

Nordgren asked whether the blobless-clone case should be handled now or left as a follow-up. Wood said he had not thought much about shallow clones. For partial clones, he thought it reasonable to fetch the blobs needed to compute patch IDs and to warn in the documentation that this can be slow.

Nordgren added that branches merged in his own repository get rewritten when Junio signs off on them, so they are not cleaned up without this functionality. The thread also drifted into a wish for broader cleanup commands. Nordgren would like a 'full-clean' command bundling 'delete-merged' and the prune commands with sensible defaults. Kristoffer Haugsbakk said he would like a solid delete operation that can run overnight, and that speed matters less to him.

The patch is at v1. Open points are patch-ID matching and the behavior in partial clones.