aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/revlist
diff options
context:
space:
mode:
authorkuba-- <kuba@sourced.tech>2018-09-07 09:27:35 +0200
committerkuba-- <kuba@sourced.tech>2018-09-07 13:48:18 +0200
commit8f6b3127c1ff7661113fff2662416c328971a285 (patch)
tree3b127a5edf22140c5a710612cb5e4fcc3879664a /plumbing/revlist
parentd3cec13ac0b195bfb897ed038a08b5130ab9969e (diff)
downloadgo-git-8f6b3127c1ff7661113fff2662416c328971a285.tar.gz
Expose Storage cache.
Signed-off-by: kuba-- <kuba@sourced.tech>
Diffstat (limited to 'plumbing/revlist')
-rw-r--r--plumbing/revlist/revlist_test.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/plumbing/revlist/revlist_test.go b/plumbing/revlist/revlist_test.go
index 55d9bca..dea1c73 100644
--- a/plumbing/revlist/revlist_test.go
+++ b/plumbing/revlist/revlist_test.go
@@ -4,6 +4,7 @@ import (
"testing"
"gopkg.in/src-d/go-git.v4/plumbing"
+ "gopkg.in/src-d/go-git.v4/plumbing/cache"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"gopkg.in/src-d/go-git.v4/plumbing/storer"
"gopkg.in/src-d/go-git.v4/storage/filesystem"
@@ -51,8 +52,7 @@ const (
func (s *RevListSuite) SetUpTest(c *C) {
s.Suite.SetUpSuite(c)
- sto, err := filesystem.NewStorage(fixtures.Basic().One().DotGit())
- c.Assert(err, IsNil)
+ sto := filesystem.NewStorage(fixtures.Basic().One().DotGit(), cache.NewObjectLRUDefault())
s.Storer = sto
}
@@ -67,8 +67,7 @@ func (s *RevListSuite) TestRevListObjects_Submodules(c *C) {
"6ecf0ef2c2dffb796033e5a02219af86ec6584e5": true,
}
- sto, err := filesystem.NewStorage(fixtures.ByTag("submodule").One().DotGit())
- c.Assert(err, IsNil)
+ sto := filesystem.NewStorage(fixtures.ByTag("submodule").One().DotGit(), cache.NewObjectLRUDefault())
ref, err := storer.ResolveReference(sto, plumbing.HEAD)
c.Assert(err, IsNil)
@@ -109,10 +108,9 @@ func (s *RevListSuite) TestRevListObjects(c *C) {
}
func (s *RevListSuite) TestRevListObjectsTagObject(c *C) {
- sto, err := filesystem.NewStorage(
+ sto := filesystem.NewStorage(
fixtures.ByTag("tags").
- ByURL("https://github.com/git-fixtures/tags.git").One().DotGit())
- c.Assert(err, IsNil)
+ ByURL("https://github.com/git-fixtures/tags.git").One().DotGit(), cache.NewObjectLRUDefault())
expected := map[string]bool{
"70846e9a10ef7b41064b40f07713d5b8b9a8fc73": true,