Skip to content

Commit cfc91d3

Browse files
committed
Refines worktree delete prompts
1 parent 35aaf9d commit cfc91d3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/commands/git/worktree.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -965,8 +965,11 @@ export class WorktreeGitCommand extends QuickCommand<State> {
965965
const description =
966966
state.uris.length === 1
967967
? `delete worktree in $(folder) ${getWorkspaceFriendlyPath(state.uris[0])}`
968-
: 'delete worktrees';
969-
const branchesDescription = state.uris.length === 1 ? `and its branch` : 'and corresponding branches';
968+
: `delete ${state.uris.length} worktrees`;
969+
const descriptionWithBranchDelete =
970+
state.uris.length === 1
971+
? 'delete the worktree and then prompt to delete the associated branch'
972+
: `delete ${state.uris.length} worktrees and then prompt to delete the associated branches`;
970973

971974
const step: QuickPickStep<FlagsQuickPickItem<DeleteFlags>> = createConfirmStep(
972975
appendReposToTitle(`Confirm ${context.title}`, state, context),
@@ -983,14 +986,15 @@ export class WorktreeGitCommand extends QuickCommand<State> {
983986
...(state.startingFromBranchDelete
984987
? []
985988
: [
989+
createQuickPickSeparator<FlagsQuickPickItem<DeleteFlags>>(),
986990
createFlagsQuickPickItem<DeleteFlags>(state.flags, ['--delete-branches'], {
987991
label: `${label} & ${branchesLabel}`,
988-
detail: `Will ${description} ${branchesDescription}`,
992+
detail: `Will ${descriptionWithBranchDelete}`,
989993
}),
990994
createFlagsQuickPickItem<DeleteFlags>(state.flags, ['--force', '--delete-branches'], {
991995
label: `Force ${label} & ${branchesLabel}`,
992996
description: 'includes ANY UNCOMMITTED changes',
993-
detail: `Will forcibly ${description} ${branchesDescription}`,
997+
detail: `Will forcibly ${descriptionWithBranchDelete}`,
994998
}),
995999
]),
9961000
],

0 commit comments

Comments
 (0)