浏览代码

fixup! pr commentds

main
Connor Peet 4 年前
committed by Eric Amodio
父节点
当前提交
445b26f043
共有 2 个文件被更改,包括 2 次插入4 次删除
  1. +1
    -0
      src/git/models/remote.ts
  2. +1
    -4
      src/quickpicks/remotesQuickPick.ts

+ 1
- 0
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' })
);
}

+ 1
- 4
src/quickpicks/remotesQuickPick.ts 查看文件

@ -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
)[];

正在加载...
取消
保存