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
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."
......
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