Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F105803554
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, Mar 19, 22:01
Size
479 B
Mime Type
text/x-php
Expires
Fri, Mar 21, 22:01 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25010650
Attached To
rPH Phabricator
DiffusionGitRequest.php
View Options
<?php
final
class
DiffusionGitRequest
extends
DiffusionRequest
{
public
function
supportsBranches
()
{
return
true
;
}
protected
function
isStableCommit
(
$symbol
)
{
return
preg_match
(
'/^[a-f0-9]{40}
\z
/'
,
$symbol
);
}
public
function
getBranch
()
{
if
(
$this
->
branch
)
{
return
$this
->
branch
;
}
if
(
$this
->
repository
)
{
return
$this
->
repository
->
getDefaultBranch
();
}
throw
new
Exception
(
pht
(
'Unable to determine branch!'
));
}
}
Event Timeline
Log In to Comment