aboutsummaryrefslogtreecommitdiffstats
path: root/repository
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-11-19 18:54:22 +0100
committerGitHub <noreply@github.com>2019-11-19 18:54:22 +0100
commitabae3c245e1f844ebadb79eb5d7b19412f67f886 (patch)
tree9c5e06aa4e1ef9b41ceb21408de493d2e91b3d00 /repository
parentfdbff4dba7d6e56edfed1030e6fede2a7a35b507 (diff)
parented2ac793e9f353720db2615b06569d05c253b977 (diff)
downloadgit-bug-abae3c245e1f844ebadb79eb5d7b19412f67f886.tar.gz
Merge pull request #257 from MichaelMure/core-fixes
Core fixes
Diffstat (limited to 'repository')
-rw-r--r--repository/git.go8
-rw-r--r--repository/mock_repo.go4
-rw-r--r--repository/repo.go8
3 files changed, 10 insertions, 10 deletions
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