summaryrefslogtreecommitdiff
path: root/app/controllers/projects/application_controller.rb
diff options
context:
space:
mode:
authorPaco Guzman <pacoguzmanp@gmail.com>2016-06-20 15:38:54 +0200
committerPaco Guzman <pacoguzmanp@gmail.com>2016-06-20 15:38:54 +0200
commit95c59b2e0871667f8ef6ae53b11228568b3d7f03 (patch)
tree1cdba1e0dee097cd51b79a9f17ada9fce866fa9c /app/controllers/projects/application_controller.rb
parent98cede7ebeae9dac994b35b66be6aab14eb932b3 (diff)
downloadgitlab-ce-reduce-git-calls.tar.gz
Trying to reduce git callsreduce-git-calls
Diffstat (limited to 'app/controllers/projects/application_controller.rb')
-rw-r--r--app/controllers/projects/application_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb
index 776ba92c9ab..996909a28c6 100644
--- a/app/controllers/projects/application_controller.rb
+++ b/app/controllers/projects/application_controller.rb
@@ -74,7 +74,7 @@ class Projects::ApplicationController < ApplicationController
end
def require_branch_head
- unless @repository.branch_names.include?(@ref)
+ unless @repository.branch_exists?(@ref)
redirect_to(
namespace_project_tree_path(@project.namespace, @project, @ref),
notice: "This action is not allowed unless you are on a branch"