aboutsummaryrefslogtreecommitdiffstats
path: root/tree_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-08-22 03:29:05 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-08-22 03:29:05 +0200
commit2ed3474ab8e52c98a87e390d5128d45d693a115d (patch)
tree6f136c2508c22f6b5146ef08c49821a45a5f2357 /tree_test.go
parent5b13c1a2e55cb442484d9c7b45389f422b110eec (diff)
downloadgo-git-2ed3474ab8e52c98a87e390d5128d45d693a115d.tar.gz
ForEach review and Commit.Tree err return
Diffstat (limited to 'tree_test.go')
-rw-r--r--tree_test.go8
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()