• Jordan Ryan Reuter's avatar
    Manually set total_count when paginating commits · 473cab81
    Jordan Ryan Reuter authored
    `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
    473cab81
repository.rb 29.2 KB