{"record":{"id":"4ae1214632b011ab","repo":"GitoxideLabs/gitoxide","slug":"head-has-no-in-the-default-tix-view","errorCode":null,"errorMessage":"HEAD has no {} in the default Tix view","messagePattern":"HEAD has no (.+?) in the default Tix view","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gix-tix/src/command/travel.rs","lineNumber":161,"sourceCode":"        .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()\n                .map(|id| crate::change_id::display_short(repository, *id))\n                .collect::<Result<Vec<_>>>()?\n                .join(\"\\n  \");\n            anyhow::bail!(\n                \"--to {} is ambiguous; candidates:\\n  {candidates}\\ntravel to one directly with `tix travel REVSPEC`\",\n                to.name()\n            )\n        }\n    }\n}\n\nfn visible_parents(\n    graph: &crate::history::HistoryGraph,\n    id: gix::ObjectId,\n    stored: &HashSet<gix::ObjectId>,","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-tix/src/command/travel.rs#L143-L179","documentation":"When navigating relatively (parent, child, first, tip, etc.) no unique candidate exists in the default view: either there is no such neighbor (empty list) or the direction is ambiguous. For the empty case tix bails with 'HEAD has no {parent|child|...} in the default Tix view'.","triggerScenarios":"`tix travel` with a relative To::* target where visible_parents/children/first/tip candidate computation returns an empty slice in relative_destination().","commonSituations":"Travelling to a parent at the root commit; requesting a child at a tip; hidden revisions removing the only neighbor from the view.","solutions":["Check the direction makes sense at HEAD (e.g. no parent at the root commit)","Unhide revisions that may have removed the neighbor from the default view","Use an absolute OID or a different relative target (first/tip) instead"],"exampleFix":"// before\ntix travel ^   # HEAD is root commit\n// after\ntix travel tip   # or target an explicit OID","handlingStrategy":"validation","validationCode":"// Check HEAD is not at the boundary before a relative step\nlet at_root = graph.parents(head_id).is_empty();\nif to == To::Parent && at_root {\n    return Err(anyhow!(\"HEAD is the root commit; no parent exists\"));\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = travel(\"^\") {\n    if e.to_string().contains(\"has no \") {\n        eprintln!(\"direction unavailable here; use first/tip or an OID\");\n    }\n}","preventionTips":["Don't request parents at root commits or children at tips","Unhide revisions that may hide the only neighbor","Fall back to absolute OIDs at history boundaries"],"tags":["cli","time-travel","relative-navigation"],"backgroundTag":"empty-result-set","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"}