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.
Query Parameters
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.
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.