MCPcopy Create free account
hub / github.com/BerriAI/litellm / _git_commit

Function _git_commit

tests/unit/test_cost_map_guard.py:376–385  ·  view source on GitHub ↗
(repo: Path, message: str)

Source from the content-addressed store, hash-verified

374
375
376def _git_commit(repo: Path, message: str) -> str:
377 subprocess.run(("git", "add", "-A"), cwd=repo, check=True)
378 subprocess.run(
379 ("git", "-c", "user.name=t", "-c", "user.email=t@example.com", "commit", "-q", "-m", message),
380 cwd=repo,
381 check=True,
382 )
383 return subprocess.run(
384 ("git", "rev-parse", "HEAD"), cwd=repo, check=True, capture_output=True, text=True
385 ).stdout.strip()
386
387
388def _run_guard(

Calls 2

stripMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected