mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-04 11:16:53 +00:00
no-commit-to-branch: Default to both master and main
This commit is contained in:
parent
51e14fcc97
commit
3abbd4785c
3 changed files with 9 additions and 2 deletions
|
|
@ -38,7 +38,7 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
|
|||
)
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
protected = frozenset(args.branch or ('master',))
|
||||
protected = frozenset(args.branch or ('master', 'main'))
|
||||
patterns = frozenset(args.pattern or ())
|
||||
return int(is_on_branch(protected, patterns))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue