MCPcopy Create free account
hub / github.com/BillHuang2001/evogit / clone_git_repo

Function clone_git_repo

python-impl/evogit/utils/git.py:133–152  ·  view source on GitHub ↗
(config: EvoGitConfig)

Source from the content-addressed store, hash-verified

131
132
133def 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
155def config_merge_driver(config: EvoGitConfig) -> None:

Callers

nothing calls this directly

Calls 1

config_merge_driverFunction · 0.85

Tested by

no test coverage detected