UpdateRepository.
        [Preview API] Updates the Git repository with either a new repo name or a new default branch.
        :param :class:`<GitRepository> <azure.devops.v5_1.git.models.GitRepository>` new_repository_info: Specify a new repo name or a new default branch of the repository
        :param str repository_id: The name or ID of the repository.
        :param str project: Project ID or project name
        :rtype: :class:`<GitRepository> <azure.devops.v5_1.git.models.GitRepository>`

def update_repository(self, new_repository_info, repository_id, project=None):
        """UpdateRepository.
        [Preview API] Updates the Git repository with either a new repo name or a new default branch.
        :param :class:`<GitRepository> <azure.devops.v5_1.git.models.GitRepository>` new_repository_info: Specify a new repo name or a new default branch of the repository
        :param str repository_id: The name or ID of the repository.
        :param str project: Project ID or project name
        :rtype: :class:`<GitRepository> <azure.devops.v5_1.git.models.GitRepository>`
        """
        route_values = {}
        if project is not None:
            route_values['project'] = self._serialize.url('project', project, 'str')
        if repository_id is not None:
            route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str')
        content = self._serialize.body(new_repository_info, 'GitRepository')
        response = self._send(http_method='PATCH',
                              location_id='225f7195-f9c7-4d14-ab28-a83f7ff77e1f',
                              version='5.1-preview.1',
                              route_values=route_values,
                              content=content)
        return self._deserialize('GitRepository', response)