(path: str, remote: str)
| 183 | |
| 184 | |
| 185 | def init_repo(path: str, remote: str) -> None: |
| 186 | if os.path.isdir(remote): |
| 187 | remote = os.path.abspath(remote) |
| 188 | |
| 189 | git = ('git', *NO_FS_MONITOR) |
| 190 | env = no_git_env() |
| 191 | # avoid the user's template so that hooks do not recurse |
| 192 | cmd_output_b(*git, 'init', '--template=', path, env=env) |
| 193 | cmd_output_b(*git, 'remote', 'add', 'origin', remote, cwd=path, env=env) |
| 194 | |
| 195 | |
| 196 | def commit(repo: str = '.') -> None: |
nothing calls this directly
no test coverage detected