Apply the new WalkHistory prototype to merge
This commit is contained in:
parent
da266e6c7b
commit
f246cc9cdd
|
@ -331,13 +331,14 @@ func (srv *Server) CmdHistory(stdin io.ReadCloser, stdout io.Writer, args ...str
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
var child *Image
|
var child *Image
|
||||||
return image.WalkHistory(func(img *Image) {
|
return image.WalkHistory(func(img *Image) error {
|
||||||
if child == nil {
|
if child == nil {
|
||||||
fmt.Fprintf(stdout, " %s\n", img.Id)
|
fmt.Fprintf(stdout, " %s\n", img.Id)
|
||||||
} else {
|
} else {
|
||||||
fmt.Fprintf(stdout, " = %s + %s\n", img.Id, strings.Join(child.ParentCommand, " "))
|
fmt.Fprintf(stdout, " = %s + %s\n", img.Id, strings.Join(child.ParentCommand, " "))
|
||||||
}
|
}
|
||||||
child = img
|
child = img
|
||||||
|
return nil
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue