Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): run a worktree request against a non-repository project as a root launch #16152

Closedkridaydave(GitHub profile, opens in a new tab)wants to merge 7 commits intomain fromrefs/pull/16152/headopened View on GitHub

Showing 4 changed files with 39 additions and 18 deletions (loading 2).

x
0 of 4 viewed, 4 left
32 additions and 18 deletionsapps/server/src/git/GitWorkflowService.test.tsModified
View file
@@ -25,36 +25,50 @@
);
​
+const jjHandle = (rootPath: string) => ({
+ kind: "jj" as const,
+ repository: {
+ kind: "jj" as const,
+ rootPath,
+ metadataPath: `${rootPath}/.jj`,
+ freshness: {
+ source: "live-local" as const,
+ observedAt: DateTime.makeUnsafe("2026-01-01T00:00:00.000Z"),
+ expiresAt: Option.none(),
+ },
+ },
+ driver: {} as VcsDriverRegistry.VcsDriverHandle["driver"],
+});
+​
describe("GitWorkflowService", () => {
- it.effect("reports a non-Git VCS repository as not a Git repository", () =>
+ it.effect("distinguishes no VCS from a non-Git repository", () =>
Effect.gen(function* () {
const workflow = yield* GitWorkflowService.GitWorkflowService;
- const isRepository = yield* workflow.isRepository("/jj-repo");
+ // A plain folder is the Scratch case callers degrade a worktree request for.
+ assert.isFalse(yield* workflow.isGitRepository("/folder"));
​
- assert.equal(isRepository, false);
+ // A jj repository is not a folder, so this must fail rather than answer