Expand description
Git hooks file format parsing, shim generation, and execution model.
Owns the .githooks/<hook>.hooks file format. Can read/write hook files
and generate shim scripts. Does not execute commands, run git operations,
or produce terminal output.
Structs§
- Hook
Command - A single command parsed from a
.githooks/<hook>.hooksfile.
Enums§
Constants§
- KNOWN_
HOOKS - All git hook types managed by git-std, in recommended install order.
Functions§
- default_
mode - Return the default execution mode for a given hook name.
- generate_
hooks_ template - Generate the
.hookstemplate file content for a given hook name. - generate_
shim - Generate the shim script content for a given hook name.
- matches_
any - Returns
trueif at least one path infilesmatches the given globpattern. - parse
- Parse the text content of a
.githooks/<hook>.hooksfile. - substitute_
msg - Replace
{msg}tokens in a command string with the given file path.