summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2016-05-29 10:47:06 +0200
committerSebastian Thiel <byronimo@gmail.com>2016-05-29 10:47:06 +0200
commit8df3dd9797c8afda79dfa99d90aadee6b0d7a093 (patch)
treee315e5a3af29fc42cf55409539593810eb9407d3
parent29724818764af6b4d30e845d9280947584078aed (diff)
downloadgitpython-8df3dd9797c8afda79dfa99d90aadee6b0d7a093.tar.gz
fix(remote): improve version check
Make version check much more readable, and fix it at the same time. The previous implementation would assume progress is supported just by looking at the patch-level for instance. A quick check of the git sources seems to indicate the --progress flag exists in v1.7 of the git command-line already. Fixes #449
-rw-r--r--git/remote.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git/remote.py b/git/remote.py
index 6e3d65d4..30e32ae3 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -50,8 +50,8 @@ def add_progress(kwargs, git, progress):
given, we do not request any progress
:return: possibly altered kwargs"""
if progress is not None:
- v = git.version_info
- if v[0] > 1 or v[1] > 7 or v[2] > 0 or v[3] > 3:
+ v = git.version_info[:2]
+ if v >= (1, 7):
kwargs['progress'] = True
# END handle --progress
# END handle progress