Skip to content

Commit 8a10698

Browse files
committed
ci(checkout-eyrie): use full clone for pinned submodule commits
A depth-1 clone cannot check out a pinned commit if the dependency repo's main has been rewritten past it (e.g. via squash-merge), and fails with 'fatal: unable to read tree'. The previous workaround was to manually bump each submodule pointer in hawk whenever a squash-merge rewrote a dependency's history. Switching to a full clone for the pinned-commit path makes the checkout deterministic without any manual maintenance. The unpinned-ref path still uses --depth=1 for speed.
1 parent 23d2ec2 commit 8a10698

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/actions/checkout-eyrie/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ runs:
2424
commit=$(git ls-tree HEAD "external/${repo}" | awk '{print $3}' || true)
2525
if [ -n "$commit" ]; then
2626
echo "Cloning $repo at submodule commit $commit"
27-
git clone --depth=1 "https://github.com/GrayCodeAI/${repo}.git" "$dest"
27+
# Full clone so the pinned commit is reachable even after
28+
# the dependency repo's main has been rewritten past it
29+
# (e.g. by a squash-merge). A depth-1 clone can't check
30+
# out older commits and fails with "unable to read tree".
31+
git clone "https://github.com/GrayCodeAI/${repo}.git" "$dest"
2832
(cd "$dest" && git checkout --quiet "$commit")
2933
else
3034
ref="${{ inputs.ref }}"

0 commit comments

Comments
 (0)