diff --git a/Library/Formula/git-hooks.rb b/Library/Formula/git-hooks.rb index 385b8a316069..8d640ebf8824 100644 --- a/Library/Formula/git-hooks.rb +++ b/Library/Formula/git-hooks.rb @@ -8,6 +8,19 @@ def install bin.install "git-hooks" end + def caveats + <<-EOS.undent + Run 'git hooks --install' Inside a git project to change that projects + git hooks to use git-hooks hooks. 'git hooks --uninstall' can be run at + any time to go back to the old hooks that were installed before + (typically the default which does nothing). + + Run 'git hooks --installglobal' to force any new git repository or any + git repository you clone to have a reminders to install git hooks. (It + can't be on by default for security reasons of course) + EOS + end + test do output = `cd $(brew --prefix); git hooks`.strip assert_match /Listing User, Project, and Global hooks/, output