{"record":{"id":"0ca0af8c8b9f7e93","repo":"GitoxideLabs/gitoxide","slug":"operation-aborted-without-changes-conflict-whil","errorCode":null,"errorMessage":"{operation} aborted without changes: conflict while applying {}; pass --materialize-conflicts to opt in","messagePattern":"(.+?) aborted without changes: conflict while applying (.+?); pass --materialize-conflicts to opt in","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gix-tix/src/command/rebase.rs","lineNumber":256,"sourceCode":"            super::print_ref_rewrites(&repo, &outcome.ref_rewrites)?;\n            super::record_undo(&repo, \"rebase history\", Ok(changes));\n            Ok(())\n        }\n        rebase::PlanPerform::Conflict(conflict) => {\n            handle_plan_conflict(&repo, conflict, materialize_conflicts, &tips, \"rebase\")\n        }\n    }\n}\n\npub(super) fn handle_plan_conflict(\n    repo: &gix::Repository,\n    mut conflict: rebase::PlanConflict,\n    materialize_conflicts: Option<&Path>,\n    tips: &[ObjectId],\n    operation: &str,\n) -> Result<()> {\n    let Some(destination) = materialize_conflicts else {\n        anyhow::bail!(\n            \"{operation} aborted without changes: conflict while applying {}; pass --materialize-conflicts to opt in\",\n            conflict.original().to_hex_with_len(7)\n        );\n    };\n    if destination == Path::new(\"-\") && std::io::stdout().is_terminal() {\n        anyhow::bail!(\n            \"{operation} aborted without changes: refusing to materialize a conflict without a continuation output file\"\n        );\n    }\n    conflict.persist_objects()?;\n    let plan = conflict.continuation_plan();\n    let mapped_tips = tips.iter().filter_map(|id| conflict.map(*id)).collect();\n    let continuation = todo::prepare_continuation(conflict.repository(), &plan, mapped_tips, true)?.document;\n    let revisions = mapped_revisions(tips, |id| conflict.map(id));\n    if destination == Path::new(\"-\") {\n        let mut stdout = std::io::stdout().lock();\n        stdout\n            .write_all(&continuation)","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-tix/src/command/rebase.rs#L238-L274","documentation":"The tix rebase command hit a conflict while applying a commit (identified by its 7-char hex OID) but no --materialize-conflicts destination was given. Since rebasing cannot silently rewrite history with unresolved conflicts, the operation aborts with no changes written. The message tells the user exactly which flag enables conflict materialization.","triggerScenarios":"Running `tix rebase apply` (or similar rebase subcommand) whose apply_document hits a plan conflict via handle_plan_conflict while the caller passed no --materialize-conflicts path.","commonSituations":"Rebasing a branch onto a rewritten base where the patch no longer applies cleanly; forgetting the --materialize-conflicts flag in scripts; automated CI rebases over diverged history.","solutions":["Inspect the conflicting commit and rebase onto a base where it applies cleanly, or resolve the conflict manually first","Re-run with --materialize-conflicts <path> (or - for stdout when non-interactive) to write conflict markers and a continuation plan","Check `tix rebase apply` output/undo records to confirm the operation aborted without changes before retrying"],"exampleFix":"// before\ntix rebase apply <plan>\n// after\ntix rebase apply <plan> --materialize-conflicts conflicts/","handlingStrategy":"validation","validationCode":"// Pre-check: only pass --materialize-conflicts when you have a writable destination\nlet materialize: Option<&Path> = match cli.materialize_conflicts.as_deref() {\n    Some(p) if p != Path::new(\"-\") || !std::io::stdout().is_terminal() => Some(p),\n    Some(_) => return Err(anyhow!(\"--materialize-conflicts - requires non-interactive stdout\")),\n    None => None,\n};","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"conflict while applying\") => eprintln!(\"rebase needs --materialize-conflicts\"),\n    Err(e) => return Err(e),\n    Ok(_) => {}\n}","preventionTips":["Always supply --materialize-conflicts with a real file path in scripts","Keep history linear (rebase before divergence) to avoid conflicts","Inspect the abort message's commit hex to pre-resolve that patch"],"tags":["cli","rebase","conflict","git"],"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"}