mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 12:33:35 +01:00
wip: git extension typings
This commit is contained in:
@@ -5,11 +5,26 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { scm, ExtensionContext } from 'vscode';
|
||||
import { findGit } from './git';
|
||||
import { scm, ExtensionContext, workspace } from 'vscode';
|
||||
|
||||
export function log(...args: any[]): void {
|
||||
console.log.apply(console, ['git:', ...args]);
|
||||
}
|
||||
|
||||
export function activate(context: ExtensionContext): any {
|
||||
const provider = scm.createSCMProvider('git', null);
|
||||
context.subscriptions.push(provider);
|
||||
const pathHint = workspace.getConfiguration('git').get<string>('path');
|
||||
|
||||
console.log(provider);
|
||||
findGit(pathHint).then(info => {
|
||||
log(`Using git ${info.version} from ${info.path}`);
|
||||
|
||||
const provider = scm.createSCMProvider('git', {
|
||||
// getOriginalResource: uri => {
|
||||
// return uri;
|
||||
// }
|
||||
});
|
||||
context.subscriptions.push(provider);
|
||||
|
||||
// return new Git({ gitPath: info.path, version: info.version });
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user