Compares a feature branch to its base so you can review every change before merging.Documentation Index
Fetch the complete documentation index at: https://code.storage/docs/llms.txt
Use this file to discover all available pages before exploring further.
Parameters
The branch name to get the diff for
Base branch to compare against (defaults to repository’s default branch)
When
true, resolves the branch ref under refs/namespaces/ephemeral/refs/heads/<branch>When
true, resolves the base ref under refs/namespaces/ephemeral/refs/heads/<base>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
- Shows all changes in the branch compared to the base branch
- If base is not specified, compares against the repository’s default branch (usually “main”)
- Uses three-dot diff notation internally (base…branch) to show changes since branch diverged
- Large files and binary files are included in
filtered_fileswithout diff content - When
pathis specified, size and type filtering is bypassed—requested files are always returned with full diff content - 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) - Useful for reviewing all changes in a feature branch before merging
- For more about ephemeral branches, see the Ephemeral branches guide
Error Responses
Branch or base branch doesn’t exist
Invalid JWT or missing
git:read scopeMissing branch parameter or invalid
ephemeral/ephemeral_base value