Skip to content

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

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

aeppling merged 1 commit into
rtk-ai:masterfrom
axelbellec:master

Conversation

@axelbellec

@axelbellec axelbellec commented Feb 18, 2026 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

thehoff pushed a commit to thehoff/contextcrawler that referenced this pull request May 14, 2026
fix(git): support multiple -m flags in git commit
thehoff added a commit to thehoff/contextcrawler that referenced this pull request Oct 12, 2026
Ten commits closing rtk-ai#202, rtk-ai#198, rtk-ai#199, #190 (stale), rtk-ai#203 (dup), rtk-ai#195 (nl
slice), rtk-ai#237, rtk-ai#207 and rtk-ai#236.

Council: codex reviewed the branch — VERDICT SHIP, no criticals, no highs.
Its fail-open audit of the read cache came back clean across session-ID
spoofing, TOCTOU, symlink swap and --force semantics. Six findings acted
on in 12e71b3, including two accuracy corrections to my own docs. The
mmax second opinion had not returned at merge time; the Hoff authorised
proceeding.

The most serious defect on the branch was found by driving the binary,
not by review: a read truncated by the large-file cap was later stubbed
as though the whole file had been delivered, reporting 65,723 tokens the
agent had never seen. Fixed in 6db09ad.

Suite: 3399 passing, 0 failing — including the 21 hooks tests that failed
on any machine whose umask is not 022 before this branch.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HXCRs8F7G1fFqYczid9cu7
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