diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2020-05-24 14:34:30 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2020-05-24 14:34:30 +0200 |
commit | d13825550a301d8e087122bbec87a2698424af27 (patch) | |
tree | fb9d3fdcde4981d89b32e2a3c98deddfc31d0527 /plumbing/object/tree_test.go | |
parent | a107e18b9327e9a5da7a44b3a872b2f43598dfb4 (diff) | |
parent | 6d8103df45ce09ffd5323b4ef46d26440400a54f (diff) | |
download | go-git-d13825550a301d8e087122bbec87a2698424af27.tar.gz |
Merge branch 'master' of github.com:go-git/go-git into scope-config
Diffstat (limited to 'plumbing/object/tree_test.go')
-rw-r--r-- | plumbing/object/tree_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plumbing/object/tree_test.go b/plumbing/object/tree_test.go index 474bb6a..d9dad47 100644 --- a/plumbing/object/tree_test.go +++ b/plumbing/object/tree_test.go @@ -377,6 +377,17 @@ func (s *TreeSuite) TestTreeWalkerNextNonRecursive(c *C) { c.Assert(count, Equals, 8) } +func (s *TreeSuite) TestPatchContext_ToNil(c *C) { + commit := s.commit(c, plumbing.NewHash("6ecf0ef2c2dffb796033e5a02219af86ec6584e5")) + tree, err := commit.Tree() + c.Assert(err, IsNil) + + patch, err := tree.PatchContext(context.Background(), nil) + c.Assert(err, IsNil) + + c.Assert(len(patch.String()), Equals, 242971) +} + func (s *TreeSuite) TestTreeWalkerNextSubmodule(c *C) { dotgit := fixtures.ByURL("https://github.com/git-fixtures/submodule.git").One().DotGit() st := filesystem.NewStorage(dotgit, cache.NewObjectLRUDefault()) |