Known subclasses: dulwich.hooks.CommitMsgShellHook, dulwich.hooks.PostCommitShellHook, dulwich.hooks.PreCommitShellHook

Hook by executable file

Implements standard githooks(5) [0]:

[0] http://www.kernel.org/pub/software/scm/git/docs/githooks.html

Method __init__ Setup shell hook definition
Method execute Execute the hook with given args
def __init__(self, name, path, numparam, pre_exec_callback=None, post_exec_callback=None, cwd=None):
Setup shell hook definition
Parametersnamename of hook for error messages
pathabsolute path to executable file
numparamnumber of requirements parameters
pre_exec_callbackclosure for setup before execution Defaults to None. Takes in the variable argument list from the execute functions and returns a modified argument list for the shell hook.
post_exec_callbackclosure for cleanup after execution Defaults to None. Takes in a boolean for hook success and the modified argument list and returns the final hook return value if applicable
cwdworking directory to switch to when executing the hook
def execute(self, *args):
Execute the hook with given args
API Documentation for Dulwich, generated by pydoctor at 2018-11-17 19:05:54.