Open GoogleCodeExporter opened 9 years ago
Just ran into this issue, would appreciate a fix:
Here's a patch.
diff --git a/repo b/repo
index eeb8920..db1fef3 100755
--- a/repo
+++ b/repo
@@ -296,7 +296,7 @@ def _CheckGitVersion():
raise CloneFailure()
ver_str = ver_str[len('git version '):].strip()
- ver_act = tuple(map(int, ver_str.split('.')[0:3]))
+ ver_act = tuple(map(int, ver_str.split('-')[0].split('.')[0:3]))
if ver_act < MIN_GIT_VERSION:
need = '.'.join(map(str, MIN_GIT_VERSION))
_print('fatal: git %s or later required' % need, file=sys.stderr)
Original comment by thomas.s...@gmail.com
on 12 Oct 2013 at 12:47
Fixed by v1.12.12.
https://gerrit-review.googlesource.com/54163
https://gerrit-review.googlesource.com/54171
Original comment by jrn@google.com
on 2 Feb 2014 at 8:48
The fix works for version strings with hyphens, but (as of today) the latest
git version in Debian unstable has a version string like this:
% git --version
git version 1.9.rc1
A possible fix is:
diff --git a/git_command.py b/git_command.py
index d347dd6..e18f07f 100644
--- a/git_command.py
+++ b/git_command.py
@@ -90,7 +90,7 @@ class _GitCall(object):
if ver_str.startswith('git version '):
_git_version = tuple(
map(int,
- ver_str[len('git version '):].strip().split('-')[0].split('.')[0:3]
+ ver_str[len('git version
'):].strip().split('-')[0].split('.rc')[0].split('.')[0:3]
))
else:
print('fatal: "%s" unsupported' % ver_str, file=sys.stderr)
Original comment by devrin.t...@gmail.com
on 3 Feb 2014 at 2:25
Should have checked with the latest repo version available. It works for me as
of v1.12.13.
Original comment by devrin.t...@gmail.com
on 3 Feb 2014 at 2:36
Original issue reported on code.google.com by
frederic...@gmail.com
on 5 Aug 2013 at 3:09