Skip to content

refactor: simplify merge command abstractions - #400

Merged
max-sixty merged 1 commit into
mainfrom
simplifications
Jan 3, 2026
Merged

max-sixty merged 1 commit into
mainfrom
simplifications

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Summary

  • Remove MergeCommandCollector struct wrapper → collect_merge_commands() function
  • Remove PreserveReason enum → inline message strings at use site
  • Remove trivial SwitchBranchInfo::branch() getter → direct field access

Uses positive flags (commit, verify) instead of negated ones (no_commit, no_verify) for clearer logic.

Net: 48 lines removed, no functional changes.

Test plan

  • All 376 unit tests pass
  • All 681 integration tests pass
  • All pre-commit lints pass (fmt, clippy, typos)
  • Code review: "Clean design" verdict

🤖 Generated with Claude Code

Remove unnecessary struct wrappers and enums that added indirection:

- MergeCommandCollector struct → collect_merge_commands() function
- PreserveReason enum → inline message strings
- SwitchBranchInfo::branch() trivial getter → direct field access

Uses positive flags (commit, verify) instead of negated ones (no_commit,
no_verify) for clearer logic.

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.

1 participant