Commit 419029fb authored by Robert Speicher's avatar Robert Speicher
Browse files

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
......@@ -103,7 +103,13 @@
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?
......
Supports Markdown
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