Prune: delete merged branches and offer to force dirty worktrees #56
No reviewers
Labels
No labels
bug
docs
enhancement
good first issue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pedromcaraujo/forge!56
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "prune-merged-branches"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Prune only closed clean worktrees and always kept branches. In #nixos there were no worktrees at all, just 28 leftover local branches (shown as reopenable in the Create worktree step), so Prune said "No clean worktrees" and did nothing.
git cherry. Unmerged branches are never deleted. Each delete is guarded by the sha that was checked, so a branch that moved in the meantime is kept./worktrees/prunetakesforce. If any worktrees have uncommitted changes, the launcher asks separately ("Remove them anyway? Those changes are lost") before passing it.Test plan
forcedry run and a real run delete the merged branches (27 of the 28) and keepupload-forge, the unmerged worktree's branch and the dirty worktree when not forcedindex.htmlscript passes a JS syntax checkupload-forge