MCPcopy Index your code
hub / github.com/Codeplain-ai/codeplain / clone_repo

Function clone_repo

git_utils.py:93–108  ·  view source on GitHub ↗
(
    source_repo_path: str,
    new_repo_path: str,
    module_name: Optional[str] = None,
    render_id: Optional[str] = None,
    initial_files: Optional[dict[str, str]] = None,
)

Source from the content-addressed store, hash-verified

91
92
93def clone_repo(
94 source_repo_path: str,
95 new_repo_path: str,
96 module_name: Optional[str] = None,
97 render_id: Optional[str] = None,
98 initial_files: Optional[dict[str, str]] = None,
99) -> Repo:
100 repo = Repo.clone_from(source_repo_path, new_repo_path)
101
102 if initial_files:
103 file_utils.store_response_files(new_repo_path, initial_files, [])
104 repo.git.add(".")
105
106 repo.git.commit(
107 "--allow-empty", "-m", _get_full_commit_message(INITIAL_COMMIT_MESSAGE, module_name, None, render_id)
108 )
109
110
111def is_dirty(repo_path: Union[str, os.PathLike]) -> bool:

Callers

nothing calls this directly

Calls 1

_get_full_commit_messageFunction · 0.85

Tested by

no test coverage detected