aboutsummaryrefslogtreecommitdiffstats
path: root/models/graph.go
diff options
context:
space:
mode:
authorKjell Kvinge <kjell@kvinge.biz>2018-07-23 16:12:06 +0200
committerLauris BH <lauris@nix.lv>2018-07-23 17:12:06 +0300
commitba358ecbf5d58dc6b2f166a84a4b6c6633cfa397 (patch)
treea7d9949483e00fc01b071c1560705e6055a96e8d /models/graph.go
parentae9dd239fbfc3b9f18ff2ccbdbe6fdf236db2b36 (diff)
downloadgitea-ba358ecbf5d58dc6b2f166a84a4b6c6633cfa397.tar.gz
gitea-ba358ecbf5d58dc6b2f166a84a4b6c6633cfa397.zip
Make max commits in graph configurable (#4498)
Diffstat (limited to 'models/graph.go')
-rw-r--r--models/graph.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/graph.go b/models/graph.go
index 8ecea9c093..90b9ff11f8 100644
--- a/models/graph.go
+++ b/models/graph.go
@@ -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),
)