diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-06-09 16:18:15 +0300 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-06-09 16:18:15 +0300 |
commit | 25a870a6d40d87d8bb0de6734485fff23fa17c7f (patch) | |
tree | 812ebc84d9ae094cc35787974a199f6512d72011 /lib | |
parent | 9562f028594c6d61834d48f75f8379b0de2ba8ae (diff) |
Revert "No need to check if `repository_ref` is present"
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/project_search_results.rb | 6 |
1 files changed, 5 insertions, 1 deletions
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 |