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.
This commit is contained in:
Yorick Peterse 2016-04-29 21:41:39 +02:00
parent 6e47a1924b
commit 93ce229665
No known key found for this signature in database
GPG Key ID: EDD30D2BEB691AC9
1 changed files with 1 additions and 1 deletions

View File

@ -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?