From ba358ecbf5d58dc6b2f166a84a4b6c6633cfa397 Mon Sep 17 00:00:00 2001 From: Kjell Kvinge Date: Mon, 23 Jul 2018 16:12:06 +0200 Subject: Make max commits in graph configurable (#4498) --- models/graph.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'models/graph.go') 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), ) -- cgit v1.2.3