Add a --show-diff-on-failure option

This commit is contained in:
Anthony Sottile 2017-02-25 10:14:17 -08:00
parent 0ece39c484
commit 05c88738b0
3 changed files with 32 additions and 1 deletions

View file

@ -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,