mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Apply the new WalkHistory prototype to merge
This commit is contained in:
parent
da266e6c7b
commit
f246cc9cdd
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue