Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/pre-commit/pre-commit
/ _get_diff
Function
_get_diff
pre_commit/commands/run.py:274–279 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
272
273
274
def
_get_diff() -> bytes:
275
_, out, _ = cmd_output_b(
276
'git'
,
'diff'
,
'--no-ext-diff'
,
'--no-textconv'
,
'--ignore-submodules'
,
277
check=False,
278
)
279
return
out
280
281
282
def
_run_hooks(
Callers
2
_run_single_hook
Function · 0.85
_run_hooks
Function · 0.85
Calls
1
cmd_output_b
Function · 0.90
Tested by
no test coverage detected