Skip to content

Commit 3e1c44e

Browse files
committed
Fix createWorktree call
1 parent ad74445 commit 3e1c44e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/commands.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -899,9 +899,6 @@ export function registerCommands(
899899
throw new Error(vscode.l10n.t('Git worktree API is not available. Please update VS Code to the latest version.'));
900900
}
901901

902-
// Store reference to ensure type narrowing
903-
const createWorktree = repositoryToUse.createWorktree;
904-
905902
// Create the worktree with progress
906903
await vscode.window.withProgress(
907904
{
@@ -910,7 +907,7 @@ export function registerCommands(
910907
},
911908
async () => {
912909
// Use the git extension's createWorktree API
913-
await createWorktree({
910+
await repositoryToUse.createWorktree!({
914911
path: worktreePath,
915912
commitish: trackedBranchName,
916913
branch: branchName

0 commit comments

Comments
 (0)