diff options
author | Michael Muré <batolettre@gmail.com> | 2022-12-23 01:48:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-23 01:48:14 +0100 |
commit | 0a5a0ec1ef4ad98bc2116a953e201f96474941ab (patch) | |
tree | 660a9b17b5247fe2f954bfa814cce3193c5afa23 /entity/dag/interface.go | |
parent | 108518530e822e3bdf59c8bfc333ad0bbe2d5fc8 (diff) | |
parent | 95911100823b5c809225d664de74ad2d64e91972 (diff) | |
download | git-bug-0a5a0ec1ef4ad98bc2116a953e201f96474941ab.tar.gz git-bug-0a5a0ec1ef4ad98bc2116a953e201f96474941ab.zip |
Merge pull request #938 from MichaelMure/cache-reorg
Generic cache layer
Diffstat (limited to 'entity/dag/interface.go')
-rw-r--r-- | entity/dag/interface.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/entity/dag/interface.go b/entity/dag/interface.go index 613f60e6..80abaced 100644 --- a/entity/dag/interface.go +++ b/entity/dag/interface.go @@ -25,6 +25,10 @@ type Interface[SnapT Snapshot, OpT Operation] interface { // Commit writes the staging area in Git and move the operations to the packs Commit(repo repository.ClockedRepo) error + // CommitAsNeeded execute a Commit only if necessary. This function is useful to avoid getting an error if the Entity + // is already in sync with the repository. + CommitAsNeeded(repo repository.ClockedRepo) error + // FirstOp lookup for the very first operation of the Entity. FirstOp() OpT @@ -32,7 +36,7 @@ type Interface[SnapT Snapshot, OpT Operation] interface { // For a valid Entity, should never be nil LastOp() OpT - // Compile a bug in an easily usable snapshot + // Compile an Entity in an easily usable snapshot Compile() SnapT // CreateLamportTime return the Lamport time of creation |