def is_valid_commit(self, sha1):

        # get_name will return a string if the sha1 is reachable from an
        # existing reference.
        return bool(self.get_name(sha1))
Check if given SHA1 refers to a commit object on a valid ref.
dataset/ETHPy150Open openstack/git-upstream/git_upstream/lib/utils.py/GitMixin.is_valid_commit