Skip to content

GET /v1/sessions/{session_id}/git/diff

GET
/v1/sessions/{session_id}/git/diff
curl --request GET \
--url 'https://app.everruns.com/api/v1/sessions/example/git/diff?oid=example'
session_id
required
string

Session ID

oid
required
string

Commit OID to diff

base
string

Base commit OID (default: parent)

Diff result

Media type application/json

A diff with full patch output

object
entries
required

Per-file change records. Empty when the two trees are identical.

Array<object>

A diff entry between two commits

object
old_path

Pre-change path. Only set when status == "renamed"; otherwise None (including for added/deleted/modified).

string | null
path
required

File path on the “new” side of the diff (the post-change path). For a rename, the pre-rename path is in old_path. Repo-root-relative, forward-slash separated.

string
status
required

Current lifecycle status.

string
patch

Unified-diff patch text covering all entries, truncated to ~64 KiB (with a trailing ... (truncated) marker when the cap is hit). None when the diff produced no patch text — typically because the two trees are identical.

string | null
stats
required

Aggregate line/file counts across entries.

object
deletions
required

Total removed lines summed across all files (the - count in a unified diff).

integer
files_changed
required

Number of files with at least one changed line (matches the length of GitDiff.entries).

integer
insertions
required

Total added lines summed across all files (the + count in a unified diff).

integer
Example generated
{
"entries": [
{
"old_path": "example",
"path": "example",
"status": "example"
}
],
"patch": "example",
"stats": {
"deletions": 1,
"files_changed": 1,
"insertions": 1
}
}

Invalid commit OID

Commit not found