summaryrefslogtreecommitdiff
path: root/lib/gitlab/git/repository.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r--lib/gitlab/git/repository.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 29b3663a52a..6fb1af4d057 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -651,7 +651,13 @@ module Gitlab
end
def update_branch(branch_name, user:, newrev:, oldrev:)
- OperationService.new(user, self).update_branch(branch_name, newrev, oldrev)
+ gitaly_migrate(:operation_user_update_branch) do |is_enabled|
+ if is_enabled
+ gitaly_operations_client.user_update_branch(branch_name, user, newrev, oldrev)
+ else
+ OperationService.new(user, self).update_branch(branch_name, newrev, oldrev)
+ end
+ end
end
def rm_branch(branch_name, user:)