浏览代码

Improves workspace creation messaging

main
Eric Amodio 1年前
父节点
当前提交
13f30f0700
共有 1 个文件被更改,包括 16 次插入13 次删除
  1. +16
    -13
      src/commands/git/worktree.ts

+ 16
- 13
src/commands/git/worktree.ts 查看文件

@ -562,14 +562,21 @@ export class WorktreeGitCommand extends QuickCommand {
const isRemoteBranch = state.reference?.refType === 'branch' && state.reference?.remote;
const step: QuickPickStep<FlagsQuickPickItem<CreateFlags, Uri>> = QuickCommand.createConfirmStep(
appendReposToTitle(`Confirm ${context.title}`, state, context),
appendReposToTitle(
`Confirm ${context.title} \u2022 ${GitReference.toString(state.reference, {
icon: false,
label: false,
})}`,
state,
context,
),
[
FlagsQuickPickItem.create<CreateFlags, Uri>(
state.flags,
[],
{
label: isRemoteBranch ? 'Create Local Branch and Worktree' : context.title,
description: ` for ${GitReference.toString(state.reference)}`,
description: ' in subfolder',
detail: `Will create worktree in $(folder) ${recommendedFriendlyPath}`,
},
recommendedRootUri,
@ -581,7 +588,7 @@ export class WorktreeGitCommand extends QuickCommand {
label: isRemoteBranch
? 'Create New Local Branch and Worktree'
: 'Create New Branch and Worktree',
description: ` from ${GitReference.toString(state.reference)}`,
description: ' in subfolder',
detail: `Will create worktree in $(folder) ${recommendedNewBranchFriendlyPath}`,
},
recommendedRootUri,
@ -593,10 +600,8 @@ export class WorktreeGitCommand extends QuickCommand {
state.flags,
['--direct'],
{
label: `${
isRemoteBranch ? 'Create Local Branch and Worktree' : context.title
} (directly in folder)`,
description: ` for ${GitReference.toString(state.reference)}`,
label: isRemoteBranch ? 'Create Local Branch and Worktree' : context.title,
description: ' directly in folder',
detail: `Will create worktree directly in $(folder) ${pickedFriendlyPath}`,
},
pickedUri,
@ -605,12 +610,10 @@ export class WorktreeGitCommand extends QuickCommand {
state.flags,
['-b', '--direct'],
{
label: `${
isRemoteBranch
? 'Create New Local Branch and Worktree'
: 'Create New Branch and Worktree'
} (directly in folder)`,
description: ` from ${GitReference.toString(state.reference)}`,
label: isRemoteBranch
? 'Create New Local Branch and Worktree'
: 'Create New Branch and Worktree',
description: ' directly in folder',
detail: `Will create worktree directly in $(folder) ${pickedFriendlyPath}`,
},
pickedUri,

正在加载...
取消
保存