Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): keep large sparse checkouts on the fast checkpoint path #12154

Mergedvedprakash2302(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/12154/headmerged by juliusmarminge View on GitHub

Showing 5 changed files with 210 additions and 0 deletions (loading 4).

x
0 of 5 viewed, 5 left
210 additions and 0 deletionsapps/server/src/vcs/GitVcsDriver.test.tsModified
View file
@@ -119,6 +119,216 @@
}).pipe(Effect.scoped, Effect.provide(GitContractLayer)),
​
+for (const nested of [false, true]) {
+ for (const indexState of [
+ "sparse",
+ "flags",
+ "manual-skip",
+ "missing",
+ "non-cone-missing",
+ ] as const) {
+ it.effect(
+ `sparse checkpoint preserves two captures (nested=${nested}, index=${indexState})`,
+ () =>
+ Effect.gen(function* () {
+ const fs = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ const driver = yield* GitVcsDriver.makeVcsDriverShape();
+ const cwd = yield* fs.makeTempDirectoryScoped({ prefix: "t3-checkpoint-sparse-" });
+ const { git } = yield* makeCheckpointFixture(driver, cwd);
+ const write = Effect.fn(function* (name: string, contents: string) {
+ yield* fs.makeDirectory(path.dirname(path.join(cwd, name)), { recursive: true });
+ yield* fs.writeFileString(path.join(cwd, name), contents);
+ });
+ for (const name of [
+ "scope/in/edit",
+ "scope/in/delete",
+ "scope/out/deep/absent",
+ "scope/out/present",