code: func encodeShallow(e *advRefsEncoder) encoderStateFn {
  	sorted := sortShallows(e.data.Shallows)
  	for _, hash := range sorted {
  		if e.err = e.pe.Encodef("shallow %s\n", hash); e.err != nil {
  			return nil
  		}
  	}
  
  	return encodeFlush
  }
docs: // Adds the (sorted) shallows: "shallow" SP hash EOL