Skip to content

Commit

Permalink
Sorts starred branches first in quickpick
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Jan 23, 2019
1 parent e4f6f42 commit baa2a9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/quickpicks/branchesAndTagsQuickPick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit baa2a9d

Please sign in to comment.