Apply the new WalkHistory prototype to merge

Upstream-commit: f246cc9cdd9091baa5f956f7c8119a49e8379f91
Component: engine
This commit is contained in:
creack
2013-03-21 10:12:05 -07:00
parent e4f150622c
commit 7fe5b8f241
+2 -1
View File
@@ -331,13 +331,14 @@ func (srv *Server) CmdHistory(stdin io.ReadCloser, stdout io.Writer, args ...str
return err
}
var child *Image
return image.WalkHistory(func(img *Image) {
return image.WalkHistory(func(img *Image) error {
if child == nil {
fmt.Fprintf(stdout, " %s\n", img.Id)
} else {
fmt.Fprintf(stdout, " = %s + %s\n", img.Id, strings.Join(child.ParentCommand, " "))
}
child = img
return nil
})
}