From ed1b6381d7d60431d40a2f3792b1a38a2afd2e22 Mon Sep 17 00:00:00 2001 From: Mathis Verstrepen Date: Tue, 13 Jan 2026 15:46:35 -0500 Subject: [PATCH 1/2] fix: enhance git clone and fetch commands with additional HTTP configurations --- api/app/services/git_service.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/api/app/services/git_service.py b/api/app/services/git_service.py index 92a1c54d..2e546a53 100644 --- a/api/app/services/git_service.py +++ b/api/app/services/git_service.py @@ -60,6 +60,12 @@ async def clone_repo(clone_url: str, target_dir: Path, env: Optional[dict] = Non "git", "-c", "http.version=HTTP/1.1", + "-c", + "http.postBuffer=524288000", + "-c", + "http.lowSpeedLimit=0", + "-c", + "http.lowSpeedTime=999999", "clone", clone_url, str(target_dir), @@ -86,6 +92,12 @@ async def fetch_repo(target_dir: Path): "git", "-c", "http.version=HTTP/1.1", + "-c", + "http.postBuffer=524288000", + "-c", + "http.lowSpeedLimit=0", + "-c", + "http.lowSpeedTime=999999", "-C", str(target_dir), "fetch", From 67cd5d7bcadf6c2d9e3605e94774b2723ec78ef9 Mon Sep 17 00:00:00 2001 From: Mathis Verstrepen Date: Tue, 13 Jan 2026 16:04:02 -0500 Subject: [PATCH 2/2] fix: optimize git clone and fetch commands with partial clone and increased postBuffer size --- api/app/services/git_service.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/api/app/services/git_service.py b/api/app/services/git_service.py index 2e546a53..3bb445a0 100644 --- a/api/app/services/git_service.py +++ b/api/app/services/git_service.py @@ -56,17 +56,21 @@ async def clone_repo(clone_url: str, target_dir: Path, env: Optional[dict] = Non process_env = {**os.environ, **(env or {})} + # Use partial clone (blob:none) to download commits/trees but not file contents initially. process = await asyncio.create_subprocess_exec( "git", "-c", "http.version=HTTP/1.1", "-c", - "http.postBuffer=524288000", + "http.postBuffer=2097152000", "-c", "http.lowSpeedLimit=0", "-c", "http.lowSpeedTime=999999", + "-c", + "core.compression=0", "clone", + "--filter=blob:none", clone_url, str(target_dir), stdout=asyncio.subprocess.PIPE, @@ -93,11 +97,13 @@ async def fetch_repo(target_dir: Path): "-c", "http.version=HTTP/1.1", "-c", - "http.postBuffer=524288000", + "http.postBuffer=2097152000", "-c", "http.lowSpeedLimit=0", "-c", "http.lowSpeedTime=999999", + "-c", + "core.compression=0", "-C", str(target_dir), "fetch",