Make max commits in graph configurable (#4498)

This commit is contained in:
Kjell Kvinge 2018-07-23 16:12:06 +02:00 committed by Lauris BH
parent ae9dd239fb
commit ba358ecbf5
4 changed files with 7 additions and 1 deletions

View file

@ -9,6 +9,7 @@ import (
"strings"
"code.gitea.io/git"
"code.gitea.io/gitea/modules/setting"
)
// GraphItem represent one commit, or one relation in timeline
@ -41,7 +42,7 @@ func GetCommitGraph(r *git.Repository) (GraphItems, error) {
"--all",
"-C",
"-M",
"-n 100",
fmt.Sprintf("-n %d", setting.UI.GraphMaxCommitNum),
"--date=iso",
fmt.Sprintf("--pretty=format:%s", format),
)