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:
parent
6e47a1924b
commit
93ce229665
|
@ -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?
|
||||
|
|
Loading…
Reference in New Issue