{"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":"validation","errorClass":"anyhow::Error","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/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but-api/src/resolve/context.rs#L237-L273","documentation":"Final guard in build_request(): after scanning the re-merged index, both buckets are empty - no hunk-addressable files AND no manual entries - despite the earlier steps establishing a conflicted commit. An empty ResolutionRequest would be meaningless, so it bails. Practically a sibling of the 're-merge yielded no conflicts' guard, hit when the index scan drops every entry.","triggerScenarios":"Degenerate conflicted commits whose re-merged index contains no stage-1/2/3 entries at all by the time files/manual are collected - e.g. empty-tree edge cases or unusual all-marker content that scans to nothing.","commonSituations":"Almost never seen in practice; when it is, the commit was produced by unusual tooling. Treat as 'this specific commit cannot be resolved through the API'.","solutions":["Retry once after a fresh repo open to rule out transient index state","Resolve the commit manually in edit mode","Preserve the commit (or a fixture of it) and report - this guard existing means the state machine saw an inconsistency worth a bug report"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await api.resolveCommitConflictsAi(commitId);\n} catch (err) {\n  if (String(err).includes('has no conflicted files to resolve')) {\n    refreshCommitView(commitId); // degenerate state - show the commit as-is, suggest edit mode\n  } else throw err;\n}","preventionTips":["Retry once at most, after reopening the repository, to rule out transient index state","Do not loop on this error - it signals an inconsistent commit shape, not contention","Escalate reproducing cases with a fixture of the commit"],"tags":["conflict-resolution","internal-invariant","resolve-api"],"backgroundTag":"no-conflicts-to-resolve","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}