Commit graph

97 commits

Author SHA1 Message Date
Anthony Sottile
3a0406847b fix excess whitespace in traceback in error 2020-09-07 15:01:50 -07:00
Dom
928938a6a1 fix hooks firing during staged_files_only 2020-05-02 14:00:21 -07:00
ModischFabrications
26adf1d560 add support for post-commit 2020-04-27 10:55:22 -07:00
Anthony Sottile
67c1beb322 Use covdefaults to handle coveragerc 2020-02-29 14:25:19 -08:00
Anthony Sottile
53052fe019 Ensure files aren't passed to post-checkout hooks 2020-02-23 11:38:16 -08:00
Andrew Hare
18fa004254 Add post-checkout 2020-02-23 10:22:18 -08:00
Anthony Sottile
cc45b5e57b Improve git hook shebang creation 2020-02-07 09:09:17 -08:00
Anthony Sottile
95b8d71bd9 Move most of the actual hook script into pre-commit hook-impl 2020-01-21 16:41:22 -08:00
Anthony Sottile
32d32e3743 work around broken bash in azure pipelines 2020-01-21 14:58:03 -08:00
Anthony Sottile
0bb8a8fabe Move test to install_uninstall test so environment variables apply 2020-01-16 13:02:20 -08:00
Anthony Sottile
df40e862f4 More miscellaneous cleanup 2020-01-13 11:47:34 -08:00
Anthony Sottile
251721b890 os.symlink is always an attribute in py3 2020-01-12 13:39:53 -08:00
Anthony Sottile
2a9893d0f0 mkdirp -> os.makedirs(..., exist_ok=True) 2020-01-12 13:39:53 -08:00
Anthony Sottile
9000e9dd41 Some manual .format() -> f-strings 2020-01-12 13:39:53 -08:00
Anthony Sottile
ab19b94811 some manual py2 cleanups 2020-01-12 09:27:04 -08:00
Anthony Sottile
30c1e8289f upgrade hooks, pyupgrade pre-commit 2020-01-12 09:27:04 -08:00
Anthony Sottile
c699e255a1 support pre-merge-commit 2019-12-26 21:21:00 -08:00
Anthony Sottile
4941ed58d5 Normalize crlf in tests 2019-12-23 18:27:30 -08:00
Anthony Sottile
01a628d96d Make verbose output less special 2019-12-23 15:51:58 -08:00
Anthony Sottile
a18646deb2 Allow --hook-type to be specified multiple times 2019-09-23 11:14:36 -07:00
Anthony Sottile
9a52eefc99 Implement pre-commit init-templatedir 2019-07-20 20:33:42 -07:00
Anthony Sottile
e868add5a3 Fix test_environment_not_sourced when pre-commit is installed globally 2019-05-26 17:03:15 -07:00
Anthony Sottile
af2c6de9ae Fix double legacy install on windows 2019-04-27 15:10:01 -07:00
Marc Jay
82969e4ba3 Use set rather than list for commit message related stages, remove
default file open modes, tidy up bash call for failing hook test
2019-04-21 21:58:01 +01:00
Marc Jay
e60f541559 Adds support for prepare-commit-msg hooks
Adds a prepare-commit-msg hook stage which allows for hooks which add
dynamic suggested/placeholder text to commit messages that an author can
use as a starting point for writing a commit message
2019-04-21 21:07:13 +01:00
Anthony Sottile
4f8a9580aa Be more timid about choosing a shebang 2019-01-10 14:26:55 -08:00
Anthony Sottile
d3b5a41830 Implement default_language_version 2019-01-05 13:15:23 -08:00
Anthony Sottile
160a11a0a7 Improve git_commit helper 2018-12-28 15:32:25 -08:00
Pedro Algarvio
28c97a95cd
Don't fail if GPG signing is configured by default. All references. 2018-12-28 20:11:37 +00:00
Anthony Sottile
d46bbc486f Use in_git_dir in more places 2018-12-27 18:25:54 -08:00
Anthony Sottile
2af0b0b4f3 better no-cover for windows 2018-12-27 18:25:52 -08:00
Anthony Sottile
fe409f1a43 Remove stateful Runner 2018-12-26 22:33:21 -08:00
Anthony Sottile
de942894ff Pick a better python shebang for hook executable 2018-12-25 12:11:02 -08:00
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
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
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
96e9d1b758 Restore git 1.8 support 2018-03-12 14:36:07 -07:00
Anthony Sottile
f679983012 Refuse to install with core.hooksPath set 2018-03-03 15:24:14 -08:00
Anthony Sottile
29033f10ca Move cwd() to tests-only 2018-02-24 16:44:59 -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
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
873dd173ce Use pipes.quote for executable path 2017-09-21 15:16:48 -07:00
Anthony Sottile
eb7c9f44b4 Add test for custom config installation 2017-09-05 09:27:00 -07:00