aboutsummaryrefslogtreecommitdiffstats
path: root/repository/git.go
diff options
context:
space:
mode:
Diffstat (limited to 'repository/git.go')
-rw-r--r--repository/git.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/repository/git.go b/repository/git.go
index 10fddac3..836de8f0 100644
--- a/repository/git.go
+++ b/repository/git.go
@@ -20,6 +20,8 @@ const editClockFile = "/.git/git-bug/edit-clock"
// ErrNotARepo is the error returned when the git repo root wan't be found
var ErrNotARepo = errors.New("not a git repository")
+var _ ClockedRepo = &GitRepo{}
+
// GitRepo represents an instance of a (local) git repository.
type GitRepo struct {
Path string
@@ -440,11 +442,21 @@ func (repo *GitRepo) WriteClocks() error {
return nil
}
+// CreateTime return the current value of the creation clock
+func (repo *GitRepo) CreateTime() lamport.Time {
+ return repo.createClock.Time()
+}
+
// CreateTimeIncrement increment the creation clock and return the new value.
func (repo *GitRepo) CreateTimeIncrement() (lamport.Time, error) {
return repo.createClock.Increment()
}
+// EditTime return the current value of the edit clock
+func (repo *GitRepo) EditTime() lamport.Time {
+ return repo.editClock.Time()
+}
+
// EditTimeIncrement increment the edit clock and return the new value.
func (repo *GitRepo) EditTimeIncrement() (lamport.Time, error) {
return repo.editClock.Increment()