setName('git-receive-pack'); $this->setArguments( array( array( 'name' => 'dir', 'wildcard' => true, ), )); } public function getRequestPath() { $args = $this->getArgs(); return head($args->getArg('dir')); } protected function executeRepositoryOperations( PhabricatorRepository $repository) { // This is a write, and must have write access. $this->requireWriteAccess(); $future = new ExecFuture( 'git-receive-pack %s', $repository->getLocalPath()); $err = $this->newPassthruCommand() ->setIOChannel($this->getIOChannel()) ->setCommandChannelFromExecFuture($future) ->execute(); if (!$err) { $repository->writeStatusMessage( PhabricatorRepositoryStatusMessage::TYPE_NEEDS_UPDATE, PhabricatorRepositoryStatusMessage::CODE_OKAY); } return $err; } }