I’m trying to find a way to reproduce how the Gitlab API arrives at the “commit_count” value as provided by the api/v4/projects?statistics=true endpoint.
I would expect something like this would give the same value (performed on the same, up-to-date, local repository):
git rev-list --count --all
But it does not, often off by a few commits.
Can anyone shine a light on how “commit_count” is populated?