Commit 28f6fba9 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix commits search for empty repository

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 810c91fe
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment