diff options
author | Amine <hilalyamine@gmail.com> | 2019-08-19 00:37:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-19 00:37:54 +0200 |
commit | 36c91adddfc16b8c5d04eb66dbb4cf8c25cea321 (patch) | |
tree | 50484f3531e33c2c63c026fcb1c76f60f8b13862 /cache/repo_cache.go | |
parent | 6428352bd14828f670206b60862de7f71c52d235 (diff) | |
parent | e6931aaf6f3173c634b03d515287e4a12fd20f15 (diff) | |
download | git-bug-36c91adddfc16b8c5d04eb66dbb4cf8c25cea321.tar.gz |
Merge pull request #190 from MichaelMure/bridge-ctx
Bridge: pull/push enhancements
Diffstat (limited to 'cache/repo_cache.go')
-rw-r--r-- | cache/repo_cache.go | 16 |
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) |