gitbutlerapp/gitbutler · error
Commit has no conflicted files to resolve
Error message
Commit {commit_id} has no conflicted files to resolve What it means
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.
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
Example fix
// before
build_request(repo, commit_id_with_no_hunks)
// after
if let Ok(req) = build_request(repo, commit_id) { if !req.files.is_empty() || !req.manual.is_empty() { /* proceed */ } } else { /* resolve manually */ } Defensive patterns
Strategy: try-catch
Validate before calling
const req = await buildRequest(commitId); if (req.files.length === 0 && req.manual.length === 0) throw new Error('nothing to resolve'); Try / catch
try { await buildRequest(commitId); } catch (e) { if (String(e).includes('no conflicted files to resolve')) { /* fall back to manual git resolution */ } else { throw e; } } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- Re-merging the conflicting trees of commit
- Validation
- Cannot merge : merging into / resulted in conflicts. Rebase…
- cannot mix mark sources
- Cannot push branch ' ': the push would include conflicted…
AI-assisted analysis of gitbutlerapp/gitbutler@58e5313667 (2026-09-18).
Data as JSON: /api/errors/42e9051a92a95bff.
Report an issue: GitHub.
Appendix: source
Thrown at crates/but-api/src/resolve/context.rs:255
path,
format!("The file contains content ambiguous with conflict markers ({line:?}).")
);
}
if blocks.is_empty() {
needs_manual_resolution!(path, "No conflict markers were found in the file.".into());
}
let hunks = extract_hunks(&lines, &blocks);
files.push(FileConflict {
path,
rela_path,
entry_kind,
merged_text,
hunks,
});
}
if files.is_empty() && manual.is_empty() {
bail!("Commit {commit_id} has no conflicted files to resolve");
}
Ok(ResolutionRequest {
commit_id,
commit_message,
parent_message,
base_tree_id: base,
ours_tree_id: ours,
theirs_tree_id: theirs,
files,
manual,
})
}
#[derive(Debug, Default)]
struct ConflictSides {
base: bool,
ours: bool,View on GitHub (pinned to 58e5313667)