Skip to content

fix(git): support multiple -m flags in git commit#203

Merged
aeppling merged 1 commit intortk-ai:masterfrom
axelbellec:master
Feb 19, 2026
Merged

fix(git): support multiple -m flags in git commit#203
aeppling merged 1 commit intortk-ai:masterfrom
axelbellec:master

Conversation

@axelbellec
Copy link
Contributor

@axelbellec axelbellec commented Feb 18, 2026

Summary

  • Change message: String to message: Vec<String> in Clap definition so repeated -m flags are accepted
  • Extract build_commit_command() helper for testability
  • Add 6 tests: 3 Clap parsing tests (single, multiple, long flag) + 3 unit tests on command construction

Closes #202

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test --all (399 tests pass)
  • Manual: rtk git commit -m "title" -m "body" produces multi-paragraph commit

@pszymkowiak
Copy link
Collaborator

Thank you! The code looks great — String → Vec with build_commit_command() helper is the right approach. 6 solid tests.

There's a merge conflict with master (likely from #194 which just landed). Could you rebase on master? The conflict should be straightforward. Once resolved, LGTM to merge.

Change message from String to Vec<String> so Clap accepts repeated
-m flags, matching native git behavior for multi-paragraph commits.
Extract build_commit_command() for testability. Add 6 tests covering
Clap parsing and command construction. Closes rtk-ai#202.
@axelbellec
Copy link
Contributor Author

Rebased on master, conflict in src/git.rs resolved (kept both branch creation tests from #194 and commit message tests). 402 tests pass. Ready to merge!

@aeppling
Copy link
Contributor

Ok for merge, cicd need to pass first

@aeppling aeppling merged commit 292225f into rtk-ai:master Feb 19, 2026
2 of 3 checks passed
@axelbellec
Copy link
Contributor Author

@aeppling just a heads-up → CI/CD was already failing on previous merges:
https://github.com/rtk-ai/rtk/actions/runs/22161017208/job/64077476768

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.

git commit rejects multiple -m flags

3 participants