A framework for managing and maintaining multi-language pre-commit hooks.
Find a file
Michael Vincent 120d60223a Improve performance by ignoring submodules
When git status runs in a repo with submodules, it'll recursively run
git status in every submodule as well by default (sequentially).
git status is substantially slower on Windows than on Linux. git diff
behaves similarly to git status in terms of running recursively within
all submodules. In repos with hundreds of submodules, this quickly adds
up when git status/diff are called multiple times. Pre-commit runs
git status once at the beginning of an operation and then runs git diff
before and after each hook. These calls quickly add up and make
pre-commit unusable in large repos with lots of submodules.

This commit drastically improves performance in repos with lots of
submodules and fixes #1701 by telling git status and git diff to ignore
submodules. This change is not expected to have any negative effect on
existing hooks because each submodule should manage its own hooks
instead of relying on superproject hooks to manipulate their contents.
2020-11-19 23:26:05 -06:00
.github Add link to GitHub Sponsors + Open Collective 2020-11-19 17:13:02 -08:00
pre_commit Improve performance by ignoring submodules 2020-11-19 23:26:05 -06:00
testing add types_or 2020-11-02 17:25:10 +00:00
tests add test to guard against yaml_dump 2020-11-06 17:07:37 -08:00
.gitignore add initial dotnet support 2020-09-27 15:04:35 -07:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate 2020-11-16 17:04:58 +00:00
.pre-commit-hooks.yaml Remove validate_config hook 2017-08-23 14:06:48 -07:00
azure-pipelines.yml add coursier (jvm) as a language 2020-10-27 09:21:54 -07:00
CHANGELOG.md v2.8.2 2020-10-30 13:36:35 -07:00
CONTRIBUTING.md Add foor missing required dependencies in CONTRIBUTING.md 2020-06-12 18:38:44 +02:00
LICENSE MIT 2014-06-05 08:57:40 -07:00
README.md Add pre-commit.ci 2020-10-26 16:11:27 -07:00
requirements-dev.txt make an exe stub for windows 2020-09-28 18:37:10 -07:00
setup.cfg v2.8.2 2020-10-30 13:36:35 -07:00
setup.py Migrate setup.py to setup.cfg declarative metadata 2019-02-27 22:12:03 -08:00
tox.ini add initial dotnet support 2020-09-27 15:04:35 -07:00

Build Status Azure DevOps coverage pre-commit.ci status

pre-commit

A framework for managing and maintaining multi-language pre-commit hooks.

For more information see: https://pre-commit.com/