Implementing plugin-like version controlled hook system for git.
- a) Clone this repo and copy content to subfolder of Your repo (eg:
<reponame>/utils/git-hook-plugins
) or - b) Connect this repo as git submodule.
- Create folder
git-hooks
next to it (eg:<reponame>/utils/git-hooks
), then in it:
- Make subfolder:
<preferred-hook-name>.d
. - Drop Your hook scripts to that subfolder (dont't forget set executable flag).
- Add those files to git.
- Run
hook-wrapper
directly.
- This will call setup menu with further instructions.
That's it! From now, every time hook is invoked, scripts in <preferred-hook-name>.d
will be executed in sorted order.
- Do steps 2-4 from 'Use' section.
- Run
hook-wrapper
directly to call setup menu. - Optionally, remove stalled hooks from
git-hooks
.
- Run
hook-wrapper
directly to call setup menu.
Done by modifying vars in Opts
zone of hook-wrapper
(will be changed in future).
Currently avialible:
- Name and location of hooks subfolger (
git-hooks
). - Page size for hooks names during setup
- Wrapper message prefix (
TAG
)