summaryrefslogtreecommitdiff
path: root/app/models/protected_branch.rb
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2017-04-03 19:47:08 +0100
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-04-03 19:47:08 +0100
commit04a50bd9515e09d047d6f678c5d9485f89b31df7 (patch)
tree5b3dcd41f8174c3fdb6689488148617f92d0ca5f /app/models/protected_branch.rb
parent4f71c29c8bb35642ed5d26015619fc3f838f5e56 (diff)
downloadgitlab-ce-04a50bd9515e09d047d6f678c5d9485f89b31df7.tar.gz
Removed protected_tags_array
This memorized array appears to originally come from https://gitlab.com/gitlab-org/gitlab-ee/commit/19c2c90ccac86a21eb4266b9a5972162f917f692 which has a commit message of ‘fix warnings’. Without any comments on the original pull request I think we can safely get rid of it unless warnings re-appear.
Diffstat (limited to 'app/models/protected_branch.rb')
-rw-r--r--app/models/protected_branch.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb
index 0f0ac18b1a3..28b7d5ad072 100644
--- a/app/models/protected_branch.rb
+++ b/app/models/protected_branch.rb
@@ -15,8 +15,7 @@ class ProtectedBranch < ActiveRecord::Base
def self.protected?(project, ref_name)
return true if project.empty_repo? && default_branch_protected?
- protected_refs = project.protected_branches_array
- self.matching(ref_name, protected_refs: protected_refs).present?
+ self.matching(ref_name, protected_refs: project.protected_branches).present?
end
def self.default_branch_protected?