diff options
author | Michael Muré <batolettre@gmail.com> | 2021-04-09 13:01:14 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2021-04-09 13:01:14 +0200 |
commit | 1520f678f7a2bc6e01d9b01df5ce49f2f46be7d7 (patch) | |
tree | f6d71c1f29cf06ccab9e4ae434b19ab17caa4385 /cache/identity_cache.go | |
parent | 0fd570171d171aa574d7f01d6033a9c01d668465 (diff) | |
parent | bc5f618eba812859bf87ce2c31b278bd518d4555 (diff) | |
download | git-bug-1520f678f7a2bc6e01d9b01df5ce49f2f46be7d7.tar.gz |
Merge remote-tracking branch 'origin/master' into dev-gh-bridge
Diffstat (limited to 'cache/identity_cache.go')
-rw-r--r-- | cache/identity_cache.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cache/identity_cache.go b/cache/identity_cache.go index 25e273b9..e419387f 100644 --- a/cache/identity_cache.go +++ b/cache/identity_cache.go @@ -2,6 +2,7 @@ package cache import ( "github.com/MichaelMure/git-bug/identity" + "github.com/MichaelMure/git-bug/repository" ) var _ identity.Interface = &IdentityCache{} @@ -23,8 +24,11 @@ func (i *IdentityCache) notifyUpdated() error { return i.repoCache.identityUpdated(i.Identity.Id()) } -func (i *IdentityCache) Mutate(f func(identity.Mutator) identity.Mutator) error { - i.Identity.Mutate(f) +func (i *IdentityCache) Mutate(repo repository.RepoClock, f func(*identity.Mutator)) error { + err := i.Identity.Mutate(repo, f) + if err != nil { + return err + } return i.notifyUpdated() } |