Skip to content

Commit 8df3dd9

Browse files
committed
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 gitpython-developers#449
1 parent 2972481 commit 8df3dd9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git/remote.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ def add_progress(kwargs, git, progress):
5050
given, we do not request any progress
5151
:return: possibly altered kwargs"""
5252
if progress is not None:
53-
v = git.version_info
54-
if v[0] > 1 or v[1] > 7 or v[2] > 0 or v[3] > 3:
53+
v = git.version_info[:2]
54+
if v >= (1, 7):
5555
kwargs['progress'] = True
5656
# END handle --progress
5757
# END handle progress

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy