Allow multiple branches to be protected

Original patch by @moas
This commit is contained in:
Anthony Sottile 2018-06-09 11:16:14 -07:00
parent 2aa7aeb572
commit baec308367
3 changed files with 22 additions and 9 deletions

View file

@ -82,7 +82,10 @@ Add this to your `.pre-commit-config.yaml`
- `name-tests-test` - Assert that files in tests/ end in `_test.py`.
- Use `args: ['--django']` to match `test*.py` instead.
- `no-commit-to-branch` - Protect specific branches from direct checkins.
- Use `args: -b <branch> ` to set the branch. `master` is the default if no argument is set.
- Use `args: [--branch <branch>]` to set the branch. `master` is the
default if no argument is set.
- `-b` / `--branch` may be specified multiple times to protect multiple
branches.
- `pyflakes` - Run pyflakes on your python files.
- `pretty-format-json` - Checks that all your JSON files are pretty. "Pretty"
here means that keys are sorted and indented. You can configure this with