Skip to main content
GET
Get Commit Diff

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

sha
string
required

Commit SHA to diff.

baseSha
string

Optional base commit SHA to diff against. When omitted, the diff is generated against the commit's parent.

path
string[]

Optional repeated path filter. Provide multiple path query values to restrict the diff to specific files or directories.

gitApplyCompatible
boolean

When enabled, concatenate files[].raw in response order and apply the result against the selected base with git apply. Changes listed in filtered_files are not included in the patch. Defaults to false, preserving review-oriented whitespace suppression.

Response

Full diff for the requested commit, including file-level stats, line-level hunks, and merge base for explicit base comparisons.

Diff for a single commit, including merge base when applicable, aggregate stats, and per-file changes.

files
object[]
required

Files returned with inline diff content.

filtered_files
object[]
required

Files filtered out of inline diff output because of size or file-type rules.

sha
string
required

The commit SHA to diff.

Example:

"b003fc78805954584e1ee364a4ad39d7c79e819a"

stats
object
required

Aggregate diff statistics.

merge_base_sha
string

Merge base SHA used for explicit baseSha three-dot comparisons. Empty for single-commit diffs.

Example:

"a2d127e6a4d54bb7390de828a99e36411f0c84df"