From 180469a2a4cc77ee81e27d2572a6bf424a0a825f Mon Sep 17 00:00:00 2001 From: Ma Shimiao Date: Tue, 1 Sep 2015 16:33:14 +0800 Subject: [PATCH] daemon/commit: remove unneeded code Signed-off-by: Ma Shimiao Upstream-commit: ab868ad79c631b2606b479edf12d287b986c72d4 Component: engine --- components/engine/daemon/commit.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/components/engine/daemon/commit.go b/components/engine/daemon/commit.go index 211fae14cc..78870abcee 100644 --- a/components/engine/daemon/commit.go +++ b/components/engine/daemon/commit.go @@ -35,18 +35,7 @@ func (daemon *Daemon) Commit(container *Container, c *ContainerCommitConfig) (*i }() // Create a new image from the container's base layers + a new layer from container changes - var ( - containerID, parentImageID string - containerConfig *runconfig.Config - ) - - if container != nil { - containerID = container.ID - parentImageID = container.ImageID - containerConfig = container.Config - } - - img, err := daemon.graph.Create(rwTar, containerID, parentImageID, c.Comment, c.Author, containerConfig, c.Config) + img, err := daemon.graph.Create(rwTar, container.ID, container.ImageID, c.Comment, c.Author, container.Config, c.Config) if err != nil { return nil, err }