Skip to content

Fix what the review of the held-branch work found - #8

Merged
skunkworker merged 1 commit into
masterfrom
jb/2026_10_10_remote_delete_rules
Oct 11, 2026
Merged

skunkworker merged 1 commit into
masterfrom
jb/2026_10_10_remote_delete_rules

Conversation

@skunkworker

Copy link
Copy Markdown
Owner

A /code-review of #7 found 15 issues (items 19 to 33 in docs/test-coverage-gaps.md). Each fix has a test that fails with the fix taken out. The git facts behind 19, 23 and 24 were reproduced in throwaway repos first.

  • r and pull requests: r now refuses an upstream that is not a branch, such as refs/pull/1/head. Before, it pushed the delete of a teammate's branch with the tracking name.
  • Protection: pruner.protect globs match both the name a row shows and the name on the remote. Each remote's trunk, from <remote>/HEAD, is protected, not only the default remote's.
  • Confirm screen: it names the remote branch that a renamed row deletes. A refusal from r no longer stays on screen.
  • Held branches: linked worktrees are listed, not globbed, so [, * or ? in the repo path no longer hides them. BISECT_START counts only while BISECT_LOG exists, as in git. The check no longer needs git 2.31.
  • c on a remote row: a remote named team/a gives x from team/a/x, not a/x.
  • Partial clones: git switch runs with no terminal, so ssh cannot prompt over the screen. Commit counts keep the local cap of 8, not the push cap of 3.
  • No freeze: commit counts run off the update loop: every reload's merge queries, and the count d starts. d opens the confirmation screen when they land.
  • Failed counts: a riskFailed flag, not -1 in the count field. Every "commits at risk" check uses atRisk().

One new item, 34, is open: the force retry still runs deletes and pushes inside Update.

Tests: 3 new, and new cases in existing tests. 108 in total, passing under -race.

🤖 Generated with Claude Code

A /code-review of #7 found 15 issues, items 19 to 33 in
docs/test-coverage-gaps.md. Each fix has a test that fails without it.

- r refuses an upstream that is not a branch, such as a pull request
  head. It pushed the delete of a teammate's branch with the tracking
  name.
- pruner.protect globs match both the name a row shows and the name on
  the remote. Each remote's trunk, from <remote>/HEAD, is protected.
- The confirm screen names the remote branch a renamed row deletes. A
  refusal from r no longer stays on screen.
- The held-branch check lists linked worktrees instead of globbing the
  repo path, trusts BISECT_START only while BISECT_LOG exists, and no
  longer needs git 2.31.
- c makes x from team/a/x when a remote name holds a slash.
- In a partial clone, git switch runs with no terminal, and commit
  counts keep the local cap of 8.
- Commit counts run off the update loop: every reload's merge queries,
  and the count d starts. A slow partial clone no longer freezes the
  screen.
- A failed count is a riskFailed flag, not -1 in the count field.

One new item, 34, is open: the force retry still runs deletes and
pushes inside Update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@skunkworker
skunkworker merged commit 40383a7 into master Oct 11, 2026
2 checks passed
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.

1 participant