mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add a --show-diff-on-failure option
This commit is contained in:
parent
0ece39c484
commit
05c88738b0
3 changed files with 32 additions and 1 deletions
|
|
@ -149,6 +149,10 @@ def main(argv=None):
|
|||
'--hook-stage', choices=('commit', 'push'), default='commit',
|
||||
help='The stage during which the hook is fired e.g. commit or push.',
|
||||
)
|
||||
run_parser.add_argument(
|
||||
'--show-diff-on-failure', action='store_true',
|
||||
help='When hooks fail, run `git diff` directly afterward.',
|
||||
)
|
||||
run_mutex_group = run_parser.add_mutually_exclusive_group(required=False)
|
||||
run_mutex_group.add_argument(
|
||||
'--all-files', '-a', action='store_true', default=False,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue