Thomas Romera
36653586a0
update rbenv / ruby-build
2020-09-22 23:03:01 -07:00
Ville Skyttä
e2ed73209a
Add dummy go.mod for local "empty" installs
2020-05-02 21:02:36 +03:00
Ville Skyttä
04471f7d97
Add perl additional dependencies test
2020-02-01 16:13:01 +02: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
0bb8a8fabe
Move test to install_uninstall test so environment variables apply
2020-01-16 13:02:20 -08:00
David Martinez Barreiro
57cc814b8b
Push remote env var details
2020-01-16 12:35:04 -08:00
Anthony Sottile
9000e9dd41
Some manual .format() -> f-strings
2020-01-12 13:39:53 -08:00
Anthony Sottile
aefbe71765
Clean up calls to .encode() / .decode()
2020-01-12 10:46:33 -08:00
Anthony Sottile
327ed924a3
Add types to pre-commit
2020-01-12 10:15:01 -08:00
Anthony Sottile
fa536a8693
mypy passes with check_untyped_defs
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
Uwe L. Korn
4ff23b4eab
Support for conda as a language
2019-12-20 18:43:59 -08:00
John Cooper
1bd745eccf
Added new versions of rbenv and ruby-build
2019-10-28 19:54:14 +00:00
Anthony Sottile
fb15fa65f2
Fix handling of SIGINT in hook script
2019-05-13 12:33:51 -07: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
03ac3b0840
Merge pull request #981 from tristan0x/fix/infinite-process-recursion
...
Do not run legacy script again when this is the one being executed
2019-03-30 13:54:42 -07:00
Anthony Sottile
bbc3130af2
Produce slightly more helpful message
2019-03-30 13:40:37 -07:00
Artem Polishchuk
9f0cfed600
Specify env python explicitly.
2019-03-30 19:56:52 +02:00
Tristan Carel
ec72cb7260
assert that the pre-commit script being executed is not the legacy
2019-03-29 13:55:04 +01:00
Tristan Carel
cd61269389
Do not run legacy script again when this is the one being executed
2019-03-27 06:24:47 +01: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
Anthony Sottile
7e69d117c6
Work around sys.executable issue using brew python on macos
...
https://github.com/Homebrew/homebrew-core/issues/30445
2018-07-24 16:05:26 -07:00
Anthony Sottile
c294be513d
Fix force-push without fetch
2018-07-02 09:59:23 -07:00
Chris Kuehl
5ac2ba0f7b
Make local hooks work
2018-05-24 19:42:58 -07: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
Sam Duke
1bfd108593
Properly detect if commit is a root commit
...
Fix bad check for ancestor root commits.
2018-01-24 14:01:59 +00:00
Anthony Sottile
916ca72bb1
Use some bash best practices and simplify hook template
2017-09-21 16:09:49 -07:00
Anthony Sottile
873dd173ce
Use pipes.quote for executable path
2017-09-21 15:16:48 -07:00
Anthony Sottile
bfa23f1f4f
Merge pull request #606 from pre-commit/minor-hook-tmpl-fixups
...
Fix error message during pre-push / commit-msg
2017-09-05 10:22:43 -07:00
Anthony Sottile
7c59607d35
Fix error message during pre-push / commit-msg
2017-09-05 09:33:51 -07:00
Anthony Sottile
95f356d64e
Also add run to the other invocations
2017-09-05 09:29:18 -07:00
Anthony Sottile
eb7c9f44b4
Add test for custom config installation
2017-09-05 09:27:00 -07:00
wanghui
f9a849abcc
Fix specify config file not work while installing
...
Via `pre-commit install -c .other-config.yaml`
2017-09-05 16:22:54 +08:00
Anthony Sottile
d0b268c813
Add support for commit-msg git hook
2017-07-23 20:50:25 -07:00
Anthony Sottile
dbd131f646
Minor fixups
2017-02-23 13:11:40 -08:00
Filippos Giannakos
2f4199850d
Add --allow-missing-config option to install
...
When no '.pre-commit-config.yaml' file exists while `pre-commit` hooks
are enabled, `pre-commit` returns an error and the action is aborted.
This is a very common scenario when pre-commit is added later on a
project and the user wants to work on a previous branch where the
configuration file does not exist.
This commits allow the user to optionally install the `pre-commit` hooks
with an option to allow a missing configuration and trigger only the
legacy pre-commit hooks (if any) when it is missing.
2017-02-23 18:25:51 +02:00
Anthony Sottile
aa72fe5d3f
Make the dummy gem valid by giving it a summary
2017-02-16 10:07:04 -08:00
Anthony Sottile
f000241dcb
Local repositories clone a blank repo
2017-02-15 15:36:53 -08:00
Anthony Sottile
36cfeac952
hook-tmpl doesn't need executable bit, we set it
2017-02-15 08:51:06 -08:00
Filippos Giannakos
8c78ddfd5c
Improve pre-push fileset for a new remote branch
...
When pushing a branch that does not exist on the remote repository,
instead of blindly running the checks on every file, this commit locates
the first ancestor not present on the remote repository and uses its
parent as the source of the fileset calculation. If it has no parents,
then the remote repository has no common commits and the checks should
be run on all files.
2017-02-14 19:19:35 +02:00
alzeih
bbbc29af6f
Update the archive resources
2016-12-03 17:39:41 +13:00
Anthony Sottile
6eb260f774
Fixups and test for pre-commit/pre-commit#277
2015-10-08 19:08:49 -07:00
Barry Steyn
e216b0b2cc
Fix bug - pushing on an empty changeset
2015-10-08 11:26:18 -07:00
Barry Steyn
dd73ffd02f
Filtering of hooks for commit or push stages
2015-10-05 07:17:20 -07:00
Chris Kuehl
ec6f6cc854
Make pre-push-tmpl non-executable
2015-07-25 22:33:38 -07:00
Anthony Sottile
febb270afe
Bump magic numbers
2015-01-14 20:27:37 -08:00
dongweiming
b707cbba06
Make pre_commit also support pre-push hook
2015-01-14 19:26:37 -08:00