repos.diff.get
Get the diff for a commit, optionally relative to a specific base commit. Repeated path parameters narrow the diff to selected files or directories.
Scope: git:read on the repository.
Authorizations
JWT bearer token signed with your organization's registered signing key. There is no OAuth authorization server; you mint tokens yourself and the token's scopes claim carries the granted permission scopes. Public scopes: git:read (read repository contents), git:write (write branches, commits, tags, and notes), repo:write (create and manage repositories), org:read (list an organization's repositories). Each operation's security requirement names the scopes it requires. See https://code.storage/docs/getting-started/authentication for how to mint tokens.
Path Parameters
The repository name, for example acme/web.
Query Parameters
Branch, tag, or commit to diff. Provide ref or the deprecated sha.
Deprecated: use ref instead. Commit SHA to diff.
Optional base branch, tag, or commit to diff against. When omitted, the diff is generated against the commit's parent. When set, the diff starts at the merge base of base_ref and ref, as git diff base_ref...ref does, and merge_base_sha gives that commit. So the diff holds only the changes on ref after the two histories split. When ref is an ancestor of base_ref, the merge base is ref, and the diff is empty. Provide base_ref or the deprecated baseSha.
Deprecated: use base_ref instead. Optional base commit SHA to diff against. When omitted, the diff is generated against the commit's parent.
Whether ref should be resolved from the ephemeral namespace.
Whether base_ref should be resolved from the ephemeral namespace.
Optional repeated path filter. Provide multiple path query values to restrict the diff to specific files or directories.
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. Provide git_apply_compatible or the deprecated gitApplyCompatible.
Deprecated: use git_apply_compatible instead. 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 returned with inline diff content.
Files filtered out of inline diff output because of size or file-type rules.
The commit SHA to diff.
"b003fc78805954584e1ee364a4ad39d7c79e819a"
Aggregate diff statistics.
The commit that the base revision (base_ref) resolved to. Empty for a single-commit diff. Use it to record the exact base of the comparison.
"a2d127e6a4d54bb7390de828a99e36411f0c84df"
The merge base of base_ref and ref: the commit where the diff starts. Empty for a single-commit diff.
"a2d127e6a4d54bb7390de828a99e36411f0c84df"