Commit Graph

56 Commits

Author SHA1 Message Date
marsha
84b38f7b89 Change cmd_output_bs retcode arg to a boolean check 2022-10-30 14:49:42 -05:00
Daniel Schürmann
ba132f0200 Split get_git_dir() into get_git_dir() and get_git_common_dir()
This fixes the conflicted state check when using work trees. #1972
2022-04-02 15:07:22 -04:00
Anthony Sottile
04de6a2e57 drop python 3.6 support
python 3.6 reached end of life on 2021-12-23
2022-01-18 18:44:20 -05:00
Marius Zwicker
4eb91cdd8e support gitconfig from env
Add exceptions to the git env so externally configured gitconfig
values set via GIT_CONFIG_KEY_<n>, GIT_CONFIG_VALUE_<n> and
GIT_CONFIG_COUNT get passed through.
2021-11-22 19:40:30 -05:00
Anthony Sottile
0fe959df60 fall back to full diff on disparate histories 2021-08-09 20:13:15 -04:00
Anthony Sottile
14d3af25eb add test for worktree inside of .git dir 2021-03-07 14:43:32 -08:00
Anthony Sottile
f75fc6b2a8 fix execution in worktrees in subdirectories of bare repositories 2021-01-27 10:08:48 -08:00
Anthony Sottile
6ee9e13b26 prevent infinite recursion of post-checkout on clone 2020-06-09 10:18:22 -07: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
30c1e8289f upgrade hooks, pyupgrade pre-commit 2020-01-12 09:27:04 -08: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
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
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
29033f10ca Move cwd() to tests-only 2018-02-24 16:44:59 -08: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
68ce070b65 Remove --unshallow fetch from travis-ci config 2017-09-05 17:13:14 -07:00
Anthony Sottile
0815108242 Handle non-ascii filenames from git 2017-09-05 08:10:16 -07:00
Anthony Sottile
6793fd8e5d Remove --no-stash and --allow-unstaged-config 2017-08-23 11:16:37 -07:00
Anthony Sottile
096f906912 More specific symlink testing without checking in a symlink 2017-07-02 21:49:41 -07:00
Anthony Sottile
964948b33d Fix non-ascii merge commit messages in python2 2017-05-10 12:52:24 -07:00
Anthony Sottile
b9e5184ebd Introduce .pre-commit-hooks.yaml as a replacement for hooks.yaml 2017-01-21 13:47:59 -08:00
Anthony Sottile
ba75867c93 py27+ syntax improvements 2017-01-21 11:49:53 -08: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
1dfcf10036 git grep -l tmpdir_factory | xargs sed -i 's/tmpdir_factory/tempdir_factory/g' 2015-10-01 10:24:54 -07: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
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
047a933554 Move empty_git_dir out of pytest fixtures. 2014-06-15 15:47:11 -07:00
Anthony Sottile
7b1230df27 Use plumbum a bit better. 2014-06-15 14:19:05 -07:00
Anthony Sottile
111ed02938 git mv pre_commit/run.py pre_commit/main.py 2014-06-13 19:52:08 -07:00
Anthony Sottile
c4e4c2dccb Fix merge conflict detection for cherry-pick conflict. 2014-06-13 06:50:17 -07:00
Anthony Sottile
5810ee4315 Implement merge-files only using @bukzor's method. 2014-04-15 09:17:55 -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
c62c1a3b51 manifest -> hooks 2014-03-30 13:12:40 -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
6649e180bb Adds some tests for get_files_matching 2014-03-16 19:11:33 -07:00
Anthony Sottile
abea886a3d Refactored how the installer works 2014-03-13 19:36:44 -07:00
Ken Struys
1d8af9ce50 moved the installing code to its own package 2014-03-13 17:31:58 -07:00
Ken Struys
320bb0a679 hopefully unbreaking the build 2014-03-13 17:06:23 -07:00