code: func readRef(data []byte) (string, plumbing.Hash, error) {
  	chunks := bytes.Split(data, sp)
  	switch {
  	case len(chunks) == 1:
  		return "", plumbing.ZeroHash, fmt.Errorf("malformed ref data: no space was found")
  	case len(chunks) > 2:
  		return "", plumbing.ZeroHash, fmt.Errorf("malformed ref data: more than one space found")
  	default:
  		return string(chunks[1]), plumbing.NewHash(string(chunks[0])), nil
  	}
  }
docs: // Reads a ref-name