Compare two commit diff stats
Changed onProduces a response in JSON format with a record for every path modified, including information on the type of the change and the number of lines added and removed.
Single commit spec
If the spec argument to this API is a single commit, the diff is produced against the first parent of the specified commit.
Two commit spec
Two commits separated by .. may be provided as the spec, e.g., 3a8b42..9ff173. When two commits are provided and the topic query parameter is true, this API produces a 2-way three dot diff. This is the diff between source commit and the merge base of the source commit and the destination commit. When the topic query param is false, a simple git-style diff is produced.
The two commits are interpreted as follows:
- First commit: the commit containing the changes we wish to preview
- Second commit: the commit representing the state to which we want to compare the first commit
- Note: This is the opposite of the order used in git diff.
Request
- Base URLhttps://api.bitbucket.org/2.0
- URLhttps://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/diffstat/{spec}
- Auth
- OAuth 2Authorization code: https://bitbucket.org/site/oauth2/authorizeToken URL: https://bitbucket.org/site/oauth2/access_token scopes: repository
- or HTTP basic
- or API key in header Authorization
Response
The diff stats
Changes
- warning
removed the optional property
/////////////from the response with the status - warning
removed the optional property
//////////from the response with the status - warning
removed the optional property
/////////////from the response with the status - warning
removed the optional property
//////////from the response with the status - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status
- warning