From 63d0b8b72f4bfcf24a393a377288654440d0807d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Wed, 19 Sep 2018 21:16:16 +0200 Subject: [PATCH] cache: relay early the merge events --- cache/repo_cache.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cache/repo_cache.go b/cache/repo_cache.go index de8b0fa92650ca32bef37f8863497f8c4bafbbbb..7ae8bb1dc6e2ef0fc4ed6cae5c61da6817c174ad 100644 --- a/cache/repo_cache.go +++ b/cache/repo_cache.go @@ -332,6 +332,8 @@ func (c *RepoCache) MergeAll(remote string) <-chan bug.MergeResult { results := bug.MergeAll(c.repo, remote) for result := range results { + out <- result + if result.Err != nil { continue } @@ -343,11 +345,7 @@ func (c *RepoCache) MergeAll(remote string) <-chan bug.MergeResult { b := result.Bug snap := b.Compile() c.excerpts[id] = NewBugExcerpt(b, &snap) - - default: } - - out <- result } err := c.write()