From baa2a9d715378ec0e8ef4409c12b77ba7c00221d Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sun, 20 Jan 2019 14:47:05 -0500 Subject: [PATCH] Sorts starred branches first in quickpick --- src/quickpicks/branchesAndTagsQuickPick.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/quickpicks/branchesAndTagsQuickPick.ts b/src/quickpicks/branchesAndTagsQuickPick.ts index e9407b5..debbc95 100644 --- a/src/quickpicks/branchesAndTagsQuickPick.ts +++ b/src/quickpicks/branchesAndTagsQuickPick.ts @@ -267,7 +267,8 @@ export class BranchesAndTagsQuickPick { branches.sort( (a, b) => - (b.remote ? -1 : 1) - (a.remote ? -1 : 1) || + (a.starred ? -1 : 1) - (b.starred ? -1 : 1) || + (b.remote ? -1 : 1) - (a.remote ? -1 : 1) || a.name.localeCompare(b.name, undefined, { numeric: true, sensitivity: 'base' }) ); for (const b of branches) {