aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/gogits
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-03-16 22:28:32 -0400
committerUnknwon <u@gogs.io>2017-03-16 22:28:32 -0400
commitbc630cc52b81232d4cd9e8ab5cb9495683c5f7b8 (patch)
tree1e27071b620fee7702dbad20c58588761e197f04 /vendor/github.com/gogits
parentd591cb0dfb0fbd9572a3cbf600ef662ca5a99b05 (diff)
repo/commit: able to config default commits page size (#4230)
Added config option '[ui.user] COMMITS_PAGING_NUM'.
Diffstat (limited to 'vendor/github.com/gogits')
-rw-r--r--vendor/github.com/gogits/git-module/repo_commit.go6
1 files changed, 3 insertions, 3 deletions
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) {