From bdbe9e7e8256fff820efe1ce707e7154d517ecb3 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Thu, 17 Jan 2019 03:09:08 +0100 Subject: identity: more progress and fixes --- repository/repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'repository/repo.go') diff --git a/repository/repo.go b/repository/repo.go index 3ae09057..100feaed 100644 --- a/repository/repo.go +++ b/repository/repo.go @@ -122,7 +122,7 @@ func prepareTreeEntries(entries []TreeEntry) bytes.Buffer { } func readTreeEntries(s string) ([]TreeEntry, error) { - split := strings.Split(s, "\n") + split := strings.Split(strings.TrimSpace(s), "\n") casted := make([]TreeEntry, len(split)) for i, line := range split { -- cgit From 71f9290fdae7551f3d3ada2179ece4084304d734 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 19 Feb 2019 00:19:27 +0100 Subject: identity: store the times properly --- repository/repo.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'repository/repo.go') 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) -- cgit