MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / _commit_file

Function _commit_file

tests/tools/test_selector/test_selector_validation.py:35–41  ·  view source on GitHub ↗
(repo: Path, relpath: str, content: str, message: str)

Source from the content-addressed store, hash-verified

33
34
35def _commit_file(repo: Path, relpath: str, content: str, message: str) -> str:
36 path = repo / relpath
37 path.parent.mkdir(parents=True, exist_ok=True)
38 path.write_text(content, encoding="utf-8")
39 _git(repo, "add", relpath)
40 _git(repo, "commit", "-m", message)
41 return _git(repo, "rev-parse", "HEAD")
42
43
44def _write_event(tmp_path: Path, payload: dict) -> Path:

Calls 1

_gitFunction · 0.85

Tested by

no test coverage detected