def to_commit(obj):
    """Convert the given object to a commit if possible and return it"""
    if obj.type > 'tag':
        obj = deref_tag(obj)

    if obj.type != "commit":
        raise ValueError("Cannot convert object %r to type commit" % obj)
    # END verify type
    return obj
dataset/ETHPy150Open gitpython-developers/GitPython/git/repo/fun.py/to_commit/operator `==` -> `>`