Move git-version to separate function