aboutsummaryrefslogtreecommitdiffstats
path: root/repository/gogit.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-10-04 20:03:44 +0200
committerMichael Muré <batolettre@gmail.com>2020-10-04 20:03:44 +0200
commit1eb13173183cf402e4197be51935a4b3ddacf256 (patch)
tree4382550c1e8387b7cb6b13c6dd32508c24e6c4ca /repository/gogit.go
parent1a0c86a12d68a2f0ee99cbff535c82e07b735108 (diff)
downloadgit-bug-1eb13173183cf402e4197be51935a4b3ddacf256.tar.gz
repo: fix missing keyring on the go-git repo
Diffstat (limited to 'repository/gogit.go')
-rw-r--r--repository/gogit.go24
1 files changed, 18 insertions, 6 deletions
diff --git a/repository/gogit.go b/repository/gogit.go
index 8fb7c52a..c0179628 100644
--- a/repository/gogit.go
+++ b/repository/gogit.go
@@ -138,10 +138,16 @@ func InitGoGitRepo(path string) (*GoGitRepo, error) {
return nil, err
}
+ k, err := defaultKeyring()
+ if err != nil {
+ return nil, err
+ }
+
return &GoGitRepo{
- r: r,
- path: path + "/.git",
- clocks: make(map[string]lamport.Clock),
+ r: r,
+ path: path + "/.git",
+ clocks: make(map[string]lamport.Clock),
+ keyring: k,
}, nil
}
@@ -152,10 +158,16 @@ func InitBareGoGitRepo(path string) (*GoGitRepo, error) {
return nil, err
}
+ k, err := defaultKeyring()
+ if err != nil {
+ return nil, err
+ }
+
return &GoGitRepo{
- r: r,
- path: path,
- clocks: make(map[string]lamport.Clock),
+ r: r,
+ path: path,
+ clocks: make(map[string]lamport.Clock),
+ keyring: k,
}, nil
}