aboutsummaryrefslogtreecommitdiffstats
path: root/cache/repo_cache_bug.go
diff options
context:
space:
mode:
authorSteve Moyer <smoyer1@selesy.com>2022-05-31 21:25:23 -0400
committerSteve Moyer <smoyer1@selesy.com>2022-05-31 21:25:23 -0400
commiteda312f9b1998f5c6d6881312091fd9451c2ffe3 (patch)
treefd12ca4e32c0f396b6adb7014aec3fa4bc161f46 /cache/repo_cache_bug.go
parent90208b5f6dc13cafc088862fcf5e7f961e119f27 (diff)
downloadgit-bug-eda312f9b1998f5c6d6881312091fd9451c2ffe3.tar.gz
fix(778): remove extra mutex lock when resolving bug prefix
Diffstat (limited to 'cache/repo_cache_bug.go')
-rw-r--r--cache/repo_cache_bug.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/cache/repo_cache_bug.go b/cache/repo_cache_bug.go
index bce01926..f8bf5a2f 100644
--- a/cache/repo_cache_bug.go
+++ b/cache/repo_cache_bug.go
@@ -499,14 +499,10 @@ func (c *RepoCache) NewBugRaw(author *IdentityCache, unixTime int64, title strin
// RemoveBug removes a bug from the cache and repo given a bug id prefix
func (c *RepoCache) RemoveBug(prefix string) error {
- c.muBug.RLock()
-
b, err := c.ResolveBugPrefix(prefix)
if err != nil {
- c.muBug.RUnlock()
return err
}
- c.muBug.RUnlock()
c.muBug.Lock()
err = bug.RemoveBug(c.repo, b.Id())