summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-04-29 21:41:39 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2016-05-05 19:46:26 +0200
commit93ce229665f875efcd7ee25b006834300c2e37be (patch)
tree7a441e984254f28ed18c636a8872668bc08329cb /lib
parent6e47a1924b71c44b989769e6af41459b0f5da6d2 (diff)
downloadgitlab-ce-93ce229665f875efcd7ee25b006834300c2e37be.tar.gz
Use tag_exists? in GitAccess#protected_tag?
This removes the need for retrieving the entire list of tags just to check if a specific one exists.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git_access.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index 3ed1eec517c..ad2da2b81cf 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -176,7 +176,7 @@ module Gitlab
end
def protected_tag?(tag_name)
- project.repository.tag_names.include?(tag_name)
+ project.repository.tag_exists?(tag_name)
end
def user_allowed?