mirror of https://github.com/gogs/gogs.git
Fix compilation error
parent
3d52ef6e39
commit
94f91543b6
|
@ -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, setting.Repository.CommitsFetchConcurrency)
|
ctx.Data["Files"], err = entries.GetCommitsInfoWithCustomConcurrency(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
|
||||||
|
|
|
@ -113,6 +113,8 @@ func (tes Entries) Sort() {
|
||||||
sort.Sort(tes)
|
sort.Sort(tes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var defaultConcurrency = runtime.NumCPU()
|
||||||
|
|
||||||
type commitInfo struct {
|
type commitInfo struct {
|
||||||
entryName string
|
entryName string
|
||||||
infos []interface{}
|
infos []interface{}
|
||||||
|
@ -136,7 +138,7 @@ func (tes Entries) GetCommitsInfoWithCustomConcurrency(commit *Commit, treePath
|
||||||
}
|
}
|
||||||
|
|
||||||
if maxConcurrency <= 0 {
|
if maxConcurrency <= 0 {
|
||||||
maxConcurrency = runtime.NumCPU()
|
maxConcurrency = defaultConcurrency
|
||||||
}
|
}
|
||||||
|
|
||||||
// Length of taskChan determines how many goroutines (subprocesses) can run at the same time.
|
// Length of taskChan determines how many goroutines (subprocesses) can run at the same time.
|
||||||
|
|
|
@ -159,10 +159,10 @@
|
||||||
"revisionTime": "2016-08-10T03:50:02Z"
|
"revisionTime": "2016-08-10T03:50:02Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "bCfvbFm5XS4leTIpRaHEFtvaeYU=",
|
"checksumSHA1": "92bIqzmK6S5Pnq9HzqWva5mSDh4=",
|
||||||
"path": "github.com/gogits/git-module",
|
"path": "github.com/gogits/git-module",
|
||||||
"revision": "5ef701a1cd1e63b7037f23cf2878e5ee749207c0",
|
"revision": "47f896db1a82dc746d8cfd2930e4b29a2bd75e2c",
|
||||||
"revisionTime": "2017-02-14T22:20:55Z"
|
"revisionTime": "2017-02-15T09:08:23Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "xvG+RgJODQqlmdAkHUQK2TyLR88=",
|
"checksumSHA1": "xvG+RgJODQqlmdAkHUQK2TyLR88=",
|
||||||
|
|
Loading…
Reference in New Issue