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 /tree_test.go | |
parent | 5b13c1a2e55cb442484d9c7b45389f422b110eec (diff) | |
download | go-git-2ed3474ab8e52c98a87e390d5128d45d693a115d.tar.gz |
ForEach review and Commit.Tree err return
Diffstat (limited to 'tree_test.go')
-rw-r--r-- | tree_test.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tree_test.go b/tree_test.go index 92ae156..e27d4ad 100644 --- a/tree_test.go +++ b/tree_test.go @@ -188,7 +188,9 @@ func (s *SuiteTree) TestFile(c *C) { commit, err := s.repos[t.repo].Commit(core.NewHash(t.commit)) c.Assert(err, IsNil, Commentf("subtest %d: %v (%s)", i, err, t.commit)) - tree := commit.Tree() + tree, err := commit.Tree() + c.Assert(err, IsNil) + file, err := tree.File(t.path) found := err == nil @@ -260,7 +262,9 @@ func (s *SuiteTree) TestFiles(c *C) { commit, err := s.repos[t.repo].Commit(core.NewHash(t.commit)) c.Assert(err, IsNil, Commentf("subtest %d: %v (%s)", i, err, t.commit)) - tree := commit.Tree() + tree, err := commit.Tree() + c.Assert(err, IsNil) + var output []string iter := tree.Files() defer iter.Close() |