浏览代码

Adds repo id to repo logging

main
Eric Amodio 5 年前
父节点
当前提交
0f91a24165
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. +2
    -0
      src/git/models/repository.ts

+ 2
- 0
src/git/models/repository.ts 查看文件

@ -23,6 +23,7 @@ import { GitUri } from '../gitUri';
import { RemoteProviderFactory, RemoteProviders } from '../remotes/factory';
import { Messages } from '../../messages';
import { Logger } from '../../logger';
import { logName } from '../../system/decorators/log';
export enum RepositoryChange {
Config = 'config',
@ -60,6 +61,7 @@ export interface RepositoryFileSystemChangeEvent {
readonly uris: Uri[];
}
@logName<Repository>((r, name) => `${name}(${r.id})`)
export class Repository implements Disposable {
static sort(repositories: Repository[]) {
return repositories.sort((a, b) => (a.starred ? -1 : 1) - (b.starred ? -1 : 1) || a.index - b.index);

正在加载...
取消
保存