MCPcopy
hub / github.com/anthropics/claude-code / _run

Function _run

plugins/security-guidance/hooks/gitutil.py:309–318  ·  view source on GitHub ↗
(env)

Source from the content-addressed store, hash-verified

307 (genuinely nothing changed). `-c core.quotePath=false -z` keeps non-ASCII
308 and space-containing paths intact."""
309 def _run(env):
310 result = subprocess.run(
311 [*GIT_CMD, "-c", "core.quotePath=false", "diff", "--name-only", "-z", base],
312 cwd=cwd, capture_output=True, text=True, timeout=30,
313 env=env,
314 )
315 if result.returncode != 0:
316 debug_log(f"_git_name_only({base!r}) rc={result.returncode}: {result.stderr[:200]}")
317 return None
318 return {p for p in result.stdout.split("\0") if p}
319
320 try:
321 if not include_untracked:

Callers 1

_git_name_onlyFunction · 0.70

Calls 1

debug_logFunction · 0.90

Tested by

no test coverage detected