diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-04-03 19:47:08 +0100 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-04-03 19:47:08 +0100 |
commit | 04a50bd9515e09d047d6f678c5d9485f89b31df7 (patch) | |
tree | 5b3dcd41f8174c3fdb6689488148617f92d0ca5f /app/models/protected_branch.rb | |
parent | 4f71c29c8bb35642ed5d26015619fc3f838f5e56 (diff) | |
download | gitlab-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.rb | 3 |
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? |