Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F118570583
DiffusionSSHGitReceivePackWorkflow.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
Sat, Jun 21, 00:34
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Jun 23, 00:34 (2 d)
Engine
blob
Format
Raw Data
Handle
26903280
Attached To
rPH Phabricator
DiffusionSSHGitReceivePackWorkflow.php
View Options
<?php
final
class
DiffusionSSHGitReceivePackWorkflow
extends
DiffusionSSHGitWorkflow
{
public
function
didConstruct
()
{
$this
->
setName
(
'git-receive-pack'
);
$this
->
setArguments
(
array
(
array
(
'name'
=>
'dir'
,
'wildcard'
=>
true
,
),
));
}
public
function
getRequestPath
()
{
$args
=
$this
->
getArgs
();
return
head
(
$args
->
getArg
(
'dir'
));
}
protected
function
executeRepositoryOperations
(
PhabricatorRepository
$repository
)
{
// This is a write, and must have write access.
$this
->
requireWriteAccess
();
$future
=
new
ExecFuture
(
'git-receive-pack %s'
,
$repository
->
getLocalPath
());
$err
=
$this
->
newPassthruCommand
()
->
setIOChannel
(
$this
->
getIOChannel
())
->
setCommandChannelFromExecFuture
(
$future
)
->
execute
();
if
(!
$err
)
{
$repository
->
writeStatusMessage
(
PhabricatorRepositoryStatusMessage
::
TYPE_NEEDS_UPDATE
,
PhabricatorRepositoryStatusMessage
::
CODE_OKAY
);
}
return
$err
;
}
}
Event Timeline
Log In to Comment