Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/query/DiffusionCachedResolveRefsQuery.php
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | foreach ($this->refs as $ref) { | ||||
$ref); | $ref); | ||||
} | } | ||||
} | } | ||||
if ($prefixes) { | if ($prefixes) { | ||||
$commits = queryfx_all( | $commits = queryfx_all( | ||||
$conn_r, | $conn_r, | ||||
'SELECT commitIdentifier FROM %T | 'SELECT commitIdentifier FROM %T | ||||
WHERE repositoryID = %s AND %Q', | WHERE repositoryID = %s AND %LO', | ||||
id(new PhabricatorRepositoryCommit())->getTableName(), | id(new PhabricatorRepositoryCommit())->getTableName(), | ||||
$repository->getID(), | $repository->getID(), | ||||
implode(' OR ', $prefixes)); | $prefixes); | ||||
foreach ($commits as $commit) { | foreach ($commits as $commit) { | ||||
$hash = $commit['commitIdentifier']; | $hash = $commit['commitIdentifier']; | ||||
foreach ($this->refs as $ref) { | foreach ($this->refs as $ref) { | ||||
if (!strncmp($hash, $ref, strlen($ref))) { | if (!strncmp($hash, $ref, strlen($ref))) { | ||||
$results[$ref][] = array( | $results[$ref][] = array( | ||||
'type' => 'commit', | 'type' => 'commit', | ||||
'identifier' => $hash, | 'identifier' => $hash, | ||||
▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines |