diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-06-20 15:38:54 +0200 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-06-20 21:44:21 +0200 |
commit | 208b18c956b38103b98bc93a952dc1e8a200dead (patch) | |
tree | 518e0892089d6d3771097192be2487c446343bfa /app/helpers/branches_helper.rb | |
parent | 74f8f260982a9b9e1941ad803d53d229cc27c85f (diff) | |
download | gitlab-ce-208b18c956b38103b98bc93a952dc1e8a200dead.tar.gz |
Unify check branch name exist
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 |