Renames GitProvider to GitService

This commit is contained in:
Eric Amodio
2017-03-17 14:12:09 -04:00
parent f6bde72baf
commit 332b2c3b91
35 changed files with 91 additions and 91 deletions

View File

@@ -3,13 +3,13 @@ import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorTracker } from '../activeEditorTracker';
import { ActiveEditorCommand, Commands } from './commands';
import { TextEditorComparer, UriComparer } from '../comparers';
import { GitProvider } from '../gitProvider';
import { GitService } from '../gitService';
import { Logger } from '../logger';
import * as path from 'path';
export class CloseUnchangedFilesCommand extends ActiveEditorCommand {
constructor(private git: GitProvider, private repoPath: string) {
constructor(private git: GitService, private repoPath: string) {
super(Commands.CloseUnchangedFiles);
}

View File

@@ -2,13 +2,13 @@
import { Iterables } from '../system';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { GitProvider, GitUri } from '../gitProvider';
import { GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
import { copy } from 'copy-paste';
export class CopyMessageToClipboardCommand extends ActiveEditorCommand {
constructor(private git: GitProvider, private repoPath: string) {
constructor(private git: GitService, private repoPath: string) {
super(Commands.CopyMessageToClipboard);
}

View File

@@ -2,13 +2,13 @@
import { Iterables } from '../system';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { GitProvider, GitUri } from '../gitProvider';
import { GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
import { copy } from 'copy-paste';
export class CopyShaToClipboardCommand extends ActiveEditorCommand {
constructor(private git: GitProvider, private repoPath: string) {
constructor(private git: GitService, private repoPath: string) {
super(Commands.CopyShaToClipboard);
}

View File

@@ -1,12 +1,12 @@
'use strict';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { GitProvider } from '../gitProvider';
import { GitService } from '../gitService';
import { Logger } from '../logger';
export class DiffDirectoryCommand extends ActiveEditorCommand {
constructor(private git: GitProvider, private repoPath: string) {
constructor(private git: GitService, private repoPath: string) {
super(Commands.DiffDirectory);
}

View File

@@ -2,13 +2,13 @@
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { BuiltInCommands } from '../constants';
import { GitCommit, GitProvider, GitUri } from '../gitProvider';
import { GitCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
import * as path from 'path';
export class DiffLineWithPreviousCommand extends ActiveEditorCommand {
constructor(private git: GitProvider) {
constructor(private git: GitService) {
super(Commands.DiffLineWithPrevious);
}
@@ -23,7 +23,7 @@ export class DiffLineWithPreviousCommand extends ActiveEditorCommand {
const gitUri = await GitUri.fromUri(uri, this.git);
line = line || (editor && editor.selection.active.line) || gitUri.offset;
if (!commit || GitProvider.isUncommitted(commit.sha)) {
if (!commit || GitService.isUncommitted(commit.sha)) {
if (editor && editor.document && editor.document.isDirty) return undefined;
const blameline = line - gitUri.offset;

View File

@@ -1,12 +1,12 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { GitCommit, GitProvider, GitUri } from '../gitProvider';
import { GitCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
export class DiffLineWithWorkingCommand extends ActiveEditorCommand {
constructor(private git: GitProvider) {
constructor(private git: GitService) {
super(Commands.DiffLineWithWorking);
}
@@ -21,7 +21,7 @@ export class DiffLineWithWorkingCommand extends ActiveEditorCommand {
const gitUri = await GitUri.fromUri(uri, this.git);
line = line || (editor && editor.selection.active.line) || gitUri.offset;
if (!commit || GitProvider.isUncommitted(commit.sha)) {
if (!commit || GitService.isUncommitted(commit.sha)) {
if (editor && editor.document && editor.document.isDirty) return undefined;
const blameline = line - gitUri.offset;

View File

@@ -3,14 +3,14 @@ import { Iterables } from '../system';
import { commands, Range, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { BuiltInCommands } from '../constants';
import { GitLogCommit, GitProvider, GitUri } from '../gitProvider';
import { GitLogCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
// import * as moment from 'moment';
import * as path from 'path';
export class DiffWithNextCommand extends ActiveEditorCommand {
constructor(private git: GitProvider) {
constructor(private git: GitService) {
super(Commands.DiffWithNext);
}

View File

@@ -3,14 +3,14 @@ import { Iterables } from '../system';
import { commands, Range, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { BuiltInCommands } from '../constants';
import { GitCommit, GitProvider, GitUri } from '../gitProvider';
import { GitCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
import * as moment from 'moment';
import * as path from 'path';
export class DiffWithPreviousCommand extends ActiveEditorCommand {
constructor(private git: GitProvider) {
constructor(private git: GitService) {
super(Commands.DiffWithPrevious);
}

View File

@@ -3,13 +3,13 @@ import { Iterables } from '../system';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { BuiltInCommands } from '../constants';
import { GitCommit, GitProvider, GitUri } from '../gitProvider';
import { GitCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
import * as path from 'path';
export class DiffWithWorkingCommand extends ActiveEditorCommand {
constructor(private git: GitProvider) {
constructor(private git: GitService) {
super(Commands.DiffWithWorking);
}
@@ -23,7 +23,7 @@ export class DiffWithWorkingCommand extends ActiveEditorCommand {
line = line || (editor && editor.selection.active.line) || 0;
if (!commit || GitProvider.isUncommitted(commit.sha)) {
if (!commit || GitService.isUncommitted(commit.sha)) {
const gitUri = await GitUri.fromUri(uri, this.git);
try {

View File

@@ -1,13 +1,13 @@
'use strict';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands, openEditor } from './commands';
import { GitProvider } from '../gitProvider';
import { GitService } from '../gitService';
import { Logger } from '../logger';
import * as path from 'path';
export class OpenChangedFilesCommand extends ActiveEditorCommand {
constructor(private git: GitProvider, private repoPath: string) {
constructor(private git: GitService, private repoPath: string) {
super(Commands.OpenChangedFiles);
}

View File

@@ -2,12 +2,12 @@
import { commands, Position, Range, TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import { Commands, EditorCommand } from './commands';
import { BuiltInCommands } from '../constants';
import { GitProvider, GitUri } from '../gitProvider';
import { GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
export class ShowBlameHistoryCommand extends EditorCommand {
constructor(private git: GitProvider) {
constructor(private git: GitService) {
super(Commands.ShowBlameHistory);
}

View File

@@ -2,12 +2,12 @@
import { commands, Position, Range, TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import { Commands, EditorCommand } from './commands';
import { BuiltInCommands } from '../constants';
import { GitProvider, GitUri } from '../gitProvider';
import { GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
export class ShowFileHistoryCommand extends EditorCommand {
constructor(private git: GitProvider) {
constructor(private git: GitService) {
super(Commands.ShowFileHistory);
}

View File

@@ -1,13 +1,13 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { GitCommit, GitLogCommit, GitProvider, GitUri, IGitLog } from '../gitProvider';
import { GitCommit, GitLogCommit, GitService, GitUri, IGitLog } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, CommitDetailsQuickPick, CommitWithFileStatusQuickPickItem } from '../quickPicks';
export class ShowQuickCommitDetailsCommand extends ActiveEditorCommand {
constructor(private git: GitProvider, private repoPath: string) {
constructor(private git: GitService, private repoPath: string) {
super(Commands.ShowQuickCommitDetails);
}

View File

@@ -1,14 +1,14 @@
'use strict';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { GitCommit, GitLogCommit, GitProvider, GitUri, IGitLog } from '../gitProvider';
import { GitCommit, GitLogCommit, GitService, GitUri, IGitLog } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, CommitFileDetailsQuickPick } from '../quickPicks';
import * as path from 'path';
export class ShowQuickCommitFileDetailsCommand extends ActiveEditorCommand {
constructor(private git: GitProvider) {
constructor(private git: GitService) {
super(Commands.ShowQuickCommitFileDetails);
}

View File

@@ -1,14 +1,14 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from '../commands';
import { GitProvider, GitUri, IGitLog } from '../gitProvider';
import { GitService, GitUri, IGitLog } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, FileHistoryQuickPick } from '../quickPicks';
import * as path from 'path';
export class ShowQuickFileHistoryCommand extends ActiveEditorCommand {
constructor(private git: GitProvider) {
constructor(private git: GitService) {
super(Commands.ShowQuickFileHistory);
}

View File

@@ -1,13 +1,13 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from '../commands';
import { GitProvider, GitUri, IGitLog } from '../gitProvider';
import { GitService, GitUri, IGitLog } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, RepoHistoryQuickPick } from '../quickPicks';
export class ShowQuickRepoHistoryCommand extends ActiveEditorCommand {
constructor(private git: GitProvider, private repoPath: string) {
constructor(private git: GitService, private repoPath: string) {
super(Commands.ShowQuickRepoHistory);
}

View File

@@ -1,13 +1,13 @@
'use strict';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './commands';
import { GitProvider } from '../gitProvider';
import { GitService } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, RepoStatusQuickPick } from '../quickPicks';
export class ShowQuickRepoStatusCommand extends ActiveEditorCommand {
constructor(private git: GitProvider, private repoPath: string) {
constructor(private git: GitService, private repoPath: string) {
super(Commands.ShowQuickRepoStatus);
}

View File

@@ -1,11 +1,11 @@
'use strict';
import { TextEditor, TextEditorEdit } from 'vscode';
import { Commands, EditorCommand } from './commands';
import { GitProvider } from '../gitProvider';
import { GitService } from '../gitService';
export class ToggleCodeLensCommand extends EditorCommand {
constructor(private git: GitProvider) {
constructor(private git: GitService) {
super(Commands.ToggleCodeLens);
}