From bc630cc52b81232d4cd9e8ab5cb9495683c5f7b8 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 16 Mar 2017 22:28:32 -0400 Subject: repo/commit: able to config default commits page size (#4230) Added config option '[ui.user] COMMITS_PAGING_NUM'. --- vendor/github.com/gogits/git-module/repo_commit.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vendor/github.com') diff --git a/vendor/github.com/gogits/git-module/repo_commit.go b/vendor/github.com/gogits/git-module/repo_commit.go index 54aca6c2..78ff0409 100644 --- a/vendor/github.com/gogits/git-module/repo_commit.go +++ b/vendor/github.com/gogits/git-module/repo_commit.go @@ -209,10 +209,10 @@ func (repo *Repository) CommitsByRangeSize(revision string, page, size int) (*li return repo.parsePrettyFormatLogToList(stdout) } -const DEFAULT_COMMITS_PAGE_SIZE = 30 +var DefaultCommitsPageSize = 30 func (repo *Repository) CommitsByRange(revision string, page int) (*list.List, error) { - return repo.CommitsByRangeSize(revision, page, DEFAULT_COMMITS_PAGE_SIZE) + return repo.CommitsByRangeSize(revision, page, DefaultCommitsPageSize) } func (repo *Repository) searchCommits(id sha1, keyword string) (*list.List, error) { @@ -245,7 +245,7 @@ func (repo *Repository) CommitsByFileAndRangeSize(revision, file string, page, s } func (repo *Repository) CommitsByFileAndRange(revision, file string, page int) (*list.List, error) { - return repo.CommitsByFileAndRangeSize(revision, file, page, DEFAULT_COMMITS_PAGE_SIZE) + return repo.CommitsByFileAndRangeSize(revision, file, page, DefaultCommitsPageSize) } func (repo *Repository) FilesCountBetween(startCommitID, endCommitID string) (int, error) { -- cgit v1.2.3