code: func (h *Hook) Install(force bool) error {
  	msg := fmt.Sprintf("Install hook: %s, force=%t, path=%s", h.Type, force, h.Path())
  
  	if err := tools.MkdirAll(h.Dir, h.cfg); err != nil {
  		return err
  	}
  
  	if h.Exists() && !force {
  		tracerx.Printf(msg + ", upgrading...")
  		return h.Upgrade()
  	}
  
  	tracerx.Printf(msg)
  	return h.write()
  }
docs: // Install installs this Git hook on disk, or upgrades it if it does exist, and
  // is upgradeable. It will create a hooks directory relative to the local Git
  // directory. It returns and halts at any errors, and returns nil if the
  // operation was a success.