code: func parseRefFile(filename string) (*Ref, error) {
  	bytes, err := ioutil.ReadFile(filename)
  	if err != nil {
  		return nil, err
  	}
  	contents := strings.TrimSpace(string(bytes))
  	if strings.HasPrefix(contents, "ref:") {
  		contents = strings.TrimSpace(contents[4:])
  	}
  	return ResolveRef(contents)
  }
docs: // Manually parse a reference file like HEAD and return the Ref it resolves to