aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/gogits
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-02-15 04:09:07 -0500
committerUnknwon <u@gogs.io>2017-02-15 04:09:07 -0500
commit94f91543b662e2f136014333b87ba4ab357ec101 (patch)
tree3c4331e0ad72049833ee9b4fe9ef568514c7a162 /vendor/github.com/gogits
parent3d52ef6e39ff2b707d50cd278de705de4887db90 (diff)
Fix compilation error
Diffstat (limited to 'vendor/github.com/gogits')
-rw-r--r--vendor/github.com/gogits/git-module/tree_entry.go4
1 files changed, 3 insertions, 1 deletions
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.