mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
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:
parent
d665268074
commit
30733ca575
2 changed files with 5 additions and 1 deletions
|
@ -52,7 +52,7 @@ class PhabricatorObjectHandleData {
|
|||
if ($commits) {
|
||||
$data_dao = newv('PhabricatorRepositoryCommitData', array());
|
||||
$commit_data = $data_dao->loadAllWhere(
|
||||
'id IN (%Ld)',
|
||||
'commitID IN (%Ld)',
|
||||
mpull($commits, 'getID'));
|
||||
$commit_data = mpull($commit_data, null, 'getCommitID');
|
||||
}
|
||||
|
|
|
@ -31,6 +31,10 @@ class PhabricatorSearchCommitIndexer
|
|||
'id = %d',
|
||||
$commit->getRepositoryID());
|
||||
|
||||
if (!$repository) {
|
||||
return;
|
||||
}
|
||||
|
||||
$title = 'r'.$repository->getCallsign().$commit->getCommitIdentifier().
|
||||
" ".$commit_data->getSummary();
|
||||
|
||||
|
|
Loading…
Reference in a new issue