Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F123106300
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
Thu, Jul 24, 21:39
Size
479 B
Mime Type
text/x-php
Expires
Sat, Jul 26, 21:39 (2 d)
Engine
blob
Format
Raw Data
Handle
27637634
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