Custom error messages from custom pre-receive hooks should include more than first line
What does this MR do?
The custom error messages feature documented at https://docs.gitlab.com/ce/administration/custom_hooks.html only includes the first line of output from failed pre-receive hooks in the UI. This MR changes it to include all lines of output.
Note that when the UI renders this output it still renders it all as a single line. While this isn't ideal I think including all the lines is more helpful than stopping after the first, even if they aren't rendered exactly the same way they would be on the command line.
Are there points in the code the reviewer needs to double check?
I don't know if this is reasonable at all, it just worked for me when I tried it. I don't even know if this a reasonable way to write ruby.
Why was this MR needed?
It can be helpful for the hooks to break their output over more than one line for command line consumers (e.g. so messages are line wrapped at a reasonable length).
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together