commit paging fixes
This commit is contained in:
parent
586c53ea05
commit
5eecbfdb10
7 changed files with 68 additions and 14 deletions
|
@ -13,11 +13,12 @@ class CommitsController < ApplicationController
|
|||
load_refs # load @branch, @tag & @ref
|
||||
|
||||
@repo = project.repo
|
||||
limit, offset = (params[:limit] || 20), (params[:offset] || 0)
|
||||
|
||||
if params[:path]
|
||||
@commits = @repo.log(@ref, params[:path], :max_count => params[:limit] || 100, :skip => params[:offset] || 0)
|
||||
@commits = @repo.log(@ref, params[:path], :max_count => limit, :skip => offset)
|
||||
else
|
||||
@commits = @repo.commits(@ref, params[:limit] || 100, params[:offset] || 0)
|
||||
@commits = @repo.commits(@ref, limit, offset)
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue