summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2018-06-26 15:34:04 +0000
committerRobert Speicher <robert@gitlab.com>2018-06-26 15:34:04 +0000
commit0a73f6466aab01a7ea4f119c4a457fd79c5126c8 (patch)
treefff258fff3dd99dc5d385d69d74c47f504f95d79
parenta91333c2d783924dfaf95663d2f2813090b30ae0 (diff)
parentc6ff7bfaecf537c7f0f3bf70a26b3b544a90205e (diff)
downloadgitlab-ce-0a73f6466aab01a7ea4f119c4a457fd79c5126c8.tar.gz
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
-rw-r--r--lib/gitlab/git/repository.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index b3016c1a637..88944cd62ea 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -684,6 +684,10 @@ module Gitlab
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:)
gitaly_migrate(:operation_user_delete_branch, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled|
if is_enabled
@@ -1953,8 +1957,7 @@ module Gitlab
rebase_sha = run_git!(%w(rev-parse HEAD), chdir: rebase_path, env: env).strip
- Gitlab::Git::OperationService.new(user, self)
- .update_branch(branch, rebase_sha, branch_sha)
+ update_branch(branch, user: user, newrev: rebase_sha, oldrev: branch_sha)
rebase_sha
end