Anthony Sottile
1a3d296d87
Trailing whitespace too
...
Github editor is a fickle beast
2019-02-01 16:47:08 -08:00
Jesse Bona
e2ee95d9b2
Update migrate_config_test.py
...
Added second blank line between test_migrate_config_sha_to_rev and test_empty_configuration_file_user_error
2019-02-02 11:32:09 +11:00
Jesse Bona
8a7142d763
Added test for blank configuration file
2019-02-02 10:38:04 +11:00
Anthony Sottile
b1389603e0
Speed up filename filtering.
...
Before there was a `getcwd` syscall for every filename which was filtered.
Instead this is now cached per-run.
- When all files are identified by filename only: ~45% improvement
- When no files are identified by filename only: ~55% improvement
This makes little difference to overall execution, the bigger win is
eliminating the `memoize_by_cwd` hack. Just removing the memoization would
have *increased* the runtime by 300-500%.
2019-01-23 20:48:41 -08:00
Anthony Sottile
4f8a9580aa
Be more timid about choosing a shebang
2019-01-10 14:26:55 -08:00
Anthony Sottile
bea33af310
small cleanups in tests
2019-01-06 12:08:52 -08:00
Anthony Sottile
d3b5a41830
Implement default_language_version
2019-01-05 13:15:23 -08:00
Anthony Sottile
fc84567923
Default local / meta through cfgv
2019-01-05 08:31:03 -08:00
Anthony Sottile
9e34e6e316
pre-commit gc
2019-01-02 19:07:23 -08:00
Anthony Sottile
bdc58cc33f
Teach pre-commit try-repo to clone uncommitted changes
2019-01-01 15:01:36 -08:00
Anthony Sottile
e4cf5f321b
just use normal dicts in tests
2018-12-31 11:15:22 -08:00
Anthony Sottile
c577ed92e7
Refactor pre_commit.repository and factor out cached-property
2018-12-30 20:56:49 -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
6d40b2a38b
Simplify the skip test to only test skipping
2018-12-27 09:24:41 -08:00
Pedro Algarvio
8ffd1f69d7
Address review comments
2018-12-27 17:18:11 +00:00
Pedro Algarvio
79c8b1fceb
Allow hook alias to be used in SKIP. Includes test.
2018-12-27 12:03:27 +00:00
Pedro Algarvio
b096c0b8f2
Allow aliasing a hook and calling it by it's alias
2018-12-27 12:03:27 +00: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
e15d7cde86
Upgrade the sample config
2018-11-15 14:17:10 -08:00
Milos Pejanovic
bf8c8521cd
Added a test and small change for error output
2018-11-14 00:43:04 +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
72d10903d5
Update config
2018-08-15 17:55:06 -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
Matt Layman
a8b298799c
Check bytes for Python 3.
2018-07-19 22:11:15 -04:00
Matt Layman
4640dc7b4a
Run only the specified hook even when stages exist in config.
...
This branches fixes the run logic so that when
`pre-commit run some_hook -a` runs when the config contains
`stages: ['commit']` for some other hook, only the hook specified as an
argument will run.
Fixes #772
2018-07-19 21:45:43 -04: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
Anthony Sottile
6d683a5fac
clean: separate store from runner
2018-06-29 20:08:23 -07:00
Anthony Sottile
0e430be0ce
autoupdate: separate store from runner
2018-06-29 20:04:16 -07:00
Anthony Sottile
37c94bbe71
Fix invalid escape sequences
2018-06-17 23:51:03 -07:00
Anthony Sottile
5b6a5abae9
Consistent ordering of filenames
2018-06-11 12:49:45 -07:00
Anthony Sottile
f88e007f52
Fix test since pip 10 changed output
2018-05-21 21:38:36 -07:00
Anthony Sottile
af93bec4fd
Fix regression: try-repo from relative path
2018-03-17 20:02:06 -07:00
Anthony Sottile
c420741585
Merge pull request #726 from pre-commit/typo
...
Fix typo
2018-03-12 14:55:31 -07:00
Anthony Sottile
96e9d1b758
Restore git 1.8 support
2018-03-12 14:36:07 -07:00
Anthony Sottile
d9d5b1cef1
Fix typo
2018-03-12 14:34:53 -07:00
Anthony Sottile
bf5792eb10
Add a manual stage for cli-only interaction
2018-03-07 12:41:25 -08:00
Anthony Sottile
4088f55ee6
Don't need a shell here
2018-03-07 12:18:54 -08:00
Anthony Sottile
f679983012
Refuse to install with core.hooksPath set
2018-03-03 15:24:14 -08:00
Anthony Sottile
5651c66995
Migrate sha -> rev
2018-02-24 20:19:39 -08:00
Anthony Sottile
184e22e81f
Merge pull request #714 from pre-commit/remove_cwd_fn
...
Move cwd() to tests-only
2018-02-24 17:44:45 -08:00
Anthony Sottile
86da772fd2
Merge pull request #713 from pre-commit/update_many_repos
...
Allow autoupdate --repo to be specified multiple times
2018-02-24 17:04:18 -08:00