Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3282027
ArcanistGitCommitMessageHardpointQuery.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
1 KB
Referenced Files
None
Subscribers
None
ArcanistGitCommitMessageHardpointQuery.php
View Options
<?php
final
class
ArcanistGitCommitMessageHardpointQuery
extends
ArcanistWorkflowGitHardpointQuery
{
public
function
getHardpoints
(
)
{
return
array
(
ArcanistCommitRef
::
HARDPOINT_MESSAGE
,
)
;
}
protected
function
canLoadRef
(
ArcanistRef
$ref
)
{
return
(
$ref
instanceof
ArcanistCommitRef
)
;
}
public
function
loadHardpoint
(
array
$refs
,
$hardpoint
)
{
$api
=
$this
->
getRepositoryAPI
(
)
;
$hashes
=
mpull
(
$refs
,
'getCommitHash'
)
;
$unique_hashes
=
array_fuse
(
$hashes
)
;
// TODO: Update this to use "%B", see T5028. We can also bulk-resolve
// these with "git show --quiet --format=... hash hash hash ... --".
$futures
=
array
(
)
;
foreach
(
$unique_hashes
as
$hash
)
{
$futures
[
$hash
]
=
$api
->
execFutureLocal
(
'log -n1 --format=%s %s --'
,
'%s%n%n%b'
,
gitsprintf
(
'%s'
,
$hash
)
)
;
}
yield
$this
->
yieldFutures
(
$futures
)
;
$messages
=
array
(
)
;
foreach
(
$futures
as
$hash
=>
$future
)
{
list
(
$stdout
)
=
$future
->
resolvex
(
)
;
$messages
[
$hash
]
=
$stdout
;
}
foreach
(
$hashes
as
$ref_key
=>
$hash
)
{
$hashes
[
$ref_key
]
=
$messages
[
$hash
]
;
}
yield
$this
->
yieldMap
(
$hashes
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Mar 24, 03:24 (1 d, 1 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1113891
Default Alt Text
ArcanistGitCommitMessageHardpointQuery.php (1 KB)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment