Skip to content

Commit f79554f

Browse files
authored
feat: optimize clone speed with clone --depth=1 --single-branch (#307)
1 parent 36777d3 commit f79554f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/data_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def download_repo(repo_url: str, local_path: str, type: str = "github", access_t
108108
logger.info(f"Cloning repository from {repo_url} to {local_path}")
109109
# We use repo_url in the log to avoid exposing the token in logs
110110
result = subprocess.run(
111-
["git", "clone", clone_url, local_path],
111+
["git", "clone", "--depth=1", "--single-branch", clone_url, local_path],
112112
check=True,
113113
stdout=subprocess.PIPE,
114114
stderr=subprocess.PIPE,

0 commit comments

Comments
 (0)