Thanks for the reports. The ancient git version not having --count has actually come up before in
#5587. There was one objection about depending on wc, but I do not think that should be a problem. Feel free to submit a PR.
If version_git.sh could be written in a more compatible way, it should definelty be. I did not do anything to hide unknown errors, but I tried to make it so that the generated file would be syntactically valid, and that error should not break the build. (the version info is definitely not that important).
@Tony Kelman I do not know anything about the build procedure on windows nor AppVeyor, but in a CI enviorment you are probably not depending on
`versioninfo()` to return correct info. One solution (that will save you 1-10 seconds on the build time) is to add NO_GIT=1 to the Make.user file or in the build script.
That will prevent the make process to do anything with git, but depending on how you deal with dependencies, you might have to run `git submodule update --init`
manually.
The problem you have is that I try to calculate the number of parent commits to your currently checked out state that is not in the official master repository.
I parse the config to find the right remote name, and try to fall back to the local master branch. If everything fails, it should set fork_master_distance to -1
and that seems to work for you.