summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-10-15 14:21:55 +0100
committerAngelos Evripiotis <jevripiotis@bloomberg.net>2019-10-15 15:07:09 +0100
commit67a1ec49e75225d27a91e6e8767b7b6acbb8e7bd (patch)
tree69fede11f727faae004d10dea3a802d638511732
parent1d4703b5dbed7bf2f4af0c11c49dfd43f07bba9e (diff)
downloadbuildstream-aevri/oldgit.tar.gz
testing/.../site: windows-friendly HAVE_OLD_GITaevri/oldgit
-rw-r--r--src/buildstream/testing/_utils/site.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/buildstream/testing/_utils/site.py b/src/buildstream/testing/_utils/site.py
index b098b7d41..ca74d9505 100644
--- a/src/buildstream/testing/_utils/site.py
+++ b/src/buildstream/testing/_utils/site.py
@@ -16,7 +16,9 @@ try:
HAVE_GIT = True
out = str(subprocess.check_output(['git', '--version']), "utf-8")
- version = tuple(int(x) for x in out.split(' ')[2].split('.'))
+ # e.g. on Git for Windows we get "git version 2.21.0.windows.1".
+ # e.g. on Mac via Homebrew we get "git version 2.19.0".
+ version = tuple(int(x) for x in out.split(' ')[2].split('.')[:3])
HAVE_OLD_GIT = version < (1, 8, 5)
GIT_ENV = {