mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-22 09:45:37 -05:00
Renames GitProvider to GitService
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user