BigW Consortium Gitlab

  1. 11 May, 2016 3 commits
    • Only generate repository push email once · 5f27e26b
      Sean McGivern authored
      The repository push email can be very expensive to generate, especially
      with syntax-highlighted diffs. Instead of generating the email for each
      recipient, generate one email object and reset the Message-Id and To
      headers for each recipient. (Cloning would also be expensive in the case
      of large emails, although probably not as bad as generating from
      scratch.)
    • Enable the StringReplacement cop. · 4995302d
      Connor Shea authored
      Also fix one use of `gsub` that would be faster as `delete`.
      
      Use `tr` instead of `gsub` when you are replacing the same number of
      characters. Use `delete` instead of `gsub` when you are deleting
      characters.
    • Enable Rubocop Casecmp Performance Cop. · 377583a3
      Connor Shea authored
      Also fixes the errors caused by enabling the cop. casecmp is more performant than `.downcase` and `==`.
  2. 10 May, 2016 1 commit
  3. 09 May, 2016 2 commits
    • Improve multiple branch push performance by memoizing permission checking · 4be77d0b
      Stan Hu authored
      If you attempt to push thousands of branches at once, the 60-second timeout
      will occur because GitAccess checking does a lot of work to check if the
      user has permission to push to a branch. This changes does two things:
      
      1. Instead of making 1 DB query per branch push, use a memoized list of protected branches to check
      2. Memoize what permissions the user has to perform on this project
      
      On a test of 10,000 branch pushes, this prevents gitlab-shell from hitting the 60-second
      timeout.
      
      Closes #17225
  4. 07 May, 2016 1 commit
  5. 05 May, 2016 3 commits
    • Fix passing nil to protected_tag? · 00367120
      Yorick Peterse authored
      Previously this method would directly receive the output of tag_name().
      This method could either return a String or nil. In the previous setup
      this would somehow magically work but because Rugged::TagCollection#[]
      doesn't accept nil values it started to fail.
      
      To work around this the elsif in change_access_check() assigns the
      result of tag_name() to a local and then _only_ calls protected_tag?()
      if the tag name is not nil. The extra parenthesis are put in place to
      ensure that things are parsed correctly, without these the code would be
      parsed as follows:
      
          elsif tag_ref = (tag_name(ref) && protected_tag(tag_ref))
      
      During runtime this would basically resolve to:
      
          elsif tag_ref = (tag_name(ref) && protected_tag(nil))
      
      This is because when you refer to the variable you're assigning _in_ the
      assignment Ruby returns nil instead of raising an error.
    • Use tag_exists? in GitAccess#protected_tag? · 93ce2296
      Yorick Peterse authored
      This removes the need for retrieving the entire list of tags just to
      check if a specific one exists.
    • Fix the line code when importing PR review comments from GitHub · 6fbf6b29
      Douglas Barbosa Alexandre authored
      Pull Request Review Comments are comments on a portion of the unified
      diff.
  6. 04 May, 2016 1 commit
  7. 29 Apr, 2016 1 commit
  8. 28 Apr, 2016 2 commits
  9. 27 Apr, 2016 2 commits
  10. 21 Apr, 2016 2 commits
  11. 20 Apr, 2016 2 commits
  12. 19 Apr, 2016 4 commits
  13. 18 Apr, 2016 9 commits
  14. 15 Apr, 2016 3 commits
  15. 14 Apr, 2016 3 commits
  16. 13 Apr, 2016 1 commit