diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-02-21 16:03:39 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-02-21 16:03:39 +0100 |
commit | ed288b30de1ac3dcb3ce675c4b9af89eb4e6fcba (patch) | |
tree | 6eb908b839d6c225d95691d91e3d5ef5220f54c1 /plumbing/object | |
parent | d6a6decd1be0515faf36256ce06c58c7d662bbd0 (diff) | |
download | go-git-ed288b30de1ac3dcb3ce675c4b9af89eb4e6fcba.tar.gz |
documentation and API improvements
Diffstat (limited to 'plumbing/object')
-rw-r--r-- | plumbing/object/file_test.go | 4 | ||||
-rw-r--r-- | plumbing/object/tree_test.go | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/plumbing/object/file_test.go b/plumbing/object/file_test.go index 426fa8f..ff01c9f 100644 --- a/plumbing/object/file_test.go +++ b/plumbing/object/file_test.go @@ -249,7 +249,9 @@ func (s *FileSuite) TestFileIter(c *C) { } func (s *FileSuite) TestFileIterSubmodule(c *C) { - st, err := filesystem.NewStorage(fixtures.ByTag("submodule").One().DotGit()) + dotgit := fixtures.ByURL("https://github.com/git-fixtures/submodule.git").One().DotGit() + st, err := filesystem.NewStorage(dotgit) + c.Assert(err, IsNil) hash := plumbing.NewHash("a692ec699bff9117c1ed91752afbb7d9d272ebef") diff --git a/plumbing/object/tree_test.go b/plumbing/object/tree_test.go index 0ddf391..8ea31bb 100644 --- a/plumbing/object/tree_test.go +++ b/plumbing/object/tree_test.go @@ -266,7 +266,8 @@ func (s *TreeSuite) TestTreeWalkerNextNonRecursive(c *C) { } func (s *TreeSuite) TestTreeWalkerNextSubmodule(c *C) { - st, err := filesystem.NewStorage(fixtures.ByTag("submodule").One().DotGit()) + dotgit := fixtures.ByURL("https://github.com/git-fixtures/submodule.git").One().DotGit() + st, err := filesystem.NewStorage(dotgit) c.Assert(err, IsNil) hash := plumbing.NewHash("a692ec699bff9117c1ed91752afbb7d9d272ebef") @@ -284,6 +285,8 @@ func (s *TreeSuite) TestTreeWalkerNextSubmodule(c *C) { var count int walker := NewTreeWalker(tree, true) + defer walker.Close() + for { name, entry, err := walker.Next() if err == io.EOF { |