Skip to content
Snippets Groups Projects
Commit 473cab81 authored by Jordan Ryan Reuter's avatar Jordan Ryan Reuter Committed by Oswaldo Ferreir
Browse files

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
parent 2995f48e
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment