Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f1e9c1 commit da80cc6Copy full SHA for da80cc6
1 file changed
pre_commit/main.py
@@ -36,6 +36,9 @@
36
os.environ.pop('__PYVENV_LAUNCHER__', None)
37
38
39
+COMMANDS_NO_GIT = {'clean', 'gc', 'init-templatedir', 'sample-config'}
40
+
41
42
def _add_color_option(parser):
43
parser.add_argument(
44
'--color', default=os.environ.get('PRE_COMMIT_COLOR', 'auto'),
@@ -273,7 +276,7 @@ def main(argv=None):
273
276
parser.parse_args(['--help'])
274
277
275
278
with error_handler(), logging_handler(args.color):
- if args.command not in {'clean', 'gc', 'sample-config'}:
279
+ if args.command not in COMMANDS_NO_GIT:
280
_adjust_args_and_chdir(args)
281
282
git.check_for_cygwin_mismatch()
0 commit comments