(config: EvoGitConfig)
| 131 | |
| 132 | |
| 133 | def clone_git_repo(config: EvoGitConfig) -> None: |
| 134 | if config.remote_repo is None: |
| 135 | raise ValueError("remote_repo is not set in the config.") |
| 136 | |
| 137 | git_dir = config.git_dir |
| 138 | |
| 139 | subprocess.run( |
| 140 | ["git", "clone", config.remote_repo, git_dir], |
| 141 | cwd=config.git_dir, |
| 142 | check=True, |
| 143 | ) |
| 144 | subprocess.run( |
| 145 | ["git", "config", "user.name", config.git_user_name], cwd=git_dir, check=True |
| 146 | ) |
| 147 | subprocess.run( |
| 148 | ["git", "config", "user.email", config.git_user_email], cwd=git_dir, check=True |
| 149 | ) |
| 150 | # disable auto gc, since we will run it manually at the end of each evaluation |
| 151 | subprocess.run(["git", "config", "gc.auto", "0"], cwd=git_dir, check=True) |
| 152 | config_merge_driver(config) |
| 153 | |
| 154 | |
| 155 | def config_merge_driver(config: EvoGitConfig) -> None: |
nothing calls this directly
no test coverage detected