瀏覽代碼

Remove session backup

The v2 session code will no longer update the indexEndpoint value, therefore it is not necessary to save and restore the value for use with v1.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Derek McGowan 10 年之前
父節點
當前提交
f11f3f6203
共有 1 個文件被更改,包括 0 次插入6 次删除
  1. 0 6
      graph/pull.go

+ 0 - 6
graph/pull.go

@@ -72,10 +72,6 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status {
 		logName += ":" + tag
 		logName += ":" + tag
 	}
 	}
 
 
-	// Calling the v2 code path might change the session
-	// endpoint value, so save the original one!
-	originalSession := *r
-
 	if len(repoInfo.Index.Mirrors) == 0 && (repoInfo.Index.Official || endpoint.Version == registry.APIVersion2) {
 	if len(repoInfo.Index.Mirrors) == 0 && (repoInfo.Index.Official || endpoint.Version == registry.APIVersion2) {
 		j := job.Eng.Job("trust_update_base")
 		j := job.Eng.Job("trust_update_base")
 		if err = j.Run(); err != nil {
 		if err = j.Run(); err != nil {
@@ -95,8 +91,6 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status {
 		log.Debug("image does not exist on v2 registry, falling back to v1")
 		log.Debug("image does not exist on v2 registry, falling back to v1")
 	}
 	}
 
 
-	r = &originalSession
-
 	log.Debugf("pulling v1 repository with local name %q", repoInfo.LocalName)
 	log.Debugf("pulling v1 repository with local name %q", repoInfo.LocalName)
 	if err = s.pullRepository(r, job.Stdout, repoInfo, tag, sf, job.GetenvBool("parallel")); err != nil {
 	if err = s.pullRepository(r, job.Stdout, repoInfo, tag, sf, job.GetenvBool("parallel")); err != nil {
 		return job.Error(err)
 		return job.Error(err)