A framework for managing and maintaining multi-language pre-commit hooks.
Find a file
Venkateswara Rao Mandela ac1301417b feat(run): warn instead of error when --files is used outside a git repo
When `pre-commit run --files <files>` is called outside a git
repository, the tool previously raised a FatalError and exited
with code 1.

- Print a warning that pre-commit is running outside a git
  repository and only the explicitly passed files will be checked
- Continue execution rather than aborting
- All other commands (and `run` without `--files`) retain the
  existing fatal error behavior

This modification helps use pre-commit in jujutsu worktrees as long
as the modified file list is supplied on command line.

Signed-off-by: Venkateswara Rao Mandela <venkat.mandela@gmail.com>
2026-04-05 20:10:21 +05:30
.github py310+ 2026-03-23 10:05:04 -04:00
pre_commit feat(run): warn instead of error when --files is used outside a git repo 2026-04-05 20:10:21 +05:30
testing remove sha256 file from zipapp script 2025-11-22 16:06:27 -05:00
tests fix python local template when artifact dirs are present 2025-12-16 15:45:01 -05:00
.gitignore remove unneeded gitignore lines 2022-03-13 19:55:30 -04:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate 2025-12-22 20:26:26 +00:00
.pre-commit-hooks.yaml deprecate pre-commit-validate-{config,manifest} 2022-04-24 19:08:47 -04:00
CHANGELOG.md v4.5.1 2025-12-16 16:13:56 -05:00
CONTRIBUTING.md fix typo in CONTRIBUTING.md 2023-08-14 11:00:17 +01:00
LICENSE MIT 2014-06-05 08:57:40 -07:00
README.md azure pipelines -> github actions 2022-12-29 22:18:31 -05:00
requirements-dev.txt always use #!/bin/sh on windows 2022-01-05 13:22:49 -05:00
setup.cfg v4.5.1 2025-12-16 16:13:56 -05:00
setup.py drop python 3.6 support 2022-01-18 18:44:20 -05:00
tox.ini show 20 slowest durations in CI 2023-03-09 11:00:31 -05:00

build status 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/