Read from the project ".hooks-config" a configuration value
hooks.start.commit-msg
hooks.start.pre-commit
hooks.start.prepare-commit-msg
to run from our respective hook before its main checks.
Allow projects to configure hooks with a 'git config'-formatted file at
the top of their source tree called ".hooks-config". This avoids use of
bash-specific syntax and makes configuration declarative.
Some hooks were getting referenced directly via $GIT_DIR/hooks while at
other times getting referenced relative via ${BASH_SOURCE%/*}. By making
all references relative then these hooks can reside in a different folder
and still be daisy-chained by other hooks.
Although it seems reasonable to expect GIT_DIR to be set when
hooks are invoked, the "git help hooks" documentation does not
guarantee it. On msysGit 1.7.8 (and perhaps others) "git gui"
runs prepare-commit-msg without setting GIT_DIR. Set GIT_DIR
at the beginning of each commit hook if it is not already set.
Look for a ".hooks-config.bash" file at the top of the work tree.
Load it in each hook to get per-project configuration. Currently
we do not define any config options, but this adds the framework.