{"record":{"id":"a22d0a9fe8169987","repo":"GitoxideLabs/gitoxide","slug":"the-conflict-index-still-has-unresolved-entries-a22d0a","errorCode":null,"errorMessage":"the conflict index still has unresolved entries","messagePattern":"the conflict index still has unresolved entries","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"gix-tix/src/lib.rs","lineNumber":5655,"sourceCode":"        .output()\n        .context(\"could not launch git add for resolved paths\")?;\n    if !output.status.success() {\n        let stderr = output.stderr.trim().to_str_lossy();\n        if stderr.is_empty() {\n            anyhow::bail!(\"git add for resolved paths failed with {}\", output.status);\n        }\n        anyhow::bail!(\"git add for resolved paths failed with {}: {stderr}\", output.status);\n    }\n\n    let index = repository\n        .open_index()\n        .context(\"could not verify 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    Ok(())\n}\n\nfn preview_todo_rebase_conflict(\n    app: &mut App,\n    conflict: &edit::rebase::PlanConflict,\n    authors: &SharedAuthors,\n    view_tips: &[gix::ObjectId],\n    hidden_tips: &[gix::ObjectId],\n) -> Result<()> {\n    let repo = conflict.repository();\n    let mut rows = Vec::with_capacity(conflict.produced().len());\n    let mut attributions = Vec::new();\n    for id in conflict.produced().iter().rev().copied() {\n        let commit = repo\n            .find_commit(id)\n            .context(\"could not load an in-memory rebase result\")?;","sourceCodeStart":5637,"sourceCodeEnd":5673,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-tix/src/lib.rs#L5637-L5673","documentation":"After staging resolutions with `git add`, the code re-opens the index and verifies every entry is Unconflicted. If any entry still carries a conflict stage (1/2/3), the operation refuses to proceed, because committing with unresolved conflicts would produce a broken state.","triggerScenarios":"The conflict resolution flow found that after `git add`, the index still contains staged conflict entries — e.g. resolutions were written to the wrong paths, `git add` staged only some files, or new conflicts appeared.","commonSituations":"User edited only some conflicted files; a merge/rebase recreated conflicts after staging; path casing or rename mismatches caused some conflicts to remain unstaged.","solutions":["Run `git status` / `git ls-files -u` to list remaining unmerged entries and resolve them.","Stage every conflicted file (`git add .` or per-path) before retrying the operation.","Check for rename/case mismatches between the resolved file and the index path.","If conflicts come from an in-progress rebase/merge, resolve or abort it first."],"exampleFix":"// before\nresolve_and_stage(paths)?;\n// after\nresolve_and_stage(paths)?;\nlet left = list_unmerged_entries(repo)?;\nif !left.is_empty() {\n    anyhow::bail!(\"unresolved: {:?}\", left);\n}","handlingStrategy":"validation","validationCode":"let unresolved = repo.open_index()?.entries().iter()\n    .any(|e| e.stage() != gix::index::entry::Stage::Unconflicted);\nif unresolved { /* resolve first */ }","typeGuard":null,"tryCatchPattern":"match finalize_resolution(repo) {\n    Err(err) if err.to_string() == \"the conflict index still has unresolved entries\" => {\n        eprintln!(\"resolve remaining conflicts (git ls-files -u) and re-stage\");\n    }\n    other => other?,\n}","preventionTips":["Stage every conflicted file, not just the edited ones.","After staging, re-read the index and assert zero conflict-stage entries.","Resolve or abort any in-progress merge/rebase before starting resolutions."],"tags":["git","index","merge-conflict","validation"],"backgroundTag":"unresolved-conflict-entries","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"}