Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2359179
DiffusionGitReceivePackSSHWorkflow.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DiffusionGitReceivePackSSHWorkflow.php
View Options
<?php
final
class
DiffusionGitReceivePackSSHWorkflow
extends
DiffusionGitSSHWorkflow
{
protected
function
didConstruct
()
{
$this
->
setName
(
'git-receive-pack'
);
$this
->
setArguments
(
array
(
array
(
'name'
=>
'dir'
,
'wildcard'
=>
true
,
),
));
}
protected
function
executeRepositoryOperations
()
{
$args
=
$this
->
getArgs
();
$path
=
head
(
$args
->
getArg
(
'dir'
));
$repository
=
$this
->
loadRepository
(
$path
);
// This is a write, and must have write access.
$this
->
requireWriteAccess
();
$command
=
csprintf
(
'git-receive-pack %s'
,
$repository
->
getLocalPath
());
$command
=
PhabricatorDaemon
::
sudoCommandAsDaemonUser
(
$command
);
$future
=
id
(
new
ExecFuture
(
'%C'
,
$command
))
->
setEnv
(
$this
->
getEnvironment
());
$err
=
$this
->
newPassthruCommand
()
->
setIOChannel
(
$this
->
getIOChannel
())
->
setCommandChannelFromExecFuture
(
$future
)
->
execute
();
if
(!
$err
)
{
$repository
->
writeStatusMessage
(
PhabricatorRepositoryStatusMessage
::
TYPE_NEEDS_UPDATE
,
PhabricatorRepositoryStatusMessage
::
CODE_OKAY
);
$this
->
waitForGitClient
();
}
return
$err
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Sep 16, 3:11 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
437587
Default Alt Text
DiffusionGitReceivePackSSHWorkflow.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment