{"record":{"id":"fd7e69d7ba12efef","repo":"GitoxideLabs/gitoxide","slug":"rebase-todo-requires-at-least-one-x-hide-revisi","errorCode":null,"errorMessage":"rebase todo requires at least one -x/--hide revision when no remote HEAD maps to a local branch","messagePattern":"rebase todo requires at least one -x/--hide revision when no remote HEAD maps to a local branch","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gix-tix/src/command/rebase.rs","lineNumber":104,"sourceCode":"    }\n\n    let editor = repo\n        .editor_command()\n        .context(\"could not prepare Git editor\")?\n        .context(\"no Git editor is available\")?;\n    let edited = edit::edit_document_without_terminal(\n        editor,\n        &prepared.document,\n        &format!(\"tix-rebase-{}.md\", std::process::id()),\n    )?\n    .unwrap_or(prepared.document);\n    apply_document(repo, &edited, args.materialize_conflicts.as_deref())\n}\n\nfn prepare(repo: &gix::Repository, args: &Todo) -> Result<todo::Prepared> {\n    let (hide, unavailable) = history::available_hidden_revisions(repo, &args.hide, !args.no_auto_hide)?;\n    if hide.is_empty() {\n        anyhow::bail!(\n            \"rebase todo requires at least one -x/--hide revision when no remote HEAD maps to a local branch\"\n        );\n    }\n    for (revision, err) in unavailable {\n        eprintln!(\n            \"warning: ignoring unavailable hidden revision {}: {err}\",\n            revision.to_string_lossy()\n        );\n    }\n    let refs = history::snapshot(repo, &args.tips, &hide, false)?;\n\n    let authors = gix::features::threading::OwnShared::new(gix::features::threading::Mutable::new(Authors::default()));\n    let mut app = App::new(usize::MAX);\n    let mut decorations = Decorations::default();\n    let mut graph = None;\n    history::load(\n        repo,\n        &args.tips,","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-tix/src/command/rebase.rs#L86-L122","documentation":"`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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\ngix tix rebase todo --no-auto-hide\n// after\ngix tix rebase todo -x origin/main-base","handlingStrategy":"validation","validationCode":"// Ensure at least one -x revision resolves to a local branch before rebase todo.\nif hide_args.is_empty() && (no_auto_hide || !remote_head_maps_local_branch(repo)) { return Err(\"provide -x base\"); }","typeGuard":null,"tryCatchPattern":"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 }","preventionTips":["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."],"tags":["git","tix","rebase","missing-argument","revisions"],"backgroundTag":"missing-required-flag","analyzedSha":"e73179060badf27222d790981fac3f84c1830a7e","analyzedAt":"2026-09-08T11:26:50.865Z","contentChangedAt":"2026-09-08T11:26:50.865Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}