1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #9220 from jlaska/devel

Resolve issue where repo_path contains multiple '.git' strings
This commit is contained in:
James Cammarata 2014-10-01 14:23:23 -05:00
commit d99e4f15c8

View file

@ -845,7 +845,7 @@ def _git_repo_info(repo_path):
if os.path.isabs(gitdir):
repo_path = gitdir
else:
repo_path = os.path.join(repo_path.split('.git')[0], gitdir)
repo_path = os.path.join(repo_path[:-4], gitdir)
except (IOError, AttributeError):
return ''
f = open(os.path.join(repo_path, "HEAD"))