mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
add support for post-commit
This commit is contained in:
parent
3b3b33ea29
commit
26adf1d560
7 changed files with 42 additions and 6 deletions
|
|
@ -221,7 +221,8 @@ def _compute_cols(hooks: Sequence[Hook]) -> int:
|
|||
|
||||
|
||||
def _all_filenames(args: argparse.Namespace) -> Collection[str]:
|
||||
if args.hook_stage == 'post-checkout': # no files for post-checkout
|
||||
# these hooks do not operate on files
|
||||
if args.hook_stage in {'post-checkout', 'post-commit'}:
|
||||
return ()
|
||||
elif args.hook_stage in {'prepare-commit-msg', 'commit-msg'}:
|
||||
return (args.commit_msg_filename,)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue