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
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
7cb3e00731
Only print that the lock is being acquired when waiting
2017-09-04 11:53:17 -07:00
Anthony Sottile
625aaf54aa
Limit repository creation to one process
2017-08-23 20:59:03 -07:00
Anthony Sottile
d0b268c813
Add support for commit-msg git hook
2017-07-23 20:50:25 -07:00
Anthony Sottile
0c70fa4229
Use asottile/add-trailing-comma
2017-07-12 18:30:51 -07:00
Anthony Sottile
a4da7b8c8c
Replace calls to touch with open(..., 'a').close()
2017-07-08 15:43:36 -07:00
Anthony Sottile
964948b33d
Fix non-ascii merge commit messages in python2
2017-05-10 12:52:24 -07:00
Anthony Sottile
7a579af884
Merge pull request #497 from pre-commit/future_versions
...
Make hook-tmpl resilient to future changes
2017-02-23 16:15:23 -05: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
173ce83484
Make hook-tmpl resilient to future changes
2017-02-22 08:48:36 -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
Anthony Sottile
0e2c3c1ff9
Merge pull request #441 from alzeih/patch-1
...
Fix test error "fatal: empty ident name (for <(null)>) not allowed"
2016-12-03 16:47:11 -08:00
alzeih
bdcbdc2e37
Fix test error "fatal: empty ident name (for <(null)>) not allowed"
...
Occurs when tests run with tox not with Travis CI or Appveyor
Changed existing tox setenv statement to use whitespace around `=` as per
http://tox.readthedocs.io/en/latest/example/basic.html#setting-environment-variables
2016-12-04 13:33:41 +13: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
Anthony Sottile
a7169905dc
Centralize logging initialization
2016-11-26 14:19:37 -08:00
Anthony Sottile
82369fd99f
Add utility for parsing shebangs and resolving PATH
2016-04-03 22:54:46 -07:00
Anthony Sottile
57638134e3
Make a helper for running pre-commit as a subprocess under test
2016-02-07 13:03:59 -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
2df1dc9023
Add python3.5, pypy3, and latest git to travis
2015-12-04 14:30:15 -08:00
Anthony Sottile
248930f6dc
Fix appveyor and windows. Resolves #293
2015-11-23 22:28:57 -08:00
Anthony Sottile
6eb260f774
Fixups and test for pre-commit/pre-commit#277
2015-10-08 19:08:49 -07:00
Anthony Sottile
1dfcf10036
git grep -l tmpdir_factory | xargs sed -i 's/tmpdir_factory/tempdir_factory/g'
2015-10-01 10:24:54 -07:00
Dmitriy Kunitskiy
72b61a81f9
fix for issue 246
2015-07-20 17:25:08 -07:00
Anthony Sottile
a97cb38b9a
Handle when the hooks directory is not there on install. Resolves #234 .
2015-05-23 20:02:42 -07:00
Anthony Sottile
7905594215
Don't UnicodeDecodeError on non-ascii not-found hooks. Resolves #207 .
2015-05-22 21:55:08 -07:00
Anthony Sottile
badb41457a
Care less about user installs during test. Resolves #221
2015-05-05 13:19:48 -07:00
Anthony Sottile
143ed94500
Tests pass on windows
2015-02-27 00:48:01 -08:00
Anthony Sottile
02f0a1c434
Actually print while installing
2015-02-22 16:18:46 -08:00
Anthony Sottile
b7141f32c0
Add integration test demonstrating hooks
2015-01-14 20:19:49 -08: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
bbd2572b11
Remove plumbum
2014-10-02 06:59:37 -07:00
Anthony Sottile
fa9db4ec23
Fix terminal width detection.
2014-09-05 14:08:10 -07: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