Skip to content

Commit 8e6ecc0

Browse files
committed
fix(core): remove worktree process
- Change function parameter from RemoveWorktreeOptions to IWorktreeLess - Update parameter handling within the function - Remove unused interface definition
1 parent 6b4e40f commit 8e6ecc0

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/core/command/removeWorktreeCmd.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ import logger from '@/core/log/logger';
99
import { Config } from '@/core/config/setting';
1010
import { actionProgressWrapper } from '@/core/ui/progress';
1111
import { withResolvers } from '@/core/util/promise';
12-
import { IBranchForWorktree } from '@/types';
13-
14-
interface RemoveWorktreeOptions {
15-
path: string;
16-
force?: boolean;
17-
}
12+
import { IBranchForWorktree, IWorktreeLess } from '@/types';
1813

1914
async function showDeleteConfirmation(worktreePath: string): Promise<'ok' | 'force' | undefined> {
2015
const ok = vscode.l10n.t('ok');
@@ -47,10 +42,10 @@ async function getBranchInfo(worktreePath: string): Promise<{ branchName: string
4742
}
4843
}
4944

50-
export const removeWorktreeCmd = async (item?: RemoveWorktreeOptions): Promise<void> => {
51-
if (!item?.path) return;
45+
export const removeWorktreeCmd = async (item?: IWorktreeLess): Promise<void> => {
46+
if (!item?.fsPath) return;
5247

53-
const worktreePath = item.path;
48+
const worktreePath = item.fsPath;
5449
const { promise, resolve } = withResolvers<void>();
5550

5651
try {

0 commit comments

Comments
 (0)