MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _make_git_dir

Function _make_git_dir

tests/test_detect.py:21–27  ·  view source on GitHub ↗

A minimal .git directory git itself accepts: HEAD, objects/, refs/ (#4444).

(repo: Path)

Source from the content-addressed store, hash-verified

19
20
21def _make_git_dir(repo: Path) -> Path:
22 """A minimal .git directory git itself accepts: HEAD, objects/, refs/ (#4444)."""
23 dot_git = repo / ".git"
24 (dot_git / "objects").mkdir(parents=True)
25 (dot_git / "refs").mkdir()
26 (dot_git / "HEAD").write_text("ref: refs/heads/main\n")
27 return dot_git
28
29
30def as_posix_list(paths) -> list[str]:

Calls

no outgoing calls

Tested by

no test coverage detected