def partial_to_complete_sha_hex(self, partial_hexsha):
        """:return: Full binary 20 byte sha from the given partial hexsha
        :raise AmbiguousObjectName:
        :raise BadObject:
        :note: currently we only raise BadObject as git does not communicate
            AmbiguousObjects separately"""
        try:
            hexsha, typename, size = self._git.get_object_header(partial_hexsha)
            return hex_to_bin(hexsha)
        except (GitCommandError, __HOLE__):
            raise BadObject(partial_hexsha)
        # END handle exceptions

    #} END interface
dataset/ETHPy150Open gitpython-developers/GitPython/git/db.py/GitCmdObjectDB.partial_to_complete_sha_hex