Only first line of pre-receive and post-receive hooks error is captured
Summary
We capture only the first line of pre-receive and post-receive hooks output. The error messages returned by custom hooks may span multiple lines and we lose these other lines. For update hook we capture the whole output.
Steps to reproduce
- Create a merge request
- Create a custom
pre-receivehook that outputs multiple lines and returns non-zero status - Try to merge the merge request
- In Rails console inspect
merge_request.merge_error