diff options
Diffstat (limited to 'app/models/tree.rb')
-rw-r--r-- | app/models/tree.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/tree.rb b/app/models/tree.rb index cd385872171..fd416ebdedc 100644 --- a/app/models/tree.rb +++ b/app/models/tree.rb @@ -4,9 +4,9 @@ class Tree include Gitlab::MarkupHelper include Gitlab::Utils::StrongMemoize - attr_accessor :repository, :sha, :path, :entries + attr_accessor :repository, :sha, :path, :entries, :cursor - def initialize(repository, sha, path = '/', recursive: false) + def initialize(repository, sha, path = '/', recursive: false, pagination_params: nil) path = '/' if path.blank? @repository = repository @@ -14,7 +14,7 @@ class Tree @path = path git_repo = @repository.raw_repository - @entries = Gitlab::Git::Tree.where(git_repo, @sha, @path, recursive) + @entries, @cursor = Gitlab::Git::Tree.where(git_repo, @sha, @path, recursive, pagination_params) end def readme_path |