{"record":{"id":"25aa14fa57a39335","repo":"GitoxideLabs/gitoxide","slug":"time-travel-would-conflict-retry-with-materiali","errorCode":null,"errorMessage":"time-travel would conflict; retry with --materialize-conflicts to check it out","messagePattern":"time-travel would conflict; retry with --materialize-conflicts to check it out","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gix-tix/src/command/travel.rs","lineNumber":127,"sourceCode":"                super::notice_with_change_id(\n                    &repository,\n                    &notice.unwrap_or_else(|| format!(\"already at {}\", selected.to_hex_with_len(7))),\n                    selected,\n                )?\n            );\n            super::print_ref_rewrites(&repository, &ref_rewrites)?;\n            super::record_undo(&repository, \"time travel\", Ok(ref_changes));\n        }\n        crate::edit::time_travel::Perform::Conflict(conflict) if args.materialize_conflicts => {\n            let (notice, _, ref_rewrites, ref_changes) = conflict.accept()?;\n            let repository = crate::open_repository(&repository_path, bare, false)\n                .context(\"could not reopen repository after materializing time-travel\")?;\n            super::print_ref_rewrites(&repository, &ref_rewrites)?;\n            super::record_undo(&repository, \"materialize time-travel conflict\", Ok(ref_changes));\n            anyhow::bail!(\"{notice}\");\n        }\n        crate::edit::time_travel::Perform::Conflict(_) => {\n            anyhow::bail!(\"time-travel would conflict; retry with --materialize-conflicts to check it out\")\n        }\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) {","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-tix/src/command/travel.rs#L109-L145","documentation":"A time-travel destination would conflict with the current checkout, and --materialize-conflicts was not supplied, so tix aborts without touching the working tree rather than leaving silent conflict markers. The message tells the user to retry with the flag if they want the conflict checked out for inspection.","triggerScenarios":"`tix travel <dest>` where Perform returns Perform::Conflict and args.materialize_conflicts is false in run().","commonSituations":"Travelling back to a commit that conflicts with dirty working-tree state; forgetting the flag when the destination tree diverges; automation hitting conflicts unexpectedly.","solutions":["Retry with --materialize-conflicts to write the conflict and continue from there","Clean or commit/stash working-tree changes so the destination applies cleanly","Choose a different destination that does not conflict"],"exampleFix":"// before\ntix travel HEAD~5\n// after\ntix travel HEAD~5 --materialize-conflicts","handlingStrategy":"retry","validationCode":"// Only retry with materialization when a conflict is reported\nif stderr.contains(\"time-travel would conflict\") {\n    retry_with_flag(\"--materialize-conflicts\");\n}","typeGuard":null,"tryCatchPattern":"match travel(dest) {\n    Err(e) if e.to_string().contains(\"time-travel would conflict\") => travel_with_materialization(dest)?,\n    other => other?,\n}","preventionTips":["Pass --materialize-conflicts proactively in dirty trees","Commit or stash local changes before travelling","Verify the destination tree applies cleanly"],"tags":["cli","time-travel","conflict"],"backgroundTag":"git-command-failed","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"}