Skip to content

Commit e0ab95e

Browse files
committed
repo_commit: make DefaultCommitsPageSize be a variable
1 parent f9c2e67 commit e0ab95e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

repo_commit.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,10 @@ func (repo *Repository) CommitsByRangeSize(revision string, page, size int) (*li
209209
return repo.parsePrettyFormatLogToList(stdout)
210210
}
211211

212-
const DEFAULT_COMMITS_PAGE_SIZE = 30
212+
var DefaultCommitsPageSize = 30
213213

214214
func (repo *Repository) CommitsByRange(revision string, page int) (*list.List, error) {
215-
return repo.CommitsByRangeSize(revision, page, DEFAULT_COMMITS_PAGE_SIZE)
215+
return repo.CommitsByRangeSize(revision, page, DefaultCommitsPageSize)
216216
}
217217

218218
func (repo *Repository) searchCommits(id sha1, keyword string) (*list.List, error) {
@@ -245,7 +245,7 @@ func (repo *Repository) CommitsByFileAndRangeSize(revision, file string, page, s
245245
}
246246

247247
func (repo *Repository) CommitsByFileAndRange(revision, file string, page int) (*list.List, error) {
248-
return repo.CommitsByFileAndRangeSize(revision, file, page, DEFAULT_COMMITS_PAGE_SIZE)
248+
return repo.CommitsByFileAndRangeSize(revision, file, page, DefaultCommitsPageSize)
249249
}
250250

251251
func (repo *Repository) FilesCountBetween(startCommitID, endCommitID string) (int, error) {

0 commit comments

Comments
 (0)