From b22e7fa5a7bcd5492aaf9ec11f57cb4322eb8cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Cuadros?= Date: Tue, 18 Jul 2017 23:12:09 +0200 Subject: [PATCH 01/13] utils: merkletrie fix test on windows --- utils/merkletrie/filesystem/node_test.go | 10 ++++---- utils/merkletrie/index/node_test.go | 29 ++++++++++++++---------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/utils/merkletrie/filesystem/node_test.go b/utils/merkletrie/filesystem/node_test.go index bf1178a5b..6d764abc1 100644 --- a/utils/merkletrie/filesystem/node_test.go +++ b/utils/merkletrie/filesystem/node_test.go @@ -4,6 +4,7 @@ import ( "bytes" "io" "os" + "path/filepath" "testing" . "gopkg.in/check.v1" @@ -133,18 +134,19 @@ func (s *NoderSuite) TestDiffChangeModeNotRelevant(c *C) { } func (s *NoderSuite) TestDiffDirectory(c *C) { + dir := filepath.Join("qux", "bar") fsA := memfs.New() - fsA.MkdirAll("qux/bar", 0644) + fsA.MkdirAll(dir, 0644) fsB := memfs.New() - fsB.MkdirAll("qux/bar", 0644) + fsB.MkdirAll(dir, 0644) ch, err := merkletrie.DiffTree( NewRootNode(fsA, map[string]plumbing.Hash{ - "qux/bar": plumbing.NewHash("aa102815663d23f8b75a47e7a01965dcdc96468c"), + dir: plumbing.NewHash("aa102815663d23f8b75a47e7a01965dcdc96468c"), }), NewRootNode(fsB, map[string]plumbing.Hash{ - "qux/bar": plumbing.NewHash("19102815663d23f8b75a47e7a01965dcdc96468c"), + dir: plumbing.NewHash("19102815663d23f8b75a47e7a01965dcdc96468c"), }), IsEquals, ) diff --git a/utils/merkletrie/index/node_test.go b/utils/merkletrie/index/node_test.go index 00da8da5a..283ca749f 100644 --- a/utils/merkletrie/index/node_test.go +++ b/utils/merkletrie/index/node_test.go @@ -2,6 +2,7 @@ package index import ( "bytes" + "path/filepath" "testing" . "gopkg.in/check.v1" @@ -43,15 +44,17 @@ func (s *NoderSuite) TestDiff(c *C) { func (s *NoderSuite) TestDiffChange(c *C) { indexA := &index.Index{ - Entries: []*index.Entry{ - {Name: "bar/baz/bar", Hash: plumbing.NewHash("8ab686eafeb1f44702738c8b0f24f2567c36da6d")}, - }, + Entries: []*index.Entry{{ + Name: filepath.Join("bar", "baz", "bar"), + Hash: plumbing.NewHash("8ab686eafeb1f44702738c8b0f24f2567c36da6d"), + }}, } indexB := &index.Index{ - Entries: []*index.Entry{ - {Name: "bar/baz/foo", Hash: plumbing.NewHash("8ab686eafeb1f44702738c8b0f24f2567c36da6d")}, - }, + Entries: []*index.Entry{{ + Name: filepath.Join("bar", "baz", "foo"), + Hash: plumbing.NewHash("8ab686eafeb1f44702738c8b0f24f2567c36da6d"), + }}, } ch, err := merkletrie.DiffTree(NewRootNode(indexA), NewRootNode(indexB), isEquals) @@ -61,15 +64,17 @@ func (s *NoderSuite) TestDiffChange(c *C) { func (s *NoderSuite) TestDiffDir(c *C) { indexA := &index.Index{ - Entries: []*index.Entry{ - {Name: "foo", Hash: plumbing.NewHash("8ab686eafeb1f44702738c8b0f24f2567c36da6d")}, - }, + Entries: []*index.Entry{{ + Name: "foo", + Hash: plumbing.NewHash("8ab686eafeb1f44702738c8b0f24f2567c36da6d"), + }}, } indexB := &index.Index{ - Entries: []*index.Entry{ - {Name: "foo/bar", Hash: plumbing.NewHash("8ab686eafeb1f44702738c8b0f24f2567c36da6d")}, - }, + Entries: []*index.Entry{{ + Name: filepath.Join("foo", "bar"), + Hash: plumbing.NewHash("8ab686eafeb1f44702738c8b0f24f2567c36da6d"), + }}, } ch, err := merkletrie.DiffTree(NewRootNode(indexA), NewRootNode(indexB), isEquals) From 34d8d19bc7e5f1051bd09d9daa687c8f08eace6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Cuadros?= Date: Tue, 18 Jul 2017 23:25:08 +0200 Subject: [PATCH 02/13] storage: dotgit, close temp file before rename --- storage/filesystem/internal/dotgit/dotgit.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/storage/filesystem/internal/dotgit/dotgit.go b/storage/filesystem/internal/dotgit/dotgit.go index f3a2308f0..7950af95d 100644 --- a/storage/filesystem/internal/dotgit/dotgit.go +++ b/storage/filesystem/internal/dotgit/dotgit.go @@ -348,7 +348,6 @@ func (d *DotGit) rewritePackedRefsWithoutRef(name plumbing.ReferenceName) (err e return err } - defer ioutil.CheckClose(f, &err) // Creating the temp file in the same directory as the target file // improves our chances for rename operation to be atomic. @@ -357,10 +356,6 @@ func (d *DotGit) rewritePackedRefsWithoutRef(name plumbing.ReferenceName) (err e return err } - tmpPath := tmp.Name() - defer ioutil.CheckClose(tmp, &err) - defer d.fs.Remove(tmpPath) - s := bufio.NewScanner(f) found := false for s.Scan() { @@ -388,7 +383,15 @@ func (d *DotGit) rewritePackedRefsWithoutRef(name plumbing.ReferenceName) (err e return nil } - return d.fs.Rename(tmpPath, packedRefsPath) + if err := f.Close(); err != nil { + return err + } + + if err := tmp.Close(); err != nil { + return err + } + + return d.fs.Rename(tmp.Name(), packedRefsPath) } // process lines from a packed-refs file From f6fb4f559e1619c6b478d88c3706e72bc315e2ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Cuadros?= Date: Tue, 18 Jul 2017 23:41:46 +0200 Subject: [PATCH 03/13] plumbing: server, fix loader in windows --- plumbing/transport/server/loader.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plumbing/transport/server/loader.go b/plumbing/transport/server/loader.go index d4eccd41d..a7ed0dcc7 100644 --- a/plumbing/transport/server/loader.go +++ b/plumbing/transport/server/loader.go @@ -5,12 +5,14 @@ import ( "gopkg.in/src-d/go-git.v4/plumbing/transport" "gopkg.in/src-d/go-git.v4/storage/filesystem" + "fmt" + "gopkg.in/src-d/go-billy.v3" "gopkg.in/src-d/go-billy.v3/osfs" ) // DefaultLoader is a filesystem loader ignoring host and resolving paths to /. -var DefaultLoader = NewFilesystemLoader(osfs.New("/")) +var DefaultLoader = NewFilesystemLoader(osfs.New("")) // Loader loads repository's storer.Storer based on an optional host and a path. type Loader interface { @@ -40,6 +42,7 @@ func (l *fsLoader) Load(ep transport.Endpoint) (storer.Storer, error) { } if _, err := fs.Stat("config"); err != nil { + fmt.Println(ep.Path(), err) return nil, transport.ErrRepositoryNotFound } From ae80735ce2171aff4c44313b3c27eb5ddb595385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Cuadros?= Date: Tue, 18 Jul 2017 23:51:09 +0200 Subject: [PATCH 04/13] plumbing: transport git fix test on windows --- plumbing/transport/git/receive_pack_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plumbing/transport/git/receive_pack_test.go b/plumbing/transport/git/receive_pack_test.go index 326ef1b74..f9afede2a 100644 --- a/plumbing/transport/git/receive_pack_test.go +++ b/plumbing/transport/git/receive_pack_test.go @@ -99,9 +99,11 @@ func (s *ReceivePackSuite) SetUpTest(c *C) { } func (s *ReceivePackSuite) TearDownTest(c *C) { - err := s.daemon.Process.Signal(os.Interrupt) + err := s.daemon.Process.Signal(os.Kill) c.Assert(err, IsNil) + _ = s.daemon.Wait() + err = os.RemoveAll(s.base) c.Assert(err, IsNil) } From 1675edbff5055189d958244b6e0ded9f5d37fe91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Cuadros?= Date: Wed, 19 Jul 2017 00:09:39 +0200 Subject: [PATCH 05/13] worktree: fix file system info in windows --- worktree_linux.go | 1 - worktree_windows.go | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 worktree_windows.go diff --git a/worktree_linux.go b/worktree_linux.go index 7209d7d2c..a33cd2fb9 100644 --- a/worktree_linux.go +++ b/worktree_linux.go @@ -12,7 +12,6 @@ import ( func init() { fillSystemInfo = func(e *index.Entry, sys interface{}) { if os, ok := sys.(*syscall.Stat_t); ok { - e.CreatedAt = time.Unix(int64(os.Ctim.Sec), int64(os.Ctim.Nsec)) e.Dev = uint32(os.Dev) e.Inode = uint32(os.Ino) diff --git a/worktree_windows.go b/worktree_windows.go new file mode 100644 index 000000000..d59448ef8 --- /dev/null +++ b/worktree_windows.go @@ -0,0 +1,20 @@ +// +build windows + +package git + +import ( + "syscall" + "time" + + "gopkg.in/src-d/go-git.v4/plumbing/format/index" +) + +func init() { + fillSystemInfo = func(e *index.Entry, sys interface{}) { + if os, ok := sys.(*syscall.Win32FileAttributeData); ok { + seconds := os.CreationTime.Nanoseconds() / 1000000000 + nanoseconds := os.CreationTime.Nanoseconds() - seconds*1000000000 + e.CreatedAt = time.Unix(seconds, nanoseconds) + } + } +} From 07305b25d9d310a3aa92bd636068809f08ab00a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Cuadros?= Date: Wed, 19 Jul 2017 00:22:47 +0200 Subject: [PATCH 06/13] worktree: close .gitmodule files --- worktree.go | 1 + 1 file changed, 1 insertion(+) diff --git a/worktree.go b/worktree.go index ae1ab28b9..63eb25b6f 100644 --- a/worktree.go +++ b/worktree.go @@ -498,6 +498,7 @@ func (w *Worktree) readGitmodulesFile() (*config.Modules, error) { return nil, err } + defer f.Close() input, err := stdioutil.ReadAll(f) if err != nil { return nil, err From e92973bea8d9a8ee5c06777ce34a1363ea018371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Cuadros?= Date: Wed, 19 Jul 2017 00:34:44 +0200 Subject: [PATCH 07/13] worktree: submodules, missing err validation on load config --- worktree.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/worktree.go b/worktree.go index 63eb25b6f..9c840ea7c 100644 --- a/worktree.go +++ b/worktree.go @@ -467,6 +467,10 @@ func (w *Worktree) Submodules() (Submodules, error) { } c, err := w.r.Config() + if err != nil { + return nil, err + } + for _, s := range m.Submodules { l = append(l, w.newSubmodule(s, c.Submodules[s.Name])) } From 11f75e288e5cd4343e5a48cea30f9480c5828059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Cuadros?= Date: Wed, 19 Jul 2017 00:50:27 +0200 Subject: [PATCH 08/13] worktree: commit, use path package instead of filepath --- worktree_commit.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/worktree_commit.go b/worktree_commit.go index a34224084..02a5d03c6 100644 --- a/worktree_commit.go +++ b/worktree_commit.go @@ -1,7 +1,7 @@ package git import ( - "path/filepath" + "path" "strings" "gopkg.in/src-d/go-git.v4/plumbing" @@ -128,36 +128,36 @@ func (h *buildTreeHelper) BuildTree(idx *index.Index) (plumbing.Hash, error) { } func (h *buildTreeHelper) commitIndexEntry(e *index.Entry) error { - parts := strings.Split(e.Name, string(filepath.Separator)) + parts := strings.Split(e.Name, "/") - var path string + var fullpath string for _, part := range parts { - parent := path - path = filepath.Join(path, part) + parent := fullpath + fullpath = path.Join(fullpath, part) - h.doBuildTree(e, parent, path) + h.doBuildTree(e, parent, fullpath) } return nil } -func (h *buildTreeHelper) doBuildTree(e *index.Entry, parent, path string) { - if _, ok := h.trees[path]; ok { +func (h *buildTreeHelper) doBuildTree(e *index.Entry, parent, fullpath string) { + if _, ok := h.trees[fullpath]; ok { return } - if _, ok := h.entries[path]; ok { + if _, ok := h.entries[fullpath]; ok { return } - te := object.TreeEntry{Name: filepath.Base(path)} + te := object.TreeEntry{Name: path.Base(fullpath)} - if path == e.Name { + if fullpath == e.Name { te.Mode = e.Mode te.Hash = e.Hash } else { te.Mode = filemode.Dir - h.trees[path] = &object.Tree{} + h.trees[fullpath] = &object.Tree{} } h.trees[parent].Entries = append(h.trees[parent].Entries, te) @@ -169,7 +169,7 @@ func (h *buildTreeHelper) copyTreeToStorageRecursive(parent string, t *object.Tr continue } - path := filepath.Join(parent, e.Name) + path := path.Join(parent, e.Name) var err error e.Hash, err = h.copyTreeToStorageRecursive(path, h.trees[path]) From 330a45a58eef95095d9fb7343f8daeb8c408e4f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Cuadros?= Date: Wed, 19 Jul 2017 01:02:11 +0200 Subject: [PATCH 09/13] worktree: commit, use path package instead of filepath --- plumbing/format/config/decoder.go | 4 +++- plumbing/format/config/encoder.go | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/plumbing/format/config/decoder.go b/plumbing/format/config/decoder.go index 0f02ce193..c6ad3d8eb 100644 --- a/plumbing/format/config/decoder.go +++ b/plumbing/format/config/decoder.go @@ -2,6 +2,7 @@ package config import ( "io" + "os" "github.com/src-d/gcfg" ) @@ -33,5 +34,6 @@ func (d *Decoder) Decode(config *Config) error { config.AddOption(s, ss, k, v) return nil } - return gcfg.ReadWithCallback(d, cb) + + return gcfg.ReadWithCallback(io.TeeReader(d, os.Stdout), cb) } diff --git a/plumbing/format/config/encoder.go b/plumbing/format/config/encoder.go index 88bdf6505..76d73fd5f 100644 --- a/plumbing/format/config/encoder.go +++ b/plumbing/format/config/encoder.go @@ -3,6 +3,7 @@ package config import ( "fmt" "io" + "strings" ) // An Encoder writes config files to an output stream. @@ -61,7 +62,12 @@ func (e *Encoder) encodeSubsection(sectionName string, s *Subsection) error { func (e *Encoder) encodeOptions(opts Options) error { for _, o := range opts { - if err := e.printf("\t%s = %s\n", o.Key, o.Value); err != nil { + pattern := "\t%s = %s\n" + if strings.Index(o.Value, "\\") == -1 { + pattern = "\t%s = %q\n" + } + + if err := e.printf(pattern, o.Key, o.Value); err != nil { return err } } From acb1a5f7a47e4759bbe1592a0a58571bda6289e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Cuadros?= Date: Wed, 19 Jul 2017 01:08:41 +0200 Subject: [PATCH 10/13] plumbing: format config, escape back slash --- plumbing/format/config/decoder.go | 4 +--- plumbing/format/config/encoder.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/plumbing/format/config/decoder.go b/plumbing/format/config/decoder.go index c6ad3d8eb..0f02ce193 100644 --- a/plumbing/format/config/decoder.go +++ b/plumbing/format/config/decoder.go @@ -2,7 +2,6 @@ package config import ( "io" - "os" "github.com/src-d/gcfg" ) @@ -34,6 +33,5 @@ func (d *Decoder) Decode(config *Config) error { config.AddOption(s, ss, k, v) return nil } - - return gcfg.ReadWithCallback(io.TeeReader(d, os.Stdout), cb) + return gcfg.ReadWithCallback(d, cb) } diff --git a/plumbing/format/config/encoder.go b/plumbing/format/config/encoder.go index 76d73fd5f..6d17a5a61 100644 --- a/plumbing/format/config/encoder.go +++ b/plumbing/format/config/encoder.go @@ -63,7 +63,7 @@ func (e *Encoder) encodeSubsection(sectionName string, s *Subsection) error { func (e *Encoder) encodeOptions(opts Options) error { for _, o := range opts { pattern := "\t%s = %s\n" - if strings.Index(o.Value, "\\") == -1 { + if strings.Index(o.Value, "\\") != -1 { pattern = "\t%s = %q\n" } From 8210c82bcd6ff7f7c66b8f5fc1be00307fe59c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Cuadros?= Date: Wed, 19 Jul 2017 01:26:16 +0200 Subject: [PATCH 11/13] utils: merkletrie filesystem based on path, and not in filepath --- utils/merkletrie/filesystem/node.go | 6 +++--- utils/merkletrie/filesystem/node_test.go | 4 ++-- utils/merkletrie/index/node.go | 18 +++++++++--------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/utils/merkletrie/filesystem/node.go b/utils/merkletrie/filesystem/node.go index a8f3b86d7..f763e083b 100644 --- a/utils/merkletrie/filesystem/node.go +++ b/utils/merkletrie/filesystem/node.go @@ -3,7 +3,7 @@ package filesystem import ( "io" "os" - "path/filepath" + "path" "gopkg.in/src-d/go-billy.v3" "gopkg.in/src-d/go-git.v4/plumbing" @@ -53,7 +53,7 @@ func (n *node) Hash() []byte { } func (n *node) Name() string { - return filepath.Base(n.path) + return path.Base(n.path) } func (n *node) IsDir() bool { @@ -107,7 +107,7 @@ func (n *node) calculateChildren() error { } func (n *node) newChildNode(file os.FileInfo) (*node, error) { - path := filepath.Join(n.path, file.Name()) + path := path.Join(n.path, file.Name()) hash, err := n.calculateHash(path, file) if err != nil { diff --git a/utils/merkletrie/filesystem/node_test.go b/utils/merkletrie/filesystem/node_test.go index 6d764abc1..42dd82e3a 100644 --- a/utils/merkletrie/filesystem/node_test.go +++ b/utils/merkletrie/filesystem/node_test.go @@ -4,7 +4,7 @@ import ( "bytes" "io" "os" - "path/filepath" + "path" "testing" . "gopkg.in/check.v1" @@ -134,7 +134,7 @@ func (s *NoderSuite) TestDiffChangeModeNotRelevant(c *C) { } func (s *NoderSuite) TestDiffDirectory(c *C) { - dir := filepath.Join("qux", "bar") + dir := path.Join("qux", "bar") fsA := memfs.New() fsA.MkdirAll(dir, 0644) diff --git a/utils/merkletrie/index/node.go b/utils/merkletrie/index/node.go index 859c09721..962262248 100644 --- a/utils/merkletrie/index/node.go +++ b/utils/merkletrie/index/node.go @@ -1,7 +1,7 @@ package index import ( - "path/filepath" + "path" "strings" "gopkg.in/src-d/go-git.v4/plumbing/format/index" @@ -28,19 +28,19 @@ func NewRootNode(idx *index.Index) noder.Noder { m := map[string]*node{rootNode: {isDir: true}} for _, e := range idx.Entries { - parts := strings.Split(e.Name, string(filepath.Separator)) + parts := strings.Split(e.Name, string("/")) - var path string + var fullpath string for _, part := range parts { - parent := path - path = filepath.Join(path, part) + parent := fullpath + fullpath = path.Join(fullpath, part) - if _, ok := m[path]; ok { + if _, ok := m[fullpath]; ok { continue } - n := &node{path: path} - if path == e.Name { + n := &node{path: fullpath} + if fullpath == e.Name { n.entry = e } else { n.isDir = true @@ -74,7 +74,7 @@ func (n *node) Hash() []byte { } func (n *node) Name() string { - return filepath.Base(n.path) + return path.Base(n.path) } func (n *node) IsDir() bool { From 6c75af73d8229be684703bf2210b7dc9587d2846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Cuadros?= Date: Wed, 19 Jul 2017 22:04:18 +0200 Subject: [PATCH 12/13] storage: dotgit, fix test not closing files --- storage/filesystem/internal/dotgit/dotgit.go | 1 + storage/filesystem/internal/dotgit/dotgit_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/storage/filesystem/internal/dotgit/dotgit.go b/storage/filesystem/internal/dotgit/dotgit.go index 7950af95d..b672d4bfa 100644 --- a/storage/filesystem/internal/dotgit/dotgit.go +++ b/storage/filesystem/internal/dotgit/dotgit.go @@ -384,6 +384,7 @@ func (d *DotGit) rewritePackedRefsWithoutRef(name plumbing.ReferenceName) (err e } if err := f.Close(); err != nil { + ioutil.CheckClose(tmp, &err) return err } diff --git a/storage/filesystem/internal/dotgit/dotgit_test.go b/storage/filesystem/internal/dotgit/dotgit_test.go index d4cda0e79..d935ec58c 100644 --- a/storage/filesystem/internal/dotgit/dotgit_test.go +++ b/storage/filesystem/internal/dotgit/dotgit_test.go @@ -373,6 +373,7 @@ func (s *SuiteDotGit) TestObjectPackIdx(c *C) { idx, err := dir.ObjectPackIdx(f.PackfileHash) c.Assert(err, IsNil) c.Assert(filepath.Ext(idx.Name()), Equals, ".idx") + c.Assert(idx.Close(), IsNil) } func (s *SuiteDotGit) TestObjectPackNotFound(c *C) { From 4a7e7cddc0e4f88085b263693c87635254de7f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Cuadros?= Date: Wed, 19 Jul 2017 22:04:23 +0200 Subject: [PATCH 13/13] plumbing: transport server, remove letfover --- plumbing/transport/server/loader.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/plumbing/transport/server/loader.go b/plumbing/transport/server/loader.go index a7ed0dcc7..028ead44b 100644 --- a/plumbing/transport/server/loader.go +++ b/plumbing/transport/server/loader.go @@ -5,8 +5,6 @@ import ( "gopkg.in/src-d/go-git.v4/plumbing/transport" "gopkg.in/src-d/go-git.v4/storage/filesystem" - "fmt" - "gopkg.in/src-d/go-billy.v3" "gopkg.in/src-d/go-billy.v3/osfs" ) @@ -42,7 +40,6 @@ func (l *fsLoader) Load(ep transport.Endpoint) (storer.Storer, error) { } if _, err := fs.Stat("config"); err != nil { - fmt.Println(ep.Path(), err) return nil, transport.ErrRepositoryNotFound }