Let a bed's forge take the lab's shallow checkouts (issue 689)
mesh/merge-gate head 7ed7da1398df merged into trunk 307dd23d6d2a — pass: the change touches no module of the mesh's graph
mesh/repo-check head 7ed7da1398df merged into trunk 307dd23d6d2a — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (typescript)…
mesh/delivery delivered
mesh/merge-gate head 7ed7da1398df merged into trunk 307dd23d6d2a — pass: the change touches no module of the mesh's graph
mesh/repo-check head 7ed7da1398df merged into trunk 307dd23d6d2a — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (typescript)…
mesh/delivery delivered
The lab module clones every repository with --depth 50, and a fresh bare repository refuses a push whose history ends in a cut, so the genesis bed raised its anchor and forge and then skipped. The three beds that carry a checkout into a forge now share one helper that sets receive.shallowUpdate on the bare repository. Unshallowing instead cannot work in a lab run: the forge credential is removed once the run's clones are done.
This commit is contained in:
@@ -55,6 +55,7 @@ import { catalogueRoot } from "../../src/repos.ts";
|
||||
import { ready, returnTo, keep } from "../../src/warm.ts";
|
||||
import { labIsUsable, destroyAll, foundationBundle, catalogueModule, catalogueManifest } from "./harness.ts";
|
||||
import { genesis, type GenesisOptions } from "./genesis.ts";
|
||||
import { carry } from "./forge.ts";
|
||||
|
||||
const SCENARIO = "adoption";
|
||||
const CONTROL = "anchor";
|
||||
@@ -246,11 +247,7 @@ async function raiseForge(): Promise<Record<string, string>> {
|
||||
const heads: Record<string, string> = {};
|
||||
try {
|
||||
for (const [name, checkout] of Object.entries(REPOS)) {
|
||||
const bare = join(dir, `${name}.git`);
|
||||
execFileSync("git", ["init", "-q", "--bare", bare]);
|
||||
execFileSync("git", ["-C", checkout, "push", "-q", "--force", bare,
|
||||
"HEAD:refs/heads/main", "HEAD:refs/heads/lab"], { stdio: "pipe" });
|
||||
heads[name] = execFileSync("git", ["-C", checkout, "rev-parse", "HEAD"], { encoding: "utf8" }).trim();
|
||||
heads[name] = carry(checkout, join(dir, `${name}.git`), ["main", "lab"]);
|
||||
}
|
||||
const tar = join(tmpdir(), `mesh-lab-forge-${process.pid}.tar`);
|
||||
execFileSync("tar", ["-cf", tar, "-C", dir, "."]);
|
||||
|
||||
Reference in New Issue
Block a user