Avoid accessing non-tag refs in git-describe unless --all is requested