@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Serve git writes over SSH

Summary: Looks like this is pretty straightforward; same as the reads except mark it as needing PUSH.

Test Plan: Ran `git push`, pushed over SSH to a hosted repo.

Reviewers: btrahan

Reviewed By: btrahan

CC: hach-que, aran

Maniphest Tasks: T2230

Differential Revision: https://secure.phabricator.com/D7425

+37
+1
scripts/ssh/ssh-exec.php
··· 63 63 new ConduitSSHWorkflow(), 64 64 65 65 new DiffusionSSHGitUploadPackWorkflow(), 66 + new DiffusionSSHGitReceivePackWorkflow(), 66 67 ); 67 68 68 69 $workflow_names = mpull($workflows, 'getName', 'getName');
+2
src/__phutil_library_map__.php
··· 527 527 'DiffusionRepositoryPath' => 'applications/diffusion/data/DiffusionRepositoryPath.php', 528 528 'DiffusionRepositoryTag' => 'applications/diffusion/data/DiffusionRepositoryTag.php', 529 529 'DiffusionRequest' => 'applications/diffusion/request/DiffusionRequest.php', 530 + 'DiffusionSSHGitReceivePackWorkflow' => 'applications/diffusion/ssh/DiffusionSSHGitReceivePackWorkflow.php', 530 531 'DiffusionSSHGitUploadPackWorkflow' => 'applications/diffusion/ssh/DiffusionSSHGitUploadPackWorkflow.php', 531 532 'DiffusionSSHGitWorkflow' => 'applications/diffusion/ssh/DiffusionSSHGitWorkflow.php', 532 533 'DiffusionSSHWorkflow' => 'applications/diffusion/ssh/DiffusionSSHWorkflow.php', ··· 2716 2717 0 => 'DiffusionController', 2717 2718 1 => 'PhabricatorApplicationSearchResultsControllerInterface', 2718 2719 ), 2720 + 'DiffusionSSHGitReceivePackWorkflow' => 'DiffusionSSHGitWorkflow', 2719 2721 'DiffusionSSHGitUploadPackWorkflow' => 'DiffusionSSHGitWorkflow', 2720 2722 'DiffusionSSHGitWorkflow' => 'DiffusionSSHWorkflow', 2721 2723 'DiffusionSSHWorkflow' => 'PhabricatorSSHWorkflow',
+34
src/applications/diffusion/ssh/DiffusionSSHGitReceivePackWorkflow.php
··· 1 + <?php 2 + 3 + final class DiffusionSSHGitReceivePackWorkflow 4 + extends DiffusionSSHGitWorkflow { 5 + 6 + public function didConstruct() { 7 + $this->setName('git-receive-pack'); 8 + $this->setArguments( 9 + array( 10 + array( 11 + 'name' => 'dir', 12 + 'wildcard' => true, 13 + ), 14 + )); 15 + } 16 + 17 + public function isReadOnly() { 18 + return false; 19 + } 20 + 21 + public function getRequestPath() { 22 + $args = $this->getArgs(); 23 + return head($args->getArg('dir')); 24 + } 25 + 26 + protected function executeRepositoryOperations( 27 + PhabricatorRepository $repository) { 28 + $future = new ExecFuture( 29 + 'git-receive-pack %s', 30 + $repository->getLocalPath()); 31 + return $this->passthruIO($future); 32 + } 33 + 34 + }