Skip to content
Snippets Groups Projects

Remove extraneous newlines in pre-receive hook

Open 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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading