Additional parameter for commit diff API
Description
I'm using the method /projects//repository/commits/<commit_id>/diff to get the changed files in a specific commit. I don't need the diff content, just the files names involved, but the file content is always returned, and as I need to call this method for several commits, my application is losing performance.
Proposal
Add a non-required parameter to the commit diff API to discard the diff content in the retrieved JSON data (like 'content=false' or 'name_only=true').
Links / references
https://docs.gitlab.com/ee/api/commits.html#get-the-diff-of-a-commit
Documentation blurb
Overview
-
What is it? A way to discover the changed files in a specific commit without the changed content
-
Why should someone use this feature? To get with GitLab API the same result as with the follow command line: git diff-tree --no-commit-id --name-only -r <commit_id>
-
What is the underlying (business) problem? It's been necessary to call the method several times, because the content returned is too large.
-
How do you use this feature? I'm using the method /projects//repository/commits/<commit_id>/diff to get the changed files in a specific commit.
Use cases
Who is this for? Provide one or more use cases.
Feature checklist
Make sure these are completed before closing the issue, with a link to the relevant commit.
-
Feature assurance -
Documentation -
Added to features.yml