Allow try-repo to work on bare repositories

This commit is contained in:
Anthony Sottile 2019-12-30 11:00:45 -08:00
parent 3a72fb39cb
commit 968b2fdaf1
2 changed files with 10 additions and 1 deletions

View file

@ -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():