Commit Graph

45 Commits

Author SHA1 Message Date
Anthony Sottile
918179849d Make autoupdate --tags-only the default, add --bleeding-edge 2017-04-29 17:40:42 -07:00
Anthony Sottile
fa06e72f01 Add a pre-commit sample-config command 2017-03-30 08:45:46 -07:00
Joel Bastos
b14fa5a0d8 Fix typos on help description 2017-03-10 17:11:09 +00:00
Anthony Sottile
05c88738b0 Add a --show-diff-on-failure option 2017-02-25 10:14:17 -08: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
109c17c5df Some minor constants cleanup 2017-02-16 10:44:08 -08:00
Anthony Sottile
52cd42316c Add a --tags-only option to autoupdate 2017-01-25 21:02:50 -08:00
Anthony Sottile
f238495d6b Add an install-hooks command (similar to install --install-hooks). Resolves #456 2017-01-04 07:52:16 -08:00
Jacob Scott
372069f3e5 minor cleanup 2016-12-03 10:47:38 -08:00
Jacob Scott
f205e6d170 Incoroporate PR feedback
* Make config_file a required argument to Runner
* Update main.py
* Update tests to make them all green

New test to test alternate config functionality coming in next commit
2016-12-02 13:53:59 -08:00
Jacob Scott
f1c00eefe4 Add option to run from alternate config file 2016-12-02 11:30:45 -08:00
Anthony Sottile
4e0f73bbf3 Add cygwin check after initialization. Resolves #437 2016-11-26 15:16:55 -08:00
Anthony Sottile
526abd9251 Warn on cygwin python/git mismatch. Resolves #354 2016-11-26 14:44:29 -08:00
Anthony Sottile
a7169905dc Centralize logging initialization 2016-11-26 14:19:37 -08:00
Anthony Sottile
b81c9802ae Remove py26 format literals
Resolves #403
2016-09-15 08:41:58 -07:00
Anthony Sottile
eb6da4ae10 Improve --color help with argparse metavar 2016-03-08 16:34:09 -08:00
Brett
4bb2bfea52 Add periods to help texts for all run commands. 2016-03-08 15:57:55 -08:00
Brett
e0f1a34319 Style: fixed line length 2016-03-08 15:51:28 -08:00
Brett
23a140aa30 Improve help text
Add choices to --color help text.
Fix typo in --allow-unstaged-config.
2016-03-08 11:31:21 -08:00
Lucas Cimon
941149942d Making it possible to invoke pre-commit run --files some.file from a subdirectory of the repository 2016-02-07 12:25:51 -08:00
Anthony Sottile
495fefd316 Fix #322 by only removing git environment variables while cloning 2015-12-22 19:10:08 -08:00
Anthony Sottile
c3c98afe4f Support pre-commit from inside submodules 2015-12-18 15:35:44 -08:00
Anthony Sottile
d17063862b Fix issue #300 by removing GIT_WORK_TREE env variable 2015-11-23 16:30:24 -08:00
Anthony Sottile
223f0d4dfb v0.6.0 2015-10-05 07:53:34 -07:00
Barry Steyn
dd73ffd02f Filtering of hooks for commit or push stages 2015-10-05 07:17:20 -07:00
Anthony Sottile
3eba6ff48a Fix quoting in help 2015-09-30 17:15:02 -07:00
Anthony Sottile
7905594215 Don't UnicodeDecodeError on non-ascii not-found hooks. Resolves #207. 2015-05-22 21:55:08 -07:00
8geese
fdc2a889de fix for #157 2015-05-10 15:48:21 -07:00
Anthony Sottile
cdf726bbed Make isolated environments more isolated under OSX and pyvenv. Resolves #217. 2015-04-08 13:59:30 -07:00
Anthony Sottile
931c69b3fa Simplify a few things 2015-01-14 19:26:38 -08:00
dongweiming
b707cbba06 Make pre_commit also support pre-push hook 2015-01-14 19:26:37 -08:00
Anthony Sottile
fd109b7745 reorder-python-imports 2015-01-04 15:49:19 -08:00
Anthony Sottile
d8d7893cf7 Add ability to pass filenames as arguments. 2014-09-16 17:27:40 -07:00
William Ting
f0352bf0be Update autoupdate help message. 2014-09-02 18:46:18 -07:00
Anthony Sottile
32817f3958 Remove @entry 2014-08-13 11:02:40 -07:00
Anthony Sottile
9a017dcbe9 Add error_handler and use it. 2014-08-13 11:02:28 -07:00
Anthony Sottile
76ffb3665a Merge pull request #135 from pre-commit/install_hooks
Support --install-hooks as an option for pre-commit install
2014-07-03 19:38:56 -07:00
Anthony Sottile
90648bc9ec Add tests for main. 2014-07-03 19:19:55 -07:00
Anthony Sottile
bdbf1cfdb1 Support --install-hooks as an option for pre-commit install 2014-07-03 17:22:32 -07:00
Anthony Sottile
f4d16b9cdc Combine install and uninstall. 2014-06-16 17:45:13 -07:00
Anthony Sottile
ac735e85e2 Make install -f / --overwrite work. 2014-06-16 17:41:16 -07:00
Anthony Sottile
a7506061bd Add -V / --version 2014-06-15 12:49:51 -07:00
Anthony Sottile
cdfd3f7670 Move commands into their own files. 2014-06-13 19:52:14 -07:00
Anthony Sottile
111ed02938 git mv pre_commit/run.py pre_commit/main.py 2014-06-13 19:52:08 -07:00