mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
distribution: Remove misleading comment
Remove the following comment in pullV2Tag: // NOTE: not using TagService.Get, since it uses HEAD requests // against the manifests endpoint, which are not supported by // all registry versions. This is actually not an issue, because TagService.Get does a fallback to GET if HEAD fails. It has done this ever since TagService was added to the distribution API, so this comment was probably based on an early version of TagService before it was merged, or was always a misunderstanding. However, we continue to use ManifestService.Get instead because it saves a round trip. The manifest can be retrieved directly instead of resolving the digest first. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
parent
c072347078
commit
99c59d5988
1 changed files with 0 additions and 3 deletions
|
@ -338,9 +338,6 @@ func (p *v2Puller) pullV2Tag(ctx context.Context, ref reference.Named) (tagUpdat
|
|||
tagOrDigest string // Used for logging/progress only
|
||||
)
|
||||
if tagged, isTagged := ref.(reference.NamedTagged); isTagged {
|
||||
// NOTE: not using TagService.Get, since it uses HEAD requests
|
||||
// against the manifests endpoint, which are not supported by
|
||||
// all registry versions.
|
||||
manifest, err = manSvc.Get(ctx, "", distribution.WithTag(tagged.Tag()))
|
||||
if err != nil {
|
||||
return false, allowV1Fallback(err)
|
||||
|
|
Loading…
Reference in a new issue