gitbutlerapp/gitbutler · error · anyhow::Error
Commit {commit_id} has no conflicted files to resolve
Error message
Commit {commit_id} has no conflicted files to resolve What it means
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.
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 caf1f223d3)
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
Defensive patterns
Strategy: try-catch
Try / catch
try {
await api.resolveCommitConflictsAi(commitId);
} catch (err) {
if (String(err).includes('has no conflicted files to resolve')) {
refreshCommitView(commitId); // degenerate state - show the commit as-is, suggest edit mode
} else throw err;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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'.
Related errors
- Re-merging the conflicting trees of commit {commit_id} yield
- Conflict {} of "{}" was addressed more than once
- "{}" has {} conflict{}, but conflict {} was addressed
- The resolution for "{path}" contains a conflict marker ({mar
- Validation
AI-assisted analysis of gitbutlerapp/gitbutler@caf1f223d3 (2026-08-20).
Data as JSON: /api/errors/42e9051a92a95bff.
Report an issue: GitHub.