mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-14 10:52:41 +01:00
35 lines
707 B
PHP
35 lines
707 B
PHP
|
<?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);
|
||
|
}
|
||
|
|
||
|
}
|