diff options
author | Santiago M. Mola <santi@mola.io> | 2016-08-29 22:47:13 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-29 22:47:13 +0200 |
commit | e4246138cb9ffb819c052ba17a9fbdf915427291 (patch) | |
tree | bd938368afe0ffd7c9e1df16256e39e17d8184b5 /formats | |
parent | dd4af03ad368cc50dd08912010f5b667bd7569cd (diff) | |
download | go-git-e4246138cb9ffb819c052ba17a9fbdf915427291.tar.gz |
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.
Diffstat (limited to 'formats')
-rw-r--r-- | formats/packfile/decoder_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
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) } |