aboutsummaryrefslogtreecommitdiffstats
path: root/repository/gogit.go
diff options
context:
space:
mode:
Diffstat (limited to 'repository/gogit.go')
-rw-r--r--repository/gogit.go18
1 files changed, 15 insertions, 3 deletions
diff --git a/repository/gogit.go b/repository/gogit.go
index 71a7e6d0..f115fab5 100644
--- a/repository/gogit.go
+++ b/repository/gogit.go
@@ -24,6 +24,8 @@ type GoGitRepo struct {
clocksMutex sync.Mutex
clocks map[string]lamport.Clock
+
+ keyring Keyring
}
func NewGoGitRepo(path string, clockLoaders []ClockLoader) (*GoGitRepo, error) {
@@ -37,10 +39,16 @@ func NewGoGitRepo(path string, clockLoaders []ClockLoader) (*GoGitRepo, error) {
return nil, err
}
+ k, err := defaultKeyring()
+ if err != nil {
+ return nil, err
+ }
+
repo := &GoGitRepo{
- r: r,
- path: path,
- clocks: make(map[string]lamport.Clock),
+ r: r,
+ path: path,
+ clocks: make(map[string]lamport.Clock),
+ keyring: k,
}
for _, loader := range clockLoaders {
@@ -154,6 +162,10 @@ func (repo *GoGitRepo) GlobalConfig() Config {
panic("go-git doesn't support writing global config")
}
+func (repo *GoGitRepo) Keyring() Keyring {
+ return repo.keyring
+}
+
// GetPath returns the path to the repo.
func (repo *GoGitRepo) GetPath() string {
return repo.path