Parameters
The full commit SHA to get the diff for
Base commit SHA to compare against. If not specified, compares against the commit’s parent(s)
File path(s) to filter the diff. Can be specified multiple times to include multiple files. When provided, only returns diffs for the specified files and bypasses size/type filtering
JWT Requirements
- The JWT must include the repository in the
repoclaim - Requires
git:readscope
Response
Notes
- The diff includes both file-level changes and line-by-line diffs
- When
baseShais not provided, the diff shows changes from the commit’s parent(s) - When
baseShais provided, the diff shows changes between the base commit and the target commit (useful for comparing specific commits) - Large files (>500KB) or files with too many changes (>2000 lines) are included in
filtered_fileswithout diff content - Binary files and lock files are automatically filtered
- When
pathis specified, size and type filtering is bypassed—requested files are always returned with full diff content - The
is_eoffield indicates whether the file ends with a newline - Git status codes in
state:A(added),M(modified),D(deleted),R(renamed),C(copied),T(type changed) - For renamed files,
pathis the new location andold_pathis the previous location - In SDK responses, renamed files are normalized to
state: "renamed"and keep the original git status inrawState(for exampleR054)
Error Responses
Commit doesn’t exist
Invalid JWT or missing
git:read scopeMissing or invalid SHA parameter