diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-22 03:29:05 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-22 03:29:05 +0200 |
commit | 2ed3474ab8e52c98a87e390d5128d45d693a115d (patch) | |
tree | 6f136c2508c22f6b5146ef08c49821a45a5f2357 /objects_test.go | |
parent | 5b13c1a2e55cb442484d9c7b45389f422b110eec (diff) | |
download | go-git-2ed3474ab8e52c98a87e390d5128d45d693a115d.tar.gz |
ForEach review and Commit.Tree err return
Diffstat (limited to 'objects_test.go')
-rw-r--r-- | objects_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/objects_test.go b/objects_test.go index 7d86b1c..b36bb85 100644 --- a/objects_test.go +++ b/objects_test.go @@ -31,7 +31,10 @@ func (s *ObjectsSuite) TestNewCommit(c *C) { c.Assert(commit.Hash, Equals, commit.ID()) c.Assert(commit.Hash.String(), Equals, "a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69") - c.Assert(commit.Tree().Hash.String(), Equals, "c2d30fa8ef288618f65f6eed6e168e0d514886f4") + + tree, err := commit.Tree() + c.Assert(err, IsNil) + c.Assert(tree.Hash.String(), Equals, "c2d30fa8ef288618f65f6eed6e168e0d514886f4") parents := commit.Parents() parentCommit, err := parents.Next() |