Browse Source

Merge pull request #30085 from swernli/skip_push_base

storeLayer.Parent should return describableStoreLayers
John Howard 8 years ago
parent
commit
e48937fb99
1 changed files with 9 additions and 1 deletions
  1. 9 1
      distribution/config.go

+ 9 - 1
distribution/config.go

@@ -198,10 +198,18 @@ func (l *storeLayer) Parent() PushLayer {
 	if p == nil {
 	if p == nil {
 		return nil
 		return nil
 	}
 	}
-	return &storeLayer{
+	sl := storeLayer{
 		Layer: p,
 		Layer: p,
 		ls:    l.ls,
 		ls:    l.ls,
 	}
 	}
+	if d, ok := p.(distribution.Describable); ok {
+		return &describableStoreLayer{
+			storeLayer:  sl,
+			describable: d,
+		}
+	}
+
+	return &sl
 }
 }
 
 
 func (l *storeLayer) Open() (io.ReadCloser, error) {
 func (l *storeLayer) Open() (io.ReadCloser, error) {