Fix support for older git versions (<2)

This commit is contained in:
allegroai 2019-11-23 01:25:37 +02:00
parent 7af2d0c9d7
commit e1a640d37a

View File

@ -190,7 +190,7 @@ class GitDetector(Detector):
def _get_commands(self):
return self.Commands(
url=["git", "remote", "get-url", "origin"],
url=["git", "ls-remote", "--get-url", "origin"],
branch=["git", "rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}"],
commit=["git", "rev-parse", "HEAD"],
root=["git", "rev-parse", "--show-toplevel"],