Skip to content

Commit a251619

Browse files
author
Julius Marminge
committed
Fix JJ rebase drift
1 parent 0cdc89c commit a251619

3 files changed

Lines changed: 3 additions & 30 deletions

File tree

‎apps/server/src/git/GitWorkflowService.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ describe("GitWorkflowService", () => {
2626
const status = yield* workflow.localStatus({ cwd: "/not-a-repo" });
2727

2828
assert.deepStrictEqual(status, {
29+
kind: "unknown",
2930
isRepo: false,
3031
hasPrimaryRemote: false,
3132
isDefaultRef: false,
@@ -52,6 +53,7 @@ describe("GitWorkflowService", () => {
5253
const status = yield* workflow.status({ cwd: "/not-a-repo" });
5354

5455
assert.deepStrictEqual(status, {
56+
kind: "unknown",
5557
isRepo: false,
5658
hasPrimaryRemote: false,
5759
isDefaultRef: false,

‎apps/server/src/git/GitWorkflowService.ts‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -168,33 +168,6 @@ export const make = Effect.fn("makeGitWorkflowService")(function* () {
168168
}
169169
});
170170

171-
const detectGitRepositoryForStatus = Effect.fn("GitWorkflowService.detectGitRepositoryForStatus")(
172-
function* (operation: string, cwd: string) {
173-
const handle = yield* registry
174-
.detect({ cwd })
175-
.pipe(
176-
Effect.mapError((error) =>
177-
unsupportedGitWorkflow(
178-
operation,
179-
cwd,
180-
error instanceof Error ? error.message : String(error),
181-
),
182-
),
183-
);
184-
if (!handle) {
185-
return false;
186-
}
187-
if (handle.kind !== "git") {
188-
return yield* unsupportedGitWorkflow(
189-
operation,
190-
cwd,
191-
`The ${operation} workflow currently supports Git repositories only; detected ${handle.kind}.`,
192-
);
193-
}
194-
return true;
195-
},
196-
);
197-
198171
const detectGitRepositoryForCommand = Effect.fn(
199172
"GitWorkflowService.detectGitRepositoryForCommand",
200173
)(function* (operation: string, cwd: string) {

‎apps/server/src/server.test.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2386,6 +2386,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {
23862386
layers: {
23872387
vcsDriver: {
23882388
detectRepository: () => Effect.succeed(testGitRepository("/tmp/repo")),
2389+
isInsideWorkTree: () => Effect.succeed(true),
23892390
},
23902391
gitManager: {
23912392
invalidateLocalStatus: () => Effect.void,
@@ -2525,9 +2526,6 @@ it.layer(NodeServices.layer)("server router seam", (it) => {
25252526
createRef: (input) => Effect.succeed({ refName: input.refName }),
25262527
switchRef: (input) => Effect.succeed({ refName: input.refName }),
25272528
},
2528-
vcsDriver: {
2529-
isInsideWorkTree: () => Effect.succeed(true),
2530-
},
25312529
},
25322530
});
25332531

0 commit comments

Comments
 (0)