mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2025-08-14 17:31:28 +08:00
no-commit-to-branch: Default to both master and main
This commit is contained in:
@ -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))
|
||||
|
||||
|
Reference in New Issue
Block a user