aboutsummaryrefslogtreecommitdiff
path: root/modules/git/repo_commit.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/repo_commit.go')
-rw-r--r--modules/git/repo_commit.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/git/repo_commit.go b/modules/git/repo_commit.go
index 7c47b53d..66d61b9b 100644
--- a/modules/git/repo_commit.go
+++ b/modules/git/repo_commit.go
@@ -275,9 +275,11 @@ func (repo *Repository) searchCommits(id sha1, keyword string) (*list.List, erro
return parsePrettyFormatLog(repo, stdout)
}
+var CommitsRangeSize = 50
+
func (repo *Repository) commitsByRange(id sha1, page int) (*list.List, error) {
stdout, stderr, err := com.ExecCmdDirBytes(repo.Path, "git", "log", id.String(),
- "--skip="+com.ToStr((page-1)*50), "--max-count=50", prettyLogFormat)
+ "--skip="+com.ToStr((page-1)*CommitsRangeSize), "--max-count="+com.ToStr(CommitsRangeSize), prettyLogFormat)
if err != nil {
return nil, errors.New(string(stderr))
}