1
0
mirror of https://github.com/docker/cli.git synced 2026-01-19 21:41:31 +03:00

Fix indentation to match rest of file (tabs, not spaces)

Docker-DCO-1.0-Signed-off-by: Danny Yates <danny@codeaholics.org> (github: codeaholics)
Upstream-commit: 145501bee3f37ccb022189e7b76f31abcbdbed3c
Component: engine
This commit is contained in:
Danny Yates
2013-12-09 17:01:53 +00:00
committed by Danny Yates
parent 6a59e5045e
commit fdb961ff89

View File

@@ -1134,14 +1134,14 @@ func (srv *Server) getImageList(localRepo map[string]string) ([]string, map[stri
)
for tag, id := range localRepo {
var imageListForThisTag []string
var imageListForThisTag []string
tagsByImage[id] = append(tagsByImage[id], tag)
for img, err := srv.runtime.graph.Get(id); img != nil; img, err = img.GetParent() {
if err != nil {
return nil, nil, err
}
if err != nil {
return nil, nil, err
}
if imagesSeen[img.ID] {
// This image is already on the list, we can ignore it and all its parents
@@ -1152,13 +1152,13 @@ func (srv *Server) getImageList(localRepo map[string]string) ([]string, map[stri
imageListForThisTag = append(imageListForThisTag, img.ID)
}
// reverse the image list for this tag (so the "most"-parent image is first)
for i, j := 0, len(imageListForThisTag) - 1; i < j; i, j = i + 1, j - 1 {
imageListForThisTag[i], imageListForThisTag[j] = imageListForThisTag[j], imageListForThisTag[i]
}
// reverse the image list for this tag (so the "most"-parent image is first)
for i, j := 0, len(imageListForThisTag) - 1; i < j; i, j = i + 1, j - 1 {
imageListForThisTag[i], imageListForThisTag[j] = imageListForThisTag[j], imageListForThisTag[i]
}
// append to main image list
imageList = append(imageList, imageListForThisTag...)
// append to main image list
imageList = append(imageList, imageListForThisTag...)
}
utils.Debugf("Image list: %v", imageList)
@@ -1201,16 +1201,16 @@ func (srv *Server) pushRepository(r *registry.Registry, out io.Writer, localName
if r.LookupRemoteImage(imgId, ep, repoData.Tokens) {
out.Write(sf.FormatStatus("", "Image %s already pushed, skipping", utils.TruncateID(imgId)))
} else {
if _, err := srv.pushImage(r, out, remoteName, imgId, ep, repoData.Tokens, sf); err != nil {
// FIXME: Continue on error?
return err
}
if _, err := srv.pushImage(r, out, remoteName, imgId, ep, repoData.Tokens, sf); err != nil {
// FIXME: Continue on error?
return err
}
}
for _, tag := range tagsByImage[imgId] {
out.Write(sf.FormatStatus("", "Pushing tag for rev [%s] on {%s}", utils.TruncateID(imgId), ep+"repositories/"+remoteName+"/tags/"+tag))
for _, tag := range tagsByImage[imgId] {
out.Write(sf.FormatStatus("", "Pushing tag for rev [%s] on {%s}", utils.TruncateID(imgId), ep+"repositories/"+remoteName+"/tags/"+tag))
if err := r.PushRegistryTag(remoteName, imgId, tag, ep, repoData.Tokens); err != nil {
if err := r.PushRegistryTag(remoteName, imgId, tag, ep, repoData.Tokens); err != nil {
return err
}
}