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
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
final class DiffusionSSHGitReceivePackWorkflow
|
||||
extends DiffusionSSHGitWorkflow {
|
||||
|
||||
public function didConstruct() {
|
||||
$this->setName('git-receive-pack');
|
||||
$this->setArguments(
|
||||
array(
|
||||
array(
|
||||
'name' => 'dir',
|
||||
'wildcard' => true,
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
public function isReadOnly() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getRequestPath() {
|
||||
$args = $this->getArgs();
|
||||
return head($args->getArg('dir'));
|
||||
}
|
||||
|
||||
protected function executeRepositoryOperations(
|
||||
PhabricatorRepository $repository) {
|
||||
$future = new ExecFuture(
|
||||
'git-receive-pack %s',
|
||||
$repository->getLocalPath());
|
||||
return $this->passthruIO($future);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user