Commit 120c7902 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'fix/add-support-for-pre-receive-error-in-merge-branch' into 'master'

Add support for PreReceiveError in UserMergeBranch RPC

Closes gitaly#979

See merge request gitlab-org/gitlab-ce!16765
parents e47b7a28 5aeb5ff5
......@@ -103,7 +103,13 @@ module Gitlab
request_enum.push(Gitaly::UserMergeBranchRequest.new(apply: true))
branch_update = response_enum.next.branch_update
second_response = response_enum.next
if second_response.pre_receive_error.present?
raise Gitlab::Git::HooksService::PreReceiveError, second_response.pre_receive_error
end
branch_update = second_response.branch_update
return if branch_update.nil?
raise Gitlab::Git::CommitError.new('failed to apply merge to branch') unless branch_update.commit_id.present?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment