mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Allow try-repo to work on bare repositories
This commit is contained in:
parent
3a72fb39cb
commit
968b2fdaf1
2 changed files with 10 additions and 1 deletions
|
|
@ -141,7 +141,7 @@ def has_diff(*args, **kwargs):
|
|||
repo = kwargs.pop('repo', '.')
|
||||
assert not kwargs, kwargs
|
||||
cmd = ('git', 'diff', '--quiet', '--no-ext-diff') + args
|
||||
return cmd_output_b(*cmd, cwd=repo, retcode=None)[0]
|
||||
return cmd_output_b(*cmd, cwd=repo, retcode=None)[0] == 1
|
||||
|
||||
|
||||
def has_core_hookpaths_set():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue