code: func (ts *tagStore) Tag(ctx context.Context, tag string, desc distribution.Descriptor) error {
  	currentPath, err := pathFor(manifestTagCurrentPathSpec{
  		name: ts.repository.Named().Name(),
  		tag:  tag,
  	})
  
  	if err != nil {
  		return err
  	}
  
  	lbs := ts.linkedBlobStore(ctx, tag)
  
  	// Link into the index
  	if err := lbs.linkBlob(ctx, desc); err != nil {
  		return err
  	}
  
  	// Overwrite the current link
  	return ts.blobStore.link(ctx, currentPath, desc.Digest)
  }
docs: // Tag tags the digest with the given tag, updating the the store to point at
  // the current tag. The digest must point to a manifest.