mirror of
https://github.com/gogs/gogs.git
synced 2025-05-31 11:42:13 +00:00
Commits fetch concurrency (#3837)
This commit is contained in:
parent
ec9c14c09d
commit
a45205b988
@ -31,6 +31,11 @@ PREFERRED_LICENSES = Apache License 2.0,MIT License
|
|||||||
DISABLE_HTTP_GIT = false
|
DISABLE_HTTP_GIT = false
|
||||||
; Enable ability to migrate repository by local path
|
; Enable ability to migrate repository by local path
|
||||||
ENABLE_LOCAL_PATH_MIGRATION = false
|
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]
|
[repository.editor]
|
||||||
; List of file extensions that should have line wraps in the CodeMirror editor.
|
; List of file extensions that should have line wraps in the CodeMirror editor.
|
||||||
|
@ -126,6 +126,7 @@ var (
|
|||||||
PreferredLicenses []string
|
PreferredLicenses []string
|
||||||
DisableHTTPGit bool `ini:"DISABLE_HTTP_GIT"`
|
DisableHTTPGit bool `ini:"DISABLE_HTTP_GIT"`
|
||||||
EnableLocalPathMigration bool
|
EnableLocalPathMigration bool
|
||||||
|
CommitsFetchConcurrency int
|
||||||
|
|
||||||
// Repository editor settings
|
// Repository editor settings
|
||||||
Editor struct {
|
Editor struct {
|
||||||
|
@ -46,7 +46,7 @@ func renderDirectory(ctx *context.Context, treeLink string) {
|
|||||||
}
|
}
|
||||||
entries.Sort()
|
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 {
|
if err != nil {
|
||||||
ctx.Handle(500, "GetCommitsInfo", err)
|
ctx.Handle(500, "GetCommitsInfo", err)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user