Skip to content

Commit 3b4e917

Browse files
Improves create branch base selection step wording
1 parent 6bc612d commit 3b4e917

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/commands/git/branch.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,9 @@ export class BranchGitCommand extends QuickCommand {
362362
while (this.canStepsContinue(state)) {
363363
if (state.counter < 3 || state.reference == null) {
364364
const result = yield* pickBranchOrTagStep(state, context, {
365-
placeholder: context =>
366-
`Choose a branch${context.showTags ? ' or tag' : ''} to create the new branch from`,
365+
placeholder: `Select a base to create the new branch from`,
367366
picked: state.reference?.ref ?? (await state.repo.git.getBranch())?.ref,
368-
titleContext: ' from',
367+
title: 'Select Base to Create Branch From',
369368
value: isRevisionReference(state.reference) ? state.reference.ref : undefined,
370369
});
371370
// Always break on the first step (so we will go back)

src/commands/quickCommand.steps.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,7 @@ export function* pickBranchOrTagStep<
850850
filter,
851851
picked,
852852
placeholder,
853+
title,
853854
titleContext,
854855
value,
855856
additionalButtons,
@@ -858,6 +859,7 @@ export function* pickBranchOrTagStep<
858859
filter?: { branches?: (b: GitBranch) => boolean; tags?: (t: GitTag) => boolean };
859860
picked: string | string[] | undefined;
860861
placeholder: string | ((context: Context) => string);
862+
title?: string;
861863
titleContext?: string;
862864
value: string | undefined;
863865
additionalButtons?: QuickInputButton[];
@@ -886,7 +888,7 @@ export function* pickBranchOrTagStep<
886888
);
887889

888890
const step = createPickStep<ReferencesQuickPickItem>({
889-
title: appendReposToTitle(`${context.title}${titleContext ?? ''}`, state, context),
891+
title: appendReposToTitle(`${title ?? context.title}${titleContext ?? ''}`, state, context),
890892
placeholder: count =>
891893
!count
892894
? `No branches${context.showTags ? ' or tags' : ''} found in ${state.repo.formattedName}`

0 commit comments

Comments
 (0)