{"record":{"id":"f6284fbe40175d10","repo":"jdx/mise","slug":"unresolved-git-index-entry-in","errorCode":null,"errorMessage":"unresolved Git index entry {} in {}","messagePattern":"unresolved Git index entry (.+?) in (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/files.rs","lineNumber":1968,"sourceCode":"    }\n    output\n        .stdout\n        .split(|byte| *byte == 0)\n        .filter(|record| !record.is_empty())\n        .map(|record| {\n            let tab = record\n                .iter()\n                .position(|byte| *byte == b'\\t')\n                .ok_or_else(|| {\n                    eyre::eyre!(\n                        \"unexpected git ls-files output for {}\",\n                        source.display_user()\n                    )\n                })?;\n            let metadata = &record[..tab];\n            let path = path_buf_from_git_bytes(&record[tab + 1..]);\n            if !metadata.ends_with(b\" 0\") {\n                bail!(\n                    \"unresolved Git index entry {} in {}\",\n                    path.display(),\n                    source.display_user()\n                );\n            }\n            Ok(GitTrackedPath {\n                is_gitlink: metadata.starts_with(b\"160000 \"),\n                is_symlink: metadata.starts_with(b\"120000 \"),\n                path,\n            })\n        })\n        .collect()\n}\n\n/// Capture only the files selected by a Git manifest, preserving the source\n/// repository and any untracked files around them.\npub(crate) fn capture_git_manifest(req: &FileRequest) -> Result<()> {\n    for entry in git_tracked_paths(&req.source)? {","sourceCodeStart":1950,"sourceCodeEnd":1986,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/files.rs#L1950-L1986","documentation":"Thrown when a Git index entry read from the source repository is not in a fully merged, stage-0 state (its mode/metadata suffix is not \" 0\"), i.e. the entry has unresolved merge conflicts. The library only accepts cleanly resolved index entries when enumerating tracked files.","triggerScenarios":"Listing Git-tracked files in a source repo that is mid-merge or mid-rebase with unresolved conflicts: `git ls-files --stage`/cached listing returns multiple stages (1/2/3) for a conflicted path.","commonSituations":"User merged branches or pulled upstream dotfile changes and left conflicts unresolved, then ran `mise files apply`; an interrupted rebase left conflict markers in the index.","solutions":["Resolve the conflicts in the source repository: edit the conflicted files, `git add` them, and commit or `git merge --continue`.","Abort the in-progress operation if it is unwanted (`git merge --abort` / `git rebase --abort`).","Run `git status` in the source to identify the conflicted path shown in the message."],"exampleFix":"// before: mid-merge with conflicts\n$ cd ~/dotfiles && git status\nUnmerged paths: both modified: .gitconfig\n\n// after\n$ cd ~/dotfiles\n$ $EDITOR .gitconfig   # resolve conflict markers\n$ git add .gitconfig && git commit\n$ mise files apply","handlingStrategy":"validation","validationCode":"use std::process::Command;\nfn ensure_no_conflicts(source: &std::path::Path) -> anyhow::Result<()> {\n    let out = Command::new(\"git\").args([\"ls-files\", \"--unmerged\"])\n        .current_dir(source).output()?;\n    if !out.stdout.is_empty() {\n        anyhow::bail!(\"unresolved merge conflicts in {}\", source.display());\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"unresolved Git index entry\") => {\n        eprintln!(\"Resolve conflicts in the dotfiles repo (git status) and commit before applying: {e}\");\n    }\n    Err(e) => return Err(e),\n    Ok(plan) => apply(plan),\n}","preventionTips":["Run `git status` and resolve conflicts immediately after pulling/merging dotfiles.","Never leave a merge or rebase in progress in the dotfiles repo.","Use `git config pull.rebase false` or always fast-forward to reduce conflict windows."],"tags":["git","merge-conflict","dotfiles"],"backgroundTag":"git-merge-conflict-unresolved","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}