From ca720f165cb286d4372ad48595e532a2423f2f07 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 16 Sep 2020 16:22:02 +0200 Subject: cache,bug,identity: structural change - bug doesn't commit identities anymore, only make sure they are commit - cache use an IdentityResolver to load bugs with identities from the cache (deps injection) - IdentityCache now are identity.Interface --- identity/bare.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'identity/bare.go') diff --git a/identity/bare.go b/identity/bare.go index 3e6ca32f..e6ae2384 100644 --- a/identity/bare.go +++ b/identity/bare.go @@ -185,14 +185,14 @@ func (i *Bare) Validate() error { // Write the identity into the Repository. In particular, this ensure that // the Id is properly set. -func (i *Bare) Commit(repo repository.ClockedRepo) error { +func (i *Bare) CommitWithRepo(repo repository.ClockedRepo) error { // Nothing to do, everything is directly embedded return nil } // If needed, write the identity into the Repository. In particular, this // ensure that the Id is properly set. -func (i *Bare) CommitAsNeeded(repo repository.ClockedRepo) error { +func (i *Bare) CommitAsNeededWithRepo(repo repository.ClockedRepo) error { // Nothing to do, everything is directly embedded return nil } @@ -212,3 +212,7 @@ func (i *Bare) LastModificationLamport() lamport.Time { func (i *Bare) LastModification() timestamp.Timestamp { return 0 } + +func (i *Bare) NeedCommit() bool { + return false +} -- cgit