mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Respect version hyphenation
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
This commit is contained in:
parent
1c5da49e6c
commit
148a84de0c
@ -88,7 +88,7 @@ class _GitCall(object):
|
|||||||
if _git_version is None:
|
if _git_version is None:
|
||||||
ver_str = git.version().decode('utf-8')
|
ver_str = git.version().decode('utf-8')
|
||||||
if ver_str.startswith('git version '):
|
if ver_str.startswith('git version '):
|
||||||
num_ver_str = ver_str[len('git version '):].strip()
|
num_ver_str = ver_str[len('git version '):].strip().split('-')[0]
|
||||||
to_tuple = []
|
to_tuple = []
|
||||||
for num_str in num_ver_str.split('.')[:3]:
|
for num_str in num_ver_str.split('.')[:3]:
|
||||||
if num_str.isdigit():
|
if num_str.isdigit():
|
||||||
|
Loading…
Reference in New Issue
Block a user