aboutsummaryrefslogtreecommitdiffstats
path: root/cache/repo_cache.go
diff options
context:
space:
mode:
authorMichael Muré <michael.mure@consensys.net>2019-03-25 21:58:27 +0100
committerMichael Muré <michael.mure@consensys.net>2019-03-25 22:06:01 +0100
commitd27e3849b826309bdf2dbf6f30f2a8ac9db71649 (patch)
treead4a751d9e13d2d8b4d163a4b61d1e32fd1ab855 /cache/repo_cache.go
parenta40dcc8a6a5acf01d823e1ca0f00e0d24c653655 (diff)
downloadgit-bug-d27e3849b826309bdf2dbf6f30f2a8ac9db71649.tar.gz
cache: add basic unit testing
Diffstat (limited to 'cache/repo_cache.go')
-rw-r--r--cache/repo_cache.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/cache/repo_cache.go b/cache/repo_cache.go
index 2b0fa360..bec733e3 100644
--- a/cache/repo_cache.go
+++ b/cache/repo_cache.go
@@ -153,6 +153,19 @@ 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)
+ }
+
lockPath := repoLockFilePath(c.repo)
return os.Remove(lockPath)
}