Read about our upcoming Code of Conduct on this issue

  • Yorick Peterse's avatar
    Tweak checking branches in Project#open_branches · d59a599d4948
    Yorick Peterse authored
    This changes 4 things:
    1. Project#protected_branches_names has been renamed to
    2. Project#open_branches uses a Set for the branch names as checking
       values in a Set is faster than checking values in a (large) Array.
    3. Some redundant code in Project#open_branches has been removed.
    4. Project#protected_branch_names now uses #pluck instead of #map,
       removing the need for loading entire DB records into memory.
project.rb 30.3 KB