{"record":{"id":"ac4fad08088d2a0c","repo":"GitoxideLabs/gitoxide","slug":"change-id-change-id-is-ambiguous-in-the-tix-view","errorCode":null,"errorMessage":"change ID {change_id} is ambiguous in the Tix view; candidates:\n  {candidates}","messagePattern":"change ID (.+?) is ambiguous in the Tix view; candidates:\n  (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gix-tix/src/edit/reword.rs","lineNumber":70,"sourceCode":"    change_id: gix::hash::ChangeId,\n) -> Result<(crate::history::HistoryGraph, gix::ObjectId)> {\n    let graph = super::loaded_view_graph_with_hidden(repo, revisions, hidden_revisions)?;\n    let mut matches = Vec::new();\n    for id in graph.stored_commit_ids() {\n        if crate::change_id::for_commit(repo, id)? == change_id {\n            matches.push(id);\n        }\n    }\n    match matches.as_slice() {\n        [target] => Ok((graph, *target)),\n        [] => anyhow::bail!(\"change ID {change_id} is no longer present in the Tix view\"),\n        candidates => {\n            let candidates = candidates\n                .iter()\n                .map(|id| crate::change_id::display_short(repo, *id))\n                .collect::<Result<Vec<_>>>()?\n                .join(\"\\n  \");\n            anyhow::bail!(\"change ID {change_id} is ambiguous in the Tix view; candidates:\\n  {candidates}\")\n        }\n    }\n}\n\n#[tracing::instrument(skip_all, fields(commit_id = %id))]\npub(crate) fn document(repo: &gix::Repository, id: gix::ObjectId) -> Result<(gix::command::Prepare, Vec<u8>)> {\n    document_with_author(repo, id, None)\n}\n\npub(crate) fn document_with_author(\n    repo: &gix::Repository,\n    id: gix::ObjectId,\n    author: Option<&[u8]>,\n) -> Result<(gix::command::Prepare, Vec<u8>)> {\n    let editor = repo\n        .editor_command()\n        .context(\"could not prepare Git editor\")?\n        .context(\"no Git editor is available\")?;","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-tix/src/edit/reword.rs#L52-L88","documentation":"`relocate_after_editor` expects the recorded change ID to resolve to exactly one commit in the Tix view. If the candidate list contains more than one commit, the target is ambiguous and relocation cannot proceed safely, so the error lists all matching candidate commits (short-displayed via `crate::change_id::display_short`).","triggerScenarios":"Calling `relocate_after_editor` (via `relocates_an_editor_reword_onto_a_concurrent_amend` or `editor_relocation_requires_one_visible_commit`) when `crate::change_id::for_commit` matches two or more commits in the candidate set — e.g. a change ID duplicated across rewritten/merged history.","commonSituations":"Duplicate change IDs after a history rewrite that kept two copies of the same logical change (e.g. cherry-pick or rebase duplicates); concurrent operations creating divergent commits sharing a change ID; corrupted or manually edited Tix metadata.","solutions":["Inspect the listed candidate commits and disambiguate manually (rebase/drop the duplicate) before retrying.","Refresh or repair the Tix view so each change ID maps to exactly one commit, then retry the reword.","Avoid operations that duplicate a change (e.g. cherry-picking a change ID already in the view) or resolve the duplication first.","If duplicates are intentional, use a commit ID directly instead of relocating by change ID."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let matches: Vec<_> = candidate_ids.into_iter().filter(|id| crate::change_id::for_commit(repo, *id).map_or(false, |c| c == change_id)).collect();\nif matches.len() != 1 { /* resolve duplicates before relocating */ }","typeGuard":null,"tryCatchPattern":"match relocate_after_editor(repo, change_id) {\n    Ok(res) => res,\n    Err(e) if e.to_string().contains(\"is ambiguous\") => {\n        // prompt user to pick among candidates printed in the error\n        disambiguate(repo, change_id)?\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Never cherry-pick or duplicate a commit whose change ID is already present in the view.","Repair duplicate change IDs after history rewrites before resuming stacked operations.","Keep Tix metadata under tool control; avoid manual edits."],"tags":["git","change-id","ambiguity","reword","duplicate"],"backgroundTag":"invalid-state-transition","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"}