code: func lfsPushRefs(refnames []string, pushAll bool) ([]*git.RefUpdate, error) {
  	localrefs, err := git.LocalRefs()
  	if err != nil {
  		return nil, err
  	}
  
  	if pushAll && len(refnames) == 0 {
  		refs := make([]*git.RefUpdate, len(localrefs))
  		for i, lr := range localrefs {
  			refs[i] = git.NewRefUpdate(cfg.Git, cfg.PushRemote(), lr, nil)
  		}
  		return refs, nil
  	}
  
  	reflookup := make(map[string]*git.Ref, len(localrefs))
  	for _, ref := range localrefs {
  		reflookup[ref.Name] = ref
  	}
  
  	refs := make([]*git.RefUpdate, len(refnames))
  	for i, name := range refnames {
  		if left, ok := reflookup[name]; ok {
  			refs[i] = git.NewRefUpdate(cfg.Git, cfg.PushRemote(), left, nil)
  		} else {
  			left := &git.Ref{Name: name, Type: git.RefTypeOther, Sha: name}
  			refs[i] = git.NewRefUpdate(cfg.Git, cfg.PushRemote(), left, nil)
  		}
  	}
  
  	return refs, nil
  }
docs: // lfsPushRefs returns valid ref updates from the given ref and --all arguments.
  // Either one or more refs can be explicitly specified, or --all indicates all
  // local refs are pushed.