{"record":{"id":"3e5a33af78c80de7","repo":"GitoxideLabs/gitoxide","slug":"operation-stopped-at-a-materialized-conflict","errorCode":null,"errorMessage":"{operation} stopped at a materialized conflict","messagePattern":"(.+?) stopped at a materialized conflict","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gix-tix/src/command/rebase.rs","lineNumber":312,"sourceCode":"    let (notice, _, ref_rewrites, ref_changes) = match materialized {\n        Ok(materialized) => materialized,\n        Err(err) => {\n            if destination != Path::new(\"-\") {\n                let _ = std::fs::remove_file(destination);\n            }\n            return Err(err);\n        }\n    };\n    if destination == Path::new(\"-\") {\n        for line in super::ref_rewrite_lines(repo, &ref_rewrites)? {\n            eprintln!(\"{line}\");\n        }\n    } else {\n        super::print_ref_rewrites(repo, &ref_rewrites)?;\n    }\n    super::record_undo(repo, \"materialize rebase conflict\", Ok(ref_changes));\n    eprintln!(\"{notice}; continue with `tix rebase apply {}`\", destination.display());\n    anyhow::bail!(\"{operation} stopped at a materialized conflict\")\n}\n\nfn mapped_revisions(tips: &[ObjectId], mut map: impl FnMut(ObjectId) -> Option<ObjectId>) -> Vec<OsString> {\n    tips.iter()\n        .filter_map(|id| map(*id))\n        .map(|id| OsString::from(id.to_string()))\n        .collect()\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use std::process::Command;\n\n    fn repository() -> gix_testtools::Result<(gix_testtools::tempfile::TempDir, gix::Repository)> {\n        let fixture = gix_testtools::scripted_fixture_writable(\"rebase_edit.sh\")?;\n        let repo = crate::test_repository::open_with(\n            fixture.path(),","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-tix/src/command/rebase.rs#L294-L330","documentation":"This is the expected stop signal after a conflict was successfully materialized: conflict markers were written to the chosen destination, objects persisted, and a continuation plan produced. The command exits with an error status so automation notices that the rebase did not finish, and prints the `tix rebase apply` command to continue.","triggerScenarios":"handle_plan_conflict completes persist_objects/continuation_plan and prints the notice, then bails to terminate the current process after `--materialize-conflicts` was used and a conflict actually occurred.","commonSituations":"Materializing a rebase conflict to hand resolution to a human or tool; CI pipelines that must detect the stopped state; wrappers forgetting that a non-zero exit here is normal post-materialization behavior.","solutions":["Treat this exit as 'work saved, awaiting continuation', not a crash","Follow the printed instruction: run `tix rebase apply <destination>` after resolving the markers","In automation, match on this message to branch into the continuation step"],"exampleFix":"// before\nset -e; tix rebase apply plan --materialize-conflicts c.txt; echo done\n// after\ntix rebase apply plan --materialize-conflicts c.txt || { grep -q 'stopped at a materialized conflict' log && tix rebase apply c.txt; }","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"let status = Command::new(\"tix\").args([\"rebase\", \"apply\", plan]).status()?;\nif !status.success() {\n    // expected after materialization: resolve markers, then continue\n    resolve_markers(\"conflicts.txt\")?;\n    Command::new(\"tix\").args([\"rebase\", \"apply\", \"conflicts.txt\"]).status()?;\n}","preventionTips":["Expect non-zero exit after successful materialization — it is a stop, not a crash","Automate the continuation step right after resolution","Use record_undo output to roll back if resolution is abandoned"],"tags":["cli","rebase","conflict","workflow"],"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-16T04:17:20.429Z"}