Anthony Sottile
35dd1907b6
Merge pull request #944 from minrk/respect-git-exec-path
...
don't unset GIT_EXEC_PATH
2019-02-18 08:14:34 -08:00
Anthony Sottile
6088b1f995
3 slashes works around an npm bug
...
https://npm.community/t/npm-install-g-git-file-c-path-to-repository-does-not-work-on-windows/5453
2019-02-17 12:17:46 -08:00
Anthony Sottile
136834038d
Use npm install git+file:// instead of npm install .
2019-02-17 10:14:21 -08:00
Min RK
9cde231665
respect GIT_EXEC_PATH env
...
This env may be required for git to work,
unsetting it can cause clone to fail
occurs with bundled git, e.g. Fork git client
2019-02-16 09:14:11 +01:00
Benjamin Bariteau
db04d612e0
pass GIT_SSH_COMMAND to git commands, refs #947
2019-02-15 14:37:53 -08:00
Jesse Bona
f2be2ead35
Update migrate_config.py
...
Corrected loop condition to not run if configuration file only contains new lines.
2019-02-02 10:34:53 +11:00
Jesse Bona
7b491c7110
Update migrate_config.py
...
Added if statement to prevent looping through header lines if configuration file is empty
2019-02-01 19:15:59 +11:00
Anthony Sottile
29460606b2
Migrate to official pycqa/flake8 hooks repo
...
Committed via https://github.com/asottile/all-repos
2019-01-30 00:39:01 -08:00
Andrew S. Brown
1eed1b51b8
Address PR feedback
2019-01-27 17:55:11 -08:00
Andrew S. Brown
fe5390c068
Ensure that GOBIN is not set when installing a golang hook
...
If GOBIN is set, it will be used as the install path instead of the first item
from GOPATH followed by "/bin". If it is used, commands will not be isolated
between different repos.
2019-01-27 13:34:47 -08: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
32d65236bf
Use sys.executable if it matches the requested version
2019-01-10 06:48:49 -08:00
Anthony Sottile
e60579d9f3
Fix staged-files-only for git add --intent-to-add files
2019-01-08 09:28:57 -08:00
Anthony Sottile
bd65d8947f
Implement default_stages
2019-01-06 10:32:58 -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
e4f0b4c1b7
Only configure logging inside the context
2019-01-01 15:01:37 -08:00
Anthony Sottile
bdc58cc33f
Teach pre-commit try-repo to clone uncommitted changes
2019-01-01 15:01:36 -08:00
Anthony Sottile
4da461d90a
Fix try-repo relpath while in a sub-directory
2019-01-01 11:57:06 -08:00
Anthony Sottile
4f9d0397b5
Add more 'no cover windows' comments
2018-12-31 14:06:10 -08:00
Anthony Sottile
b59d7197ff
Use Hook api in languages
2018-12-31 13:16:48 -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
a49a34ef3d
Add identity meta hook
2018-12-29 13:13:31 -08:00
Anthony Sottile
2af0b0b4f3
better no-cover for windows
2018-12-27 18:25:52 -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
5840f880a9
Address review comments and test failures
2018-12-27 12:03:27 +00:00
Pedro Algarvio
afbc57f2ad
Go back to optional. Requires less changes to existing code.
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
c5c0a0699b
Merge pull request #895 from pre-commit/rip_runner
...
Remove stateful Runner
2018-12-26 23:11:38 -08:00
Anthony Sottile
2b8291d18f
add a no-cover for py3 [ci skip]
2018-12-26 22:45:13 -08: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
435d9945a3
Switch from deprecated docs-off args to --no-document
2018-12-19 14:22:09 -08:00
Chris Kuehl
45e3dab00d
Shuffle arguments before running hooks
2018-11-19 17:53:19 -08:00
Anthony Sottile
e15d7cde86
Upgrade the sample config
2018-11-15 14:17:10 -08:00
Anthony Sottile
dc84f21dd4
Merge pull request #857 from runz0rd/master
...
Reraises InvalidManifestError as RepositoryCannotBeUpdatedError
2018-11-14 17:29:43 -08:00
Anthony Sottile
aaa3976a29
Use text_type instead of str()
2018-11-13 17:23:32 -08:00
Milos Pejanovic
e339de22d7
Added requested changes
2018-11-14 01:59:18 +01:00
Milos Pejanovic
bf8c8521cd
Added a test and small change for error output
2018-11-14 00:43:04 +01:00
Anthony Sottile
6bac405d40
Minor cleanups
2018-11-01 18:05:36 -07:00
Milos Pejanovic
1c97d3f5fd
Added a try except block which reraises InvalidManifestError as RepositoryCannotBeUpdatedError
2018-10-31 17:39:47 +01:00
Chris Kuehl
9125439c3a
Force serial hook runs during tests
2018-10-24 16:33:06 -07:00
Chris Kuehl
aa50a8cde0
Switch to using concurrent.futures
2018-10-24 16:33:06 -07:00
Chris Kuehl
b6926e8e2e
Attempt to partition files to use all possible cores
2018-10-24 16:33:06 -07:00
Chris Kuehl
ec0ed8aef5
Handle CPU detection errors and running on Travis
2018-10-24 16:16:13 -07:00
Chris Kuehl
ba5e27e4ec
Implement concurrent execution of individual hooks
2018-10-24 16:16:10 -07:00