Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/protectable_dropdown.rb')
-rw-r--r--app/models/protectable_dropdown.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/protectable_dropdown.rb b/app/models/protectable_dropdown.rb
index 25e70ab406c..e1336be9528 100644
--- a/app/models/protectable_dropdown.rb
+++ b/app/models/protectable_dropdown.rb
@@ -12,6 +12,8 @@ class ProtectableDropdown
# Tags/branches which are yet to be individually protected
def protectable_ref_names
+ return [] if @project.empty_repo?
+
@protectable_ref_names ||= ref_names - non_wildcard_protected_ref_names
end