aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/blob_test.go
diff options
context:
space:
mode:
authorMiguel Molina <miguel@erizocosmi.co>2018-08-09 12:36:37 +0200
committerMiguel Molina <miguel@erizocosmi.co>2018-08-09 12:36:37 +0200
commit038cf238e6250094c7aeb387fd7ea92438719699 (patch)
tree2d2f4a1cbfecd4e5c70b49540390374cadd248f8 /plumbing/object/blob_test.go
parent65dc4f9f192cc013e4765fb1162ce6ebda16573d (diff)
downloadgo-git-038cf238e6250094c7aeb387fd7ea92438719699.tar.gz
storage: filesystem, close Packfile after iterating objects
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
Diffstat (limited to 'plumbing/object/blob_test.go')
-rw-r--r--plumbing/object/blob_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/plumbing/object/blob_test.go b/plumbing/object/blob_test.go
index 181436d..e08ff25 100644
--- a/plumbing/object/blob_test.go
+++ b/plumbing/object/blob_test.go
@@ -6,6 +6,7 @@ import (
"io/ioutil"
"gopkg.in/src-d/go-git.v4/plumbing"
+ "gopkg.in/src-d/go-git.v4/plumbing/format/packfile"
. "gopkg.in/check.v1"
)
@@ -70,6 +71,12 @@ func (s *BlobsSuite) TestBlobIter(c *C) {
blobs := []*Blob{}
iter.ForEach(func(b *Blob) error {
+ var err error
+ b.obj, err = packfile.MemoryObjectFromDisk(b.obj)
+ if err != nil {
+ return err
+ }
+
blobs = append(blobs, b)
return nil
})