aboutsummaryrefslogtreecommitdiffstats
path: root/repository.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-05-21 19:28:05 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2017-05-21 19:28:05 +0200
commit8fbb9914931704257581f5a7474ee3f2abc3780f (patch)
treeaa27da9eb77c76b9d9912bb94d92c59823446692 /repository.go
parentd98ebb5e42cd07007010f6d10db11a792c58206e (diff)
downloadgo-git-8fbb9914931704257581f5a7474ee3f2abc3780f.tar.gz
storage: filesystem, initialize the default folder scaffolding
Diffstat (limited to 'repository.go')
-rw-r--r--repository.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/repository.go b/repository.go
index 8a7b348..76be660 100644
--- a/repository.go
+++ b/repository.go
@@ -201,6 +201,14 @@ func PlainOpen(path string) (*Repository, error) {
return nil, err
}
+ if _, err := dot.Stat(""); err != nil {
+ if os.IsNotExist(err) {
+ return nil, ErrRepositoryNotExists
+ }
+
+ return nil, err
+ }
+
s, err := filesystem.NewStorage(dot)
if err != nil {
return nil, err