Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2017-09-30 21:09:36 +0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2017-10-04 03:06:34 +0300
commit79719cf003e21561d95e17e4922466a274c59a6b (patch)
tree99b00bdda51af2c8d054290985a553d340168706 /lib/gitlab/git/repository.rb
parentb40192a9464503bf4b141f8cf6133d7ba0f893fe (diff)
Add OperationService.UserDeleteBranch Gitaly RPC
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 22b735c6f7b..a76befe4b52 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -676,7 +676,13 @@ module Gitlab
end
def rm_branch(branch_name, user:)
- OperationService.new(user, self).rm_branch(find_branch(branch_name))
+ gitaly_migrate(:operation_user_delete_branch) do |is_enabled|
+ if is_enabled
+ gitaly_operations_client.user_delete_branch(branch_name, user)
+ else
+ OperationService.new(user, self).rm_branch(find_branch(branch_name))
+ end
+ end
end
def rm_tag(tag_name, user:)