Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2890408
PhutilGitBinaryAnalyzer.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
550 B
Referenced Files
None
Subscribers
None
PhutilGitBinaryAnalyzer.php
View Options
<?php
final
class
PhutilGitBinaryAnalyzer
extends
PhutilBinaryAnalyzer
{
const
BINARY
=
'git'
;
protected
function
newBinaryVersion
(
)
{
list
(
$err
,
$stdout
)
=
exec_manual
(
'git --version'
)
;
if
(
$err
)
{
return
null
;
}
return
self
::
parseGitBinaryVersion
(
$stdout
)
;
}
public
static
function
parseGitBinaryVersion
(
$stdout
)
{
if
(
preg_match
(
'/^git version /'
,
$stdout
)
)
{
$version
=
substr
(
$stdout
,
strlen
(
'git version '
)
)
;
$version
=
trim
(
$version
)
;
return
$version
;
}
return
null
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 13:32 (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1116224
Default Alt Text
PhutilGitBinaryAnalyzer.php (550 B)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment