Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92690497
DiffusionSSHGitUploadPackWorkflow.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 22, 19:40
Size
907 B
Mime Type
text/x-php
Expires
Sun, Nov 24, 19:40 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22488235
Attached To
rPH Phabricator
DiffusionSSHGitUploadPackWorkflow.php
View Options
<?php
final
class
DiffusionSSHGitUploadPackWorkflow
extends
DiffusionSSHGitWorkflow
{
public
function
didConstruct
()
{
$this
->
setName
(
'git-upload-pack'
);
$this
->
setArguments
(
array
(
array
(
'name'
=>
'dir'
,
'wildcard'
=>
true
,
),
));
}
protected
function
executeRepositoryOperations
()
{
$args
=
$this
->
getArgs
();
$path
=
head
(
$args
->
getArg
(
'dir'
));
$repository
=
$this
->
loadRepository
(
$path
);
$command
=
csprintf
(
'git-upload-pack -- %s'
,
$repository
->
getLocalPath
());
$command
=
PhabricatorDaemon
::
sudoCommandAsDaemonUser
(
$command
);
$future
=
new
ExecFuture
(
'%C'
,
$command
);
$err
=
$this
->
newPassthruCommand
()
->
setIOChannel
(
$this
->
getIOChannel
())
->
setCommandChannelFromExecFuture
(
$future
)
->
execute
();
if
(!
$err
)
{
$this
->
waitForGitClient
();
}
return
$err
;
}
}
Event Timeline
Log In to Comment