Merge pull request #18727 from tonistiigi/partial-load

Add support for partial load
This commit is contained in:
David Calavera 2015-12-18 11:10:55 -08:00
commit 6ee7c94263

View file

@ -73,9 +73,14 @@ func (l *tarexporter) Load(inTar io.ReadCloser, outStream io.Writer) error {
if err != nil {
return err
}
newLayer, err := l.loadLayer(layerPath, rootFS)
r := rootFS
r.Append(diffID)
newLayer, err := l.ls.Get(r.ChainID())
if err != nil {
return err
newLayer, err = l.loadLayer(layerPath, rootFS)
if err != nil {
return err
}
}
defer layer.ReleaseAndLog(l.ls, newLayer)
if expected, actual := diffID, newLayer.DiffID(); expected != actual {