mirror of https://github.com/gogs/gogs.git
Commits fetch concurrency (#3837)
parent
ec9c14c09d
commit
a45205b988
|
@ -31,6 +31,11 @@ PREFERRED_LICENSES = Apache License 2.0,MIT License
|
|||
DISABLE_HTTP_GIT = false
|
||||
; Enable ability to migrate repository by local path
|
||||
ENABLE_LOCAL_PATH_MIGRATION = false
|
||||
; Concurrency is used to retrieve commits information. This variable define
|
||||
; the maximum number of tasks that can be run at the same time. Usually, the
|
||||
; value depend of how many CPUs (cores) you have. If the value is set to zero
|
||||
; or under, GOGS will automatically detect the number of CPUs your system have
|
||||
COMMITS_FETCH_CONCURRENCY = 0
|
||||
|
||||
[repository.editor]
|
||||
; List of file extensions that should have line wraps in the CodeMirror editor.
|
||||
|
|
|
@ -126,6 +126,7 @@ var (
|
|||
PreferredLicenses []string
|
||||
DisableHTTPGit bool `ini:"DISABLE_HTTP_GIT"`
|
||||
EnableLocalPathMigration bool
|
||||
CommitsFetchConcurrency int
|
||||
|
||||
// Repository editor settings
|
||||
Editor struct {
|
||||
|
|
|
@ -46,7 +46,7 @@ func renderDirectory(ctx *context.Context, treeLink string) {
|
|||
}
|
||||
entries.Sort()
|
||||
|
||||
ctx.Data["Files"], err = entries.GetCommitsInfo(ctx.Repo.Commit, ctx.Repo.TreePath)
|
||||
ctx.Data["Files"], err = entries.GetCommitsInfo(ctx.Repo.Commit, ctx.Repo.TreePath, setting.Repository.CommitsFetchConcurrency)
|
||||
if err != nil {
|
||||
ctx.Handle(500, "GetCommitsInfo", err)
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue