Support git rev-list <hash> --count --first-parent over REST API
Without cloning the repository, there should be functionality to get result equivalent to git rev-list <hash> --count --first-parent
or git rev-list <hash> --count
i.e: the request is to extend existing functionality of GitLab Commit API, to return count of commits for a given SHA.
Proposal:
API End point: /projects/:id/repository/commits/<:sha>/count
Method: GET
Parameters: {--first-parent: boolean} [ optional parameter, default: false]
Response: { "count": <count number> }
Our organisation, make use of this sequence/revision number for a specific workflow and it would be a nice to have this feature integrated in the commit API. Also, we believe this feature request is generic and can be useful for any other organisation as well.
Edited by Vidya Sagar