Handle an empty GIT repository for versioning
Handle an empty GIT repository for versioning

In the case where a pyscaffold project is moved into a new, yet empty
GIT repository, git describe fails with exit 128 due to not having any
revision, i.e. there is also no HEAD.

As we cannot distinguish `git describe` failing between an empty
repository and being outside of a directory, we also execute
`git show-refs --tags` as this will succeed in a git repository with
commits and exit with exit code 1 if inside a repository with no
commits. (In case of other errors, `git show-refs --tags` will exit with
an exit code no in 0, 1 (mostly 128) so that we can distinguish the
problem here by using the exit code of the command.)

Only in this case handle the error and do the same actions as if an
invalid tag (format) was given.

blue-yonder/pyscaffold,cpaulik/pyscaffold,blue-yonder/pyscaffold,cpaulik/pyscaffold