@@ -55,10 +55,6 @@ def main(argv=None):
5555
5656 run_parser = subparsers .add_parser ('run' , help = 'Run hooks.' )
5757 run_parser .add_argument ('hook' , nargs = '?' , help = 'A single hook-id to run' )
58- run_parser .add_argument (
59- '--all-files' , '-a' , action = 'store_true' , default = False ,
60- help = 'Run on all the files in the repo. Implies --no-stash.' ,
61- )
6258 run_parser .add_argument (
6359 '--color' , default = 'auto' , type = color .use_color ,
6460 help = 'Whether to use color in output. Defaults to `auto`' ,
@@ -70,6 +66,14 @@ def main(argv=None):
7066 run_parser .add_argument (
7167 '--verbose' , '-v' , action = 'store_true' , default = False ,
7268 )
69+ run_mutex_group = run_parser .add_mutually_exclusive_group (required = False )
70+ run_mutex_group .add_argument (
71+ '--all-files' , '-a' , action = 'store_true' , default = False ,
72+ help = 'Run on all the files in the repo. Implies --no-stash.' ,
73+ )
74+ run_mutex_group .add_argument (
75+ '--files' , nargs = '*' , help = 'Specific filenames to run hooks on.' ,
76+ )
7377
7478 help = subparsers .add_parser (
7579 'help' , help = 'Show help for a specific command.'
0 commit comments