Anthony Sottile
42b0a263a6
run dead, remove dead code
...
via https://github.com/asottile/dead
2021-12-22 11:30:55 -08: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
Jordan Speicher
4cd8b364dd
Add: post-rewrite hook support
2021-09-01 14:50:59 -05:00
Anthony Sottile
54a481c04b
update tests for latest git
2021-08-30 20:48:41 -04:00
Anthony Sottile
0ed646ed09
read legacy hooks in an encoding-agnostic way
2021-06-15 08:32:44 -07:00
Anthony Sottile
b193d9e67b
Merge pull request #1800 from psacawa/post-merge-pr
...
Add support for post-merge hooks
2021-02-27 09:19:40 -08:00
Paweł Sacawa
6b73138c73
Add: post-merge hook support
2021-02-23 19:00:02 -08:00
Anthony Sottile
87dccbb8dc
fix _path_without_us under test when path segment ends in slash
2021-02-23 18:22:12 -08:00
Celeborn2BeAlive
273326b89b
drop python.exe extension on windows on shebang
2020-09-09 12:42:48 -07:00
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