From 94f91543b662e2f136014333b87ba4ab357ec101 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 15 Feb 2017 04:09:07 -0500 Subject: Fix compilation error --- vendor/github.com/gogits/git-module/tree_entry.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vendor/github.com/gogits/git-module/tree_entry.go') diff --git a/vendor/github.com/gogits/git-module/tree_entry.go b/vendor/github.com/gogits/git-module/tree_entry.go index 8d2ea8e2..54574035 100644 --- a/vendor/github.com/gogits/git-module/tree_entry.go +++ b/vendor/github.com/gogits/git-module/tree_entry.go @@ -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. -- cgit v1.2.3