aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-08-14 18:21:10 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-08-14 18:21:10 +0200
commitf6fe29c80d11662a169806dcf413ecdedcb28fa3 (patch)
tree9958034c27521f720f8c5d83c12120ada196f48a /utils
parent91bf16b2336e6f80f0742be729582fe5fbbada83 (diff)
downloadgo-git-f6fe29c80d11662a169806dcf413ecdedcb28fa3.tar.gz
core: Storage, removing err returning *Storages
Diffstat (limited to 'utils')
-rw-r--r--utils/difftree/difftree_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/difftree/difftree_test.go b/utils/difftree/difftree_test.go
index b13c228..9f874e4 100644
--- a/utils/difftree/difftree_test.go
+++ b/utils/difftree/difftree_test.go
@@ -8,6 +8,7 @@ import (
"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/core"
"gopkg.in/src-d/go-git.v4/formats/packfile"
+ "gopkg.in/src-d/go-git.v4/storage/memory"
. "gopkg.in/check.v1"
)
@@ -43,7 +44,8 @@ func (s *DiffTreeSuite) SetUpSuite(c *C) {
s.repos = make(map[string]*git.Repository, 0)
for _, fixRepo := range fixtureRepos {
- s.repos[fixRepo.url], _ = git.NewMemoryRepository()
+ store := memory.NewStorage()
+ s.repos[fixRepo.url], _ = git.NewRepository(store)
f, err := os.Open(fixRepo.packfile)
c.Assert(err, IsNil)
@@ -51,8 +53,7 @@ func (s *DiffTreeSuite) SetUpSuite(c *C) {
r := packfile.NewSeekable(f)
d := packfile.NewDecoder(r)
- os, _ := s.repos[fixRepo.url].Storage.ObjectStorage()
- err = d.Decode(os)
+ err = d.Decode(store.ObjectStorage())
c.Assert(err, IsNil)
c.Assert(f.Close(), IsNil)