aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/difftree_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/object/difftree_test.go')
-rw-r--r--plumbing/object/difftree_test.go16
1 files changed, 4 insertions, 12 deletions
diff --git a/plumbing/object/difftree_test.go b/plumbing/object/difftree_test.go
index 40af8f2..ff9ecbc 100644
--- a/plumbing/object/difftree_test.go
+++ b/plumbing/object/difftree_test.go
@@ -45,25 +45,17 @@ func (s *DiffTreeSuite) storageFromPackfile(f *fixtures.Fixture) storer.EncodedO
return sto
}
- sto = memory.NewStorage()
+ storer := memory.NewStorage()
pf := f.Packfile()
-
defer pf.Close()
- n := packfile.NewScanner(pf)
- d, err := packfile.NewDecoder(n, sto)
- if err != nil {
- panic(err)
- }
-
- _, err = d.Decode()
- if err != nil {
+ if err := packfile.UpdateObjectStorage(storer, pf); err != nil {
panic(err)
}
- s.cache[f.URL] = sto
- return sto
+ s.cache[f.URL] = storer
+ return storer
}
var _ = Suite(&DiffTreeSuite{})