mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 02:01:43 +03:00
fix(778): remove extra mutex lock when resolving bug prefix
This commit is contained in:
parent
90208b5f6d
commit
eda312f9b1
4
cache/repo_cache_bug.go
vendored
4
cache/repo_cache_bug.go
vendored
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user