A minimal .git directory git itself accepts: HEAD, objects/, refs/ (#4444).
(repo: Path)
| 19 | |
| 20 | |
| 21 | def _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 | |
| 30 | def as_posix_list(paths) -> list[str]: |
no outgoing calls
no test coverage detected