Skip to content

Commit

Permalink
Make max commits in graph configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
kjellkvinge committed Jul 22, 2018
1 parent ae9dd23 commit 5e21331
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion models/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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),
)
Expand Down
2 changes: 2 additions & 0 deletions modules/setting/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ var (
IssuePagingNum int
RepoSearchPagingNum int
FeedMaxCommitNum int
GraphMaxCommitNum int
ReactionMaxUserNum int
ThemeColorMetaTag string
MaxDisplayFileSize int64
Expand All @@ -301,6 +302,7 @@ var (
IssuePagingNum: 10,
RepoSearchPagingNum: 10,
FeedMaxCommitNum: 5,
GraphMaxCommitNum: 100,
ReactionMaxUserNum: 10,
ThemeColorMetaTag: `#6cc644`,
MaxDisplayFileSize: 8388608,
Expand Down

0 comments on commit 5e21331

Please sign in to comment.