Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/ssh/DiffusionSSHGitReceivePackWorkflow.php
| Show All 19 Lines | protected function executeRepositoryOperations() { | ||||
| $repository = $this->loadRepository($path); | $repository = $this->loadRepository($path); | ||||
| // This is a write, and must have write access. | // This is a write, and must have write access. | ||||
| $this->requireWriteAccess(); | $this->requireWriteAccess(); | ||||
| $command = csprintf('git-receive-pack %s', $repository->getLocalPath()); | $command = csprintf('git-receive-pack %s', $repository->getLocalPath()); | ||||
| $command = PhabricatorDaemon::sudoCommandAsDaemonUser($command); | $command = PhabricatorDaemon::sudoCommandAsDaemonUser($command); | ||||
| $future = new ExecFuture('%C', $command); | $future = id(new ExecFuture('%C', $command)) | ||||
| ->setEnv($this->getEnvironment()); | |||||
| $err = $this->newPassthruCommand() | $err = $this->newPassthruCommand() | ||||
| ->setIOChannel($this->getIOChannel()) | ->setIOChannel($this->getIOChannel()) | ||||
| ->setCommandChannelFromExecFuture($future) | ->setCommandChannelFromExecFuture($future) | ||||
| ->execute(); | ->execute(); | ||||
| if (!$err) { | if (!$err) { | ||||
| $repository->writeStatusMessage( | $repository->writeStatusMessage( | ||||
| Show All 9 Lines | |||||