From 7c15a946ba73b998d87f49be0a6b323f08fc1349 Mon Sep 17 00:00:00 2001 From: Mouad BANI Date: Wed, 8 Oct 2025 11:13:13 +0100 Subject: [PATCH 1/2] feat: optimize full clone but getting a single branch without tags --- .../src/crowdgit/services/clone/clone_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/apps/git_integration/src/crowdgit/services/clone/clone_service.py b/services/apps/git_integration/src/crowdgit/services/clone/clone_service.py index ee8bf7d9e6..8cbe33935c 100644 --- a/services/apps/git_integration/src/crowdgit/services/clone/clone_service.py +++ b/services/apps/git_integration/src/crowdgit/services/clone/clone_service.py @@ -62,7 +62,7 @@ async def _perform_minimal_clone(self, path: str, remote: str) -> None: ) self.logger.info("Initializing minimal clone") await run_shell_command( - ["git", "clone", "--depth=1", "--no-tags", "--single-branch", remote, path], cwd=path + ["git", "clone", "--depth=1", "--no-tags", "--single-branch", remote, "."], cwd=path ) self.logger.info("Minimal clone initialized successfully") @@ -280,7 +280,7 @@ async def _calculate_batch_depth(self, repo_path: str, remote: str) -> int: async def _perform_full_clone(self, repo_path: str, remote: str): """Perform full repository clone""" self.logger.info(f"Performing full clone for repo {remote}...") - await run_shell_command(["git", "clone", remote, repo_path], cwd=repo_path) + await run_shell_command(["git", "clone", "--no-tags", "--single-branch", remote, "."], cwd=repo_path) self.logger.info(f"Successfully completed full clone of repository: {remote}") async def has_default_branch_changed(self, remote: str, saved_branch: str | None) -> bool: From 2aee4c830c2a432793baec22506075c24f032986 Mon Sep 17 00:00:00 2001 From: Mouad BANI Date: Wed, 8 Oct 2025 11:16:29 +0100 Subject: [PATCH 2/2] fix: lint --- .../src/crowdgit/services/clone/clone_service.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/apps/git_integration/src/crowdgit/services/clone/clone_service.py b/services/apps/git_integration/src/crowdgit/services/clone/clone_service.py index 8cbe33935c..4fbc9e3ba6 100644 --- a/services/apps/git_integration/src/crowdgit/services/clone/clone_service.py +++ b/services/apps/git_integration/src/crowdgit/services/clone/clone_service.py @@ -280,7 +280,9 @@ async def _calculate_batch_depth(self, repo_path: str, remote: str) -> int: async def _perform_full_clone(self, repo_path: str, remote: str): """Perform full repository clone""" self.logger.info(f"Performing full clone for repo {remote}...") - await run_shell_command(["git", "clone", "--no-tags", "--single-branch", remote, "."], cwd=repo_path) + await run_shell_command( + ["git", "clone", "--no-tags", "--single-branch", remote, "."], cwd=repo_path + ) self.logger.info(f"Successfully completed full clone of repository: {remote}") async def has_default_branch_changed(self, remote: str, saved_branch: str | None) -> bool: