fix(agent-manager): use explicit Git fetch refspecs - #13196
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The previously reported suggestion is resolved: Files Reviewed (2 files)
Previous Review Summary (commit b4c8387)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit b4c8387)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
The refspec fix itself looks correct: explicit Fix these issues in Kilo Cloud Files Reviewed (3 files)
Reviewed by kimi-k3 · Input: 79.4K · Output: 5.6K · Cached: 267.1K Review guidance: REVIEW.md from base branch |
Agent Manager uses destination-less fetches for base branches and pull request heads. In repositories whose remote fetch refspec excludes the requested branch, Git can exit successfully after updating only FETCH_HEAD, leaving the tracking ref absent and causing worktree creation to fail.
Use explicit fetch destinations for base, same-repository PR, and fork PR branches. Same-repository PR imports also create a local tracking branch from the fetched ref when the branch has not been checked out before, while preserving the existing PR-head fallback.
Fixes #13058