Removes git-blame document scheme

Removes git-blame content provider
Fixes some CodeLens issues
Adds support for git uris in more places
Adds git content CodeLens provider
This commit is contained in:
Eric Amodio
2016-11-12 03:11:22 -05:00
parent 638a6dc838
commit a3895d27ab
12 changed files with 146 additions and 293 deletions

View File

@@ -10,7 +10,7 @@ export default class ShowBlameHistoryCommand extends EditorCommand {
super(Commands.ShowBlameHistory);
}
async execute(editor: TextEditor, edit: TextEditorEdit, uri?: Uri, range?: Range, position?: Position) {
async execute(editor: TextEditor, edit: TextEditorEdit, uri?: Uri, range?: Range, position?: Position, sha?: string, line?: number) {
if (!(uri instanceof Uri)) {
if (!editor.document) return undefined;
uri = editor.document.uri;
@@ -23,7 +23,7 @@ export default class ShowBlameHistoryCommand extends EditorCommand {
const gitUri = GitUri.fromUri(uri);
try {
const locations = await this.git.getBlameLocations(gitUri.fsPath, range);
const locations = await this.git.getBlameLocations(gitUri.fsPath, range, gitUri.sha, gitUri.repoPath, sha, line);
if (!locations) return window.showWarningMessage(`Unable to show blame history. File is probably not under source control`);
return commands.executeCommand(BuiltInCommands.ShowReferences, uri, position, locations);