-
PR Feature multiple extends. Thanks @Evilweed
-
PR Fix
npx
when onlyyarn
exists. Thanks @dotterian -
PR Fix use '-h' for robust lefthook. Thanks @fahrinh
-
PR Fix
sh
dependency on windows when executinggit
. Thanks @lionskape -
PR Add possibility for using
yaml
andyml
extension for config. Thanks @rbUUbr
- PR Support relative roots for monorepos. Thanks @jsmestad
-
Commit Skip before executing command
-
PR Add option --keep-config. Thanks @justinasposiunas
-
Commit Check if shell is non interactive
- PR Use eval instead of exec; Enable tty for the shell. Thanks @ssnickolay
-
PR Add support for git-worktree. Thanks @f440
-
Commit Commands and Scripts now can catch Stdin
-
Commit Add partial support for monorepos and command execution not from project root
-
PR Fix return value from shell exit. Thanks @HaiD84
-
PR Support postinstall script for npm installation for monorepos. Thanks @sHooKDT
-
PR Now relative path to scripts supported. Thanks @AlexeyMatskevich
-
Commit Option
extends
for top level config added. Now you can merge some settings from different places:
extends: $HOME/work/lefthook-extend.yml
- Commit Add examples to generated lefthook.yml
- Commit Add
-a
meansaggresive
strategy forinstall
command
lefthook install -a # clear .git/hooks dir and reinstall lefthook hooks
-
Commit Add Lefthook version indicator for commands and script execution
-
Commit Remove
npx
as dependency from node wrapper
Now we will call directly binary from ./node_modules
- Commit Add
-f
meansforce
strategy forinstall
command
lefthook install -f # reinstall lefthook hooks without sync info check
- PR #27 Move LEFTHOOK env check in hooks files
Now if LEFTHOOK=0 we will not call the binary file
Add shortcut {push_files}
pre-commit:
commands:
rubocop:
run: rubocop {push_files}
It same as:
pre-commit:
commands:
rubocop:
files: git diff --name-only HEAD @{push} || git diff --name-only HEAD master
run: rubocop {push_files}
- Commit Add
min_version
option
You can mark your config for minimum Lefthook version:
min_version: 0.6.1
- PR #24 Wrap
run
command in shell context.
Now in run
option available sh
syntax.
pre-commit:
commands:
bashed:
run: rubocop -a && git add
Will be executed in this way:
sh -c "rubocop -a && git add"
- PR #23 Search Lefthook in Gemfile.
Now it's possible to use Lefthook from Gemfile.
# Gemfile
gem 'lefthook'