Skip to main content

Module git_hooks

Module git_hooks 

Source
Expand description

Git hooks installation and management

Provides automatic installation of pre-commit and pre-push hooks integrated with cargo make workflow.

§Features

  • Auto-detection: Detects if in git repository
  • Smart installation: Skips if hooks already installed
  • Cross-platform: Works on Unix and Windows
  • Verification: Validates hooks after installation

§Hooks Installed

  • pre-commit: Fast validation (cargo make check + format)
  • pre-push: Full validation (cargo make pre-commit)

Structs§

HookInstallation
HooksInstallOutput

Functions§

get_hooks_dir
Get the .git/hooks directory path
install_git_hooks
Install all git hooks
install_hook
Install a single git hook
is_git_repo
Check if a directory is a git repository
is_hook_installed
Check if a hook is already installed