code: func (o *CloneOptions) Validate() error {
  	if o.URL == "" {
  		return ErrMissingURL
  	}
  
  	if o.RemoteName == "" {
  		o.RemoteName = DefaultRemoteName
  	}
  
  	if o.ReferenceName == "" {
  		o.ReferenceName = plumbing.HEAD
  	}
  
  	if o.Tags == InvalidTagMode {
  		o.Tags = AllTags
  	}
  
  	return nil
  }
docs: // Validate validates the fields and sets the default values.