Skip to content

Recognize squash-merged branches during prune#400

Merged
codeforester merged 1 commit into
masterfrom
bug/399-20260601-squash-merged-prune
Jun 1, 2026
Merged

Recognize squash-merged branches during prune#400
codeforester merged 1 commit into
masterfrom
bug/399-20260601-squash-merged-prune

Conversation

@codeforester
Copy link
Copy Markdown
Owner

Summary

  • Teach branch/worktree prune to treat merged GitHub PR state as a cleanup-safe signal when Git ancestry fails after squash merges.
  • Keep Git ancestry as the first/offline path and keep the conservative skip behavior when GitHub cannot confirm a merge.
  • Delete GitHub-confirmed squash-merged local branches with force-delete only after the PR merge signal makes them safe.
  • Add BATS coverage for squash-merged branch and worktree cleanup.

Validation

  • bash -n cli/bash/commands/basectl/subcommands/gh.sh
  • bats cli/bash/commands/basectl/tests/gh.bats
  • env -u BASE_HOME HOME=/private/tmp/base-review-home BASE_TEST_PYTHON=/Users/rameshhp/.base.d/base/.venv/bin/python bin/base-test
  • git diff --check

Closes #399

@codeforester codeforester merged commit 21be37b into master Jun 1, 2026
16 checks passed
@codeforester codeforester deleted the bug/399-20260601-squash-merged-prune branch June 1, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make prune cleanup recognize squash-merged PR branches

1 participant