diff options
author | niukuo <niukuo@gmail.com> | 2019-03-27 23:32:01 +0800 |
---|---|---|
committer | niukuo <niukuo@gmail.com> | 2019-03-27 23:32:01 +0800 |
commit | 579399e38a80422e47cd21023ee60259be975bf3 (patch) | |
tree | 52ae988e4a33c3b031a719ef80f6fc8889831bf6 /plumbing/object/tree_test.go | |
parent | def8f2530687eb024fc9a3f4ccbb33a422cdd16f (diff) | |
download | go-git-579399e38a80422e47cd21023ee60259be975bf3.tar.gz |
fix panic in object.Tree.FindEntry
Signed-off-by: niukuo <niukuo@gmail.com>
Diffstat (limited to 'plumbing/object/tree_test.go')
-rw-r--r-- | plumbing/object/tree_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plumbing/object/tree_test.go b/plumbing/object/tree_test.go index 889c63a..b408595 100644 --- a/plumbing/object/tree_test.go +++ b/plumbing/object/tree_test.go @@ -125,6 +125,9 @@ func (s *TreeSuite) TestFindEntryNotFound(c *C) { e, err := s.Tree.FindEntry("not-found") c.Assert(e, IsNil) c.Assert(err, Equals, ErrEntryNotFound) + e, err = s.Tree.FindEntry("not-found/not-found/not-found") + c.Assert(e, IsNil) + c.Assert(err, Equals, ErrDirectoryNotFound) } // Overrides returned plumbing.EncodedObject for given hash. |