Jasper Mayone keeps one worktree per topic. When a topic lands, its branch stays checked out in that worktree, so "git branch --delete-merged" skips it, and there is no direct way to ask which worktrees are done. He had said in the --delete-merged squash thread that he would send an RFC.

The patch teaches "git worktree list" the --merged and --no-merged filters that "git branch", "git tag" and "git for-each-ref" already have, applied to the HEAD of each worktree. The command only lists. Removing worktrees remains a separate step.

A second message adds a "--branch=<branch>" option that lists only the worktrees with the given branch checked out. It can be given more than once, and a worktree that is rebasing or bisecting the branch counts, as it does for "git branch -d" and "git worktree add". Mayone says this keeps the choice of branches in "git branch", which already has --merged, --contains, --points-at and patterns. Without it, a script must parse the whole "git worktree list --porcelain" output and match the "branch" lines itself.

Harald Nordgren, Junio Hamano, Kristoffer Haugsbakk and Eric Sunshine have taken part in the thread, but their comments are not in the excerpts. The RFC's fate is open.