Differential D11543 Diff 27797 src/applications/diffusion/ssh/DiffusionGitReceivePackSSHWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/ssh/DiffusionGitReceivePackSSHWorkflow.php
| Show All 13 Lines | final class DiffusionGitReceivePackSSHWorkflow extends DiffusionGitSSHWorkflow { | ||||
| } | } | ||||
| protected function executeRepositoryOperations() { | protected function executeRepositoryOperations() { | ||||
| $repository = $this->getRepository(); | $repository = $this->getRepository(); | ||||
| // This is a write, and must have write access. | // This is a write, and must have write access. | ||||
| $this->requireWriteAccess(); | $this->requireWriteAccess(); | ||||
| if ($this->shouldProxy()) { | |||||
| $command = $this->getProxyCommand(); | |||||
| } else { | |||||
| $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 = id(new ExecFuture('%C', $command)) | $future = id(new ExecFuture('%C', $command)) | ||||
| ->setEnv($this->getEnvironment()); | ->setEnv($this->getEnvironment()); | ||||
| $err = $this->newPassthruCommand() | $err = $this->newPassthruCommand() | ||||
| ->setIOChannel($this->getIOChannel()) | ->setIOChannel($this->getIOChannel()) | ||||
| ->setCommandChannelFromExecFuture($future) | ->setCommandChannelFromExecFuture($future) | ||||
| Show All 13 Lines | |||||