aboutsummaryrefslogtreecommitdiffstats
path: root/cache/cached.go
diff options
context:
space:
mode:
Diffstat (limited to 'cache/cached.go')
-rw-r--r--cache/cached.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/cache/cached.go b/cache/cached.go
index 74757356..5a31ee59 100644
--- a/cache/cached.go
+++ b/cache/cached.go
@@ -3,10 +3,10 @@ package cache
import (
"sync"
- "github.com/MichaelMure/git-bug/entities/bug"
"github.com/MichaelMure/git-bug/entity"
"github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/repository"
+ "github.com/MichaelMure/git-bug/util/lamport"
)
// type withSnapshot[SnapT dag.Snapshot, OpT dag.OperationWithApply[SnapT]] struct {
@@ -97,7 +97,7 @@ func (e *CachedEntityBase[SnapT, OpT]) ResolveOperationWithMetadata(key string,
}
if len(matching) > 1 {
- return "", bug.NewErrMultipleMatchOp(matching)
+ return "", entity.NewErrMultipleMatch("operation", matching)
}
return matching[0], nil
@@ -136,3 +136,15 @@ func (e *CachedEntityBase[SnapT, OpT]) NeedCommit() bool {
defer e.mu.RUnlock()
return e.entity.NeedCommit()
}
+
+func (e *CachedEntityBase[SnapT, OpT]) CreateLamportTime() lamport.Time {
+ return e.entity.CreateLamportTime()
+}
+
+func (e *CachedEntityBase[SnapT, OpT]) EditLamportTime() lamport.Time {
+ return e.entity.EditLamportTime()
+}
+
+func (e *CachedEntityBase[SnapT, OpT]) FirstOp() OpT {
+ return e.entity.FirstOp()
+}