diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-03-19 10:19:07 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-03-19 10:19:07 +0000 |
commit | 48bb2fbcf5dc4b7c775f9745dcd2a02588e37300 (patch) | |
tree | 610ea82daf36c55d57749047efe9baf484b99f0b /pre_commit/main.py | |
parent | Releasing debian version 3.1.1-1. (diff) | |
download | pre-commit-48bb2fbcf5dc4b7c775f9745dcd2a02588e37300.tar.xz pre-commit-48bb2fbcf5dc4b7c775f9745dcd2a02588e37300.zip |
Merging upstream version 3.2.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/main.py')
-rw-r--r-- | pre_commit/main.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/pre_commit/main.py b/pre_commit/main.py index 3915993..9615c5e 100644 --- a/pre_commit/main.py +++ b/pre_commit/main.py @@ -7,6 +7,7 @@ import sys from typing import Sequence import pre_commit.constants as C +from pre_commit import clientlib from pre_commit import git from pre_commit.color import add_color_option from pre_commit.commands.autoupdate import autoupdate @@ -52,7 +53,7 @@ def _add_config_option(parser: argparse.ArgumentParser) -> None: def _add_hook_type_option(parser: argparse.ArgumentParser) -> None: parser.add_argument( '-t', '--hook-type', - choices=C.HOOK_TYPES, action='append', dest='hook_types', + choices=clientlib.HOOK_TYPES, action='append', dest='hook_types', ) @@ -73,7 +74,10 @@ def _add_run_options(parser: argparse.ArgumentParser) -> None: help='When hooks fail, run `git diff` directly afterward.', ) parser.add_argument( - '--hook-stage', choices=C.STAGES, default='commit', + '--hook-stage', + choices=clientlib.STAGES, + type=clientlib.transform_stage, + default='pre-commit', help='The stage during which the hook is fired. One of %(choices)s', ) parser.add_argument( @@ -104,6 +108,17 @@ def _add_run_options(parser: argparse.ArgumentParser) -> None: ), ) parser.add_argument( + '--pre-rebase-upstream', help=( + 'The upstream from which the series was forked.' + ), + ) + parser.add_argument( + '--pre-rebase-branch', help=( + 'The branch being rebased, and is not set when ' + 'rebasing the current branch.' + ), + ) + parser.add_argument( '--commit-msg-filename', help='Filename to check when running during `commit-msg`', ) |