|
4 | 4 | "io" |
5 | 5 |
|
6 | 6 | "gopkg.in/src-d/go-git.v4/plumbing" |
| 7 | + "gopkg.in/src-d/go-git.v4/plumbing/cache" |
7 | 8 | "gopkg.in/src-d/go-git.v4/plumbing/filemode" |
8 | 9 | "gopkg.in/src-d/go-git.v4/plumbing/storer" |
9 | 10 | "gopkg.in/src-d/go-git.v4/storage/filesystem" |
@@ -44,8 +45,7 @@ var fileIterTests = []struct { |
44 | 45 | func (s *FileSuite) TestIter(c *C) { |
45 | 46 | for i, t := range fileIterTests { |
46 | 47 | f := fixtures.ByURL(t.repo).One() |
47 | | - sto, err := filesystem.NewStorage(f.DotGit()) |
48 | | - c.Assert(err, IsNil) |
| 48 | + sto := filesystem.NewStorage(f.DotGit(), cache.NewObjectLRUDefault()) |
49 | 49 |
|
50 | 50 | h := plumbing.NewHash(t.commit) |
51 | 51 | commit, err := GetCommit(sto, h) |
@@ -106,8 +106,7 @@ hs_err_pid* |
106 | 106 | func (s *FileSuite) TestContents(c *C) { |
107 | 107 | for i, t := range contentsTests { |
108 | 108 | f := fixtures.ByURL(t.repo).One() |
109 | | - sto, err := filesystem.NewStorage(f.DotGit()) |
110 | | - c.Assert(err, IsNil) |
| 109 | + sto := filesystem.NewStorage(f.DotGit(), cache.NewObjectLRUDefault()) |
111 | 110 |
|
112 | 111 | h := plumbing.NewHash(t.commit) |
113 | 112 | commit, err := GetCommit(sto, h) |
@@ -160,8 +159,7 @@ var linesTests = []struct { |
160 | 159 | func (s *FileSuite) TestLines(c *C) { |
161 | 160 | for i, t := range linesTests { |
162 | 161 | f := fixtures.ByURL(t.repo).One() |
163 | | - sto, err := filesystem.NewStorage(f.DotGit()) |
164 | | - c.Assert(err, IsNil) |
| 162 | + sto := filesystem.NewStorage(f.DotGit(), cache.NewObjectLRUDefault()) |
165 | 163 |
|
166 | 164 | h := plumbing.NewHash(t.commit) |
167 | 165 | commit, err := GetCommit(sto, h) |
@@ -195,8 +193,7 @@ var ignoreEmptyDirEntriesTests = []struct { |
195 | 193 | func (s *FileSuite) TestIgnoreEmptyDirEntries(c *C) { |
196 | 194 | for i, t := range ignoreEmptyDirEntriesTests { |
197 | 195 | f := fixtures.ByURL(t.repo).One() |
198 | | - sto, err := filesystem.NewStorage(f.DotGit()) |
199 | | - c.Assert(err, IsNil) |
| 196 | + sto := filesystem.NewStorage(f.DotGit(), cache.NewObjectLRUDefault()) |
200 | 197 |
|
201 | 198 | h := plumbing.NewHash(t.commit) |
202 | 199 | commit, err := GetCommit(sto, h) |
@@ -251,9 +248,7 @@ func (s *FileSuite) TestFileIter(c *C) { |
251 | 248 |
|
252 | 249 | func (s *FileSuite) TestFileIterSubmodule(c *C) { |
253 | 250 | dotgit := fixtures.ByURL("https://github.com/git-fixtures/submodule.git").One().DotGit() |
254 | | - st, err := filesystem.NewStorage(dotgit) |
255 | | - |
256 | | - c.Assert(err, IsNil) |
| 251 | + st := filesystem.NewStorage(dotgit, cache.NewObjectLRUDefault()) |
257 | 252 |
|
258 | 253 | hash := plumbing.NewHash("b685400c1f9316f350965a5993d350bc746b0bf4") |
259 | 254 | commit, err := GetCommit(st, hash) |
|
0 commit comments