diff options
Diffstat (limited to 'app/finders/branches_finder.rb')
-rw-r--r-- | app/finders/branches_finder.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/finders/branches_finder.rb b/app/finders/branches_finder.rb index dc7b9f6a0ce..8f90ce40bb4 100644 --- a/app/finders/branches_finder.rb +++ b/app/finders/branches_finder.rb @@ -1,13 +1,11 @@ # frozen_string_literal: true class BranchesFinder < GitRefsFinder - def initialize(repository, params = {}) - super(repository, params) - end - def execute(gitaly_pagination: false) if gitaly_pagination && names.blank? && search.blank? && regex.blank? - repository.branches_sorted_by(sort, pagination_params) + repository.branches_sorted_by(sort, pagination_params).tap do |branches| + set_next_cursor(branches) + end else branches = repository.branches_sorted_by(sort) branches = by_search(branches) |