Skip to content

test(prune): correct the delaying-git-wrapper deletion-shape comment#3281

Merged
max-sixty merged 1 commit into
mainfrom
nightly/clean-28315343357
Jun 28, 2026
Merged

test(prune): correct the delaying-git-wrapper deletion-shape comment#3281
max-sixty merged 1 commit into
mainfrom
nightly/clean-28315343357

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Nightly code-quality sweep finding.

The write_delaying_git_wrapper comment in the step prune integration test described "three deletion shapes" and led with a branch -d <branch> bullet whose parenthetical was garbled ("force-delete via git branch -D from delete_branch_if_safe's force path was previously also covered by the -D alternative"). It read as though production emits a plain branch -d, which it doesn't.

delete_branch_if_safe (src/git/remove.rs) only ever emits two shapes after the #2903 atomic-CAS change:

  • branch -D <branch> — the force path (remove.rs:410) and the no-snapshot-SHA fallback (remove.rs:439).
  • update-ref -d refs/heads/<branch> <expected-sha> — the compare-and-swap path for integrated branches (remove.rs:474).

The wrapper still matches -d defensively ([ "$2" = "-d" ] || [ "$2" = "-D" ]), so this clarifies that the -d arm is a defensive match rather than something production produces.

Comment-only change — no behavior change and no regression test, since it touches only documentation of an existing test helper.

The comment claimed three deletion shapes and led with a garbled `branch -d`
bullet implying production emits a plain safe-delete. After the #2903 CAS
change, delete_branch_if_safe only emits `branch -D` or `update-ref -d`; the
wrapper's `-d` arm is a defensive match. Clarify accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@worktrunk-bot worktrunk-bot added the nightly-cleanup Issues found by nightly code quality sweep label Jun 28, 2026
@max-sixty max-sixty merged commit c367d11 into main Jun 28, 2026
35 of 44 checks passed
@max-sixty max-sixty deleted the nightly/clean-28315343357 branch June 28, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nightly-cleanup Issues found by nightly code quality sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants