Commit Graph

22 Commits

Author SHA1 Message Date
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
Anthony Sottile 598e54640b Use virtualenv python from install-time for less virtualenv requirements at commit time. 2014-09-04 10:19:20 -07:00
Anthony Sottile c7b605fee2 Add the archive resources. 2014-06-23 13:06:14 -07:00
Anthony Sottile f63fa850c9 Use less readlink for osx peeps. 2014-06-17 20:17:47 -07:00
Anthony Sottile 5e8a6414cd Use either pre-commit or python -m pre_commit.main. 2014-06-17 17:01:51 -07:00
Anthony Sottile 1d8394afd0 Add first pass at migration mode. 2014-06-16 15:31:22 -07:00
Anthony Sottile a744a6484e git mv pre_commit/resources/pre-commit.sh pre_commit/resources/pre-commit-hook 2014-06-16 13:07:54 -07:00
Anthony Sottile 47b7ca44ed Improve failure message for pre-commit. Closes #36 2014-03-22 17:21:17 -07:00
Ken Struys 7e74821a5d added install and uninstall hooks 2014-03-13 13:59:05 -07:00