aboutsummaryrefslogtreecommitdiffstats
path: root/cache
diff options
context:
space:
mode:
authorAmine <hilalyamine@gmail.com>2019-08-19 00:37:54 +0200
committerGitHub <noreply@github.com>2019-08-19 00:37:54 +0200
commit36c91adddfc16b8c5d04eb66dbb4cf8c25cea321 (patch)
tree50484f3531e33c2c63c026fcb1c76f60f8b13862 /cache
parent6428352bd14828f670206b60862de7f71c52d235 (diff)
parente6931aaf6f3173c634b03d515287e4a12fd20f15 (diff)
downloadgit-bug-36c91adddfc16b8c5d04eb66dbb4cf8c25cea321.tar.gz
Merge pull request #190 from MichaelMure/bridge-ctx
Bridge: pull/push enhancements
Diffstat (limited to 'cache')
-rw-r--r--cache/repo_cache.go16
1 files changed, 4 insertions, 12 deletions
diff --git a/cache/repo_cache.go b/cache/repo_cache.go
index d6e8857d..107a4876 100644
--- a/cache/repo_cache.go
+++ b/cache/repo_cache.go
@@ -172,18 +172,10 @@ func (c *RepoCache) lock() error {
}
func (c *RepoCache) Close() error {
- for id := range c.identities {
- delete(c.identities, id)
- }
- for id := range c.identitiesExcerpts {
- delete(c.identitiesExcerpts, id)
- }
- for id := range c.bugs {
- delete(c.bugs, id)
- }
- for id := range c.bugExcerpts {
- delete(c.bugExcerpts, id)
- }
+ c.identities = make(map[entity.Id]*IdentityCache)
+ c.identitiesExcerpts = nil
+ c.bugs = make(map[entity.Id]*BugCache)
+ c.bugExcerpts = nil
lockPath := repoLockFilePath(c.repo)
return os.Remove(lockPath)