fix(migrate): refresh managed checkout config

This commit is contained in:
Mohamed Boudra
2026-07-19 06:09:20 +02:00
parent 7046b118e9
commit 0c3c61be94
2 changed files with 6 additions and 2 deletions

View File

@@ -51,6 +51,9 @@ test("imports real catalog, config, and Git worktree shapes through observable P
expect(paseo.createdCheckouts).toEqual([
{ rootPath: fixture.repo, refName: "create-branch", directoryName: "missing-create" },
]);
expect(paseo.configs.get(path.join(fixture.repo, ".paseo", "missing-create"))).toEqual(
paseo.configs.get(fixture.repo),
);
expect(result.notices.map((notice) => notice.code)).toEqual(
expect.arrayContaining([
"hidden-project",
@@ -80,7 +83,7 @@ test("imports real catalog, config, and Git worktree shapes through observable P
output: (event) => secondEvents.push(event),
});
expect(second.notices.some((notice) => notice.code === "project-apply-failed")).toBe(false);
expect(paseo.configWrites).toBe(2);
expect(paseo.configWrites).toBe(3);
expect(secondEvents.map((event) => event.message)).toContain(
`Worktree ${path.join(fixture.repo, ".paseo", "missing-create")} already exists for create-branch.`,
);
@@ -98,7 +101,7 @@ test("reports a revision-stale config write without retrying or replacing existi
output: () => undefined,
});
expect(paseo.configWrites).toBe(2);
expect(paseo.configWrites).toBe(3);
expect(paseo.configs.get(fixture.repo)).toEqual({});
expect(paseo.openedCheckouts).toEqual([fixture.liveWorktree]);
expect(paseo.createdCheckouts).toEqual([

View File

@@ -155,6 +155,7 @@ async function applyWorkspace(
refName: workspace.branch,
directoryName: workspace.directoryName,
});
await applyConfig(ensured.path, config, context);
context.stats[ensured.created ? "created" : "existing"] += 1;
context.output({
level: "info",