Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): avoid slow checkpoint index rebuilds #8538

ClosedRadu028(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/8538/headopened View on GitHub

Showing 2 changed files with 114 additions and 1 deletion (loading 1).

x
0 of 2 viewed, 2 left
114 additions and 1 deletionapps/server/src/vcs/GitVcsDriver.test.tsModified
View file
@@ -1,3 +1,6 @@
+// @effect-diagnostics nodeBuiltinImport:off
+import * as NodeFS from "node:fs";
+​
import * as NodeServices from "@effect/platform-node/NodeServices";
import * as Effect from "effect/Effect";
import * as FileSystem from "effect/FileSystem";
@@ -7,7 +10,7 @@
import { ChildProcessSpawner } from "effect/unstable/process";
import { assert, it } from "@effect/vitest";
​
-import { GitCommandError } from "@t3tools/contracts";
+import { CheckpointRef, GitCommandError } from "@t3tools/contracts";
import * as ServerConfig from "../config.ts";
import * as GitVcsDriver from "./GitVcsDriver.ts";
import * as VcsProcess from "./VcsProcess.ts";
@@ -108,3 +111,113 @@
});
+​
+it.effect("GitVcsDriver normalizes checkpoint temp indexes and removes lock files", () => {
+ let gitDir = "";
+ let currentIndexPath = "";
+ let tempIndexPath = "";
+ let readTreeArgs: ReadonlyArray<string> | undefined;
+ let updateIndexArgs: ReadonlyArray<string> | undefined;
+ let copiedIndexContents = "";
+​