···350 wg := sync.WaitGroup{}
351 ch := make(chan error, len(extManifest.Contents))
352 for name, entry := range extManifest.Contents {
353- if entry.GetType() == Type_ExternalFile {
000354 wg.Go(func() {
355 err := backend.PutBlob(ctx, string(entry.Data), manifest.Contents[name].Data)
356 if err != nil {
···350 wg := sync.WaitGroup{}
351 ch := make(chan error, len(extManifest.Contents))
352 for name, entry := range extManifest.Contents {
353+ // Upload external entries (those that were decided as ineligible for being stored inline).
354+ // If the entry in the original manifest is already an external reference, there's no need
355+ // to externalize it (and no way for us to do so, since the entry only contains the blob name).
356+ if entry.GetType() == Type_ExternalFile && manifest.Contents[name].GetType() == Type_InlineFile {
357 wg.Go(func() {
358 err := backend.PutBlob(ctx, string(entry.Data), manifest.Contents[name].Data)
359 if err != nil {