Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): t3_thread_launch refuses a new worktree whose base ref has no commit #17791

Mergedtris203(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/17791/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 6 changed files with 122 additions and 0 deletions (loading 3).

x
0 of 6 viewed, 6 left
48 additions and 0 deletionsapps/server/src/git/GitWorkflowService.test.tsModified
View file
@@ -6,6 +6,11 @@
​
import { VcsRepositoryDetectionError } from "@t3tools/contracts";
​
+import * as NodeServices from "@effect/platform-node/NodeServices";
+import * as FileSystem from "effect/FileSystem";
+​
+import * as ServerConfig from "../config.ts";
+import * as VcsProcess from "../vcs/VcsProcess.ts";
import * as GitManager from "./GitManager.ts";
import * as GitWorkflowService from "./GitWorkflowService.ts";
import * as GitVcsDriver from "../vcs/GitVcsDriver.ts";
@@ -220,4 +225,47 @@
});
+​
+ it.effect("finds a name among the refs of every namespace", () =>
+ Effect.gen(function* () {
+ const fileSystem = yield* FileSystem.FileSystem;
+ const cwd = yield* fileSystem.makeTempDirectoryScoped({ prefix: "t3-ref-named-" });
+ const workflow = yield* GitWorkflowService.GitWorkflowService;
+ const driver = yield* GitVcsDriver.GitVcsDriver;
+ for (const args of [
+ ["init", "-b", "main"],
+ ["-c", "user.email=t@t", "-c", "user.name=t", "commit", "--allow-empty", "-m", "init"],
+ ["update-ref", "refs/remotes/upstream/feature/topic", "HEAD"],
+ ["symbolic-ref", "refs/remotes/origin/alias", "refs/heads/main"],
+ ["update-ref", "refs/mirror/origin/mirrored", "HEAD"],