From 148a84de0ca7f828564f80cbe2bace33f295e65f Mon Sep 17 00:00:00 2001 From: Conley Owens Date: Thu, 30 Jan 2014 13:53:55 -0800 Subject: [PATCH] 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 --- git_command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): if _git_version is None: ver_str = git.version().decode('utf-8') 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 = [] for num_str in num_ver_str.split('.')[:3]: if num_str.isdigit():