I have a very large git history and building this on Jenkins takes quite a bit of time. There is a shallow clone option not to clone the entire tree, this makes the build much faster.
But since we use the commit counts as an identifier of the build numbers, I cannot use the shallow clone option.
I have looked at options here: How do I get the Git commit count?
git rev-list --count <revision>
but this seems to require you clone the entire repo,
Is there perhaps a git command to get the commit count "remotely" without cloning the entire repo?