@mu-crew/mu 3.13.0 → 3.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __muCreateRequire } from "node:module"; const require = __muCreateRequire(import.meta.url);
2
2
  import {
3
3
  groupIdFromPrefix
4
- } from "./chunk-TXV34VWT.js";
4
+ } from "./chunk-KUGUFBWH.js";
5
5
  import {
6
6
  LEGACY_LOG_ONLY_SQL_EXCLUSION,
7
7
  localMachineId,
@@ -638,4 +638,4 @@ export {
638
638
  planUndo,
639
639
  undoGroup
640
640
  };
641
- //# sourceMappingURL=chunk-EPCEEDHG.js.map
641
+ //# sourceMappingURL=chunk-G434JKV2.js.map
@@ -5282,11 +5282,22 @@ async function forgetIfRootMissing(name, projectRoot) {
5282
5282
  ],
5283
5283
  projectRoot
5284
5284
  );
5285
- const stale = out.split("").map((r) => r.trim().split("\0")).some(([n, root]) => n === name && root === "");
5286
- if (stale) await run("jj", ["workspace", "forget", name], projectRoot);
5285
+ const stale = out.split("").map((r) => r.trim().split("\0")).some(([n, root]) => n === name && (root === void 0 || root === "" || !existsSync3(root)));
5286
+ if (!stale) return;
5287
+ await run("jj", ["workspace", "forget", name], projectRoot);
5288
+ await pruneGitWorktrees(projectRoot);
5287
5289
  } catch {
5288
5290
  }
5289
5291
  }
5292
+ async function pruneGitWorktrees(projectRoot) {
5293
+ let gitDir;
5294
+ try {
5295
+ gitDir = await run("jj", ["git", "root"], projectRoot);
5296
+ } catch {
5297
+ return;
5298
+ }
5299
+ if (gitDir.length > 0) await run("git", ["--git-dir", gitDir, "worktree", "prune"], projectRoot);
5300
+ }
5290
5301
  async function jjSingleCommitId(workspacePath2, revset) {
5291
5302
  const out = await run(
5292
5303
  "jj",
@@ -12513,4 +12524,4 @@ export {
12513
12524
  agentStateHistogram,
12514
12525
  summarizeOwnedTasks
12515
12526
  };
12516
- //# sourceMappingURL=chunk-TXV34VWT.js.map
12527
+ //# sourceMappingURL=chunk-KUGUFBWH.js.map