MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / has_diff

Function has_diff

pre_commit/git.py:175–177  ·  view source on GitHub ↗
(*args: str, repo: str = '.')

Source from the content-addressed store, hash-verified

173
174
175def has_diff(*args: str, repo: str = '.') -> bool:
176 cmd = ('git', 'diff', '--quiet', '--no-ext-diff', *args)
177 return cmd_output_b(*cmd, cwd=repo, check=False)[0] == 1
178
179
180def has_core_hookpaths_set() -> bool:

Callers

nothing calls this directly

Calls 1

cmd_output_bFunction · 0.90

Tested by

no test coverage detected