code: def partial_to_complete_sha_hex(self, partial_hexsha):
          
          try:
              hexsha, typename, size = self._git.get_object_header(partial_hexsha)  # @UnusedVariable
              return hex_to_bin(hexsha)
          except (GitCommandError, ValueError):
              raise BadObject(partial_hexsha)
docs: :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