Skip to content
Snippets Groups Projects
Verified Commit 93ce2296 authored by Yorick Peterse's avatar Yorick Peterse
Browse files

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.
parent 6e47a192
No related branches found
No related tags found
1 merge request!389CE upstream
......@@ -176,7 +176,7 @@ def protected_branch_action(oldrev, newrev, branch_name)
end
def protected_tag?(tag_name)
project.repository.tag_names.include?(tag_name)
project.repository.tag_exists?(tag_name)
end
def user_allowed?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment