Skip to content

Commit

Permalink
Adds repo id to repo logging
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Jul 24, 2019
1 parent 7a842f6 commit 0f91a24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/git/models/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0f91a24

Please sign in to comment.