Fetch pinned RDM history deep enough for ancestry

Why: depth 1 makes prev_sha and sha unrelated shallow roots, so update reports a fork instead of an upgrade.
Evidence: SELF the pin-fetch credential test; CI run 2829 showed the fork message.
Impact: test-pg fetches 200 commits from each pin, not the full history.
Refs: .task/feature-svc-d3-real-scenarios.md
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-13 04:14:03 +00:00
co-authored by Cursor
parent b5cf1f2f1e
commit c78c237dc7
+3 -1
View File
@@ -421,7 +421,9 @@ jobs:
PY
)
[ "${#pins[@]}" -eq 3 ]
git -C rdm fetch --depth=1 origin "${pins[@]}"
# depth=1 会把三个 pin 变成互不相关的浅根,update 会把 prev→sha 误判成分叉。
# 当前 first-parent 距离是 39,200 留余量,仍不拉全史。
git -C rdm fetch --depth=200 origin "${pins[@]}"
for rev in "${pins[@]}"; do
git -C rdm checkout --detach "$rev"
git -C rdm submodule update --init --recursive