MCPcopy Create free account
hub / github.com/crisxuan/bestJavaer / run_git

Function run_git

scripts/check_article_quality.py:72–82  ·  view source on GitHub ↗
(args: list[str], *, check: bool = True)

Source from the content-addressed store, hash-verified

70
71
72def run_git(args: list[str], *, check: bool = True) -> str:
73 result = subprocess.run(
74 ["git", *args],
75 check=False,
76 text=True,
77 stdout=subprocess.PIPE,
78 stderr=subprocess.PIPE,
79 )
80 if check and result.returncode != 0:
81 raise RuntimeError(result.stderr.strip() or f"git {' '.join(args)} failed")
82 return result.stdout
83
84
85def repo_root() -> Path:

Callers 4

repo_rootFunction · 0.85
changed_filesFunction · 0.85
staged_filesFunction · 0.85
read_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected