diff options
author | Michael Muré <batolettre@gmail.com> | 2019-02-19 00:19:27 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-03-01 22:40:27 +0100 |
commit | 71f9290fdae7551f3d3ada2179ece4084304d734 (patch) | |
tree | 3494e4d4491012899ace256f534f5faea1ba2a88 /repository/repo.go | |
parent | ffe35fece1b1526949107f154abc21a1a02fc74d (diff) | |
download | git-bug-71f9290fdae7551f3d3ada2179ece4084304d734.tar.gz |
identity: store the times properly
Diffstat (limited to 'repository/repo.go')
-rw-r--r-- | repository/repo.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/repository/repo.go b/repository/repo.go index 100feaed..8a66c320 100644 --- a/repository/repo.go +++ b/repository/repo.go @@ -83,6 +83,7 @@ type Repo interface { GetTreeHash(commit git.Hash) (git.Hash, error) } +// ClockedRepo is a Repo that also has Lamport clocks type ClockedRepo interface { Repo @@ -92,9 +93,15 @@ type ClockedRepo interface { // WriteClocks write the clocks values into the repo WriteClocks() error + // CreateTime return the current value of the creation clock + CreateTime() lamport.Time + // CreateTimeIncrement increment the creation clock and return the new value. CreateTimeIncrement() (lamport.Time, error) + // EditTime return the current value of the edit clock + EditTime() lamport.Time + // EditTimeIncrement increment the edit clock and return the new value. EditTimeIncrement() (lamport.Time, error) |