Fix commits search for empty repository

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2015-11-03 10:16:09 +01:00
parent 810c91fe35
commit 28f6fba97c
No known key found for this signature in database
GPG key ID: 627C5F589F467F17

View file

@ -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