(
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,
)
| 91 | |
| 92 | |
| 93 | def 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 | |
| 111 | def is_dirty(repo_path: Union[str, os.PathLike]) -> bool: |
nothing calls this directly
no test coverage detected