diff options
Diffstat (limited to 'cache/repo_cache_common.go')
-rw-r--r-- | cache/repo_cache_common.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cache/repo_cache_common.go b/cache/repo_cache_common.go index 43ac6beb..18ba52f3 100644 --- a/cache/repo_cache_common.go +++ b/cache/repo_cache_common.go @@ -126,9 +126,13 @@ func (c *RepoCache) MergeAll(remote string) <-chan entity.MergeResult { continue } + // TODO: have subcache do the merging? switch result.Status { - case entity.MergeStatusNew, entity.MergeStatusUpdated: + case entity.MergeStatusNew: b := result.Entity.(*bug.Bug) + _, err := c.bugs.add(b) + case entity.MergeStatusUpdated: + _, err := c.bugs.entityUpdated(b) snap := b.Compile() c.muBug.Lock() c.bugExcerpts[result.Id] = NewBugExcerpt(b, snap) |