From 25a870a6d40d87d8bb0de6734485fff23fa17c7f Mon Sep 17 00:00:00 2001 From: Jeroen van Baarsen Date: Tue, 9 Jun 2015 15:18:15 +0200 Subject: Revert "No need to check if `repository_ref` is present" --- lib/gitlab/project_search_results.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/gitlab/project_search_results.rb b/lib/gitlab/project_search_results.rb index 581a8c20bdb..0dab7bcfa4d 100644 --- a/lib/gitlab/project_search_results.rb +++ b/lib/gitlab/project_search_results.rb @@ -4,7 +4,11 @@ module Gitlab def initialize(project_id, query, repository_ref = nil) @project = Project.find(project_id) - @repository_ref = repository_ref + @repository_ref = if repository_ref.present? + repository_ref + else + nil + end @query = Shellwords.shellescape(query) if query.present? end -- cgit v1.2.1