mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add support for commit-msg git hook
This commit is contained in:
parent
a6a4762f0d
commit
d0b268c813
9 changed files with 107 additions and 57 deletions
|
|
@ -76,7 +76,7 @@ def main(argv=None):
|
|||
),
|
||||
)
|
||||
install_parser.add_argument(
|
||||
'-t', '--hook-type', choices=('pre-commit', 'pre-push'),
|
||||
'-t', '--hook-type', choices=('pre-commit', 'pre-push', 'commit-msg'),
|
||||
default='pre-commit',
|
||||
)
|
||||
install_parser.add_argument(
|
||||
|
|
@ -149,6 +149,10 @@ def main(argv=None):
|
|||
'--source', '-s',
|
||||
help="The remote branch's commit_id when using `git push`.",
|
||||
)
|
||||
run_parser.add_argument(
|
||||
'--commit-msg-filename',
|
||||
help='Filename to check when running during `commit-msg`',
|
||||
)
|
||||
run_parser.add_argument(
|
||||
'--allow-unstaged-config', default=False, action='store_true',
|
||||
help=(
|
||||
|
|
@ -157,7 +161,8 @@ def main(argv=None):
|
|||
),
|
||||
)
|
||||
run_parser.add_argument(
|
||||
'--hook-stage', choices=('commit', 'push'), default='commit',
|
||||
'--hook-stage', choices=('commit', 'push', 'commit-msg'),
|
||||
default='commit',
|
||||
help='The stage during which the hook is fired e.g. commit or push.',
|
||||
)
|
||||
run_parser.add_argument(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue