Skip to content

Commit

Permalink
Simplify handling of toplevelManifest
Browse files Browse the repository at this point in the history
Other parts of the code already assume that the value
is always valid, so don't treat an empty value specially.

Signed-off-by: Miloslav Trmač <[email protected]>
  • Loading branch information
mtrmac committed Nov 28, 2024
1 parent c0aa34d commit 570d133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/storage_dest.go
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ func (s *storageImageDestination) CommitWithOptions(ctx context.Context, options
}
// Set up to save the options.UnparsedToplevel's manifest if it differs from
// the per-platform one, which is saved below.
if len(toplevelManifest) != 0 && !bytes.Equal(toplevelManifest, s.manifest) {
if !bytes.Equal(toplevelManifest, s.manifest) {
manifestDigest, err := manifest.Digest(toplevelManifest)
if err != nil {
return fmt.Errorf("digesting top-level manifest: %w", err)
Expand Down

0 comments on commit 570d133

Please sign in to comment.