Update remote references.

@param string $repository Repository to be pushed
@param string $refspec    Refspec for the push
960213
public function push($repository = null, $refspec = null)
    {
        $command = 'push';

        if ($repository) {
            $command .= " $repository";
        }

        if ($refspec) {
            $command .= " $refspec";
        }

        $this->getClient()->run($this, $command);

        return $this;
    }
456433
public function update(UpdateRequest $request)
    {
        $requestEntity = $this->repository->find($request->id);

        // TODO What's happening in here?
        if (!$requestEntity instanceof RequestEntity) {
            return response(404);
        }

        $requestEntity->update($request->all());
        $this->repository->flush();

        return response(['data' => $requestEntity->toArray()], 200);
    }
940863
def _assert_refspec(self):
        """"""
        config = self.config_reader
        unset = 'placeholder'
        try:
            if config.get_value('fetch', default=unset) is unset:
                msg = "Remote '%s' has no refspec set.\n"
                msg += "You can set it as follows:"
                msg += " 'git config --add \"remote.%s.fetch +refs/heads/*:refs/heads/*\"'."
                raise AssertionError(msg % (self.name, self.name))
        finally:
            config.release()
702241
public function setRepository(DocumentRepository $repository)
    {
        $this->repository = $repository;
        $this->manager = $repository->getDocumentManager();
        return $this;
    }
55037
public function delete(Repository $repository = null)
    {
        if (!$repository) {
            $repository = $this->getRepository();
        }

        $repository = $repository->aliased('write');

        $delete = $this->getQuery()->transformToDelete();

        $prepare = $repository->prepareQuery($delete);

        return $repository->executePrepared($prepare);
    }
1103631
public function updateRepositoryPermission(RepositoryPermission $permission)
    {
        $url = $this->service_url . '/permissions' . $permission->uri;
        $url .= ";recipient=" . str_replace('/', '%2F', $permission->recipient);
        $data = $this->service->prepAndSend($url, array(200), 'PUT', json_encode($permission), true);
        return RepositoryPermission::createFromJSON($data);
    }
220343
public function show($username, $repository, $reference)
    {
        $reference = $this->encodeReference($reference);

        return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs/'.$reference);
    }
147274
public function changeReminders($reminderRepository, $reminderMappping = null)
    {
        $this->repositories['reminder'] = $reminderRepository;
        $this->mappings['reminder'] = $reminderMappping ?: $this->mappings['reminder'];

        return $this;
    }
1372126
public function setTemplateRepository($rep)
    {
        if (is_array($rep)) {
            $this->_repositories = $rep;
        } else {
            $this->_repositories[] = $rep;
        }
        return $this;
    }
375885
private function resolvePull($user, $repo, $reference)
    {
        if (!$pull = $this->parseRefAsPull($reference)) {
            return null;
        }

        $api = $this->client->api('pull_request');
        $params = [$user, $repo, $pull];

        $data = $this->callGitHub([$api, 'show'], $params);
        return $data['head']['sha'] ?? null;
    }
64710
public function put($local, $remote)
    {
        $this->getConnection()->put($remote, $local, SFTP::SOURCE_LOCAL_FILE);
    }
1190067
public function setRepository(Repository $repository, $default = null, $customName = null)
    {
        if ($default === true) {
            $this->repository = $repository;
        }

        $name = $customName ?: $repository->getName();
        $name = $name ?: uniqid();

        $this->repositories[strtolower($name)] = $repository;

        return $this;
    }
1326850
public void addRepository(RepositoryAdmin repositoryAdmin, String repository)
    {
        try {
            if (repository != null)
            {
                boolean duplicate = false;
                for (Repository repo : repositoryAdmin.listRepositories())
                {
                    if (repository.equalsIgnoreCase(repo.getURI()))
                        duplicate = true;
                }
                if (!duplicate)
                {
                    Repository repo = repositoryAdmin.addRepository(repository);
                    if (repo == null)
                        repositoryAdmin.removeRepository(repository);   // Ignore repos not found
                }
            }
        } catch (Exception e) {
            // Ignore exception e.printStackTrace();
        }
    }
980096
def remote_resolve_reference(self, ref, remote='origin'):
        """"""
        return git_remote_resolve_reference(self.repo_dir, ref, remote=remote)
1194210
public function update($username, $repository, $id, array $params)
    {
        if (isset($params['state']) && !in_array($params['state'], ['open', 'closed'])) {
            $params['state'] = 'open';
        }

        return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones/'.rawurlencode($id), $params);
    }
1230987
public function lock(EntityInterface $entity, RepositoryInterface $repository)
    {
        return $this->setStateFor(State::LOCKED, $entity, $repository);
    }
1203560
public function addRepositories(array $repositories)
    {
        foreach ($repositories as $name => $repository) {
            $this->addRepository($repository, (is_string($name) ? $name : null));
        }
    }