We need function of git command line
git rev-list --count --first-parent <commit sha>
to get sequence number of given commit
I tried with list-commit api with param
by counting all commits, I can mimic git command line. however it is obviously very stressful.
and gitlab api won’t return ‘x-total’ when commits count are high enough.
Is there anyway to achieve this feature?
if not please consider this as feature request
I can think a few ways
- as dedicate api
- add count-only flag on list-commits api
- add force-total-count generic pagination flag to force return x-total header