diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-06-21 12:51:57 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-06-21 19:04:34 +0300 |
commit | 06a1f4989e68b366769aafed12dd952526f1d448 (patch) | |
tree | 0c21049a95f87571d54f0690f67e39a4a3b42a3e /app/helpers/branches_helper.rb | |
parent | 88d6fe9020de541af26ce823d5b6726db3d1e127 (diff) |
Merge branch '18709-reduce-git-calls' into 'master'
Remove calls to Rugged::BranchCollection#each from extracts_path before_action
See merge request !4802
Diffstat (limited to 'app/helpers/branches_helper.rb')
-rw-r--r-- | app/helpers/branches_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/branches_helper.rb b/app/helpers/branches_helper.rb index 3ee3fc74f0c..c533659b600 100644 --- a/app/helpers/branches_helper.rb +++ b/app/helpers/branches_helper.rb @@ -10,7 +10,7 @@ module BranchesHelper end def can_push_branch?(project, branch_name) - return false unless project.repository.branch_names.include?(branch_name) + return false unless project.repository.branch_exists?(branch_name) ::Gitlab::GitAccess.new(current_user, project).can_push_to_branch?(branch_name) end |