From e4246138cb9ffb819c052ba17a9fbdf915427291 Mon Sep 17 00:00:00 2001 From: "Santiago M. Mola" Date: Mon, 29 Aug 2016 22:47:13 +0200 Subject: storage: Add object type hint parameter to ObjectStorage.Get. (#69) Some storage backends can optimize object lookup if they get the object type that is expected. So we the signature of the Get method is now Get(Hash, ObjectType). Added generic tests for storage backends. --- formats/packfile/decoder_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'formats') diff --git a/formats/packfile/decoder_test.go b/formats/packfile/decoder_test.go index 31d86ad..5c8807d 100644 --- a/formats/packfile/decoder_test.go +++ b/formats/packfile/decoder_test.go @@ -104,7 +104,7 @@ func AssertObjects(c *C, s *memory.Storage, expects []string) { c.Assert(len(expects), Equals, len(o.Objects)) for _, exp := range expects { - obt, err := o.Get(core.NewHash(exp)) + obt, err := o.Get(core.NewHash(exp), core.AnyObject) c.Assert(err, IsNil) c.Assert(obt.Hash().String(), Equals, exp) } -- cgit