Skip to content
Snippets Groups Projects
Commit 0f1e36f4 authored by Sean McGivern's avatar Sean McGivern :red_circle:
Browse files

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

Remove a Gitaly allow_disk_access call

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