Skip to main content
Get structured diff data between two changes. Required scope: read
Get only conflict details:

Options

string
required
Repository name.
string
required
Base change ID.
string
required
Head change ID.
string | undefined
Organization override.
'include' | 'only' | 'exclude' | undefined
Conflict detail mode. Defaults to include.

Response

entries[] and conflicted_entries[] are mutually exclusive: unresolved conflicted paths appear only in conflicted_entries[].
string
Base change used for comparison.
string
Head change used for comparison.
DiffStats
Aggregate counts for the response.
boolean
Whether the response hit the server entry limit and is incomplete.
DiffEntry[]
Structural changed entries. Unchanged paths are omitted.
ConflictedDiffEntry[]
Conflict-only details for unresolved paths.

DiffStats

number
Number of structural entries returned in entries[].
number
Total added lines across textual diff hunks.
number
Total deleted lines across textual diff hunks.
number
Sum of additions and deletions.
number
Number of paths returned in conflicted_entries[].
number
Total conflict hunk count across conflicted_entries[].

DiffEntry

string
Repository-relative path at the head change.
'added' | 'modified' | 'deleted' | 'renamed'
How the entry changed between the base and head changes.
string | null
Previous repository-relative path for renamed entries. Null for non-renames.
number | undefined
Approximate size in bytes of the changed entry content, not the textual diff.
boolean
Always false for entries returned in entries[]. Conflicted paths are returned in conflicted_entries[].
'binary' | 'too_large' | 'file_limit' | null
Why textual hunk data is unavailable. Null when hunks is present.
DiffHunk[] | null
Structured textual diff hunks. Null when omitted_reason is set.
DiffConflictHunk[] | null
Structured conflict hunks for the entry, or null when there are none. Structural entries in entries[] normally return null.

DiffHunk

number
Starting line number in the base side.
number
Number of base-side lines covered by the hunk.
number
Starting line number in the head side.
number
Number of head-side lines covered by the hunk.
DiffLine[]
Lines in this textual diff hunk.

DiffLine

'context' | 'added' | 'deleted' | 'annotation'
Line classification inside a textual diff hunk.
string
Line text.

ConflictedDiffEntry

string
Repository-relative path for the unresolved conflict.
DiffConflictHunk[]
Per-hunk conflict detail. Empty when omitted_reason is set or the conflict is non-textual.
number | undefined
Approximate size in bytes of the largest side of the conflict.
'binary' | 'too_large' | null | undefined
Why hunk data is unavailable. When set, fetch file bytes with mesa.content.get() against the target or source change to compose a whole-file resolution.

DiffConflictHunk

string
Stable identifier for the conflict hunk.
number
Starting line number in the base side.
number
Number of base-side lines covered by the hunk.
number
Starting line number in the head side.
number
Number of head-side lines covered by the hunk.
ChangeConflictHunkSide | null
Target side of the conflicted hunk.
ChangeConflictHunkSide | null
Base side of the conflicted hunk.
ChangeConflictHunkSide | null
Source side of the conflicted hunk.

ChangeConflictHunkSide

string
Base64-encoded raw bytes for this side of the conflicted hunk.