Skip to content

Remove extraneous newlines in pre-receive hook

Stan Hu requested to merge remove-extra-newlines into master

Found while investigating slow performance in gitlab-org/gitlab-ce#17225

We were adding a newline for every branch push because:

  1. GitlabAccess calls changes.lines, which keeps the newline (e.g. ['00000000 12345678 refs/heads/master\n'])
  2. GitlabNet calls changes.join("\n"), which adds another newline

Merge request reports