Commit Graph

123 Commits

Author SHA1 Message Date
Anthony Sottile
b381bb68b7 Support ruby through a combination of rbenv, ruby-build, and GEM_HOME 2014-05-03 23:32:18 -07:00
Anthony Sottile
c5cbd473c7 Simplify Repository.cmd_runner 2014-05-02 22:47:23 -07:00
Anthony Sottile
479eb51873 Implement Store. pre-commit now installs files to ~/.pre-commit 2014-05-02 14:56:47 -07:00
Anthony Sottile
cce97ccba9 Include hook id in output with --verbose. Closes #88. 2014-04-19 22:27:21 -04:00
Anthony Sottile
edb04422b8 Not sure why it was -6. Changed to -1 2014-04-19 15:44:43 -07:00
Anthony Sottile
744b883b01 Add mechanism to skip hooks. Closes #40. 2014-04-19 11:06:25 -07:00
Anthony Sottile
dd0c33fae3 Write files as utf8 more. Closes #85. 2014-04-18 14:05:34 -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
2e4cde9cb0 Simplify has_unmerged_paths 2014-04-13 23:52:52 -07:00
Anthony Sottile
846ddeed67 Fixes crash during merge conflict. Closes #82. 2014-04-13 23:44:53 -07:00
Anthony Sottile
f94f56addf Fix (hopefully) bug where an empty patch was generated. Closes #76 2014-04-13 21:22:08 -07:00
Anthony Sottile
3e2b1862ad Don't stash with --all-files. Closes #68. 2014-04-13 20:04:58 -07:00
Anthony Sottile
8a8b2241a6 Add --no-stash option. 2014-04-13 20:00:10 -07:00
Anthony Sottile
5386b0eea0 Pass write down from commands to logging handler. 2014-04-13 18:43:43 -07:00
Anthony Sottile
374ef75835 Convert LoggingHandler to use sys.stdout.write 2014-04-13 18:36:14 -07:00
Anthony Sottile
de24712a6f Skip hooks if no files to check. Closes #69. 2014-04-13 17:39:58 -07:00
Anthony Sottile
7d4787eced Increase coverage moar 2014-04-13 15:28:48 -07:00
Anthony Sottile
cd36e9e779 Fix Py3 2014-04-13 14:29:45 -07:00
Anthony Sottile
5eda121260 Move stuff into commands and write tests. 2014-04-13 14:07:52 -07:00
Anthony Sottile
366bc1d1cc Fix str() call 2014-04-12 23:46:03 -07:00
Anthony Sottile
bb365a6e68 Python 3 compatibility. 2014-04-12 23:46:03 -07:00
Anthony Sottile
e58d28aad3 yaml extensions and ordereddict are now imported from asottile. 2014-04-12 16:12:10 -07:00
Anthony Sottile
1746a97e24 Better project structure 2014-04-12 15:56:18 -07:00
Anthony Sottile
7a8dcb0ca9 Python 2.6 compatibility for LoggingHandler. Closes #66. 2014-04-07 17:04:21 -07:00
Anthony Sottile
460582dacd Fix node in no-node-case...again. 2014-04-07 11:41:11 -07:00
Anthony Sottile
514a6d66cf Remove incorrect todo comment. 2014-04-05 22:05:18 -07:00
Anthony Sottile
158a3a6d8b Pre-commit stashes unstaged changes on run. Closes #30. 2014-04-05 22:01:29 -07:00
Anthony Sottile
a3720c0645 Add logging handler. 2014-04-05 21:50:20 -07:00
Anthony Sottile
4ed9120ae9 Add staged_files_only context manager. 2014-04-05 19:35:35 -07:00
Anthony Sottile
73e0111e38 Wire in color for pre-commit. Closes #63. 2014-04-05 19:31:31 -07:00
Anthony Sottile
8aa88c7363 Consolidate arguments for run() 2014-04-05 19:21:12 -07:00
Anthony Sottile
6a1f945e31 Add color utility. 2014-04-05 19:12:30 -07:00
Anthony Sottile
e98d2e1e79 Use print_function moar. 2014-04-05 18:58:11 -07:00
Anthony Sottile
7a8cfee9fe Add verbose mode for pre-commit 2014-04-03 23:45:27 -07:00
Anthony Sottile
74363e6ec2 Print message when installing repositories. 2014-04-03 23:31:45 -07:00
Anthony Sottile
bcb00726a1 Clean up directories on failure. Closes #58. 2014-04-03 22:54:27 -07:00
Anthony Sottile
8b5c3b8745 Fix autoupdate spamming with defaults. 2014-04-03 22:11:53 -07:00
Anthony Sottile
817ec510c7 Deepcopy defaults to prevent weird references in yaml. 2014-04-03 21:53:31 -07:00
Anthony Sottile
9a1799b9a8 DRY up validate_* 2014-04-03 20:51:37 -07:00
Anthony Sottile
535be5b33a Actually use the exclude pattern. Closes #47. 2014-03-31 23:35:25 -07:00
Anthony Sottile
ac67af21ec Apply defaults to all of the configs. Much fewer .get()s 2014-03-31 23:22:13 -07:00
Anthony Sottile
b23ad5d6a3 Add jsonschema extension to populate defaults. 2014-03-31 22:49:24 -07:00
Anthony Sottile
5f4996645c Allow exclude pattern to be parsed. 2014-03-31 21:43:26 -07:00
Anthony Sottile
c878e4d551 Remove defaulting behavior of validate_*. It was complicated and unnecessary 2014-03-31 21:26:06 -07:00
Anthony Sottile
fa953d4c2d Implement the clean command. 2014-03-30 18:34:57 -07:00
Anthony Sottile
c418f2b94e Implement no-dependency system and script hook types. Closes #39. 2014-03-30 15:15:13 -07:00
Anthony Sottile
32d2807554 Fix prefixed_command_runner_test to not create real directories. 2014-03-30 14:01:07 -07:00
Anthony Sottile
a116a3fe37 Merge pull request #49 from pre-commit/fix_cwd_problem
Fix cwd problem
2014-03-30 13:29:18 -07:00