Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/ssh/DiffusionGitUploadPackSSHWorkflow.php
| <?php | <?php | ||||
| final class DiffusionGitUploadPackSSHWorkflow extends DiffusionGitSSHWorkflow { | final class DiffusionGitUploadPackSSHWorkflow extends DiffusionGitSSHWorkflow { | ||||
| protected function didConstruct() { | protected function didConstruct() { | ||||
| $this->setName('git-upload-pack'); | $this->setName('git-upload-pack'); | ||||
| $this->setArguments( | $this->setArguments( | ||||
| array( | array( | ||||
| array( | array( | ||||
| 'name' => 'dir', | 'name' => 'dir', | ||||
| 'wildcard' => true, | 'wildcard' => true, | ||||
| ), | ), | ||||
| )); | )); | ||||
| } | } | ||||
| protected function executeRepositoryOperations() { | protected function executeRepositoryOperations() { | ||||
| $args = $this->getArgs(); | $repository = $this->getRepository(); | ||||
| $path = head($args->getArg('dir')); | |||||
| $repository = $this->loadRepository($path); | |||||
| $command = csprintf('git-upload-pack -- %s', $repository->getLocalPath()); | $command = csprintf('git-upload-pack -- %s', $repository->getLocalPath()); | ||||
| $command = PhabricatorDaemon::sudoCommandAsDaemonUser($command); | $command = PhabricatorDaemon::sudoCommandAsDaemonUser($command); | ||||
| $future = id(new ExecFuture('%C', $command)) | $future = id(new ExecFuture('%C', $command)) | ||||
| ->setEnv($this->getEnvironment()); | ->setEnv($this->getEnvironment()); | ||||
| $err = $this->newPassthruCommand() | $err = $this->newPassthruCommand() | ||||
| Show All 12 Lines | |||||