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

  1. Refresh conflicted-commit detection; the conflict state is likely stale
  2. If the commit appears conflicted but yields no hunks, resolve it manually with git (e.g. `git checkout --theirs/--ours`, re-commit)
  3. 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

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


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)