Parcourir la source

Improves workspace creation messaging

main
Eric Amodio il y a 1 an
Parent
révision
13f30f0700
1 fichiers modifiés avec 16 ajouts et 13 suppressions
  1. +16
    -13
      src/commands/git/worktree.ts

+ 16
- 13
src/commands/git/worktree.ts Voir le fichier

@ -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,

Chargement…
Annuler
Enregistrer