From 56adb5be3ad26a0045ea6c6a6d24dafdff15ba1c Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Wed, 7 Sep 2016 02:04:43 +0200 Subject: format: packfile new interface --- blame_test.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'blame_test.go') diff --git a/blame_test.go b/blame_test.go index a8f7ae1..c4cdc85 100644 --- a/blame_test.go +++ b/blame_test.go @@ -1,8 +1,6 @@ package git import ( - "bytes" - "io/ioutil" "os" "gopkg.in/src-d/go-git.v4/core" @@ -26,15 +24,11 @@ func (s *BlameCommon) SetUpSuite(c *C) { f, err := os.Open(fixRepo.packfile) c.Assert(err, IsNil) - data, err := ioutil.ReadAll(f) - c.Assert(err, IsNil) - - stream := packfile.NewStream(bytes.NewReader(data)) + stream := packfile.NewScanner(f) d := packfile.NewDecoder(stream, r.s.ObjectStorage()) - err = d.Decode() + _, err = d.Decode() c.Assert(err, IsNil) - c.Assert(f.Close(), IsNil) s.repos[fixRepo.url] = r -- cgit