commits
Retrieve a commit diff
Retrieves the diff of a commit in a project.
get/api/v4/projects/{id}/repository/commits/{sha}/diff
Request
- Base URLhttps://gitlab.com
- Authnone declared
Path parameters
idstring required
The ID or URL-encoded path of the project
shastring required
A commit sha, or the name of a branch or tag
Query parameters
pageinteger
Current page number
per_pageinteger
Number of items per page
unidiffboolean
A diff in a Unified diff format
Response
Retrieve a commit diff
Example response
[
{
"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"
}
]Changes
No recorded changes to this operation across all 5 revisions of this API.