From 2cd8b58944f7ae1e02d8cdcaad232edba7b7b8b3 Mon Sep 17 00:00:00 2001 From: miyuko Date: Fri, 5 Dec 2025 20:36:00 +0000 Subject: [PATCH] Don't put blobs that only contain hashes when incrementally uploading. --- src/manifest.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/manifest.go b/src/manifest.go index 4d2bd14..93295d5 100644 --- a/src/manifest.go +++ b/src/manifest.go @@ -350,7 +350,10 @@ func StoreManifest( wg := sync.WaitGroup{} ch := make(chan error, len(extManifest.Contents)) for name, entry := range extManifest.Contents { - if entry.GetType() == Type_ExternalFile { + // Upload external entries (those that were decided as ineligible for being stored inline). + // If the entry in the original manifest is already an external reference, there's no need + // to externalize it (and no way for us to do so, since the entry only contains the blob name). + if entry.GetType() == Type_ExternalFile && manifest.Contents[name].GetType() == Type_InlineFile { wg.Go(func() { err := backend.PutBlob(ctx, string(entry.Data), manifest.Contents[name].Data) if err != nil {