github: fix potential bug due to var aliasing

Michael Muré created

Change summary

bridge/github/import.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Detailed changes

bridge/github/import.go 🔗

@@ -423,7 +423,8 @@ func (gi *githubImporter) ensureComment(repo *cache.RepoCache, b *cache.BugCache
 		return err
 	}
 
-	target, err := b.ResolveOperationWithMetadata(keyGithubId, parseId(comment.Id))
+	var target git.Hash
+	target, err = b.ResolveOperationWithMetadata(keyGithubId, parseId(comment.Id))
 	if err != nil && err != cache.ErrNoMatchingOp {
 		// real error
 		return err