GitoxideLabs/gitoxide · error
the rebase todo uses an unsupported state version
Error message
the rebase todo uses an unsupported state version
What it means
`parse_state` scans a rebase todo file for the tix state anchor `<!-- tix-rebase-state-<version> ... -->`. If the text contains a state marker of some version but not the exact `STATE_START` prefix this build understands, the todo was produced by a different (newer or older) tix version and parsing is refused rather than misinterpreted.
Solutions
- Use the same tix version that wrote the todo to finish or abort the rebase.
- Abort the in-progress rebase and restart it with the current tix version.
- Regenerate the state anchor by re-running the rebase preparation with the installed tix.
- Check the anchor's version in the todo file and compare it with your tix build's supported version.
Example fix
// before: todo contains "<!-- tix-rebase-state-v9 ..." but binary expects v2 let state = parse(repo, todo_text)?; // bails: unsupported state version // after: finish/abort with the matching tix version first // $ tix-<matching-version> rebase --abort let state = parse(repo, fresh_todo_text)?;
Defensive patterns
Strategy: fallback
Validate before calling
let supported = "<!-- tix-rebase-state-v2 "; // match STATE_START of your build
if todo_text.contains("<!-- tix-rebase-state-") && !todo_text.contains(supported) {
anyhow::bail!("todo written by a different tix version");
} Try / catch
match parse(repo, todo_text) {
Ok(s) => s,
Err(e) if e.to_string().contains("unsupported state version") => {
// fall back to the matching tix binary or abort/restart the rebase
}
Err(e) => return Err(e),
} Prevention
- Use one tix version across the team and CI
- Finish or abort in-progress rebases before upgrading tix
- Check the state anchor version string before changing binaries
When it happens
Trigger: Running `parse` on a todo file written by a tix version with a different state-anchor format version — the literal `<!-- tix-rebase-state-` appears but doesn't match the expected `STATE_START` constant (e.g. version bumped from v1 to v2).
Common situations: Upgrading or downgrading the tix binary while an in-progress rebase todo from another version is on disk; mixing tix versions between teammates or CI and a local checkout; a hand-edited todo that corrupted the version suffix.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- the rebase todo contains more than one state anchor
- the rebase state has more than one base
- the rebase state has more than one onto target
- cannot find character that we didn't search for
- (re-raised revision-spec parse error via bail!(err))
AI-assisted analysis of GitoxideLabs/gitoxide@e73179060b (2026-09-08).
Data as JSON: /api/errors/1a500153582bce29.
Report an issue: GitHub.
Appendix: source
Thrown at gix-tix/src/edit/todo.rs:658
}
}
fn short(repo: &gix::Repository, id: ObjectId, show_change_id: bool) -> Result<String> {
if show_change_id {
crate::change_id::display_short(repo, id).context("could not format a rebase todo ID")
} else {
Ok(id
.attach(repo)
.shorten()
.context("could not shorten a rebase todo ID")?
.to_string())
}
}
fn parse_state(repo: &gix::Repository, input: &str) -> Result<Option<State>> {
let Some(start) = input.find(STATE_START) else {
if input.contains("<!-- tix-rebase-state-") {
anyhow::bail!("the rebase todo uses an unsupported state version");
}
return Ok(None);
};
let body = &input[start + STATE_START.len()..];
let end = body
.find(STATE_CLOSE)
.context("the rebase state anchor is not closed")?;
if body[end + STATE_CLOSE.len()..].contains(STATE_START) {
anyhow::bail!("the rebase todo contains more than one state anchor");
}
let mut base = None;
let mut onto = None;
let mut tips = Vec::new();
let mut scope = Vec::new();
let mut marker_required = None;
let mut checkout_allowed = None;
let mut head_ref = None;
let mut edit_refs = false;View on GitHub (pinned to e73179060b)