mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Don't stash with --all-files. Closes #68.
This commit is contained in:
parent
8a8b2241a6
commit
3e2b1862ad
3 changed files with 16 additions and 8 deletions
|
|
@ -234,7 +234,7 @@ def run(runner, args, write=sys.stdout.write):
|
|||
logger.addHandler(LoggingHandler(args.color, write=write))
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
if args.no_stash:
|
||||
if args.no_stash or args.all_files:
|
||||
ctx = noop_context()
|
||||
else:
|
||||
ctx = staged_files_only(runner.cmd_runner)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ def run(argv):
|
|||
run_parser.add_argument('hook', nargs='?', help='A single hook-id to run')
|
||||
run_parser.add_argument(
|
||||
'--all-files', '-a', action='store_true', default=False,
|
||||
help='Run on all the files in the repo.',
|
||||
help='Run on all the files in the repo. Implies --no-stash.',
|
||||
)
|
||||
run_parser.add_argument(
|
||||
'--color', default='auto', type=color.use_color,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue