-
Notifications
You must be signed in to change notification settings - Fork 346
Closed
Description
Problem
rtk git commit rejects multiple -m flags, which is valid native git syntax for multi-paragraph commit messages:
git commit -m "title" -m "body paragraph"RTK error:
error: the argument '--message <MESSAGE>' cannot be used multiple times
Usage: rtk git commit [OPTIONS] --message <MESSAGE>
Root Cause
In src/main.rs:574-575, the Clap definition for Commit declares message as a single String:
Commit {
#[arg(short, long)]
message: String,
},Clap treats this as a single-value argument, rejecting repeated -m flags.
Fix
Change message to Vec<String> to accept multiple -m values, then pass each one individually to git commit:
// main.rs
Commit {
#[arg(short, long)]
message: Vec<String>,
},
// git.rs - run_commit
for msg in &messages {
cmd.args(["-m", msg]);
}This matches native git behavior where multiple -m values are concatenated as separate paragraphs.
Reproduction
rtk git commit -m "title" -m "body"
# error: the argument '--message <MESSAGE>' cannot be used multiple timesReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels