Skip to content

Replace negated boolean variables with positive-polarity names - #1388

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

Extends the pattern from #1381 (foreground over !background) to three
remaining negation patterns in the codebase:

  • no_verify → verify in CommitOptions, step_commit, handle_squash, merge.rs — removes !verify inversions at the CLI boundary and double-negation checks like if !self.no_verify
  • skip_hooks → hooks_approved / no_verify → run_hooks in handle_switch, select, execute_switch — eliminates !skip_hooks double negation
  • skip_spacing → is_first in layout.rs — aligns variable name with try_allocate's parameter

No behavior changes — pure rename with polarity flip.

This was written by Claude Code on behalf of maximilian

Extends the pattern from #1381 (foreground over !background) to remaining
negation patterns: no_verify→verify, skip_hooks→hooks_approved,
no_verify→run_hooks in execute_switch, skip_spacing→is_first in layout.

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit a47bbad into main Mar 9, 2026
20 of 21 checks passed
@max-sixty
max-sixty deleted the remove-negations branch March 9, 2026 02:21
max-sixty added a commit that referenced this pull request Mar 9, 2026
Resolved conflict in src/main.rs: kept extracted handler functions,
incorporated verify polarity rename (!verify → verify) from #1388.

Co-Authored-By: Claude <[email protected]>
max-sixty added a commit that referenced this pull request Mar 9, 2026
…1393)

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_

Co-authored-by: Claude <[email protected]>
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