feat(branch): cleanup --local deletes merged local branches only when git itself would
pkgmgr branch cleanup --local [--apply] [--json] [--merged-into REF] deletes local branches whose tip is an ancestor of the remote-tracking default or a --merged-into ref, each with update-ref against the planned sha. It keeps every branch git branch --delete-merged keeps: symbolic, checked out or registered in any worktree, under a rebase or bisect, deleteMerged=false in any worktree, system or global config, and the local upstream of any branch that stays. Git runs without inherited GIT_* variables except the ceiling; the keep reads run once with the caller's config variables and once with the default system and passwd-home config, so the environment can add keeps but never remove one. Repositories with symlinked refs, foreign worktree registrations or unreadable holds are refused with the plan still printed. MEDUSA: MEDUSA-OUTPUT-SQL-003 at branch_cmd.py:121 accepted after an independent review: the SQL comment+DELETE regex matched the help text --merged-into and the git key deleteMerged; no SQL in the change. 🎯 Fix: 92 % 💥 Break: 5 % 💸 Cost: 100 % ⏱️ Time: 100 % 🛡️ Security: 100 % 🏆 Score: 87 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
814322f8f5
commit
0d88c69c51
7 files changed
+2783
-37
No files matched your search
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user