From b730e7328e9fd1142d84e4a7c4fe213a7aa6d5d9 Mon Sep 17 00:00:00 2001 From: Aditya R Date: Mon, 23 May 2022 15:25:34 +0530 Subject: cmd, build: remove redundant squash processing logic Same block contains similar lines above this is not needed as this looks redundant. [NO NEW TESTS NEEDED] [NO TESTS NEEDED] Signed-off-by: Aditya R --- cmd/podman/images/build.go | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'cmd/podman') diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go index 3ea60e18a..36779d6bc 100644 --- a/cmd/podman/images/build.go +++ b/cmd/podman/images/build.go @@ -442,22 +442,6 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil return nil, err } - // `buildah bud --layers=false` acts like `docker build --squash` does. - // That is all of the new layers created during the build process are - // condensed into one, any layers present prior to this build are retained - // without condensing. `buildah bud --squash` squashes both new and old - // layers down into one. Translate Podman commands into Buildah. - // Squash invoked, retain old layers, squash new layers into one. - if c.Flags().Changed("squash") && flags.Squash { - flags.Squash = false - flags.Layers = false - } - // Squash-all invoked, squash both new and old layers into one. - if c.Flags().Changed("squash-all") { - flags.Squash = true - flags.Layers = false - } - compression := buildahDefine.Gzip if flags.DisableCompression { compression = buildahDefine.Uncompressed -- cgit v1.2.3-54-g00ecf