Fix commits search for empty repository
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
810c91fe35
commit
28f6fba97c
1 changed files with 5 additions and 1 deletions
|
@ -77,7 +77,11 @@ module Gitlab
|
|||
end
|
||||
|
||||
def commits
|
||||
project.repository.find_commits_by_message(query)
|
||||
if project.empty_repo? || query.blank?
|
||||
[]
|
||||
else
|
||||
project.repository.find_commits_by_message(query).compact
|
||||
end
|
||||
end
|
||||
|
||||
def limit_project_ids
|
||||
|
|
Loading…
Reference in a new issue