Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F107647937
DiffusionGitRequest.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
Wed, Apr 9, 11:19
Size
652 B
Mime Type
text/x-php
Expires
Fri, Apr 11, 11:19 (2 d)
Engine
blob
Format
Raw Data
Handle
25451868
Attached To
rPH Phabricator
DiffusionGitRequest.php
View Options
<?php
/**
* @group diffusion
*/
final
class
DiffusionGitRequest
extends
DiffusionRequest
{
protected
function
getSupportsBranches
()
{
return
true
;
}
protected
function
didInitialize
()
{
if
(!
$this
->
commit
)
{
return
;
}
$this
->
expandCommitName
();
}
public
function
getBranch
()
{
if
(
$this
->
branch
)
{
return
$this
->
branch
;
}
if
(
$this
->
repository
)
{
return
$this
->
repository
->
getDefaultBranch
();
}
throw
new
Exception
(
"Unable to determine branch!"
);
}
public
function
getCommit
()
{
if
(
$this
->
commit
)
{
return
$this
->
commit
;
}
return
$this
->
getBranch
();
}
}
Event Timeline
Log In to Comment