aboutsummaryrefslogtreecommitdiffstats
path: root/repository/git.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-12-05 03:08:54 +0100
committerMichael Muré <batolettre@gmail.com>2020-12-08 13:07:51 +0100
commit4ef2c1104079032336da9f2a7879f2432c2609ce (patch)
treec233921001ae0f43d5d1c62ad50148d2c5bb2e35 /repository/git.go
parentbca9ae82745ffd619fd321f4200016c184849f94 (diff)
downloadgit-bug-4ef2c1104079032336da9f2a7879f2432c2609ce.tar.gz
repo: finish RepoStorage move
Diffstat (limited to 'repository/git.go')
-rw-r--r--repository/git.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/repository/git.go b/repository/git.go
index 8c319285..e67e12f5 100644
--- a/repository/git.go
+++ b/repository/git.go
@@ -5,7 +5,6 @@ import (
"bytes"
"fmt"
"os"
- "path"
"path/filepath"
"strings"
"sync"
@@ -379,9 +378,7 @@ func (repo *GitRepo) GetOrCreateClock(name string) (lamport.Clock, error) {
repo.clocksMutex.Lock()
defer repo.clocksMutex.Unlock()
- p := path.Join(repo.path, clockPath, name+"-clock")
-
- c, err = lamport.NewPersistedClock(p)
+ c, err = lamport.NewPersistedClock(repo.LocalStorage(), name+"-clock")
if err != nil {
return nil, err
}
@@ -398,9 +395,7 @@ func (repo *GitRepo) getClock(name string) (lamport.Clock, error) {
return c, nil
}
- p := path.Join(repo.path, clockPath, name+"-clock")
-
- c, err := lamport.LoadPersistedClock(p)
+ c, err := lamport.LoadPersistedClock(repo.LocalStorage(), name+"-clock")
if err == nil {
repo.clocks[name] = c
return c, nil