aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/storage.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-05-22 13:47:42 +0200
committerGitHub <noreply@github.com>2017-05-22 13:47:42 +0200
commit2ff77a8d93529cefdca922dbed89d4b1cd0ee8e5 (patch)
treeaa27da9eb77c76b9d9912bb94d92c59823446692 /storage/filesystem/storage.go
parentd98ebb5e42cd07007010f6d10db11a792c58206e (diff)
parent8fbb9914931704257581f5a7474ee3f2abc3780f (diff)
downloadgo-git-2ff77a8d93529cefdca922dbed89d4b1cd0ee8e5.tar.gz
Merge pull request #398 from mcuadros/init-fix
storage: filesystem, initialize the default folder scaffolding
Diffstat (limited to 'storage/filesystem/storage.go')
-rw-r--r--storage/filesystem/storage.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/storage/filesystem/storage.go b/storage/filesystem/storage.go
index 6d58006..dcb061d 100644
--- a/storage/filesystem/storage.go
+++ b/storage/filesystem/storage.go
@@ -24,6 +24,10 @@ type Storage struct {
// NewStorage returns a new Storage backed by a given `fs.Filesystem`
func NewStorage(fs billy.Filesystem) (*Storage, error) {
dir := dotgit.New(fs)
+ if err := dir.Initialize(); err != nil {
+ return nil, err
+ }
+
o, err := newObjectStorage(dir)
if err != nil {
return nil, err