code: func getRemoteRefs(l *tasklog.Logger) (map[string][]*git.Ref, error) {
  	refs := make(map[string][]*git.Ref)
  
  	remotes, err := git.RemoteList()
  	if err != nil {
  		return nil, err
  	}
  
  	if !migrateSkipFetch {
  		w := l.Waiter("migrate: Fetching remote refs")
  		if err := git.Fetch(remotes...); err != nil {
  			return nil, err
  		}
  		w.Complete()
  	}
  
  	for _, remote := range remotes {
  		var refsForRemote []*git.Ref
  		if migrateSkipFetch {
  			refsForRemote, err = git.CachedRemoteRefs(remote)
  		} else {
  			refsForRemote, err = git.RemoteRefs(remote)
  		}
  
  		if err != nil {
  			return nil, err
  		}
  
  		refs[remote] = refsForRemote
  	}
  
  	return refs, nil
  }
docs: // getRemoteRefs returns a fully qualified set of references belonging to all
  // remotes known by the currently checked-out repository, or an error if those
  // references could not be determined.