diff options
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 |