Merge pull request #1257 from aaronlehmann/remove-extra-stat

Remove unnecessary stat from blob Get method
This commit is contained in:
Stephen Day 2015-12-17 14:10:12 -08:00
commit 7f41cd7587

View file

@ -377,11 +377,7 @@ func (bs *blobs) Stat(ctx context.Context, dgst digest.Digest) (distribution.Des
} }
func (bs *blobs) Get(ctx context.Context, dgst digest.Digest) ([]byte, error) { func (bs *blobs) Get(ctx context.Context, dgst digest.Digest) ([]byte, error) {
desc, err := bs.Stat(ctx, dgst) reader, err := bs.Open(ctx, dgst)
if err != nil {
return nil, err
}
reader, err := bs.Open(ctx, desc.Digest)
if err != nil { if err != nil {
return nil, err return nil, err
} }