Expand description
git2-rs addon supporting git hooks
we look for hooks in the following locations:
- whatever
config.hooksPath
points to .git/hooks/
- whatever list of paths provided as
other_paths
(in order)
most basic hook is: hooks_pre_commit
. see also other hooks_*
functions.
create_hook
is useful to create git hooks from code (unittest make heavy usage of it)
Enums§
- Hook
Result - Hooks
Error - crate specific error type
- Prepare
Commit MsgSource
Constants§
Functions§
- create_
hook - helper method to create git hooks programmatically (heavy used in unittests)
- hooks_
commit_ msg - Git hook:
commit_msg
- hooks_
post_ commit - this hook is documented here https://git-scm.com/docs/githooks#_post_commit
- hooks_
pre_ commit - this hook is documented here https://git-scm.com/docs/githooks#_pre_commit
- hooks_
prepare_ commit_ msg - this hook is documented here https://git-scm.com/docs/githooks#_prepare_commit_msg