From aa818a3f77e6ff06765cf8c246f8708df3d190a7 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Tue, 11 Apr 2017 20:03:00 +0200 Subject: plumbing: object, public Tree.FindEntry and minor diff changes --- plumbing/object/tree_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plumbing/object/tree_test.go') 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 -- cgit