Fix compilation error

pull/4129/head
Unknwon 2017-02-15 04:09:07 -05:00
parent 3d52ef6e39
commit 94f91543b6
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
3 changed files with 7 additions and 5 deletions

View File

@ -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, setting.Repository.CommitsFetchConcurrency)
ctx.Data["Files"], err = entries.GetCommitsInfoWithCustomConcurrency(ctx.Repo.Commit, ctx.Repo.TreePath, setting.Repository.CommitsFetchConcurrency)
if err != nil {
ctx.Handle(500, "GetCommitsInfo", err)
return

View File

@ -113,6 +113,8 @@ func (tes Entries) Sort() {
sort.Sort(tes)
}
var defaultConcurrency = runtime.NumCPU()
type commitInfo struct {
entryName string
infos []interface{}
@ -136,7 +138,7 @@ func (tes Entries) GetCommitsInfoWithCustomConcurrency(commit *Commit, treePath
}
if maxConcurrency <= 0 {
maxConcurrency = runtime.NumCPU()
maxConcurrency = defaultConcurrency
}
// Length of taskChan determines how many goroutines (subprocesses) can run at the same time.

6
vendor/vendor.json vendored
View File

@ -159,10 +159,10 @@
"revisionTime": "2016-08-10T03:50:02Z"
},
{
"checksumSHA1": "bCfvbFm5XS4leTIpRaHEFtvaeYU=",
"checksumSHA1": "92bIqzmK6S5Pnq9HzqWva5mSDh4=",
"path": "github.com/gogits/git-module",
"revision": "5ef701a1cd1e63b7037f23cf2878e5ee749207c0",
"revisionTime": "2017-02-14T22:20:55Z"
"revision": "47f896db1a82dc746d8cfd2930e4b29a2bd75e2c",
"revisionTime": "2017-02-15T09:08:23Z"
},
{
"checksumSHA1": "xvG+RgJODQqlmdAkHUQK2TyLR88=",