mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42:41 +01:00
Don't fetch all commits without blame in Diffusion
Summary: Otherwise useless query is executed: lang=sql SELECT c.* FROM `repository_commit` c ORDER BY c.epoch DESC Test Plan: /diffusion/X/browse/x Reviewers: epriestley Reviewed By: epriestley CC: aran Differential Revision: https://secure.phabricator.com/D2186
This commit is contained in:
parent
347bc357fd
commit
76b534b560
1 changed files with 8 additions and 7 deletions
|
@ -342,13 +342,14 @@ final class DiffusionBrowseFileController extends DiffusionController {
|
||||||
++$line_number;
|
++$line_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
$commits = id(new PhabricatorAuditCommitQuery())
|
$commits = array_filter(ipull($display, 'commit'));
|
||||||
->withIdentifiers(
|
if ($commits) {
|
||||||
$drequest->getRepository()->getID(),
|
$commits = id(new PhabricatorAuditCommitQuery())
|
||||||
array_filter(ipull($display, 'commit')))
|
->withIdentifiers($drequest->getRepository()->getID(), $commits)
|
||||||
->needCommitData(true)
|
->needCommitData(true)
|
||||||
->execute();
|
->execute();
|
||||||
$commits = mpull($commits, null, 'getCommitIdentifier');
|
$commits = mpull($commits, null, 'getCommitIdentifier');
|
||||||
|
}
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$user = $request->getUser();
|
$user = $request->getUser();
|
||||||
|
|
Loading…
Reference in a new issue