Changeset View
Changeset View
Standalone View
Standalone View
src/query/ArcanistGitCommitMessageHardpointQuery.php
| <?php | <?php | ||||
| final class ArcanistGitCommitMessageHardpointQuery | final class ArcanistGitCommitMessageHardpointQuery | ||||
| extends ArcanistWorkflowHardpointQuery { | extends ArcanistWorkflowGitHardpointQuery { | ||||
| public function getHardpoints() { | public function getHardpoints() { | ||||
| return array( | return array( | ||||
| ArcanistCommitRefPro::HARDPOINT_MESSAGE, | ArcanistCommitRefPro::HARDPOINT_MESSAGE, | ||||
| ); | ); | ||||
| } | } | ||||
| protected function canLoadRef(ArcanistRefPro $ref) { | protected function canLoadRef(ArcanistRefPro $ref) { | ||||
| return ($ref instanceof ArcanistCommitRefPro); | return ($ref instanceof ArcanistCommitRefPro); | ||||
| } | } | ||||
| protected function canLoadHardpoint() { | |||||
| $api = $this->getRepositoryAPI(); | |||||
| return ($api instanceof ArcanistGitAPI); | |||||
| } | |||||
| public function loadHardpoint(array $refs, $hardpoint) { | public function loadHardpoint(array $refs, $hardpoint) { | ||||
| $api = $this->getRepositoryAPI(); | $api = $this->getRepositoryAPI(); | ||||
| $hashes = mpull($refs, 'getCommitHash'); | $hashes = mpull($refs, 'getCommitHash'); | ||||
| $unique_hashes = array_fuse($hashes); | $unique_hashes = array_fuse($hashes); | ||||
| // TODO: Update this to use "%B", see T5028. We can also bulk-resolve | // TODO: Update this to use "%B", see T5028. We can also bulk-resolve | ||||
| // these with "git show --quiet --format=... hash hash hash ... --". | // these with "git show --quiet --format=... hash hash hash ... --". | ||||
| Show All 25 Lines | |||||