Skip to content

repo-hygiene: git-branch-audit candidate logic counts branches checked out in linked worktrees — deletion would break them #997

Description

@kyle-sexton

Problem

Branch-audit candidates derived from --merged / upstream [gone] include branches currently checked out in linked PR worktrees (ghq sibling-worktree layout makes this the common case: e.g. feat/do-not-merge-gate merged into default yet checked out in ci-workflows-pr-do-not-merge-gate). git branch -d on such a branch fails or, forced, breaks the worktree.

Fix direction

Subtract git worktree list --porcelain branches from the candidate set; render them as a separate "checked out in worktree — clean up the worktree first" bucket routed to the worktree-management tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumReal value, no hard deadline; normal backlog flow.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions