Skip to content
代码片段 群组 项目
未验证 提交 93ce2296 编辑于 作者: Yorick Peterse's avatar Yorick Peterse
浏览文件

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.
上级 6e47a192
No related branches found
No related tags found
无相关合并请求
...@@ -176,7 +176,7 @@ def protected_branch_action(oldrev, newrev, branch_name) ...@@ -176,7 +176,7 @@ def protected_branch_action(oldrev, newrev, branch_name)
end end
def protected_tag?(tag_name) def protected_tag?(tag_name)
project.repository.tag_names.include?(tag_name) project.repository.tag_exists?(tag_name)
end end
def user_allowed? def user_allowed?
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册