Fix searching for commits
Summary: fix two issues. First is that the field in the query is not correct; the other is to make indexing handle deleted repository. Test Plan: indexed some commits and the search result looks correct. Reviewed By: epriestley Reviewers: epriestley, tuomaspelkonen CC: aran, epriestley Differential Revision: 633
This commit is contained in:
@@ -52,7 +52,7 @@ class PhabricatorObjectHandleData {
|
|||||||
if ($commits) {
|
if ($commits) {
|
||||||
$data_dao = newv('PhabricatorRepositoryCommitData', array());
|
$data_dao = newv('PhabricatorRepositoryCommitData', array());
|
||||||
$commit_data = $data_dao->loadAllWhere(
|
$commit_data = $data_dao->loadAllWhere(
|
||||||
'id IN (%Ld)',
|
'commitID IN (%Ld)',
|
||||||
mpull($commits, 'getID'));
|
mpull($commits, 'getID'));
|
||||||
$commit_data = mpull($commit_data, null, 'getCommitID');
|
$commit_data = mpull($commit_data, null, 'getCommitID');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ class PhabricatorSearchCommitIndexer
|
|||||||
'id = %d',
|
'id = %d',
|
||||||
$commit->getRepositoryID());
|
$commit->getRepositoryID());
|
||||||
|
|
||||||
|
if (!$repository) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$title = 'r'.$repository->getCallsign().$commit->getCommitIdentifier().
|
$title = 'r'.$repository->getCallsign().$commit->getCommitIdentifier().
|
||||||
" ".$commit_data->getSummary();
|
" ".$commit_data->getSummary();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user