- fix: Make info dir when it is absent (#414) by @sato11
- deps: bump github.com/mattn/go-isatty from 0.0.16 to 0.0.17 (#409) by @dependabot
- deps: bump github.com/briandowns/spinner from 1.19.0 to 1.20.0 (#406) by @dependabot
- fix: Double quote eval statements with $dir (#404) by @jrfoell
- chore: Add PR template (#401) by @mrexox
- chore: Fix yml syntax missing colon (#399) by @aaronkelton
- feature: Allow following output (#397) by @mrexox
- fix: Remove quotes for rc in template (#398) by @mrexox
- feature: Add an option to disable spinner (#396) by @mrexox
- feature: Use pnpm before npx (#393) by @mrexox
- chore: Use lipgloss for output (#395) by @mrexox
- feature: Allow providing rc file (PR #392 by @mrexox)
- feature: Expand env variables (PR #391 by @mrexox)
- deps: Update important dependencies (PR #389 by @mrexox)
- chore: Add FreeBSD OS to packages (PR #377 by @mrexox)
- feature: Skip based on branch name and allow global skip rules (PR #376 by @mrexox)
- fix: Omit LFS output unless it is required (PR #373 by @mrexox)
- fix: Remove quoting for scripts (PR #371 by @stonesbg + @mrexox)
- fix: remove lefthook.checksum on uninstall (PR #370 by @JuliusHenke)
- fix: Print prepare-commit-msg hook if it exists in config (PR #368 by @mrexox)
- fix: Allow changing refs for remote (PR #363 by @mrexox)
- fix: Full support for interactive commands and scripts (PR #352 by @mrexox)
- chore: Remove deprecated config options (PR #351 by @mrexox)
- feature: Add remote config support (PR #343 by @oatovar and @mrexox)
- feature: Add
LEFTHOOK_VERBOSE
env (PR #346 by @mrexox)
- ci: Fix snapcraft trying to create dirs in parallel by @mrexox
- feature: Allow setting env vars (PR #337 by @mrexox)
- feature: Show current running command and script name(s) (PR #338 by @mrexox)
- feature: Exclude by command names too (PR #335 by @mrexox)
- fix: Don't uninstall lefthook.yml and lefthook-local.yml by default (PR #334 by @mrexox)
- fix: Fixing typo in gemspec (PR #333 by @kerrizor)
- Fix regression from #314 (chmod missed fix) (PR #330 by @ariccio)
- Pass stdin by default (PR #324 by @mrexox)
- Quote path to script (PR #321 by @mrexox)
- Add goreleaser action (PR #307 by @mrexox)
- Windows escaping issues (PR #314 by @mrexox)
- Check for lefthook.bat in hook template (PR #316 by @mrexox)
- Update node.md docs (PR #312 by @fantua)
- Move postinstall script to main lefthook NPM package (PR #311 by @mrexox)
- Allow suppressing execution output (PR #309 by @mrexox)
- Update dependencies (PR #308 by @mrexox)
- Add support for Git LFS (PR #306 by @mrexox)
- Bump Go version to 1.19 (PR #305 by @mrexox)
- Add tests on runner (PR #304 by @mrexox)
- Add fail text option (PR #301 by @mrexox)
- Store lefthook checksum in non-hook file (PR #280 by @mrexox)
- Submodules issue (PR #300 by @mrexox)
- Remove rspec tests (PR #299 by @mrexox)
- Add
when "mingw" then "windows"
case (PR #297 by @ariccio) - Define security policy and contact method (PR #293 by @Envek)
- Support skipping on rebase (PR #289 by @mrexox)
- Fix NPM package
- Update email information
- Bring auto install back (PR #286 by @mrexox)
- Move main.go to root (PR #285 by @mrexox)
- Panic on commands structure misuse (PR #284 by @mrexox)
- Split npm package by os and cpu (PR #281 by @mrexox)
- Fix folders structure for
@evilmartians/lefthook
and@evilmartians/lefthook-installer
packages - Fix folders structure for
lefthook
gem
- Refactoring (PR #275 by @mrexox, @skryukov, @markovichecha)
- Replace deprecated
File.exists?
withexist?
for Ruby script (PR #263 by @pocke)
- Allow skipping hooks in certain git states: merge and/or rebase (PR #173 by @DmitryTsepelev)
- NPM: installer package that downloads the required binaries during installation (PR #188 by @aminya, PR #273 by @Envek)
- Add ability to skip summary output. Also support a
LEFTHOOK_QUIET
env variable (PR #187 by @washtubs) - Make filename globs case-insensitive (PR #196 by @skryukov)
- Fix lefthook binary extension on Windows (PR #188 by @aminya)
- Stop building 32-bit binaries for releases due to low usage (@Envek)
- Allow lefthook to work when node_modules is not in root folder for npx (PR #224 by @spearmootz)
- Fix unreachable conditional in hook template (PR #242 by @dannobytes)
- Add cpu arch and os arch to lefthook's filepath in hook template (PR #260 by @rmachado-studocu)
- Fix incorrect npx command in git hook script template (PR #236) @PikachuEXE
- Update project URLs in NPM package.json (PR #235) @PikachuEXE
- Pass all arguments to downstream hooks (PR #231) @pablobirukov
- Allows lefthook to work when node_modules is not in root folder for npx (PR #224) @spearmootz
- Do not initialize git config on
help
andversion
commands (PR #209) @pwinckles - node: fix postinstall: process.cwd is a function and should be called @Envek
- Fix lefthook binary extension on Windows. @aminya
- PR #193 Fix path for searching npm-installed binary when in worktree. @Envek
- NPM, RPM, and DEB packaging fixes. @Envek
- PR #179 Fix running on Windows under MSYS and MINGW64 when run from Ruby gem or JS npm package. @akiver, @Envek
- PR #177 Support non-default git hooks path. @charlie-wasp
- PR #182 Support git workspaces and submodules. @skryukov
- PR #184 Rewrite npm's scripts in JavaScript to support running on Windows without
sh
. @aminya
- PR Improve check for installed git @DmitryTsepelev
- PR Create .git/hooks directory when it does not exist @DmitryTsepelev
- PR Package versions for all architectures (x86_64, ARM64, x86) into Ruby gem and NPM package @Envek
- PR Fix golang 15+ build @skryukov
-
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
meansaggressive
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'