diff options
author | Stan Hu <stanhu@gmail.com> | 2019-08-10 01:41:07 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-08-10 01:41:07 +0300 |
commit | afe867921cab046a34bc463840c6e9f5d51f1f70 (patch) | |
tree | dae8e191eb1ba98217f277cb1326297ee84df82b /lib | |
parent | d96c24d81590dd6da237f131d4c074b70e64e030 (diff) |
Rename branches_exist? -> includes_branches?
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git_post_receive.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/gitlab/git_post_receive.rb b/lib/gitlab/git_post_receive.rb index 307ec8b2cfb..6c7f23a673c 100644 --- a/lib/gitlab/git_post_receive.rb +++ b/lib/gitlab/git_post_receive.rb @@ -27,12 +27,10 @@ module Gitlab end end - def branches_exist? - changes_refs do |_oldrev, _newrev, ref| - return true if Gitlab::Git.branch_ref?(ref) # rubocop:disable Cop/AvoidReturnFromBlocks + def includes_branches? + enum_for(:changes_refs).any? do |_oldrev, _newrev, ref| + Gitlab::Git.branch_ref?(ref) end - - false end private |