summaryrefslogtreecommitdiff
path: root/lib/api/project_snippets.rb
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-04-29 22:33:56 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2016-04-29 22:44:08 +0200
commitb6a18f1093c88e82d2320d4d3f3c15c549b861be (patch)
treedbace257a26f4c70f109fef3a2569317ffecdcbb /lib/api/project_snippets.rb
parente28d1fa3cc2e8c2f696f6740c8a8441100542470 (diff)
downloadgitlab-ce-b6a18f1093c88e82d2320d4d3f3c15c549b861be.tar.gz
Tweak checking branches in Project#open_branches
This changes 4 things: 1. Project#protected_branches_names has been renamed to Project#protected_branch_names. 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.
Diffstat (limited to 'lib/api/project_snippets.rb')
0 files changed, 0 insertions, 0 deletions