Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/cleanup-branches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ for b in "${!candidates[@]}"; do
fi
done

git worktree prune
# `git worktree remove` above already drops the admin entry for anything it
# actually removes. `prune` is a real mutation (not a preview), and on at
# least one Windows/Git-Bash setup it has misjudged untouched, still-present
# worktrees as stale and wiped their registration — so it must never run
# under --dry-run, which promises to "change nothing".
((DRY_RUN)) || git worktree prune

if ((DO_REMOTE)); then
echo "== remote branches merged into origin/$DEFAULT_BRANCH =="
Expand Down