Skip to main content

Module hooks

Module hooks 

Source
Expand description

Automatic git hook management.

Keeps .githooks/ in sync with the hooks section of sr.yaml. Hook scripts are thin shims that delegate to sr hook run <name>.

Functionsยง

needs_sync
Check whether hooks need syncing (cheap hash comparison).
sync_hooks
Sync .githooks/ with the hooks config. Returns Ok(true) if changes were made.