Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): checkpoints work in Windows workspaces with paths over 260 characters #13538

MergedK3irara(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/13538/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 75 additions and 4 deletions.

x
0 of 2 viewed, 2 left
48 additions and 0 deletionsapps/server/src/vcs/GitVcsDriver.test.tsModified
View file
@@ -15,6 +15,7 @@
import { assert, it } from "@effect/vitest";
​
import { CheckpointRef, GitCommandError, VcsProcessExitError } from "@t3tools/contracts";
+import * as HostProcess from "@t3tools/shared/HostProcess";
import * as ServerConfig from "../config.ts";
import * as CheckpointStore from "../checkpointing/CheckpointStore.ts";
import * as ProcessRunner from "../processRunner.ts";
@@ -1212,3 +1213,50 @@
+​
+it.effect.each(["win32", "linux"] as const)(
+ "checkpoint working-tree commands enable Git long paths only on Windows (%s)",
+ (platform) =>
+ Effect.gen(function* () {
+ const fs = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ const liveProcess = yield* VcsProcess.VcsProcess;
+ const driver = yield* GitVcsDriver.makeVcsDriverShape();
+ const cwd = yield* fs.makeTempDirectoryScoped({ prefix: "t3-checkpoint-long-paths-" });
+ const { git, checkpointRef } = yield* makeCheckpointFixture(driver, cwd);
+ // An unborn nested repository fails the first `add`, so recovery's listing runs too.
+ yield* git(["init", "empty"]);
+ const observedArgs: ReadonlyArray<string>[] = [];
+ const platformDriver = yield* GitVcsDriver.makeVcsDriverShape().pipe(
+ Effect.provideService(HostProcess.Platform, platform),
+ Effect.provideService(VcsProcess.VcsProcess, {