diff options
Diffstat (limited to 'repository')
-rw-r--r-- | repository/git.go | 2 | ||||
-rw-r--r-- | repository/repo.go | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/repository/git.go b/repository/git.go index af251aa2..c2f0da0a 100644 --- a/repository/git.go +++ b/repository/git.go @@ -67,7 +67,7 @@ func (repo *GitRepo) runGitCommand(args ...string) (string, error) { // NewGitRepo determines if the given working directory is inside of a git repository, // and returns the corresponding GitRepo instance if it is. -func NewGitRepo(path string, witnesser func(repo *GitRepo) error) (*GitRepo, error) { +func NewGitRepo(path string, witnesser Witnesser) (*GitRepo, error) { repo := &GitRepo{Path: path} // Check the repo and retrieve the root path diff --git a/repository/repo.go b/repository/repo.go index d0004c8b..3ae09057 100644 --- a/repository/repo.go +++ b/repository/repo.go @@ -107,6 +107,10 @@ type ClockedRepo interface { EditWitness(time lamport.Time) error } +// Witnesser is a function that will initialize the clocks of a repo +// from scratch +type Witnesser func(repo ClockedRepo) error + func prepareTreeEntries(entries []TreeEntry) bytes.Buffer { var buffer bytes.Buffer |