Merging upstream version 2.15.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
0c58496b9d
commit
bb75b7dc3e
38 changed files with 396 additions and 59 deletions
|
@ -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'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue