From 445b26f043853aa192633542d2c74b975b1e4f3b Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Mon, 6 Jan 2020 14:51:56 -0800 Subject: [PATCH] fixup! pr commentds --- src/git/models/remote.ts | 1 + src/quickpicks/remotesQuickPick.ts | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/git/models/remote.ts b/src/git/models/remote.ts index 7d5119e..7ff94c9 100644 --- a/src/git/models/remote.ts +++ b/src/git/models/remote.ts @@ -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' }) ); } diff --git a/src/quickpicks/remotesQuickPick.ts b/src/quickpicks/remotesQuickPick.ts index 7954aaa..fb7fcca 100644 --- a/src/quickpicks/remotesQuickPick.ts +++ b/src/quickpicks/remotesQuickPick.ts @@ -142,10 +142,7 @@ export class RemotesQuickPick { clipboard?: boolean, goBackCommand?: CommandQuickPickItem ): Promise { - 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 )[];