Pass color option to git diff unconditionally

This commit is contained in:
Mandar Vaze 2019-06-01 07:40:20 +05:30
parent 4f4767c9e0
commit 64f0178b75
2 changed files with 5 additions and 13 deletions

View file

@ -224,13 +224,10 @@ def _run_hooks(config, hooks, args, environ):
'`pre-commit install`.',
)
output.write_line('All changes made by hooks:')
if args.color:
subprocess.call((
'git', '--no-pager', 'diff', '--no-ext-diff',
'--color={}'.format(args.color),
))
else:
subprocess.call(('git', '--no-pager', 'diff', '--no-ext-diff'))
subprocess.call((
'git', '--no-pager', 'diff', '--no-ext-diff',
'--color={}'.format(args.color),
))
return retval