Skip to content

Rename no_delete_branch to keep_branch, add approval-declined tests - #1393

Merged
max-sixty merged 1 commit into
mainfrom
remove-negations
Mar 9, 2026
Merged

max-sixty merged 1 commit into
mainfrom
remove-negations

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Follow-up to #1388. Renames the negated no_delete_branch parameter to
positive keep_branch at function boundaries (handle_remove,
handle_remove_current, BranchDeletionMode::from_flags). Call sites in
main.rs continue passing !delete_branch — the CLI field name is tied
to clap's --no-delete-branch flag.

Adds PTY tests for the approval-declined code paths in step_commit and
handle_squash that were flagged as uncovered by codecov in #1388. These
cover the if !approved { false } branches where users decline hook
approval prompts.

This was written by Claude Code on behalf of @max-sixty

Rename the negated `no_delete_branch` parameter to positive `keep_branch`
in `handle_remove`, `handle_remove_current`, and `BranchDeletionMode::from_flags`.

Add PTY tests covering the approval-declined code paths in `step_commit`
and `handle_squash` — the "Commands declined, committing/squashing without
hooks" branches that were previously uncovered.

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit 9a6007c into main Mar 9, 2026
22 checks passed
@max-sixty
max-sixty deleted the remove-negations branch March 9, 2026 03:15
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.

2 participants