GitoxideLabs/gitoxide · error

the hidden and visible revisions have no editable fork point

Error message

the hidden and visible revisions have no editable fork point

What it means

After traversing history, `gix_tix::command::rebase::prepare` collects `hidden_rebase_candidates()` — possible fork points between the hidden and visible revisions. Exactly one candidate is required to define the rebase base; when there are zero, it bails with this error because the hidden and visible histories do not intersect at an editable point.

Solutions

  1. Choose a `-x/--hide` revision that is an actual ancestor/fork point of the visible commits.
  2. Verify the relationship with `gix log --graph` across both hidden and visible revisions.
  3. Re-hide the rewritten base if history was rewritten underneath you.
  4. Explicitly specify the base instead of letting inference fail.

Example fix

// before
gix tix rebase todo -x unrelated-branch
// after
gix tix rebase todo -x main   # main is the shared fork point
Defensive patterns

Strategy: try-catch

Validate before calling

// Check that the hidden revision is an ancestor/fork point of the visible history before rebasing via gix graph traversal.

Try / catch

match prepare(repo, &args) { Err(e) if e.to_string().contains("no editable fork point") => { /* select a different -x base that is an actual fork point */ } other => other }

Prevention

When it happens

Trigger: Calling rebase prepare where the hidden revision(s) and the visible revisions share no candidate fork point — e.g. the hidden branch is fully disjoint from the visible history, so `candidates.is_empty()`.

Common situations: Hiding a branch that diverged completely from the visible commits; rebasing after history was rewritten so the old base no longer relates; specifying `-x` revisions unrelated to the commits being rebased.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of GitoxideLabs/gitoxide@e73179060b (2026-09-08). Data as JSON: /api/errors/54dbfaa955abfab3. Report an issue: GitHub.

Appendix: source

Thrown at gix-tix/src/command/rebase.rs:143

        &authors,
        &AtomicBool::new(false),
        |event| {
            match event {
                Event::Decorations(value) => decorations = value,
                Event::Commits(commits) => app.extend_commits(commits),
                Event::HiddenCommits(commits) => app.extend_hidden_commits(commits),
                Event::Complete(value) => graph = Some(value),
                Event::VisibleComplete | Event::Cancelled => {}
            }
            true
        },
    )?;
    let graph = graph.context("history traversal did not produce a graph")?;
    crate::update_hidden_branch_updates(&mut app, Some(&graph), &refs);
    let mut candidates = app.hidden_rebase_candidates();
    if candidates.len() != 1 {
        if candidates.is_empty() {
            anyhow::bail!("the hidden and visible revisions have no editable fork point");
        }
        candidates.sort_by_key(|(id, _)| *id);
        anyhow::bail!(
            "the revisions have multiple editable fork points: {}",
            candidates
                .iter()
                .map(|(id, _)| id.to_string())
                .collect::<Vec<_>>()
                .join(", ")
        );
    }
    let (base, scope) = candidates.pop().context("one rebase candidate was expected")?;
    let (onto, onto_kind) = if args.update_base {
        let onto = app
            .hidden_branch_update(base)
            .context("--update-base found no newer hidden local branch tip for the derived base")?;
        (onto, todo::OntoKind::UpdatedBase)
    } else {

View on GitHub (pinned to e73179060b)