diff options
author | Unknwon <u@gogs.io> | 2015-08-20 20:18:49 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-20 20:18:49 +0800 |
commit | aa65761d81d3f33bdfee578c14bb2b0c7a6ca639 (patch) | |
tree | 8c86e0e58758bc10a737b503f8d92e62406adf06 /modules/git/repo_commit.go | |
parent | d7c3c79c00425e89a71e6178076bc5828421244d (diff) | |
download | gitea-aa65761d81d3f33bdfee578c14bb2b0c7a6ca639.tar.gz gitea-aa65761d81d3f33bdfee578c14bb2b0c7a6ca639.zip |
new commits table
Diffstat (limited to 'modules/git/repo_commit.go')
-rw-r--r-- | modules/git/repo_commit.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/git/repo_commit.go b/modules/git/repo_commit.go index 7c47b53dc4..66d61b9b51 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)) } |