Harald Nordgren's series addresses a gap in git branch --delete-merged. Branches merged on GitHub with "Squash and merge" or "Rebase and merge" are never deleted, because the upstream holds rewritten copies of their work and the branch tips are not reachable from it.

The patch in this thread 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)". A later revision adds a separate --delete-integrated option that also deletes a branch when an upstream commit has the branch's version of every file it changed. The newest patch in the thread extends the check to the case where upstream also changed those files. It merges the branch's version of each file into the upstream one and checks whether anything changes.

Junio C Hamano commented that the changes between v8 and v9 looked OK, while noting that this said nothing about earlier versions or the --delete-merged base. He also asked whether a reported corner case was the only one needing a fix, saying he hoped the author would find more corner cases himself.

On naming, Hamano called a patch title overlong and awkward. He suggested "rebased or squash-merged branches". He asked whether the deleteMerged configuration variable affects --delete-integrated, and suggested a single .deleteDone variable governing both. On a helper for per-branch opt-out, he warned that a name tied to "deleteMerged" would be regretted if other destructive operations need exemptions. He suggested either naming it for that operation or making it a boolean such as branch_opted_out("main", "deleteMerged"), free of operation-specific side effects.

Hamano also wondered whether --dry-run combined with --quiet makes sense, since a user previewing an operation probably wants output. He liked an empty if body used to suppress output under --quiet, and suggested swapping the order of the dry-run and quiet checks. The naming and configuration questions remain open.