Browse Source

fixup! pr commentds

main
Connor Peet 4 years ago
committed by Eric Amodio
parent
commit
445b26f043
2 changed files with 2 additions and 4 deletions
  1. +1
    -0
      src/git/models/remote.ts
  2. +1
    -4
      src/quickpicks/remotesQuickPick.ts

+ 1
- 0
src/git/models/remote.ts View File

@ -19,6 +19,7 @@ export class GitRemote<
return remotes.sort(
(a, b) =>
(a.default ? -1 : 1) - (b.default ? -1 : 1) ||
(a.name === 'origin' ? -1 : 0) ||
a.name.localeCompare(b.name, undefined, { numeric: true, sensitivity: 'base' })
);
}

+ 1
- 4
src/quickpicks/remotesQuickPick.ts View File

@ -142,10 +142,7 @@ export class RemotesQuickPick {
clipboard?: boolean,
goBackCommand?: CommandQuickPickItem
): Promise<OpenRemoteCommandQuickPickItem | CommandQuickPickItem | undefined> {
const items = remotes
// show the origin as the top, 'default' pick
.sort(r => (r.name === 'origin' ? -1 : 0))
.map(r => new OpenRemoteCommandQuickPickItem(r, resource, clipboard)) as (
const items = remotes.map(r => new OpenRemoteCommandQuickPickItem(r, resource, clipboard)) as (
| OpenRemoteCommandQuickPickItem
| CommandQuickPickItem
)[];

Loading…
Cancel
Save