Skip to content

Commit eeff31c

Browse files
committed
Removes I from interface naming of "things"
1 parent eb3b9ad commit eeff31c

29 files changed

+180
-198
lines changed

src/annotations/blameAnnotationProvider.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
import { Iterables } from '../system';
33
import { ExtensionContext, Range, TextEditor, TextEditorDecorationType } from 'vscode';
44
import { AnnotationProviderBase } from './annotationProvider';
5-
import { GitService, GitUri, IGitBlame } from '../gitService';
5+
import { GitBlame, GitService, GitUri } from '../gitService';
66
import { WhitespaceController } from './whitespaceController';
77

88
export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase {
99

10-
protected _blame: Promise<IGitBlame>;
10+
protected _blame: Promise<GitBlame>;
1111

1212
constructor(context: ExtensionContext, editor: TextEditor, decoration: TextEditorDecorationType, highlightDecoration: TextEditorDecorationType | undefined, whitespaceController: WhitespaceController | undefined, protected git: GitService, protected uri: GitUri) {
1313
super(context, editor, decoration, highlightDecoration, whitespaceController);
1414

1515
this._blame = this.git.getBlameForFile(this.uri);
1616
}
1717

18-
async selection(shaOrLine?: string | number, blame?: IGitBlame) {
18+
async selection(shaOrLine?: string | number, blame?: GitBlame) {
1919
if (!this.highlightDecoration) return;
2020

2121
if (blame === undefined) {
@@ -57,14 +57,14 @@ export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase
5757
return blame !== undefined && blame.lines.length !== 0;
5858
}
5959

60-
protected async getBlame(requiresWhitespaceHack: boolean): Promise<IGitBlame | undefined> {
60+
protected async getBlame(requiresWhitespaceHack: boolean): Promise<GitBlame | undefined> {
6161
let whitespacePromise: Promise<void> | undefined;
6262
// HACK: Until https://github.com/Microsoft/vscode/issues/11485 is fixed -- override whitespace (turn off)
6363
if (requiresWhitespaceHack) {
6464
whitespacePromise = this.whitespaceController && this.whitespaceController.override();
6565
}
6666

67-
let blame: IGitBlame;
67+
let blame: GitBlame;
6868
if (whitespacePromise) {
6969
[blame] = await Promise.all([this._blame, whitespacePromise]);
7070
}

src/commands/showQuickBranchHistory.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
'use strict';
22
import { commands, TextEditor, Uri, window } from 'vscode';
33
import { ActiveEditorCachedCommand, Commands, getCommandUri } from './common';
4-
import { GitService, GitUri, IGitLog } from '../gitService';
4+
import { GitLog, GitService, GitUri } from '../gitService';
55
import { Logger } from '../logger';
66
import { Messages } from '../messages';
77
import { BranchesQuickPick, BranchHistoryQuickPick, CommandQuickPickItem } from '../quickPicks';
88
import { ShowQuickCommitDetailsCommandArgs } from './showQuickCommitDetails';
99

1010
export interface ShowQuickBranchHistoryCommandArgs {
1111
branch?: string;
12-
log?: IGitLog;
12+
log?: GitLog;
1313
maxCount?: number;
1414

1515
goBackCommand?: CommandQuickPickItem;

src/commands/showQuickCommitDetails.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
import { commands, TextEditor, Uri, window } from 'vscode';
33
import { ActiveEditorCachedCommand, Commands, getCommandUri } from './common';
4-
import { GitCommit, GitLogCommit, GitService, GitUri, IGitLog } from '../gitService';
4+
import { GitCommit, GitLog, GitLogCommit, GitService, GitUri } from '../gitService';
55
import { Logger } from '../logger';
66
import { CommandQuickPickItem, CommitDetailsQuickPick, CommitWithFileStatusQuickPickItem } from '../quickPicks';
77
import { ShowQuickCommitFileDetailsCommandArgs } from './showQuickCommitFileDetails';
@@ -11,7 +11,7 @@ import * as path from 'path';
1111
export interface ShowQuickCommitDetailsCommandArgs {
1212
sha?: string;
1313
commit?: GitCommit | GitLogCommit;
14-
repoLog?: IGitLog;
14+
repoLog?: GitLog;
1515

1616
goBackCommand?: CommandQuickPickItem;
1717
}

src/commands/showQuickCommitFileDetails.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
import { TextEditor, Uri, window } from 'vscode';
33
import { ActiveEditorCachedCommand, Commands, getCommandUri } from './common';
4-
import { GitCommit, GitLogCommit, GitService, GitUri, IGitLog } from '../gitService';
4+
import { GitCommit, GitLog, GitLogCommit, GitService, GitUri } from '../gitService';
55
import { Logger } from '../logger';
66
import { CommandQuickPickItem, CommitFileDetailsQuickPick } from '../quickPicks';
77
import { ShowQuickCommitDetailsCommandArgs } from './showQuickCommitDetails';
@@ -11,7 +11,7 @@ import * as path from 'path';
1111
export interface ShowQuickCommitFileDetailsCommandArgs {
1212
sha?: string;
1313
commit?: GitCommit | GitLogCommit;
14-
fileLog?: IGitLog;
14+
fileLog?: GitLog;
1515

1616
goBackCommand?: CommandQuickPickItem;
1717
}

src/commands/showQuickFileHistory.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
'use strict';
22
import { commands, Range, TextEditor, Uri, window } from 'vscode';
33
import { ActiveEditorCachedCommand, Commands, getCommandUri } from './common';
4-
import { GitService, GitUri, IGitLog } from '../gitService';
4+
import { GitLog, GitService, GitUri } from '../gitService';
55
import { Logger } from '../logger';
66
import { CommandQuickPickItem, FileHistoryQuickPick } from '../quickPicks';
77
import { ShowQuickCommitFileDetailsCommandArgs } from './showQuickCommitFileDetails';
88
import { Messages } from '../messages';
99
import * as path from 'path';
1010

1111
export interface ShowQuickFileHistoryCommandArgs {
12-
log?: IGitLog;
12+
log?: GitLog;
1313
maxCount?: number;
1414
range?: Range;
1515

src/currentLineController.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Commands } from './commands';
77
import { TextEditorComparer } from './comparers';
88
import { FileAnnotationType, IConfig, LineAnnotationType, StatusBarCommand } from './configuration';
99
import { DocumentSchemes, ExtensionKey } from './constants';
10-
import { BlameabilityChangeEvent, CommitFormatter, GitCommit, GitContextTracker, GitService, GitUri, IGitCommitLine } from './gitService';
10+
import { BlameabilityChangeEvent, CommitFormatter, GitCommit, GitCommitLine, GitContextTracker, GitService, GitUri } from './gitService';
1111

1212
const annotationDecoration: TextEditorDecorationType = window.createTextEditorDecorationType({
1313
after: {
@@ -181,7 +181,7 @@ export class CurrentLineController extends Disposable {
181181
line = line - this._uri.offset;
182182

183183
let commit: GitCommit | undefined = undefined;
184-
let commitLine: IGitCommitLine | undefined = undefined;
184+
let commitLine: GitCommitLine | undefined = undefined;
185185
// Since blame information isn't valid when there are unsaved changes -- don't show any status
186186
if (this._blameable && line >= 0) {
187187
const blameLine = await this.git.getBlameForLine(this._uri, line);
@@ -215,7 +215,7 @@ export class CurrentLineController extends Disposable {
215215
editor.setDecorations(annotationDecoration, []);
216216
}
217217

218-
async show(commit: GitCommit, blameLine: IGitCommitLine, editor: TextEditor, line: number) {
218+
async show(commit: GitCommit, blameLine: GitCommitLine, editor: TextEditor, line: number) {
219219
// I have no idea why I need this protection -- but it happens
220220
if (editor.document === undefined) return;
221221

@@ -247,7 +247,7 @@ export class CurrentLineController extends Disposable {
247247
await this._updateBlame(editor.selection.active.line, editor);
248248
}
249249

250-
private async _updateAnnotations(commit: GitCommit, blameLine: IGitCommitLine, editor: TextEditor, line?: number) {
250+
private async _updateAnnotations(commit: GitCommit, blameLine: GitCommitLine, editor: TextEditor, line?: number) {
251251
const cfg = this._config.blame.line;
252252
if (!cfg.enabled) return;
253253

src/git/formatters/commit.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
import { Strings } from '../../system';
33
import { GitCommit } from '../models/commit';
4-
import { IGitDiffLine } from '../models/diff';
4+
import { GitDiffLine } from '../models/diff';
55
import * as moment from 'moment';
66

77
export interface ICommitFormatOptions {
@@ -142,7 +142,7 @@ export class CommitFormatter {
142142
return `\`${commit.shortSha}\` &nbsp; __${commit.author}__, ${moment(commit.date).fromNow()} &nbsp; _(${moment(commit.date).format(dateFormat)})_${message}`;
143143
}
144144

145-
static toHoverDiff(commit: GitCommit, previous: IGitDiffLine | undefined, current: IGitDiffLine | undefined): string | undefined {
145+
static toHoverDiff(commit: GitCommit, previous: GitDiffLine | undefined, current: GitDiffLine | undefined): string | undefined {
146146
if (previous === undefined && current === undefined) return undefined;
147147

148148
const codeDiff = this._getCodeDiff(previous, current);
@@ -151,7 +151,7 @@ export class CommitFormatter {
151151
: `\`Changes\` &nbsp; \u2014 &nbsp; \`${commit.previousShortSha}\` \u2194 \`${commit.shortSha}\`\n${codeDiff}`;
152152
}
153153

154-
private static _getCodeDiff(previous: IGitDiffLine | undefined, current: IGitDiffLine | undefined): string {
154+
private static _getCodeDiff(previous: GitDiffLine | undefined, current: GitDiffLine | undefined): string {
155155
return `\`\`\`
156156
- ${previous === undefined ? '' : previous.line.trim()}
157157
+ ${current === undefined ? '' : current.line.trim()}

src/git/models/blame.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
'use strict';
2-
import { GitCommit, IGitAuthor, IGitCommitLine } from './commit';
2+
import { GitAuthor, GitCommit, GitCommitLine } from './commit';
33

4-
export interface IGitBlame {
4+
export interface GitBlame {
55
repoPath: string;
6-
authors: Map<string, IGitAuthor>;
6+
authors: Map<string, GitAuthor>;
77
commits: Map<string, GitCommit>;
8-
lines: IGitCommitLine[];
8+
lines: GitCommitLine[];
99
}
1010

11-
export interface IGitBlameLine {
12-
author: IGitAuthor;
11+
export interface GitBlameLine {
12+
author: GitAuthor;
1313
commit: GitCommit;
14-
line: IGitCommitLine;
14+
line: GitCommitLine;
1515
}
1616

17-
export interface IGitBlameLines extends IGitBlame {
18-
allLines: IGitCommitLine[];
17+
export interface GitBlameLines extends GitBlame {
18+
allLines: GitCommitLine[];
1919
}
2020

21-
export interface IGitBlameCommitLines {
22-
author: IGitAuthor;
21+
export interface GitBlameCommitLines {
22+
author: GitAuthor;
2323
commit: GitCommit;
24-
lines: IGitCommitLine[];
24+
lines: GitCommitLine[];
2525
}

src/git/models/commit.ts

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,12 @@ import { Uri } from 'vscode';
33
import { Git } from '../git';
44
import * as path from 'path';
55

6-
export interface IGitAuthor {
6+
export interface GitAuthor {
77
name: string;
88
lineCount: number;
99
}
1010

11-
export interface IGitCommit {
12-
type: GitCommitType;
13-
repoPath: string;
14-
sha: string;
15-
fileName: string;
16-
author?: string;
17-
date: Date;
18-
message: string;
19-
lines: IGitCommitLine[];
20-
originalFileName?: string;
21-
previousSha?: string;
22-
previousFileName?: string;
23-
24-
readonly isUncommitted: boolean;
25-
previousUri: Uri;
26-
uri: Uri;
27-
}
28-
29-
export interface IGitCommitLine {
11+
export interface GitCommitLine {
3012
sha: string;
3113
previousSha?: string;
3214
line: number;
@@ -36,10 +18,10 @@ export interface IGitCommitLine {
3618

3719
export type GitCommitType = 'blame' | 'branch' | 'file' | 'stash';
3820

39-
export class GitCommit implements IGitCommit {
21+
export class GitCommit {
4022

4123
type: GitCommitType;
42-
lines: IGitCommitLine[];
24+
lines: GitCommitLine[];
4325
originalFileName?: string;
4426
previousSha?: string;
4527
previousFileName?: string;
@@ -54,7 +36,7 @@ export class GitCommit implements IGitCommit {
5436
public author: string,
5537
public date: Date,
5638
public message: string,
57-
lines?: IGitCommitLine[],
39+
lines?: GitCommitLine[],
5840
originalFileName?: string,
5941
previousSha?: string,
6042
previousFileName?: string

src/git/models/diff.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
'use strict';
22

3-
export interface IGitDiffLine {
3+
export interface GitDiffLine {
44
line: string;
55
state: 'added' | 'removed' | 'unchanged';
66
}
77

8-
export interface IGitDiffChunk {
9-
current: (IGitDiffLine | undefined)[];
8+
export interface GitDiffChunk {
9+
current: (GitDiffLine | undefined)[];
1010
currentStart: number;
1111
currentEnd: number;
1212

13-
previous: (IGitDiffLine | undefined)[];
13+
previous: (GitDiffLine | undefined)[];
1414
previousStart: number;
1515
previousEnd: number;
1616

1717
chunk?: string;
1818
}
1919

20-
export interface IGitDiff {
21-
chunks: IGitDiffChunk[];
20+
export interface GitDiff {
21+
chunks: GitDiffChunk[];
2222

2323
diff?: string;
2424
}

0 commit comments

Comments
 (0)