Ver a proveniência

Fixes cross-repo branch switching

main
Eric Amodio há 3 anos
ascendente
cometimento
dbd169e80a
2 ficheiros alterados com 13 adições e 3 eliminações
  1. +12
    -2
      src/commands/quickCommand.steps.ts
  2. +1
    -1
      src/system/array.ts

+ 12
- 2
src/commands/quickCommand.steps.ts Ver ficheiro

@ -707,7 +707,11 @@ export async function* pickBranchOrTagStepMultiRepo<
title: appendReposToTitle(`${context.title}${titleContext ?? ''}`, state, context),
placeholder:
branchesAndOrTags.length === 0
? `No branches${context.showTags ? ' or tags' : ''} found in ${state.repos[0].formattedName}`
? `No ${state.repos.length === 1 ? '' : 'common '}branches${
context.showTags ? ' or tags' : ''
} found in ${
state.repos.length === 1 ? state.repos[0].formattedName : `${state.repos.length} repositories`
}`
: `${typeof placeholder === 'string' ? placeholder : placeholder(context)}${GlyphChars.Space.repeat(
3,
)}(or enter a reference using #)`,
@ -742,7 +746,13 @@ export async function* pickBranchOrTagStepMultiRepo<
const branchesAndOrTags = await getBranchesAndOrTagsFn();
quickpick.placeholder =
branchesAndOrTags.length === 0
? `${state.repos[0].formattedName} has no branches${context.showTags ? ' or tags' : ''}`
? `No ${state.repos.length === 1 ? '' : 'common '}branches${
context.showTags ? ' or tags' : ''
} found in ${
state.repos.length === 1
? state.repos[0].formattedName
: `${state.repos.length} repositories`
}`
: `${
typeof placeholder === 'string' ? placeholder : placeholder(context)
}${GlyphChars.Space.repeat(3)}(or enter a reference using #)`;

+ 1
- 1
src/system/array.ts Ver ficheiro

@ -1,6 +1,6 @@
'use strict';
export { findLastIndex, intersection } from 'lodash-es';
export { findLastIndex, intersectionWith as intersection } from 'lodash-es';
export function chunk<T>(source: T[], size: number): T[][] {
const chunks = [];

||||||
x
 
000:0
Carregando…
Cancelar
Guardar