aboutsummaryrefslogtreecommitdiffstats
path: root/cache/repo_cache_common.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-11-19 11:33:12 +0100
committerMichael Muré <batolettre@gmail.com>2022-11-28 17:20:25 +0100
commit0ac39a7ab5db077fcf0df827e32bf6e625e980da (patch)
treee453d6fd244cb322bdc6305c0088aa3c0331b075 /cache/repo_cache_common.go
parentc6bb6b9c7ecddb679966b1561e2e909a9ee5e8cd (diff)
downloadgit-bug-0ac39a7ab5db077fcf0df827e32bf6e625e980da.tar.gz
WIP
Diffstat (limited to 'cache/repo_cache_common.go')
-rw-r--r--cache/repo_cache_common.go6
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)