Skip to content

Custom error messages from custom pre-receive hooks should include more than first line

username-removed-822852 requested to merge csiden/gitlab-ce:full-message into master

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?

What are the relevant issue numbers?

Merge request reports