diff --git a/packages/source-git-repo/src/Repo.ts b/packages/source-git-repo/src/Repo.ts index 78d9dd61..b88a2800 100644 --- a/packages/source-git-repo/src/Repo.ts +++ b/packages/source-git-repo/src/Repo.ts @@ -348,11 +348,7 @@ export default class Repo { console.debug( `[Mosaic] Creating linked worktree repo '${this.#name} branch '${this.#branch}'` ); - await spawn( - 'git', - ['worktree', 'add', '-f', this.#dir, this.#branch, `${this.#remote}/${this.#branch}`], - this.#cloneRootDir - ); + await spawn('git', ['worktree', 'add', '-f', this.#dir, this.#branch], this.#cloneRootDir); } else { console.debug( `[Mosaic] Re-using linked worktree repo '${this.#name} branch '${this.#branch}'` @@ -370,7 +366,7 @@ export default class Repo { console.debug(`[Mosaic] Creating worktree for content save @ ${this.#dir}`); await spawn( 'git', - ['worktree', 'add', '-f', '-B', branchName, this.#dir], + ['worktree', 'add', '-f', '-B', branchName, this.#dir, `${this.#remote}/${this.#branch}`], this.#worktreeRootDir ); console.debug(`[Mosaic] Creating linked worktree for ${sid}`);