Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93594884
DiffusionGitStableCommitNameQuery.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, Nov 30, 00:49
Size
613 B
Mime Type
text/x-php
Expires
Mon, Dec 2, 00:49 (2 d)
Engine
blob
Format
Raw Data
Handle
22670266
Attached To
rPH Phabricator
DiffusionGitStableCommitNameQuery.php
View Options
<?php
final
class
DiffusionGitStableCommitNameQuery
extends
DiffusionStableCommitNameQuery
{
protected
function
executeQuery
()
{
$repository
=
$this
->
getRepository
();
$branch
=
$this
->
getBranch
();
if
(
$repository
->
isWorkingCopyBare
())
{
list
(
$stdout
)
=
$repository
->
execxLocalCommand
(
'rev-parse --verify %s'
,
$branch
);
}
else
{
list
(
$stdout
)
=
$repository
->
execxLocalCommand
(
'rev-parse --verify %s/%s'
,
DiffusionBranchInformation
::
DEFAULT_GIT_REMOTE
,
$branch
);
}
$commit
=
trim
(
$stdout
);
return
substr
(
$commit
,
0
,
16
);
}
}
Event Timeline
Log In to Comment