Browse code

Use DiffSize instead of Size in v1 push

The v1 push code was querying the size of the layer chain up to the
layer it was pushing, rather than just that layer. This made the
progress indicator inaccurate.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>

Aaron Lehmann authored on 2015/12/08 03:59:59
Showing 1 changed files
... ...
@@ -432,7 +432,7 @@ func (p *v1Pusher) pushImage(v1Image v1Image, ep string) (checksum string, err e
432 432
 	defer arch.Close()
433 433
 
434 434
 	// don't care if this fails; best effort
435
-	size, _ := l.Size()
435
+	size, _ := l.DiffSize()
436 436
 
437 437
 	// Send the layer
438 438
 	logrus.Debugf("rendered layer for %s of [%d] size", v1ID, size)