diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2019-04-02 20:31:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-02 20:31:40 +0200 |
commit | 923642abf033cd40b5f3aa5205e517d1feb32f4d (patch) | |
tree | a53152fc01d41daaaaf88e1a8c9e1baaa157cfc3 /plumbing/object/tree_test.go | |
parent | 6e931e4fdefa202c76242109453447182ae16444 (diff) | |
parent | 579399e38a80422e47cd21023ee60259be975bf3 (diff) | |
download | go-git-923642abf033cd40b5f3aa5205e517d1feb32f4d.tar.gz |
Merge pull request #1095 from niukuo/panic_find_entry
fix panic in object.Tree.FindEntry
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. |