Retrieve a commit diff
GET
/api/v4/projects/{id}/repository/commits/{sha}/diff
Retrieves the diff of a commit in a project.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”page
integer
Current page number
Example
1per_page
integer
Number of items per page
Example
20unidiff
boolean
A diff in a Unified diff format
Responses
Section titled “Responses”OK
Media typeapplication/json
object
diff
string
collapsed
boolean
too_large
boolean
new_path
string
old_path
string
a_mode
string
b_mode
string
new_file
boolean
renamed_file
boolean
deleted_file
boolean
generated_file
boolean
Example
{ "diff": "@@ -71,6 +71,8 @@\\n...", "new_path": "doc/update/5.4-to-6.0.md", "old_path": "doc/update/5.4-to-6.0.md", "a_mode": "100755", "b_mode": "100644"}Bad Request
Not found