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:
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r--lib/gitlab/git/repository.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 807cfb5f93f..840a70e3ae5 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -636,10 +636,9 @@ module Gitlab
end
# Delete the specified branch from the repository
+ # Note: No Git hooks are executed for this action
def delete_branch(branch_name)
- wrapped_gitaly_errors do
- gitaly_ref_client.delete_branch(branch_name)
- end
+ write_ref(branch_name, Gitlab::Git::BLANK_SHA)
rescue CommandError => e
raise DeleteBranchError, e
end
@@ -651,14 +650,13 @@ module Gitlab
end
# Create a new branch named **ref+ based on **stat_point+, HEAD by default
+ # Note: No Git hooks are executed for this action
#
# Examples:
# create_branch("feature")
# create_branch("other-feature", "master")
def create_branch(ref, start_point = "HEAD")
- wrapped_gitaly_errors do
- gitaly_ref_client.create_branch(ref, start_point)
- end
+ write_ref(ref, start_point)
end
# If `mirror_refmap` is present the remote is set as mirror with that mapping