GitoxideLabs/gitoxide · error
unsupported rebase todo command
Error message
unsupported rebase todo command {verb:?} What it means
Terminal validation arm in `edit::todo::parse`: after handling the recognized verbs (`pick`, `empty`, `squash`, `reset`, etc.), any remaining unknown command word causes this bail with the offending verb quoted. The rebase-todo grammar only accepts a fixed verb set, so a typo, a git-rebase verb the tool doesn't support (e.g. `exec`, `fixup` variants), or a corrupted line triggers it. Fix by correcting the verb to one of the supported commands or deleting the line.
Solutions
- Use only the supported verbs in the todo (e.g. pick, squash, empty)
- Rewrite unsupported git verbs (fixup/reword/exec/drop) into supported equivalents before parsing
- Fix typos in the command verb
Example fix
// before fixup abc123 // after squash abc123
Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED: [&str; 3] = ["pick", "squash", "empty"];
for line in todo.lines() {
if let Some(verb) = line.split_whitespace().next() {
if !SUPPORTED.contains(&verb) {
anyhow::bail!("unsupported verb {verb}; use pick, squash, or empty");
}
}
} Type guard
fn is_supported_verb(verb: &str) -> bool {
matches!(verb, "pick" | "squash" | "empty")
} Try / catch
match parse_plan(...) {
Err(e) if e.to_string().contains("unsupported rebase todo command") => { /* rewrite unsupported verbs */ }
other => other?,
} Prevention
- Translate git-generated verbs (fixup, reword, exec, drop) into supported ones before parsing
- Validate verbs against the supported set before calling the parser
- Avoid feeding raw `git rebase -i` todo files directly into this API
When it happens
Trigger: `parse_plan` encounters a verb like `reword`, `fixup`, `exec`, `drop`, `label`, or a typo such as `pik`, in the todo text.
Common situations: Feeding a git-generated todo (which contains `pick`, `exec`, `fixup`, etc.) directly into this stricter editor API; typos; scripts emitting non-standard verbs; locale or alias differences.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- the rebase todo contains more than one @ command
- a commit is picked more than once
- rebase todo requires at least one -x/--hide revision when…
- the hidden and visible revisions have no editable fork point
- the revisions have multiple editable fork points
AI-assisted analysis of GitoxideLabs/gitoxide@e73179060b (2026-09-08).
Data as JSON: /api/errors/e2de58b75c132c2c.
Report an issue: GitHub.
Appendix: source
Thrown at gix-tix/src/edit/todo.rs:992
anyhow::bail!("a pick is outside the editable history");
}
if picked.contains_key(&id) {
anyhow::bail!("a commit is picked more than once");
}
if resolved {
rebase::PlanCommit::Resolved(id)
} else {
rebase::PlanCommit::Pick(id)
}
}
"empty" => {
let title = if value.trim().is_empty() { tail } else { value.trim() };
if title.is_empty() {
anyhow::bail!("an empty commit needs a title");
}
rebase::PlanCommit::Empty(BString::from(title))
}
_ => anyhow::bail!("unsupported rebase todo command {verb:?}"),
};
let index = steps.len();
if let rebase::PlanCommit::Pick(id) | rebase::PlanCommit::Resolved(id) = commit {
picked.insert(id, index);
}
steps.push(rebase::PlanStep {
parent,
commit,
squash: Vec::new(),
});
cursor = Some(rebase::PlanParent::Step(index));
section_last_step = Some(index);
if marked {
let target = rebase::PlanParent::Step(index);
if checkout_target.is_some_and(|checkout| checkout != target) {
anyhow::bail!("the @ command and @ reference point to different results");
}
checkout_target = Some(target);View on GitHub (pinned to e73179060b)