summaryrefslogtreecommitdiff
path: root/lib/api/internal.rb
diff options
context:
space:
mode:
authorJordan Ryan Reuter <jordan.reuter@scimedsolutions.com>2017-01-20 10:04:16 -0500
committerOswaldo Ferreira <oswaldo@gitlab.com>2017-03-07 22:56:30 -0300
commit473cab818aff034d072f0f6c8537a584bc5aa41c (patch)
tree1425966bf2f786870bbb2a613c31123aa1743c25 /lib/api/internal.rb
parent2995f48ef3158252446c5e03c138feb6c1889941 (diff)
downloadgitlab-ce-473cab818aff034d072f0f6c8537a584bc5aa41c.tar.gz
Manually set total_count when paginating commits
`Kaminari.paginate_array` takes some options, most relevant of which is a `total_count` parameter. Using the `commit_count` for `total_count` lets us correctly treat the return of `Repository#commits` as a subset of all the commits we may wish to list. Addition of a new `Repository#commit_count_for_ref` method was necessarry to allow the user to start from an arbitrary ref. Ref #1381
Diffstat (limited to 'lib/api/internal.rb')
0 files changed, 0 insertions, 0 deletions