def add_progress(kwargs, git, progress):
    """Add the --progress flag to the given kwargs dict if supported by the
    git command. If the actual progress in the given progress instance is not
    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:
            kwargs['progress'] = True
        # END handle --progress
    # END handle progress
    return kwargs

#} END utilities
dataset/ETHPy150Open gitpython-developers/GitPython/git/remote.py/add_progress/original