Align JJ driver with VCS provisioning
This commit is contained in:
1 parent
78c1342e98
commit
0cdc89ccaf
3 files changed
+5
-7
No files matched your search
@@ -269,6 +269,9 @@ export const makeVcsDriverShape = Effect.fn("makeJjVcsDriverShape")(function* ()
|
||||
: {}),
|
||||
});
|
||||
|
||||
const initRepository: VcsDriverShape["initRepository"] = (input) =>
|
||||
jjCommand(process, "JjVcsDriver.initRepository", input.cwd, ["git", "init"]);
|
||||
|
||||
const detectRepository: VcsDriverShape["detectRepository"] = Effect.fn("detectRepository")(
|
||||
function* (cwd) {
|
||||
const root = yield* jjCommand(process, "JjVcsDriver.detectRepository.root", cwd, ["root"], {
|
||||
@@ -488,6 +491,7 @@ export const makeVcsDriverShape = Effect.fn("makeJjVcsDriverShape")(function* ()
|
||||
return {
|
||||
capabilities,
|
||||
execute,
|
||||
initRepository,
|
||||
detectRepository,
|
||||
isInsideWorkTree,
|
||||
listWorkspaceFiles,
|
||||
|
||||
@@ -32,6 +32,7 @@ describe("VcsDriverRegistry", () => {
|
||||
run: () => Effect.succeed(processOutput("")),
|
||||
}),
|
||||
),
|
||||
Layer.provide(NodeServices.layer),
|
||||
);
|
||||
|
||||
return Effect.gen(function* () {
|
||||
|
||||
@@ -40,13 +40,6 @@ export function resolveVcsTerms(kind: VcsDriverKind | null | undefined): VcsTerm
|
||||
};
|
||||
}
|
||||
|
||||
if (kind === "sapling") {
|
||||
return {
|
||||
...gitLikeTerms,
|
||||
systemName: "Sapling",
|
||||
};
|
||||
}
|
||||
|
||||
if (kind === "git") {
|
||||
return gitLikeTerms;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user