Overcommit 0.32.0
This major release introduces support for running hooks in parallel, which is enabled by default. If you are using MRI Ruby, the benefits are most noticeable if your hooks run other executables (e.g. you run static analysis tools like rubocop
or scss-lint
), since threads in MRI Ruby cannot truly run in parallel due to the Global Interpreter Lock (GIL). However, if the threads are blocked waiting on a child process, then they'll parallelize just fine.
New Features
- Hooks are now run in parallel by default
- Add
concurrency
global option allowing you to specify the number of threads
to use when running hooks concurrently - Add
parallelize
hook option which specifies whether or not this hook should
be run in parallel (default istrue
) - Add
processors
hook option allowing you to specify how many processing
units a hook should require - Add
ForbiddenBranches
pre-commit hook which prevents creating a commit
on any blacklisted branch by name/pattern - Add
MessageFormat
commit-msg hook to validate commit messages against
a regex pattern
Changes
- Improve error message output when there is a problem processing messages
viaextract_messages
pre-commit hook helper - Switch
ScssLint
pre-commit hook to use the JSON output formatter instead
of the default formatter - Change tense of hook descriptions from progressive indicative form ("Running")
to indicative present form ("Run") so output reads better in parallel hook
runs
Bug Fixes
- Fix bug where amending a commit with command line arguments containing
Unicode characters could cause a crash due to invalid byte sequences - Fix
Minitest
pre-push hook to include all test files