diff options
author | Michael Muré <batolettre@gmail.com> | 2019-11-19 00:27:40 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-11-19 00:27:40 +0100 |
commit | a9b32e6bdaa610e2244816618a316bcdf53545e6 (patch) | |
tree | 579e49e7972dd0b1719227eee75a767dba92208d | |
parent | 0b2a99ab965a1a90e138cc26f12c160a0dac60c2 (diff) | |
download | git-bug-a9b32e6bdaa610e2244816618a316bcdf53545e6.tar.gz |
repo: esthetism rename
-rw-r--r-- | bug/bug.go | 4 | ||||
-rw-r--r-- | bug/clocks.go | 4 | ||||
-rw-r--r-- | repository/git.go | 8 | ||||
-rw-r--r-- | repository/mock_repo.go | 4 | ||||
-rw-r--r-- | repository/repo.go | 8 |
5 files changed, 14 insertions, 14 deletions
@@ -197,10 +197,10 @@ func readBug(repo repository.ClockedRepo, ref string) (*Bug, error) { } // Update the clocks - if err := repo.CreateWitness(bug.createTime); err != nil { + if err := repo.WitnessCreate(bug.createTime); err != nil { return nil, errors.Wrap(err, "failed to update create lamport clock") } - if err := repo.EditWitness(bug.editTime); err != nil { + if err := repo.WitnessEdit(bug.editTime); err != nil { return nil, errors.Wrap(err, "failed to update edit lamport clock") } diff --git a/bug/clocks.go b/bug/clocks.go index bb3d81f0..52d23544 100644 --- a/bug/clocks.go +++ b/bug/clocks.go @@ -12,12 +12,12 @@ func Witnesser(repo repository.ClockedRepo) error { return b.Err } - err := repo.CreateWitness(b.Bug.createTime) + err := repo.WitnessCreate(b.Bug.createTime) if err != nil { return err } - err = repo.EditWitness(b.Bug.editTime) + err = repo.WitnessEdit(b.Bug.editTime) if err != nil { return err } diff --git a/repository/git.go b/repository/git.go index 2c72fccd..d4560805 100644 --- a/repository/git.go +++ b/repository/git.go @@ -461,14 +461,14 @@ func (repo *GitRepo) EditTimeIncrement() (lamport.Time, error) { return repo.editClock.Increment() } -// CreateWitness witness another create time and increment the corresponding clock +// WitnessCreate witness another create time and increment the corresponding clock // if needed. -func (repo *GitRepo) CreateWitness(time lamport.Time) error { +func (repo *GitRepo) WitnessCreate(time lamport.Time) error { return repo.createClock.Witness(time) } -// EditWitness witness another edition time and increment the corresponding clock +// WitnessEdit witness another edition time and increment the corresponding clock // if needed. -func (repo *GitRepo) EditWitness(time lamport.Time) error { +func (repo *GitRepo) WitnessEdit(time lamport.Time) error { return repo.editClock.Witness(time) } diff --git a/repository/mock_repo.go b/repository/mock_repo.go index 26c02ede..88c5a132 100644 --- a/repository/mock_repo.go +++ b/repository/mock_repo.go @@ -236,12 +236,12 @@ func (r *mockRepoForTest) EditTimeIncrement() (lamport.Time, error) { return r.editClock.Increment(), nil } -func (r *mockRepoForTest) CreateWitness(time lamport.Time) error { +func (r *mockRepoForTest) WitnessCreate(time lamport.Time) error { r.createClock.Witness(time) return nil } -func (r *mockRepoForTest) EditWitness(time lamport.Time) error { +func (r *mockRepoForTest) WitnessEdit(time lamport.Time) error { r.editClock.Witness(time) return nil } diff --git a/repository/repo.go b/repository/repo.go index e8c67a5e..71bd7a8e 100644 --- a/repository/repo.go +++ b/repository/repo.go @@ -111,13 +111,13 @@ type ClockedRepo interface { // EditTimeIncrement increment the edit clock and return the new value. EditTimeIncrement() (lamport.Time, error) - // CreateWitness witness another create time and increment the corresponding + // WitnessCreate witness another create time and increment the corresponding // clock if needed. - CreateWitness(time lamport.Time) error + WitnessCreate(time lamport.Time) error - // EditWitness witness another edition time and increment the corresponding + // WitnessEdit witness another edition time and increment the corresponding // clock if needed. - EditWitness(time lamport.Time) error + WitnessEdit(time lamport.Time) error } // Witnesser is a function that will initialize the clocks of a repo |