Commit 0f1e36f4 authored by Sean McGivern's avatar Sean McGivern

Merge branch '323659-remove-unneeded-allow-disk-access-call' into 'master'

Remove a Gitaly allow_disk_access call

See merge request gitlab-org/gitlab!59879
parents 786422e6 a4cf560c
...@@ -142,10 +142,10 @@ module Projects ...@@ -142,10 +142,10 @@ module Projects
newrev = upstream.dereferenced_target.sha newrev = upstream.dereferenced_target.sha
oldrev = local.dereferenced_target.sha oldrev = local.dereferenced_target.sha
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/1246 # If the user doesn't have permission to update the diverged branch
::Gitlab::GitalyClient::StorageSettings.allow_disk_access do # (e.g. it's protected and the user can't force-push to protected
repository.update_branch(branch_name, user: current_user, newrev: newrev, oldrev: oldrev) # branches), this will fail.
end repository.update_branch(branch_name, user: current_user, newrev: newrev, oldrev: oldrev)
elsif branch_name == project.default_branch elsif branch_name == project.default_branch
# Cannot be updated # Cannot be updated
errors << "The default branch (#{project.default_branch}) has diverged from its upstream counterpart and could not be updated automatically." errors << "The default branch (#{project.default_branch}) has diverged from its upstream counterpart and could not be updated automatically."
......
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