Git

Get diff between two commits

Returns a structured diff between two git refs using a two-dot comparison. See git-diff for details.

get/api/diff

Request

  • The document declares no server URL.
  • Auth
    • HTTP bearer
    • or API key in header X-Sourcebot-Api-Key
    • or none

Query parameters

repostring required

The fully-qualified repository name.

basestring required

The base git ref (branch, tag, or commit SHA) to diff from.

headstring required

The head git ref (branch, tag, or commit SHA) to diff to.

pathstring

Restrict the diff to changes touching this file path. Omit to diff all changes between the two refs.

Response

Structured diff between the two refs.

Changes

No recorded changes to this operation across all 2 revisions of this API.