GitoxideLabs/gitoxide · error
rebase todo requires at least one -x/--hide revision when…
Error message
rebase todo requires at least one -x/--hide revision when no remote HEAD maps to a local branch
What it means
`gix_tix::command::rebase::prepare` determines the rebase base from hidden revisions via `history::available_hidden_revisions`. If no `-x/--hide` revision resolves to a local branch (and auto-hide cannot supply one from a remote HEAD), the base cannot be inferred and it bails. A rebase todo needs exactly this hidden base to be constructed.
Solutions
- Pass at least one `-x/--hide <revision>` naming an existing local branch (the intended base).
- Set up a remote HEAD that maps to a local branch so auto-hide can infer the base.
- Drop `--no-auto-hide` if automatic base inference was intended.
- Fix revisions listed in `warning: ignoring unavailable hidden revision ...` output.
Example fix
// before gix tix rebase todo --no-auto-hide // after gix tix rebase todo -x origin/main-base
Defensive patterns
Strategy: validation
Validate before calling
// Ensure at least one -x revision resolves to a local branch before rebase todo.
if hide_args.is_empty() && (no_auto_hide || !remote_head_maps_local_branch(repo)) { return Err("provide -x base"); } Try / catch
match prepare(repo, &args) { Err(e) if e.to_string().contains("rebase todo requires at least one -x/--hide") => { /* inject explicit -x base revision and retry */ } other => other } Prevention
- Always pass an explicit -x base revision in automated rebases.
- Verify remote HEAD → local branch mapping when relying on auto-hide.
- Resolve all -x revision names before invoking the command.
When it happens
Trigger: Running a `gix tix rebase todo` variant without `-x/--hide` while `--no-auto-hide` is set, or with only `-x` revisions that are unavailable, so `hide.is_empty()` after resolution.
Common situations: Repositories without remotes where auto-hide has nothing to derive from; typos in the `-x` revision name; scripted rebase invocations copied from setups that relied on remote HEAD auto-hide.
Understand the failure class
Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.
Related errors
- show requires at least one -x/--hide revision when no…
- the hidden and visible revisions have no editable fork point
- the revisions have multiple editable fork points
- change ID prefix is ambiguous in the default Tix view
- path does not name a file
AI-assisted analysis of GitoxideLabs/gitoxide@e73179060b (2026-09-08).
Data as JSON: /api/errors/fd7e69d7ba12efef.
Report an issue: GitHub.
Appendix: source
Thrown at gix-tix/src/command/rebase.rs:104
}
let editor = repo
.editor_command()
.context("could not prepare Git editor")?
.context("no Git editor is available")?;
let edited = edit::edit_document_without_terminal(
editor,
&prepared.document,
&format!("tix-rebase-{}.md", std::process::id()),
)?
.unwrap_or(prepared.document);
apply_document(repo, &edited, args.materialize_conflicts.as_deref())
}
fn prepare(repo: &gix::Repository, args: &Todo) -> Result<todo::Prepared> {
let (hide, unavailable) = history::available_hidden_revisions(repo, &args.hide, !args.no_auto_hide)?;
if hide.is_empty() {
anyhow::bail!(
"rebase todo requires at least one -x/--hide revision when no remote HEAD maps to a local branch"
);
}
for (revision, err) in unavailable {
eprintln!(
"warning: ignoring unavailable hidden revision {}: {err}",
revision.to_string_lossy()
);
}
let refs = history::snapshot(repo, &args.tips, &hide, false)?;
let authors = gix::features::threading::OwnShared::new(gix::features::threading::Mutable::new(Authors::default()));
let mut app = App::new(usize::MAX);
let mut decorations = Decorations::default();
let mut graph = None;
history::load(
repo,
&args.tips,View on GitHub (pinned to e73179060b)