{"record":{"id":"decac7de25ef74ef","repo":"GitoxideLabs/gitoxide","slug":"the-conflict-index-still-has-unresolved-entries","errorCode":null,"errorMessage":"the conflict index still has unresolved entries","messagePattern":"the conflict index still has unresolved entries","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gix-tix/src/edit/rebase.rs","lineNumber":1735,"sourceCode":"                let head = repo\n                    .head()?\n                    .peel_to_commit()\n                    .context(\"could not resolve the conflicted HEAD commit\")?;\n                resolved_head = Some((*planned, head.id));\n                let mut commit = head\n                    .decode()\n                    .context(\"could not decode the conflicted HEAD commit\")?\n                    .into_owned()\n                    .context(\"could not own the conflicted HEAD commit\")?;\n                let index = repo\n                    .index_or_empty()\n                    .context(\"could not load the resolved conflict index\")?;\n                if index\n                    .entries()\n                    .iter()\n                    .any(|entry| entry.stage() != gix::index::entry::Stage::Unconflicted)\n                {\n                    anyhow::bail!(\"the conflict index still has unresolved entries\");\n                }\n                commit.tree = super::create::index_tree(&repo, &index)?;\n                commit\n            }\n            PlanCommit::Empty(title) => gix::objs::Commit {\n                tree: parent_tree(&repo, Some(parent))?,\n                parents: [parent].into_iter().collect(),\n                author: author.clone(),\n                committer: committer.clone(),\n                encoding: None,\n                message: title.clone(),\n                extra_headers: Vec::new(),\n            },\n        };\n        let graph_parents = match step.commit {\n            PlanCommit::Pick(id) | PlanCommit::Copy(id) | PlanCommit::Resolved(id) => {\n                graph.parents_of(id).context(\"a picked commit is incomplete\")?\n            }","sourceCodeStart":1717,"sourceCodeEnd":1753,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-tix/src/edit/rebase.rs#L1717-L1753","documentation":"When replaying a plan step that was previously in conflict, the library loads the saved conflict index and requires the user to have resolved every entry: all index entries must be at stage `Unconflicted`. If any entry remains at stage 1/2/3 (unmerged), the rebase refuses to build the commit from a half-resolved index.","triggerScenarios":"Continuing/finishing a rebase step that had conflicts while `git add`/index updates were never run for some conflicted paths; loading a stale conflict index saved by an earlier interrupted run; resolving files on disk but not staging them.","commonSituations":"Users editing conflicted files in an editor, forgetting to stage; automation aborting mid-conflict-resolution and later resuming; tooling that checks out files but not into the index.","solutions":["Stage all resolved files so every index entry reaches the Unconflicted stage, then retry","Re-run the conflicted step from scratch and resolve completely this time","Inspect the conflict index entries (`entry.stage()`) to find which paths remain unresolved"],"exampleFix":"// before: resolve file on disk only\nfs::write(path, resolved_content)?;\n// after: also update the index\nlet mut index = repo.index?;\nindex.add_entry(repo.workdir_path(path)?)?;\nindex.write(Default::default())?;","handlingStrategy":"try-catch","validationCode":"fn fully_resolved(index: &gix::index::File) -> bool {\n    index.entries().iter().all(|e| e.stage() == gix::index::entry::Stage::Unconflicted)\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"unresolved entries\") => {\n        eprintln!(\"stage every conflicted path before continuing the rebase\");\n    }\n    r => r?,\n}","preventionTips":["After editing conflicted files, always stage them (`git add`) before continuing","Check the conflict index stage of every entry before resuming an interrupted rebase","Avoid killing rebase tooling mid-conflict; use its abort/resume flow"],"tags":["rebase","conflict","index","unresolved"],"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"}