MCPcopy Index your code
hub / github.com/git-bug/git-bug / buildCache

Method buildCache

cache/repo_cache.go:239–258  ·  view source on GitHub ↗
(events chan BuildEvent)

Source from the content-addressed store, hash-verified

237}
238
239func (c *RepoCache) buildCache(events chan BuildEvent) {
240 events <- BuildEvent{Event: BuildEventCacheIsBuilt}
241
242 var wg sync.WaitGroup
243 for _, subcache := range c.subcaches {
244 wg.Add(1)
245 go func(subcache cacheMgmt) {
246 defer wg.Done()
247
248 buildEvents := subcache.Build()
249 for buildEvent := range buildEvents {
250 events <- buildEvent
251 if buildEvent.Err != nil {
252 return
253 }
254 }
255 }(subcache)
256 }
257 wg.Wait()
258}
259
260// repoIsAvailable check is the given repository is locked by a Cache.
261// Note: this is a smart function that will clean the lock file if the

Callers 1

NewNamedRepoCacheFunction · 0.95

Calls 3

AddMethod · 0.80
WaitMethod · 0.80
BuildMethod · 0.65

Tested by

no test coverage detected