code: func AllRefsIn(wd string) ([]*Ref, error) {
  	cmd := gitNoLFS(
  		"for-each-ref", "--format=%(objectname)%00%(refname)")
  	cmd.Dir = wd
  
  	outp, err := cmd.StdoutPipe()
  	if err != nil {
  		return nil, lfserrors.Wrap(err, "cannot open pipe")
  	}
  	cmd.Start()
  
  	refs := make([]*Ref, 0)
  
  	scanner := bufio.NewScanner(outp)
  	for scanner.Scan() {
  		parts := strings.SplitN(scanner.Text(), "\x00", 2)
  		if len(parts) != 2 {
  			return nil, lfserrors.Errorf(
  				"git: invalid for-each-ref line: %q", scanner.Text())
  		}
  
  		sha := parts[0]
  		typ, name := ParseRefToTypeAndName(parts[1])
  
  		refs = append(refs, &Ref{
  			Name: name,
  			Type: typ,
  			Sha:  sha,
  		})
  	}
  
  	if err := scanner.Err(); err != nil {
  		return nil, err
  	}
  
  	return refs, nil
  }
docs: // AllRefs returns a slice of all references in a Git repository located in a
  // the given working directory "wd", or an error if those references could not
  // be loaded.