Commit graph

55 commits

Author SHA1 Message Date
Peter Mosmans
26c6af21ef Add more checks for mingw platform
When the mingw platform is detected, several different path routines will be applied.
2019-06-08 20:07:01 +00:00
Anthony Sottile
dc28922ccb Run pre-commit autoupdate
Committed via https://github.com/asottile/all-repos
2019-03-21 21:09:33 -07:00
DanielChabrowski
888787fb2d Fix try-repo for staged untracked changes 2019-03-18 02:04:50 +01:00
Brett Randall
f5af95cc9d Added test for git.no_git_env().
Signed-off-by: Brett Randall <javabrett@gmail.com>
2019-03-18 10:23:54 +11: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
Anthony Sottile
e60579d9f3 Fix staged-files-only for git add --intent-to-add files 2019-01-08 09:28:57 -08:00
Anthony Sottile
bdc58cc33f Teach pre-commit try-repo to clone uncommitted changes 2019-01-01 15:01:36 -08:00
Anthony Sottile
fe409f1a43 Remove stateful Runner 2018-12-26 22:33:21 -08:00
Anthony Sottile
18b6f4b519 Fix rev-parse for older git versions 2018-09-22 11:12:27 -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
Anthony Sottile
5651c66995 Migrate sha -> rev 2018-02-24 20:19:39 -08:00
Anthony Sottile
2c88791a7f Add pre-commit try-repo
`try-repo` is useful for:
- Trying out a remote hook repository without needing to configure it.
- Testing a hook repository while developing it.
2017-10-07 18:03:52 -07:00
Anthony Sottile
18c9e061d8 Small cleanups 2017-09-30 15:53:44 -07:00
Anthony Sottile
6af60158ec Refactor filename collection for hooks 2017-09-09 22:07:27 -07:00
Anthony Sottile
0815108242 Handle non-ascii filenames from git 2017-09-05 08:10:16 -07:00
Anthony Sottile
0c70fa4229 Use asottile/add-trailing-comma 2017-07-12 18:30:51 -07:00
Anthony Sottile
321210d332 Run git diff with --no-ext-diff 2017-06-09 08:34:04 -07:00
Anthony Sottile
964948b33d Fix non-ascii merge commit messages in python2 2017-05-10 12:52:24 -07:00
Anthony Sottile
068c18d38a Add first class support for golang hooks 2017-01-24 13:49:22 -08:00
Anthony Sottile
ba75867c93 py27+ syntax improvements 2017-01-21 11:49:53 -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
Sander Maijers
1d4a332e04
Clarify/correct error message
The error also occurs if the `git` utility isn't available.
2016-08-16 15:47:17 +02:00
Anthony Sottile
db97cf3329 Don't run on deleted files. Resolves #374 2016-05-25 08:42:02 -07:00
Benjamin Chess
a70abd04e7 include checking symlinks 2016-01-15 12:50:04 -08:00
Anthony Sottile
c3c98afe4f Support pre-commit from inside submodules 2015-12-18 15:35:44 -08:00
Anthony Sottile
3f02a66e37 Use rev-parse --show-toplevel 2015-12-18 08:04:26 -08:00
Anthony Sottile
45d4a195ef Environments are now installed to version-specific locations. Resolves #229 2015-05-16 18:51:14 -07:00
Anthony Sottile
143ed94500 Tests pass on windows 2015-02-27 00:48:01 -08:00
Anthony Sottile
bbd2572b11 Remove plumbum 2014-10-02 06:59:37 -07:00
Anthony Sottile
e3d29a897b Make git errors throw FatalError 2014-08-13 10:43:32 -07:00
Anthony Sottile
85a76617c1 Refactor fixtures in tests. 2014-06-15 18:49:45 -07:00
Anthony Sottile
7b1230df27 Use plumbum a bit better. 2014-06-15 14:19:05 -07:00
Anthony Sottile
c4e4c2dccb Fix merge conflict detection for cherry-pick conflict. 2014-06-13 06:50:17 -07:00
Anthony Sottile
01b557c497 Various cleanup. 2014-06-06 07:38:25 -07:00
Anthony Sottile
3ebf976afb Add logging message. 2014-04-15 09:31:40 -07:00
Anthony Sottile
5810ee4315 Implement merge-files only using @bukzor's method. 2014-04-15 09:17:55 -07:00
Anthony Sottile
94d626691f Move get_head_sha into testing since it is only used by tests. 2014-04-14 09:57:38 -07:00
Anthony Sottile
1746a97e24 Better project structure 2014-04-12 15:56:18 -07:00
Anthony Sottile
535be5b33a Actually use the exclude pattern. Closes #47. 2014-03-31 23:35:25 -07:00
Anthony Sottile
ecdacd474b Simplify the install and uninstall commands and improve tests. 2014-03-23 18:33:18 -07:00
Anthony Sottile
6188903ed7 Make the pre-commit actually executable. Closes #32 2014-03-18 21:40:08 -07:00
Anthony Sottile
bef4a01af9 Don't pass deleted files to pre-commit scripts. 2014-03-16 19:22:38 -07:00
Anthony Sottile
7b1b72e225 Consolidated some code. 2014-03-16 18:40:16 -07:00
Anthony Sottile
bf457349b3 Implement our own rev-parse --top-level 2014-03-14 14:50:04 -07:00
Anthony Sottile
5daed50f75 Actually run things and make pretty output. 2014-03-14 12:09:39 -07:00
Anthony Sottile
da8c435e9c Improve performance on pre-commit -r pyflakes by 40% 2014-03-13 23:48:17 -07:00
Anthony Sottile
abea886a3d Refactored how the installer works 2014-03-13 19:36:44 -07:00