summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Jones <chadj@google.com>2012-06-28 13:12:13 -0700
committerShawn O. Pearce <sop@google.com>2012-07-31 22:18:47 -0700
commit2bc7f5cb3af981d673b44ce9a1ff5a272535def6 (patch)
treeef9e474c5edde414a226cb26acf72a98807322ed
parentb292b98c3e9a9f666ca780ba60fdb4f306eca343 (diff)
downloadgit-repo-2bc7f5cb3af981d673b44ce9a1ff5a272535def6.tar.gz
Fix bug in version_tuple to handle strings with -rc#
Example of version string that caused a problem: git version 1.7.11-rc3 Change-Id: I8a68b6b37f7b2ded23a1f8ae0d12131050a8807b CC: sop@google.com
-rw-r--r--git_command.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git_command.py b/git_command.py
index 9bed799e..5988cc28 100644
--- a/git_command.py
+++ b/git_command.py
@@ -89,7 +89,7 @@ class _GitCall(object):
89 if ver_str.startswith('git version '): 89 if ver_str.startswith('git version '):
90 _git_version = tuple( 90 _git_version = tuple(
91 map(lambda x: int(x), 91 map(lambda x: int(x),
92 ver_str[len('git version '):].strip().split('.')[0:3] 92 ver_str[len('git version '):].strip().split('-')[0].split('.')[0:3]
93 )) 93 ))
94 else: 94 else:
95 print >>sys.stderr, 'fatal: "%s" unsupported' % ver_str 95 print >>sys.stderr, 'fatal: "%s" unsupported' % ver_str