aboutsummaryrefslogtreecommitdiffstats
path: root/repository/repo.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-02-19 00:19:27 +0100
committerMichael Muré <batolettre@gmail.com>2019-03-01 22:40:27 +0100
commit71f9290fdae7551f3d3ada2179ece4084304d734 (patch)
tree3494e4d4491012899ace256f534f5faea1ba2a88 /repository/repo.go
parentffe35fece1b1526949107f154abc21a1a02fc74d (diff)
downloadgit-bug-71f9290fdae7551f3d3ada2179ece4084304d734.tar.gz
identity: store the times properly
Diffstat (limited to 'repository/repo.go')
-rw-r--r--repository/repo.go7
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)