Selaa lähdekoodia

Improves workspace creation messaging

main
Eric Amodio 1 vuosi sitten
vanhempi
commit
13f30f0700
1 muutettua tiedostoa jossa 16 lisäystä ja 13 poistoa
  1. +16
    -13
      src/commands/git/worktree.ts

+ 16
- 13
src/commands/git/worktree.ts Näytä tiedosto

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

Ladataan…
Peruuta
Tallenna