{"record":{"id":"f58367161bd82ceb","repo":"GitoxideLabs/gitoxide","slug":"head-is-not-present-in-the-default-tix-view","errorCode":null,"errorMessage":"HEAD is not present in the default Tix view","messagePattern":"HEAD is not present in the default Tix view","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gix-tix/src/command/travel.rs","lineNumber":146,"sourceCode":"        }\n    }\n    Ok(())\n}\n\nfn relative_destination(\n    repository: &gix::Repository,\n    graph: &crate::history::HistoryGraph,\n    hidden_tips: &[gix::ObjectId],\n    head: gix::ObjectId,\n    to: To,\n) -> Result<gix::ObjectId> {\n    let order = graph\n        .stored_commit_ids()\n        .filter(|id| !hidden_tips.iter().any(|hidden| graph.is_ancestor(*id, *hidden)))\n        .collect::<Vec<_>>();\n    let stored = order.iter().copied().collect::<HashSet<_>>();\n    if !stored.contains(&head) {\n        anyhow::bail!(\"HEAD is not present in the default Tix view\");\n    }\n\n    let candidates = match to {\n        To::Parent => visible_parents(graph, head, &stored),\n        To::Child => order\n            .iter()\n            .copied()\n            .filter(|id| graph.parents_of(*id).is_some_and(|parents| parents.contains(&head)))\n            .collect(),\n        To::First => first_candidates(graph, head, &stored, &order),\n        To::Tip => terminal_candidates(head, &children_by_parent(graph, &stored, &order), &order),\n    };\n    match candidates.as_slice() {\n        [candidate] => Ok(*candidate),\n        [] => anyhow::bail!(\"HEAD has no {} in the default Tix view\", to.name()),\n        candidates => {\n            let candidates = candidates\n                .iter()","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-tix/src/command/travel.rs#L128-L164","documentation":"Relative time travel computes candidates from the commits visible in the default Tix view (stored commits minus those hidden behind hidden tips). If HEAD itself is not in that filtered set, relative navigation is meaningless, so relative_destination bails. This usually means HEAD is hidden or outside the tracked history.","triggerScenarios":"Calling `tix travel` with a relative destination while head_id fails the stored.contains(&head) check — HEAD is an ancestor of a hidden tip or absent from graph.stored_commit_ids().","commonSituations":"HEAD detached onto a hidden/experimental commit; history view configured to hide the current line; change-id tracking not covering HEAD's branch.","solutions":["Unhide the relevant revision or adjust hidden tips (tix hide/show configuration) so HEAD is visible","Attach HEAD to a branch that is part of the default view before travelling","Use an absolute OID destination instead of a relative one"],"exampleFix":"// before\ntix travel ^        # HEAD hidden in view\n// after\ntix unhide <hidden-tip>\ntix travel ^","handlingStrategy":"validation","validationCode":"// Ensure HEAD is visible before relative travel\nlet hidden = crate::history::available_hidden_revisions(&repo, &[], true)?.0;\nlet visible = graph.stored_commit_ids()\n    .filter(|id| !hidden_tips.iter().any(|h| graph.is_ancestor(*id, *h)))\n    .any(|id| id == head_id);\nif !visible { /* unhide or use absolute OID */ }","typeGuard":null,"tryCatchPattern":"if let Err(e) = travel(\"^\") {\n    if e.to_string().contains(\"not present in the default Tix view\") {\n        travel_absolute(head_parent_oid())?;\n    } else { return Err(e); }\n}","preventionTips":["Keep HEAD's line of history out of hidden tips","Re-attach to a visible branch when experimenting detached","Use absolute OIDs for hidden or exotic commits"],"tags":["cli","time-travel","hidden-history"],"backgroundTag":"resource-not-found","analyzedSha":"e73179060badf27222d790981fac3f84c1830a7e","analyzedAt":"2026-09-08T11:26:50.865Z","contentChangedAt":"2026-09-08T11:26:50.865Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}