Commit graph

300 commits

Author SHA1 Message Date
Anthony Sottile
ef464b31ac wip 2025-11-19 14:21:09 -05:00
Anthony Sottile
d5c273a2ba refactor gc into store
this will make refactoring this easier later and limits the api surface of Store
2025-11-09 17:03:43 -05:00
anthony sottile
f415f6c4d7 py310+
Committed via https://github.com/asottile/all-repos
2025-10-09 17:44:05 -04:00
JulianMaurin
c78f248c60 Add fail-fast argument for run command 2025-09-06 14:14:23 -04:00
Anthony Sottile
222c62bc5d fix migrate-config for purelib yaml 2024-10-08 11:46:48 -04:00
Anthony Sottile
5679399d90 migrate-config rewrites deprecated stages 2024-09-16 20:36:33 -04:00
Anthony Sottile
364e6d77f0 change migrate-config to use yaml parse tree instead 2024-09-16 20:16:16 -04:00
pre-commit-ci[bot]
917e2102be [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-07-29 21:59:19 +00:00
Anthony Sottile
fc622159a6 fix per-hook fail_fast to not fail on previous failures 2024-03-24 13:17:00 -04:00
Anthony Sottile
7f15dc75ee python3.9+ 2023-10-28 14:20:37 -04:00
Anthony Sottile
c9945b9aa3
Merge pull request #3029 from adamchainz/improve_duration_timing
Improve hook duration timing
2023-10-13 11:49:53 -04:00
Adam Johnson
d988767b41 Improve hook duration timing 2023-10-13 16:40:30 +01:00
Max R
5d692d7e06 Short-circuit hooks 2023-09-11 19:41:40 -04:00
Anthony Sottile
1c439b5a79 shlex.join is always available in 3.8+ 2023-07-01 17:22:42 -04:00
Anthony Sottile
420a15f87e add partial clone hack to fix autoupdate for windows 2023-05-02 09:54:25 -04:00
Anthony Sottile
ddbee32ad0 add --jobs option to autoupdate 2023-04-29 15:42:01 -04:00
Anthony Sottile
4f045cbc21 perform autoupdate without Store contention 2023-04-29 15:32:20 -04:00
Anthony Sottile
e885f2e76e use -C for git commands in autoupdate 2023-04-29 15:12:51 -04:00
Anthony Sottile
4727922b93 use blobless clone for faster autoupdate 2023-04-29 13:29:00 -04:00
Marcelo Galigniana
f39154f69f Add pre-rebase hook support 2023-03-11 15:17:42 -05:00
Anthony Sottile
e3e17a1617 make --hook-type and stages match 2023-03-11 14:26:14 -05:00
Anthony Sottile
d3883ce7f7 move languages.all and languages.helpers out of languages 2023-02-20 18:03:45 -05:00
Anthony Sottile
0c1267b214 deprecate python_venv language 2023-02-04 14:26:09 -05:00
Adam Johnson
7783a3e63a Add --no-textconv to git diff calls 2023-02-03 15:56:11 +00:00
Anthony Sottile
420902f67c fix r local hooks
`language: r` acts more like `language: script` so we have to *not* append
the prefix when run with `repo: local`
2023-01-29 17:27:42 -05:00
Anthony Sottile
628c876b2d adjust the run_hook api to no longer take Hook 2023-01-16 16:34:01 -05:00
Anthony Sottile
ae34a962d7 make in_env part of the language api 2023-01-16 15:36:29 -05:00
Anthony Sottile
619f2bf5a9 eagerly catch invalid yaml in migrate-config 2023-01-09 12:31:05 -05:00
Anthony Sottile
8529a0c1d3 add pre_commit.yaml module 2023-01-02 18:42:34 -05:00
Anthony Sottile
0a0754e44a special rmtree is not needed for TemporaryDirectory in 3.8+ 2023-01-01 17:12:28 -05:00
Anthony Sottile
4a50859936 remove pre-commit-validate-config and pre-commit-validate-manifest 2022-12-27 13:05:30 -05:00
Anthony Sottile
50c217964b
remove obsolete comment 2022-11-27 16:30:58 -05:00
marsha
84b38f7b89 Change cmd_output_bs retcode arg to a boolean check 2022-10-30 14:49:42 -05:00
Anthony Sottile
2405caa352 allow pre-commit run --files ... against unmerged files 2022-08-15 13:46:17 -04:00
Mark Korondi
587c6b97e7
respect aliases in SKIP when installing environments 2022-08-11 09:30:39 +02:00
Matt Whitaker
702ebf402c Expose prepare-commit-msg arguments as environment vars 2022-06-11 14:25:55 -04:00
Anthony Sottile
777ffdd692 deprecate pre-commit-validate-{config,manifest} 2022-04-24 19:08:47 -04:00
Wade Carpenter
feb0d34213
pre-push: fix stdin line splitting when <local ref> has whitespace
From the `pre-push.sample` file:

> Information about the commits which are being pushed is supplied as
> lines to the standard input in the form:
>
>   <local ref> <local sha1> <remote ref> <remote sha1>

When `<local ref>` is not simply a branch name, but a more general
ref (see git-rev-parse(1)), it could contain whitespace, and that
breaks the split() call that expected only 3 spaces in the line.

Changed to use `rsplit(maxsplit=3)` since only the <local ref> is
likely to have embedded whitespace.

Added a new test case for the same.
2022-04-14 14:27:46 -07:00
Anthony Sottile
7602abc3cf
Merge pull request #2322 from pre-commit/default-install-hook-types
implement default_install_hook_types
2022-04-02 15:36:59 -04:00
Anthony Sottile
fd0177ae3a implement default_install_hook_types
this implements a configurable fallback for the default value of `pre-commit install`
2022-04-02 15:11:31 -04:00
Daniel Schürmann
ba132f0200 Split get_git_dir() into get_git_dir() and get_git_common_dir()
This fixes the conflicted state check when using work trees. #1972
2022-04-02 15:07:22 -04:00
Matt Layman
e8b46c1b16 Pick a tag if multiple tags exist on a SHA.
Fixes #2311
2022-03-31 10:37:51 -04:00
Anthony Sottile
04de6a2e57 drop python 3.6 support
python 3.6 reached end of life on 2021-12-23
2022-01-18 18:44:20 -05:00
Anthony Sottile
e3dc3f7934 always use #!/bin/sh on windows 2022-01-05 13:22:49 -05:00
Anthony Sottile
42b0a263a6 run dead, remove dead code
via https://github.com/asottile/dead
2021-12-22 11:30:55 -08:00
Stojan Nedic
63ae399db0 Add fail_fast support per-hook 2021-10-22 19:16:30 -04:00
Anthony Sottile
e622f793c3 port hook template to bash
this avoids some version-specific code in python

this also makes the bootstrap script slightly more portable
2021-09-27 19:34:04 -04:00
Anthony Sottile
ab94dd69f8 fix pre-commit autoupdate for core.useBuiltinFSMonitor=true on windows 2021-09-13 20:01:25 -04:00
Jordan Speicher
4cd8b364dd Add: post-rewrite hook support 2021-09-01 14:50:59 -05:00
Anthony Sottile
726f2ad0a3 remove duplicate warnings while running autoupdate 2021-08-30 20:56:24 -04:00