Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

oven: let `git checkout <ref>` resolve via local objects (fix short SHA)

The knot git server (tangled) rejects direct-SHA fetch-over-wire for
abbreviated 9-char commit hashes — `git fetch origin 35b90245e` errors
with "couldn't find remote ref". Preflight-sync was calling that fetch
unconditionally for every caller-specified ref, then the followup
`git checkout <ref>` would fail with "pathspec did not match" because
the local object db still had the old tip.

Fix: drop the direct-SHA fetch. `git fetch origin main` (always run
above it) brings in every commit reachable from main's tip, including
the requested ref. Local `git checkout <ref>` then resolves the
abbreviation against the just-updated object db and works for both
full and short SHAs.

No functional change when a caller passes a ref that's already on
main; restores the short-SHA convenience API that worked before the
knot switchover.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+7 -3
+7 -3
oven/native-builder.mjs
··· 360 360 `if git rev-parse --verify origin/${NATIVE_BRANCH} >/dev/null 2>&1; then`, 361 361 ` git reset --hard origin/${NATIVE_BRANCH} --quiet`, 362 362 "fi", 363 - // Honor caller-specified ref. Fetch the exact commit first (in case 364 - // it's not on the default branch yet / on a PR branch), then detach. 365 - requestedRef ? `git fetch origin ${requestedRef} --quiet || true` : "", 363 + // Honor caller-specified ref. Skip the direct-SHA fetch — tangled/ 364 + // knot rejects short-SHA fetches over the wire (treats them as 365 + // missing refs), which caused preflight-sync failures for every 366 + // 9-char abbreviated ref. Since `fetch origin <branch>` above 367 + // already brings in all commits reachable from main, a local 368 + // `git checkout <ref>` resolves abbreviations against the local 369 + // object db — works for both full and short SHAs. 366 370 requestedRef ? `git checkout -f ${requestedRef} --quiet` : "", 367 371 "git clean -fdq -- fedac/native fedac/nixos", 368 372 ].filter(Boolean).join("\n")], repoDir);