diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 18:08:54 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 18:08:54 +0000 |
commit | 0d6fa033121a9bef708b8f2de186c4034c61d4a3 (patch) | |
tree | 851d65a09efbffa114c9a273e590d55cfb1436ab /lib/gitlab/git/repository.rb | |
parent | 0eb3d2f799ce4f4de87fb9fc6fd98e592323bc89 (diff) | |
download | gitlab-ce-0d6fa033121a9bef708b8f2de186c4034c61d4a3.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r-- | lib/gitlab/git/repository.rb | 10 |
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 |