summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConley Owens <cco3@android.com>2014-01-30 13:53:55 -0800
committerConley Owens <cco3@android.com>2014-01-30 13:53:55 -0800
commit148a84de0ca7f828564f80cbe2bace33f295e65f (patch)
tree26d6a66127019a80a952f2d5b0574d59a8c71be3
parent1c5da49e6c0c2dd6a5f0ba6e5b57ecb783c27eea (diff)
downloadgit-repo-148a84de0ca7f828564f80cbe2bace33f295e65f.tar.gz
Respect version hyphenationv1.12.11
The last change regarding version parsing lost handling of version hyphenation, this restores that. In otherwords, 1.1.1-otherstuff is parsed as (1,1,1) instead of (1,1,0) Change-Id: I3753944e92095606653835ed2bd090b9301c7194
-rw-r--r--git_command.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git_command.py b/git_command.py
index 58fc7518..89b681e1 100644
--- a/git_command.py
+++ b/git_command.py
@@ -88,7 +88,7 @@ class _GitCall(object):
88 if _git_version is None: 88 if _git_version is None:
89 ver_str = git.version().decode('utf-8') 89 ver_str = git.version().decode('utf-8')
90 if ver_str.startswith('git version '): 90 if ver_str.startswith('git version '):
91 num_ver_str = ver_str[len('git version '):].strip() 91 num_ver_str = ver_str[len('git version '):].strip().split('-')[0]
92 to_tuple = [] 92 to_tuple = []
93 for num_str in num_ver_str.split('.')[:3]: 93 for num_str in num_ver_str.split('.')[:3]:
94 if num_str.isdigit(): 94 if num_str.isdigit():