{"record":{"id":"42e9051a92a95bff","repo":"gitbutlerapp/gitbutler","slug":"commit-commit-id-has-no-conflicted-files-to-reso","errorCode":null,"errorMessage":"Commit {commit_id} has no conflicted files to resolve","messagePattern":"Commit (.+?) has no conflicted files to resolve","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/but-api/src/resolve/context.rs","lineNumber":255,"sourceCode":"                path,\n                format!(\"The file contains content ambiguous with conflict markers ({line:?}).\")\n            );\n        }\n        if blocks.is_empty() {\n            needs_manual_resolution!(path, \"No conflict markers were found in the file.\".into());\n        }\n        let hunks = extract_hunks(&lines, &blocks);\n        files.push(FileConflict {\n            path,\n            rela_path,\n            entry_kind,\n            merged_text,\n            hunks,\n        });\n    }\n\n    if files.is_empty() && manual.is_empty() {\n        bail!(\"Commit {commit_id} has no conflicted files to resolve\");\n    }\n\n    Ok(ResolutionRequest {\n        commit_id,\n        commit_message,\n        parent_message,\n        base_tree_id: base,\n        ours_tree_id: ours,\n        theirs_tree_id: theirs,\n        files,\n        manual,\n    })\n}\n\n#[derive(Debug, Default)]\nstruct ConflictSides {\n    base: bool,\n    ours: bool,","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/crates/but-api/src/resolve/context.rs#L237-L273","documentation":"After collecting hunk-level conflicts and manual (tree-level) changes, neither list is populated, so the resulting ResolutionRequest would be empty and there is nothing for the caller to resolve. The library bails instead of returning an empty request.","triggerScenarios":"build_request finishes processing all conflicted files but `files` (resolvable text conflicts) and `manual` (tree/binary conflicts) are both empty when the commit's conflicted trees produce no hunks.","commonSituations":"The re-merge found conflicts only in metadata that produced no hunks, all conflicts were auto-resolvable, or stale conflicted-tree ids on a commit that no longer needs resolution.","solutions":["Refresh conflicted-commit detection; the conflict state is likely stale","If the commit appears conflicted but yields no hunks, resolve it manually with git (e.g. `git checkout --theirs/--ours`, re-commit)","Verify the commit's base/ours/theirs trees differ in file content"],"exampleFix":"// before\nbuild_request(repo, commit_id_with_no_hunks)\n// after\nif let Ok(req) = build_request(repo, commit_id) { if !req.files.is_empty() || !req.manual.is_empty() { /* proceed */ } } else { /* resolve manually */ }","handlingStrategy":"try-catch","validationCode":"const req = await buildRequest(commitId); if (req.files.length === 0 && req.manual.length === 0) throw new Error('nothing to resolve');","typeGuard":null,"tryCatchPattern":"try { await buildRequest(commitId); } catch (e) { if (String(e).includes('no conflicted files to resolve')) { /* fall back to manual git resolution */ } else { throw e; } }","preventionTips":["Verify the commit still has resolvable hunks before opening a resolution UI","Refresh conflict state before invoking the resolve flow","Provide a manual git resolution path when auto-detection finds nothing"],"tags":["merge-conflict","empty-result","invalid-state"],"backgroundTag":"empty-result-set","analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}