Commit 56c49f4f authored by Robert Speicher's avatar Robert Speicher
Browse files

Merge branch 'tag-exists' into 'master'

Use tag_exists? in GitAccess#protected_tag?

This will fail until is merged. Adding this should speed up checking for tags in `Gitlab::GitAccess` as it no longer needs to retrieve the entire list of tags.

See for more information.

See merge request !3983
......@@ -3,6 +3,8 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.8.0 (unreleased)
- Project#open_branches has been cleaned up and no longer loads entire records into memory.
- Log to application.log when an admin starts and stops impersonating a user
- Updated gitlab_git to 10.1.0
- GitAccess#protected_tag? no longer loads all tags just to check if a single one exists
- Make build status canceled if any of the jobs was canceled and none failed
- Upgrade Sidekiq to 4.1.2
- Sanitize repo paths in new project error message
......@@ -353,7 +353,7 @@ GEM
posix-spawn (~> 0.3)
gitlab_emoji (0.3.1)
gemojione (~> 2.2, >= 2.2.1)
gitlab_git (10.0.2)
gitlab_git (10.1.0)
activesupport (~> 4.0)
charlock_holmes (~> 0.7.3)
github-linguist (~> 4.7.0)
......@@ -128,7 +128,7 @@ def change_access_check(change)
action =
if project.protected_branch?(branch_name(ref))
protected_branch_action(oldrev, newrev, branch_name(ref))
elsif protected_tag?(tag_name(ref))
elsif (tag_ref = tag_name(ref)) && protected_tag?(tag_ref)
# Prevent any changes to existing git tag unless user has permissions
......@@ -176,7 +176,7 @@ def protected_branch_action(oldrev, newrev, branch_name)
def protected_tag?(tag_name)
def user_allowed?
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment