@bobbyg603/mog 0.1.2 → 0.1.3
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.
- package/package.json +1 -1
- package/src/worktree.ts +4 -1
package/package.json
CHANGED
package/src/worktree.ts
CHANGED
|
@@ -13,7 +13,7 @@ export async function ensureRepo(
|
|
|
13
13
|
log.info(`Cloning ${repo} into ${repoDir}...`);
|
|
14
14
|
fs.mkdirSync(`${reposDir}/${owner}`, { recursive: true });
|
|
15
15
|
|
|
16
|
-
const clone = Bun.spawnSync(["gh", "repo", "clone", repo, repoDir], {
|
|
16
|
+
const clone = Bun.spawnSync(["gh", "repo", "clone", repo, repoDir, "--", "--recurse-submodules"], {
|
|
17
17
|
stdout: "inherit",
|
|
18
18
|
stderr: "inherit",
|
|
19
19
|
});
|
|
@@ -86,6 +86,9 @@ export async function createWorktree(
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
// Init submodules in the worktree if present
|
|
90
|
+
Bun.spawnSync(["git", "submodule", "update", "--init", "--recursive"], { cwd: worktreeDir });
|
|
91
|
+
|
|
89
92
|
log.ok(`Worktree created at ${worktreeDir}`);
|
|
90
93
|
return { worktreeDir, branchName };
|
|
91
94
|
}
|