MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / init_repo

Function init_repo

pre_commit/git.py:185–193  ·  view source on GitHub ↗
(path: str, remote: str)

Source from the content-addressed store, hash-verified

183
184
185def 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
196def commit(repo: str = '.') -> None:

Callers

nothing calls this directly

Calls 2

cmd_output_bFunction · 0.90
no_git_envFunction · 0.85

Tested by

no test coverage detected