Paweł Sacawa
6b73138c73
Add: post-merge hook support
2021-02-23 19:00:02 -08:00
surafelabebe
cb5ed6276d
Expose remote branch ref as an environment variable
2021-01-22 13:18:25 -08:00
Anthony Sottile
e6c9b04386
fix symlink test for windows
2020-11-26 09:42:27 -08:00
Anthony Sottile
89ab609732
fix the default value for types_or
2020-11-25 18:21:37 -08:00
Marco Gorelli
62f668fc3f
add types_or
2020-11-02 17:25:10 +00:00
Anthony Sottile
24dfeed89c
Replace EnvironT with MutableMapping[str, str]
2020-10-28 13:00:25 -07:00
Anthony Sottile
5fb721f7a7
normalize slashes even earlier on windows for filenames
2020-06-08 14:53:27 -07:00
Chad Larson
9e0b4a9d4d
pre-commit env var exposed
2020-05-23 17:20:26 -05:00
Dom
928938a6a1
fix hooks firing during staged_files_only
2020-05-02 14:00:21 -07:00
zjeuhpiung liu
605b39f617
fix CJK characters width in output
2020-03-28 08:06:49 -07:00
Anthony Sottile
1b93e26b58
Fix test coverage
2020-02-23 14:53:03 -08:00
Anthony Sottile
d35b00352f
Make more readable --from-ref / --to-ref aliases for --source / --origin
2020-02-23 11:07:57 -08:00
Anthony Sottile
566f1afcd4
Merge pull request #1339 from andrewhare/andrewhare/post-checkout
...
Add post-checkout
2020-02-23 10:39:28 -08:00
Andrew Hare
18fa004254
Add post-checkout
2020-02-23 10:22:18 -08:00
Joey Espinosa
5258dce73b
fix: catch missing arg if using {prepare-}commit-msg stage
...
If using the prepare-commit-msg and commit-msg stages specifically (such
as with the try-repo command), the `--commit-msg-filename` arg must be
provided.
[fixes #1336 ]
chore: improve error message for hook stage check
2020-02-23 10:15:59 -08:00
Anthony Sottile
0bb8a8fabe
Move test to install_uninstall test so environment variables apply
2020-01-16 13:02:20 -08:00
David Martinez Barreiro
57cc814b8b
Push remote env var details
2020-01-16 12:35:04 -08:00
Anthony Sottile
df40e862f4
More miscellaneous cleanup
2020-01-13 11:47:34 -08:00
Anthony Sottile
251721b890
os.symlink is always an attribute in py3
2020-01-12 13:39:53 -08:00
Anthony Sottile
9000e9dd41
Some manual .format() -> f-strings
2020-01-12 13:39:53 -08:00
Anthony Sottile
ab19b94811
some manual py2 cleanups
2020-01-12 09:27:04 -08:00
Anthony Sottile
30c1e8289f
upgrade hooks, pyupgrade pre-commit
2020-01-12 09:27:04 -08:00
Anthony Sottile
97e3371046
Remove deprecated pcre language
2020-01-05 13:58:44 -08:00
Anthony Sottile
0c0427bfbd
Add duration to verbose run
2019-12-28 18:20:10 -08:00
Anthony Sottile
4941ed58d5
Normalize crlf in tests
2019-12-23 18:27:30 -08:00
Anthony Sottile
01a628d96d
Make verbose output less special
2019-12-23 15:51:58 -08:00
Anthony Sottile
6af0e33eed
Add top-level files key for inclusion
2019-12-23 12:04:05 -08:00
Anthony Sottile
707407dd49
Normalize paths on windows to forward slashes
2019-10-19 14:45:23 -07:00
Anthony Sottile
a18646deb2
Allow --hook-type to be specified multiple times
2019-09-23 11:14:36 -07:00
Anthony Sottile
d3474dfff3
make the tests not depend on flake8 being installed
2019-08-28 11:41:03 -07:00
Michael Adkins
02d95c033c
Fixed code style
2019-07-09 13:48:06 -05:00
Michael Adkins
c148845a98
Added hook-stage print to output for missing hook id
2019-07-09 13:06:18 -05:00
Mandar Vaze
3d7b374bef
Pass correct value to git color based on args.color
2019-06-01 17:33:27 +05:30
Mandar Vaze
64f0178b75
Pass color option to git diff unconditionally
2019-06-01 07:40:20 +05:30
Mandar Vaze
4f4767c9e0
Pass color option to git diff (on failure)
...
Fixes #1007
2019-05-31 16:42:16 +05:30
Marc Jay
82969e4ba3
Use set rather than list for commit message related stages, remove
...
default file open modes, tidy up bash call for failing hook test
2019-04-21 21:58:01 +01:00
Marc Jay
e60f541559
Adds support for prepare-commit-msg hooks
...
Adds a prepare-commit-msg hook stage which allows for hooks which add
dynamic suggested/placeholder text to commit messages that an author can
use as a starting point for writing a commit message
2019-04-21 21:07:13 +01:00
Ben Norquist
71a740d65d
add helpful message and test
2019-03-30 14:00:03 -07:00
Anthony Sottile
7a763a9851
Improve testsuite speed on windows by ~23 seconds
2019-03-10 11:27:25 -07: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
9e34e6e316
pre-commit gc
2019-01-02 19:07:23 -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
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