summaryrefslogtreecommitdiffstats
path: root/pre_commit/main.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-06 04:23:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-06 04:24:09 +0000
commit1968ada2d36e4508ef787e57f0e5f63214bcbad7 (patch)
tree69c01b5108b09faafa39e56ae48add8a2439f9db /pre_commit/main.py
parentReleasing debian version 2.14.0-2. (diff)
downloadpre-commit-1968ada2d36e4508ef787e57f0e5f63214bcbad7.tar.xz
pre-commit-1968ada2d36e4508ef787e57f0e5f63214bcbad7.zip
Merging upstream version 2.15.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/main.py')
-rw-r--r--pre_commit/main.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pre_commit/main.py b/pre_commit/main.py
index ad3d873..2b50c91 100644
--- a/pre_commit/main.py
+++ b/pre_commit/main.py
@@ -69,6 +69,7 @@ def _add_hook_type_option(parser: argparse.ArgumentParser) -> None:
'-t', '--hook-type', choices=(
'pre-commit', 'pre-merge-commit', 'pre-push', 'prepare-commit-msg',
'commit-msg', 'post-commit', 'post-checkout', 'post-merge',
+ 'post-rewrite',
),
action=AppendReplaceDefault,
default=['pre-commit'],
@@ -146,6 +147,13 @@ def _add_run_options(parser: argparse.ArgumentParser) -> None:
'squash merge'
),
)
+ parser.add_argument(
+ '--rewrite-command',
+ help=(
+ 'During a post-rewrite hook, specifies the command that invoked '
+ 'the rewrite'
+ ),
+ )
def _adjust_args_and_chdir(args: argparse.Namespace) -> None: