code: func (r *Remote) List(o *ListOptions) (rfs []*plumbing.Reference, err error) {
  	s, err := newUploadPackSession(r.c.URLs[0], o.Auth)
  	if err != nil {
  		return nil, err
  	}
  
  	defer ioutil.CheckClose(s, &err)
  
  	ar, err := s.AdvertisedReferences()
  	if err != nil {
  		return nil, err
  	}
  
  	allRefs, err := ar.AllReferences()
  	if err != nil {
  		return nil, err
  	}
  
  	refs, err := allRefs.IterReferences()
  	if err != nil {
  		return nil, err
  	}
  
  	var resultRefs []*plumbing.Reference
  	refs.ForEach(func(ref *plumbing.Reference) error {
  		resultRefs = append(resultRefs, ref)
  		return nil
  	})
  
  	return resultRefs, nil
  }
docs: // List the references on the remote repository.