Skip to content

Shell module git hooks

git.hooks.commit-msg-command

command to be run as commit-msg.

$MSG_FILE is an environment variable that contains all changes files

Type: strings concatenated with ā€œ\nā€

Default:

""

Declared by: - templates/nix-shell-parts-vendored/nix/vendored/shell-modules/git-hooks.nix

git.hooks.pre-commit-command

command to be run as pre-commit.

$FILES is an environment variable that contains all changes files

Type: strings concatenated with ā€œ\nā€

Default:

""

Example:

"treefmt $FILES"

Declared by: - templates/nix-shell-parts-vendored/nix/vendored/shell-modules/git-hooks.nix