Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

fix(ci): isolated VM checkout inherits the base's real origin URL

Martin Vogel3e0636216037
diff --git a/test-infrastructure/vm/win.sh b/test-infrastructure/vm/win.sh
index e735277dd..c9c4ffc0b 100755
--- a/test-infrastructure/vm/win.sh
+++ b/test-infrastructure/vm/win.sh
@@ -141,7 +141,12 @@ vm() { local env="$1"; shift
# fresh network clone. No-op when running in the shared (default) tree.
vm_ensure_run_checkout() {
[ "$VM_REPO" = "$VM_BASE_REPO" ] && return 0
- vm clangarm64 "[ -d '$VM_REPO/.git' ] || git clone --local '$VM_BASE_REPO' '$VM_REPO'"
+ # `git clone --local` points origin at the base PATH, so a later
+ # `fetch origin <branch>` would resolve against whatever the base happens
+ # to hold (i.e. another session's state) instead of GitHub. Inherit the
+ # base's real origin URL so the isolated tree fetches independently.
+ vm clangarm64 "[ -d '$VM_REPO/.git' ] || { git clone --local '$VM_BASE_REPO' '$VM_REPO' && \
+ git -C '$VM_REPO' remote set-url origin \"\$(git -C '$VM_BASE_REPO' remote get-url origin)\"; }"
}
# The VM tree must be the one the caller means. A concurrent session running