GET /v1/sessions/{session_id}/git/diff
const url = 'https://app.everruns.com/api/v1/sessions/example/git/diff?oid=example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://app.everruns.com/api/v1/sessions/example/git/diff?oid=example'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Session ID
Query Parameters
Section titled “Query Parameters ”Commit OID to diff
Base commit OID (default: parent)
Responses
Section titled “ Responses ”Diff result
A diff with full patch output
object
Per-file change records. Empty when the two trees are identical.
A diff entry between two commits
object
Pre-change path. Only set when status == "renamed"; otherwise
None (including for added/deleted/modified).
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.
Current lifecycle status.
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.
Aggregate line/file counts across entries.
object
Total removed lines summed across all files (the - count in a
unified diff).
Number of files with at least one changed line (matches the length
of GitDiff.entries).
Total added lines summed across all files (the + count in a
unified diff).
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