diff options
Diffstat (limited to 'storage/filesystem/storage.go')
-rw-r--r-- | storage/filesystem/storage.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/storage/filesystem/storage.go b/storage/filesystem/storage.go index 63d0215..c483218 100644 --- a/storage/filesystem/storage.go +++ b/storage/filesystem/storage.go @@ -1,6 +1,7 @@ package filesystem import ( + "gopkg.in/src-d/go-git.v4/config" "gopkg.in/src-d/go-git.v4/core" "gopkg.in/src-d/go-git.v4/storage/filesystem/internal/dotgit" "gopkg.in/src-d/go-git.v4/utils/fs" @@ -11,6 +12,7 @@ type Storage struct { o *ObjectStorage r *ReferenceStorage + c *ConfigStorage } func NewStorage(fs fs.FS, path string) (*Storage, error) { @@ -40,3 +42,12 @@ func (s *Storage) ReferenceStorage() core.ReferenceStorage { s.r = &ReferenceStorage{dir: s.dir} return s.r } + +func (s *Storage) ConfigStorage() config.ConfigStorage { + if s.c != nil { + return s.c + } + + s.c = &ConfigStorage{dir: s.dir} + return s.c +} |