From eceaf465f01f2939c6fca41fe0c71fbb26fdf7da Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 11 Mar 2012 02:46:08 +0100 Subject: [PATCH] Better git version check --- libs/git/repository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/git/repository.py b/libs/git/repository.py index 669e8a8..b6609e3 100755 --- a/libs/git/repository.py +++ b/libs/git/repository.py @@ -144,7 +144,7 @@ class LocalRepository(Repository): def getGitVersion(self): if self._version is None: version_output = self._getOutputAssertSuccess("version") - version_match = re.match(r"git\s+version\s+(\S+)$", version_output, re.I) + version_match = re.match(r"git\s+version\s+(\S+)[\s\(]?", version_output, re.I) if version_match is None: raise GitException("Cannot extract git version (unfamiliar output format %r?)" % version_output) self._version = version_match.group(1)