Reduce the total number of calls to getCallsign()
Summary: Ref T4245. Before doing any hard work here, we can dramatically reduce the number of things that make calls to `getCallsign()` to make navigating things easier. Almost all of them only care about a monogram, URI, or display name. Test Plan: - Searched for `r uniquename` in jump nav. - Ran `bin/repository reparse --change rXXXyyyyy --trace`, observed query against bad commit table. - Ran `bin/search index rXXXyyyy --trace --force`, observed proper title when indexing commit. - Browed repository list, saw proper `rXXX` and appropriate link targets. - Mentioned `rXXX` in Remarkup, got a link to the right place. Reviewers: chad Reviewed By: chad Maniphest Tasks: T4245 Differential Revision: https://secure.phabricator.com/D14923
This commit is contained in:
@@ -155,15 +155,15 @@ final class PhabricatorRepositorySearchEngine
|
||||
->setUser($viewer)
|
||||
->setObject($repository)
|
||||
->setHeader($repository->getName())
|
||||
->setObjectName('r'.$repository->getCallsign())
|
||||
->setHref($this->getApplicationURI($repository->getCallsign().'/'));
|
||||
->setObjectName($repository->getMonogram())
|
||||
->setHref($repository->getURI());
|
||||
|
||||
$commit = $repository->getMostRecentCommit();
|
||||
if ($commit) {
|
||||
$commit_link = DiffusionView::linkCommit(
|
||||
$repository,
|
||||
$commit->getCommitIdentifier(),
|
||||
$commit->getSummary());
|
||||
$repository,
|
||||
$commit->getCommitIdentifier(),
|
||||
$commit->getSummary());
|
||||
$item->setSubhead($commit_link);
|
||||
$item->setEpoch($commit->getEpoch());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user