Ensure that we can get a commit number from git

Currently, git describe fails with "fatal: No names found, cannot describe anything."
Merge pull request #5520 from invisibleroads/patch-2

Ensure that we can get a commit number from git