test(prune): correct the delaying-git-wrapper deletion-shape comment#3281
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nightly code-quality sweep finding.
The
write_delaying_git_wrappercomment in thestep pruneintegration test described "three deletion shapes" and led with abranch -d <branch>bullet whose parenthetical was garbled ("force-delete viagit branch -Dfromdelete_branch_if_safe's force path was previously also covered by the-Dalternative"). It read as though production emits a plainbranch -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
-ddefensively ([ "$2" = "-d" ] || [ "$2" = "-D" ]), so this clarifies that the-darm 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.