Sfoglia il codice sorgente

Fix git fetch refspec issue when library directory exists

Co-authored-by: ChristianLempa <28359525+ChristianLempa@users.noreply.github.com>
copilot-swe-agent[bot] 5 mesi fa
parent
commit
3f87bff95b
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      cli/core/repo.py

+ 3 - 3
cli/core/repo.py

@@ -133,12 +133,12 @@ def _clone_or_pull_repo(name: str, url: str, target_path: Path, branch: Optional
                 if not success:
                     return False, f"Failed to set sparse-checkout directory: {stderr or stdout}"
                 
-                # Fetch specific branch
+                # Fetch specific branch (without attempting to update local ref)
                 fetch_args = ["fetch", "--depth", "1", "origin"]
                 if branch:
-                    fetch_args.append(f"{branch}:{branch}")
+                    fetch_args.append(branch)
                 else:
-                    fetch_args.append("main:main")
+                    fetch_args.append("main")
                 
                 success, stdout, stderr = _run_git_command(fetch_args, cwd=target_path)
                 if not success: