mroth/lolcommits — pull request #173 by matthutchinson (2013-11-19 23:40:27+00:00)
Title: better post commit hook enabling/disabling

Some improvements to hook enabling and disabling. Includes new scenarios to test these features.
(no specific issue addressed here, but there was a TODO in the code comments)

* if --enabling when an existing hook is present
* now removes any existing lolcommit hook lines first
* and checks for a good shebang line (aborts with warn message if not found)

* --enable works as before if no post-commit is present

* if --disabling
* when existing hook is present, removes the lolcommit lines only
* warns if any lolcommits hook might still be present (in old style), message says to edit manually to uninstall
* shows info message if no post-commit file found at all