diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-04-11 20:03:00 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-04-11 04:38:46 +0200 |
commit | aa818a3f77e6ff06765cf8c246f8708df3d190a7 (patch) | |
tree | 302a5671cfa192f5417ffd5dd5c59447e71e2cb2 /plumbing/object/tree_test.go | |
parent | af4f25df56c74b05ae04cc6f2fcac38db1130249 (diff) | |
download | go-git-aa818a3f77e6ff06765cf8c246f8708df3d190a7.tar.gz |
plumbing: object, public Tree.FindEntry and minor diff changes
Diffstat (limited to 'plumbing/object/tree_test.go')
-rw-r--r-- | plumbing/object/tree_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plumbing/object/tree_test.go b/plumbing/object/tree_test.go index cf5ad5f..aa86517 100644 --- a/plumbing/object/tree_test.go +++ b/plumbing/object/tree_test.go @@ -107,6 +107,12 @@ func (s *TreeSuite) TestFiles(c *C) { c.Assert(count, Equals, 9) } +func (s *TreeSuite) TestFindEntry(c *C) { + e, err := s.Tree.FindEntry("vendor/foo.go") + c.Assert(err, IsNil) + c.Assert(e.Name, Equals, "foo.go") +} + // This plumbing.EncodedObject implementation has a reader that only returns 6 // bytes at a time, this should simulate the conditions when a read // returns less bytes than asked, for example when reading a hash which |