code: func (h *Hook) matchesCurrent() (bool, error) {
  	file, err := os.Open(h.Path())
  	if err != nil {
  		return false, err
  	}
  
  	by, err := ioutil.ReadAll(io.LimitReader(file, 1024))
  	file.Close()
  	if err != nil {
  		return false, err
  	}
  
  	contents := strings.TrimSpace(tools.Undent(string(by)))
  	if contents == h.Contents || len(contents) == 0 {
  		return true, nil
  	}
  
  	for _, u := range h.upgradeables {
  		if u == contents {
  			return true, nil
  		}
  	}
  
  	return false, fmt.Errorf("Hook already exists: %s\n\n%s\n", string(h.Type), tools.Indent(contents))
  }
docs: // matchesCurrent returns whether or not an existing git hook is able to be
  // written to or upgraded. A git hook matches those conditions if and only if
  // its contents match the current contents, or any past "upgrade-able" contents
  // of this hook.