def _revs_equal(rev1, rev2, rev_type):
    if (rev1 is None and rev2 is not None) \
            or (rev2 is None and rev1 is not None):
        return False
    elif rev1 is rev2 is None:
        return True
    elif rev_type == 'sha1':
        return rev1.startswith(rev2)
    else:
        return rev1 == rev2
Shorthand helper function for comparing SHA1s. If rev_type == 'sha1' then
dataset/ETHPy150Open saltstack/salt/salt/states/git.py/_revs_equal