Commit 0a73f646 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'ce-update-branch-client-preparation' into 'master'

Move git calls for `Repository#update_branch` inside Gitlab::Git

See merge request gitlab-org/gitlab-ce!20168
parents a91333c2 c6ff7bfa
...@@ -684,6 +684,10 @@ module Gitlab ...@@ -684,6 +684,10 @@ module Gitlab
end end
end end
def update_branch(branch_name, user:, newrev:, oldrev:)
OperationService.new(user, self).update_branch(branch_name, newrev, oldrev)
end
def rm_branch(branch_name, user:) def rm_branch(branch_name, user:)
gitaly_migrate(:operation_user_delete_branch, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled| gitaly_migrate(:operation_user_delete_branch, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled|
if is_enabled if is_enabled
...@@ -1953,8 +1957,7 @@ module Gitlab ...@@ -1953,8 +1957,7 @@ module Gitlab
rebase_sha = run_git!(%w(rev-parse HEAD), chdir: rebase_path, env: env).strip rebase_sha = run_git!(%w(rev-parse HEAD), chdir: rebase_path, env: env).strip
Gitlab::Git::OperationService.new(user, self) update_branch(branch, user: user, newrev: rebase_sha, oldrev: branch_sha)
.update_branch(branch, rebase_sha, branch_sha)
rebase_sha rebase_sha
end end
......
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