From d1cd96cc4cb0411e42e0e473ce617153db0c5c56 Mon Sep 17 00:00:00 2001 From: Billy Zha Date: Sat, 4 Nov 2023 01:08:26 +0000 Subject: [PATCH] fix: resolve regression made in #1164 Signed-off-by: Billy Zha --- cmd/oras/root/pull.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/oras/root/pull.go b/cmd/oras/root/pull.go index fb5d50e4f..844fd988b 100644 --- a/cmd/oras/root/pull.go +++ b/cmd/oras/root/pull.go @@ -231,6 +231,11 @@ func doPull(ctx context.Context, src oras.ReadOnlyTarget, dst oras.GraphTarget, for _, s := range nodes { if s.Annotations[ocispec.AnnotationTitle] == "" { if content.Equal(s, ocispec.DescriptorEmptyJSON) { + // empty layer + continue + } + if s.Annotations[ocispec.AnnotationTitle] == "" { + // unnamed layers are skipped skippedLayers++ } ss, err := content.Successors(ctx, fetcher, s)