mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Teach pre-commit try-repo to clone uncommitted changes
This commit is contained in:
parent
e04505a669
commit
bdc58cc33f
10 changed files with 148 additions and 62 deletions
|
|
@ -199,11 +199,7 @@ def _run_hooks(config, hooks, args, environ):
|
|||
retval |= _run_single_hook(filenames, hook, args, skips, cols)
|
||||
if retval and config['fail_fast']:
|
||||
break
|
||||
if (
|
||||
retval and
|
||||
args.show_diff_on_failure and
|
||||
subprocess.call(('git', 'diff', '--quiet', '--no-ext-diff')) != 0
|
||||
):
|
||||
if retval and args.show_diff_on_failure and git.has_diff():
|
||||
output.write_line('All changes made by hooks:')
|
||||
subprocess.call(('git', '--no-pager', 'diff', '--no-ext-diff'))
|
||||
return retval
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue