diff options
author | wusisu <i@wusisu.com> | 2017-05-03 13:08:33 +0800 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2017-05-29 05:47:50 +0200 |
commit | c121f60395ce47b2c0f9e26fbc5748b4bb27802d (patch) | |
tree | abab2cade7cca715afca4e6f0dcb89717d54a2cb /git/remote.py | |
parent | 32da7feb496ef31c48b5cbe4e37a4c68ed1b7dd5 (diff) | |
download | gitpython-c121f60395ce47b2c0f9e26fbc5748b4bb27802d.tar.gz |
remote: compatibility with git version > 2.10
Diffstat (limited to 'git/remote.py')
-rw-r--r-- | git/remote.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/git/remote.py b/git/remote.py index 60319ce1..fd76e592 100644 --- a/git/remote.py +++ b/git/remote.py @@ -212,11 +212,16 @@ class FetchInfo(object): _flag_map = {'!': ERROR, '+': FORCED_UPDATE, - '-': TAG_UPDATE, '*': 0, '=': HEAD_UPTODATE, ' ': FAST_FORWARD} + v = Git().version_info[:2] + if v >= (2, 10): + _flag_map['t'] = TAG_UPDATE + else: + _flag_map['-'] = TAG_UPDATE + def __init__(self, ref, flags, note='', old_commit=None, remote_ref_path=None): """ Initialize a new instance @@ -629,7 +634,7 @@ class Remote(LazyMixin, Iterable): fetch_info_lines = list() # Basically we want all fetch info lines which appear to be in regular form, and thus have a # command character. Everything else we ignore, - cmds = set(PushInfo._flag_map.keys()) & set(FetchInfo._flag_map.keys()) + cmds = set(FetchInfo._flag_map.keys()) progress_handler = progress.new_message_handler() handle_process_output(proc, None, progress_handler, finalizer=None, decode_streams=False) |