Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Baarsen <jeroenvanbaarsen@gmail.com>2015-06-09 16:18:15 +0300
committerJeroen van Baarsen <jeroenvanbaarsen@gmail.com>2015-06-09 16:18:15 +0300
commit25a870a6d40d87d8bb0de6734485fff23fa17c7f (patch)
tree812ebc84d9ae094cc35787974a199f6512d72011 /lib/gitlab/project_search_results.rb
parent9562f028594c6d61834d48f75f8379b0de2ba8ae (diff)
Revert "No need to check if `repository_ref` is present"
Diffstat (limited to 'lib/gitlab/project_search_results.rb')
-rw-r--r--lib/gitlab/project_search_results.rb6
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