diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 04:23:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 04:23:44 +0000 |
commit | 8b9f67e46f462980dd0877e752954a07bfecdb32 (patch) | |
tree | 7455f28cae7a78fdec431903475978bbff39f984 /pre_commit/commands/run.py | |
parent | Adding upstream version 2.14.0. (diff) | |
download | pre-commit-8b9f67e46f462980dd0877e752954a07bfecdb32.tar.xz pre-commit-8b9f67e46f462980dd0877e752954a07bfecdb32.zip |
Adding upstream version 2.15.0.upstream/2.15.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/commands/run.py')
-rw-r--r-- | pre_commit/commands/run.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py index d906d5b..95ad5e9 100644 --- a/pre_commit/commands/run.py +++ b/pre_commit/commands/run.py @@ -245,7 +245,9 @@ def _compute_cols(hooks: Sequence[Hook]) -> int: def _all_filenames(args: argparse.Namespace) -> Collection[str]: # these hooks do not operate on files - if args.hook_stage in {'post-checkout', 'post-commit', 'post-merge'}: + if args.hook_stage in { + 'post-checkout', 'post-commit', 'post-merge', 'post-rewrite', + }: return () elif args.hook_stage in {'prepare-commit-msg', 'commit-msg'}: return (args.commit_msg_filename,) @@ -386,6 +388,9 @@ def run( if args.is_squash_merge: environ['PRE_COMMIT_IS_SQUASH_MERGE'] = args.is_squash_merge + if args.rewrite_command: + environ['PRE_COMMIT_REWRITE_COMMAND'] = args.rewrite_command + # Set pre_commit flag environ['PRE_COMMIT'] = '1' |