diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-05-21 19:28:05 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-05-21 19:28:05 +0200 |
commit | 8fbb9914931704257581f5a7474ee3f2abc3780f (patch) | |
tree | aa27da9eb77c76b9d9912bb94d92c59823446692 /repository.go | |
parent | d98ebb5e42cd07007010f6d10db11a792c58206e (diff) | |
download | go-git-8fbb9914931704257581f5a7474ee3f2abc3780f.tar.gz |
storage: filesystem, initialize the default folder scaffolding
Diffstat (limited to 'repository.go')
-rw-r--r-- | repository.go | 8 |
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 |