diff options
Diffstat (limited to 'pre_commit/main.py')
-rw-r--r-- | pre_commit/main.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pre_commit/main.py b/pre_commit/main.py index ce850c4..c66cfb9 100644 --- a/pre_commit/main.py +++ b/pre_commit/main.py @@ -67,8 +67,8 @@ class AppendReplaceDefault(argparse.Action): def _add_hook_type_option(parser: argparse.ArgumentParser) -> None: parser.add_argument( '-t', '--hook-type', choices=( - 'pre-commit', 'pre-merge-commit', 'pre-push', - 'prepare-commit-msg', 'commit-msg', 'post-commit', 'post-checkout', + 'pre-commit', 'pre-merge-commit', 'pre-push', 'prepare-commit-msg', + 'commit-msg', 'post-commit', 'post-checkout', 'post-merge', ), action=AppendReplaceDefault, default=['pre-commit'], @@ -136,6 +136,13 @@ def _add_run_options(parser: argparse.ArgumentParser) -> None: 'file from the index, flag=0).' ), ) + parser.add_argument( + '--is-squash-merge', + help=( + 'During a post-merge hook, indicates whether the merge was a ' + 'squash merge' + ), + ) def _adjust_args_and_chdir(args: argparse.Namespace) -> None: |