169 Commits

Author SHA1 Message Date
Anthony Sottile
9f60561d6f Replace resources with importlib_resources 2018-10-14 14:37:35 -07:00
Anthony Sottile
3181b461aa fix pushing to new branch not identifying all commits 2018-10-10 20:08:16 -07:00
Anthony Sottile
72d10903d5 Update config 2018-08-15 17:55:06 -07:00
Mickaël Schoentgen
67d6fcb0f6 Fix several ResourceWarning: unclosed file 2018-08-10 18:30:22 +02:00
Anthony Sottile
3f78487769 Support pre-commit install inside a worktree 2018-08-06 09:26:42 -07:00
Matt Layman
a8b298799c Check bytes for Python 3. 2018-07-19 22:11:15 -04:00
Matt Layman
4640dc7b4a Run only the specified hook even when stages exist in config.
This branches fixes the run logic so that when
`pre-commit run some_hook -a` runs when the config contains
`stages: ['commit']` for some other hook, only the hook specified as an
argument will run.

Fixes #772
2018-07-19 21:45:43 -04:00
Anthony Sottile
bffa58753d hook paths are only computed in install_uninstall 2018-07-05 12:49:01 -07:00
Anthony Sottile
c294be513d Fix force-push without fetch 2018-07-02 09:59:23 -07:00
Anthony Sottile
b87c4fd8cc Remove more properties from Runner 2018-07-01 19:49:15 -07:00
Anthony Sottile
c01ffc83f8 Separate store from runner 2018-06-29 22:35:53 -07:00
Anthony Sottile
6d683a5fac clean: separate store from runner 2018-06-29 20:08:23 -07:00
Anthony Sottile
0e430be0ce autoupdate: separate store from runner 2018-06-29 20:04:16 -07:00
Anthony Sottile
37c94bbe71 Fix invalid escape sequences 2018-06-17 23:51:03 -07:00
Anthony Sottile
5b6a5abae9 Consistent ordering of filenames 2018-06-11 12:49:45 -07:00
Anthony Sottile
f88e007f52 Fix test since pip 10 changed output 2018-05-21 21:38:36 -07:00
Anthony Sottile
af93bec4fd Fix regression: try-repo from relative path 2018-03-17 20:02:06 -07:00
Anthony Sottile
c420741585 Merge pull request #726 from pre-commit/typo
Fix typo
2018-03-12 14:55:31 -07:00
Anthony Sottile
96e9d1b758 Restore git 1.8 support 2018-03-12 14:36:07 -07:00
Anthony Sottile
d9d5b1cef1 Fix typo 2018-03-12 14:34:53 -07:00
Anthony Sottile
bf5792eb10 Add a manual stage for cli-only interaction 2018-03-07 12:41:25 -08:00
Anthony Sottile
4088f55ee6 Don't need a shell here 2018-03-07 12:18:54 -08:00
Anthony Sottile
f679983012 Refuse to install with core.hooksPath set 2018-03-03 15:24:14 -08:00
Anthony Sottile
5651c66995 Migrate sha -> rev 2018-02-24 20:19:39 -08:00
Anthony Sottile
184e22e81f Merge pull request #714 from pre-commit/remove_cwd_fn
Move cwd() to tests-only
2018-02-24 17:44:45 -08:00
Anthony Sottile
86da772fd2 Merge pull request #713 from pre-commit/update_many_repos
Allow autoupdate --repo to be specified multiple times
2018-02-24 17:04:18 -08:00
Anthony Sottile
29033f10ca Move cwd() to tests-only 2018-02-24 16:44:59 -08:00
Anthony Sottile
f76d3c4f95 Allow autoupdate --repo to be specified multiple times 2018-02-24 15:42:26 -08:00
Anthony Sottile
d7a41d88c3 Don't write to the home directory under test 2018-02-24 14:36:18 -08:00
Anthony Sottile
5c90c1a68f Rewrite the hook template in python 2018-02-03 22:51:00 -08:00
Bastien Gérard
b319d6f80c Add a hook option that allows stdout to be printed when exit code is 0 (#695) 2018-02-01 12:21:19 +01:00
Anthony Sottile
49dc689bf0 Fix legacy commit-msg hooks 2018-01-29 21:47:35 -08:00
Anthony Sottile
4a6fdd4abe Add test for pushing to unrelated upstream 2018-01-24 09:21:44 -08:00
Anthony Sottile
0f54fedac9 Replace deprecated yield_fixture with fixture
Committed via https://github.com/asottile/all-repos
2018-01-21 15:31:17 -08:00
Anthony Sottile
5a4dc0ce30 https-ify links
- A lot of http links loaded fine on https
- pre-commit.com is now loadable on https via cloudflare
2018-01-13 18:17:54 -08:00
Anthony Sottile
d5dcebf671 Deprecate the pcre language 2018-01-13 17:28:19 -08:00
Anthony Sottile
2255d8484e Update message for unstaged config in test 2018-01-09 08:15:27 -08:00
Kevin Hock
ab47d08a38 Make regression test that ensures autoupdate foo keeps everything else 2017-11-08 18:04:34 -08:00
Anthony Sottile
fccb4e6935 Minor fixes 2017-11-06 18:14:59 -08:00
Kevin Hock
70e7d9c5c4 Keep original test as is, for real 2017-11-06 18:05:13 -08:00
Kevin Hock
e5b8cb0f70 Keep original test as is 2017-11-06 18:05:03 -08:00
Kevin Hock
4d0c400066 Add repo option to autoupdate 2017-11-06 17:19:06 -08:00
Anthony Sottile
5a8ca2ffbe Some minor fixups 2017-10-30 09:12:48 -07:00
Paul Hooijenga
9db827ef9d Refactor meta hooks 2017-10-28 13:59:11 +02:00
Paul Hooijenga
8a0dd01c7e Implement check-files-matches-any meta hook 2017-10-25 10:09:44 +02:00
Paul Hooijenga
8df11ee7aa Implement check-useless-excludes meta hook 2017-10-25 10:09:43 +02:00
Paul Hooijenga
88c676a7c1 Add support for meta hooks 2017-10-22 16:40:19 +02:00
Anthony Sottile
2c88791a7f Add pre-commit try-repo
`try-repo` is useful for:
- Trying out a remote hook repository without needing to configure it.
- Testing a hook repository while developing it.
2017-10-07 18:03:52 -07:00
Anthony Sottile
873dd173ce Use pipes.quote for executable path 2017-09-21 15:16:48 -07:00
Anthony Sottile
ecdc22ce80 Implement global exclude 2017-09-10 15:09:44 -07:00